From 7f734fa1581b53c6ed539b9bc67d87624df0338b Mon Sep 17 00:00:00 2001 From: ridho0 Date: Tue, 25 Apr 2017 14:00:12 +0700 Subject: [PATCH 1/3] selesai --- .gitignore | 1 + README.md | 15 +- app.js | 46 + bin/www | 90 + config/config.json | 23 + controllers/user.js | 62 + migrations/20170425040805-create-contact.js | 30 + models/contact.js | 14 + models/index.js | 36 + node_modules/.bin/acorn | 1 + node_modules/.bin/cleancss | 1 + node_modules/.bin/cross-env | 1 + node_modules/.bin/css-beautify | 1 + node_modules/.bin/editorconfig | 1 + node_modules/.bin/gulp | 1 + node_modules/.bin/html-beautify | 1 + node_modules/.bin/jade | 1 + node_modules/.bin/js-beautify | 1 + node_modules/.bin/mime | 1 + node_modules/.bin/mkdirp | 1 + node_modules/.bin/nopt | 1 + node_modules/.bin/semver | 1 + node_modules/.bin/sequelize | 1 + node_modules/.bin/strip-bom | 1 + node_modules/.bin/uglifyjs | 1 + node_modules/.bin/user-home | 1 + node_modules/.bin/uuid | 1 + node_modules/.bin/which | 1 + node_modules/@types/geojson/LICENSE | 21 + node_modules/@types/geojson/README.md | 16 + node_modules/@types/geojson/index.d.ts | 121 + node_modules/@types/geojson/package.json | 80 + node_modules/abbrev/LICENSE | 15 + node_modules/abbrev/README.md | 23 + node_modules/abbrev/abbrev.js | 61 + node_modules/abbrev/package.json | 92 + node_modules/accepts/HISTORY.md | 212 + node_modules/accepts/LICENSE | 23 + node_modules/accepts/README.md | 135 + node_modules/accepts/index.js | 231 + node_modules/accepts/package.json | 112 + node_modules/acorn-globals/LICENSE | 19 + node_modules/acorn-globals/README.md | 76 + node_modules/acorn-globals/index.js | 180 + node_modules/acorn-globals/package.json | 100 + node_modules/acorn/.editorconfig | 7 + node_modules/acorn/.gitattributes | 1 + node_modules/acorn/.npmignore | 3 + node_modules/acorn/.tern-project | 6 + node_modules/acorn/.travis.yml | 6 + node_modules/acorn/AUTHORS | 43 + node_modules/acorn/LICENSE | 19 + node_modules/acorn/README.md | 396 + node_modules/acorn/bin/acorn | 71 + node_modules/acorn/bin/build-acorn.js | 82 + .../acorn/bin/generate-identifier-regex.js | 47 + node_modules/acorn/bin/update_authors.sh | 6 + node_modules/acorn/dist/.keep | 0 node_modules/acorn/dist/acorn.js | 3340 + node_modules/acorn/dist/acorn_loose.js | 1300 + node_modules/acorn/dist/walk.js | 377 + node_modules/acorn/package.json | 222 + node_modules/acorn/src/bin/acorn.js | 59 + node_modules/acorn/src/expression.js | 707 + node_modules/acorn/src/identifier.js | 90 + node_modules/acorn/src/index.js | 67 + node_modules/acorn/src/location.js | 24 + node_modules/acorn/src/locutil.js | 42 + node_modules/acorn/src/loose/acorn_loose.js | 0 node_modules/acorn/src/loose/expression.js | 501 + node_modules/acorn/src/loose/index.js | 50 + node_modules/acorn/src/loose/parseutil.js | 1 + node_modules/acorn/src/loose/state.js | 160 + node_modules/acorn/src/loose/statement.js | 420 + node_modules/acorn/src/loose/tokenize.js | 108 + node_modules/acorn/src/lval.js | 215 + node_modules/acorn/src/node.js | 50 + node_modules/acorn/src/options.js | 121 + node_modules/acorn/src/parseutil.js | 102 + node_modules/acorn/src/state.js | 104 + node_modules/acorn/src/statement.js | 626 + node_modules/acorn/src/tokencontext.js | 109 + node_modules/acorn/src/tokenize.js | 682 + node_modules/acorn/src/tokentype.js | 147 + node_modules/acorn/src/util.js | 9 + node_modules/acorn/src/walk/index.js | 340 + node_modules/acorn/src/whitespace.js | 12 + node_modules/align-text/LICENSE | 21 + node_modules/align-text/README.md | 236 + node_modules/align-text/index.js | 52 + node_modules/align-text/package.json | 117 + node_modules/amdefine/LICENSE | 58 + node_modules/amdefine/README.md | 171 + node_modules/amdefine/amdefine.js | 301 + node_modules/amdefine/intercept.js | 36 + node_modules/amdefine/package.json | 87 + node_modules/ansi-regex/index.js | 4 + node_modules/ansi-regex/license | 21 + node_modules/ansi-regex/package.json | 133 + node_modules/ansi-regex/readme.md | 39 + node_modules/ansi-styles/index.js | 65 + node_modules/ansi-styles/license | 21 + node_modules/ansi-styles/package.json | 114 + node_modules/ansi-styles/readme.md | 86 + node_modules/ap/README.markdown | 61 + node_modules/ap/examples/z.js | 5 + node_modules/ap/index.js | 48 + node_modules/ap/package.json | 94 + node_modules/ap/test/curry.js | 137 + node_modules/archy/.travis.yml | 4 + node_modules/archy/LICENSE | 18 + node_modules/archy/examples/beep.js | 24 + node_modules/archy/examples/multi_line.js | 25 + node_modules/archy/index.js | 35 + node_modules/archy/package.json | 114 + node_modules/archy/readme.markdown | 88 + node_modules/archy/test/beep.js | 40 + node_modules/archy/test/multi_line.js | 45 + node_modules/archy/test/non_unicode.js | 40 + node_modules/arr-diff/LICENSE | 21 + node_modules/arr-diff/README.md | 74 + node_modules/arr-diff/index.js | 58 + node_modules/arr-diff/package.json | 119 + node_modules/arr-flatten/LICENSE | 21 + node_modules/arr-flatten/README.md | 85 + node_modules/arr-flatten/index.js | 27 + node_modules/arr-flatten/package.json | 139 + node_modules/array-differ/index.js | 7 + node_modules/array-differ/package.json | 95 + node_modules/array-differ/readme.md | 41 + node_modules/array-flatten/LICENSE | 21 + node_modules/array-flatten/README.md | 43 + node_modules/array-flatten/array-flatten.js | 64 + node_modules/array-flatten/package.json | 96 + node_modules/array-uniq/index.js | 62 + node_modules/array-uniq/license | 21 + node_modules/array-uniq/package.json | 105 + node_modules/array-uniq/readme.md | 30 + node_modules/array-unique/LICENSE | 21 + node_modules/array-unique/README.md | 51 + node_modules/array-unique/index.js | 28 + node_modules/array-unique/package.json | 94 + node_modules/asap/LICENSE.md | 20 + node_modules/asap/README.md | 81 + node_modules/asap/asap.js | 113 + node_modules/asap/package.json | 73 + node_modules/balanced-match/.npmignore | 5 + node_modules/balanced-match/LICENSE.md | 21 + node_modules/balanced-match/README.md | 91 + node_modules/balanced-match/index.js | 58 + node_modules/balanced-match/package.json | 110 + node_modules/basic-auth/HISTORY.md | 35 + node_modules/basic-auth/LICENSE | 24 + node_modules/basic-auth/README.md | 78 + node_modules/basic-auth/index.js | 108 + node_modules/basic-auth/package.json | 110 + node_modules/beeper/index.js | 60 + node_modules/beeper/license | 21 + node_modules/beeper/package.json | 106 + node_modules/beeper/readme.md | 55 + node_modules/bluebird/LICENSE | 21 + node_modules/bluebird/README.md | 51 + node_modules/bluebird/changelog.md | 1 + .../bluebird/js/browser/bluebird.core.js | 3777 + .../bluebird/js/browser/bluebird.core.min.js | 31 + node_modules/bluebird/js/browser/bluebird.js | 5619 + .../bluebird/js/browser/bluebird.min.js | 31 + node_modules/bluebird/js/release/any.js | 21 + node_modules/bluebird/js/release/assert.js | 55 + node_modules/bluebird/js/release/async.js | 161 + node_modules/bluebird/js/release/bind.js | 67 + node_modules/bluebird/js/release/bluebird.js | 11 + node_modules/bluebird/js/release/call_get.js | 123 + node_modules/bluebird/js/release/cancel.js | 129 + .../bluebird/js/release/catch_filter.js | 42 + node_modules/bluebird/js/release/context.js | 69 + .../bluebird/js/release/debuggability.js | 916 + .../bluebird/js/release/direct_resolve.js | 46 + node_modules/bluebird/js/release/each.js | 30 + node_modules/bluebird/js/release/errors.js | 116 + node_modules/bluebird/js/release/es5.js | 80 + node_modules/bluebird/js/release/filter.js | 12 + node_modules/bluebird/js/release/finally.js | 146 + .../bluebird/js/release/generators.js | 223 + node_modules/bluebird/js/release/join.js | 168 + node_modules/bluebird/js/release/map.js | 168 + node_modules/bluebird/js/release/method.js | 55 + node_modules/bluebird/js/release/nodeback.js | 51 + node_modules/bluebird/js/release/nodeify.js | 58 + node_modules/bluebird/js/release/promise.js | 775 + .../bluebird/js/release/promise_array.js | 185 + node_modules/bluebird/js/release/promisify.js | 314 + node_modules/bluebird/js/release/props.js | 118 + node_modules/bluebird/js/release/queue.js | 73 + node_modules/bluebird/js/release/race.js | 49 + node_modules/bluebird/js/release/reduce.js | 172 + node_modules/bluebird/js/release/schedule.js | 61 + node_modules/bluebird/js/release/settle.js | 43 + node_modules/bluebird/js/release/some.js | 148 + .../js/release/synchronous_inspection.js | 103 + node_modules/bluebird/js/release/thenables.js | 86 + node_modules/bluebird/js/release/timers.js | 93 + node_modules/bluebird/js/release/using.js | 226 + node_modules/bluebird/js/release/util.js | 379 + node_modules/bluebird/package.json | 141 + node_modules/body-parser/HISTORY.md | 498 + node_modules/body-parser/LICENSE | 23 + node_modules/body-parser/README.md | 416 + node_modules/body-parser/index.js | 157 + node_modules/body-parser/lib/read.js | 188 + node_modules/body-parser/lib/types/json.js | 175 + node_modules/body-parser/lib/types/raw.js | 101 + node_modules/body-parser/lib/types/text.js | 121 + .../body-parser/lib/types/urlencoded.js | 279 + .../node_modules/debug/.coveralls.yml | 1 + .../body-parser/node_modules/debug/.eslintrc | 11 + .../body-parser/node_modules/debug/.npmignore | 8 + .../node_modules/debug/.travis.yml | 14 + .../node_modules/debug/CHANGELOG.md | 316 + .../body-parser/node_modules/debug/LICENSE | 19 + .../body-parser/node_modules/debug/Makefile | 50 + .../body-parser/node_modules/debug/README.md | 238 + .../body-parser/node_modules/debug/bower.json | 29 + .../node_modules/debug/component.json | 19 + .../node_modules/debug/karma.conf.js | 70 + .../body-parser/node_modules/debug/node.js | 1 + .../node_modules/debug/package.json | 124 + .../node_modules/debug/src/browser.js | 182 + .../node_modules/debug/src/debug.js | 202 + .../node_modules/debug/src/index.js | 10 + .../node_modules/debug/src/node.js | 241 + node_modules/body-parser/package.json | 125 + node_modules/brace-expansion/README.md | 123 + node_modules/brace-expansion/index.js | 201 + node_modules/brace-expansion/package.json | 114 + node_modules/braces/LICENSE | 21 + node_modules/braces/README.md | 248 + node_modules/braces/index.js | 399 + node_modules/braces/package.json | 157 + node_modules/buffer-shims/index.js | 108 + node_modules/buffer-shims/license.md | 19 + node_modules/buffer-shims/package.json | 86 + node_modules/buffer-shims/readme.md | 21 + node_modules/buffer-writer/.npmignore | 2 + node_modules/buffer-writer/.travis.yml | 4 + node_modules/buffer-writer/LICENSE | 19 + node_modules/buffer-writer/README.md | 48 + node_modules/buffer-writer/benchmark/index.js | 86 + .../benchmark/int-16-benchmark.js | 31 + .../benchmark/int-32-benchmark.js | 17 + .../buffer-writer/benchmark/join-benchmark.js | 16 + .../benchmark/resize-benchmark.js | 23 + .../benchmark/small-benchmark.js | 14 + node_modules/buffer-writer/index.js | 129 + node_modules/buffer-writer/package.json | 97 + node_modules/buffer-writer/test/mocha.opts | 1 + .../buffer-writer/test/writer-tests.js | 218 + .../builtin-modules/builtin-modules.json | 35 + node_modules/builtin-modules/index.js | 10 + node_modules/builtin-modules/license | 21 + node_modules/builtin-modules/package.json | 104 + node_modules/builtin-modules/readme.md | 41 + node_modules/builtin-modules/static.js | 2 + node_modules/bytes/History.md | 70 + node_modules/bytes/LICENSE | 23 + node_modules/bytes/Readme.md | 114 + node_modules/bytes/index.js | 157 + node_modules/bytes/package.json | 120 + node_modules/camelcase/index.js | 27 + node_modules/camelcase/license | 21 + node_modules/camelcase/package.json | 102 + node_modules/camelcase/readme.md | 56 + node_modules/center-align/LICENSE | 21 + node_modules/center-align/README.md | 74 + node_modules/center-align/index.js | 16 + node_modules/center-align/package.json | 121 + node_modules/center-align/utils.js | 40 + node_modules/chalk/index.js | 116 + node_modules/chalk/license | 21 + node_modules/chalk/package.json | 143 + node_modules/chalk/readme.md | 213 + node_modules/character-parser/.npmignore | 2 + node_modules/character-parser/LICENSE | 19 + node_modules/character-parser/README.md | 142 + node_modules/character-parser/index.js | 231 + node_modules/character-parser/package.json | 90 + node_modules/clean-css/History.md | 1123 + node_modules/clean-css/LICENSE | 19 + node_modules/clean-css/README.md | 369 + node_modules/clean-css/bin/cleancss | 183 + node_modules/clean-css/index.js | 1 + node_modules/clean-css/lib/clean.js | 231 + .../lib/colors/hex-name-shortener.js | 186 + node_modules/clean-css/lib/colors/hsl.js | 67 + node_modules/clean-css/lib/colors/rgb.js | 16 + node_modules/clean-css/lib/imports/inliner.js | 399 + .../clean-css/lib/properties/break-up.js | 335 + .../clean-css/lib/properties/can-override.js | 142 + .../clean-css/lib/properties/clone.js | 26 + .../clean-css/lib/properties/compactable.js | 285 + .../lib/properties/every-combination.js | 28 + .../clean-css/lib/properties/has-inherit.js | 10 + .../lib/properties/invalid-property-error.js | 10 + .../clean-css/lib/properties/optimizer.js | 215 + .../lib/properties/override-compactor.js | 384 + .../lib/properties/populate-components.js | 32 + .../clean-css/lib/properties/remove-unused.js | 10 + .../lib/properties/restore-from-optimizing.js | 60 + .../clean-css/lib/properties/restore.js | 232 + .../lib/properties/shorthand-compactor.js | 134 + .../clean-css/lib/properties/validator.js | 197 + .../lib/properties/vendor-prefixes.js | 26 + .../lib/properties/wrap-for-optimizing.js | 118 + .../clean-css/lib/selectors/advanced.js | 86 + .../clean-css/lib/selectors/clean-up.js | 89 + .../clean-css/lib/selectors/extractor.js | 69 + .../clean-css/lib/selectors/is-special.js | 5 + .../clean-css/lib/selectors/merge-adjacent.js | 35 + .../lib/selectors/merge-media-queries.js | 64 + .../selectors/merge-non-adjacent-by-body.js | 61 + .../merge-non-adjacent-by-selector.js | 76 + .../lib/selectors/reduce-non-adjacent.js | 172 + .../remove-duplicate-media-queries.js | 21 + .../lib/selectors/remove-duplicates.js | 41 + .../clean-css/lib/selectors/reorderable.js | 99 + .../clean-css/lib/selectors/restructure.js | 369 + .../clean-css/lib/selectors/simple.js | 454 + .../clean-css/lib/source-maps/track.js | 119 + .../clean-css/lib/stringifier/helpers.js | 167 + .../clean-css/lib/stringifier/one-time.js | 50 + .../clean-css/lib/stringifier/simple.js | 22 + .../clean-css/lib/stringifier/source-maps.js | 96 + .../clean-css/lib/text/comments-processor.js | 131 + .../clean-css/lib/text/escape-store.js | 53 + .../lib/text/expressions-processor.js | 117 + .../clean-css/lib/text/free-text-processor.js | 98 + .../clean-css/lib/text/urls-processor.js | 75 + .../lib/tokenizer/extract-properties.js | 193 + .../lib/tokenizer/extract-selectors.js | 17 + .../clean-css/lib/tokenizer/tokenize.js | 297 + node_modules/clean-css/lib/urls/rebase.js | 30 + node_modules/clean-css/lib/urls/reduce.js | 154 + node_modules/clean-css/lib/urls/rewrite.js | 107 + .../clean-css/lib/utils/clone-array.js | 12 + .../clean-css/lib/utils/compatibility.js | 162 + .../lib/utils/input-source-map-tracker.js | 284 + node_modules/clean-css/lib/utils/object.js | 11 + .../clean-css/lib/utils/quote-scanner.js | 119 + .../clean-css/lib/utils/source-reader.js | 96 + .../clean-css/lib/utils/source-tracker.js | 31 + node_modules/clean-css/lib/utils/split.js | 62 + .../node_modules/commander/History.md | 256 + .../clean-css/node_modules/commander/LICENSE | 22 + .../node_modules/commander/Readme.md | 342 + .../clean-css/node_modules/commander/index.js | 1103 + .../node_modules/commander/package.json | 108 + node_modules/clean-css/package.json | 123 + node_modules/cli-color/.lint | 13 + node_modules/cli-color/.npmignore | 4 + node_modules/cli-color/.travis.yml | 16 + node_modules/cli-color/CHANGES | 105 + node_modules/cli-color/LICENSE | 21 + node_modules/cli-color/README.md | 691 + node_modules/cli-color/art.js | 13 + node_modules/cli-color/bare.js | 71 + node_modules/cli-color/beep.js | 3 + .../cli-color/bin/generate-color-images | 18 + node_modules/cli-color/columns.js | 30 + node_modules/cli-color/erase.js | 10 + node_modules/cli-color/examples/art.js | 8 + node_modules/cli-color/examples/basic.js | 25 + node_modules/cli-color/examples/erase.js | 25 + node_modules/cli-color/examples/styles.js | 10 + node_modules/cli-color/examples/throbber.js | 15 + node_modules/cli-color/examples/xterm.js | 6 + node_modules/cli-color/get-stripped-length.js | 10 + node_modules/cli-color/index.js | 17 + node_modules/cli-color/lib/sgr.js | 107 + node_modules/cli-color/lib/xterm-colors.js | 53 + node_modules/cli-color/lib/xterm-match.js | 40 + node_modules/cli-color/move.js | 36 + node_modules/cli-color/package.json | 108 + node_modules/cli-color/reset.js | 3 + node_modules/cli-color/slice.js | 140 + node_modules/cli-color/strip.js | 8 + .../test/__playground/throbber.formatted.js | 12 + .../cli-color/test/__playground/throbber.js | 11 + node_modules/cli-color/test/art.js | 28 + node_modules/cli-color/test/bare.js | 284 + node_modules/cli-color/test/beep.js | 3 + node_modules/cli-color/test/columns.js | 32 + node_modules/cli-color/test/erase.js | 6 + .../cli-color/test/get-stripped-length.js | 16 + node_modules/cli-color/test/index.js | 16 + node_modules/cli-color/test/lib/sgr.js | 14 + .../cli-color/test/lib/xterm-colors.js | 10 + .../cli-color/test/lib/xterm-match.js | 9 + node_modules/cli-color/test/move.js | 37 + node_modules/cli-color/test/reset.js | 5 + node_modules/cli-color/test/slice.js | 92 + node_modules/cli-color/test/strip.js | 98 + node_modules/cli-color/test/throbber.js | 45 + node_modules/cli-color/test/visual.js | 124 + node_modules/cli-color/test/window-size.js | 8 + node_modules/cli-color/throbber.js | 50 + node_modules/cli-color/window-size.js | 8 + node_modules/cliui/.coveralls.yml | 1 + node_modules/cliui/.npmignore | 2 + node_modules/cliui/.travis.yml | 7 + node_modules/cliui/LICENSE.txt | 14 + node_modules/cliui/README.md | 104 + node_modules/cliui/index.js | 273 + .../cliui/node_modules/wordwrap/.npmignore | 1 + .../node_modules/wordwrap/README.markdown | 70 + .../node_modules/wordwrap/example/center.js | 10 + .../node_modules/wordwrap/example/meat.js | 3 + .../cliui/node_modules/wordwrap/index.js | 76 + .../cliui/node_modules/wordwrap/package.json | 94 + .../cliui/node_modules/wordwrap/test/break.js | 30 + .../node_modules/wordwrap/test/idleness.txt | 63 + .../cliui/node_modules/wordwrap/test/wrap.js | 31 + node_modules/cliui/package.json | 122 + node_modules/cliui/test/cliui.js | 349 + node_modules/clone-stats/LICENSE.md | 21 + node_modules/clone-stats/README.md | 17 + node_modules/clone-stats/index.js | 13 + node_modules/clone-stats/package.json | 90 + node_modules/clone-stats/test.js | 36 + node_modules/clone/.npmignore | 1 + node_modules/clone/.travis.yml | 3 + node_modules/clone/LICENSE | 18 + node_modules/clone/README.md | 126 + node_modules/clone/clone.js | 160 + node_modules/clone/package.json | 167 + node_modules/clone/test-apart-ctx.html | 22 + node_modules/clone/test.html | 148 + node_modules/clone/test.js | 372 + node_modules/code-point-at/index.js | 32 + node_modules/code-point-at/license | 21 + node_modules/code-point-at/package.json | 106 + node_modules/code-point-at/readme.md | 32 + node_modules/commander/History.md | 222 + node_modules/commander/Readme.md | 300 + node_modules/commander/index.js | 1020 + node_modules/commander/package.json | 106 + node_modules/concat-map/.travis.yml | 4 + node_modules/concat-map/LICENSE | 18 + node_modules/concat-map/README.markdown | 62 + node_modules/concat-map/example/map.js | 6 + node_modules/concat-map/index.js | 13 + node_modules/concat-map/package.json | 117 + node_modules/concat-map/test/map.js | 39 + node_modules/config-chain/.npmignore | 3 + node_modules/config-chain/LICENCE | 22 + node_modules/config-chain/index.js | 282 + node_modules/config-chain/package.json | 98 + node_modules/config-chain/readme.markdown | 237 + node_modules/config-chain/test/broken.js | 10 + node_modules/config-chain/test/broken.json | 21 + node_modules/config-chain/test/chain-class.js | 100 + node_modules/config-chain/test/env.js | 10 + node_modules/config-chain/test/find-file.js | 13 + node_modules/config-chain/test/get.js | 15 + .../config-chain/test/ignore-unfound-file.js | 5 + node_modules/config-chain/test/ini.js | 18 + node_modules/config-chain/test/save.js | 59 + node_modules/constantinople/.gitattributes | 22 + node_modules/constantinople/.npmignore | 13 + node_modules/constantinople/.travis.yml | 3 + node_modules/constantinople/LICENSE | 19 + node_modules/constantinople/README.md | 42 + node_modules/constantinople/index.js | 100 + node_modules/constantinople/package.json | 83 + node_modules/constantinople/test/index.js | 71 + node_modules/content-disposition/HISTORY.md | 50 + node_modules/content-disposition/LICENSE | 22 + node_modules/content-disposition/README.md | 141 + node_modules/content-disposition/index.js | 445 + node_modules/content-disposition/package.json | 110 + node_modules/content-type/HISTORY.md | 14 + node_modules/content-type/LICENSE | 22 + node_modules/content-type/README.md | 92 + node_modules/content-type/index.js | 216 + node_modules/content-type/package.json | 105 + node_modules/cookie-parser/HISTORY.md | 85 + node_modules/cookie-parser/LICENSE | 23 + node_modules/cookie-parser/README.md | 85 + node_modules/cookie-parser/index.js | 181 + node_modules/cookie-parser/package.json | 114 + node_modules/cookie-signature/.npmignore | 4 + node_modules/cookie-signature/History.md | 38 + node_modules/cookie-signature/Readme.md | 42 + node_modules/cookie-signature/index.js | 51 + node_modules/cookie-signature/package.json | 93 + node_modules/cookie/HISTORY.md | 118 + node_modules/cookie/LICENSE | 24 + node_modules/cookie/README.md | 220 + node_modules/cookie/index.js | 195 + node_modules/cookie/package.json | 107 + node_modules/core-util-is/LICENSE | 19 + node_modules/core-util-is/README.md | 3 + node_modules/core-util-is/float.patch | 604 + node_modules/core-util-is/lib/util.js | 107 + node_modules/core-util-is/package.json | 97 + node_modules/core-util-is/test.js | 68 + node_modules/cross-env/CHANGELOG.md | 4 + node_modules/cross-env/LICENSE | 20 + node_modules/cross-env/README.md | 154 + node_modules/cross-env/dist/bin/cross-env.js | 10 + node_modules/cross-env/dist/command.js | 32 + node_modules/cross-env/dist/index.js | 75 + node_modules/cross-env/package.json | 157 + node_modules/cross-spawn/CHANGELOG.md | 6 + node_modules/cross-spawn/LICENSE | 19 + node_modules/cross-spawn/README.md | 85 + node_modules/cross-spawn/index.js | 59 + node_modules/cross-spawn/lib/enoent.js | 73 + node_modules/cross-spawn/lib/parse.js | 113 + .../cross-spawn/lib/util/escapeArgument.js | 30 + .../cross-spawn/lib/util/escapeCommand.js | 12 + .../lib/util/hasEmptyArgumentBug.js | 18 + .../cross-spawn/lib/util/readShebang.js | 37 + .../cross-spawn/lib/util/resolveCommand.js | 31 + node_modules/cross-spawn/package.json | 118 + node_modules/css-parse/.npmignore | 6 + node_modules/css-parse/History.md | 30 + node_modules/css-parse/Makefile | 7 + node_modules/css-parse/Readme.md | 62 + node_modules/css-parse/component.json | 8 + node_modules/css-parse/index.js | 265 + node_modules/css-parse/package.json | 74 + node_modules/css-stringify/.npmignore | 6 + node_modules/css-stringify/History.md | 30 + node_modules/css-stringify/Makefile | 7 + node_modules/css-stringify/Readme.md | 33 + node_modules/css-stringify/component.json | 8 + node_modules/css-stringify/index.js | 182 + node_modules/css-stringify/package.json | 75 + node_modules/css/.npmignore | 4 + node_modules/css/History.md | 20 + node_modules/css/Makefile | 8 + node_modules/css/Readme.md | 77 + node_modules/css/benchmark.js | 36 + node_modules/css/component.json | 13 + node_modules/css/index.js | 3 + node_modules/css/package.json | 74 + node_modules/css/test.js | 6 + node_modules/d/.lint | 11 + node_modules/d/.npmignore | 4 + node_modules/d/.travis.yml | 15 + node_modules/d/CHANGES | 13 + node_modules/d/LICENSE | 19 + node_modules/d/README.md | 104 + node_modules/d/auto-bind.js | 32 + node_modules/d/index.js | 63 + node_modules/d/lazy.js | 117 + node_modules/d/package.json | 103 + node_modules/d/test/auto-bind.js | 12 + node_modules/d/test/index.js | 182 + node_modules/d/test/lazy.js | 82 + node_modules/dateformat/.npmignore | 2 + node_modules/dateformat/LICENSE | 20 + node_modules/dateformat/Readme.md | 135 + node_modules/dateformat/lib/dateformat.js | 226 + node_modules/dateformat/package.json | 114 + node_modules/debug/.coveralls.yml | 1 + node_modules/debug/.eslintrc | 11 + node_modules/debug/.npmignore | 9 + node_modules/debug/.travis.yml | 14 + node_modules/debug/CHANGELOG.md | 337 + node_modules/debug/LICENSE | 19 + node_modules/debug/Makefile | 50 + node_modules/debug/README.md | 312 + node_modules/debug/component.json | 19 + node_modules/debug/karma.conf.js | 70 + node_modules/debug/node.js | 1 + node_modules/debug/node_modules/ms/index.js | 149 + node_modules/debug/node_modules/ms/license.md | 21 + .../debug/node_modules/ms/package.json | 108 + node_modules/debug/node_modules/ms/readme.md | 52 + node_modules/debug/package.json | 124 + node_modules/debug/src/browser.js | 185 + node_modules/debug/src/debug.js | 202 + node_modules/debug/src/index.js | 10 + node_modules/debug/src/node.js | 241 + node_modules/decamelize/index.js | 13 + node_modules/decamelize/license | 21 + node_modules/decamelize/package.json | 106 + node_modules/decamelize/readme.md | 48 + node_modules/defaults/.npmignore | 1 + node_modules/defaults/LICENSE | 21 + node_modules/defaults/README.md | 43 + node_modules/defaults/index.js | 13 + node_modules/defaults/package.json | 88 + node_modules/defaults/test.js | 34 + node_modules/depd/History.md | 84 + node_modules/depd/LICENSE | 22 + node_modules/depd/Readme.md | 281 + node_modules/depd/index.js | 521 + node_modules/depd/lib/browser/index.js | 79 + node_modules/depd/lib/compat/buffer-concat.js | 35 + .../depd/lib/compat/callsite-tostring.js | 103 + .../depd/lib/compat/event-listener-count.js | 22 + node_modules/depd/lib/compat/index.js | 84 + node_modules/depd/package.json | 104 + node_modules/deprecated/.npmignore | 6 + node_modules/deprecated/.travis.yml | 6 + node_modules/deprecated/LICENSE | 20 + node_modules/deprecated/README.md | 51 + node_modules/deprecated/index.js | 39 + node_modules/deprecated/package.json | 96 + node_modules/deprecated/test/field.js | 44 + node_modules/deprecated/test/method.js | 32 + node_modules/destroy/LICENSE | 22 + node_modules/destroy/README.md | 60 + node_modules/destroy/index.js | 75 + node_modules/destroy/package.json | 106 + node_modules/detect-file/LICENSE | 21 + node_modules/detect-file/README.md | 90 + node_modules/detect-file/index.js | 110 + node_modules/detect-file/package.json | 111 + node_modules/dottie/.npmignore | 1 + node_modules/dottie/.travis.yml | 5 + node_modules/dottie/LICENSE | 23 + node_modules/dottie/README.md | 107 + node_modules/dottie/dottie.js | 242 + node_modules/dottie/package.json | 82 + node_modules/dottie/test/find.test.js | 19 + node_modules/dottie/test/flatten.test.js | 40 + node_modules/dottie/test/get.test.js | 106 + node_modules/dottie/test/paths.test.js | 26 + node_modules/dottie/test/set.test.js | 48 + node_modules/dottie/test/transform.test.js | 148 + node_modules/duplexer2/.npmignore | 1 + node_modules/duplexer2/.travis.yml | 3 + node_modules/duplexer2/LICENSE.md | 26 + node_modules/duplexer2/README.md | 129 + node_modules/duplexer2/example.js | 49 + node_modules/duplexer2/index.js | 62 + node_modules/duplexer2/package.json | 90 + node_modules/duplexer2/test/tests.js | 161 + node_modules/editorconfig/.editorconfig | 14 + node_modules/editorconfig/.gitattributes | 2 + node_modules/editorconfig/.gitmodules | 3 + node_modules/editorconfig/.npmignore | 12 + node_modules/editorconfig/.travis.yml | 18 + node_modules/editorconfig/CMakeLists.txt | 16 + node_modules/editorconfig/LICENSE | 19 + node_modules/editorconfig/README.md | 198 + node_modules/editorconfig/bin/editorconfig | 42 + node_modules/editorconfig/editorconfig.js | 237 + node_modules/editorconfig/lib/fnmatch.js | 1080 + node_modules/editorconfig/lib/ini.js | 65 + node_modules/editorconfig/lib/version.js | 48 + .../node_modules/commander/History.md | 261 + .../node_modules/commander/LICENSE | 22 + .../node_modules/commander/Readme.md | 351 + .../node_modules/commander/index.js | 1110 + .../node_modules/commander/package.json | 104 + .../node_modules/lru-cache/.npmignore | 1 + .../node_modules/lru-cache/.travis.yml | 8 + .../node_modules/lru-cache/CONTRIBUTORS | 14 + .../node_modules/lru-cache/LICENSE | 15 + .../node_modules/lru-cache/README.md | 132 + .../node_modules/lru-cache/lib/lru-cache.js | 356 + .../node_modules/lru-cache/package.json | 94 + .../node_modules/lru-cache/test/basic.js | 427 + .../node_modules/lru-cache/test/foreach.js | 130 + .../lru-cache/test/memory-leak.js | 51 + .../node_modules/lru-cache/test/overflow.js | 45 + .../node_modules/lru-cache/test/serialize.js | 224 + node_modules/editorconfig/package.json | 124 + node_modules/editorconfig/test/app.js | 0 node_modules/editorconfig/test/index.js | 84 + node_modules/ee-first/LICENSE | 22 + node_modules/ee-first/README.md | 80 + node_modules/ee-first/index.js | 95 + node_modules/ee-first/package.json | 98 + node_modules/encodeurl/HISTORY.md | 9 + node_modules/encodeurl/LICENSE | 22 + node_modules/encodeurl/README.md | 124 + node_modules/encodeurl/index.js | 60 + node_modules/encodeurl/package.json | 111 + node_modules/end-of-stream/.npmignore | 1 + node_modules/end-of-stream/README.md | 47 + node_modules/end-of-stream/index.js | 61 + node_modules/end-of-stream/package.json | 89 + node_modules/end-of-stream/test.js | 59 + node_modules/error-ex/LICENSE | 21 + node_modules/error-ex/README.md | 144 + node_modules/error-ex/index.js | 133 + node_modules/error-ex/package.json | 113 + node_modules/es5-ext/.lint | 39 + node_modules/es5-ext/.lintignore | 9 + node_modules/es5-ext/.npmignore | 4 + node_modules/es5-ext/.travis.yml | 16 + node_modules/es5-ext/CHANGES | 646 + node_modules/es5-ext/LICENSE | 21 + node_modules/es5-ext/README.md | 993 + .../es5-ext/array/#/@@iterator/implement.js | 6 + .../es5-ext/array/#/@@iterator/index.js | 4 + .../array/#/@@iterator/is-implemented.js | 16 + .../es5-ext/array/#/@@iterator/shim.js | 3 + .../es5-ext/array/#/_compare-by-length.js | 9 + node_modules/es5-ext/array/#/binary-search.js | 28 + node_modules/es5-ext/array/#/clear.js | 12 + node_modules/es5-ext/array/#/compact.js | 9 + .../es5-ext/array/#/concat/implement.js | 6 + node_modules/es5-ext/array/#/concat/index.js | 4 + .../es5-ext/array/#/concat/is-implemented.js | 7 + node_modules/es5-ext/array/#/concat/shim.js | 44 + node_modules/es5-ext/array/#/contains.js | 7 + .../es5-ext/array/#/copy-within/implement.js | 7 + .../es5-ext/array/#/copy-within/index.js | 4 + .../array/#/copy-within/is-implemented.js | 7 + .../es5-ext/array/#/copy-within/shim.js | 39 + node_modules/es5-ext/array/#/diff.js | 13 + node_modules/es5-ext/array/#/e-index-of.js | 29 + .../es5-ext/array/#/e-last-index-of.js | 29 + .../es5-ext/array/#/entries/implement.js | 6 + node_modules/es5-ext/array/#/entries/index.js | 4 + .../es5-ext/array/#/entries/is-implemented.js | 15 + node_modules/es5-ext/array/#/entries/shim.js | 4 + node_modules/es5-ext/array/#/exclusion.js | 27 + .../es5-ext/array/#/fill/implement.js | 6 + node_modules/es5-ext/array/#/fill/index.js | 4 + .../es5-ext/array/#/fill/is-implemented.js | 7 + node_modules/es5-ext/array/#/fill/shim.js | 21 + .../es5-ext/array/#/filter/implement.js | 6 + node_modules/es5-ext/array/#/filter/index.js | 4 + .../es5-ext/array/#/filter/is-implemented.js | 9 + node_modules/es5-ext/array/#/filter/shim.js | 22 + .../es5-ext/array/#/find-index/implement.js | 7 + .../es5-ext/array/#/find-index/index.js | 4 + .../array/#/find-index/is-implemented.js | 9 + .../es5-ext/array/#/find-index/shim.js | 20 + .../es5-ext/array/#/find/implement.js | 6 + node_modules/es5-ext/array/#/find/index.js | 4 + .../es5-ext/array/#/find/is-implemented.js | 9 + node_modules/es5-ext/array/#/find/shim.js | 8 + node_modules/es5-ext/array/#/first-index.js | 16 + node_modules/es5-ext/array/#/first.js | 9 + node_modules/es5-ext/array/#/flatten.js | 39 + .../es5-ext/array/#/for-each-right.js | 20 + node_modules/es5-ext/array/#/group.js | 23 + node_modules/es5-ext/array/#/index.js | 40 + node_modules/es5-ext/array/#/indexes-of.js | 12 + node_modules/es5-ext/array/#/intersection.js | 19 + node_modules/es5-ext/array/#/is-copy.js | 21 + node_modules/es5-ext/array/#/is-uniq.js | 12 + .../es5-ext/array/#/keys/implement.js | 6 + node_modules/es5-ext/array/#/keys/index.js | 4 + .../es5-ext/array/#/keys/is-implemented.js | 14 + node_modules/es5-ext/array/#/keys/shim.js | 4 + node_modules/es5-ext/array/#/last-index.js | 16 + node_modules/es5-ext/array/#/last.js | 9 + node_modules/es5-ext/array/#/map/implement.js | 6 + node_modules/es5-ext/array/#/map/index.js | 4 + .../es5-ext/array/#/map/is-implemented.js | 8 + node_modules/es5-ext/array/#/map/shim.js | 21 + node_modules/es5-ext/array/#/remove.js | 12 + node_modules/es5-ext/array/#/separate.js | 10 + .../es5-ext/array/#/slice/implement.js | 6 + node_modules/es5-ext/array/#/slice/index.js | 4 + .../es5-ext/array/#/slice/is-implemented.js | 7 + node_modules/es5-ext/array/#/slice/shim.js | 35 + node_modules/es5-ext/array/#/some-right.js | 23 + .../es5-ext/array/#/splice/implement.js | 6 + node_modules/es5-ext/array/#/splice/index.js | 4 + .../es5-ext/array/#/splice/is-implemented.js | 7 + node_modules/es5-ext/array/#/splice/shim.js | 14 + node_modules/es5-ext/array/#/uniq.js | 13 + .../es5-ext/array/#/values/implement.js | 6 + node_modules/es5-ext/array/#/values/index.js | 3 + .../es5-ext/array/#/values/is-implemented.js | 14 + node_modules/es5-ext/array/#/values/shim.js | 4 + node_modules/es5-ext/array/_is-extensible.js | 13 + .../es5-ext/array/_sub-array-dummy-safe.js | 23 + .../es5-ext/array/_sub-array-dummy.js | 16 + node_modules/es5-ext/array/from/implement.js | 6 + node_modules/es5-ext/array/from/index.js | 5 + .../es5-ext/array/from/is-implemented.js | 9 + node_modules/es5-ext/array/from/shim.js | 106 + node_modules/es5-ext/array/generate.js | 20 + node_modules/es5-ext/array/index.js | 11 + node_modules/es5-ext/array/is-plain-array.js | 11 + node_modules/es5-ext/array/of/implement.js | 6 + node_modules/es5-ext/array/of/index.js | 5 + .../es5-ext/array/of/is-implemented.js | 8 + node_modules/es5-ext/array/of/shim.js | 19 + node_modules/es5-ext/array/to-array.js | 9 + node_modules/es5-ext/array/valid-array.js | 8 + node_modules/es5-ext/boolean/index.js | 5 + node_modules/es5-ext/boolean/is-boolean.js | 10 + node_modules/es5-ext/date/#/copy.js | 5 + node_modules/es5-ext/date/#/days-in-month.js | 17 + node_modules/es5-ext/date/#/floor-day.js | 8 + node_modules/es5-ext/date/#/floor-month.js | 8 + node_modules/es5-ext/date/#/floor-year.js | 8 + node_modules/es5-ext/date/#/format.js | 21 + node_modules/es5-ext/date/#/index.js | 10 + node_modules/es5-ext/date/index.js | 7 + node_modules/es5-ext/date/is-date.js | 9 + node_modules/es5-ext/date/valid-date.js | 8 + node_modules/es5-ext/error/#/index.js | 5 + node_modules/es5-ext/error/#/throw.js | 5 + node_modules/es5-ext/error/custom.js | 19 + node_modules/es5-ext/error/index.js | 8 + node_modules/es5-ext/error/is-error.js | 9 + node_modules/es5-ext/error/valid-error.js | 8 + node_modules/es5-ext/function/#/compose.js | 20 + node_modules/es5-ext/function/#/copy.js | 15 + node_modules/es5-ext/function/#/curry.js | 24 + node_modules/es5-ext/function/#/index.js | 12 + node_modules/es5-ext/function/#/lock.js | 12 + node_modules/es5-ext/function/#/not.js | 14 + node_modules/es5-ext/function/#/partial.js | 16 + node_modules/es5-ext/function/#/spread.js | 10 + .../es5-ext/function/#/to-string-tokens.js | 11 + .../es5-ext/function/_define-length.js | 44 + node_modules/es5-ext/function/constant.js | 5 + node_modules/es5-ext/function/identity.js | 3 + node_modules/es5-ext/function/index.js | 15 + node_modules/es5-ext/function/invoke.js | 15 + node_modules/es5-ext/function/is-arguments.js | 7 + node_modules/es5-ext/function/is-function.js | 9 + node_modules/es5-ext/function/noop.js | 3 + node_modules/es5-ext/function/pluck.js | 7 + .../es5-ext/function/valid-function.js | 8 + node_modules/es5-ext/global.js | 3 + node_modules/es5-ext/index.js | 18 + node_modules/es5-ext/iterable/for-each.js | 12 + node_modules/es5-ext/iterable/index.js | 8 + node_modules/es5-ext/iterable/is.js | 10 + .../es5-ext/iterable/validate-object.js | 9 + node_modules/es5-ext/iterable/validate.js | 8 + node_modules/es5-ext/json/index.js | 5 + node_modules/es5-ext/json/safe-stringify.js | 26 + node_modules/es5-ext/math/_pack-ieee754.js | 82 + node_modules/es5-ext/math/_unpack-ieee754.js | 33 + node_modules/es5-ext/math/acosh/implement.js | 6 + node_modules/es5-ext/math/acosh/index.js | 5 + .../es5-ext/math/acosh/is-implemented.js | 7 + node_modules/es5-ext/math/acosh/shim.js | 12 + node_modules/es5-ext/math/asinh/implement.js | 6 + node_modules/es5-ext/math/asinh/index.js | 5 + .../es5-ext/math/asinh/is-implemented.js | 7 + node_modules/es5-ext/math/asinh/shim.js | 15 + node_modules/es5-ext/math/atanh/implement.js | 6 + node_modules/es5-ext/math/atanh/index.js | 5 + .../es5-ext/math/atanh/is-implemented.js | 7 + node_modules/es5-ext/math/atanh/shim.js | 14 + node_modules/es5-ext/math/cbrt/implement.js | 6 + node_modules/es5-ext/math/cbrt/index.js | 5 + .../es5-ext/math/cbrt/is-implemented.js | 7 + node_modules/es5-ext/math/cbrt/shim.js | 12 + node_modules/es5-ext/math/clz32/implement.js | 6 + node_modules/es5-ext/math/clz32/index.js | 5 + .../es5-ext/math/clz32/is-implemented.js | 7 + node_modules/es5-ext/math/clz32/shim.js | 6 + node_modules/es5-ext/math/cosh/implement.js | 6 + node_modules/es5-ext/math/cosh/index.js | 5 + .../es5-ext/math/cosh/is-implemented.js | 7 + node_modules/es5-ext/math/cosh/shim.js | 11 + node_modules/es5-ext/math/expm1/implement.js | 6 + node_modules/es5-ext/math/expm1/index.js | 5 + .../es5-ext/math/expm1/is-implemented.js | 7 + node_modules/es5-ext/math/expm1/shim.js | 16 + node_modules/es5-ext/math/fround/implement.js | 6 + node_modules/es5-ext/math/fround/index.js | 5 + .../es5-ext/math/fround/is-implemented.js | 7 + node_modules/es5-ext/math/fround/shim.js | 33 + node_modules/es5-ext/math/hypot/implement.js | 6 + node_modules/es5-ext/math/hypot/index.js | 5 + .../es5-ext/math/hypot/is-implemented.js | 7 + node_modules/es5-ext/math/hypot/shim.js | 34 + node_modules/es5-ext/math/imul/implement.js | 6 + node_modules/es5-ext/math/imul/index.js | 5 + .../es5-ext/math/imul/is-implemented.js | 7 + node_modules/es5-ext/math/imul/shim.js | 13 + node_modules/es5-ext/math/index.js | 21 + node_modules/es5-ext/math/log10/implement.js | 6 + node_modules/es5-ext/math/log10/index.js | 5 + .../es5-ext/math/log10/is-implemented.js | 7 + node_modules/es5-ext/math/log10/shim.js | 14 + node_modules/es5-ext/math/log1p/implement.js | 6 + node_modules/es5-ext/math/log1p/index.js | 5 + .../es5-ext/math/log1p/is-implemented.js | 7 + node_modules/es5-ext/math/log1p/shim.js | 17 + node_modules/es5-ext/math/log2/implement.js | 6 + node_modules/es5-ext/math/log2/index.js | 5 + .../es5-ext/math/log2/is-implemented.js | 7 + node_modules/es5-ext/math/log2/shim.js | 14 + node_modules/es5-ext/math/sign/implement.js | 6 + node_modules/es5-ext/math/sign/index.js | 5 + .../es5-ext/math/sign/is-implemented.js | 7 + node_modules/es5-ext/math/sign/shim.js | 7 + node_modules/es5-ext/math/sinh/implement.js | 6 + node_modules/es5-ext/math/sinh/index.js | 5 + .../es5-ext/math/sinh/is-implemented.js | 7 + node_modules/es5-ext/math/sinh/shim.js | 17 + node_modules/es5-ext/math/tanh/implement.js | 6 + node_modules/es5-ext/math/tanh/index.js | 5 + .../es5-ext/math/tanh/is-implemented.js | 7 + node_modules/es5-ext/math/tanh/shim.js | 17 + node_modules/es5-ext/math/trunc/implement.js | 6 + node_modules/es5-ext/math/trunc/index.js | 5 + .../es5-ext/math/trunc/is-implemented.js | 7 + node_modules/es5-ext/math/trunc/shim.js | 13 + node_modules/es5-ext/number/#/index.js | 5 + node_modules/es5-ext/number/#/pad.js | 15 + .../es5-ext/number/epsilon/implement.js | 6 + node_modules/es5-ext/number/epsilon/index.js | 3 + .../es5-ext/number/epsilon/is-implemented.js | 5 + node_modules/es5-ext/number/index.js | 17 + .../es5-ext/number/is-finite/implement.js | 6 + .../es5-ext/number/is-finite/index.js | 5 + .../number/is-finite/is-implemented.js | 7 + node_modules/es5-ext/number/is-finite/shim.js | 5 + .../es5-ext/number/is-integer/implement.js | 6 + .../es5-ext/number/is-integer/index.js | 5 + .../number/is-integer/is-implemented.js | 7 + .../es5-ext/number/is-integer/shim.js | 8 + .../es5-ext/number/is-nan/implement.js | 6 + node_modules/es5-ext/number/is-nan/index.js | 5 + .../es5-ext/number/is-nan/is-implemented.js | 7 + node_modules/es5-ext/number/is-nan/shim.js | 3 + node_modules/es5-ext/number/is-natural.js | 5 + node_modules/es5-ext/number/is-number.js | 11 + .../number/is-safe-integer/implement.js | 6 + .../es5-ext/number/is-safe-integer/index.js | 5 + .../number/is-safe-integer/is-implemented.js | 8 + .../es5-ext/number/is-safe-integer/shim.js | 11 + .../number/max-safe-integer/implement.js | 6 + .../es5-ext/number/max-safe-integer/index.js | 3 + .../number/max-safe-integer/is-implemented.js | 5 + .../number/min-safe-integer/implement.js | 6 + .../es5-ext/number/min-safe-integer/index.js | 3 + .../number/min-safe-integer/is-implemented.js | 5 + node_modules/es5-ext/number/to-integer.js | 12 + node_modules/es5-ext/number/to-pos-integer.js | 7 + node_modules/es5-ext/number/to-uint32.js | 3 + node_modules/es5-ext/object/_iterate.js | 29 + .../es5-ext/object/assign/implement.js | 6 + node_modules/es5-ext/object/assign/index.js | 5 + .../es5-ext/object/assign/is-implemented.js | 9 + node_modules/es5-ext/object/assign/shim.js | 22 + node_modules/es5-ext/object/clear.js | 16 + node_modules/es5-ext/object/compact.js | 7 + node_modules/es5-ext/object/compare.js | 42 + node_modules/es5-ext/object/copy-deep.js | 38 + node_modules/es5-ext/object/copy.js | 10 + node_modules/es5-ext/object/count.js | 5 + node_modules/es5-ext/object/create.js | 36 + .../object/ensure-natural-number-value.js | 8 + .../es5-ext/object/ensure-natural-number.js | 9 + node_modules/es5-ext/object/eq.js | 5 + node_modules/es5-ext/object/every.js | 3 + node_modules/es5-ext/object/filter.js | 15 + node_modules/es5-ext/object/find-key.js | 3 + node_modules/es5-ext/object/find.js | 8 + node_modules/es5-ext/object/first-key.js | 14 + node_modules/es5-ext/object/flatten.js | 17 + node_modules/es5-ext/object/for-each.js | 3 + .../es5-ext/object/get-property-names.js | 18 + node_modules/es5-ext/object/index.js | 54 + node_modules/es5-ext/object/is-array-like.js | 14 + node_modules/es5-ext/object/is-callable.js | 5 + node_modules/es5-ext/object/is-copy-deep.js | 58 + node_modules/es5-ext/object/is-copy.js | 24 + node_modules/es5-ext/object/is-empty.js | 14 + .../es5-ext/object/is-number-value.js | 3 + node_modules/es5-ext/object/is-object.js | 7 + .../es5-ext/object/is-plain-object.js | 20 + node_modules/es5-ext/object/is-value.js | 5 + node_modules/es5-ext/object/is.js | 10 + node_modules/es5-ext/object/key-of.js | 15 + node_modules/es5-ext/object/keys/implement.js | 6 + node_modules/es5-ext/object/keys/index.js | 5 + .../es5-ext/object/keys/is-implemented.js | 8 + node_modules/es5-ext/object/keys/shim.js | 7 + node_modules/es5-ext/object/map-keys.js | 15 + node_modules/es5-ext/object/map.js | 15 + .../es5-ext/object/mixin-prototypes.js | 34 + node_modules/es5-ext/object/mixin.js | 27 + .../es5-ext/object/normalize-options.js | 17 + node_modules/es5-ext/object/primitive-set.js | 9 + node_modules/es5-ext/object/safe-traverse.js | 15 + node_modules/es5-ext/object/serialize.js | 36 + .../object/set-prototype-of/implement.js | 8 + .../es5-ext/object/set-prototype-of/index.js | 5 + .../object/set-prototype-of/is-implemented.js | 11 + .../es5-ext/object/set-prototype-of/shim.js | 73 + node_modules/es5-ext/object/some.js | 3 + node_modules/es5-ext/object/to-array.js | 18 + node_modules/es5-ext/object/unserialize.js | 7 + node_modules/es5-ext/object/valid-callable.js | 6 + node_modules/es5-ext/object/valid-object.js | 8 + node_modules/es5-ext/object/valid-value.js | 6 + .../object/validate-array-like-object.js | 9 + .../es5-ext/object/validate-array-like.js | 8 + .../object/validate-stringifiable-value.js | 6 + .../es5-ext/object/validate-stringifiable.js | 9 + node_modules/es5-ext/package.json | 119 + node_modules/es5-ext/reg-exp/#/index.js | 10 + node_modules/es5-ext/reg-exp/#/is-sticky.js | 9 + node_modules/es5-ext/reg-exp/#/is-unicode.js | 9 + .../es5-ext/reg-exp/#/match/implement.js | 6 + node_modules/es5-ext/reg-exp/#/match/index.js | 5 + .../es5-ext/reg-exp/#/match/is-implemented.js | 8 + node_modules/es5-ext/reg-exp/#/match/shim.js | 8 + .../es5-ext/reg-exp/#/replace/implement.js | 6 + .../es5-ext/reg-exp/#/replace/index.js | 5 + .../reg-exp/#/replace/is-implemented.js | 8 + .../es5-ext/reg-exp/#/replace/shim.js | 8 + .../es5-ext/reg-exp/#/search/implement.js | 6 + .../es5-ext/reg-exp/#/search/index.js | 5 + .../reg-exp/#/search/is-implemented.js | 8 + node_modules/es5-ext/reg-exp/#/search/shim.js | 8 + .../es5-ext/reg-exp/#/split/implement.js | 6 + node_modules/es5-ext/reg-exp/#/split/index.js | 5 + .../es5-ext/reg-exp/#/split/is-implemented.js | 8 + node_modules/es5-ext/reg-exp/#/split/shim.js | 8 + .../es5-ext/reg-exp/#/sticky/implement.js | 8 + .../reg-exp/#/sticky/is-implemented.js | 10 + .../es5-ext/reg-exp/#/unicode/implement.js | 8 + .../reg-exp/#/unicode/is-implemented.js | 10 + node_modules/es5-ext/reg-exp/escape.js | 9 + node_modules/es5-ext/reg-exp/index.js | 8 + node_modules/es5-ext/reg-exp/is-reg-exp.js | 9 + node_modules/es5-ext/reg-exp/valid-reg-exp.js | 8 + .../es5-ext/string/#/@@iterator/implement.js | 6 + .../es5-ext/string/#/@@iterator/index.js | 4 + .../string/#/@@iterator/is-implemented.js | 16 + .../es5-ext/string/#/@@iterator/shim.js | 6 + node_modules/es5-ext/string/#/at.js | 33 + .../es5-ext/string/#/camel-to-hyphen.js | 10 + node_modules/es5-ext/string/#/capitalize.js | 8 + .../string/#/case-insensitive-compare.js | 7 + .../string/#/code-point-at/implement.js | 7 + .../es5-ext/string/#/code-point-at/index.js | 5 + .../string/#/code-point-at/is-implemented.js | 8 + .../es5-ext/string/#/code-point-at/shim.js | 26 + .../es5-ext/string/#/contains/implement.js | 7 + .../es5-ext/string/#/contains/index.js | 5 + .../string/#/contains/is-implemented.js | 8 + .../es5-ext/string/#/contains/shim.js | 7 + .../es5-ext/string/#/ends-with/implement.js | 7 + .../es5-ext/string/#/ends-with/index.js | 5 + .../string/#/ends-with/is-implemented.js | 8 + .../es5-ext/string/#/ends-with/shim.js | 16 + .../es5-ext/string/#/hyphen-to-camel.js | 8 + node_modules/es5-ext/string/#/indent.js | 12 + node_modules/es5-ext/string/#/index.js | 22 + node_modules/es5-ext/string/#/last.js | 8 + .../es5-ext/string/#/normalize/_data.js | 69 + .../es5-ext/string/#/normalize/implement.js | 7 + .../es5-ext/string/#/normalize/index.js | 5 + .../string/#/normalize/is-implemented.js | 8 + .../es5-ext/string/#/normalize/shim.js | 289 + node_modules/es5-ext/string/#/pad.js | 18 + .../es5-ext/string/#/plain-replace-all.js | 16 + .../es5-ext/string/#/plain-replace.js | 10 + .../es5-ext/string/#/repeat/implement.js | 7 + node_modules/es5-ext/string/#/repeat/index.js | 5 + .../es5-ext/string/#/repeat/is-implemented.js | 8 + node_modules/es5-ext/string/#/repeat/shim.js | 22 + .../es5-ext/string/#/starts-with/implement.js | 7 + .../es5-ext/string/#/starts-with/index.js | 5 + .../string/#/starts-with/is-implemented.js | 9 + .../es5-ext/string/#/starts-with/shim.js | 12 + node_modules/es5-ext/string/#/uncapitalize.js | 8 + node_modules/es5-ext/string/format-method.js | 24 + .../string/from-code-point/implement.js | 6 + .../es5-ext/string/from-code-point/index.js | 5 + .../string/from-code-point/is-implemented.js | 7 + .../es5-ext/string/from-code-point/shim.js | 30 + node_modules/es5-ext/string/index.js | 10 + node_modules/es5-ext/string/is-string.js | 10 + node_modules/es5-ext/string/random-uniq.js | 11 + node_modules/es5-ext/string/raw/implement.js | 6 + node_modules/es5-ext/string/raw/index.js | 5 + .../es5-ext/string/raw/is-implemented.js | 9 + node_modules/es5-ext/string/raw/shim.js | 15 + node_modules/es5-ext/test/__tad.js | 3 + .../test/array/#/@@iterator/implement.js | 5 + .../es5-ext/test/array/#/@@iterator/index.js | 3 + .../test/array/#/@@iterator/is-implemented.js | 3 + .../es5-ext/test/array/#/@@iterator/shim.js | 9 + .../test/array/#/_compare-by-length.js | 7 + .../es5-ext/test/array/#/binary-search.js | 15 + node_modules/es5-ext/test/array/#/clear.js | 7 + node_modules/es5-ext/test/array/#/compact.js | 17 + .../es5-ext/test/array/#/concat/implement.js | 5 + .../es5-ext/test/array/#/concat/index.js | 3 + .../test/array/#/concat/is-implemented.js | 3 + .../es5-ext/test/array/#/concat/shim.js | 26 + node_modules/es5-ext/test/array/#/contains.js | 21 + .../test/array/#/copy-within/implement.js | 5 + .../es5-ext/test/array/#/copy-within/index.js | 3 + .../array/#/copy-within/is-implemented.js | 3 + .../es5-ext/test/array/#/copy-within/shim.js | 29 + node_modules/es5-ext/test/array/#/diff.js | 17 + .../es5-ext/test/array/#/e-index-of.js | 13 + .../es5-ext/test/array/#/e-last-index-of.js | 12 + .../es5-ext/test/array/#/entries/implement.js | 5 + .../es5-ext/test/array/#/entries/index.js | 3 + .../test/array/#/entries/is-implemented.js | 3 + .../es5-ext/test/array/#/entries/shim.js | 9 + .../es5-ext/test/array/#/exclusion.js | 15 + .../es5-ext/test/array/#/fill/implement.js | 5 + .../es5-ext/test/array/#/fill/index.js | 3 + .../test/array/#/fill/is-implemented.js | 3 + .../es5-ext/test/array/#/fill/shim.js | 18 + .../es5-ext/test/array/#/filter/implement.js | 5 + .../es5-ext/test/array/#/filter/index.js | 3 + .../test/array/#/filter/is-implemented.js | 3 + .../es5-ext/test/array/#/filter/shim.js | 17 + .../test/array/#/find-index/implement.js | 5 + .../es5-ext/test/array/#/find-index/index.js | 3 + .../test/array/#/find-index/is-implemented.js | 3 + .../es5-ext/test/array/#/find-index/shim.js | 17 + .../es5-ext/test/array/#/find/implement.js | 5 + .../es5-ext/test/array/#/find/index.js | 3 + .../test/array/#/find/is-implemented.js | 3 + .../es5-ext/test/array/#/find/shim.js | 17 + .../es5-ext/test/array/#/first-index.js | 17 + node_modules/es5-ext/test/array/#/first.js | 13 + node_modules/es5-ext/test/array/#/flatten.js | 14 + .../es5-ext/test/array/#/for-each-right.js | 36 + node_modules/es5-ext/test/array/#/group.js | 24 + .../es5-ext/test/array/#/indexes-of.js | 14 + .../es5-ext/test/array/#/intersection.js | 24 + node_modules/es5-ext/test/array/#/is-copy.js | 13 + node_modules/es5-ext/test/array/#/is-uniq.js | 11 + .../es5-ext/test/array/#/keys/implement.js | 5 + .../es5-ext/test/array/#/keys/index.js | 3 + .../test/array/#/keys/is-implemented.js | 3 + .../es5-ext/test/array/#/keys/shim.js | 9 + .../es5-ext/test/array/#/last-index.js | 17 + node_modules/es5-ext/test/array/#/last.js | 15 + .../es5-ext/test/array/#/map/implement.js | 5 + .../es5-ext/test/array/#/map/index.js | 3 + .../test/array/#/map/is-implemented.js | 3 + node_modules/es5-ext/test/array/#/map/shim.js | 19 + node_modules/es5-ext/test/array/#/remove.js | 14 + node_modules/es5-ext/test/array/#/separate.js | 15 + .../es5-ext/test/array/#/slice/implement.js | 5 + .../es5-ext/test/array/#/slice/index.js | 3 + .../test/array/#/slice/is-implemented.js | 3 + .../es5-ext/test/array/#/slice/shim.js | 17 + .../es5-ext/test/array/#/some-right.js | 43 + .../es5-ext/test/array/#/splice/implement.js | 5 + .../es5-ext/test/array/#/splice/index.js | 3 + .../test/array/#/splice/is-implemented.js | 3 + .../es5-ext/test/array/#/splice/shim.js | 19 + node_modules/es5-ext/test/array/#/uniq.js | 14 + .../es5-ext/test/array/#/values/implement.js | 5 + .../es5-ext/test/array/#/values/index.js | 3 + .../test/array/#/values/is-implemented.js | 3 + .../es5-ext/test/array/#/values/shim.js | 9 + node_modules/es5-ext/test/array/__scopes.js | 11 + .../es5-ext/test/array/_is-extensible.js | 5 + .../test/array/_sub-array-dummy-safe.js | 7 + .../es5-ext/test/array/_sub-array-dummy.js | 7 + .../es5-ext/test/array/from/implement.js | 5 + node_modules/es5-ext/test/array/from/index.js | 3 + .../es5-ext/test/array/from/is-implemented.js | 3 + node_modules/es5-ext/test/array/from/shim.js | 60 + node_modules/es5-ext/test/array/generate.js | 10 + .../es5-ext/test/array/is-plain-array.js | 18 + .../es5-ext/test/array/of/implement.js | 5 + node_modules/es5-ext/test/array/of/index.js | 3 + .../es5-ext/test/array/of/is-implemented.js | 3 + node_modules/es5-ext/test/array/of/shim.js | 68 + node_modules/es5-ext/test/array/to-array.js | 13 + .../es5-ext/test/array/valid-array.js | 14 + .../es5-ext/test/boolean/is-boolean.js | 12 + node_modules/es5-ext/test/date/#/copy.js | 10 + .../es5-ext/test/date/#/days-in-month.js | 17 + node_modules/es5-ext/test/date/#/floor-day.js | 6 + .../es5-ext/test/date/#/floor-month.js | 6 + .../es5-ext/test/date/#/floor-year.js | 6 + node_modules/es5-ext/test/date/#/format.js | 6 + node_modules/es5-ext/test/date/is-date.js | 10 + node_modules/es5-ext/test/date/valid-date.js | 12 + node_modules/es5-ext/test/error/#/throw.js | 10 + node_modules/es5-ext/test/error/custom.js | 12 + node_modules/es5-ext/test/error/is-error.js | 16 + .../es5-ext/test/error/valid-error.js | 9 + .../es5-ext/test/function/#/compose.js | 9 + node_modules/es5-ext/test/function/#/copy.js | 19 + node_modules/es5-ext/test/function/#/curry.js | 18 + node_modules/es5-ext/test/function/#/lock.js | 7 + node_modules/es5-ext/test/function/#/not.js | 11 + .../es5-ext/test/function/#/partial.js | 9 + .../es5-ext/test/function/#/spread.js | 8 + .../test/function/#/to-string-tokens.js | 12 + .../es5-ext/test/function/_define-length.js | 12 + .../es5-ext/test/function/constant.js | 7 + .../es5-ext/test/function/identity.js | 7 + node_modules/es5-ext/test/function/invoke.js | 9 + .../es5-ext/test/function/is-arguments.js | 11 + .../es5-ext/test/function/is-function.js | 8 + node_modules/es5-ext/test/function/noop.js | 5 + node_modules/es5-ext/test/function/pluck.js | 7 + .../es5-ext/test/function/valid-function.js | 17 + node_modules/es5-ext/test/global.js | 5 + .../es5-ext/test/iterable/for-each.js | 40 + node_modules/es5-ext/test/iterable/is.js | 20 + .../es5-ext/test/iterable/validate-object.js | 20 + .../es5-ext/test/iterable/validate.js | 20 + .../es5-ext/test/json/safe-stringify.js | 15 + .../es5-ext/test/math/_pack-ieee754.js | 5 + .../es5-ext/test/math/_unpack-ieee754.js | 5 + .../es5-ext/test/math/acosh/implement.js | 5 + node_modules/es5-ext/test/math/acosh/index.js | 3 + .../es5-ext/test/math/acosh/is-implemented.js | 3 + node_modules/es5-ext/test/math/acosh/shim.js | 11 + .../es5-ext/test/math/asinh/implement.js | 5 + node_modules/es5-ext/test/math/asinh/index.js | 3 + .../es5-ext/test/math/asinh/is-implemented.js | 3 + node_modules/es5-ext/test/math/asinh/shim.js | 10 + .../es5-ext/test/math/atanh/implement.js | 5 + node_modules/es5-ext/test/math/atanh/index.js | 3 + .../es5-ext/test/math/atanh/is-implemented.js | 3 + node_modules/es5-ext/test/math/atanh/shim.js | 11 + .../es5-ext/test/math/cbrt/implement.js | 5 + node_modules/es5-ext/test/math/cbrt/index.js | 3 + .../es5-ext/test/math/cbrt/is-implemented.js | 3 + node_modules/es5-ext/test/math/cbrt/shim.js | 11 + .../es5-ext/test/math/clz32/implement.js | 5 + node_modules/es5-ext/test/math/clz32/index.js | 3 + .../es5-ext/test/math/clz32/is-implemented.js | 3 + node_modules/es5-ext/test/math/clz32/shim.js | 12 + .../es5-ext/test/math/cosh/implement.js | 5 + node_modules/es5-ext/test/math/cosh/index.js | 3 + .../es5-ext/test/math/cosh/is-implemented.js | 3 + node_modules/es5-ext/test/math/cosh/shim.js | 13 + .../es5-ext/test/math/expm1/implement.js | 5 + node_modules/es5-ext/test/math/expm1/index.js | 3 + .../es5-ext/test/math/expm1/is-implemented.js | 3 + node_modules/es5-ext/test/math/expm1/shim.js | 9 + .../es5-ext/test/math/fround/implement.js | 5 + .../es5-ext/test/math/fround/index.js | 3 + .../test/math/fround/is-implemented.js | 3 + node_modules/es5-ext/test/math/fround/shim.js | 9 + .../es5-ext/test/math/hypot/implement.js | 5 + node_modules/es5-ext/test/math/hypot/index.js | 3 + .../es5-ext/test/math/hypot/is-implemented.js | 3 + node_modules/es5-ext/test/math/hypot/shim.js | 11 + .../es5-ext/test/math/imul/implement.js | 5 + node_modules/es5-ext/test/math/imul/index.js | 3 + .../es5-ext/test/math/imul/is-implemented.js | 3 + node_modules/es5-ext/test/math/imul/shim.js | 9 + .../es5-ext/test/math/log10/implement.js | 5 + node_modules/es5-ext/test/math/log10/index.js | 3 + .../es5-ext/test/math/log10/is-implemented.js | 3 + node_modules/es5-ext/test/math/log10/shim.js | 10 + .../es5-ext/test/math/log1p/implement.js | 5 + node_modules/es5-ext/test/math/log1p/index.js | 3 + .../es5-ext/test/math/log1p/is-implemented.js | 3 + node_modules/es5-ext/test/math/log1p/shim.js | 10 + .../es5-ext/test/math/log2/implement.js | 5 + node_modules/es5-ext/test/math/log2/index.js | 3 + .../es5-ext/test/math/log2/is-implemented.js | 3 + node_modules/es5-ext/test/math/log2/shim.js | 10 + .../es5-ext/test/math/sign/implement.js | 5 + node_modules/es5-ext/test/math/sign/index.js | 3 + .../es5-ext/test/math/sign/is-implemented.js | 3 + node_modules/es5-ext/test/math/sign/shim.js | 11 + .../es5-ext/test/math/sinh/implement.js | 5 + node_modules/es5-ext/test/math/sinh/index.js | 3 + .../es5-ext/test/math/sinh/is-implemented.js | 3 + node_modules/es5-ext/test/math/sinh/shim.js | 13 + .../es5-ext/test/math/tanh/implement.js | 5 + node_modules/es5-ext/test/math/tanh/index.js | 3 + .../es5-ext/test/math/tanh/is-implemented.js | 3 + node_modules/es5-ext/test/math/tanh/shim.js | 11 + .../es5-ext/test/math/trunc/implement.js | 5 + node_modules/es5-ext/test/math/trunc/index.js | 3 + .../es5-ext/test/math/trunc/is-implemented.js | 3 + node_modules/es5-ext/test/math/trunc/shim.js | 16 + node_modules/es5-ext/test/number/#/pad.js | 7 + .../es5-ext/test/number/epsilon/implement.js | 5 + .../es5-ext/test/number/epsilon/index.js | 5 + .../test/number/epsilon/is-implemented.js | 3 + .../test/number/is-finite/implement.js | 5 + .../es5-ext/test/number/is-finite/index.js | 3 + .../test/number/is-finite/is-implemented.js | 3 + .../es5-ext/test/number/is-finite/shim.js | 8 + .../test/number/is-integer/implement.js | 5 + .../es5-ext/test/number/is-integer/index.js | 3 + .../test/number/is-integer/is-implemented.js | 3 + .../es5-ext/test/number/is-integer/shim.js | 9 + .../es5-ext/test/number/is-nan/implement.js | 5 + .../es5-ext/test/number/is-nan/index.js | 3 + .../test/number/is-nan/is-implemented.js | 3 + .../es5-ext/test/number/is-nan/shim.js | 7 + .../es5-ext/test/number/is-natural.js | 10 + node_modules/es5-ext/test/number/is-number.js | 13 + .../test/number/is-safe-integer/implement.js | 5 + .../test/number/is-safe-integer/index.js | 3 + .../number/is-safe-integer/is-implemented.js | 3 + .../test/number/is-safe-integer/shim.js | 11 + .../test/number/max-safe-integer/implement.js | 5 + .../test/number/max-safe-integer/index.js | 5 + .../number/max-safe-integer/is-implemented.js | 3 + .../test/number/min-safe-integer/implement.js | 5 + .../test/number/min-safe-integer/index.js | 5 + .../number/min-safe-integer/is-implemented.js | 3 + .../es5-ext/test/number/to-integer.js | 10 + .../es5-ext/test/number/to-pos-integer.js | 10 + node_modules/es5-ext/test/number/to-uint32.js | 8 + node_modules/es5-ext/test/object/_iterate.js | 30 + .../es5-ext/test/object/assign/implement.js | 5 + .../es5-ext/test/object/assign/index.js | 3 + .../test/object/assign/is-implemented.js | 3 + .../es5-ext/test/object/assign/shim.js | 11 + node_modules/es5-ext/test/object/clear.js | 13 + node_modules/es5-ext/test/object/compact.js | 14 + node_modules/es5-ext/test/object/compare.js | 13 + node_modules/es5-ext/test/object/copy-deep.js | 28 + node_modules/es5-ext/test/object/copy.js | 19 + node_modules/es5-ext/test/object/count.js | 11 + node_modules/es5-ext/test/object/create.js | 22 + .../object/ensure-natural-number-value.js | 12 + .../test/object/ensure-natural-number.js | 12 + node_modules/es5-ext/test/object/eq.js | 12 + node_modules/es5-ext/test/object/every.js | 21 + node_modules/es5-ext/test/object/filter.js | 6 + node_modules/es5-ext/test/object/find-key.js | 23 + node_modules/es5-ext/test/object/find.js | 23 + node_modules/es5-ext/test/object/first-key.js | 13 + node_modules/es5-ext/test/object/flatten.js | 6 + node_modules/es5-ext/test/object/for-each.js | 10 + .../es5-ext/test/object/get-property-names.js | 18 + .../es5-ext/test/object/is-array-like.js | 14 + .../es5-ext/test/object/is-callable.js | 8 + .../es5-ext/test/object/is-copy-deep.js | 46 + node_modules/es5-ext/test/object/is-copy.js | 18 + node_modules/es5-ext/test/object/is-empty.js | 6 + .../es5-ext/test/object/is-number-value.js | 15 + node_modules/es5-ext/test/object/is-object.js | 13 + .../es5-ext/test/object/is-plain-object.js | 18 + node_modules/es5-ext/test/object/is-value.js | 14 + node_modules/es5-ext/test/object/is.js | 12 + node_modules/es5-ext/test/object/key-of.js | 12 + .../es5-ext/test/object/keys/implement.js | 5 + .../es5-ext/test/object/keys/index.js | 3 + .../test/object/keys/is-implemented.js | 3 + node_modules/es5-ext/test/object/keys/shim.js | 8 + node_modules/es5-ext/test/object/map-keys.js | 7 + node_modules/es5-ext/test/object/map.js | 9 + .../es5-ext/test/object/mixin-prototypes.js | 67 + node_modules/es5-ext/test/object/mixin.js | 69 + .../es5-ext/test/object/normalize-options.js | 32 + .../es5-ext/test/object/primitive-set.js | 15 + .../es5-ext/test/object/safe-traverse.js | 15 + node_modules/es5-ext/test/object/serialize.js | 25 + .../test/object/set-prototype-of/implement.js | 6 + .../test/object/set-prototype-of/index.js | 23 + .../object/set-prototype-of/is-implemented.js | 3 + .../test/object/set-prototype-of/shim.js | 23 + node_modules/es5-ext/test/object/some.js | 23 + node_modules/es5-ext/test/object/to-array.js | 15 + .../es5-ext/test/object/unserialize.js | 24 + .../es5-ext/test/object/valid-callable.js | 9 + .../es5-ext/test/object/valid-object.js | 15 + .../es5-ext/test/object/valid-value.js | 19 + .../test/object/validate-array-like-object.js | 15 + .../test/object/validate-array-like.js | 15 + .../object/validate-stringifiable-value.js | 16 + .../test/object/validate-stringifiable.js | 16 + node_modules/es5-ext/test/reg-exp/#/index.js | 12 + .../es5-ext/test/reg-exp/#/is-sticky.js | 10 + .../es5-ext/test/reg-exp/#/is-unicode.js | 10 + .../es5-ext/test/reg-exp/#/match/implement.js | 5 + .../es5-ext/test/reg-exp/#/match/index.js | 3 + .../test/reg-exp/#/match/is-implemented.js | 3 + .../es5-ext/test/reg-exp/#/match/shim.js | 8 + .../test/reg-exp/#/replace/implement.js | 5 + .../es5-ext/test/reg-exp/#/replace/index.js | 3 + .../test/reg-exp/#/replace/is-implemented.js | 3 + .../es5-ext/test/reg-exp/#/replace/shim.js | 5 + .../test/reg-exp/#/search/implement.js | 5 + .../es5-ext/test/reg-exp/#/search/index.js | 3 + .../test/reg-exp/#/search/is-implemented.js | 3 + .../es5-ext/test/reg-exp/#/search/shim.js | 5 + .../es5-ext/test/reg-exp/#/split/implement.js | 5 + .../es5-ext/test/reg-exp/#/split/index.js | 3 + .../test/reg-exp/#/split/is-implemented.js | 3 + .../es5-ext/test/reg-exp/#/split/shim.js | 5 + .../test/reg-exp/#/sticky/implement.js | 5 + .../test/reg-exp/#/sticky/is-implemented.js | 3 + .../test/reg-exp/#/unicode/implement.js | 5 + .../test/reg-exp/#/unicode/is-implemented.js | 3 + node_modules/es5-ext/test/reg-exp/escape.js | 6 + .../es5-ext/test/reg-exp/is-reg-exp.js | 12 + .../es5-ext/test/reg-exp/valid-reg-exp.js | 17 + .../test/string/#/@@iterator/implement.js | 5 + .../es5-ext/test/string/#/@@iterator/index.js | 3 + .../string/#/@@iterator/is-implemented.js | 3 + .../es5-ext/test/string/#/@@iterator/shim.js | 9 + node_modules/es5-ext/test/string/#/at.js | 97 + .../es5-ext/test/string/#/camel-to-hyphen.js | 7 + .../es5-ext/test/string/#/capitalize.js | 9 + .../test/string/#/case-insensitive-compare.js | 7 + .../test/string/#/code-point-at/implement.js | 6 + .../test/string/#/code-point-at/index.js | 3 + .../string/#/code-point-at/is-implemented.js | 3 + .../test/string/#/code-point-at/shim.js | 81 + .../test/string/#/contains/implement.js | 5 + .../es5-ext/test/string/#/contains/index.js | 3 + .../test/string/#/contains/is-implemented.js | 3 + .../es5-ext/test/string/#/contains/shim.js | 14 + .../test/string/#/ends-with/implement.js | 5 + .../es5-ext/test/string/#/ends-with/index.js | 3 + .../test/string/#/ends-with/is-implemented.js | 3 + .../es5-ext/test/string/#/ends-with/shim.js | 16 + .../es5-ext/test/string/#/hyphen-to-camel.js | 7 + node_modules/es5-ext/test/string/#/indent.js | 9 + node_modules/es5-ext/test/string/#/last.js | 6 + .../es5-ext/test/string/#/normalize/_data.js | 3 + .../test/string/#/normalize/implement.js | 5 + .../es5-ext/test/string/#/normalize/index.js | 3 + .../test/string/#/normalize/is-implemented.js | 3 + .../es5-ext/test/string/#/normalize/shim.js | 13 + node_modules/es5-ext/test/string/#/pad.js | 24 + .../test/string/#/plain-replace-all.js | 11 + .../es5-ext/test/string/#/plain-replace.js | 7 + .../es5-ext/test/string/#/repeat/implement.js | 5 + .../es5-ext/test/string/#/repeat/index.js | 3 + .../test/string/#/repeat/is-implemented.js | 3 + .../es5-ext/test/string/#/repeat/shim.js | 8 + .../test/string/#/starts-with/implement.js | 5 + .../test/string/#/starts-with/index.js | 3 + .../string/#/starts-with/is-implemented.js | 3 + .../es5-ext/test/string/#/starts-with/shim.js | 14 + .../es5-ext/test/string/#/uncapitalize.js | 10 + .../es5-ext/test/string/format-method.js | 7 + .../test/string/from-code-point/implement.js | 5 + .../test/string/from-code-point/index.js | 3 + .../string/from-code-point/is-implemented.js | 3 + .../test/string/from-code-point/shim.js | 47 + node_modules/es5-ext/test/string/is-string.js | 11 + .../es5-ext/test/string/random-uniq.js | 14 + .../es5-ext/test/string/raw/implement.js | 5 + node_modules/es5-ext/test/string/raw/index.js | 3 + .../es5-ext/test/string/raw/is-implemented.js | 3 + node_modules/es5-ext/test/string/raw/shim.js | 15 + node_modules/es6-iterator/#/chain.js | 40 + node_modules/es6-iterator/.lint | 11 + node_modules/es6-iterator/.npmignore | 4 + node_modules/es6-iterator/.travis.yml | 13 + node_modules/es6-iterator/CHANGES | 38 + node_modules/es6-iterator/LICENSE | 21 + node_modules/es6-iterator/README.md | 148 + node_modules/es6-iterator/array.js | 30 + node_modules/es6-iterator/for-of.js | 46 + node_modules/es6-iterator/get.js | 15 + node_modules/es6-iterator/index.js | 90 + node_modules/es6-iterator/is-iterable.js | 15 + node_modules/es6-iterator/package.json | 105 + node_modules/es6-iterator/string.js | 37 + node_modules/es6-iterator/test/#/chain.js | 23 + node_modules/es6-iterator/test/array.js | 67 + node_modules/es6-iterator/test/for-of.js | 40 + node_modules/es6-iterator/test/get.js | 17 + node_modules/es6-iterator/test/index.js | 99 + node_modules/es6-iterator/test/is-iterable.js | 19 + node_modules/es6-iterator/test/string.js | 23 + .../es6-iterator/test/valid-iterable.js | 18 + node_modules/es6-iterator/valid-iterable.js | 8 + node_modules/es6-symbol/.lint | 15 + node_modules/es6-symbol/.npmignore | 4 + node_modules/es6-symbol/.travis.yml | 11 + node_modules/es6-symbol/CHANGES | 57 + node_modules/es6-symbol/LICENSE | 19 + node_modules/es6-symbol/README.md | 71 + node_modules/es6-symbol/implement.js | 7 + node_modules/es6-symbol/index.js | 3 + node_modules/es6-symbol/is-implemented.js | 17 + .../es6-symbol/is-native-implemented.js | 5 + node_modules/es6-symbol/is-symbol.js | 9 + node_modules/es6-symbol/package.json | 105 + node_modules/es6-symbol/polyfill.js | 118 + node_modules/es6-symbol/test/implement.js | 3 + node_modules/es6-symbol/test/index.js | 12 + .../es6-symbol/test/is-implemented.js | 14 + .../es6-symbol/test/is-native-implemented.js | 3 + node_modules/es6-symbol/test/is-symbol.js | 16 + node_modules/es6-symbol/test/polyfill.js | 29 + .../es6-symbol/test/validate-symbol.js | 19 + node_modules/es6-symbol/validate-symbol.js | 8 + node_modules/es6-weak-map/.lint | 13 + node_modules/es6-weak-map/.npmignore | 4 + node_modules/es6-weak-map/.travis.yml | 13 + node_modules/es6-weak-map/CHANGES | 45 + node_modules/es6-weak-map/LICENSE | 19 + node_modules/es6-weak-map/README.md | 63 + node_modules/es6-weak-map/implement.js | 7 + node_modules/es6-weak-map/index.js | 3 + node_modules/es6-weak-map/is-implemented.js | 20 + .../es6-weak-map/is-native-implemented.js | 8 + node_modules/es6-weak-map/is-weak-map.js | 13 + node_modules/es6-weak-map/package.json | 106 + node_modules/es6-weak-map/polyfill.js | 66 + node_modules/es6-weak-map/test/implement.js | 3 + node_modules/es6-weak-map/test/index.js | 6 + .../es6-weak-map/test/is-implemented.js | 14 + .../test/is-native-implemented.js | 3 + node_modules/es6-weak-map/test/is-weak-map.js | 16 + node_modules/es6-weak-map/test/polyfill.js | 23 + .../es6-weak-map/test/valid-weak-map.js | 19 + node_modules/es6-weak-map/valid-weak-map.js | 8 + node_modules/escape-html/LICENSE | 24 + node_modules/escape-html/Readme.md | 43 + node_modules/escape-html/index.js | 78 + node_modules/escape-html/package.json | 94 + node_modules/escape-string-regexp/index.js | 11 + node_modules/escape-string-regexp/license | 21 + .../escape-string-regexp/package.json | 109 + node_modules/escape-string-regexp/readme.md | 27 + node_modules/etag/HISTORY.md | 71 + node_modules/etag/LICENSE | 22 + node_modules/etag/README.md | 165 + node_modules/etag/index.js | 132 + node_modules/etag/package.json | 109 + node_modules/event-emitter/.lint | 15 + node_modules/event-emitter/.npmignore | 3 + node_modules/event-emitter/.testignore | 1 + node_modules/event-emitter/.travis.yml | 16 + node_modules/event-emitter/CHANGES | 73 + node_modules/event-emitter/LICENSE | 19 + node_modules/event-emitter/README.md | 98 + node_modules/event-emitter/all-off.js | 19 + .../event-emitter/benchmark/many-on.js | 83 + .../event-emitter/benchmark/single-on.js | 73 + node_modules/event-emitter/emit-error.js | 13 + node_modules/event-emitter/has-listeners.js | 16 + node_modules/event-emitter/index.js | 132 + node_modules/event-emitter/package.json | 102 + node_modules/event-emitter/pipe.js | 42 + node_modules/event-emitter/test/all-off.js | 48 + node_modules/event-emitter/test/emit-error.js | 14 + .../event-emitter/test/has-listeners.js | 42 + node_modules/event-emitter/test/index.js | 107 + node_modules/event-emitter/test/pipe.js | 53 + node_modules/event-emitter/test/unify.js | 123 + node_modules/event-emitter/unify.js | 50 + node_modules/expand-brackets/LICENSE | 21 + node_modules/expand-brackets/README.md | 107 + node_modules/expand-brackets/index.js | 163 + node_modules/expand-brackets/package.json | 136 + node_modules/expand-range/LICENSE | 24 + node_modules/expand-range/README.md | 145 + node_modules/expand-range/index.js | 43 + node_modules/expand-range/package.json | 143 + node_modules/expand-tilde/LICENSE | 21 + node_modules/expand-tilde/index.js | 22 + node_modules/expand-tilde/package.json | 138 + node_modules/express/History.md | 3162 + node_modules/express/LICENSE | 24 + node_modules/express/Readme.md | 142 + node_modules/express/index.js | 11 + node_modules/express/lib/application.js | 643 + node_modules/express/lib/express.js | 103 + node_modules/express/lib/middleware/init.js | 36 + node_modules/express/lib/middleware/query.js | 46 + node_modules/express/lib/request.js | 502 + node_modules/express/lib/response.js | 1065 + node_modules/express/lib/router/index.js | 645 + node_modules/express/lib/router/layer.js | 176 + node_modules/express/lib/router/route.js | 210 + node_modules/express/lib/utils.js | 299 + node_modules/express/lib/view.js | 173 + .../express/node_modules/debug/.jshintrc | 3 + .../express/node_modules/debug/.npmignore | 6 + .../express/node_modules/debug/History.md | 195 + .../express/node_modules/debug/Makefile | 36 + .../express/node_modules/debug/Readme.md | 188 + .../express/node_modules/debug/bower.json | 28 + .../express/node_modules/debug/browser.js | 168 + .../express/node_modules/debug/component.json | 19 + .../express/node_modules/debug/debug.js | 197 + .../express/node_modules/debug/node.js | 209 + .../express/node_modules/debug/package.json | 106 + .../express/node_modules/ms/.npmignore | 5 + .../express/node_modules/ms/History.md | 66 + node_modules/express/node_modules/ms/LICENSE | 20 + .../express/node_modules/ms/README.md | 35 + node_modules/express/node_modules/ms/index.js | 125 + .../express/node_modules/ms/package.json | 82 + .../express/node_modules/qs/.eslintignore | 1 + .../express/node_modules/qs/.eslintrc | 19 + .../express/node_modules/qs/.jscs.json | 176 + .../express/node_modules/qs/CHANGELOG.md | 120 + .../express/node_modules/qs/CONTRIBUTING.md | 1 + node_modules/express/node_modules/qs/LICENSE | 28 + .../express/node_modules/qs/dist/qs.js | 487 + .../express/node_modules/qs/lib/index.js | 9 + .../express/node_modules/qs/lib/parse.js | 167 + .../express/node_modules/qs/lib/stringify.js | 137 + .../express/node_modules/qs/lib/utils.js | 164 + .../express/node_modules/qs/package.json | 119 + .../express/node_modules/qs/test/index.js | 5 + .../express/node_modules/qs/test/parse.js | 423 + .../express/node_modules/qs/test/stringify.js | 305 + .../express/node_modules/qs/test/utils.js | 9 + node_modules/express/package.json | 194 + node_modules/extend/.eslintrc | 192 + node_modules/extend/.jscs.json | 104 + node_modules/extend/.npmignore | 1 + node_modules/extend/.travis.yml | 44 + node_modules/extend/CHANGELOG.md | 69 + node_modules/extend/LICENSE | 23 + node_modules/extend/README.md | 62 + node_modules/extend/component.json | 32 + node_modules/extend/index.js | 86 + node_modules/extend/package.json | 106 + node_modules/extglob/LICENSE | 21 + node_modules/extglob/README.md | 88 + node_modules/extglob/index.js | 178 + node_modules/extglob/package.json | 116 + node_modules/fancy-log/LICENSE | 23 + node_modules/fancy-log/README.md | 51 + node_modules/fancy-log/index.js | 51 + node_modules/fancy-log/package.json | 115 + node_modules/filename-regex/README.md | 51 + node_modules/filename-regex/index.js | 10 + node_modules/filename-regex/package.json | 100 + node_modules/fill-range/LICENSE | 21 + node_modules/fill-range/README.md | 290 + node_modules/fill-range/index.js | 408 + node_modules/fill-range/package.json | 131 + node_modules/finalhandler/HISTORY.md | 116 + node_modules/finalhandler/LICENSE | 22 + node_modules/finalhandler/README.md | 146 + node_modules/finalhandler/index.js | 247 + .../finalhandler/node_modules/debug/.jshintrc | 3 + .../node_modules/debug/.npmignore | 6 + .../node_modules/debug/History.md | 195 + .../finalhandler/node_modules/debug/Makefile | 36 + .../finalhandler/node_modules/debug/Readme.md | 188 + .../node_modules/debug/bower.json | 28 + .../node_modules/debug/browser.js | 168 + .../node_modules/debug/component.json | 19 + .../finalhandler/node_modules/debug/debug.js | 197 + .../finalhandler/node_modules/debug/node.js | 209 + .../node_modules/debug/package.json | 106 + .../finalhandler/node_modules/ms/.npmignore | 5 + .../finalhandler/node_modules/ms/History.md | 66 + .../finalhandler/node_modules/ms/LICENSE | 20 + .../finalhandler/node_modules/ms/README.md | 35 + .../finalhandler/node_modules/ms/index.js | 125 + .../finalhandler/node_modules/ms/package.json | 82 + node_modules/finalhandler/package.json | 109 + node_modules/find-index/README.md | 33 + node_modules/find-index/index.js | 26 + node_modules/find-index/last.js | 26 + node_modules/find-index/package.json | 87 + node_modules/find-up/index.js | 53 + node_modules/find-up/license | 21 + node_modules/find-up/package.json | 118 + node_modules/find-up/readme.md | 72 + node_modules/findup-sync/README.md | 67 + node_modules/findup-sync/index.js | 85 + node_modules/findup-sync/package.json | 129 + node_modules/fined/LICENSE | 21 + node_modules/fined/README.md | 67 + node_modules/fined/index.js | 159 + node_modules/fined/package.json | 123 + node_modules/first-chunk-stream/index.js | 93 + node_modules/first-chunk-stream/package.json | 99 + node_modules/first-chunk-stream/readme.md | 62 + node_modules/flagged-respawn/.npmignore | 1 + node_modules/flagged-respawn/.travis.yml | 9 + node_modules/flagged-respawn/LICENSE | 22 + node_modules/flagged-respawn/README.md | 58 + node_modules/flagged-respawn/index.js | 18 + node_modules/flagged-respawn/lib/reorder.js | 16 + node_modules/flagged-respawn/lib/respawn.js | 15 + node_modules/flagged-respawn/package.json | 105 + .../flagged-respawn/test/bin/exit_code.js | 13 + .../flagged-respawn/test/bin/respawner.js | 17 + .../flagged-respawn/test/bin/signal.js | 16 + node_modules/flagged-respawn/test/index.js | 99 + node_modules/for-in/LICENSE | 21 + node_modules/for-in/README.md | 85 + node_modules/for-in/index.js | 16 + node_modules/for-in/package.json | 146 + node_modules/for-own/LICENSE | 21 + node_modules/for-own/README.md | 85 + node_modules/for-own/index.js | 19 + node_modules/for-own/package.json | 148 + node_modules/forwarded/HISTORY.md | 4 + node_modules/forwarded/LICENSE | 22 + node_modules/forwarded/README.md | 53 + node_modules/forwarded/index.js | 35 + node_modules/forwarded/package.json | 99 + node_modules/fresh/HISTORY.md | 38 + node_modules/fresh/LICENSE | 22 + node_modules/fresh/README.md | 58 + node_modules/fresh/index.js | 57 + node_modules/fresh/package.json | 123 + node_modules/fs-exists-sync/LICENSE | 21 + node_modules/fs-exists-sync/README.md | 92 + node_modules/fs-exists-sync/index.js | 18 + node_modules/fs-exists-sync/package.json | 137 + node_modules/fs-extra/.npmignore | 8 + node_modules/fs-extra/CHANGELOG.md | 733 + node_modules/fs-extra/LICENSE | 15 + node_modules/fs-extra/README.md | 251 + node_modules/fs-extra/docs/copy-sync.md | 37 + node_modules/fs-extra/docs/copy.md | 48 + node_modules/fs-extra/docs/emptyDir-sync.md | 16 + node_modules/fs-extra/docs/emptyDir.md | 21 + node_modules/fs-extra/docs/ensureDir-sync.md | 17 + node_modules/fs-extra/docs/ensureDir.md | 20 + node_modules/fs-extra/docs/ensureFile-sync.md | 17 + node_modules/fs-extra/docs/ensureFile.md | 20 + node_modules/fs-extra/docs/ensureLink-sync.md | 17 + node_modules/fs-extra/docs/ensureLink.md | 20 + .../fs-extra/docs/ensureSymlink-sync.md | 18 + node_modules/fs-extra/docs/ensureSymlink.md | 21 + node_modules/fs-extra/docs/move-sync.md | 24 + node_modules/fs-extra/docs/move.md | 33 + node_modules/fs-extra/docs/outputFile-sync.md | 19 + node_modules/fs-extra/docs/outputFile.md | 23 + node_modules/fs-extra/docs/outputJson-sync.md | 22 + node_modules/fs-extra/docs/outputJson.md | 26 + node_modules/fs-extra/docs/readJson-sync.md | 33 + node_modules/fs-extra/docs/readJson.md | 40 + node_modules/fs-extra/docs/remove-sync.md | 16 + node_modules/fs-extra/docs/remove.md | 25 + node_modules/fs-extra/docs/writeJson-sync.md | 21 + node_modules/fs-extra/docs/writeJson.md | 27 + .../fs-extra/lib/copy-sync/copy-file-sync.js | 41 + .../fs-extra/lib/copy-sync/copy-sync.js | 62 + node_modules/fs-extra/lib/copy-sync/index.js | 3 + node_modules/fs-extra/lib/copy/copy.js | 52 + node_modules/fs-extra/lib/copy/index.js | 3 + node_modules/fs-extra/lib/copy/ncp.js | 234 + node_modules/fs-extra/lib/empty/index.js | 47 + node_modules/fs-extra/lib/ensure/file.js | 45 + node_modules/fs-extra/lib/ensure/index.js | 23 + node_modules/fs-extra/lib/ensure/link.js | 60 + .../fs-extra/lib/ensure/symlink-paths.js | 97 + .../fs-extra/lib/ensure/symlink-type.js | 31 + node_modules/fs-extra/lib/ensure/symlink.js | 64 + node_modules/fs-extra/lib/index.js | 37 + node_modules/fs-extra/lib/json/index.js | 11 + node_modules/fs-extra/lib/json/jsonfile.js | 16 + .../fs-extra/lib/json/output-json-sync.js | 18 + node_modules/fs-extra/lib/json/output-json.js | 26 + node_modules/fs-extra/lib/mkdirs/index.js | 9 + .../fs-extra/lib/mkdirs/mkdirs-sync.js | 59 + node_modules/fs-extra/lib/mkdirs/mkdirs.js | 63 + node_modules/fs-extra/lib/mkdirs/win32.js | 25 + node_modules/fs-extra/lib/move-sync/index.js | 117 + node_modules/fs-extra/lib/move/index.js | 161 + node_modules/fs-extra/lib/output/index.js | 37 + node_modules/fs-extra/lib/remove/index.js | 17 + node_modules/fs-extra/lib/remove/rimraf.js | 296 + node_modules/fs-extra/lib/util/assign.js | 16 + node_modules/fs-extra/lib/util/utimes.js | 72 + node_modules/fs-extra/package.json | 131 + node_modules/gaze/LICENSE-MIT | 22 + node_modules/gaze/README.md | 181 + node_modules/gaze/lib/gaze.js | 439 + node_modules/gaze/lib/helper.js | 67 + node_modules/gaze/package.json | 151 + node_modules/generic-pool/.eslintrc.js | 6 + node_modules/generic-pool/.npmignore | 4 + node_modules/generic-pool/.travis.yml | 21 + node_modules/generic-pool/CHANGELOG.md | 127 + node_modules/generic-pool/Makefile | 31 + node_modules/generic-pool/README.md | 298 + node_modules/generic-pool/fabfile.py | 27 + node_modules/generic-pool/lib/generic-pool.js | 568 + node_modules/generic-pool/package.json | 150 + .../generic-pool/test/generic-pool.test.js | 797 + node_modules/get-caller-file/README.md | 4 + node_modules/get-caller-file/index.js | 20 + node_modules/get-caller-file/package.json | 93 + node_modules/glob-base/LICENSE | 21 + node_modules/glob-base/README.md | 158 + node_modules/glob-base/index.js | 51 + node_modules/glob-base/package.json | 116 + node_modules/glob-parent/.npmignore | 4 + node_modules/glob-parent/.travis.yml | 8 + node_modules/glob-parent/LICENSE | 15 + node_modules/glob-parent/README.md | 43 + node_modules/glob-parent/index.js | 10 + node_modules/glob-parent/package.json | 93 + node_modules/glob-parent/test.js | 28 + node_modules/glob-stream/LICENSE | 20 + node_modules/glob-stream/README.md | 67 + node_modules/glob-stream/index.js | 117 + .../node_modules/isarray/README.md | 54 + .../node_modules/isarray/build/build.js | 209 + .../node_modules/isarray/component.json | 19 + .../glob-stream/node_modules/isarray/index.js | 3 + .../node_modules/isarray/package.json | 86 + .../node_modules/readable-stream/.npmignore | 5 + .../node_modules/readable-stream/LICENSE | 18 + .../node_modules/readable-stream/README.md | 15 + .../node_modules/readable-stream/duplex.js | 1 + .../readable-stream/lib/_stream_duplex.js | 89 + .../lib/_stream_passthrough.js | 46 + .../readable-stream/lib/_stream_readable.js | 982 + .../readable-stream/lib/_stream_transform.js | 210 + .../readable-stream/lib/_stream_writable.js | 386 + .../node_modules/readable-stream/package.json | 112 + .../readable-stream/passthrough.js | 1 + .../node_modules/readable-stream/readable.js | 11 + .../node_modules/readable-stream/transform.js | 1 + .../node_modules/readable-stream/writable.js | 1 + .../node_modules/through2/.npmignore | 3 + .../glob-stream/node_modules/through2/LICENSE | 39 + .../node_modules/through2/README.md | 132 + .../node_modules/through2/package.json | 98 + .../node_modules/through2/through2.js | 96 + node_modules/glob-stream/package.json | 114 + node_modules/glob-watcher/.npmignore | 6 + node_modules/glob-watcher/.travis.yml | 6 + node_modules/glob-watcher/LICENSE | 20 + node_modules/glob-watcher/README.md | 53 + node_modules/glob-watcher/index.js | 39 + node_modules/glob-watcher/package.json | 99 + .../glob-watcher/test/fixtures/test.coffee | 1 + node_modules/glob-watcher/test/main.js | 87 + node_modules/glob/LICENSE | 15 + node_modules/glob/README.md | 369 + node_modules/glob/common.js | 237 + node_modules/glob/glob.js | 740 + node_modules/glob/package.json | 105 + node_modules/glob/sync.js | 457 + node_modules/glob2base/LICENSE | 20 + node_modules/glob2base/README.md | 51 + node_modules/glob2base/index.js | 59 + node_modules/glob2base/package.json | 106 + node_modules/global-modules/LICENSE | 21 + node_modules/global-modules/README.md | 65 + node_modules/global-modules/index.js | 18 + .../node_modules/is-windows/LICENSE | 21 + .../node_modules/is-windows/index.js | 22 + .../node_modules/is-windows/package.json | 130 + node_modules/global-modules/package.json | 132 + node_modules/global-prefix/LICENSE | 21 + node_modules/global-prefix/README.md | 76 + node_modules/global-prefix/index.js | 84 + .../node_modules/is-windows/LICENSE | 21 + .../node_modules/is-windows/index.js | 22 + .../node_modules/is-windows/package.json | 130 + node_modules/global-prefix/package.json | 164 + node_modules/globule/.jshintrc | 15 + node_modules/globule/.npmignore | 1 + node_modules/globule/.travis.yml | 6 + node_modules/globule/Gruntfile.js | 48 + node_modules/globule/LICENSE-MIT | 22 + node_modules/globule/README.md | 117 + node_modules/globule/lib/globule.js | 172 + .../globule/node_modules/glob/.npmignore | 2 + .../globule/node_modules/glob/.travis.yml | 3 + .../globule/node_modules/glob/LICENSE | 27 + .../globule/node_modules/glob/README.md | 233 + .../globule/node_modules/glob/examples/g.js | 9 + .../node_modules/glob/examples/usr-local.js | 9 + .../globule/node_modules/glob/glob.js | 643 + .../globule/node_modules/glob/package.json | 90 + .../node_modules/glob/test/00-setup.js | 176 + .../node_modules/glob/test/bash-comparison.js | 63 + .../node_modules/glob/test/bash-results.json | 348 + .../node_modules/glob/test/cwd-test.js | 55 + .../globule/node_modules/glob/test/mark.js | 74 + .../node_modules/glob/test/nocase-nomagic.js | 113 + .../node_modules/glob/test/pause-resume.js | 73 + .../node_modules/glob/test/root-nomount.js | 39 + .../globule/node_modules/glob/test/root.js | 46 + .../node_modules/glob/test/zz-cleanup.js | 11 + .../node_modules/graceful-fs/.npmignore | 1 + .../globule/node_modules/graceful-fs/LICENSE | 27 + .../node_modules/graceful-fs/README.md | 33 + .../node_modules/graceful-fs/graceful-fs.js | 442 + .../node_modules/graceful-fs/package.json | 101 + .../node_modules/graceful-fs/test/open.js | 46 + .../node_modules/graceful-fs/test/ulimit.js | 158 + .../globule/node_modules/inherits/LICENSE | 16 + .../globule/node_modules/inherits/README.md | 51 + .../globule/node_modules/inherits/inherits.js | 29 + .../node_modules/inherits/package.json | 84 + .../globule/node_modules/lodash/LICENSE.txt | 22 + .../globule/node_modules/lodash/README.md | 128 + .../node_modules/lodash/dist/lodash.compat.js | 5152 + .../lodash/dist/lodash.compat.min.js | 42 + .../node_modules/lodash/dist/lodash.js | 4983 + .../node_modules/lodash/dist/lodash.min.js | 41 + .../lodash/dist/lodash.underscore.js | 4307 + .../lodash/dist/lodash.underscore.min.js | 34 + .../globule/node_modules/lodash/package.json | 132 + .../globule/node_modules/lru-cache/.npmignore | 1 + .../node_modules/lru-cache/.travis.yml | 8 + .../node_modules/lru-cache/CONTRIBUTORS | 14 + .../globule/node_modules/lru-cache/LICENSE | 15 + .../globule/node_modules/lru-cache/README.md | 137 + .../node_modules/lru-cache/lib/lru-cache.js | 334 + .../node_modules/lru-cache/package.json | 92 + .../node_modules/lru-cache/test/basic.js | 396 + .../node_modules/lru-cache/test/foreach.js | 120 + .../lru-cache/test/memory-leak.js | 51 + .../node_modules/lru-cache/test/serialize.js | 216 + .../globule/node_modules/minimatch/.npmignore | 1 + .../globule/node_modules/minimatch/LICENSE | 23 + .../globule/node_modules/minimatch/README.md | 218 + .../node_modules/minimatch/minimatch.js | 1055 + .../node_modules/minimatch/package.json | 92 + .../node_modules/minimatch/test/basic.js | 399 + .../minimatch/test/brace-expand.js | 33 + .../node_modules/minimatch/test/caching.js | 14 + .../node_modules/minimatch/test/defaults.js | 274 + .../test/extglob-ending-with-state-char.js | 8 + node_modules/globule/package.json | 108 + .../globule/test/fixtures/expand/README.md | 0 .../globule/test/fixtures/expand/css/baz.css | 0 .../globule/test/fixtures/expand/css/qux.css | 0 .../test/fixtures/expand/deep/deep.txt | 0 .../fixtures/expand/deep/deeper/deeper.txt | 0 .../expand/deep/deeper/deepest/deepest.txt | 0 .../globule/test/fixtures/expand/js/bar.js | 0 .../globule/test/fixtures/expand/js/foo.js | 0 node_modules/globule/test/globule_test.js | 486 + node_modules/glogg/LICENSE | 22 + node_modules/glogg/README.md | 92 + node_modules/glogg/index.js | 34 + node_modules/glogg/package.json | 105 + node_modules/graceful-fs/LICENSE | 15 + node_modules/graceful-fs/README.md | 133 + node_modules/graceful-fs/fs.js | 21 + node_modules/graceful-fs/graceful-fs.js | 262 + node_modules/graceful-fs/legacy-streams.js | 118 + node_modules/graceful-fs/package.json | 114 + node_modules/graceful-fs/polyfills.js | 330 + node_modules/graceful-readlink/.npmignore | 3 + node_modules/graceful-readlink/.travis.yml | 5 + node_modules/graceful-readlink/LICENSE | 22 + node_modules/graceful-readlink/README.md | 17 + node_modules/graceful-readlink/index.js | 12 + node_modules/graceful-readlink/package.json | 83 + node_modules/gulp-help/index.js | 160 + node_modules/gulp-help/lib/attach-help.js | 29 + .../gulp-help/lib/calculate-margin.js | 39 + node_modules/gulp-help/lib/noop.js | 1 + node_modules/gulp-help/license | 21 + .../node_modules/object-assign/index.js | 39 + .../node_modules/object-assign/license | 21 + .../node_modules/object-assign/package.json | 102 + .../node_modules/object-assign/readme.md | 51 + node_modules/gulp-help/package.json | 136 + node_modules/gulp-help/readme.md | 121 + node_modules/gulp-util/LICENSE | 20 + node_modules/gulp-util/README.md | 145 + node_modules/gulp-util/index.js | 18 + node_modules/gulp-util/lib/PluginError.js | 130 + node_modules/gulp-util/lib/buffer.js | 15 + node_modules/gulp-util/lib/combine.js | 11 + node_modules/gulp-util/lib/env.js | 4 + node_modules/gulp-util/lib/isBuffer.js | 7 + node_modules/gulp-util/lib/isNull.js | 3 + node_modules/gulp-util/lib/isStream.js | 5 + node_modules/gulp-util/lib/log.js | 14 + node_modules/gulp-util/lib/noop.js | 5 + node_modules/gulp-util/lib/template.js | 23 + .../node_modules/minimist/.travis.yml | 8 + .../gulp-util/node_modules/minimist/LICENSE | 18 + .../node_modules/minimist/example/parse.js | 2 + .../gulp-util/node_modules/minimist/index.js | 236 + .../node_modules/minimist/package.json | 117 + .../node_modules/minimist/readme.markdown | 91 + .../node_modules/minimist/test/all_bool.js | 32 + .../node_modules/minimist/test/bool.js | 166 + .../node_modules/minimist/test/dash.js | 31 + .../minimist/test/default_bool.js | 35 + .../node_modules/minimist/test/dotted.js | 22 + .../node_modules/minimist/test/kv_short.js | 16 + .../node_modules/minimist/test/long.js | 31 + .../node_modules/minimist/test/num.js | 36 + .../node_modules/minimist/test/parse.js | 197 + .../minimist/test/parse_modified.js | 9 + .../node_modules/minimist/test/short.js | 67 + .../node_modules/minimist/test/stop_early.js | 15 + .../node_modules/minimist/test/unknown.js | 102 + .../node_modules/minimist/test/whitespace.js | 8 + .../node_modules/object-assign/index.js | 39 + .../node_modules/object-assign/license | 21 + .../node_modules/object-assign/package.json | 102 + .../node_modules/object-assign/readme.md | 51 + node_modules/gulp-util/package.json | 130 + node_modules/gulp/CHANGELOG.md | 233 + node_modules/gulp/LICENSE | 22 + node_modules/gulp/README.md | 103 + node_modules/gulp/bin/gulp.js | 212 + node_modules/gulp/completion/README.md | 20 + node_modules/gulp/completion/bash | 27 + node_modules/gulp/completion/fish | 10 + node_modules/gulp/completion/powershell | 61 + node_modules/gulp/completion/zsh | 25 + node_modules/gulp/gulp.1 | 40 + node_modules/gulp/index.js | 63 + node_modules/gulp/lib/completion.js | 22 + node_modules/gulp/lib/taskTree.js | 14 + .../gulp/node_modules/minimist/.travis.yml | 8 + .../gulp/node_modules/minimist/LICENSE | 18 + .../node_modules/minimist/example/parse.js | 2 + .../gulp/node_modules/minimist/index.js | 236 + .../gulp/node_modules/minimist/package.json | 105 + .../node_modules/minimist/readme.markdown | 91 + .../node_modules/minimist/test/all_bool.js | 32 + .../gulp/node_modules/minimist/test/bool.js | 166 + .../gulp/node_modules/minimist/test/dash.js | 31 + .../minimist/test/default_bool.js | 35 + .../gulp/node_modules/minimist/test/dotted.js | 22 + .../node_modules/minimist/test/kv_short.js | 16 + .../gulp/node_modules/minimist/test/long.js | 31 + .../gulp/node_modules/minimist/test/num.js | 36 + .../gulp/node_modules/minimist/test/parse.js | 197 + .../minimist/test/parse_modified.js | 9 + .../gulp/node_modules/minimist/test/short.js | 67 + .../node_modules/minimist/test/stop_early.js | 15 + .../node_modules/minimist/test/unknown.js | 102 + .../node_modules/minimist/test/whitespace.js | 8 + node_modules/gulp/package.json | 146 + node_modules/gulplog/CHANGELOG.md | 10 + node_modules/gulplog/LICENSE | 22 + node_modules/gulplog/README.md | 79 + node_modules/gulplog/index.js | 7 + node_modules/gulplog/package.json | 101 + node_modules/has-ansi/index.js | 4 + node_modules/has-ansi/license | 21 + node_modules/has-ansi/package.json | 118 + node_modules/has-ansi/readme.md | 36 + node_modules/has-gulplog/LICENSE | 22 + node_modules/has-gulplog/README.md | 2 + node_modules/has-gulplog/index.js | 9 + node_modules/has-gulplog/package.json | 98 + node_modules/homedir-polyfill/LICENSE | 21 + node_modules/homedir-polyfill/README.md | 75 + node_modules/homedir-polyfill/index.js | 85 + node_modules/homedir-polyfill/package.json | 127 + node_modules/hosted-git-info/LICENSE | 13 + node_modules/hosted-git-info/README.md | 132 + node_modules/hosted-git-info/git-host-info.js | 68 + node_modules/hosted-git-info/git-host.js | 114 + node_modules/hosted-git-info/index.js | 109 + node_modules/hosted-git-info/package.json | 107 + node_modules/http-errors/HISTORY.md | 103 + node_modules/http-errors/LICENSE | 23 + node_modules/http-errors/README.md | 132 + node_modules/http-errors/index.js | 223 + node_modules/http-errors/package.json | 130 + node_modules/iconv-lite/.npmignore | 6 + node_modules/iconv-lite/.travis.yml | 22 + node_modules/iconv-lite/Changelog.md | 108 + node_modules/iconv-lite/LICENSE | 21 + node_modules/iconv-lite/README.md | 159 + .../iconv-lite/encodings/dbcs-codec.js | 554 + .../iconv-lite/encodings/dbcs-data.js | 176 + node_modules/iconv-lite/encodings/index.js | 22 + node_modules/iconv-lite/encodings/internal.js | 187 + .../iconv-lite/encodings/sbcs-codec.js | 72 + .../encodings/sbcs-data-generated.js | 451 + .../iconv-lite/encodings/sbcs-data.js | 169 + .../encodings/tables/big5-added.json | 122 + .../iconv-lite/encodings/tables/cp936.json | 264 + .../iconv-lite/encodings/tables/cp949.json | 273 + .../iconv-lite/encodings/tables/cp950.json | 177 + .../iconv-lite/encodings/tables/eucjp.json | 182 + .../encodings/tables/gb18030-ranges.json | 1 + .../encodings/tables/gbk-added.json | 55 + .../iconv-lite/encodings/tables/shiftjis.json | 125 + node_modules/iconv-lite/encodings/utf16.js | 176 + node_modules/iconv-lite/encodings/utf7.js | 289 + node_modules/iconv-lite/lib/bom-handling.js | 52 + node_modules/iconv-lite/lib/extend-node.js | 214 + node_modules/iconv-lite/lib/index.d.ts | 31 + node_modules/iconv-lite/lib/index.js | 141 + node_modules/iconv-lite/lib/streams.js | 120 + node_modules/iconv-lite/package.json | 159 + node_modules/inflection/.npmignore | 4 + node_modules/inflection/History.md | 232 + node_modules/inflection/Readme.md | 504 + node_modules/inflection/bower.json | 58 + node_modules/inflection/component.json | 36 + node_modules/inflection/inflection.min.js | 31 + node_modules/inflection/lib/inflection.js | 1086 + node_modules/inflection/package.json | 174 + node_modules/inflight/LICENSE | 15 + node_modules/inflight/README.md | 37 + node_modules/inflight/inflight.js | 54 + node_modules/inflight/package.json | 105 + node_modules/inherits/LICENSE | 16 + node_modules/inherits/README.md | 42 + node_modules/inherits/inherits.js | 7 + node_modules/inherits/inherits_browser.js | 23 + node_modules/inherits/package.json | 97 + node_modules/ini/LICENSE | 15 + node_modules/ini/README.md | 102 + node_modules/ini/ini.js | 190 + node_modules/ini/package.json | 90 + node_modules/interpret/CHANGELOG | 115 + node_modules/interpret/LICENSE | 22 + node_modules/interpret/README.md | 127 + node_modules/interpret/index.js | 123 + node_modules/interpret/package.json | 119 + node_modules/invert-kv/index.js | 15 + node_modules/invert-kv/package.json | 96 + node_modules/invert-kv/readme.md | 25 + node_modules/ipaddr.js/.npmignore | 2 + node_modules/ipaddr.js/.travis.yml | 10 + node_modules/ipaddr.js/Cakefile | 18 + node_modules/ipaddr.js/LICENSE | 19 + node_modules/ipaddr.js/README.md | 211 + node_modules/ipaddr.js/bower.json | 29 + node_modules/ipaddr.js/ipaddr.min.js | 1 + node_modules/ipaddr.js/lib/ipaddr.js | 535 + node_modules/ipaddr.js/package.json | 97 + node_modules/ipaddr.js/src/ipaddr.coffee | 460 + .../ipaddr.js/test/ipaddr.test.coffee | 346 + node_modules/is-absolute/LICENSE | 21 + node_modules/is-absolute/README.md | 113 + node_modules/is-absolute/index.js | 47 + .../node_modules/is-windows/LICENSE | 21 + .../node_modules/is-windows/index.js | 22 + .../node_modules/is-windows/package.json | 130 + node_modules/is-absolute/package.json | 171 + node_modules/is-arrayish/.editorconfig | 18 + node_modules/is-arrayish/.istanbul.yml | 4 + node_modules/is-arrayish/.npmignore | 5 + node_modules/is-arrayish/.travis.yml | 17 + node_modules/is-arrayish/LICENSE | 21 + node_modules/is-arrayish/README.md | 16 + node_modules/is-arrayish/index.js | 10 + node_modules/is-arrayish/package.json | 98 + node_modules/is-buffer/.npmignore | 2 + node_modules/is-buffer/LICENSE | 21 + node_modules/is-buffer/README.md | 49 + node_modules/is-buffer/index.js | 21 + node_modules/is-buffer/package.json | 112 + node_modules/is-buffer/test/basic.js | 25 + node_modules/is-builtin-module/index.js | 10 + node_modules/is-builtin-module/license | 21 + node_modules/is-builtin-module/package.json | 106 + node_modules/is-builtin-module/readme.md | 33 + node_modules/is-dotfile/LICENSE | 21 + node_modules/is-dotfile/README.md | 74 + node_modules/is-dotfile/index.js | 15 + node_modules/is-dotfile/package.json | 116 + node_modules/is-equal-shallow/LICENSE | 21 + node_modules/is-equal-shallow/README.md | 90 + node_modules/is-equal-shallow/index.js | 27 + node_modules/is-equal-shallow/package.json | 120 + node_modules/is-extendable/LICENSE | 21 + node_modules/is-extendable/README.md | 72 + node_modules/is-extendable/index.js | 13 + node_modules/is-extendable/package.json | 114 + node_modules/is-extglob/LICENSE | 21 + node_modules/is-extglob/README.md | 75 + node_modules/is-extglob/index.js | 11 + node_modules/is-extglob/package.json | 110 + node_modules/is-fullwidth-code-point/index.js | 46 + node_modules/is-fullwidth-code-point/license | 21 + .../is-fullwidth-code-point/package.json | 108 + .../is-fullwidth-code-point/readme.md | 39 + node_modules/is-glob/LICENSE | 21 + node_modules/is-glob/README.md | 105 + node_modules/is-glob/index.js | 14 + node_modules/is-glob/package.json | 127 + node_modules/is-number/LICENSE | 21 + node_modules/is-number/README.md | 103 + node_modules/is-number/index.js | 19 + node_modules/is-number/package.json | 126 + node_modules/is-posix-bracket/LICENSE | 21 + node_modules/is-posix-bracket/README.md | 88 + node_modules/is-posix-bracket/index.js | 10 + node_modules/is-posix-bracket/package.json | 131 + node_modules/is-primitive/LICENSE | 21 + node_modules/is-primitive/README.md | 57 + node_modules/is-primitive/index.js | 13 + node_modules/is-primitive/package.json | 104 + node_modules/is-promise/.npmignore | 6 + node_modules/is-promise/.travis.yml | 3 + node_modules/is-promise/LICENSE | 19 + node_modules/is-promise/index.js | 5 + node_modules/is-promise/package.json | 82 + node_modules/is-promise/readme.md | 29 + node_modules/is-relative/LICENSE | 21 + node_modules/is-relative/README.md | 54 + node_modules/is-relative/index.js | 11 + node_modules/is-relative/package.json | 117 + node_modules/is-unc-path/LICENSE | 21 + node_modules/is-unc-path/README.md | 193 + node_modules/is-unc-path/index.js | 8 + node_modules/is-unc-path/package.json | 139 + node_modules/is-utf8/LICENSE | 9 + node_modules/is-utf8/README.md | 16 + node_modules/is-utf8/is-utf8.js | 76 + node_modules/is-utf8/package.json | 87 + node_modules/is-windows/LICENSE | 21 + node_modules/is-windows/README.md | 79 + node_modules/is-windows/index.js | 24 + node_modules/is-windows/package.json | 133 + node_modules/isarray/.npmignore | 1 + node_modules/isarray/.travis.yml | 4 + node_modules/isarray/Makefile | 6 + node_modules/isarray/README.md | 60 + node_modules/isarray/component.json | 19 + node_modules/isarray/index.js | 5 + node_modules/isarray/package.json | 105 + node_modules/isarray/test.js | 20 + node_modules/isexe/.npmignore | 2 + node_modules/isexe/LICENSE | 15 + node_modules/isexe/README.md | 51 + node_modules/isexe/index.js | 57 + node_modules/isexe/mode.js | 41 + node_modules/isexe/package.json | 95 + node_modules/isexe/test/basic.js | 221 + node_modules/isexe/windows.js | 42 + node_modules/isobject/LICENSE | 21 + node_modules/isobject/README.md | 112 + node_modules/isobject/index.js | 14 + node_modules/isobject/package.json | 137 + node_modules/jade/.npmignore | 15 + node_modules/jade/.release.json | 1 + node_modules/jade/History.md | 991 + node_modules/jade/LICENSE | 22 + node_modules/jade/README.md | 154 + node_modules/jade/Readme_zh-cn.md | 1285 + node_modules/jade/bin/jade.js | 295 + node_modules/jade/block-code.html | 0 node_modules/jade/component.json | 16 + node_modules/jade/jade.js | 9196 ++ node_modules/jade/lib/compiler.js | 723 + node_modules/jade/lib/doctypes.js | 12 + node_modules/jade/lib/filters-client.js | 10 + node_modules/jade/lib/filters.js | 96 + node_modules/jade/lib/index.js | 418 + node_modules/jade/lib/inline-tags.js | 23 + node_modules/jade/lib/lexer.js | 949 + node_modules/jade/lib/nodes/attrs.js | 83 + node_modules/jade/lib/nodes/block-comment.js | 24 + node_modules/jade/lib/nodes/block.js | 118 + node_modules/jade/lib/nodes/case.js | 33 + node_modules/jade/lib/nodes/code.js | 26 + node_modules/jade/lib/nodes/comment.js | 23 + node_modules/jade/lib/nodes/doctype.js | 20 + node_modules/jade/lib/nodes/each.js | 26 + node_modules/jade/lib/nodes/filter.js | 24 + node_modules/jade/lib/nodes/index.js | 16 + node_modules/jade/lib/nodes/literal.js | 20 + node_modules/jade/lib/nodes/mixin-block.js | 18 + node_modules/jade/lib/nodes/mixin.js | 26 + node_modules/jade/lib/nodes/node.js | 18 + node_modules/jade/lib/nodes/tag.js | 89 + node_modules/jade/lib/nodes/text.js | 26 + node_modules/jade/lib/parser.js | 846 + node_modules/jade/lib/runtime.js | 246 + node_modules/jade/lib/utils.js | 53 + node_modules/jade/package.json | 159 + node_modules/jade/release.js | 35 + node_modules/jade/runtime.js | 252 + node_modules/js-beautify/.codeclimate.yml | 13 + node_modules/js-beautify/.jshintignore | 9 + node_modules/js-beautify/.jshintrc | 10 + node_modules/js-beautify/.npmignore | 5 + node_modules/js-beautify/.travis.yml | 14 + node_modules/js-beautify/CHANGELOG.md | 542 + node_modules/js-beautify/CONTRIBUTING.md | 139 + node_modules/js-beautify/ISSUE_TEMPLATE.md | 55 + node_modules/js-beautify/LICENSE | 9 + node_modules/js-beautify/README.md | 319 + node_modules/js-beautify/appveyor.yml | 35 + node_modules/js-beautify/bower.json | 11 + node_modules/js-beautify/build | 5 + .../js-beautify/js/bin/css-beautify.js | 4 + .../js-beautify/js/bin/html-beautify.js | 4 + .../js-beautify/js/bin/js-beautify.js | 4 + .../js-beautify/js/config/defaults.json | 18 + node_modules/js-beautify/js/index.js | 81 + .../js-beautify/js/lib/beautify-css.js | 571 + .../js-beautify/js/lib/beautify-html.js | 1128 + node_modules/js-beautify/js/lib/beautify.js | 2481 + node_modules/js-beautify/js/lib/cli.js | 620 + .../javascriptobfuscator_unpacker.js | 103 + .../js/lib/unpackers/myobfuscate_unpacker.js | 90 + .../js/lib/unpackers/p_a_c_k_e_r_unpacker.js | 83 + .../js/lib/unpackers/urlencode_unpacker.js | 73 + .../js-beautify/js/test/amd-beautify-tests.js | 62 + .../js/test/generated/beautify-css-tests.js | 1393 + .../js/test/generated/beautify-html-tests.js | 3172 + .../generated/beautify-javascript-tests.js | 5825 + .../js/test/node-beautify-html-perf-tests.js | 51 + .../js/test/node-beautify-perf-tests.js | 50 + .../js/test/node-beautify-tests.js | 45 + .../js/test/requirejs-html-beautify.html | 58 + .../test/resources/configerror/.jsbeautifyrc | 6 + .../configerror/subDir1/subDir2/empty.txt | 0 .../test/resources/editorconfig/.editorconfig | 6 + .../resources/editorconfig/cr/.editorconfig | 3 + .../resources/editorconfig/crlf/.editorconfig | 3 + .../editorconfig/error/.editorconfig | 1 + .../resources/editorconfig/example-base.js | 3 + .../js-beautify/js/test/resources/example1.js | 3 + .../resources/indent11chars/.jsbeautifyrc | 6 + .../indent11chars/subDir1/subDir2/empty.txt | 0 node_modules/js-beautify/js/test/run-tests | 17 + .../js-beautify/js/test/sanitytest.js | 144 + .../js-beautify/js/test/shell-smoke-test.sh | 383 + node_modules/js-beautify/jsbeautifyrc | 18 + node_modules/js-beautify/package.json | 148 + .../js-beautify/test/data/css/node.mustache | 269 + .../js-beautify/test/data/css/python.mustache | 270 + .../js-beautify/test/data/css/tests.js | 445 + .../js-beautify/test/data/html/node.mustache | 378 + .../js-beautify/test/data/html/tests.js | 1089 + .../test/data/javascript/inputlib.js | 84 + .../test/data/javascript/node.mustache | 1114 + .../test/data/javascript/python.mustache | 1322 + .../js-beautify/test/data/javascript/tests.js | 3083 + .../js-beautify/test/generate-tests.js | 216 + .../test/resources/html-with-base64image.html | 1 + .../test/resources/underscore-min.js | 6 + .../js-beautify/test/resources/underscore.js | 1439 + node_modules/js-beautify/tools/build.sh | 140 + .../js-beautify/tools/generate-changelog.sh | 40 + .../js-beautify/tools/git-status-clear.sh | 18 + node_modules/js-beautify/tools/release-all.sh | 86 + node_modules/jsonfile/.npmignore | 2 + node_modules/jsonfile/CHANGELOG.md | 126 + node_modules/jsonfile/LICENSE | 15 + node_modules/jsonfile/README.md | 162 + node_modules/jsonfile/appveyor.yml | 28 + node_modules/jsonfile/index.js | 133 + node_modules/jsonfile/package.json | 103 + node_modules/jstransformer/LICENSE | 19 + node_modules/jstransformer/README.md | 103 + node_modules/jstransformer/index.js | 328 + node_modules/jstransformer/package.json | 94 + node_modules/kind-of/LICENSE | 21 + node_modules/kind-of/README.md | 258 + node_modules/kind-of/index.js | 116 + node_modules/kind-of/package.json | 173 + node_modules/lazy-cache/LICENSE | 21 + node_modules/lazy-cache/README.md | 147 + node_modules/lazy-cache/index.js | 67 + node_modules/lazy-cache/package.json | 129 + node_modules/lcid/index.js | 22 + node_modules/lcid/lcid.json | 203 + node_modules/lcid/license | 21 + node_modules/lcid/package.json | 109 + node_modules/lcid/readme.md | 35 + node_modules/liftoff/.jscsrc | 60 + node_modules/liftoff/.jshintrc | 11 + node_modules/liftoff/.npmignore | 2 + node_modules/liftoff/.travis.yml | 16 + node_modules/liftoff/CHANGELOG | 127 + node_modules/liftoff/LICENSE | 22 + node_modules/liftoff/README.md | 429 + node_modules/liftoff/UPGRADING.md | 28 + node_modules/liftoff/appveyor.yml | 29 + node_modules/liftoff/index.js | 210 + node_modules/liftoff/lib/build_config_name.js | 17 + node_modules/liftoff/lib/file_search.js | 14 + node_modules/liftoff/lib/find_config.js | 25 + node_modules/liftoff/lib/find_cwd.js | 18 + node_modules/liftoff/lib/parse_options.js | 35 + node_modules/liftoff/lib/register_loader.js | 25 + node_modules/liftoff/lib/silent_require.js | 5 + node_modules/liftoff/package.json | 120 + node_modules/load-json-file/index.js | 21 + node_modules/load-json-file/license | 21 + .../node_modules/strip-bom/index.js | 17 + .../node_modules/strip-bom/license | 21 + .../node_modules/strip-bom/package.json | 105 + .../node_modules/strip-bom/readme.md | 39 + node_modules/load-json-file/package.json | 111 + node_modules/load-json-file/readme.md | 45 + node_modules/lodash._basecopy/LICENSE.txt | 22 + node_modules/lodash._basecopy/README.md | 20 + node_modules/lodash._basecopy/index.js | 32 + node_modules/lodash._basecopy/package.json | 123 + node_modules/lodash._basetostring/LICENSE | 22 + node_modules/lodash._basetostring/README.md | 20 + node_modules/lodash._basetostring/index.js | 22 + .../lodash._basetostring/package.json | 123 + node_modules/lodash._basevalues/LICENSE.txt | 22 + node_modules/lodash._basevalues/README.md | 20 + node_modules/lodash._basevalues/index.js | 31 + node_modules/lodash._basevalues/package.json | 107 + node_modules/lodash._getnative/LICENSE | 22 + node_modules/lodash._getnative/README.md | 20 + node_modules/lodash._getnative/index.js | 137 + node_modules/lodash._getnative/package.json | 119 + .../lodash._isiterateecall/LICENSE.txt | 22 + node_modules/lodash._isiterateecall/README.md | 20 + node_modules/lodash._isiterateecall/index.js | 132 + .../lodash._isiterateecall/package.json | 123 + node_modules/lodash._reescape/LICENSE.txt | 22 + node_modules/lodash._reescape/README.md | 20 + node_modules/lodash._reescape/index.js | 13 + node_modules/lodash._reescape/package.json | 107 + node_modules/lodash._reevaluate/LICENSE.txt | 22 + node_modules/lodash._reevaluate/README.md | 20 + node_modules/lodash._reevaluate/index.js | 13 + node_modules/lodash._reevaluate/package.json | 107 + .../lodash._reinterpolate/LICENSE.txt | 22 + node_modules/lodash._reinterpolate/README.md | 20 + node_modules/lodash._reinterpolate/index.js | 13 + .../lodash._reinterpolate/package.json | 121 + node_modules/lodash._root/LICENSE | 23 + node_modules/lodash._root/README.md | 18 + node_modules/lodash._root/index.js | 59 + node_modules/lodash._root/package.json | 109 + node_modules/lodash.assignwith/LICENSE | 47 + node_modules/lodash.assignwith/README.md | 18 + node_modules/lodash.assignwith/index.js | 622 + node_modules/lodash.assignwith/package.json | 113 + node_modules/lodash.escape/LICENSE | 22 + node_modules/lodash.escape/README.md | 18 + node_modules/lodash.escape/index.js | 180 + node_modules/lodash.escape/package.json | 116 + node_modules/lodash.isarguments/LICENSE | 47 + node_modules/lodash.isarguments/README.md | 18 + node_modules/lodash.isarguments/index.js | 229 + node_modules/lodash.isarguments/package.json | 113 + node_modules/lodash.isarray/LICENSE | 22 + node_modules/lodash.isarray/README.md | 20 + node_modules/lodash.isarray/index.js | 180 + node_modules/lodash.isarray/package.json | 129 + node_modules/lodash.isempty/LICENSE | 47 + node_modules/lodash.isempty/README.md | 18 + node_modules/lodash.isempty/index.js | 582 + node_modules/lodash.isempty/package.json | 113 + node_modules/lodash.isplainobject/LICENSE | 47 + node_modules/lodash.isplainobject/README.md | 18 + node_modules/lodash.isplainobject/index.js | 139 + .../lodash.isplainobject/package.json | 114 + node_modules/lodash.isstring/LICENSE | 22 + node_modules/lodash.isstring/README.md | 18 + node_modules/lodash.isstring/index.js | 95 + node_modules/lodash.isstring/package.json | 114 + node_modules/lodash.keys/LICENSE | 22 + node_modules/lodash.keys/README.md | 20 + node_modules/lodash.keys/index.js | 236 + node_modules/lodash.keys/package.json | 133 + node_modules/lodash.mapvalues/LICENSE | 47 + node_modules/lodash.mapvalues/README.md | 18 + node_modules/lodash.mapvalues/index.js | 2280 + node_modules/lodash.mapvalues/package.json | 113 + node_modules/lodash.pick/LICENSE | 47 + node_modules/lodash.pick/README.md | 18 + node_modules/lodash.pick/index.js | 503 + node_modules/lodash.pick/package.json | 113 + node_modules/lodash.restparam/LICENSE.txt | 22 + node_modules/lodash.restparam/README.md | 20 + node_modules/lodash.restparam/index.js | 67 + node_modules/lodash.restparam/package.json | 129 + node_modules/lodash.template/LICENSE | 22 + node_modules/lodash.template/README.md | 20 + node_modules/lodash.template/index.js | 389 + node_modules/lodash.template/package.json | 139 + node_modules/lodash.templatesettings/LICENSE | 22 + .../lodash.templatesettings/README.md | 18 + node_modules/lodash.templatesettings/index.js | 77 + .../lodash.templatesettings/package.json | 115 + node_modules/lodash/LICENSE | 47 + node_modules/lodash/README.md | 40 + node_modules/lodash/_DataView.js | 7 + node_modules/lodash/_Hash.js | 32 + node_modules/lodash/_LazyWrapper.js | 28 + node_modules/lodash/_ListCache.js | 32 + node_modules/lodash/_LodashWrapper.js | 22 + node_modules/lodash/_Map.js | 7 + node_modules/lodash/_MapCache.js | 32 + node_modules/lodash/_Promise.js | 7 + node_modules/lodash/_Reflect.js | 6 + node_modules/lodash/_Set.js | 7 + node_modules/lodash/_SetCache.js | 27 + node_modules/lodash/_Stack.js | 26 + node_modules/lodash/_Symbol.js | 6 + node_modules/lodash/_Uint8Array.js | 6 + node_modules/lodash/_WeakMap.js | 7 + node_modules/lodash/_addMapEntry.js | 15 + node_modules/lodash/_addSetEntry.js | 14 + node_modules/lodash/_apply.js | 22 + node_modules/lodash/_arrayAggregator.js | 22 + node_modules/lodash/_arrayEach.js | 22 + node_modules/lodash/_arrayEachRight.js | 21 + node_modules/lodash/_arrayEvery.js | 23 + node_modules/lodash/_arrayFilter.js | 25 + node_modules/lodash/_arrayIncludes.js | 16 + node_modules/lodash/_arrayIncludesWith.js | 22 + node_modules/lodash/_arrayMap.js | 21 + node_modules/lodash/_arrayPush.js | 20 + node_modules/lodash/_arrayReduce.js | 26 + node_modules/lodash/_arrayReduceRight.js | 24 + node_modules/lodash/_arraySome.js | 23 + node_modules/lodash/_assignInDefaults.js | 27 + node_modules/lodash/_assignMergeValue.js | 19 + node_modules/lodash/_assignValue.js | 27 + node_modules/lodash/_assocIndexOf.js | 21 + node_modules/lodash/_baseAggregator.js | 21 + node_modules/lodash/_baseAssign.js | 17 + node_modules/lodash/_baseAt.js | 23 + node_modules/lodash/_baseClamp.js | 22 + node_modules/lodash/_baseClone.js | 139 + node_modules/lodash/_baseConforms.js | 33 + node_modules/lodash/_baseCreate.js | 18 + node_modules/lodash/_baseDelay.js | 21 + node_modules/lodash/_baseDifference.js | 67 + node_modules/lodash/_baseEach.js | 14 + node_modules/lodash/_baseEachRight.js | 14 + node_modules/lodash/_baseEvery.js | 21 + node_modules/lodash/_baseExtremum.js | 32 + node_modules/lodash/_baseFill.js | 32 + node_modules/lodash/_baseFilter.js | 21 + node_modules/lodash/_baseFind.js | 25 + node_modules/lodash/_baseFindIndex.js | 23 + node_modules/lodash/_baseFlatten.js | 38 + node_modules/lodash/_baseFor.js | 16 + node_modules/lodash/_baseForOwn.js | 16 + node_modules/lodash/_baseForOwnRight.js | 16 + node_modules/lodash/_baseForRight.js | 15 + node_modules/lodash/_baseFunctions.js | 19 + node_modules/lodash/_baseGet.js | 25 + node_modules/lodash/_baseGetAllKeys.js | 20 + node_modules/lodash/_baseGt.js | 14 + node_modules/lodash/_baseHas.js | 25 + node_modules/lodash/_baseHasIn.js | 13 + node_modules/lodash/_baseInRange.js | 18 + node_modules/lodash/_baseIndexOf.js | 27 + node_modules/lodash/_baseIndexOfWith.js | 23 + node_modules/lodash/_baseIntersection.js | 74 + node_modules/lodash/_baseInverter.js | 21 + node_modules/lodash/_baseInvoke.js | 28 + node_modules/lodash/_baseIsEqual.js | 30 + node_modules/lodash/_baseIsEqualDeep.js | 82 + node_modules/lodash/_baseIsMatch.js | 62 + node_modules/lodash/_baseIteratee.js | 31 + node_modules/lodash/_baseKeys.js | 16 + node_modules/lodash/_baseKeysIn.js | 36 + node_modules/lodash/_baseLodash.js | 10 + node_modules/lodash/_baseLt.js | 14 + node_modules/lodash/_baseMap.js | 22 + node_modules/lodash/_baseMatches.js | 22 + node_modules/lodash/_baseMatchesProperty.js | 33 + node_modules/lodash/_baseMean.js | 20 + node_modules/lodash/_baseMerge.js | 50 + node_modules/lodash/_baseMergeDeep.js | 83 + node_modules/lodash/_baseNth.js | 20 + node_modules/lodash/_baseOrderBy.js | 34 + node_modules/lodash/_basePick.js | 22 + node_modules/lodash/_basePickBy.js | 28 + node_modules/lodash/_baseProperty.js | 14 + node_modules/lodash/_basePropertyDeep.js | 16 + node_modules/lodash/_basePullAll.js | 47 + node_modules/lodash/_basePullAt.js | 50 + node_modules/lodash/_baseRandom.js | 18 + node_modules/lodash/_baseRange.js | 28 + node_modules/lodash/_baseReduce.js | 23 + node_modules/lodash/_baseRepeat.js | 35 + node_modules/lodash/_baseSet.js | 46 + node_modules/lodash/_baseSetData.js | 17 + node_modules/lodash/_baseSlice.js | 31 + node_modules/lodash/_baseSome.js | 22 + node_modules/lodash/_baseSortBy.js | 21 + node_modules/lodash/_baseSortedIndex.js | 42 + node_modules/lodash/_baseSortedIndexBy.js | 64 + node_modules/lodash/_baseSortedUniq.js | 30 + node_modules/lodash/_baseSum.js | 24 + node_modules/lodash/_baseTimes.js | 20 + node_modules/lodash/_baseToNumber.js | 24 + node_modules/lodash/_baseToPairs.js | 18 + node_modules/lodash/_baseToString.js | 31 + node_modules/lodash/_baseUnary.js | 14 + node_modules/lodash/_baseUniq.js | 72 + node_modules/lodash/_baseUnset.js | 24 + node_modules/lodash/_baseUpdate.js | 18 + node_modules/lodash/_baseValues.js | 19 + node_modules/lodash/_baseWhile.js | 26 + node_modules/lodash/_baseWrapperValue.js | 25 + node_modules/lodash/_baseXor.js | 30 + node_modules/lodash/_baseZipObject.js | 23 + node_modules/lodash/_cacheHas.js | 13 + node_modules/lodash/_castArrayLikeObject.js | 14 + node_modules/lodash/_castFunction.js | 14 + node_modules/lodash/_castPath.js | 15 + node_modules/lodash/_castSlice.js | 18 + node_modules/lodash/_charsEndIndex.js | 19 + node_modules/lodash/_charsStartIndex.js | 20 + node_modules/lodash/_checkGlobal.js | 12 + node_modules/lodash/_cloneArrayBuffer.js | 16 + node_modules/lodash/_cloneBuffer.js | 18 + node_modules/lodash/_cloneDataView.js | 16 + node_modules/lodash/_cloneMap.js | 19 + node_modules/lodash/_cloneRegExp.js | 17 + node_modules/lodash/_cloneSet.js | 19 + node_modules/lodash/_cloneSymbol.js | 18 + node_modules/lodash/_cloneTypedArray.js | 16 + node_modules/lodash/_compareAscending.js | 41 + node_modules/lodash/_compareMultiple.js | 44 + node_modules/lodash/_composeArgs.js | 39 + node_modules/lodash/_composeArgsRight.js | 41 + node_modules/lodash/_copyArray.js | 20 + node_modules/lodash/_copyObject.js | 31 + node_modules/lodash/_copySymbols.js | 16 + node_modules/lodash/_countHolders.js | 21 + node_modules/lodash/_createAggregator.js | 23 + node_modules/lodash/_createAssigner.js | 37 + node_modules/lodash/_createBaseEach.js | 32 + node_modules/lodash/_createBaseFor.js | 25 + node_modules/lodash/_createBaseWrapper.js | 29 + node_modules/lodash/_createCaseFirst.js | 33 + node_modules/lodash/_createCompounder.js | 24 + node_modules/lodash/_createCtorWrapper.js | 37 + node_modules/lodash/_createCurryWrapper.js | 47 + node_modules/lodash/_createFlow.js | 85 + node_modules/lodash/_createHybridWrapper.js | 93 + node_modules/lodash/_createInverter.js | 17 + node_modules/lodash/_createMathOperation.js | 37 + node_modules/lodash/_createOver.js | 32 + node_modules/lodash/_createPadding.js | 33 + node_modules/lodash/_createPartialWrapper.js | 44 + node_modules/lodash/_createRange.js | 31 + node_modules/lodash/_createRecurryWrapper.js | 56 + .../lodash/_createRelationalOperation.js | 20 + node_modules/lodash/_createRound.js | 30 + node_modules/lodash/_createSet.js | 19 + node_modules/lodash/_createToPairs.js | 30 + node_modules/lodash/_createWrapper.js | 106 + node_modules/lodash/_deburrLetter.js | 33 + node_modules/lodash/_equalArrays.js | 81 + node_modules/lodash/_equalByTag.js | 114 + node_modules/lodash/_equalObjects.js | 83 + node_modules/lodash/_escapeHtmlChar.js | 22 + node_modules/lodash/_escapeStringChar.js | 22 + node_modules/lodash/_getAllKeys.js | 16 + node_modules/lodash/_getAllKeysIn.js | 17 + node_modules/lodash/_getData.js | 15 + node_modules/lodash/_getFuncName.js | 31 + node_modules/lodash/_getHolder.js | 13 + node_modules/lodash/_getLength.js | 16 + node_modules/lodash/_getMapData.js | 18 + node_modules/lodash/_getMatchData.js | 21 + node_modules/lodash/_getNative.js | 16 + node_modules/lodash/_getPrototype.js | 15 + node_modules/lodash/_getSymbols.js | 24 + node_modules/lodash/_getSymbolsIn.js | 25 + node_modules/lodash/_getTag.js | 70 + node_modules/lodash/_getView.js | 33 + node_modules/lodash/_hasPath.js | 41 + node_modules/lodash/_hashClear.js | 14 + node_modules/lodash/_hashDelete.js | 15 + node_modules/lodash/_hashGet.js | 30 + node_modules/lodash/_hashHas.js | 23 + node_modules/lodash/_hashSet.js | 22 + node_modules/lodash/_indexKeys.js | 24 + node_modules/lodash/_indexOfNaN.js | 23 + node_modules/lodash/_initCloneArray.js | 26 + node_modules/lodash/_initCloneByTag.js | 80 + node_modules/lodash/_initCloneObject.js | 18 + node_modules/lodash/_isFlattenable.js | 15 + node_modules/lodash/_isFlattenableIteratee.js | 16 + node_modules/lodash/_isHostObject.js | 20 + node_modules/lodash/_isIndex.js | 22 + node_modules/lodash/_isIterateeCall.js | 30 + node_modules/lodash/_isKey.js | 29 + node_modules/lodash/_isKeyable.js | 15 + node_modules/lodash/_isLaziable.js | 28 + node_modules/lodash/_isPrototype.js | 18 + node_modules/lodash/_isStrictComparable.js | 15 + node_modules/lodash/_iteratorToArray.js | 18 + node_modules/lodash/_lazyClone.js | 23 + node_modules/lodash/_lazyReverse.js | 23 + node_modules/lodash/_lazyValue.js | 73 + node_modules/lodash/_listCacheClear.js | 12 + node_modules/lodash/_listCacheDelete.js | 34 + node_modules/lodash/_listCacheGet.js | 19 + node_modules/lodash/_listCacheHas.js | 16 + node_modules/lodash/_listCacheSet.js | 25 + node_modules/lodash/_mapCacheClear.js | 20 + node_modules/lodash/_mapCacheDelete.js | 16 + node_modules/lodash/_mapCacheGet.js | 16 + node_modules/lodash/_mapCacheHas.js | 16 + node_modules/lodash/_mapCacheSet.js | 18 + node_modules/lodash/_mapToArray.js | 18 + .../lodash/_matchesStrictComparable.js | 20 + node_modules/lodash/_mergeData.js | 90 + node_modules/lodash/_mergeDefaults.js | 24 + node_modules/lodash/_metaMap.js | 6 + node_modules/lodash/_nativeCreate.js | 6 + node_modules/lodash/_parent.js | 16 + node_modules/lodash/_reEscape.js | 4 + node_modules/lodash/_reEvaluate.js | 4 + node_modules/lodash/_reHasComplexSymbol.js | 13 + node_modules/lodash/_reInterpolate.js | 4 + node_modules/lodash/_realNames.js | 4 + node_modules/lodash/_reorder.js | 29 + node_modules/lodash/_replaceHolders.js | 29 + node_modules/lodash/_root.js | 41 + node_modules/lodash/_setCacheAdd.js | 19 + node_modules/lodash/_setCacheHas.js | 14 + node_modules/lodash/_setData.js | 42 + node_modules/lodash/_setToArray.js | 18 + node_modules/lodash/_setToPairs.js | 18 + node_modules/lodash/_stackClear.js | 14 + node_modules/lodash/_stackDelete.js | 14 + node_modules/lodash/_stackGet.js | 14 + node_modules/lodash/_stackHas.js | 14 + node_modules/lodash/_stackSet.js | 26 + node_modules/lodash/_stringSize.js | 47 + node_modules/lodash/_stringToArray.js | 38 + node_modules/lodash/_stringToPath.js | 25 + node_modules/lodash/_toKey.js | 21 + node_modules/lodash/_toSource.js | 23 + node_modules/lodash/_unescapeHtmlChar.js | 22 + node_modules/lodash/_wrapperClone.js | 23 + node_modules/lodash/add.js | 22 + node_modules/lodash/after.js | 42 + node_modules/lodash/array.js | 67 + node_modules/lodash/ary.js | 29 + node_modules/lodash/assign.js | 64 + node_modules/lodash/assignIn.js | 58 + node_modules/lodash/assignInWith.js | 38 + node_modules/lodash/assignWith.js | 37 + node_modules/lodash/at.js | 29 + node_modules/lodash/attempt.js | 35 + node_modules/lodash/before.js | 40 + node_modules/lodash/bind.js | 57 + node_modules/lodash/bindAll.js | 41 + node_modules/lodash/bindKey.js | 68 + node_modules/lodash/camelCase.js | 29 + node_modules/lodash/capitalize.js | 23 + node_modules/lodash/castArray.js | 44 + node_modules/lodash/ceil.js | 26 + node_modules/lodash/chain.js | 38 + node_modules/lodash/chunk.js | 50 + node_modules/lodash/clamp.js | 39 + node_modules/lodash/clone.js | 33 + node_modules/lodash/cloneDeep.js | 25 + node_modules/lodash/cloneDeepWith.js | 35 + node_modules/lodash/cloneWith.js | 38 + node_modules/lodash/collection.js | 31 + node_modules/lodash/commit.js | 33 + node_modules/lodash/compact.js | 31 + node_modules/lodash/concat.js | 42 + node_modules/lodash/cond.js | 60 + node_modules/lodash/conforms.js | 29 + node_modules/lodash/constant.js | 24 + node_modules/lodash/core.js | 3926 + node_modules/lodash/core.min.js | 28 + node_modules/lodash/countBy.js | 35 + node_modules/lodash/create.js | 43 + node_modules/lodash/curry.js | 57 + node_modules/lodash/curryRight.js | 54 + node_modules/lodash/date.js | 3 + node_modules/lodash/debounce.js | 186 + node_modules/lodash/deburr.js | 42 + node_modules/lodash/defaults.js | 32 + node_modules/lodash/defaultsDeep.js | 31 + node_modules/lodash/defer.js | 26 + node_modules/lodash/delay.js | 28 + node_modules/lodash/difference.js | 31 + node_modules/lodash/differenceBy.js | 42 + node_modules/lodash/differenceWith.js | 38 + node_modules/lodash/divide.js | 22 + node_modules/lodash/drop.js | 38 + node_modules/lodash/dropRight.js | 39 + node_modules/lodash/dropRightWhile.js | 46 + node_modules/lodash/dropWhile.js | 46 + node_modules/lodash/each.js | 1 + node_modules/lodash/eachRight.js | 1 + node_modules/lodash/endsWith.js | 42 + node_modules/lodash/entries.js | 1 + node_modules/lodash/entriesIn.js | 1 + node_modules/lodash/eq.js | 37 + node_modules/lodash/escape.js | 49 + node_modules/lodash/escapeRegExp.js | 32 + node_modules/lodash/every.js | 52 + node_modules/lodash/extend.js | 1 + node_modules/lodash/extendWith.js | 1 + node_modules/lodash/fill.js | 45 + node_modules/lodash/filter.js | 47 + node_modules/lodash/find.js | 52 + node_modules/lodash/findIndex.js | 45 + node_modules/lodash/findKey.js | 45 + node_modules/lodash/findLast.js | 35 + node_modules/lodash/findLastIndex.js | 45 + node_modules/lodash/findLastKey.js | 45 + node_modules/lodash/first.js | 1 + node_modules/lodash/flatMap.js | 30 + node_modules/lodash/flatMapDeep.js | 32 + node_modules/lodash/flatMapDepth.js | 32 + node_modules/lodash/flatten.js | 22 + node_modules/lodash/flattenDeep.js | 25 + node_modules/lodash/flattenDepth.js | 33 + node_modules/lodash/flip.js | 28 + node_modules/lodash/floor.js | 26 + node_modules/lodash/flow.js | 27 + node_modules/lodash/flowRight.js | 26 + node_modules/lodash/forEach.js | 41 + node_modules/lodash/forEachRight.js | 31 + node_modules/lodash/forIn.js | 39 + node_modules/lodash/forInRight.js | 37 + node_modules/lodash/forOwn.js | 36 + node_modules/lodash/forOwnRight.js | 34 + node_modules/lodash/fp.js | 2 + node_modules/lodash/fp/__.js | 1 + node_modules/lodash/fp/_baseConvert.js | 466 + node_modules/lodash/fp/_convertBrowser.js | 18 + node_modules/lodash/fp/_falseOptions.js | 7 + node_modules/lodash/fp/_mapping.js | 290 + node_modules/lodash/fp/_util.js | 14 + node_modules/lodash/fp/add.js | 5 + node_modules/lodash/fp/after.js | 5 + node_modules/lodash/fp/all.js | 1 + node_modules/lodash/fp/allPass.js | 1 + node_modules/lodash/fp/always.js | 1 + node_modules/lodash/fp/any.js | 1 + node_modules/lodash/fp/anyPass.js | 1 + node_modules/lodash/fp/apply.js | 1 + node_modules/lodash/fp/array.js | 2 + node_modules/lodash/fp/ary.js | 5 + node_modules/lodash/fp/assign.js | 5 + node_modules/lodash/fp/assignIn.js | 5 + node_modules/lodash/fp/assignInWith.js | 5 + node_modules/lodash/fp/assignWith.js | 5 + node_modules/lodash/fp/assoc.js | 1 + node_modules/lodash/fp/assocPath.js | 1 + node_modules/lodash/fp/at.js | 5 + node_modules/lodash/fp/attempt.js | 5 + node_modules/lodash/fp/before.js | 5 + node_modules/lodash/fp/bind.js | 5 + node_modules/lodash/fp/bindAll.js | 5 + node_modules/lodash/fp/bindKey.js | 5 + node_modules/lodash/fp/camelCase.js | 5 + node_modules/lodash/fp/capitalize.js | 5 + node_modules/lodash/fp/castArray.js | 5 + node_modules/lodash/fp/ceil.js | 5 + node_modules/lodash/fp/chain.js | 5 + node_modules/lodash/fp/chunk.js | 5 + node_modules/lodash/fp/clamp.js | 5 + node_modules/lodash/fp/clone.js | 5 + node_modules/lodash/fp/cloneDeep.js | 5 + node_modules/lodash/fp/cloneDeepWith.js | 5 + node_modules/lodash/fp/cloneWith.js | 5 + node_modules/lodash/fp/collection.js | 2 + node_modules/lodash/fp/commit.js | 5 + node_modules/lodash/fp/compact.js | 5 + node_modules/lodash/fp/complement.js | 1 + node_modules/lodash/fp/compose.js | 1 + node_modules/lodash/fp/concat.js | 5 + node_modules/lodash/fp/cond.js | 5 + node_modules/lodash/fp/conforms.js | 5 + node_modules/lodash/fp/constant.js | 5 + node_modules/lodash/fp/contains.js | 1 + node_modules/lodash/fp/convert.js | 18 + node_modules/lodash/fp/countBy.js | 5 + node_modules/lodash/fp/create.js | 5 + node_modules/lodash/fp/curry.js | 5 + node_modules/lodash/fp/curryN.js | 5 + node_modules/lodash/fp/curryRight.js | 5 + node_modules/lodash/fp/curryRightN.js | 5 + node_modules/lodash/fp/date.js | 2 + node_modules/lodash/fp/debounce.js | 5 + node_modules/lodash/fp/deburr.js | 5 + node_modules/lodash/fp/defaults.js | 5 + node_modules/lodash/fp/defaultsDeep.js | 5 + node_modules/lodash/fp/defer.js | 5 + node_modules/lodash/fp/delay.js | 5 + node_modules/lodash/fp/difference.js | 5 + node_modules/lodash/fp/differenceBy.js | 5 + node_modules/lodash/fp/differenceWith.js | 5 + node_modules/lodash/fp/dissoc.js | 1 + node_modules/lodash/fp/dissocPath.js | 1 + node_modules/lodash/fp/divide.js | 5 + node_modules/lodash/fp/drop.js | 5 + node_modules/lodash/fp/dropRight.js | 5 + node_modules/lodash/fp/dropRightWhile.js | 5 + node_modules/lodash/fp/dropWhile.js | 5 + node_modules/lodash/fp/each.js | 1 + node_modules/lodash/fp/eachRight.js | 1 + node_modules/lodash/fp/endsWith.js | 5 + node_modules/lodash/fp/entries.js | 1 + node_modules/lodash/fp/entriesIn.js | 1 + node_modules/lodash/fp/eq.js | 5 + node_modules/lodash/fp/equals.js | 1 + node_modules/lodash/fp/escape.js | 5 + node_modules/lodash/fp/escapeRegExp.js | 5 + node_modules/lodash/fp/every.js | 5 + node_modules/lodash/fp/extend.js | 1 + node_modules/lodash/fp/extendWith.js | 1 + node_modules/lodash/fp/fill.js | 5 + node_modules/lodash/fp/filter.js | 5 + node_modules/lodash/fp/find.js | 5 + node_modules/lodash/fp/findIndex.js | 5 + node_modules/lodash/fp/findKey.js | 5 + node_modules/lodash/fp/findLast.js | 5 + node_modules/lodash/fp/findLastIndex.js | 5 + node_modules/lodash/fp/findLastKey.js | 5 + node_modules/lodash/fp/first.js | 1 + node_modules/lodash/fp/flatMap.js | 5 + node_modules/lodash/fp/flatMapDeep.js | 5 + node_modules/lodash/fp/flatMapDepth.js | 5 + node_modules/lodash/fp/flatten.js | 5 + node_modules/lodash/fp/flattenDeep.js | 5 + node_modules/lodash/fp/flattenDepth.js | 5 + node_modules/lodash/fp/flip.js | 5 + node_modules/lodash/fp/floor.js | 5 + node_modules/lodash/fp/flow.js | 5 + node_modules/lodash/fp/flowRight.js | 5 + node_modules/lodash/fp/forEach.js | 5 + node_modules/lodash/fp/forEachRight.js | 5 + node_modules/lodash/fp/forIn.js | 5 + node_modules/lodash/fp/forInRight.js | 5 + node_modules/lodash/fp/forOwn.js | 5 + node_modules/lodash/fp/forOwnRight.js | 5 + node_modules/lodash/fp/fromPairs.js | 5 + node_modules/lodash/fp/function.js | 2 + node_modules/lodash/fp/functions.js | 5 + node_modules/lodash/fp/functionsIn.js | 5 + node_modules/lodash/fp/get.js | 5 + node_modules/lodash/fp/getOr.js | 5 + node_modules/lodash/fp/groupBy.js | 5 + node_modules/lodash/fp/gt.js | 5 + node_modules/lodash/fp/gte.js | 5 + node_modules/lodash/fp/has.js | 5 + node_modules/lodash/fp/hasIn.js | 5 + node_modules/lodash/fp/head.js | 5 + node_modules/lodash/fp/identical.js | 1 + node_modules/lodash/fp/identity.js | 5 + node_modules/lodash/fp/inRange.js | 5 + node_modules/lodash/fp/includes.js | 5 + node_modules/lodash/fp/indexOf.js | 5 + node_modules/lodash/fp/init.js | 1 + node_modules/lodash/fp/initial.js | 5 + node_modules/lodash/fp/intersection.js | 5 + node_modules/lodash/fp/intersectionBy.js | 5 + node_modules/lodash/fp/intersectionWith.js | 5 + node_modules/lodash/fp/invert.js | 5 + node_modules/lodash/fp/invertBy.js | 5 + node_modules/lodash/fp/invertObj.js | 1 + node_modules/lodash/fp/invoke.js | 5 + node_modules/lodash/fp/invokeArgs.js | 5 + node_modules/lodash/fp/invokeArgsMap.js | 5 + node_modules/lodash/fp/invokeMap.js | 5 + node_modules/lodash/fp/isArguments.js | 5 + node_modules/lodash/fp/isArray.js | 5 + node_modules/lodash/fp/isArrayBuffer.js | 5 + node_modules/lodash/fp/isArrayLike.js | 5 + node_modules/lodash/fp/isArrayLikeObject.js | 5 + node_modules/lodash/fp/isBoolean.js | 5 + node_modules/lodash/fp/isBuffer.js | 5 + node_modules/lodash/fp/isDate.js | 5 + node_modules/lodash/fp/isElement.js | 5 + node_modules/lodash/fp/isEmpty.js | 5 + node_modules/lodash/fp/isEqual.js | 5 + node_modules/lodash/fp/isEqualWith.js | 5 + node_modules/lodash/fp/isError.js | 5 + node_modules/lodash/fp/isFinite.js | 5 + node_modules/lodash/fp/isFunction.js | 5 + node_modules/lodash/fp/isInteger.js | 5 + node_modules/lodash/fp/isLength.js | 5 + node_modules/lodash/fp/isMap.js | 5 + node_modules/lodash/fp/isMatch.js | 5 + node_modules/lodash/fp/isMatchWith.js | 5 + node_modules/lodash/fp/isNaN.js | 5 + node_modules/lodash/fp/isNative.js | 5 + node_modules/lodash/fp/isNil.js | 5 + node_modules/lodash/fp/isNull.js | 5 + node_modules/lodash/fp/isNumber.js | 5 + node_modules/lodash/fp/isObject.js | 5 + node_modules/lodash/fp/isObjectLike.js | 5 + node_modules/lodash/fp/isPlainObject.js | 5 + node_modules/lodash/fp/isRegExp.js | 5 + node_modules/lodash/fp/isSafeInteger.js | 5 + node_modules/lodash/fp/isSet.js | 5 + node_modules/lodash/fp/isString.js | 5 + node_modules/lodash/fp/isSymbol.js | 5 + node_modules/lodash/fp/isTypedArray.js | 5 + node_modules/lodash/fp/isUndefined.js | 5 + node_modules/lodash/fp/isWeakMap.js | 5 + node_modules/lodash/fp/isWeakSet.js | 5 + node_modules/lodash/fp/iteratee.js | 5 + node_modules/lodash/fp/join.js | 5 + node_modules/lodash/fp/juxt.js | 1 + node_modules/lodash/fp/kebabCase.js | 5 + node_modules/lodash/fp/keyBy.js | 5 + node_modules/lodash/fp/keys.js | 5 + node_modules/lodash/fp/keysIn.js | 5 + node_modules/lodash/fp/lang.js | 2 + node_modules/lodash/fp/last.js | 5 + node_modules/lodash/fp/lastIndexOf.js | 5 + node_modules/lodash/fp/lowerCase.js | 5 + node_modules/lodash/fp/lowerFirst.js | 5 + node_modules/lodash/fp/lt.js | 5 + node_modules/lodash/fp/lte.js | 5 + node_modules/lodash/fp/map.js | 5 + node_modules/lodash/fp/mapKeys.js | 5 + node_modules/lodash/fp/mapValues.js | 5 + node_modules/lodash/fp/matches.js | 5 + node_modules/lodash/fp/matchesProperty.js | 5 + node_modules/lodash/fp/math.js | 2 + node_modules/lodash/fp/max.js | 5 + node_modules/lodash/fp/maxBy.js | 5 + node_modules/lodash/fp/mean.js | 5 + node_modules/lodash/fp/meanBy.js | 5 + node_modules/lodash/fp/memoize.js | 5 + node_modules/lodash/fp/merge.js | 5 + node_modules/lodash/fp/mergeWith.js | 5 + node_modules/lodash/fp/method.js | 5 + node_modules/lodash/fp/methodOf.js | 5 + node_modules/lodash/fp/min.js | 5 + node_modules/lodash/fp/minBy.js | 5 + node_modules/lodash/fp/mixin.js | 5 + node_modules/lodash/fp/multiply.js | 5 + node_modules/lodash/fp/nAry.js | 1 + node_modules/lodash/fp/negate.js | 5 + node_modules/lodash/fp/next.js | 5 + node_modules/lodash/fp/noop.js | 5 + node_modules/lodash/fp/now.js | 5 + node_modules/lodash/fp/nth.js | 5 + node_modules/lodash/fp/nthArg.js | 5 + node_modules/lodash/fp/number.js | 2 + node_modules/lodash/fp/object.js | 2 + node_modules/lodash/fp/omit.js | 5 + node_modules/lodash/fp/omitAll.js | 1 + node_modules/lodash/fp/omitBy.js | 5 + node_modules/lodash/fp/once.js | 5 + node_modules/lodash/fp/orderBy.js | 5 + node_modules/lodash/fp/over.js | 5 + node_modules/lodash/fp/overArgs.js | 5 + node_modules/lodash/fp/overEvery.js | 5 + node_modules/lodash/fp/overSome.js | 5 + node_modules/lodash/fp/pad.js | 5 + node_modules/lodash/fp/padChars.js | 5 + node_modules/lodash/fp/padCharsEnd.js | 5 + node_modules/lodash/fp/padCharsStart.js | 5 + node_modules/lodash/fp/padEnd.js | 5 + node_modules/lodash/fp/padStart.js | 5 + node_modules/lodash/fp/parseInt.js | 5 + node_modules/lodash/fp/partial.js | 5 + node_modules/lodash/fp/partialRight.js | 5 + node_modules/lodash/fp/partition.js | 5 + node_modules/lodash/fp/path.js | 1 + node_modules/lodash/fp/pathEq.js | 1 + node_modules/lodash/fp/pathOr.js | 1 + node_modules/lodash/fp/paths.js | 1 + node_modules/lodash/fp/pick.js | 5 + node_modules/lodash/fp/pickAll.js | 1 + node_modules/lodash/fp/pickBy.js | 5 + node_modules/lodash/fp/pipe.js | 1 + node_modules/lodash/fp/placeholder.js | 6 + node_modules/lodash/fp/plant.js | 5 + node_modules/lodash/fp/pluck.js | 1 + node_modules/lodash/fp/prop.js | 1 + node_modules/lodash/fp/propEq.js | 1 + node_modules/lodash/fp/propOr.js | 1 + node_modules/lodash/fp/property.js | 5 + node_modules/lodash/fp/propertyOf.js | 5 + node_modules/lodash/fp/props.js | 1 + node_modules/lodash/fp/pull.js | 5 + node_modules/lodash/fp/pullAll.js | 5 + node_modules/lodash/fp/pullAllBy.js | 5 + node_modules/lodash/fp/pullAllWith.js | 5 + node_modules/lodash/fp/pullAt.js | 5 + node_modules/lodash/fp/random.js | 5 + node_modules/lodash/fp/range.js | 5 + node_modules/lodash/fp/rangeRight.js | 5 + node_modules/lodash/fp/rearg.js | 5 + node_modules/lodash/fp/reduce.js | 5 + node_modules/lodash/fp/reduceRight.js | 5 + node_modules/lodash/fp/reject.js | 5 + node_modules/lodash/fp/remove.js | 5 + node_modules/lodash/fp/repeat.js | 5 + node_modules/lodash/fp/replace.js | 5 + node_modules/lodash/fp/rest.js | 5 + node_modules/lodash/fp/restFrom.js | 5 + node_modules/lodash/fp/result.js | 5 + node_modules/lodash/fp/reverse.js | 5 + node_modules/lodash/fp/round.js | 5 + node_modules/lodash/fp/sample.js | 5 + node_modules/lodash/fp/sampleSize.js | 5 + node_modules/lodash/fp/seq.js | 2 + node_modules/lodash/fp/set.js | 5 + node_modules/lodash/fp/setWith.js | 5 + node_modules/lodash/fp/shuffle.js | 5 + node_modules/lodash/fp/size.js | 5 + node_modules/lodash/fp/slice.js | 5 + node_modules/lodash/fp/snakeCase.js | 5 + node_modules/lodash/fp/some.js | 5 + node_modules/lodash/fp/sortBy.js | 5 + node_modules/lodash/fp/sortedIndex.js | 5 + node_modules/lodash/fp/sortedIndexBy.js | 5 + node_modules/lodash/fp/sortedIndexOf.js | 5 + node_modules/lodash/fp/sortedLastIndex.js | 5 + node_modules/lodash/fp/sortedLastIndexBy.js | 5 + node_modules/lodash/fp/sortedLastIndexOf.js | 5 + node_modules/lodash/fp/sortedUniq.js | 5 + node_modules/lodash/fp/sortedUniqBy.js | 5 + node_modules/lodash/fp/split.js | 5 + node_modules/lodash/fp/spread.js | 5 + node_modules/lodash/fp/spreadFrom.js | 5 + node_modules/lodash/fp/startCase.js | 5 + node_modules/lodash/fp/startsWith.js | 5 + node_modules/lodash/fp/string.js | 2 + node_modules/lodash/fp/subtract.js | 5 + node_modules/lodash/fp/sum.js | 5 + node_modules/lodash/fp/sumBy.js | 5 + node_modules/lodash/fp/tail.js | 5 + node_modules/lodash/fp/take.js | 5 + node_modules/lodash/fp/takeRight.js | 5 + node_modules/lodash/fp/takeRightWhile.js | 5 + node_modules/lodash/fp/takeWhile.js | 5 + node_modules/lodash/fp/tap.js | 5 + node_modules/lodash/fp/template.js | 5 + node_modules/lodash/fp/templateSettings.js | 5 + node_modules/lodash/fp/throttle.js | 5 + node_modules/lodash/fp/thru.js | 5 + node_modules/lodash/fp/times.js | 5 + node_modules/lodash/fp/toArray.js | 5 + node_modules/lodash/fp/toFinite.js | 5 + node_modules/lodash/fp/toInteger.js | 5 + node_modules/lodash/fp/toIterator.js | 5 + node_modules/lodash/fp/toJSON.js | 5 + node_modules/lodash/fp/toLength.js | 5 + node_modules/lodash/fp/toLower.js | 5 + node_modules/lodash/fp/toNumber.js | 5 + node_modules/lodash/fp/toPairs.js | 5 + node_modules/lodash/fp/toPairsIn.js | 5 + node_modules/lodash/fp/toPath.js | 5 + node_modules/lodash/fp/toPlainObject.js | 5 + node_modules/lodash/fp/toSafeInteger.js | 5 + node_modules/lodash/fp/toString.js | 5 + node_modules/lodash/fp/toUpper.js | 5 + node_modules/lodash/fp/transform.js | 5 + node_modules/lodash/fp/trim.js | 5 + node_modules/lodash/fp/trimChars.js | 5 + node_modules/lodash/fp/trimCharsEnd.js | 5 + node_modules/lodash/fp/trimCharsStart.js | 5 + node_modules/lodash/fp/trimEnd.js | 5 + node_modules/lodash/fp/trimStart.js | 5 + node_modules/lodash/fp/truncate.js | 5 + node_modules/lodash/fp/unapply.js | 1 + node_modules/lodash/fp/unary.js | 5 + node_modules/lodash/fp/unescape.js | 5 + node_modules/lodash/fp/union.js | 5 + node_modules/lodash/fp/unionBy.js | 5 + node_modules/lodash/fp/unionWith.js | 5 + node_modules/lodash/fp/uniq.js | 5 + node_modules/lodash/fp/uniqBy.js | 5 + node_modules/lodash/fp/uniqWith.js | 5 + node_modules/lodash/fp/uniqueId.js | 5 + node_modules/lodash/fp/unnest.js | 1 + node_modules/lodash/fp/unset.js | 5 + node_modules/lodash/fp/unzip.js | 5 + node_modules/lodash/fp/unzipWith.js | 5 + node_modules/lodash/fp/update.js | 5 + node_modules/lodash/fp/updateWith.js | 5 + node_modules/lodash/fp/upperCase.js | 5 + node_modules/lodash/fp/upperFirst.js | 5 + node_modules/lodash/fp/useWith.js | 1 + node_modules/lodash/fp/util.js | 2 + node_modules/lodash/fp/value.js | 5 + node_modules/lodash/fp/valueOf.js | 5 + node_modules/lodash/fp/values.js | 5 + node_modules/lodash/fp/valuesIn.js | 5 + node_modules/lodash/fp/whereEq.js | 1 + node_modules/lodash/fp/without.js | 5 + node_modules/lodash/fp/words.js | 5 + node_modules/lodash/fp/wrap.js | 5 + node_modules/lodash/fp/wrapperAt.js | 5 + node_modules/lodash/fp/wrapperChain.js | 5 + node_modules/lodash/fp/wrapperLodash.js | 5 + node_modules/lodash/fp/wrapperReverse.js | 5 + node_modules/lodash/fp/wrapperValue.js | 5 + node_modules/lodash/fp/xor.js | 5 + node_modules/lodash/fp/xorBy.js | 5 + node_modules/lodash/fp/xorWith.js | 5 + node_modules/lodash/fp/zip.js | 5 + node_modules/lodash/fp/zipObj.js | 1 + node_modules/lodash/fp/zipObject.js | 5 + node_modules/lodash/fp/zipObjectDeep.js | 5 + node_modules/lodash/fp/zipWith.js | 5 + node_modules/lodash/fromPairs.js | 28 + node_modules/lodash/function.js | 25 + node_modules/lodash/functions.js | 31 + node_modules/lodash/functionsIn.js | 31 + node_modules/lodash/get.js | 33 + node_modules/lodash/groupBy.js | 41 + node_modules/lodash/gt.js | 29 + node_modules/lodash/gte.js | 30 + node_modules/lodash/has.js | 35 + node_modules/lodash/hasIn.js | 34 + node_modules/lodash/head.js | 23 + node_modules/lodash/identity.js | 21 + node_modules/lodash/inRange.js | 54 + node_modules/lodash/includes.js | 53 + node_modules/lodash/index.js | 1 + node_modules/lodash/indexOf.js | 42 + node_modules/lodash/initial.js | 21 + node_modules/lodash/intersection.js | 30 + node_modules/lodash/intersectionBy.js | 45 + node_modules/lodash/intersectionWith.js | 42 + node_modules/lodash/invert.js | 27 + node_modules/lodash/invertBy.js | 45 + node_modules/lodash/invoke.js | 24 + node_modules/lodash/invokeMap.js | 44 + node_modules/lodash/isArguments.js | 46 + node_modules/lodash/isArray.js | 28 + node_modules/lodash/isArrayBuffer.js | 37 + node_modules/lodash/isArrayLike.js | 34 + node_modules/lodash/isArrayLikeObject.js | 33 + node_modules/lodash/isBoolean.js | 39 + node_modules/lodash/isBuffer.js | 49 + node_modules/lodash/isDate.js | 38 + node_modules/lodash/isElement.js | 26 + node_modules/lodash/isEmpty.js | 80 + node_modules/lodash/isEqual.js | 36 + node_modules/lodash/isEqualWith.js | 42 + node_modules/lodash/isError.js | 43 + node_modules/lodash/isFinite.js | 37 + node_modules/lodash/isFunction.js | 43 + node_modules/lodash/isInteger.js | 33 + node_modules/lodash/isLength.js | 36 + node_modules/lodash/isMap.js | 29 + node_modules/lodash/isMatch.js | 32 + node_modules/lodash/isMatchWith.js | 41 + node_modules/lodash/isNaN.js | 38 + node_modules/lodash/isNative.js | 56 + node_modules/lodash/isNil.js | 25 + node_modules/lodash/isNull.js | 22 + node_modules/lodash/isNumber.js | 48 + node_modules/lodash/isObject.js | 31 + node_modules/lodash/isObjectLike.js | 29 + node_modules/lodash/isPlainObject.js | 70 + node_modules/lodash/isRegExp.js | 38 + node_modules/lodash/isSafeInteger.js | 38 + node_modules/lodash/isSet.js | 29 + node_modules/lodash/isString.js | 40 + node_modules/lodash/isSymbol.js | 39 + node_modules/lodash/isTypedArray.js | 80 + node_modules/lodash/isUndefined.js | 22 + node_modules/lodash/isWeakMap.js | 29 + node_modules/lodash/isWeakSet.js | 38 + node_modules/lodash/iteratee.js | 50 + node_modules/lodash/join.js | 26 + node_modules/lodash/kebabCase.js | 28 + node_modules/lodash/keyBy.js | 36 + node_modules/lodash/keys.js | 56 + node_modules/lodash/keysIn.js | 55 + node_modules/lodash/lang.js | 57 + node_modules/lodash/last.js | 20 + node_modules/lodash/lastIndexOf.js | 54 + node_modules/lodash/lodash.js | 16242 ++ node_modules/lodash/lodash.min.js | 125 + node_modules/lodash/lowerCase.js | 27 + node_modules/lodash/lowerFirst.js | 22 + node_modules/lodash/lt.js | 29 + node_modules/lodash/lte.js | 30 + node_modules/lodash/map.js | 54 + node_modules/lodash/mapKeys.js | 36 + node_modules/lodash/mapValues.js | 43 + node_modules/lodash/matches.js | 32 + node_modules/lodash/matchesProperty.js | 32 + node_modules/lodash/math.js | 17 + node_modules/lodash/max.js | 29 + node_modules/lodash/maxBy.js | 35 + node_modules/lodash/mean.js | 22 + node_modules/lodash/meanBy.js | 32 + node_modules/lodash/memoize.js | 73 + node_modules/lodash/merge.js | 39 + node_modules/lodash/mergeWith.js | 46 + node_modules/lodash/method.js | 34 + node_modules/lodash/methodOf.js | 33 + node_modules/lodash/min.js | 29 + node_modules/lodash/minBy.js | 35 + node_modules/lodash/mixin.js | 74 + node_modules/lodash/multiply.js | 22 + node_modules/lodash/negate.js | 33 + node_modules/lodash/next.js | 35 + node_modules/lodash/noop.js | 20 + node_modules/lodash/now.js | 20 + node_modules/lodash/nth.js | 29 + node_modules/lodash/nthArg.js | 32 + node_modules/lodash/number.js | 5 + node_modules/lodash/object.js | 48 + node_modules/lodash/omit.js | 36 + node_modules/lodash/omitBy.js | 32 + node_modules/lodash/once.js | 25 + node_modules/lodash/orderBy.js | 47 + node_modules/lodash/over.js | 24 + node_modules/lodash/overArgs.js | 62 + node_modules/lodash/overEvery.js | 30 + node_modules/lodash/overSome.js | 30 + node_modules/lodash/package.json | 115 + node_modules/lodash/pad.js | 49 + node_modules/lodash/padEnd.js | 39 + node_modules/lodash/padStart.js | 39 + node_modules/lodash/parseInt.js | 49 + node_modules/lodash/partial.js | 50 + node_modules/lodash/partialRight.js | 49 + node_modules/lodash/partition.js | 44 + node_modules/lodash/pick.js | 28 + node_modules/lodash/pickBy.js | 27 + node_modules/lodash/plant.js | 48 + node_modules/lodash/property.js | 32 + node_modules/lodash/propertyOf.js | 30 + node_modules/lodash/pull.js | 29 + node_modules/lodash/pullAll.js | 29 + node_modules/lodash/pullAllBy.js | 34 + node_modules/lodash/pullAllWith.js | 32 + node_modules/lodash/pullAt.js | 46 + node_modules/lodash/random.js | 82 + node_modules/lodash/range.js | 46 + node_modules/lodash/rangeRight.js | 41 + node_modules/lodash/rearg.js | 34 + node_modules/lodash/reduce.js | 51 + node_modules/lodash/reduceRight.js | 36 + node_modules/lodash/reject.js | 49 + node_modules/lodash/remove.js | 54 + node_modules/lodash/repeat.js | 37 + node_modules/lodash/replace.js | 35 + node_modules/lodash/rest.js | 64 + node_modules/lodash/result.js | 57 + node_modules/lodash/reverse.js | 34 + node_modules/lodash/round.js | 26 + node_modules/lodash/sample.js | 26 + node_modules/lodash/sampleSize.js | 49 + node_modules/lodash/seq.js | 16 + node_modules/lodash/set.js | 35 + node_modules/lodash/setWith.js | 32 + node_modules/lodash/shuffle.js | 25 + node_modules/lodash/size.js | 50 + node_modules/lodash/slice.js | 37 + node_modules/lodash/snakeCase.js | 28 + node_modules/lodash/some.js | 52 + node_modules/lodash/sortBy.js | 59 + node_modules/lodash/sortedIndex.js | 27 + node_modules/lodash/sortedIndexBy.js | 34 + node_modules/lodash/sortedIndexOf.js | 31 + node_modules/lodash/sortedLastIndex.js | 25 + node_modules/lodash/sortedLastIndexBy.js | 29 + node_modules/lodash/sortedLastIndexOf.js | 31 + node_modules/lodash/sortedUniq.js | 24 + node_modules/lodash/sortedUniqBy.js | 26 + node_modules/lodash/split.js | 58 + node_modules/lodash/spread.js | 63 + node_modules/lodash/startCase.js | 29 + node_modules/lodash/startsWith.js | 35 + node_modules/lodash/string.js | 33 + node_modules/lodash/subtract.js | 22 + node_modules/lodash/sum.js | 24 + node_modules/lodash/sumBy.js | 34 + node_modules/lodash/tail.js | 21 + node_modules/lodash/take.js | 37 + node_modules/lodash/takeRight.js | 39 + node_modules/lodash/takeRightWhile.js | 46 + node_modules/lodash/takeWhile.js | 46 + node_modules/lodash/tap.js | 29 + node_modules/lodash/template.js | 237 + node_modules/lodash/templateSettings.js | 67 + node_modules/lodash/throttle.js | 66 + node_modules/lodash/thru.js | 28 + node_modules/lodash/times.js | 51 + node_modules/lodash/toArray.js | 58 + node_modules/lodash/toFinite.js | 42 + node_modules/lodash/toInteger.js | 36 + node_modules/lodash/toIterator.js | 23 + node_modules/lodash/toJSON.js | 1 + node_modules/lodash/toLength.js | 38 + node_modules/lodash/toLower.js | 28 + node_modules/lodash/toNumber.js | 67 + node_modules/lodash/toPairs.js | 30 + node_modules/lodash/toPairsIn.js | 30 + node_modules/lodash/toPath.js | 41 + node_modules/lodash/toPlainObject.js | 32 + node_modules/lodash/toSafeInteger.js | 35 + node_modules/lodash/toString.js | 28 + node_modules/lodash/toUpper.js | 28 + node_modules/lodash/transform.js | 62 + node_modules/lodash/trim.js | 49 + node_modules/lodash/trimEnd.js | 43 + node_modules/lodash/trimStart.js | 43 + node_modules/lodash/truncate.js | 111 + node_modules/lodash/unary.js | 22 + node_modules/lodash/unescape.js | 34 + node_modules/lodash/union.js | 26 + node_modules/lodash/unionBy.js | 39 + node_modules/lodash/unionWith.js | 35 + node_modules/lodash/uniq.js | 26 + node_modules/lodash/uniqBy.js | 32 + node_modules/lodash/uniqWith.js | 28 + node_modules/lodash/uniqueId.js | 28 + node_modules/lodash/unset.js | 34 + node_modules/lodash/unzip.js | 45 + node_modules/lodash/unzipWith.js | 39 + node_modules/lodash/update.js | 35 + node_modules/lodash/updateWith.js | 33 + node_modules/lodash/upperCase.js | 27 + node_modules/lodash/upperFirst.js | 22 + node_modules/lodash/util.js | 28 + node_modules/lodash/value.js | 1 + node_modules/lodash/valueOf.js | 1 + node_modules/lodash/values.js | 34 + node_modules/lodash/valuesIn.js | 32 + node_modules/lodash/without.js | 29 + node_modules/lodash/words.js | 89 + node_modules/lodash/wrap.js | 31 + node_modules/lodash/wrapperAt.js | 53 + node_modules/lodash/wrapperChain.js | 34 + node_modules/lodash/wrapperLodash.js | 145 + node_modules/lodash/wrapperReverse.js | 44 + node_modules/lodash/wrapperValue.js | 21 + node_modules/lodash/xor.js | 28 + node_modules/lodash/xorBy.js | 39 + node_modules/lodash/xorWith.js | 35 + node_modules/lodash/zip.js | 22 + node_modules/lodash/zipObject.js | 24 + node_modules/lodash/zipObjectDeep.js | 23 + node_modules/lodash/zipWith.js | 31 + node_modules/longest/LICENSE | 21 + node_modules/longest/README.md | 65 + node_modules/longest/index.js | 37 + node_modules/longest/package.json | 104 + node_modules/lru-cache/LICENSE | 15 + node_modules/lru-cache/README.md | 148 + node_modules/lru-cache/lib/lru-cache.js | 469 + node_modules/lru-cache/package.json | 103 + node_modules/lru-queue/.lint | 11 + node_modules/lru-queue/.npmignore | 4 + node_modules/lru-queue/.travis.yml | 9 + node_modules/lru-queue/CHANGES | 3 + node_modules/lru-queue/LICENCE | 19 + node_modules/lru-queue/README.md | 65 + node_modules/lru-queue/index.js | 48 + node_modules/lru-queue/package.json | 87 + node_modules/lru-queue/test/index.js | 29 + node_modules/map-cache/LICENSE | 21 + node_modules/map-cache/README.md | 145 + node_modules/map-cache/index.js | 100 + node_modules/map-cache/package.json | 126 + node_modules/media-typer/HISTORY.md | 22 + node_modules/media-typer/LICENSE | 22 + node_modules/media-typer/README.md | 81 + node_modules/media-typer/index.js | 270 + node_modules/media-typer/package.json | 92 + node_modules/memoizee/.lint | 25 + node_modules/memoizee/.npmignore | 4 + node_modules/memoizee/.testignore | 1 + node_modules/memoizee/.travis.yml | 25 + node_modules/memoizee/.vscode/settings.json | 3 + node_modules/memoizee/CHANGES | 122 + node_modules/memoizee/LICENSE | 21 + node_modules/memoizee/README.md | 427 + node_modules/memoizee/benchmark/fibonacci.js | 124 + node_modules/memoizee/ext/async.js | 149 + node_modules/memoizee/ext/dispose.js | 27 + node_modules/memoizee/ext/max-age.js | 87 + node_modules/memoizee/ext/max.js | 27 + node_modules/memoizee/ext/promise.js | 109 + node_modules/memoizee/ext/ref-counter.js | 40 + node_modules/memoizee/index.js | 36 + node_modules/memoizee/lib/configure-map.js | 159 + node_modules/memoizee/lib/methods.js | 28 + .../memoizee/lib/registered-extensions.js | 1 + node_modules/memoizee/lib/resolve-length.js | 15 + .../memoizee/lib/resolve-normalize.js | 17 + node_modules/memoizee/lib/resolve-resolve.js | 21 + node_modules/memoizee/lib/weak.js | 113 + node_modules/memoizee/methods-plain.js | 3 + node_modules/memoizee/methods.js | 3 + node_modules/memoizee/normalizers/get-1.js | 29 + .../memoizee/normalizers/get-fixed.js | 71 + .../normalizers/get-primitive-fixed.js | 12 + node_modules/memoizee/normalizers/get.js | 88 + .../memoizee/normalizers/primitive.js | 9 + node_modules/memoizee/package.json | 118 + node_modules/memoizee/plain.js | 39 + node_modules/memoizee/profile.js | 78 + node_modules/memoizee/test/ext/async.js | 277 + node_modules/memoizee/test/ext/dispose.js | 233 + node_modules/memoizee/test/ext/max-age.js | 618 + node_modules/memoizee/test/ext/max.js | 584 + node_modules/memoizee/test/ext/promise.js | 278 + node_modules/memoizee/test/ext/ref-counter.js | 292 + node_modules/memoizee/test/index.js | 1357 + .../memoizee/test/lib/configure-map.js | 94 + node_modules/memoizee/test/lib/methods.js | 36 + .../test/lib/registered-extensions.js | 6 + .../memoizee/test/lib/resolve-length.js | 10 + .../memoizee/test/lib/resolve-normalize.js | 7 + .../memoizee/test/lib/resolve-resolve.js | 5 + node_modules/memoizee/test/lib/weak.js | 39 + node_modules/memoizee/test/methods-plain.js | 34 + node_modules/memoizee/test/methods.js | 31 + .../memoizee/test/normalizers/get-1.js | 56 + .../memoizee/test/normalizers/get-fixed.js | 91 + .../test/normalizers/get-primitive-fixed.js | 43 + node_modules/memoizee/test/normalizers/get.js | 59 + .../memoizee/test/normalizers/primitive.js | 18 + node_modules/memoizee/test/plain.js | 29 + node_modules/memoizee/test/profile.js | 11 + node_modules/memoizee/test/weak-plain.js | 36 + node_modules/memoizee/test/weak.js | 33 + node_modules/memoizee/weak-plain.js | 3 + node_modules/memoizee/weak.js | 3 + node_modules/merge-descriptors/HISTORY.md | 21 + node_modules/merge-descriptors/LICENSE | 23 + node_modules/merge-descriptors/README.md | 48 + node_modules/merge-descriptors/index.js | 60 + node_modules/merge-descriptors/package.json | 172 + node_modules/methods/HISTORY.md | 29 + node_modules/methods/LICENSE | 24 + node_modules/methods/README.md | 51 + node_modules/methods/index.js | 69 + node_modules/methods/package.json | 122 + node_modules/micromatch/LICENSE | 21 + node_modules/micromatch/README.md | 689 + node_modules/micromatch/index.js | 431 + node_modules/micromatch/lib/chars.js | 67 + node_modules/micromatch/lib/expand.js | 304 + node_modules/micromatch/lib/glob.js | 193 + node_modules/micromatch/lib/utils.js | 149 + node_modules/micromatch/package.json | 188 + node_modules/mime-db/HISTORY.md | 412 + node_modules/mime-db/LICENSE | 22 + node_modules/mime-db/README.md | 82 + node_modules/mime-db/db.json | 6805 + node_modules/mime-db/index.js | 11 + node_modules/mime-db/package.json | 138 + node_modules/mime-types/HISTORY.md | 223 + node_modules/mime-types/LICENSE | 23 + node_modules/mime-types/README.md | 108 + node_modules/mime-types/index.js | 188 + node_modules/mime-types/package.json | 128 + node_modules/mime/.npmignore | 0 node_modules/mime/LICENSE | 19 + node_modules/mime/README.md | 90 + node_modules/mime/build/build.js | 11 + node_modules/mime/build/test.js | 57 + node_modules/mime/cli.js | 8 + node_modules/mime/mime.js | 108 + node_modules/mime/package.json | 106 + node_modules/mime/types.json | 1 + node_modules/minimatch/LICENSE | 15 + node_modules/minimatch/README.md | 216 + node_modules/minimatch/browser.js | 1159 + node_modules/minimatch/minimatch.js | 912 + node_modules/minimatch/package.json | 98 + node_modules/minimist/.travis.yml | 4 + node_modules/minimist/LICENSE | 18 + node_modules/minimist/example/parse.js | 2 + node_modules/minimist/index.js | 187 + node_modules/minimist/package.json | 101 + node_modules/minimist/readme.markdown | 73 + node_modules/minimist/test/dash.js | 24 + node_modules/minimist/test/default_bool.js | 20 + node_modules/minimist/test/dotted.js | 16 + node_modules/minimist/test/long.js | 31 + node_modules/minimist/test/parse.js | 318 + node_modules/minimist/test/parse_modified.js | 9 + node_modules/minimist/test/short.js | 67 + node_modules/minimist/test/whitespace.js | 8 + node_modules/mkdirp/.travis.yml | 8 + node_modules/mkdirp/LICENSE | 21 + node_modules/mkdirp/bin/cmd.js | 33 + node_modules/mkdirp/bin/usage.txt | 12 + node_modules/mkdirp/examples/pow.js | 6 + node_modules/mkdirp/index.js | 98 + node_modules/mkdirp/package.json | 93 + node_modules/mkdirp/readme.markdown | 100 + node_modules/mkdirp/test/chmod.js | 41 + node_modules/mkdirp/test/clobber.js | 38 + node_modules/mkdirp/test/mkdirp.js | 28 + node_modules/mkdirp/test/opts_fs.js | 29 + node_modules/mkdirp/test/opts_fs_sync.js | 27 + node_modules/mkdirp/test/perm.js | 32 + node_modules/mkdirp/test/perm_sync.js | 36 + node_modules/mkdirp/test/race.js | 37 + node_modules/mkdirp/test/rel.js | 32 + node_modules/mkdirp/test/return.js | 25 + node_modules/mkdirp/test/return_sync.js | 24 + node_modules/mkdirp/test/root.js | 19 + node_modules/mkdirp/test/sync.js | 32 + node_modules/mkdirp/test/umask.js | 28 + node_modules/mkdirp/test/umask_sync.js | 32 + node_modules/moment-timezone/.npmignore | 19 + node_modules/moment-timezone/LICENSE | 20 + node_modules/moment-timezone/README.md | 36 + .../moment-timezone-with-data-2012-2022.js | 1201 + ...moment-timezone-with-data-2012-2022.min.js | 7 + .../builds/moment-timezone-with-data.js | 1201 + .../builds/moment-timezone-with-data.min.js | 7 + .../builds/moment-timezone.min.js | 6 + node_modules/moment-timezone/changelog.md | 139 + node_modules/moment-timezone/composer.json | 43 + .../moment-timezone/data/meta/latest.json | 5102 + .../moment-timezone/data/packed/latest.json | 600 + .../moment-timezone/data/unpacked/latest.json | 125366 +++++++++++++++ node_modules/moment-timezone/index.js | 2 + .../moment-timezone/moment-timezone-utils.js | 316 + .../moment-timezone/moment-timezone.js | 601 + node_modules/moment-timezone/package.json | 128 + node_modules/moment/CHANGELOG.md | 766 + node_modules/moment/LICENSE | 22 + node_modules/moment/README.md | 58 + node_modules/moment/ender.js | 1 + node_modules/moment/locale/af.js | 73 + node_modules/moment/locale/ar-dz.js | 59 + node_modules/moment/locale/ar-kw.js | 59 + node_modules/moment/locale/ar-ly.js | 126 + node_modules/moment/locale/ar-ma.js | 60 + node_modules/moment/locale/ar-sa.js | 105 + node_modules/moment/locale/ar-tn.js | 59 + node_modules/moment/locale/ar.js | 142 + node_modules/moment/locale/az.js | 105 + node_modules/moment/locale/be.js | 134 + node_modules/moment/locale/bg.js | 90 + node_modules/moment/locale/bn.js | 119 + node_modules/moment/locale/bo.js | 119 + node_modules/moment/locale/br.js | 108 + node_modules/moment/locale/bs.js | 143 + node_modules/moment/locale/ca.js | 88 + node_modules/moment/locale/cs.js | 172 + node_modules/moment/locale/cv.js | 63 + node_modules/moment/locale/cy.js | 81 + node_modules/moment/locale/da.js | 60 + node_modules/moment/locale/de-at.js | 79 + node_modules/moment/locale/de-ch.js | 78 + node_modules/moment/locale/de.js | 78 + node_modules/moment/locale/dv.js | 100 + node_modules/moment/locale/el.js | 100 + node_modules/moment/locale/en-au.js | 67 + node_modules/moment/locale/en-ca.js | 63 + node_modules/moment/locale/en-gb.js | 67 + node_modules/moment/locale/en-ie.js | 67 + node_modules/moment/locale/en-nz.js | 67 + node_modules/moment/locale/eo.js | 73 + node_modules/moment/locale/es-do.js | 82 + node_modules/moment/locale/es.js | 83 + node_modules/moment/locale/et.js | 80 + node_modules/moment/locale/eu.js | 66 + node_modules/moment/locale/fa.js | 107 + node_modules/moment/locale/fi.js | 107 + node_modules/moment/locale/fo.js | 60 + node_modules/moment/locale/fr-ca.js | 74 + node_modules/moment/locale/fr-ch.js | 78 + node_modules/moment/locale/fr.js | 83 + node_modules/moment/locale/fy.js | 75 + node_modules/moment/locale/gd.js | 76 + node_modules/moment/locale/gl.js | 77 + node_modules/moment/locale/gom-latn.js | 122 + node_modules/moment/locale/he.js | 99 + node_modules/moment/locale/hi.js | 124 + node_modules/moment/locale/hr.js | 145 + node_modules/moment/locale/hu.js | 109 + node_modules/moment/locale/hy-am.js | 95 + node_modules/moment/locale/id.js | 83 + node_modules/moment/locale/is.js | 127 + node_modules/moment/locale/it.js | 70 + node_modules/moment/locale/ja.js | 80 + node_modules/moment/locale/jv.js | 83 + node_modules/moment/locale/ka.js | 89 + node_modules/moment/locale/kk.js | 87 + node_modules/moment/locale/km.js | 58 + node_modules/moment/locale/kn.js | 126 + node_modules/moment/locale/ko.js | 69 + node_modules/moment/locale/ky.js | 88 + node_modules/moment/locale/lb.js | 137 + node_modules/moment/locale/lo.js | 70 + node_modules/moment/locale/lt.js | 117 + node_modules/moment/locale/lv.js | 97 + node_modules/moment/locale/me.js | 111 + node_modules/moment/locale/mi.js | 64 + node_modules/moment/locale/mk.js | 90 + node_modules/moment/locale/ml.js | 81 + node_modules/moment/locale/mr.js | 159 + node_modules/moment/locale/ms-my.js | 83 + node_modules/moment/locale/ms.js | 82 + node_modules/moment/locale/my.js | 96 + node_modules/moment/locale/nb.js | 63 + node_modules/moment/locale/ne.js | 123 + node_modules/moment/locale/nl-be.js | 88 + node_modules/moment/locale/nl.js | 88 + node_modules/moment/locale/nn.js | 60 + node_modules/moment/locale/pa-in.js | 124 + node_modules/moment/locale/pl.js | 107 + node_modules/moment/locale/pt-br.js | 61 + node_modules/moment/locale/pt.js | 65 + node_modules/moment/locale/ro.js | 75 + node_modules/moment/locale/ru.js | 183 + node_modules/moment/locale/sd.js | 98 + node_modules/moment/locale/se.js | 61 + node_modules/moment/locale/si.js | 71 + node_modules/moment/locale/sk.js | 150 + node_modules/moment/locale/sl.js | 162 + node_modules/moment/locale/sq.js | 70 + node_modules/moment/locale/sr-cyrl.js | 110 + node_modules/moment/locale/sr.js | 110 + node_modules/moment/locale/ss.js | 89 + node_modules/moment/locale/sv.js | 69 + node_modules/moment/locale/sw.js | 59 + node_modules/moment/locale/ta.js | 130 + node_modules/moment/locale/te.js | 89 + node_modules/moment/locale/tet.js | 68 + node_modules/moment/locale/th.js | 67 + node_modules/moment/locale/tl-ph.js | 62 + node_modules/moment/locale/tlh.js | 120 + node_modules/moment/locale/tr.js | 90 + node_modules/moment/locale/tzl.js | 91 + node_modules/moment/locale/tzm-latn.js | 58 + node_modules/moment/locale/tzm.js | 58 + node_modules/moment/locale/uk.js | 151 + node_modules/moment/locale/ur.js | 99 + node_modules/moment/locale/uz-latn.js | 58 + node_modules/moment/locale/uz.js | 58 + node_modules/moment/locale/vi.js | 79 + node_modules/moment/locale/x-pseudo.js | 68 + node_modules/moment/locale/yo.js | 60 + node_modules/moment/locale/zh-cn.js | 111 + node_modules/moment/locale/zh-hk.js | 105 + node_modules/moment/locale/zh-tw.js | 104 + node_modules/moment/min/locales.js | 9252 ++ node_modules/moment/min/locales.min.js | 498 + .../moment/min/moment-with-locales.js | 13700 ++ .../moment/min/moment-with-locales.min.js | 505 + node_modules/moment/min/moment.min.js | 7 + node_modules/moment/moment.d.ts | 712 + node_modules/moment/moment.js | 4463 + node_modules/moment/package.js | 11 + node_modules/moment/package.json | 197 + .../moment/src/lib/create/check-overflow.js | 34 + .../moment/src/lib/create/date-from-array.js | 21 + .../moment/src/lib/create/from-anything.js | 110 + .../moment/src/lib/create/from-array.js | 140 + .../moment/src/lib/create/from-object.js | 16 + .../src/lib/create/from-string-and-array.js | 50 + .../src/lib/create/from-string-and-format.js | 113 + .../moment/src/lib/create/from-string.js | 202 + node_modules/moment/src/lib/create/local.js | 5 + .../moment/src/lib/create/parsing-flags.js | 26 + node_modules/moment/src/lib/create/utc.js | 5 + node_modules/moment/src/lib/create/valid.js | 49 + node_modules/moment/src/lib/duration/abs.js | 18 + .../moment/src/lib/duration/add-subtract.js | 21 + node_modules/moment/src/lib/duration/as.js | 61 + .../moment/src/lib/duration/bubble.js | 61 + .../moment/src/lib/duration/constructor.js | 44 + .../moment/src/lib/duration/create.js | 122 + .../moment/src/lib/duration/duration.js | 16 + node_modules/moment/src/lib/duration/get.js | 25 + .../moment/src/lib/duration/humanize.js | 85 + .../moment/src/lib/duration/iso-string.js | 56 + .../moment/src/lib/duration/prototype.js | 50 + node_modules/moment/src/lib/duration/valid.js | 35 + node_modules/moment/src/lib/format/format.js | 92 + .../moment/src/lib/locale/base-config.js | 44 + .../moment/src/lib/locale/calendar.js | 15 + .../moment/src/lib/locale/constructor.js | 5 + node_modules/moment/src/lib/locale/en.js | 15 + node_modules/moment/src/lib/locale/formats.js | 23 + node_modules/moment/src/lib/locale/invalid.js | 5 + node_modules/moment/src/lib/locale/lists.js | 93 + node_modules/moment/src/lib/locale/locale.js | 39 + node_modules/moment/src/lib/locale/locales.js | 186 + node_modules/moment/src/lib/locale/ordinal.js | 7 + .../moment/src/lib/locale/pre-post-format.js | 3 + .../moment/src/lib/locale/prototype.js | 69 + .../moment/src/lib/locale/relative.js | 30 + node_modules/moment/src/lib/locale/set.js | 49 + .../moment/src/lib/moment/add-subtract.js | 55 + .../moment/src/lib/moment/calendar.js | 26 + node_modules/moment/src/lib/moment/clone.js | 5 + node_modules/moment/src/lib/moment/compare.js | 59 + .../moment/src/lib/moment/constructor.js | 77 + .../moment/src/lib/moment/creation-data.js | 9 + node_modules/moment/src/lib/moment/diff.js | 62 + node_modules/moment/src/lib/moment/format.js | 57 + node_modules/moment/src/lib/moment/from.js | 17 + node_modules/moment/src/lib/moment/get-set.js | 55 + node_modules/moment/src/lib/moment/locale.js | 34 + node_modules/moment/src/lib/moment/min-max.js | 63 + node_modules/moment/src/lib/moment/moment.js | 28 + node_modules/moment/src/lib/moment/now.js | 3 + .../moment/src/lib/moment/prototype.js | 150 + .../moment/src/lib/moment/start-end-of.js | 59 + node_modules/moment/src/lib/moment/to-type.js | 34 + node_modules/moment/src/lib/moment/to.js | 17 + node_modules/moment/src/lib/moment/valid.js | 15 + node_modules/moment/src/lib/parse/regex.js | 54 + node_modules/moment/src/lib/parse/token.js | 33 + node_modules/moment/src/lib/units/aliases.js | 30 + .../moment/src/lib/units/constants.js | 9 + .../moment/src/lib/units/day-of-month.js | 39 + .../moment/src/lib/units/day-of-week.js | 364 + .../moment/src/lib/units/day-of-year.js | 36 + node_modules/moment/src/lib/units/hour.js | 144 + .../moment/src/lib/units/millisecond.js | 69 + node_modules/moment/src/lib/units/minute.js | 29 + node_modules/moment/src/lib/units/month.js | 283 + node_modules/moment/src/lib/units/offset.js | 235 + .../moment/src/lib/units/priorities.js | 16 + node_modules/moment/src/lib/units/quarter.js | 32 + node_modules/moment/src/lib/units/second.js | 29 + .../moment/src/lib/units/timestamp.js | 20 + node_modules/moment/src/lib/units/timezone.js | 16 + node_modules/moment/src/lib/units/units.js | 20 + .../src/lib/units/week-calendar-utils.js | 65 + .../moment/src/lib/units/week-year.js | 107 + node_modules/moment/src/lib/units/week.js | 67 + node_modules/moment/src/lib/units/year.js | 75 + node_modules/moment/src/lib/utils/abs-ceil.js | 7 + .../moment/src/lib/utils/abs-floor.js | 8 + .../moment/src/lib/utils/abs-round.js | 7 + .../moment/src/lib/utils/compare-arrays.js | 16 + node_modules/moment/src/lib/utils/defaults.js | 10 + .../moment/src/lib/utils/deprecate.js | 55 + node_modules/moment/src/lib/utils/extend.js | 19 + .../moment/src/lib/utils/has-own-prop.js | 3 + node_modules/moment/src/lib/utils/hooks.js | 13 + node_modules/moment/src/lib/utils/index-of.js | 18 + node_modules/moment/src/lib/utils/is-array.js | 3 + node_modules/moment/src/lib/utils/is-date.js | 3 + .../moment/src/lib/utils/is-function.js | 3 + .../moment/src/lib/utils/is-number.js | 3 + .../moment/src/lib/utils/is-object-empty.js | 8 + .../moment/src/lib/utils/is-object.js | 5 + .../moment/src/lib/utils/is-undefined.js | 3 + node_modules/moment/src/lib/utils/keys.js | 19 + node_modules/moment/src/lib/utils/map.js | 7 + node_modules/moment/src/lib/utils/some.js | 19 + node_modules/moment/src/lib/utils/to-int.js | 12 + .../moment/src/lib/utils/zero-fill.js | 7 + node_modules/moment/src/locale/af.js | 63 + node_modules/moment/src/locale/ar-dz.js | 50 + node_modules/moment/src/locale/ar-kw.js | 49 + node_modules/moment/src/locale/ar-ly.js | 112 + node_modules/moment/src/locale/ar-ma.js | 51 + node_modules/moment/src/locale/ar-sa.js | 95 + node_modules/moment/src/locale/ar-tn.js | 50 + node_modules/moment/src/locale/ar.js | 128 + node_modules/moment/src/locale/az.js | 96 + node_modules/moment/src/locale/be.js | 125 + node_modules/moment/src/locale/bg.js | 81 + node_modules/moment/src/locale/bn.js | 109 + node_modules/moment/src/locale/bo.js | 110 + node_modules/moment/src/locale/br.js | 99 + node_modules/moment/src/locale/bs.js | 133 + node_modules/moment/src/locale/ca.js | 79 + node_modules/moment/src/locale/cs.js | 163 + node_modules/moment/src/locale/cv.js | 53 + node_modules/moment/src/locale/cy.js | 72 + node_modules/moment/src/locale/da.js | 50 + node_modules/moment/src/locale/de-at.js | 69 + node_modules/moment/src/locale/de-ch.js | 68 + node_modules/moment/src/locale/de.js | 68 + node_modules/moment/src/locale/dv.js | 89 + node_modules/moment/src/locale/el.js | 88 + node_modules/moment/src/locale/en-au.js | 58 + node_modules/moment/src/locale/en-ca.js | 53 + node_modules/moment/src/locale/en-gb.js | 58 + node_modules/moment/src/locale/en-ie.js | 58 + node_modules/moment/src/locale/en-nz.js | 57 + node_modules/moment/src/locale/eo.js | 64 + node_modules/moment/src/locale/es-do.js | 73 + node_modules/moment/src/locale/es.js | 74 + node_modules/moment/src/locale/et.js | 71 + node_modules/moment/src/locale/eu.js | 57 + node_modules/moment/src/locale/fa.js | 97 + node_modules/moment/src/locale/fi.js | 98 + node_modules/moment/src/locale/fo.js | 51 + node_modules/moment/src/locale/fr-ca.js | 65 + node_modules/moment/src/locale/fr-ch.js | 69 + node_modules/moment/src/locale/fr.js | 74 + node_modules/moment/src/locale/fy.js | 66 + node_modules/moment/src/locale/gd.js | 67 + node_modules/moment/src/locale/gl.js | 68 + node_modules/moment/src/locale/gom-latn.js | 112 + node_modules/moment/src/locale/he.js | 90 + node_modules/moment/src/locale/hi.js | 115 + node_modules/moment/src/locale/hr.js | 135 + node_modules/moment/src/locale/hu.js | 100 + node_modules/moment/src/locale/hy-am.js | 86 + node_modules/moment/src/locale/id.js | 74 + node_modules/moment/src/locale/is.js | 118 + node_modules/moment/src/locale/it.js | 61 + node_modules/moment/src/locale/ja.js | 71 + node_modules/moment/src/locale/jv.js | 73 + node_modules/moment/src/locale/ka.js | 80 + node_modules/moment/src/locale/kk.js | 77 + node_modules/moment/src/locale/km.js | 49 + node_modules/moment/src/locale/kn.js | 116 + node_modules/moment/src/locale/ko.js | 60 + node_modules/moment/src/locale/ky.js | 78 + node_modules/moment/src/locale/lb.js | 128 + node_modules/moment/src/locale/lo.js | 61 + node_modules/moment/src/locale/lt.js | 108 + node_modules/moment/src/locale/lv.js | 88 + node_modules/moment/src/locale/me.js | 101 + node_modules/moment/src/locale/mi.js | 54 + node_modules/moment/src/locale/mk.js | 81 + node_modules/moment/src/locale/ml.js | 72 + node_modules/moment/src/locale/mr.js | 150 + node_modules/moment/src/locale/ms-my.js | 74 + node_modules/moment/src/locale/ms.js | 73 + node_modules/moment/src/locale/my.js | 86 + node_modules/moment/src/locale/nb.js | 54 + node_modules/moment/src/locale/ne.js | 114 + node_modules/moment/src/locale/nl-be.js | 79 + node_modules/moment/src/locale/nl.js | 79 + node_modules/moment/src/locale/nn.js | 51 + node_modules/moment/src/locale/pa-in.js | 115 + node_modules/moment/src/locale/pl.js | 97 + node_modules/moment/src/locale/pt-br.js | 52 + node_modules/moment/src/locale/pt.js | 56 + node_modules/moment/src/locale/ro.js | 66 + node_modules/moment/src/locale/ru.js | 173 + node_modules/moment/src/locale/sd.js | 88 + node_modules/moment/src/locale/se.js | 51 + node_modules/moment/src/locale/si.js | 61 + node_modules/moment/src/locale/sk.js | 141 + node_modules/moment/src/locale/sl.js | 152 + node_modules/moment/src/locale/sq.js | 61 + node_modules/moment/src/locale/sr-cyrl.js | 100 + node_modules/moment/src/locale/sr.js | 100 + node_modules/moment/src/locale/ss.js | 80 + node_modules/moment/src/locale/sv.js | 60 + node_modules/moment/src/locale/sw.js | 50 + node_modules/moment/src/locale/ta.js | 120 + node_modules/moment/src/locale/te.js | 79 + node_modules/moment/src/locale/tet.js | 58 + node_modules/moment/src/locale/th.js | 57 + node_modules/moment/src/locale/tl-ph.js | 53 + node_modules/moment/src/locale/tlh.js | 110 + node_modules/moment/src/locale/tr.js | 81 + node_modules/moment/src/locale/tzl.js | 82 + node_modules/moment/src/locale/tzm-latn.js | 49 + node_modules/moment/src/locale/tzm.js | 49 + node_modules/moment/src/locale/uk.js | 142 + node_modules/moment/src/locale/ur.js | 89 + node_modules/moment/src/locale/uz-latn.js | 49 + node_modules/moment/src/locale/uz.js | 49 + node_modules/moment/src/locale/vi.js | 70 + node_modules/moment/src/locale/x-pseudo.js | 58 + node_modules/moment/src/locale/yo.js | 50 + node_modules/moment/src/locale/zh-cn.js | 102 + node_modules/moment/src/locale/zh-hk.js | 95 + node_modules/moment/src/locale/zh-tw.js | 94 + node_modules/moment/src/moment.js | 82 + node_modules/morgan/HISTORY.md | 158 + node_modules/morgan/LICENSE | 23 + node_modules/morgan/README.md | 324 + node_modules/morgan/index.js | 501 + .../morgan/node_modules/debug/.jshintrc | 3 + .../morgan/node_modules/debug/.npmignore | 6 + .../morgan/node_modules/debug/History.md | 195 + .../morgan/node_modules/debug/Makefile | 36 + .../morgan/node_modules/debug/Readme.md | 188 + .../morgan/node_modules/debug/bower.json | 28 + .../morgan/node_modules/debug/browser.js | 168 + .../morgan/node_modules/debug/component.json | 19 + .../morgan/node_modules/debug/debug.js | 197 + .../morgan/node_modules/debug/node.js | 209 + .../morgan/node_modules/debug/package.json | 106 + .../morgan/node_modules/ms/.npmignore | 5 + .../morgan/node_modules/ms/History.md | 66 + node_modules/morgan/node_modules/ms/LICENSE | 20 + node_modules/morgan/node_modules/ms/README.md | 35 + node_modules/morgan/node_modules/ms/index.js | 125 + .../morgan/node_modules/ms/package.json | 82 + node_modules/morgan/package.json | 131 + node_modules/ms/LICENSE.md | 21 + node_modules/ms/README.md | 52 + node_modules/ms/index.js | 149 + node_modules/ms/package.json | 110 + node_modules/multipipe/.npmignore | 1 + node_modules/multipipe/.travis.yml | 3 + node_modules/multipipe/History.md | 25 + node_modules/multipipe/Makefile | 10 + node_modules/multipipe/Readme.md | 102 + node_modules/multipipe/index.js | 72 + node_modules/multipipe/package.json | 79 + node_modules/multipipe/test/multipipe.js | 141 + node_modules/natives/README.md | 64 + node_modules/natives/index.js | 115 + node_modules/natives/package.json | 90 + node_modules/negotiator/HISTORY.md | 98 + node_modules/negotiator/LICENSE | 24 + node_modules/negotiator/README.md | 203 + node_modules/negotiator/index.js | 124 + node_modules/negotiator/lib/charset.js | 169 + node_modules/negotiator/lib/encoding.js | 184 + node_modules/negotiator/lib/language.js | 179 + node_modules/negotiator/lib/mediaType.js | 294 + node_modules/negotiator/package.json | 125 + node_modules/next-tick/.lint | 14 + node_modules/next-tick/.npmignore | 4 + node_modules/next-tick/.travis.yml | 16 + node_modules/next-tick/CHANGES | 24 + node_modules/next-tick/LICENSE | 21 + node_modules/next-tick/README.md | 24 + node_modules/next-tick/index.js | 71 + node_modules/next-tick/package.json | 97 + node_modules/next-tick/test/index.js | 22 + node_modules/nopt/.npmignore | 1 + node_modules/nopt/.travis.yml | 9 + node_modules/nopt/LICENSE | 15 + node_modules/nopt/README.md | 211 + node_modules/nopt/bin/nopt.js | 54 + node_modules/nopt/examples/my-program.js | 30 + node_modules/nopt/lib/nopt.js | 415 + node_modules/nopt/package.json | 96 + node_modules/nopt/test/basic.js | 273 + node_modules/normalize-package-data/AUTHORS | 4 + node_modules/normalize-package-data/LICENSE | 30 + node_modules/normalize-package-data/README.md | 106 + .../lib/extract_description.js | 14 + .../normalize-package-data/lib/fixer.js | 418 + .../lib/make_warning.js | 23 + .../normalize-package-data/lib/normalize.js | 39 + .../normalize-package-data/lib/safe_format.js | 9 + .../normalize-package-data/lib/typos.json | 25 + .../lib/warning_messages.json | 31 + .../normalize-package-data/package.json | 128 + node_modules/normalize-path/LICENSE | 21 + node_modules/normalize-path/README.md | 92 + node_modules/normalize-path/index.js | 19 + node_modules/normalize-path/package.json | 156 + node_modules/number-is-nan/index.js | 4 + node_modules/number-is-nan/license | 21 + node_modules/number-is-nan/package.json | 103 + node_modules/number-is-nan/readme.md | 28 + node_modules/object-assign/index.js | 83 + node_modules/object-assign/license | 21 + node_modules/object-assign/package.json | 114 + node_modules/object-assign/readme.md | 56 + node_modules/object.omit/LICENSE | 21 + node_modules/object.omit/README.md | 118 + node_modules/object.omit/index.js | 40 + node_modules/object.omit/package.json | 137 + node_modules/on-finished/HISTORY.md | 88 + node_modules/on-finished/LICENSE | 23 + node_modules/on-finished/README.md | 154 + node_modules/on-finished/index.js | 196 + node_modules/on-finished/package.json | 108 + node_modules/on-headers/HISTORY.md | 16 + node_modules/on-headers/LICENSE | 22 + node_modules/on-headers/README.md | 76 + node_modules/on-headers/index.js | 93 + node_modules/on-headers/package.json | 103 + node_modules/once/LICENSE | 15 + node_modules/once/README.md | 51 + node_modules/once/once.js | 21 + node_modules/once/package.json | 98 + node_modules/optimist/.travis.yml | 4 + node_modules/optimist/LICENSE | 21 + node_modules/optimist/example/bool.js | 10 + .../optimist/example/boolean_double.js | 7 + .../optimist/example/boolean_single.js | 7 + node_modules/optimist/example/default_hash.js | 8 + .../optimist/example/default_singles.js | 7 + node_modules/optimist/example/divide.js | 8 + node_modules/optimist/example/line_count.js | 20 + .../optimist/example/line_count_options.js | 29 + .../optimist/example/line_count_wrap.js | 29 + node_modules/optimist/example/nonopt.js | 4 + node_modules/optimist/example/reflect.js | 2 + node_modules/optimist/example/short.js | 3 + node_modules/optimist/example/string.js | 11 + .../optimist/example/usage-options.js | 19 + node_modules/optimist/example/xup.js | 10 + node_modules/optimist/index.js | 478 + node_modules/optimist/package.json | 96 + node_modules/optimist/readme.markdown | 487 + node_modules/optimist/test/_.js | 71 + node_modules/optimist/test/_/argv.js | 2 + node_modules/optimist/test/_/bin.js | 3 + node_modules/optimist/test/parse.js | 446 + node_modules/optimist/test/usage.js | 292 + node_modules/orchestrator/.npmignore | 10 + node_modules/orchestrator/LICENSE | 20 + node_modules/orchestrator/README.md | 286 + node_modules/orchestrator/index.js | 304 + node_modules/orchestrator/lib/runTask.js | 66 + node_modules/orchestrator/package.json | 104 + node_modules/ordered-read-streams/.npmignore | 16 + node_modules/ordered-read-streams/.travis.yml | 4 + node_modules/ordered-read-streams/LICENSE | 20 + node_modules/ordered-read-streams/README.md | 65 + node_modules/ordered-read-streams/index.js | 87 + .../ordered-read-streams/package.json | 85 + .../ordered-read-streams/test/main.js | 160 + node_modules/os-homedir/index.js | 24 + node_modules/os-homedir/license | 21 + node_modules/os-homedir/package.json | 110 + node_modules/os-homedir/readme.md | 31 + node_modules/os-locale/index.js | 127 + node_modules/os-locale/license | 21 + node_modules/os-locale/package.json | 114 + node_modules/os-locale/readme.md | 47 + node_modules/packet-reader/.npmignore | 1 + node_modules/packet-reader/index.js | 57 + node_modules/packet-reader/package.json | 81 + node_modules/packet-reader/test/index.js | 135 + node_modules/parse-filepath/LICENSE | 21 + node_modules/parse-filepath/README.md | 111 + node_modules/parse-filepath/index.js | 90 + node_modules/parse-filepath/package.json | 149 + node_modules/parse-glob/LICENSE | 21 + node_modules/parse-glob/README.md | 115 + node_modules/parse-glob/index.js | 156 + node_modules/parse-glob/package.json | 124 + node_modules/parse-json/index.js | 35 + node_modules/parse-json/license | 21 + node_modules/parse-json/package.json | 109 + node_modules/parse-json/readme.md | 83 + node_modules/parse-json/vendor/parse.js | 752 + node_modules/parse-json/vendor/unicode.js | 71 + node_modules/parse-passwd/LICENSE | 21 + node_modules/parse-passwd/README.md | 86 + node_modules/parse-passwd/index.js | 56 + node_modules/parse-passwd/package.json | 122 + node_modules/parseurl/HISTORY.md | 47 + node_modules/parseurl/LICENSE | 24 + node_modules/parseurl/README.md | 120 + node_modules/parseurl/index.js | 138 + node_modules/parseurl/package.json | 125 + node_modules/path-exists/index.js | 24 + node_modules/path-exists/license | 21 + node_modules/path-exists/package.json | 103 + node_modules/path-exists/readme.md | 45 + node_modules/path-parse/.travis.yml | 9 + node_modules/path-parse/README.md | 44 + node_modules/path-parse/index.js | 93 + node_modules/path-parse/index.min.js | 1 + node_modules/path-parse/package.json | 92 + node_modules/path-parse/test.js | 77 + node_modules/path-parse/test.min.js | 1 + node_modules/path-root-regex/LICENSE | 21 + node_modules/path-root-regex/README.md | 53 + node_modules/path-root-regex/index.js | 13 + node_modules/path-root-regex/package.json | 132 + node_modules/path-root/LICENSE | 21 + node_modules/path-root/README.md | 94 + node_modules/path-root/index.js | 21 + node_modules/path-root/package.json | 124 + node_modules/path-to-regexp/History.md | 36 + node_modules/path-to-regexp/LICENSE | 21 + node_modules/path-to-regexp/Readme.md | 35 + node_modules/path-to-regexp/index.js | 129 + node_modules/path-to-regexp/package.json | 219 + node_modules/path-type/index.js | 29 + node_modules/path-type/license | 21 + node_modules/path-type/package.json | 115 + node_modules/path-type/readme.md | 42 + node_modules/pg-connection-string/.npmignore | 25 + node_modules/pg-connection-string/.travis.yml | 3 + node_modules/pg-connection-string/LICENSE | 21 + node_modules/pg-connection-string/README.md | 18 + node_modules/pg-connection-string/index.js | 62 + .../pg-connection-string/package.json | 88 + .../pg-connection-string/test/parse.js | 126 + node_modules/pg-pool/.npmignore | 2 + node_modules/pg-pool/.travis.yml | 19 + node_modules/pg-pool/Makefile | 14 + node_modules/pg-pool/README.md | 350 + node_modules/pg-pool/index.js | 174 + node_modules/pg-pool/package.json | 102 + node_modules/pg-pool/test/events.js | 71 + node_modules/pg-pool/test/index.js | 232 + node_modules/pg-pool/test/logging.js | 20 + node_modules/pg-pool/test/mocha.opts | 2 + node_modules/pg-types/.npmignore | 1 + node_modules/pg-types/.travis.yml | 6 + node_modules/pg-types/Makefile | 14 + node_modules/pg-types/README.md | 77 + node_modules/pg-types/index.js | 45 + node_modules/pg-types/lib/arrayParser.js | 11 + node_modules/pg-types/lib/binaryParsers.js | 254 + node_modules/pg-types/lib/textParsers.js | 181 + node_modules/pg-types/package.json | 98 + node_modules/pg-types/test/index.js | 24 + node_modules/pg-types/test/types.js | 415 + node_modules/pg/.jshintrc | 5 + node_modules/pg/.npmignore | 8 + node_modules/pg/.travis.yml | 44 + node_modules/pg/CHANGELOG.md | 232 + node_modules/pg/Makefile | 63 + node_modules/pg/README.md | 223 + node_modules/pg/lib/client.js | 354 + node_modules/pg/lib/connection-parameters.js | 101 + node_modules/pg/lib/connection.js | 670 + node_modules/pg/lib/defaults.js | 74 + node_modules/pg/lib/index.js | 114 + node_modules/pg/lib/native/index.js | 201 + node_modules/pg/lib/native/query.js | 138 + node_modules/pg/lib/native/result.js | 36 + node_modules/pg/lib/pool-factory.js | 18 + node_modules/pg/lib/query.js | 218 + node_modules/pg/lib/result.js | 115 + node_modules/pg/lib/type-overrides.js | 38 + node_modules/pg/lib/utils.js | 147 + node_modules/pg/package.json | 112 + node_modules/pgpass/.jshintrc | 7 + node_modules/pgpass/.npmignore | 6 + node_modules/pgpass/.travis.yml | 19 + node_modules/pgpass/README.md | 74 + node_modules/pgpass/coverage.json | 333 + node_modules/pgpass/lib/helper.js | 233 + node_modules/pgpass/lib/index.js | 23 + node_modules/pgpass/package.json | 105 + node_modules/pgpass/test/#1 de-escaping.js | 42 + node_modules/pgpass/test/#1 escaping.js | 31 + .../pgpass/test/#6 too many open files.js | 68 + node_modules/pgpass/test/_pgpass | 10 + node_modules/pgpass/test/helper.js | 285 + node_modules/pgpass/test/index.js | 52 + .../pgpass/test/integration/#1 escaping.js | 178 + node_modules/pify/index.js | 68 + node_modules/pify/license | 21 + node_modules/pify/package.json | 113 + node_modules/pify/readme.md | 119 + node_modules/pinkie-promise/index.js | 3 + node_modules/pinkie-promise/license | 21 + node_modules/pinkie-promise/package.json | 105 + node_modules/pinkie-promise/readme.md | 28 + node_modules/pinkie/index.js | 292 + node_modules/pinkie/license | 21 + node_modules/pinkie/package.json | 100 + node_modules/pinkie/readme.md | 83 + node_modules/postgres-array/index.js | 85 + node_modules/postgres-array/license | 21 + node_modules/postgres-array/package.json | 101 + node_modules/postgres-array/readme.md | 43 + node_modules/postgres-bytea/index.js | 31 + node_modules/postgres-bytea/license | 21 + node_modules/postgres-bytea/package.json | 97 + node_modules/postgres-bytea/readme.md | 34 + node_modules/postgres-date/index.js | 82 + node_modules/postgres-date/license | 21 + node_modules/postgres-date/package.json | 100 + node_modules/postgres-date/readme.md | 34 + node_modules/postgres-interval/index.js | 66 + node_modules/postgres-interval/license | 21 + node_modules/postgres-interval/package.json | 102 + node_modules/postgres-interval/readme.md | 40 + node_modules/preserve/.gitattributes | 14 + node_modules/preserve/.jshintrc | 24 + node_modules/preserve/.npmignore | 53 + node_modules/preserve/.travis.yml | 3 + node_modules/preserve/.verb.md | 59 + node_modules/preserve/LICENSE | 24 + node_modules/preserve/README.md | 90 + node_modules/preserve/index.js | 54 + node_modules/preserve/package.json | 104 + node_modules/preserve/test.js | 48 + node_modules/pretty-hrtime/.jshintignore | 1 + node_modules/pretty-hrtime/.npmignore | 10 + node_modules/pretty-hrtime/LICENSE | 20 + node_modules/pretty-hrtime/README.md | 57 + node_modules/pretty-hrtime/index.js | 80 + node_modules/pretty-hrtime/package.json | 95 + node_modules/process-nextick-args/.travis.yml | 12 + node_modules/process-nextick-args/index.js | 43 + node_modules/process-nextick-args/license.md | 19 + .../process-nextick-args/package.json | 83 + node_modules/process-nextick-args/readme.md | 18 + node_modules/process-nextick-args/test.js | 24 + node_modules/promise/.jshintrc | 5 + node_modules/promise/.npmignore | 6 + node_modules/promise/LICENSE | 19 + node_modules/promise/Readme.md | 221 + node_modules/promise/core.js | 5 + node_modules/promise/index.js | 6 + node_modules/promise/lib/core.js | 105 + node_modules/promise/lib/done.js | 14 + node_modules/promise/lib/es6-extensions.js | 108 + node_modules/promise/lib/node-extensions.js | 63 + node_modules/promise/package.json | 90 + node_modules/promise/polyfill-done.js | 12 + node_modules/promise/polyfill.js | 10 + node_modules/proto-list/LICENSE | 15 + node_modules/proto-list/README.md | 3 + node_modules/proto-list/package.json | 83 + node_modules/proto-list/proto-list.js | 88 + node_modules/proto-list/test/basic.js | 61 + node_modules/proxy-addr/HISTORY.md | 109 + node_modules/proxy-addr/LICENSE | 22 + node_modules/proxy-addr/README.md | 140 + node_modules/proxy-addr/index.js | 325 + node_modules/proxy-addr/package.json | 108 + node_modules/pseudomap/LICENSE | 15 + node_modules/pseudomap/README.md | 60 + node_modules/pseudomap/map.js | 9 + node_modules/pseudomap/package.json | 86 + node_modules/pseudomap/pseudomap.js | 113 + node_modules/pseudomap/test/basic.js | 86 + node_modules/qs/.eslintignore | 1 + node_modules/qs/.eslintrc | 19 + node_modules/qs/CHANGELOG.md | 130 + node_modules/qs/CONTRIBUTING.md | 1 + node_modules/qs/LICENSE | 28 + node_modules/qs/README.md | 376 + node_modules/qs/dist/qs.js | 486 + node_modules/qs/lib/index.js | 9 + node_modules/qs/lib/parse.js | 166 + node_modules/qs/lib/stringify.js | 137 + node_modules/qs/lib/utils.js | 164 + node_modules/qs/package.json | 120 + node_modules/qs/test/index.js | 5 + node_modules/qs/test/parse.js | 451 + node_modules/qs/test/stringify.js | 305 + node_modules/qs/test/utils.js | 9 + node_modules/randomatic/LICENSE | 21 + node_modules/randomatic/README.md | 152 + node_modules/randomatic/index.js | 83 + node_modules/randomatic/package.json | 141 + node_modules/range-parser/HISTORY.md | 51 + node_modules/range-parser/LICENSE | 23 + node_modules/range-parser/README.md | 75 + node_modules/range-parser/index.js | 158 + node_modules/range-parser/package.json | 134 + node_modules/raw-body/HISTORY.md | 220 + node_modules/raw-body/LICENSE | 22 + node_modules/raw-body/README.md | 145 + node_modules/raw-body/index.js | 320 + node_modules/raw-body/package.json | 125 + node_modules/read-pkg-up/index.js | 31 + node_modules/read-pkg-up/license | 21 + node_modules/read-pkg-up/package.json | 122 + node_modules/read-pkg-up/readme.md | 79 + node_modules/read-pkg/index.js | 48 + node_modules/read-pkg/license | 21 + node_modules/read-pkg/package.json | 105 + node_modules/read-pkg/readme.md | 79 + node_modules/readable-stream/.npmignore | 5 + node_modules/readable-stream/LICENSE | 18 + node_modules/readable-stream/README.md | 15 + node_modules/readable-stream/duplex.js | 1 + node_modules/readable-stream/float.patch | 923 + .../readable-stream/lib/_stream_duplex.js | 89 + .../lib/_stream_passthrough.js | 46 + .../readable-stream/lib/_stream_readable.js | 951 + .../readable-stream/lib/_stream_transform.js | 209 + .../readable-stream/lib/_stream_writable.js | 477 + .../node_modules/isarray/README.md | 54 + .../node_modules/isarray/build/build.js | 209 + .../node_modules/isarray/component.json | 19 + .../node_modules/isarray/index.js | 3 + .../node_modules/isarray/package.json | 86 + node_modules/readable-stream/package.json | 112 + node_modules/readable-stream/passthrough.js | 1 + node_modules/readable-stream/readable.js | 10 + node_modules/readable-stream/transform.js | 1 + node_modules/readable-stream/writable.js | 1 + node_modules/rechoir/.npmignore | 1 + node_modules/rechoir/.travis.yml | 24 + node_modules/rechoir/CHANGELOG | 38 + node_modules/rechoir/LICENSE | 22 + node_modules/rechoir/README.md | 42 + node_modules/rechoir/index.js | 59 + node_modules/rechoir/lib/extension.js | 11 + node_modules/rechoir/lib/normalize.js | 15 + node_modules/rechoir/lib/register.js | 15 + node_modules/rechoir/package.json | 148 + node_modules/redefine/.gitattributes | 1 + node_modules/redefine/.npmignore | 6 + node_modules/redefine/.travis.yml | 9 + node_modules/redefine/HOWTO.md | 307 + node_modules/redefine/LICENSE.txt | 19 + node_modules/redefine/README.md | 491 + node_modules/redefine/build/redefine.js | 2 + node_modules/redefine/build/redefine.max.js | 505 + node_modules/redefine/package.json | 111 + node_modules/redefine/template/license.after | 2 + node_modules/redefine/template/license.before | 1 + node_modules/regex-cache/LICENSE | 21 + node_modules/regex-cache/README.md | 160 + node_modules/regex-cache/index.js | 69 + node_modules/regex-cache/package.json | 131 + .../remove-trailing-separator/history.md | 9 + .../remove-trailing-separator/index.js | 13 + .../remove-trailing-separator/license | 3 + .../remove-trailing-separator/package.json | 100 + .../remove-trailing-separator/readme.md | 51 + node_modules/repeat-element/LICENSE | 21 + node_modules/repeat-element/README.md | 71 + node_modules/repeat-element/index.js | 18 + node_modules/repeat-element/package.json | 102 + node_modules/repeat-string/LICENSE | 21 + node_modules/repeat-string/README.md | 136 + node_modules/repeat-string/index.js | 70 + node_modules/repeat-string/package.json | 168 + node_modules/replace-ext/.npmignore | 6 + node_modules/replace-ext/.travis.yml | 8 + node_modules/replace-ext/LICENSE | 20 + node_modules/replace-ext/README.md | 44 + node_modules/replace-ext/index.js | 9 + node_modules/replace-ext/package.json | 97 + node_modules/replace-ext/test/main.js | 51 + node_modules/require-directory/.jshintrc | 67 + node_modules/require-directory/.npmignore | 1 + node_modules/require-directory/.travis.yml | 3 + node_modules/require-directory/LICENSE | 22 + .../require-directory/README.markdown | 184 + node_modules/require-directory/index.js | 86 + node_modules/require-directory/package.json | 101 + node_modules/require-main-filename/.npmignore | 3 + .../require-main-filename/.travis.yml | 8 + .../require-main-filename/LICENSE.txt | 14 + node_modules/require-main-filename/README.md | 26 + node_modules/require-main-filename/index.js | 18 + .../require-main-filename/package.json | 94 + node_modules/require-main-filename/test.js | 36 + node_modules/resolve-dir/LICENSE | 21 + node_modules/resolve-dir/README.md | 88 + node_modules/resolve-dir/index.js | 22 + node_modules/resolve-dir/package.json | 140 + node_modules/resolve/.eslintignore | 1 + node_modules/resolve/.eslintrc | 27 + node_modules/resolve/.npmignore | 1 + node_modules/resolve/.travis.yml | 176 + node_modules/resolve/LICENSE | 18 + node_modules/resolve/appveyor.yml | 44 + node_modules/resolve/example/async.js | 5 + node_modules/resolve/example/sync.js | 3 + node_modules/resolve/index.js | 8 + node_modules/resolve/lib/async.js | 203 + node_modules/resolve/lib/caller.js | 8 + node_modules/resolve/lib/core.js | 22 + node_modules/resolve/lib/core.json | 47 + .../resolve/lib/node-modules-paths.js | 35 + node_modules/resolve/lib/sync.js | 89 + node_modules/resolve/package.json | 111 + node_modules/resolve/readme.markdown | 148 + node_modules/resolve/test/core.js | 29 + node_modules/resolve/test/dotdot.js | 29 + node_modules/resolve/test/dotdot/abc/index.js | 2 + node_modules/resolve/test/dotdot/index.js | 1 + node_modules/resolve/test/faulty_basedir.js | 13 + node_modules/resolve/test/filter.js | 19 + node_modules/resolve/test/filter_sync.js | 16 + node_modules/resolve/test/mock.js | 143 + node_modules/resolve/test/mock_sync.js | 67 + node_modules/resolve/test/module_dir.js | 56 + .../test/module_dir/xmodules/aaa/index.js | 1 + .../test/module_dir/ymodules/aaa/index.js | 1 + .../test/module_dir/zmodules/bbb/main.js | 1 + .../test/module_dir/zmodules/bbb/package.json | 3 + .../resolve/test/node-modules-paths.js | 93 + node_modules/resolve/test/node_path.js | 49 + .../resolve/test/node_path/x/aaa/index.js | 1 + .../resolve/test/node_path/x/ccc/index.js | 1 + .../resolve/test/node_path/y/bbb/index.js | 1 + .../resolve/test/node_path/y/ccc/index.js | 1 + node_modules/resolve/test/nonstring.js | 9 + node_modules/resolve/test/pathfilter.js | 42 + .../resolve/test/pathfilter/deep_ref/main.js | 0 node_modules/resolve/test/precedence.js | 23 + node_modules/resolve/test/precedence/aaa.js | 1 + .../resolve/test/precedence/aaa/index.js | 1 + .../resolve/test/precedence/aaa/main.js | 1 + node_modules/resolve/test/precedence/bbb.js | 1 + .../resolve/test/precedence/bbb/main.js | 1 + node_modules/resolve/test/resolver.js | 327 + .../resolve/test/resolver/baz/doom.js | 0 .../resolve/test/resolver/baz/package.json | 3 + .../resolve/test/resolver/baz/quux.js | 1 + node_modules/resolve/test/resolver/cup.coffee | 1 + node_modules/resolve/test/resolver/foo.js | 1 + .../test/resolver/incorrect_main/index.js | 2 + .../test/resolver/incorrect_main/package.json | 3 + node_modules/resolve/test/resolver/mug.coffee | 0 node_modules/resolve/test/resolver/mug.js | 0 .../test/resolver/other_path/lib/other-lib.js | 0 .../resolve/test/resolver/other_path/root.js | 0 .../resolve/test/resolver/quux/foo/index.js | 1 + .../resolve/test/resolver/same_names/foo.js | 1 + .../test/resolver/same_names/foo/index.js | 1 + .../test/resolver/without_basedir/main.js | 5 + node_modules/resolve/test/resolver_sync.js | 253 + node_modules/resolve/test/subdirs.js | 13 + node_modules/retry-as-promised/.npmignore | 27 + node_modules/retry-as-promised/LICENSE | 23 + node_modules/retry-as-promised/README.md | 33 + node_modules/retry-as-promised/index.js | 88 + node_modules/retry-as-promised/package.json | 102 + .../retry-as-promised/test/bluebird.test.js | 186 + node_modules/right-align/LICENSE | 21 + node_modules/right-align/README.md | 77 + node_modules/right-align/index.js | 16 + node_modules/right-align/package.json | 101 + node_modules/semver/.npmignore | 1 + node_modules/semver/LICENSE | 27 + node_modules/semver/Makefile | 24 + node_modules/semver/README.md | 303 + node_modules/semver/bin/semver | 133 + node_modules/semver/foot.js.txt | 6 + node_modules/semver/head.js.txt | 2 + node_modules/semver/package.json | 91 + node_modules/semver/semver.browser.js | 1187 + node_modules/semver/semver.browser.js.gz | Bin 0 -> 7938 bytes node_modules/semver/semver.js | 1191 + node_modules/semver/semver.min.js | 1 + node_modules/semver/semver.min.js.gz | Bin 0 -> 3756 bytes node_modules/semver/test/amd.js | 15 + node_modules/semver/test/big-numbers.js | 24 + node_modules/semver/test/clean.js | 29 + node_modules/semver/test/gtr.js | 173 + node_modules/semver/test/index.js | 684 + node_modules/semver/test/ltr.js | 181 + node_modules/semver/test/major-minor-patch.js | 72 + node_modules/semver/test/no-module.js | 19 + node_modules/send/HISTORY.md | 356 + node_modules/send/LICENSE | 23 + node_modules/send/README.md | 251 + node_modules/send/index.js | 948 + .../send/node_modules/debug/.jshintrc | 3 + .../send/node_modules/debug/.npmignore | 6 + .../send/node_modules/debug/History.md | 195 + node_modules/send/node_modules/debug/Makefile | 36 + .../send/node_modules/debug/Readme.md | 188 + .../send/node_modules/debug/bower.json | 28 + .../send/node_modules/debug/browser.js | 168 + .../send/node_modules/debug/component.json | 19 + node_modules/send/node_modules/debug/debug.js | 197 + node_modules/send/node_modules/debug/node.js | 209 + .../debug/node_modules/ms/.npmignore | 5 + .../debug/node_modules/ms/History.md | 66 + .../debug/node_modules/ms/LICENSE | 20 + .../debug/node_modules/ms/README.md | 35 + .../debug/node_modules/ms/index.js | 125 + .../debug/node_modules/ms/package.json | 82 + .../send/node_modules/debug/package.json | 106 + node_modules/send/package.json | 130 + node_modules/sequelize-cli/.editorconfig | 21 + node_modules/sequelize-cli/.jscsrc | 57 + node_modules/sequelize-cli/.jshintrc | 19 + node_modules/sequelize-cli/.mention-bot | 4 + node_modules/sequelize-cli/.npmignore | 30 + node_modules/sequelize-cli/.travis.yml | 27 + node_modules/sequelize-cli/CHANGELOG.md | 280 + node_modules/sequelize-cli/LICENSE | 21 + node_modules/sequelize-cli/README.md | 309 + node_modules/sequelize-cli/bin/get-env-matrix | 51 + node_modules/sequelize-cli/bin/sequelize | 101 + node_modules/sequelize-cli/gulpfile.js | 53 + .../lib/assets/migrations/create-table.js | 35 + .../lib/assets/migrations/skeleton.js | 23 + .../sequelize-cli/lib/assets/models/index.js | 36 + .../sequelize-cli/lib/assets/models/model.js | 19 + .../lib/assets/seeders/skeleton.js | 26 + node_modules/sequelize-cli/lib/gulpfile.js | 26 + .../sequelize-cli/lib/helpers/asset-helper.js | 28 + .../lib/helpers/config-helper.js | 215 + .../lib/helpers/generic-helper.js | 58 + .../sequelize-cli/lib/helpers/gulp-helper.js | 129 + .../sequelize-cli/lib/helpers/index.js | 15 + .../sequelize-cli/lib/helpers/init-helper.js | 83 + .../sequelize-cli/lib/helpers/log-helper.js | 44 + .../lib/helpers/migration-helper.js | 31 + .../sequelize-cli/lib/helpers/model-helper.js | 51 + .../sequelize-cli/lib/helpers/path-helper.js | 88 + .../lib/helpers/template-helper.js | 36 + .../sequelize-cli/lib/helpers/umzug-helper.js | 52 + .../lib/helpers/version-helper.js | 58 + .../sequelize-cli/lib/helpers/view-helper.js | 46 + node_modules/sequelize-cli/lib/tasks/db.js | 521 + node_modules/sequelize-cli/lib/tasks/init.js | 107 + .../sequelize-cli/lib/tasks/migration.js | 48 + node_modules/sequelize-cli/lib/tasks/model.js | 136 + node_modules/sequelize-cli/lib/tasks/seed.js | 47 + .../sequelize-cli/lib/tasks/version.js | 15 + .../node_modules/camelcase/index.js | 56 + .../node_modules/camelcase/license | 21 + .../node_modules/camelcase/package.json | 107 + .../node_modules/camelcase/readme.md | 57 + .../node_modules/cliui/CHANGELOG.md | 15 + .../node_modules/cliui/LICENSE.txt | 14 + .../node_modules/cliui/README.md | 110 + .../sequelize-cli/node_modules/cliui/index.js | 316 + .../node_modules/cliui/package.json | 131 + .../sequelize-cli/node_modules/lodash/LICENSE | 47 + .../node_modules/lodash/README.md | 39 + .../node_modules/lodash/_DataView.js | 7 + .../node_modules/lodash/_Hash.js | 32 + .../node_modules/lodash/_LazyWrapper.js | 28 + .../node_modules/lodash/_ListCache.js | 32 + .../node_modules/lodash/_LodashWrapper.js | 22 + .../sequelize-cli/node_modules/lodash/_Map.js | 7 + .../node_modules/lodash/_MapCache.js | 32 + .../node_modules/lodash/_Promise.js | 7 + .../sequelize-cli/node_modules/lodash/_Set.js | 7 + .../node_modules/lodash/_SetCache.js | 27 + .../node_modules/lodash/_Stack.js | 27 + .../node_modules/lodash/_Symbol.js | 6 + .../node_modules/lodash/_Uint8Array.js | 6 + .../node_modules/lodash/_WeakMap.js | 7 + .../node_modules/lodash/_addMapEntry.js | 15 + .../node_modules/lodash/_addSetEntry.js | 15 + .../node_modules/lodash/_apply.js | 21 + .../node_modules/lodash/_arrayAggregator.js | 22 + .../node_modules/lodash/_arrayEach.js | 22 + .../node_modules/lodash/_arrayEachRight.js | 21 + .../node_modules/lodash/_arrayEvery.js | 23 + .../node_modules/lodash/_arrayFilter.js | 25 + .../node_modules/lodash/_arrayIncludes.js | 17 + .../node_modules/lodash/_arrayIncludesWith.js | 22 + .../node_modules/lodash/_arrayLikeKeys.js | 49 + .../node_modules/lodash/_arrayMap.js | 21 + .../node_modules/lodash/_arrayPush.js | 20 + .../node_modules/lodash/_arrayReduce.js | 26 + .../node_modules/lodash/_arrayReduceRight.js | 24 + .../node_modules/lodash/_arraySample.js | 15 + .../node_modules/lodash/_arraySampleSize.js | 17 + .../node_modules/lodash/_arrayShuffle.js | 15 + .../node_modules/lodash/_arraySome.js | 23 + .../node_modules/lodash/_asciiSize.js | 12 + .../node_modules/lodash/_asciiToArray.js | 12 + .../node_modules/lodash/_asciiWords.js | 15 + .../node_modules/lodash/_assignMergeValue.js | 20 + .../node_modules/lodash/_assignValue.js | 28 + .../node_modules/lodash/_assocIndexOf.js | 21 + .../node_modules/lodash/_baseAggregator.js | 21 + .../node_modules/lodash/_baseAssign.js | 17 + .../node_modules/lodash/_baseAssignIn.js | 17 + .../node_modules/lodash/_baseAssignValue.js | 25 + .../node_modules/lodash/_baseAt.js | 23 + .../node_modules/lodash/_baseClamp.js | 22 + .../node_modules/lodash/_baseClone.js | 153 + .../node_modules/lodash/_baseConforms.js | 18 + .../node_modules/lodash/_baseConformsTo.js | 27 + .../node_modules/lodash/_baseCreate.js | 30 + .../node_modules/lodash/_baseDelay.js | 21 + .../node_modules/lodash/_baseDifference.js | 67 + .../node_modules/lodash/_baseEach.js | 14 + .../node_modules/lodash/_baseEachRight.js | 14 + .../node_modules/lodash/_baseEvery.js | 21 + .../node_modules/lodash/_baseExtremum.js | 32 + .../node_modules/lodash/_baseFill.js | 32 + .../node_modules/lodash/_baseFilter.js | 21 + .../node_modules/lodash/_baseFindIndex.js | 24 + .../node_modules/lodash/_baseFindKey.js | 23 + .../node_modules/lodash/_baseFlatten.js | 38 + .../node_modules/lodash/_baseFor.js | 16 + .../node_modules/lodash/_baseForOwn.js | 16 + .../node_modules/lodash/_baseForOwnRight.js | 16 + .../node_modules/lodash/_baseForRight.js | 15 + .../node_modules/lodash/_baseFunctions.js | 19 + .../node_modules/lodash/_baseGet.js | 24 + .../node_modules/lodash/_baseGetAllKeys.js | 20 + .../node_modules/lodash/_baseGetTag.js | 28 + .../node_modules/lodash/_baseGt.js | 14 + .../node_modules/lodash/_baseHas.js | 19 + .../node_modules/lodash/_baseHasIn.js | 13 + .../node_modules/lodash/_baseInRange.js | 18 + .../node_modules/lodash/_baseIndexOf.js | 20 + .../node_modules/lodash/_baseIndexOfWith.js | 23 + .../node_modules/lodash/_baseIntersection.js | 74 + .../node_modules/lodash/_baseInverter.js | 21 + .../node_modules/lodash/_baseInvoke.js | 24 + .../node_modules/lodash/_baseIsArguments.js | 18 + .../node_modules/lodash/_baseIsArrayBuffer.js | 17 + .../node_modules/lodash/_baseIsDate.js | 18 + .../node_modules/lodash/_baseIsEqual.js | 28 + .../node_modules/lodash/_baseIsEqualDeep.js | 83 + .../node_modules/lodash/_baseIsMap.js | 18 + .../node_modules/lodash/_baseIsMatch.js | 62 + .../node_modules/lodash/_baseIsNaN.js | 12 + .../node_modules/lodash/_baseIsNative.js | 47 + .../node_modules/lodash/_baseIsRegExp.js | 18 + .../node_modules/lodash/_baseIsSet.js | 18 + .../node_modules/lodash/_baseIsTypedArray.js | 60 + .../node_modules/lodash/_baseIteratee.js | 31 + .../node_modules/lodash/_baseKeys.js | 30 + .../node_modules/lodash/_baseKeysIn.js | 33 + .../node_modules/lodash/_baseLodash.js | 10 + .../node_modules/lodash/_baseLt.js | 14 + .../node_modules/lodash/_baseMap.js | 22 + .../node_modules/lodash/_baseMatches.js | 22 + .../lodash/_baseMatchesProperty.js | 33 + .../node_modules/lodash/_baseMean.js | 20 + .../node_modules/lodash/_baseMerge.js | 41 + .../node_modules/lodash/_baseMergeDeep.js | 93 + .../node_modules/lodash/_baseNth.js | 20 + .../node_modules/lodash/_baseOrderBy.js | 34 + .../node_modules/lodash/_basePick.js | 19 + .../node_modules/lodash/_basePickBy.js | 30 + .../node_modules/lodash/_baseProperty.js | 14 + .../node_modules/lodash/_basePropertyDeep.js | 16 + .../node_modules/lodash/_basePropertyOf.js | 14 + .../node_modules/lodash/_basePullAll.js | 51 + .../node_modules/lodash/_basePullAt.js | 37 + .../node_modules/lodash/_baseRandom.js | 18 + .../node_modules/lodash/_baseRange.js | 28 + .../node_modules/lodash/_baseReduce.js | 23 + .../node_modules/lodash/_baseRepeat.js | 35 + .../node_modules/lodash/_baseRest.js | 17 + .../node_modules/lodash/_baseSample.js | 15 + .../node_modules/lodash/_baseSampleSize.js | 18 + .../node_modules/lodash/_baseSet.js | 47 + .../node_modules/lodash/_baseSetData.js | 17 + .../node_modules/lodash/_baseSetToString.js | 22 + .../node_modules/lodash/_baseShuffle.js | 15 + .../node_modules/lodash/_baseSlice.js | 31 + .../node_modules/lodash/_baseSome.js | 22 + .../node_modules/lodash/_baseSortBy.js | 21 + .../node_modules/lodash/_baseSortedIndex.js | 42 + .../node_modules/lodash/_baseSortedIndexBy.js | 64 + .../node_modules/lodash/_baseSortedUniq.js | 30 + .../node_modules/lodash/_baseSum.js | 24 + .../node_modules/lodash/_baseTimes.js | 20 + .../node_modules/lodash/_baseToNumber.js | 24 + .../node_modules/lodash/_baseToPairs.js | 18 + .../node_modules/lodash/_baseToString.js | 37 + .../node_modules/lodash/_baseUnary.js | 14 + .../node_modules/lodash/_baseUniq.js | 72 + .../node_modules/lodash/_baseUnset.js | 20 + .../node_modules/lodash/_baseUpdate.js | 18 + .../node_modules/lodash/_baseValues.js | 19 + .../node_modules/lodash/_baseWhile.js | 26 + .../node_modules/lodash/_baseWrapperValue.js | 25 + .../node_modules/lodash/_baseXor.js | 36 + .../node_modules/lodash/_baseZipObject.js | 23 + .../node_modules/lodash/_cacheHas.js | 13 + .../lodash/_castArrayLikeObject.js | 14 + .../node_modules/lodash/_castFunction.js | 14 + .../node_modules/lodash/_castPath.js | 21 + .../node_modules/lodash/_castRest.js | 14 + .../node_modules/lodash/_castSlice.js | 18 + .../node_modules/lodash/_charsEndIndex.js | 19 + .../node_modules/lodash/_charsStartIndex.js | 20 + .../node_modules/lodash/_cloneArrayBuffer.js | 16 + .../node_modules/lodash/_cloneBuffer.js | 35 + .../node_modules/lodash/_cloneDataView.js | 16 + .../node_modules/lodash/_cloneMap.js | 22 + .../node_modules/lodash/_cloneRegExp.js | 17 + .../node_modules/lodash/_cloneSet.js | 22 + .../node_modules/lodash/_cloneSymbol.js | 18 + .../node_modules/lodash/_cloneTypedArray.js | 16 + .../node_modules/lodash/_compareAscending.js | 41 + .../node_modules/lodash/_compareMultiple.js | 44 + .../node_modules/lodash/_composeArgs.js | 39 + .../node_modules/lodash/_composeArgsRight.js | 41 + .../node_modules/lodash/_copyArray.js | 20 + .../node_modules/lodash/_copyObject.js | 40 + .../node_modules/lodash/_copySymbols.js | 16 + .../node_modules/lodash/_copySymbolsIn.js | 16 + .../node_modules/lodash/_coreJsData.js | 6 + .../node_modules/lodash/_countHolders.js | 21 + .../node_modules/lodash/_createAggregator.js | 23 + .../node_modules/lodash/_createAssigner.js | 37 + .../node_modules/lodash/_createBaseEach.js | 32 + .../node_modules/lodash/_createBaseFor.js | 25 + .../node_modules/lodash/_createBind.js | 28 + .../node_modules/lodash/_createCaseFirst.js | 33 + .../node_modules/lodash/_createCompounder.js | 24 + .../node_modules/lodash/_createCtor.js | 37 + .../node_modules/lodash/_createCurry.js | 46 + .../node_modules/lodash/_createFind.js | 25 + .../node_modules/lodash/_createFlow.js | 78 + .../node_modules/lodash/_createHybrid.js | 92 + .../node_modules/lodash/_createInverter.js | 17 + .../lodash/_createMathOperation.js | 38 + .../node_modules/lodash/_createOver.js | 27 + .../node_modules/lodash/_createPadding.js | 33 + .../node_modules/lodash/_createPartial.js | 43 + .../node_modules/lodash/_createRange.js | 30 + .../node_modules/lodash/_createRecurry.js | 56 + .../lodash/_createRelationalOperation.js | 20 + .../node_modules/lodash/_createRound.js | 33 + .../node_modules/lodash/_createSet.js | 19 + .../node_modules/lodash/_createToPairs.js | 30 + .../node_modules/lodash/_createWrap.js | 106 + .../lodash/_customDefaultsAssignIn.js | 29 + .../lodash/_customDefaultsMerge.js | 28 + .../node_modules/lodash/_customOmitClone.js | 16 + .../node_modules/lodash/_deburrLetter.js | 71 + .../node_modules/lodash/_defineProperty.js | 11 + .../node_modules/lodash/_equalArrays.js | 83 + .../node_modules/lodash/_equalByTag.js | 112 + .../node_modules/lodash/_equalObjects.js | 89 + .../node_modules/lodash/_escapeHtmlChar.js | 21 + .../node_modules/lodash/_escapeStringChar.js | 22 + .../node_modules/lodash/_flatRest.js | 16 + .../node_modules/lodash/_freeGlobal.js | 4 + .../node_modules/lodash/_getAllKeys.js | 16 + .../node_modules/lodash/_getAllKeysIn.js | 17 + .../node_modules/lodash/_getData.js | 15 + .../node_modules/lodash/_getFuncName.js | 31 + .../node_modules/lodash/_getHolder.js | 13 + .../node_modules/lodash/_getMapData.js | 18 + .../node_modules/lodash/_getMatchData.js | 24 + .../node_modules/lodash/_getNative.js | 17 + .../node_modules/lodash/_getPrototype.js | 6 + .../node_modules/lodash/_getRawTag.js | 46 + .../node_modules/lodash/_getSymbols.js | 30 + .../node_modules/lodash/_getSymbolsIn.js | 25 + .../node_modules/lodash/_getTag.js | 58 + .../node_modules/lodash/_getValue.js | 13 + .../node_modules/lodash/_getView.js | 33 + .../node_modules/lodash/_getWrapDetails.js | 17 + .../node_modules/lodash/_hasPath.js | 39 + .../node_modules/lodash/_hasUnicode.js | 26 + .../node_modules/lodash/_hasUnicodeWord.js | 15 + .../node_modules/lodash/_hashClear.js | 15 + .../node_modules/lodash/_hashDelete.js | 17 + .../node_modules/lodash/_hashGet.js | 30 + .../node_modules/lodash/_hashHas.js | 23 + .../node_modules/lodash/_hashSet.js | 23 + .../node_modules/lodash/_initCloneArray.js | 26 + .../node_modules/lodash/_initCloneByTag.js | 80 + .../node_modules/lodash/_initCloneObject.js | 18 + .../node_modules/lodash/_insertWrapDetails.js | 23 + .../node_modules/lodash/_isFlattenable.js | 20 + .../node_modules/lodash/_isIndex.js | 22 + .../node_modules/lodash/_isIterateeCall.js | 30 + .../node_modules/lodash/_isKey.js | 29 + .../node_modules/lodash/_isKeyable.js | 15 + .../node_modules/lodash/_isLaziable.js | 28 + .../node_modules/lodash/_isMaskable.js | 14 + .../node_modules/lodash/_isMasked.js | 20 + .../node_modules/lodash/_isPrototype.js | 18 + .../lodash/_isStrictComparable.js | 15 + .../node_modules/lodash/_iteratorToArray.js | 18 + .../node_modules/lodash/_lazyClone.js | 23 + .../node_modules/lodash/_lazyReverse.js | 23 + .../node_modules/lodash/_lazyValue.js | 69 + .../node_modules/lodash/_listCacheClear.js | 13 + .../node_modules/lodash/_listCacheDelete.js | 35 + .../node_modules/lodash/_listCacheGet.js | 19 + .../node_modules/lodash/_listCacheHas.js | 16 + .../node_modules/lodash/_listCacheSet.js | 26 + .../node_modules/lodash/_mapCacheClear.js | 21 + .../node_modules/lodash/_mapCacheDelete.js | 18 + .../node_modules/lodash/_mapCacheGet.js | 16 + .../node_modules/lodash/_mapCacheHas.js | 16 + .../node_modules/lodash/_mapCacheSet.js | 22 + .../node_modules/lodash/_mapToArray.js | 18 + .../lodash/_matchesStrictComparable.js | 20 + .../node_modules/lodash/_memoizeCapped.js | 26 + .../node_modules/lodash/_mergeData.js | 90 + .../node_modules/lodash/_metaMap.js | 6 + .../node_modules/lodash/_nativeCreate.js | 6 + .../node_modules/lodash/_nativeKeys.js | 6 + .../node_modules/lodash/_nativeKeysIn.js | 20 + .../node_modules/lodash/_nodeUtil.js | 22 + .../node_modules/lodash/_objectToString.js | 22 + .../node_modules/lodash/_overArg.js | 15 + .../node_modules/lodash/_overRest.js | 36 + .../node_modules/lodash/_parent.js | 16 + .../node_modules/lodash/_reEscape.js | 4 + .../node_modules/lodash/_reEvaluate.js | 4 + .../node_modules/lodash/_reInterpolate.js | 4 + .../node_modules/lodash/_realNames.js | 4 + .../node_modules/lodash/_reorder.js | 29 + .../node_modules/lodash/_replaceHolders.js | 29 + .../node_modules/lodash/_root.js | 9 + .../node_modules/lodash/_setCacheAdd.js | 19 + .../node_modules/lodash/_setCacheHas.js | 14 + .../node_modules/lodash/_setData.js | 20 + .../node_modules/lodash/_setToArray.js | 18 + .../node_modules/lodash/_setToPairs.js | 18 + .../node_modules/lodash/_setToString.js | 14 + .../node_modules/lodash/_setWrapToString.js | 21 + .../node_modules/lodash/_shortOut.js | 37 + .../node_modules/lodash/_shuffleSelf.js | 28 + .../node_modules/lodash/_stackClear.js | 15 + .../node_modules/lodash/_stackDelete.js | 18 + .../node_modules/lodash/_stackGet.js | 14 + .../node_modules/lodash/_stackHas.js | 14 + .../node_modules/lodash/_stackSet.js | 34 + .../node_modules/lodash/_strictIndexOf.js | 23 + .../node_modules/lodash/_strictLastIndexOf.js | 21 + .../node_modules/lodash/_stringSize.js | 18 + .../node_modules/lodash/_stringToArray.js | 18 + .../node_modules/lodash/_stringToPath.js | 28 + .../node_modules/lodash/_toKey.js | 21 + .../node_modules/lodash/_toSource.js | 26 + .../node_modules/lodash/_unescapeHtmlChar.js | 21 + .../node_modules/lodash/_unicodeSize.js | 44 + .../node_modules/lodash/_unicodeToArray.js | 40 + .../node_modules/lodash/_unicodeWords.js | 69 + .../node_modules/lodash/_updateWrapDetails.js | 46 + .../node_modules/lodash/_wrapperClone.js | 23 + .../sequelize-cli/node_modules/lodash/add.js | 22 + .../node_modules/lodash/after.js | 42 + .../node_modules/lodash/array.js | 67 + .../sequelize-cli/node_modules/lodash/ary.js | 29 + .../node_modules/lodash/assign.js | 58 + .../node_modules/lodash/assignIn.js | 40 + .../node_modules/lodash/assignInWith.js | 38 + .../node_modules/lodash/assignWith.js | 37 + .../sequelize-cli/node_modules/lodash/at.js | 23 + .../node_modules/lodash/attempt.js | 35 + .../node_modules/lodash/before.js | 40 + .../sequelize-cli/node_modules/lodash/bind.js | 57 + .../node_modules/lodash/bindAll.js | 41 + .../node_modules/lodash/bindKey.js | 68 + .../node_modules/lodash/camelCase.js | 29 + .../node_modules/lodash/capitalize.js | 23 + .../node_modules/lodash/castArray.js | 44 + .../sequelize-cli/node_modules/lodash/ceil.js | 26 + .../node_modules/lodash/chain.js | 38 + .../node_modules/lodash/chunk.js | 50 + .../node_modules/lodash/clamp.js | 39 + .../node_modules/lodash/clone.js | 36 + .../node_modules/lodash/cloneDeep.js | 29 + .../node_modules/lodash/cloneDeepWith.js | 40 + .../node_modules/lodash/cloneWith.js | 42 + .../node_modules/lodash/collection.js | 30 + .../node_modules/lodash/commit.js | 33 + .../node_modules/lodash/compact.js | 31 + .../node_modules/lodash/concat.js | 43 + .../sequelize-cli/node_modules/lodash/cond.js | 60 + .../node_modules/lodash/conforms.js | 35 + .../node_modules/lodash/conformsTo.js | 32 + .../node_modules/lodash/constant.js | 26 + .../sequelize-cli/node_modules/lodash/core.js | 3836 + .../node_modules/lodash/core.min.js | 29 + .../node_modules/lodash/countBy.js | 40 + .../node_modules/lodash/create.js | 43 + .../node_modules/lodash/curry.js | 57 + .../node_modules/lodash/curryRight.js | 54 + .../sequelize-cli/node_modules/lodash/date.js | 3 + .../node_modules/lodash/debounce.js | 188 + .../node_modules/lodash/deburr.js | 45 + .../node_modules/lodash/defaultTo.js | 25 + .../node_modules/lodash/defaults.js | 32 + .../node_modules/lodash/defaultsDeep.js | 30 + .../node_modules/lodash/defer.js | 26 + .../node_modules/lodash/delay.js | 28 + .../node_modules/lodash/difference.js | 33 + .../node_modules/lodash/differenceBy.js | 44 + .../node_modules/lodash/differenceWith.js | 40 + .../node_modules/lodash/divide.js | 22 + .../sequelize-cli/node_modules/lodash/drop.js | 38 + .../node_modules/lodash/dropRight.js | 39 + .../node_modules/lodash/dropRightWhile.js | 45 + .../node_modules/lodash/dropWhile.js | 45 + .../sequelize-cli/node_modules/lodash/each.js | 1 + .../node_modules/lodash/eachRight.js | 1 + .../node_modules/lodash/endsWith.js | 43 + .../node_modules/lodash/entries.js | 1 + .../node_modules/lodash/entriesIn.js | 1 + .../sequelize-cli/node_modules/lodash/eq.js | 37 + .../node_modules/lodash/escape.js | 43 + .../node_modules/lodash/escapeRegExp.js | 32 + .../node_modules/lodash/every.js | 56 + .../node_modules/lodash/extend.js | 1 + .../node_modules/lodash/extendWith.js | 1 + .../sequelize-cli/node_modules/lodash/fill.js | 45 + .../node_modules/lodash/filter.js | 48 + .../sequelize-cli/node_modules/lodash/find.js | 42 + .../node_modules/lodash/findIndex.js | 55 + .../node_modules/lodash/findKey.js | 44 + .../node_modules/lodash/findLast.js | 25 + .../node_modules/lodash/findLastIndex.js | 59 + .../node_modules/lodash/findLastKey.js | 44 + .../node_modules/lodash/first.js | 1 + .../node_modules/lodash/flatMap.js | 29 + .../node_modules/lodash/flatMapDeep.js | 31 + .../node_modules/lodash/flatMapDepth.js | 31 + .../node_modules/lodash/flatten.js | 22 + .../node_modules/lodash/flattenDeep.js | 25 + .../node_modules/lodash/flattenDepth.js | 33 + .../sequelize-cli/node_modules/lodash/flip.js | 28 + .../node_modules/lodash/floor.js | 26 + .../sequelize-cli/node_modules/lodash/flow.js | 27 + .../node_modules/lodash/flowRight.js | 26 + .../node_modules/lodash/forEach.js | 41 + .../node_modules/lodash/forEachRight.js | 31 + .../node_modules/lodash/forIn.js | 39 + .../node_modules/lodash/forInRight.js | 37 + .../node_modules/lodash/forOwn.js | 36 + .../node_modules/lodash/forOwnRight.js | 34 + .../sequelize-cli/node_modules/lodash/fp.js | 2 + .../sequelize-cli/node_modules/lodash/fp/F.js | 1 + .../sequelize-cli/node_modules/lodash/fp/T.js | 1 + .../node_modules/lodash/fp/__.js | 1 + .../node_modules/lodash/fp/_baseConvert.js | 568 + .../node_modules/lodash/fp/_convertBrowser.js | 18 + .../node_modules/lodash/fp/_falseOptions.js | 7 + .../node_modules/lodash/fp/_mapping.js | 368 + .../node_modules/lodash/fp/_util.js | 14 + .../node_modules/lodash/fp/add.js | 5 + .../node_modules/lodash/fp/after.js | 5 + .../node_modules/lodash/fp/all.js | 1 + .../node_modules/lodash/fp/allPass.js | 1 + .../node_modules/lodash/fp/always.js | 1 + .../node_modules/lodash/fp/any.js | 1 + .../node_modules/lodash/fp/anyPass.js | 1 + .../node_modules/lodash/fp/apply.js | 1 + .../node_modules/lodash/fp/array.js | 2 + .../node_modules/lodash/fp/ary.js | 5 + .../node_modules/lodash/fp/assign.js | 5 + .../node_modules/lodash/fp/assignAll.js | 5 + .../node_modules/lodash/fp/assignAllWith.js | 5 + .../node_modules/lodash/fp/assignIn.js | 5 + .../node_modules/lodash/fp/assignInAll.js | 5 + .../node_modules/lodash/fp/assignInAllWith.js | 5 + .../node_modules/lodash/fp/assignInWith.js | 5 + .../node_modules/lodash/fp/assignWith.js | 5 + .../node_modules/lodash/fp/assoc.js | 1 + .../node_modules/lodash/fp/assocPath.js | 1 + .../node_modules/lodash/fp/at.js | 5 + .../node_modules/lodash/fp/attempt.js | 5 + .../node_modules/lodash/fp/before.js | 5 + .../node_modules/lodash/fp/bind.js | 5 + .../node_modules/lodash/fp/bindAll.js | 5 + .../node_modules/lodash/fp/bindKey.js | 5 + .../node_modules/lodash/fp/camelCase.js | 5 + .../node_modules/lodash/fp/capitalize.js | 5 + .../node_modules/lodash/fp/castArray.js | 5 + .../node_modules/lodash/fp/ceil.js | 5 + .../node_modules/lodash/fp/chain.js | 5 + .../node_modules/lodash/fp/chunk.js | 5 + .../node_modules/lodash/fp/clamp.js | 5 + .../node_modules/lodash/fp/clone.js | 5 + .../node_modules/lodash/fp/cloneDeep.js | 5 + .../node_modules/lodash/fp/cloneDeepWith.js | 5 + .../node_modules/lodash/fp/cloneWith.js | 5 + .../node_modules/lodash/fp/collection.js | 2 + .../node_modules/lodash/fp/commit.js | 5 + .../node_modules/lodash/fp/compact.js | 5 + .../node_modules/lodash/fp/complement.js | 1 + .../node_modules/lodash/fp/compose.js | 1 + .../node_modules/lodash/fp/concat.js | 5 + .../node_modules/lodash/fp/cond.js | 5 + .../node_modules/lodash/fp/conforms.js | 1 + .../node_modules/lodash/fp/conformsTo.js | 5 + .../node_modules/lodash/fp/constant.js | 5 + .../node_modules/lodash/fp/contains.js | 1 + .../node_modules/lodash/fp/convert.js | 18 + .../node_modules/lodash/fp/countBy.js | 5 + .../node_modules/lodash/fp/create.js | 5 + .../node_modules/lodash/fp/curry.js | 5 + .../node_modules/lodash/fp/curryN.js | 5 + .../node_modules/lodash/fp/curryRight.js | 5 + .../node_modules/lodash/fp/curryRightN.js | 5 + .../node_modules/lodash/fp/date.js | 2 + .../node_modules/lodash/fp/debounce.js | 5 + .../node_modules/lodash/fp/deburr.js | 5 + .../node_modules/lodash/fp/defaultTo.js | 5 + .../node_modules/lodash/fp/defaults.js | 5 + .../node_modules/lodash/fp/defaultsAll.js | 5 + .../node_modules/lodash/fp/defaultsDeep.js | 5 + .../node_modules/lodash/fp/defaultsDeepAll.js | 5 + .../node_modules/lodash/fp/defer.js | 5 + .../node_modules/lodash/fp/delay.js | 5 + .../node_modules/lodash/fp/difference.js | 5 + .../node_modules/lodash/fp/differenceBy.js | 5 + .../node_modules/lodash/fp/differenceWith.js | 5 + .../node_modules/lodash/fp/dissoc.js | 1 + .../node_modules/lodash/fp/dissocPath.js | 1 + .../node_modules/lodash/fp/divide.js | 5 + .../node_modules/lodash/fp/drop.js | 5 + .../node_modules/lodash/fp/dropLast.js | 1 + .../node_modules/lodash/fp/dropLastWhile.js | 1 + .../node_modules/lodash/fp/dropRight.js | 5 + .../node_modules/lodash/fp/dropRightWhile.js | 5 + .../node_modules/lodash/fp/dropWhile.js | 5 + .../node_modules/lodash/fp/each.js | 1 + .../node_modules/lodash/fp/eachRight.js | 1 + .../node_modules/lodash/fp/endsWith.js | 5 + .../node_modules/lodash/fp/entries.js | 1 + .../node_modules/lodash/fp/entriesIn.js | 1 + .../node_modules/lodash/fp/eq.js | 5 + .../node_modules/lodash/fp/equals.js | 1 + .../node_modules/lodash/fp/escape.js | 5 + .../node_modules/lodash/fp/escapeRegExp.js | 5 + .../node_modules/lodash/fp/every.js | 5 + .../node_modules/lodash/fp/extend.js | 1 + .../node_modules/lodash/fp/extendAll.js | 1 + .../node_modules/lodash/fp/extendAllWith.js | 1 + .../node_modules/lodash/fp/extendWith.js | 1 + .../node_modules/lodash/fp/fill.js | 5 + .../node_modules/lodash/fp/filter.js | 5 + .../node_modules/lodash/fp/find.js | 5 + .../node_modules/lodash/fp/findFrom.js | 5 + .../node_modules/lodash/fp/findIndex.js | 5 + .../node_modules/lodash/fp/findIndexFrom.js | 5 + .../node_modules/lodash/fp/findKey.js | 5 + .../node_modules/lodash/fp/findLast.js | 5 + .../node_modules/lodash/fp/findLastFrom.js | 5 + .../node_modules/lodash/fp/findLastIndex.js | 5 + .../lodash/fp/findLastIndexFrom.js | 5 + .../node_modules/lodash/fp/findLastKey.js | 5 + .../node_modules/lodash/fp/first.js | 1 + .../node_modules/lodash/fp/flatMap.js | 5 + .../node_modules/lodash/fp/flatMapDeep.js | 5 + .../node_modules/lodash/fp/flatMapDepth.js | 5 + .../node_modules/lodash/fp/flatten.js | 5 + .../node_modules/lodash/fp/flattenDeep.js | 5 + .../node_modules/lodash/fp/flattenDepth.js | 5 + .../node_modules/lodash/fp/flip.js | 5 + .../node_modules/lodash/fp/floor.js | 5 + .../node_modules/lodash/fp/flow.js | 5 + .../node_modules/lodash/fp/flowRight.js | 5 + .../node_modules/lodash/fp/forEach.js | 5 + .../node_modules/lodash/fp/forEachRight.js | 5 + .../node_modules/lodash/fp/forIn.js | 5 + .../node_modules/lodash/fp/forInRight.js | 5 + .../node_modules/lodash/fp/forOwn.js | 5 + .../node_modules/lodash/fp/forOwnRight.js | 5 + .../node_modules/lodash/fp/fromPairs.js | 5 + .../node_modules/lodash/fp/function.js | 2 + .../node_modules/lodash/fp/functions.js | 5 + .../node_modules/lodash/fp/functionsIn.js | 5 + .../node_modules/lodash/fp/get.js | 5 + .../node_modules/lodash/fp/getOr.js | 5 + .../node_modules/lodash/fp/groupBy.js | 5 + .../node_modules/lodash/fp/gt.js | 5 + .../node_modules/lodash/fp/gte.js | 5 + .../node_modules/lodash/fp/has.js | 5 + .../node_modules/lodash/fp/hasIn.js | 5 + .../node_modules/lodash/fp/head.js | 5 + .../node_modules/lodash/fp/identical.js | 1 + .../node_modules/lodash/fp/identity.js | 5 + .../node_modules/lodash/fp/inRange.js | 5 + .../node_modules/lodash/fp/includes.js | 5 + .../node_modules/lodash/fp/includesFrom.js | 5 + .../node_modules/lodash/fp/indexBy.js | 1 + .../node_modules/lodash/fp/indexOf.js | 5 + .../node_modules/lodash/fp/indexOfFrom.js | 5 + .../node_modules/lodash/fp/init.js | 1 + .../node_modules/lodash/fp/initial.js | 5 + .../node_modules/lodash/fp/intersection.js | 5 + .../node_modules/lodash/fp/intersectionBy.js | 5 + .../lodash/fp/intersectionWith.js | 5 + .../node_modules/lodash/fp/invert.js | 5 + .../node_modules/lodash/fp/invertBy.js | 5 + .../node_modules/lodash/fp/invertObj.js | 1 + .../node_modules/lodash/fp/invoke.js | 5 + .../node_modules/lodash/fp/invokeArgs.js | 5 + .../node_modules/lodash/fp/invokeArgsMap.js | 5 + .../node_modules/lodash/fp/invokeMap.js | 5 + .../node_modules/lodash/fp/isArguments.js | 5 + .../node_modules/lodash/fp/isArray.js | 5 + .../node_modules/lodash/fp/isArrayBuffer.js | 5 + .../node_modules/lodash/fp/isArrayLike.js | 5 + .../lodash/fp/isArrayLikeObject.js | 5 + .../node_modules/lodash/fp/isBoolean.js | 5 + .../node_modules/lodash/fp/isBuffer.js | 5 + .../node_modules/lodash/fp/isDate.js | 5 + .../node_modules/lodash/fp/isElement.js | 5 + .../node_modules/lodash/fp/isEmpty.js | 5 + .../node_modules/lodash/fp/isEqual.js | 5 + .../node_modules/lodash/fp/isEqualWith.js | 5 + .../node_modules/lodash/fp/isError.js | 5 + .../node_modules/lodash/fp/isFinite.js | 5 + .../node_modules/lodash/fp/isFunction.js | 5 + .../node_modules/lodash/fp/isInteger.js | 5 + .../node_modules/lodash/fp/isLength.js | 5 + .../node_modules/lodash/fp/isMap.js | 5 + .../node_modules/lodash/fp/isMatch.js | 5 + .../node_modules/lodash/fp/isMatchWith.js | 5 + .../node_modules/lodash/fp/isNaN.js | 5 + .../node_modules/lodash/fp/isNative.js | 5 + .../node_modules/lodash/fp/isNil.js | 5 + .../node_modules/lodash/fp/isNull.js | 5 + .../node_modules/lodash/fp/isNumber.js | 5 + .../node_modules/lodash/fp/isObject.js | 5 + .../node_modules/lodash/fp/isObjectLike.js | 5 + .../node_modules/lodash/fp/isPlainObject.js | 5 + .../node_modules/lodash/fp/isRegExp.js | 5 + .../node_modules/lodash/fp/isSafeInteger.js | 5 + .../node_modules/lodash/fp/isSet.js | 5 + .../node_modules/lodash/fp/isString.js | 5 + .../node_modules/lodash/fp/isSymbol.js | 5 + .../node_modules/lodash/fp/isTypedArray.js | 5 + .../node_modules/lodash/fp/isUndefined.js | 5 + .../node_modules/lodash/fp/isWeakMap.js | 5 + .../node_modules/lodash/fp/isWeakSet.js | 5 + .../node_modules/lodash/fp/iteratee.js | 5 + .../node_modules/lodash/fp/join.js | 5 + .../node_modules/lodash/fp/juxt.js | 1 + .../node_modules/lodash/fp/kebabCase.js | 5 + .../node_modules/lodash/fp/keyBy.js | 5 + .../node_modules/lodash/fp/keys.js | 5 + .../node_modules/lodash/fp/keysIn.js | 5 + .../node_modules/lodash/fp/lang.js | 2 + .../node_modules/lodash/fp/last.js | 5 + .../node_modules/lodash/fp/lastIndexOf.js | 5 + .../node_modules/lodash/fp/lastIndexOfFrom.js | 5 + .../node_modules/lodash/fp/lowerCase.js | 5 + .../node_modules/lodash/fp/lowerFirst.js | 5 + .../node_modules/lodash/fp/lt.js | 5 + .../node_modules/lodash/fp/lte.js | 5 + .../node_modules/lodash/fp/map.js | 5 + .../node_modules/lodash/fp/mapKeys.js | 5 + .../node_modules/lodash/fp/mapValues.js | 5 + .../node_modules/lodash/fp/matches.js | 1 + .../node_modules/lodash/fp/matchesProperty.js | 5 + .../node_modules/lodash/fp/math.js | 2 + .../node_modules/lodash/fp/max.js | 5 + .../node_modules/lodash/fp/maxBy.js | 5 + .../node_modules/lodash/fp/mean.js | 5 + .../node_modules/lodash/fp/meanBy.js | 5 + .../node_modules/lodash/fp/memoize.js | 5 + .../node_modules/lodash/fp/merge.js | 5 + .../node_modules/lodash/fp/mergeAll.js | 5 + .../node_modules/lodash/fp/mergeAllWith.js | 5 + .../node_modules/lodash/fp/mergeWith.js | 5 + .../node_modules/lodash/fp/method.js | 5 + .../node_modules/lodash/fp/methodOf.js | 5 + .../node_modules/lodash/fp/min.js | 5 + .../node_modules/lodash/fp/minBy.js | 5 + .../node_modules/lodash/fp/mixin.js | 5 + .../node_modules/lodash/fp/multiply.js | 5 + .../node_modules/lodash/fp/nAry.js | 1 + .../node_modules/lodash/fp/negate.js | 5 + .../node_modules/lodash/fp/next.js | 5 + .../node_modules/lodash/fp/noop.js | 5 + .../node_modules/lodash/fp/now.js | 5 + .../node_modules/lodash/fp/nth.js | 5 + .../node_modules/lodash/fp/nthArg.js | 5 + .../node_modules/lodash/fp/number.js | 2 + .../node_modules/lodash/fp/object.js | 2 + .../node_modules/lodash/fp/omit.js | 5 + .../node_modules/lodash/fp/omitAll.js | 1 + .../node_modules/lodash/fp/omitBy.js | 5 + .../node_modules/lodash/fp/once.js | 5 + .../node_modules/lodash/fp/orderBy.js | 5 + .../node_modules/lodash/fp/over.js | 5 + .../node_modules/lodash/fp/overArgs.js | 5 + .../node_modules/lodash/fp/overEvery.js | 5 + .../node_modules/lodash/fp/overSome.js | 5 + .../node_modules/lodash/fp/pad.js | 5 + .../node_modules/lodash/fp/padChars.js | 5 + .../node_modules/lodash/fp/padCharsEnd.js | 5 + .../node_modules/lodash/fp/padCharsStart.js | 5 + .../node_modules/lodash/fp/padEnd.js | 5 + .../node_modules/lodash/fp/padStart.js | 5 + .../node_modules/lodash/fp/parseInt.js | 5 + .../node_modules/lodash/fp/partial.js | 5 + .../node_modules/lodash/fp/partialRight.js | 5 + .../node_modules/lodash/fp/partition.js | 5 + .../node_modules/lodash/fp/path.js | 1 + .../node_modules/lodash/fp/pathEq.js | 1 + .../node_modules/lodash/fp/pathOr.js | 1 + .../node_modules/lodash/fp/paths.js | 1 + .../node_modules/lodash/fp/pick.js | 5 + .../node_modules/lodash/fp/pickAll.js | 1 + .../node_modules/lodash/fp/pickBy.js | 5 + .../node_modules/lodash/fp/pipe.js | 1 + .../node_modules/lodash/fp/placeholder.js | 6 + .../node_modules/lodash/fp/plant.js | 5 + .../node_modules/lodash/fp/pluck.js | 1 + .../node_modules/lodash/fp/prop.js | 1 + .../node_modules/lodash/fp/propEq.js | 1 + .../node_modules/lodash/fp/propOr.js | 1 + .../node_modules/lodash/fp/property.js | 1 + .../node_modules/lodash/fp/propertyOf.js | 5 + .../node_modules/lodash/fp/props.js | 1 + .../node_modules/lodash/fp/pull.js | 5 + .../node_modules/lodash/fp/pullAll.js | 5 + .../node_modules/lodash/fp/pullAllBy.js | 5 + .../node_modules/lodash/fp/pullAllWith.js | 5 + .../node_modules/lodash/fp/pullAt.js | 5 + .../node_modules/lodash/fp/random.js | 5 + .../node_modules/lodash/fp/range.js | 5 + .../node_modules/lodash/fp/rangeRight.js | 5 + .../node_modules/lodash/fp/rangeStep.js | 5 + .../node_modules/lodash/fp/rangeStepRight.js | 5 + .../node_modules/lodash/fp/rearg.js | 5 + .../node_modules/lodash/fp/reduce.js | 5 + .../node_modules/lodash/fp/reduceRight.js | 5 + .../node_modules/lodash/fp/reject.js | 5 + .../node_modules/lodash/fp/remove.js | 5 + .../node_modules/lodash/fp/repeat.js | 5 + .../node_modules/lodash/fp/replace.js | 5 + .../node_modules/lodash/fp/rest.js | 5 + .../node_modules/lodash/fp/restFrom.js | 5 + .../node_modules/lodash/fp/result.js | 5 + .../node_modules/lodash/fp/reverse.js | 5 + .../node_modules/lodash/fp/round.js | 5 + .../node_modules/lodash/fp/sample.js | 5 + .../node_modules/lodash/fp/sampleSize.js | 5 + .../node_modules/lodash/fp/seq.js | 2 + .../node_modules/lodash/fp/set.js | 5 + .../node_modules/lodash/fp/setWith.js | 5 + .../node_modules/lodash/fp/shuffle.js | 5 + .../node_modules/lodash/fp/size.js | 5 + .../node_modules/lodash/fp/slice.js | 5 + .../node_modules/lodash/fp/snakeCase.js | 5 + .../node_modules/lodash/fp/some.js | 5 + .../node_modules/lodash/fp/sortBy.js | 5 + .../node_modules/lodash/fp/sortedIndex.js | 5 + .../node_modules/lodash/fp/sortedIndexBy.js | 5 + .../node_modules/lodash/fp/sortedIndexOf.js | 5 + .../node_modules/lodash/fp/sortedLastIndex.js | 5 + .../lodash/fp/sortedLastIndexBy.js | 5 + .../lodash/fp/sortedLastIndexOf.js | 5 + .../node_modules/lodash/fp/sortedUniq.js | 5 + .../node_modules/lodash/fp/sortedUniqBy.js | 5 + .../node_modules/lodash/fp/split.js | 5 + .../node_modules/lodash/fp/spread.js | 5 + .../node_modules/lodash/fp/spreadFrom.js | 5 + .../node_modules/lodash/fp/startCase.js | 5 + .../node_modules/lodash/fp/startsWith.js | 5 + .../node_modules/lodash/fp/string.js | 2 + .../node_modules/lodash/fp/stubArray.js | 5 + .../node_modules/lodash/fp/stubFalse.js | 5 + .../node_modules/lodash/fp/stubObject.js | 5 + .../node_modules/lodash/fp/stubString.js | 5 + .../node_modules/lodash/fp/stubTrue.js | 5 + .../node_modules/lodash/fp/subtract.js | 5 + .../node_modules/lodash/fp/sum.js | 5 + .../node_modules/lodash/fp/sumBy.js | 5 + .../lodash/fp/symmetricDifference.js | 1 + .../lodash/fp/symmetricDifferenceBy.js | 1 + .../lodash/fp/symmetricDifferenceWith.js | 1 + .../node_modules/lodash/fp/tail.js | 5 + .../node_modules/lodash/fp/take.js | 5 + .../node_modules/lodash/fp/takeLast.js | 1 + .../node_modules/lodash/fp/takeLastWhile.js | 1 + .../node_modules/lodash/fp/takeRight.js | 5 + .../node_modules/lodash/fp/takeRightWhile.js | 5 + .../node_modules/lodash/fp/takeWhile.js | 5 + .../node_modules/lodash/fp/tap.js | 5 + .../node_modules/lodash/fp/template.js | 5 + .../lodash/fp/templateSettings.js | 5 + .../node_modules/lodash/fp/throttle.js | 5 + .../node_modules/lodash/fp/thru.js | 5 + .../node_modules/lodash/fp/times.js | 5 + .../node_modules/lodash/fp/toArray.js | 5 + .../node_modules/lodash/fp/toFinite.js | 5 + .../node_modules/lodash/fp/toInteger.js | 5 + .../node_modules/lodash/fp/toIterator.js | 5 + .../node_modules/lodash/fp/toJSON.js | 5 + .../node_modules/lodash/fp/toLength.js | 5 + .../node_modules/lodash/fp/toLower.js | 5 + .../node_modules/lodash/fp/toNumber.js | 5 + .../node_modules/lodash/fp/toPairs.js | 5 + .../node_modules/lodash/fp/toPairsIn.js | 5 + .../node_modules/lodash/fp/toPath.js | 5 + .../node_modules/lodash/fp/toPlainObject.js | 5 + .../node_modules/lodash/fp/toSafeInteger.js | 5 + .../node_modules/lodash/fp/toString.js | 5 + .../node_modules/lodash/fp/toUpper.js | 5 + .../node_modules/lodash/fp/transform.js | 5 + .../node_modules/lodash/fp/trim.js | 5 + .../node_modules/lodash/fp/trimChars.js | 5 + .../node_modules/lodash/fp/trimCharsEnd.js | 5 + .../node_modules/lodash/fp/trimCharsStart.js | 5 + .../node_modules/lodash/fp/trimEnd.js | 5 + .../node_modules/lodash/fp/trimStart.js | 5 + .../node_modules/lodash/fp/truncate.js | 5 + .../node_modules/lodash/fp/unapply.js | 1 + .../node_modules/lodash/fp/unary.js | 5 + .../node_modules/lodash/fp/unescape.js | 5 + .../node_modules/lodash/fp/union.js | 5 + .../node_modules/lodash/fp/unionBy.js | 5 + .../node_modules/lodash/fp/unionWith.js | 5 + .../node_modules/lodash/fp/uniq.js | 5 + .../node_modules/lodash/fp/uniqBy.js | 5 + .../node_modules/lodash/fp/uniqWith.js | 5 + .../node_modules/lodash/fp/uniqueId.js | 5 + .../node_modules/lodash/fp/unnest.js | 1 + .../node_modules/lodash/fp/unset.js | 5 + .../node_modules/lodash/fp/unzip.js | 5 + .../node_modules/lodash/fp/unzipWith.js | 5 + .../node_modules/lodash/fp/update.js | 5 + .../node_modules/lodash/fp/updateWith.js | 5 + .../node_modules/lodash/fp/upperCase.js | 5 + .../node_modules/lodash/fp/upperFirst.js | 5 + .../node_modules/lodash/fp/useWith.js | 1 + .../node_modules/lodash/fp/util.js | 2 + .../node_modules/lodash/fp/value.js | 5 + .../node_modules/lodash/fp/valueOf.js | 5 + .../node_modules/lodash/fp/values.js | 5 + .../node_modules/lodash/fp/valuesIn.js | 5 + .../node_modules/lodash/fp/where.js | 1 + .../node_modules/lodash/fp/whereEq.js | 1 + .../node_modules/lodash/fp/without.js | 5 + .../node_modules/lodash/fp/words.js | 5 + .../node_modules/lodash/fp/wrap.js | 5 + .../node_modules/lodash/fp/wrapperAt.js | 5 + .../node_modules/lodash/fp/wrapperChain.js | 5 + .../node_modules/lodash/fp/wrapperLodash.js | 5 + .../node_modules/lodash/fp/wrapperReverse.js | 5 + .../node_modules/lodash/fp/wrapperValue.js | 5 + .../node_modules/lodash/fp/xor.js | 5 + .../node_modules/lodash/fp/xorBy.js | 5 + .../node_modules/lodash/fp/xorWith.js | 5 + .../node_modules/lodash/fp/zip.js | 5 + .../node_modules/lodash/fp/zipAll.js | 5 + .../node_modules/lodash/fp/zipObj.js | 1 + .../node_modules/lodash/fp/zipObject.js | 5 + .../node_modules/lodash/fp/zipObjectDeep.js | 5 + .../node_modules/lodash/fp/zipWith.js | 5 + .../node_modules/lodash/fromPairs.js | 28 + .../node_modules/lodash/function.js | 25 + .../node_modules/lodash/functions.js | 31 + .../node_modules/lodash/functionsIn.js | 31 + .../sequelize-cli/node_modules/lodash/get.js | 33 + .../node_modules/lodash/groupBy.js | 41 + .../sequelize-cli/node_modules/lodash/gt.js | 29 + .../sequelize-cli/node_modules/lodash/gte.js | 30 + .../sequelize-cli/node_modules/lodash/has.js | 35 + .../node_modules/lodash/hasIn.js | 34 + .../sequelize-cli/node_modules/lodash/head.js | 23 + .../node_modules/lodash/identity.js | 21 + .../node_modules/lodash/inRange.js | 55 + .../node_modules/lodash/includes.js | 53 + .../node_modules/lodash/index.js | 1 + .../node_modules/lodash/indexOf.js | 42 + .../node_modules/lodash/initial.js | 22 + .../node_modules/lodash/intersection.js | 30 + .../node_modules/lodash/intersectionBy.js | 45 + .../node_modules/lodash/intersectionWith.js | 41 + .../node_modules/lodash/invert.js | 27 + .../node_modules/lodash/invertBy.js | 44 + .../node_modules/lodash/invoke.js | 24 + .../node_modules/lodash/invokeMap.js | 41 + .../node_modules/lodash/isArguments.js | 36 + .../node_modules/lodash/isArray.js | 26 + .../node_modules/lodash/isArrayBuffer.js | 27 + .../node_modules/lodash/isArrayLike.js | 33 + .../node_modules/lodash/isArrayLikeObject.js | 33 + .../node_modules/lodash/isBoolean.js | 29 + .../node_modules/lodash/isBuffer.js | 38 + .../node_modules/lodash/isDate.js | 27 + .../node_modules/lodash/isElement.js | 25 + .../node_modules/lodash/isEmpty.js | 77 + .../node_modules/lodash/isEqual.js | 35 + .../node_modules/lodash/isEqualWith.js | 41 + .../node_modules/lodash/isError.js | 36 + .../node_modules/lodash/isFinite.js | 36 + .../node_modules/lodash/isFunction.js | 37 + .../node_modules/lodash/isInteger.js | 33 + .../node_modules/lodash/isLength.js | 35 + .../node_modules/lodash/isMap.js | 27 + .../node_modules/lodash/isMatch.js | 36 + .../node_modules/lodash/isMatchWith.js | 41 + .../node_modules/lodash/isNaN.js | 38 + .../node_modules/lodash/isNative.js | 40 + .../node_modules/lodash/isNil.js | 25 + .../node_modules/lodash/isNull.js | 22 + .../node_modules/lodash/isNumber.js | 38 + .../node_modules/lodash/isObject.js | 31 + .../node_modules/lodash/isObjectLike.js | 29 + .../node_modules/lodash/isPlainObject.js | 62 + .../node_modules/lodash/isRegExp.js | 27 + .../node_modules/lodash/isSafeInteger.js | 37 + .../node_modules/lodash/isSet.js | 27 + .../node_modules/lodash/isString.js | 30 + .../node_modules/lodash/isSymbol.js | 29 + .../node_modules/lodash/isTypedArray.js | 27 + .../node_modules/lodash/isUndefined.js | 22 + .../node_modules/lodash/isWeakMap.js | 28 + .../node_modules/lodash/isWeakSet.js | 28 + .../node_modules/lodash/iteratee.js | 53 + .../sequelize-cli/node_modules/lodash/join.js | 26 + .../node_modules/lodash/kebabCase.js | 28 + .../node_modules/lodash/keyBy.js | 36 + .../sequelize-cli/node_modules/lodash/keys.js | 37 + .../node_modules/lodash/keysIn.js | 32 + .../sequelize-cli/node_modules/lodash/lang.js | 58 + .../sequelize-cli/node_modules/lodash/last.js | 20 + .../node_modules/lodash/lastIndexOf.js | 46 + .../node_modules/lodash/lodash.js | 17084 ++ .../node_modules/lodash/lodash.min.js | 136 + .../node_modules/lodash/lowerCase.js | 27 + .../node_modules/lodash/lowerFirst.js | 22 + .../sequelize-cli/node_modules/lodash/lt.js | 29 + .../sequelize-cli/node_modules/lodash/lte.js | 30 + .../sequelize-cli/node_modules/lodash/map.js | 53 + .../node_modules/lodash/mapKeys.js | 36 + .../node_modules/lodash/mapValues.js | 43 + .../node_modules/lodash/matches.js | 39 + .../node_modules/lodash/matchesProperty.js | 37 + .../sequelize-cli/node_modules/lodash/math.js | 17 + .../sequelize-cli/node_modules/lodash/max.js | 29 + .../node_modules/lodash/maxBy.js | 34 + .../sequelize-cli/node_modules/lodash/mean.js | 22 + .../node_modules/lodash/meanBy.js | 31 + .../node_modules/lodash/memoize.js | 73 + .../node_modules/lodash/merge.js | 39 + .../node_modules/lodash/mergeWith.js | 39 + .../node_modules/lodash/method.js | 34 + .../node_modules/lodash/methodOf.js | 33 + .../sequelize-cli/node_modules/lodash/min.js | 29 + .../node_modules/lodash/minBy.js | 34 + .../node_modules/lodash/mixin.js | 74 + .../node_modules/lodash/multiply.js | 22 + .../node_modules/lodash/negate.js | 40 + .../sequelize-cli/node_modules/lodash/next.js | 35 + .../sequelize-cli/node_modules/lodash/noop.js | 17 + .../sequelize-cli/node_modules/lodash/now.js | 23 + .../sequelize-cli/node_modules/lodash/nth.js | 29 + .../node_modules/lodash/nthArg.js | 32 + .../node_modules/lodash/number.js | 5 + .../node_modules/lodash/object.js | 49 + .../sequelize-cli/node_modules/lodash/omit.js | 57 + .../node_modules/lodash/omitBy.js | 29 + .../sequelize-cli/node_modules/lodash/once.js | 25 + .../node_modules/lodash/orderBy.js | 47 + .../sequelize-cli/node_modules/lodash/over.js | 24 + .../node_modules/lodash/overArgs.js | 61 + .../node_modules/lodash/overEvery.js | 30 + .../node_modules/lodash/overSome.js | 30 + .../node_modules/lodash/package.json | 106 + .../sequelize-cli/node_modules/lodash/pad.js | 49 + .../node_modules/lodash/padEnd.js | 39 + .../node_modules/lodash/padStart.js | 39 + .../node_modules/lodash/parseInt.js | 43 + .../node_modules/lodash/partial.js | 50 + .../node_modules/lodash/partialRight.js | 49 + .../node_modules/lodash/partition.js | 43 + .../sequelize-cli/node_modules/lodash/pick.js | 25 + .../node_modules/lodash/pickBy.js | 37 + .../node_modules/lodash/plant.js | 48 + .../node_modules/lodash/property.js | 32 + .../node_modules/lodash/propertyOf.js | 30 + .../sequelize-cli/node_modules/lodash/pull.js | 29 + .../node_modules/lodash/pullAll.js | 29 + .../node_modules/lodash/pullAllBy.js | 33 + .../node_modules/lodash/pullAllWith.js | 32 + .../node_modules/lodash/pullAt.js | 43 + .../node_modules/lodash/random.js | 82 + .../node_modules/lodash/range.js | 46 + .../node_modules/lodash/rangeRight.js | 41 + .../node_modules/lodash/rearg.js | 33 + .../node_modules/lodash/reduce.js | 51 + .../node_modules/lodash/reduceRight.js | 36 + .../node_modules/lodash/reject.js | 46 + .../node_modules/lodash/remove.js | 53 + .../node_modules/lodash/repeat.js | 37 + .../node_modules/lodash/replace.js | 29 + .../sequelize-cli/node_modules/lodash/rest.js | 40 + .../node_modules/lodash/result.js | 56 + .../node_modules/lodash/reverse.js | 34 + .../node_modules/lodash/round.js | 26 + .../node_modules/lodash/sample.js | 24 + .../node_modules/lodash/sampleSize.js | 37 + .../sequelize-cli/node_modules/lodash/seq.js | 16 + .../sequelize-cli/node_modules/lodash/set.js | 35 + .../node_modules/lodash/setWith.js | 32 + .../node_modules/lodash/shuffle.js | 25 + .../sequelize-cli/node_modules/lodash/size.js | 46 + .../node_modules/lodash/slice.js | 37 + .../node_modules/lodash/snakeCase.js | 28 + .../sequelize-cli/node_modules/lodash/some.js | 51 + .../node_modules/lodash/sortBy.js | 48 + .../node_modules/lodash/sortedIndex.js | 24 + .../node_modules/lodash/sortedIndexBy.js | 33 + .../node_modules/lodash/sortedIndexOf.js | 31 + .../node_modules/lodash/sortedLastIndex.js | 25 + .../node_modules/lodash/sortedLastIndexBy.js | 33 + .../node_modules/lodash/sortedLastIndexOf.js | 31 + .../node_modules/lodash/sortedUniq.js | 24 + .../node_modules/lodash/sortedUniqBy.js | 26 + .../node_modules/lodash/split.js | 52 + .../node_modules/lodash/spread.js | 63 + .../node_modules/lodash/startCase.js | 29 + .../node_modules/lodash/startsWith.js | 39 + .../node_modules/lodash/string.js | 33 + .../node_modules/lodash/stubArray.js | 23 + .../node_modules/lodash/stubFalse.js | 18 + .../node_modules/lodash/stubObject.js | 23 + .../node_modules/lodash/stubString.js | 18 + .../node_modules/lodash/stubTrue.js | 18 + .../node_modules/lodash/subtract.js | 22 + .../sequelize-cli/node_modules/lodash/sum.js | 24 + .../node_modules/lodash/sumBy.js | 33 + .../sequelize-cli/node_modules/lodash/tail.js | 22 + .../sequelize-cli/node_modules/lodash/take.js | 37 + .../node_modules/lodash/takeRight.js | 39 + .../node_modules/lodash/takeRightWhile.js | 45 + .../node_modules/lodash/takeWhile.js | 45 + .../sequelize-cli/node_modules/lodash/tap.js | 29 + .../node_modules/lodash/template.js | 238 + .../node_modules/lodash/templateSettings.js | 67 + .../node_modules/lodash/throttle.js | 69 + .../sequelize-cli/node_modules/lodash/thru.js | 28 + .../node_modules/lodash/times.js | 51 + .../node_modules/lodash/toArray.js | 58 + .../node_modules/lodash/toFinite.js | 42 + .../node_modules/lodash/toInteger.js | 36 + .../node_modules/lodash/toIterator.js | 23 + .../node_modules/lodash/toJSON.js | 1 + .../node_modules/lodash/toLength.js | 38 + .../node_modules/lodash/toLower.js | 28 + .../node_modules/lodash/toNumber.js | 66 + .../node_modules/lodash/toPairs.js | 30 + .../node_modules/lodash/toPairsIn.js | 30 + .../node_modules/lodash/toPath.js | 33 + .../node_modules/lodash/toPlainObject.js | 32 + .../node_modules/lodash/toSafeInteger.js | 37 + .../node_modules/lodash/toString.js | 28 + .../node_modules/lodash/toUpper.js | 28 + .../node_modules/lodash/transform.js | 65 + .../sequelize-cli/node_modules/lodash/trim.js | 49 + .../node_modules/lodash/trimEnd.js | 43 + .../node_modules/lodash/trimStart.js | 43 + .../node_modules/lodash/truncate.js | 111 + .../node_modules/lodash/unary.js | 22 + .../node_modules/lodash/unescape.js | 34 + .../node_modules/lodash/union.js | 26 + .../node_modules/lodash/unionBy.js | 39 + .../node_modules/lodash/unionWith.js | 34 + .../sequelize-cli/node_modules/lodash/uniq.js | 25 + .../node_modules/lodash/uniqBy.js | 31 + .../node_modules/lodash/uniqWith.js | 28 + .../node_modules/lodash/uniqueId.js | 28 + .../node_modules/lodash/unset.js | 34 + .../node_modules/lodash/unzip.js | 45 + .../node_modules/lodash/unzipWith.js | 39 + .../node_modules/lodash/update.js | 35 + .../node_modules/lodash/updateWith.js | 33 + .../node_modules/lodash/upperCase.js | 27 + .../node_modules/lodash/upperFirst.js | 22 + .../sequelize-cli/node_modules/lodash/util.js | 34 + .../node_modules/lodash/value.js | 1 + .../node_modules/lodash/valueOf.js | 1 + .../node_modules/lodash/values.js | 34 + .../node_modules/lodash/valuesIn.js | 32 + .../node_modules/lodash/without.js | 31 + .../node_modules/lodash/words.js | 35 + .../sequelize-cli/node_modules/lodash/wrap.js | 30 + .../node_modules/lodash/wrapperAt.js | 48 + .../node_modules/lodash/wrapperChain.js | 34 + .../node_modules/lodash/wrapperLodash.js | 147 + .../node_modules/lodash/wrapperReverse.js | 44 + .../node_modules/lodash/wrapperValue.js | 21 + .../sequelize-cli/node_modules/lodash/xor.js | 28 + .../node_modules/lodash/xorBy.js | 39 + .../node_modules/lodash/xorWith.js | 34 + .../sequelize-cli/node_modules/lodash/zip.js | 22 + .../node_modules/lodash/zipObject.js | 24 + .../node_modules/lodash/zipObjectDeep.js | 23 + .../node_modules/lodash/zipWith.js | 32 + .../node_modules/yargs/CHANGELOG.md | 921 + .../sequelize-cli/node_modules/yargs/LICENSE | 22 + .../node_modules/yargs/README.md | 2017 + .../node_modules/yargs/completion.sh.hbs | 28 + .../sequelize-cli/node_modules/yargs/index.js | 31 + .../node_modules/yargs/lib/apply-extends.js | 41 + .../node_modules/yargs/lib/argsert.js | 72 + .../node_modules/yargs/lib/assign.js | 15 + .../node_modules/yargs/lib/command.js | 334 + .../node_modules/yargs/lib/completion.js | 104 + .../node_modules/yargs/lib/levenshtein.js | 47 + .../node_modules/yargs/lib/obj-filter.js | 10 + .../node_modules/yargs/lib/usage.js | 489 + .../node_modules/yargs/lib/validation.js | 363 + .../node_modules/yargs/lib/yerror.js | 10 + .../node_modules/yargs/locales/be.json | 39 + .../node_modules/yargs/locales/de.json | 39 + .../node_modules/yargs/locales/en.json | 40 + .../node_modules/yargs/locales/es.json | 39 + .../node_modules/yargs/locales/fr.json | 37 + .../node_modules/yargs/locales/hi.json | 39 + .../node_modules/yargs/locales/hu.json | 39 + .../node_modules/yargs/locales/id.json | 40 + .../node_modules/yargs/locales/it.json | 39 + .../node_modules/yargs/locales/ja.json | 39 + .../node_modules/yargs/locales/ko.json | 39 + .../node_modules/yargs/locales/nb.json | 37 + .../node_modules/yargs/locales/nl.json | 39 + .../node_modules/yargs/locales/pirate.json | 12 + .../node_modules/yargs/locales/pl.json | 39 + .../node_modules/yargs/locales/pt.json | 38 + .../node_modules/yargs/locales/pt_BR.json | 40 + .../node_modules/yargs/locales/ru.json | 39 + .../node_modules/yargs/locales/th.json | 39 + .../node_modules/yargs/locales/tr.json | 39 + .../node_modules/yargs/locales/zh_CN.json | 37 + .../node_modules/yargs/locales/zh_TW.json | 40 + .../node_modules/yargs/package.json | 155 + .../sequelize-cli/node_modules/yargs/yargs.js | 1126 + node_modules/sequelize-cli/package.json | 144 + node_modules/sequelize-cli/test/.jshintrc | 14 + .../test/db/migrate-json.test.js | 123 + .../sequelize-cli/test/db/migrate.test.js | 254 + .../test/db/migrate/old_schema.test.js | 204 + .../test/db/migrate/status.test.js | 26 + .../test/db/migrate/undo.test.js | 99 + .../test/db/migrate/undo/all.test.js | 69 + .../sequelize-cli/test/db/seed-json.test.js | 97 + .../sequelize-cli/test/db/seed.test.js | 116 + .../sequelize-cli/test/db/seed/all.test.js | 109 + .../sequelize-cli/test/db/seed/undo.test.js | 61 + .../test/db/seed/undo/all.test.js | 91 + .../test/environment-variable.test.js | 34 + node_modules/sequelize-cli/test/help.test.js | 21 + node_modules/sequelize-cli/test/init.test.js | 121 + .../test/migration/create.test.js | 68 + .../sequelize-cli/test/model/create.test.js | 243 + .../sequelize-cli/test/options.test.js | 50 + .../sequelize-cli/test/seed/create.test.js | 68 + .../20111117063700-createPerson.coffee | 13 + .../migrations/20111117063700-createPerson.js | 21 + .../20111130161100-emptyMigration.js | 10 + .../20111205064000-renamePersonToUser.js | 13 + ...20111205162700-addSignatureColumnToUser.js | 50 + ...0111205167000-addUniqueNameColumnToUser.js | 25 + ...111206061400-removeShopIdColumnFromUser.js | 16 + ...-changeSignatureColumnOfUserToMendatory.js | 17 + ...163300-renameSignatureColumnOfUserToSig.js | 13 + ...0130909174103-createFunctionGetAnAnswer.js | 12 + ...3-renameFunctionGetAnAnswerGetTheAnswer.js | 12 + ...130909175000-deleteFunctionGetTheAnswer.js | 12 + ...0130909175939-createTestTableForTrigger.js | 23 + ...9180846-createTriggerOnTriggerTestTable.js | 22 + ...renameTriggerUpdatedAtToUpdateUpdatedAt.js | 12 + ...0909185621-deleteTriggerUpdateUpdatedAt.js | 23 + .../20141208213500-createPerson.coffee | 10 + .../invalid/20141208213500-createPerson.js | 13 + .../new/20141208213500-createPerson.coffee | 11 + .../new/20141208213500-createPerson.js | 17 + .../test/support/assets/project.js | 7 + .../seeders/20111117063700-seedPerson.coffee | 12 + .../seeders/20111117063700-seedPerson.js | 18 + .../seeders/20111117063900-seedPerson2.js | 19 + .../new/20141208213500-seedPerson.coffee | 11 + .../new/20141208213500-seedPerson.coffee~ | 11 + .../seeders/new/20141208213500-seedPerson.js | 16 + .../test/support/config/config.js | 56 + .../test/support/config/options.js | 8 + .../sequelize-cli/test/support/helpers.js | 203 + .../sequelize-cli/test/support/index.js | 235 + node_modules/sequelize-cli/test/url.test.js | 63 + .../sequelize-cli/test/version.test.js | 28 + .../sequelize-cli/var/vagrant/README.md | 14 + .../sequelize-cli/var/vagrant/Vagrantfile | 27 + .../sequelize-cli/var/vagrant/provision.sh | 24 + node_modules/sequelize/.dockerignore | 13 + node_modules/sequelize/.editorconfig | 24 + .../sequelize/.github/ISSUE_TEMPLATE.md | 28 + .../.github/PULL_REQUEST_TEMPLATE.md | 19 + node_modules/sequelize/.gitmodules | 0 .../sequelize/.idea/dictionaries/jan.xml | 11 + node_modules/sequelize/.idea/encodings.xml | 6 + .../inspectionProfiles/Project_Default.xml | 7 + .../inspectionProfiles/profiles_settings.xml | 7 + .../sequelize/.idea/jsLibraryMappings.xml | 8 + .../sequelize/.idea/jsLinters/jshint.xml | 83 + node_modules/sequelize/.idea/misc.xml | 6 + node_modules/sequelize/.idea/modules.xml | 8 + node_modules/sequelize/.idea/sequelize.iml | 11 + node_modules/sequelize/.idea/vcs.xml | 6 + node_modules/sequelize/.idea/watcherTasks.xml | 4 + node_modules/sequelize/.idea/workspace.xml | 1072 + node_modules/sequelize/.jshintrc | 48 + node_modules/sequelize/.npmignore | 9 + node_modules/sequelize/.travis.yml | 43 + node_modules/sequelize/CONTRIBUTING.DOCS.md | 26 + node_modules/sequelize/CONTRIBUTING.md | 196 + node_modules/sequelize/Dockerfile | 9 + node_modules/sequelize/LICENSE | 4 + node_modules/sequelize/README.md | 45 + node_modules/sequelize/appveyor-setup.ps1 | 42 + node_modules/sequelize/appveyor.yml | 47 + node_modules/sequelize/changelog.md | 1147 + node_modules/sequelize/codecov.yml | 4 + node_modules/sequelize/docker-compose.yml | 27 + node_modules/sequelize/index.js | 7 + .../sequelize/lib/associations/base.js | 28 + .../lib/associations/belongs-to-many.js | 790 + .../sequelize/lib/associations/belongs-to.js | 261 + .../sequelize/lib/associations/has-many.js | 552 + .../sequelize/lib/associations/has-one.js | 276 + .../sequelize/lib/associations/helpers.js | 49 + .../sequelize/lib/associations/index.js | 9 + .../sequelize/lib/associations/mixin.js | 287 + node_modules/sequelize/lib/data-types.js | 993 + node_modules/sequelize/lib/deferrable.js | 155 + .../dialects/abstract/connection-manager.js | 261 + .../sequelize/lib/dialects/abstract/index.js | 64 + .../lib/dialects/abstract/query-generator.js | 2477 + .../sequelize/lib/dialects/abstract/query.js | 708 + .../sequelize/lib/dialects/mariadb/index.js | 13 + .../lib/dialects/mssql/connection-manager.js | 147 + .../lib/dialects/mssql/data-types.js | 204 + .../sequelize/lib/dialects/mssql/index.js | 61 + .../lib/dialects/mssql/query-generator.js | 877 + .../lib/dialects/mssql/query-interface.js | 67 + .../sequelize/lib/dialects/mssql/query.js | 339 + .../lib/dialects/mssql/resource-lock.js | 25 + .../lib/dialects/mysql/connection-manager.js | 145 + .../lib/dialects/mysql/data-types.js | 124 + .../sequelize/lib/dialects/mysql/index.js | 50 + .../lib/dialects/mysql/query-generator.js | 385 + .../lib/dialects/mysql/query-interface.js | 51 + .../sequelize/lib/dialects/mysql/query.js | 209 + .../sequelize/lib/dialects/parserStore.js | 20 + .../dialects/postgres/connection-manager.js | 189 + .../lib/dialects/postgres/data-types.js | 432 + .../sequelize/lib/dialects/postgres/hstore.js | 18 + .../sequelize/lib/dialects/postgres/index.js | 60 + .../lib/dialects/postgres/query-generator.js | 902 + .../sequelize/lib/dialects/postgres/query.js | 369 + .../sequelize/lib/dialects/postgres/range.js | 81 + .../lib/dialects/sqlite/connection-manager.js | 87 + .../lib/dialects/sqlite/data-types.js | 193 + .../sequelize/lib/dialects/sqlite/index.js | 44 + .../lib/dialects/sqlite/query-generator.js | 398 + .../lib/dialects/sqlite/query-interface.js | 113 + .../sequelize/lib/dialects/sqlite/query.js | 385 + node_modules/sequelize/lib/errors.js | 316 + node_modules/sequelize/lib/hooks.js | 501 + .../sequelize/lib/instance-validator.js | 360 + node_modules/sequelize/lib/instance.js | 1098 + node_modules/sequelize/lib/model-manager.js | 103 + node_modules/sequelize/lib/model.js | 2706 + node_modules/sequelize/lib/model/attribute.js | 10 + .../sequelize/lib/plugins/counter-cache.js | 177 + node_modules/sequelize/lib/promise.js | 55 + node_modules/sequelize/lib/query-interface.js | 940 + node_modules/sequelize/lib/query-types.js | 17 + node_modules/sequelize/lib/sequelize.js | 1409 + node_modules/sequelize/lib/sql-string.js | 102 + node_modules/sequelize/lib/transaction.js | 313 + node_modules/sequelize/lib/utils.js | 478 + .../lib/utils/parameter-validator.js | 57 + .../sequelize/lib/utils/validator-extras.js | 90 + node_modules/sequelize/mkdocs.yml | 45 + .../sequelize/node_modules/.bin/semver | 1 + .../node_modules/generic-pool/.eslintrc.js | 6 + .../node_modules/generic-pool/.npmignore | 4 + .../node_modules/generic-pool/.travis.yml | 21 + .../node_modules/generic-pool/CHANGELOG.md | 124 + .../node_modules/generic-pool/Makefile | 31 + .../node_modules/generic-pool/README.md | 298 + .../node_modules/generic-pool/bugs/128.js | 112 + .../node_modules/generic-pool/fabfile.py | 27 + .../generic-pool/lib/generic-pool.js | 565 + .../node_modules/generic-pool/package.json | 146 + .../generic-pool/test/generic-pool.test.js | 751 + .../sequelize/node_modules/semver/LICENSE | 15 + .../sequelize/node_modules/semver/README.md | 350 + .../sequelize/node_modules/semver/bin/semver | 133 + .../node_modules/semver/package.json | 94 + .../sequelize/node_modules/semver/range.bnf | 16 + .../sequelize/node_modules/semver/semver.js | 1203 + node_modules/sequelize/package.json | 211 + node_modules/sequelize/sscce_template.js | 8 + node_modules/sequelize/test-app.js | 47 + node_modules/sequencify/.npmignore | 9 + node_modules/sequencify/.travis.yml | 6 + node_modules/sequencify/LICENSE | 20 + node_modules/sequencify/README.md | 68 + node_modules/sequencify/index.js | 46 + node_modules/sequencify/package.json | 96 + node_modules/serve-favicon/HISTORY.md | 123 + node_modules/serve-favicon/LICENSE | 25 + node_modules/serve-favicon/README.md | 136 + node_modules/serve-favicon/index.js | 177 + node_modules/serve-favicon/package.json | 107 + node_modules/serve-static/HISTORY.md | 340 + node_modules/serve-static/LICENSE | 25 + node_modules/serve-static/README.md | 249 + node_modules/serve-static/index.js | 188 + node_modules/serve-static/package.json | 107 + node_modules/set-blocking/CHANGELOG.md | 26 + node_modules/set-blocking/LICENSE.txt | 14 + node_modules/set-blocking/README.md | 31 + node_modules/set-blocking/index.js | 7 + node_modules/set-blocking/package.json | 106 + node_modules/setprototypeof/LICENSE | 13 + node_modules/setprototypeof/README.md | 21 + node_modules/setprototypeof/index.js | 13 + node_modules/setprototypeof/package.json | 88 + node_modules/shebang-command/index.js | 19 + node_modules/shebang-command/license | 21 + node_modules/shebang-command/package.json | 106 + node_modules/shebang-command/readme.md | 39 + node_modules/shebang-regex/index.js | 2 + node_modules/shebang-regex/license | 21 + node_modules/shebang-regex/package.json | 96 + node_modules/shebang-regex/readme.md | 29 + node_modules/shimmer/.npmignore | 2 + node_modules/shimmer/.travis.yml | 10 + node_modules/shimmer/README.md | 74 + node_modules/shimmer/index.js | 88 + node_modules/shimmer/package.json | 92 + node_modules/shimmer/test/init.tap.js | 48 + node_modules/shimmer/test/massWrap.tap.js | 174 + node_modules/shimmer/test/unwrap.tap.js | 101 + node_modules/shimmer/test/wrap.tap.js | 128 + node_modules/sigmund/LICENSE | 15 + node_modules/sigmund/README.md | 53 + node_modules/sigmund/bench.js | 283 + node_modules/sigmund/package.json | 94 + node_modules/sigmund/sigmund.js | 39 + node_modules/sigmund/test/basic.js | 24 + node_modules/source-map/README.md | 510 + node_modules/source-map/build/assert-shim.js | 56 + node_modules/source-map/build/mini-require.js | 152 + .../source-map/build/prefix-source-map.jsm | 21 + .../source-map/build/prefix-utils.jsm | 18 + .../source-map/build/suffix-browser.js | 8 + .../source-map/build/suffix-source-map.jsm | 6 + .../source-map/build/suffix-utils.jsm | 21 + node_modules/source-map/build/test-prefix.js | 8 + node_modules/source-map/build/test-suffix.js | 3 + node_modules/source-map/lib/source-map.js | 8 + .../source-map/lib/source-map/array-set.js | 107 + .../source-map/lib/source-map/base64-vlq.js | 146 + .../source-map/lib/source-map/base64.js | 73 + .../lib/source-map/binary-search.js | 117 + .../source-map/lib/source-map/mapping-list.js | 86 + .../source-map/lib/source-map/quick-sort.js | 120 + .../lib/source-map/source-map-consumer.js | 1077 + .../lib/source-map/source-map-generator.js | 399 + .../source-map/lib/source-map/source-node.js | 414 + .../source-map/lib/source-map/util.js | 370 + node_modules/source-map/package.json | 234 + node_modules/sparkles/LICENSE | 22 + node_modules/sparkles/README.md | 41 + node_modules/sparkles/index.js | 45 + node_modules/sparkles/package.json | 104 + node_modules/spdx-correct/LICENSE | 57 + node_modules/spdx-correct/README.md | 10 + node_modules/spdx-correct/index.js | 237 + node_modules/spdx-correct/package.json | 98 + node_modules/spdx-expression-parse/AUTHORS | 3 + node_modules/spdx-expression-parse/LICENSE | 22 + node_modules/spdx-expression-parse/README.md | 83 + node_modules/spdx-expression-parse/index.js | 5 + .../spdx-expression-parse/package.json | 125 + node_modules/spdx-expression-parse/parser.js | 1357 + node_modules/spdx-license-ids/LICENSE | 24 + node_modules/spdx-license-ids/README.md | 55 + node_modules/spdx-license-ids/package.json | 116 + .../spdx-license-ids/spdx-license-ids.json | 334 + node_modules/split/.npmignore | 3 + node_modules/split/.travis.yml | 3 + node_modules/split/LICENCE | 22 + node_modules/split/examples/pretty.js | 26 + node_modules/split/index.js | 63 + node_modules/split/package.json | 91 + node_modules/split/readme.markdown | 72 + node_modules/split/test/options.asynct.js | 46 + .../split/test/partitioned_unicode.js | 34 + node_modules/split/test/split.asynct.js | 137 + node_modules/split/test/try_catch.asynct.js | 51 + node_modules/statuses/HISTORY.md | 55 + node_modules/statuses/LICENSE | 23 + node_modules/statuses/README.md | 103 + node_modules/statuses/codes.json | 65 + node_modules/statuses/index.js | 110 + node_modules/statuses/package.json | 140 + node_modules/stream-consume/.npmignore | 1 + node_modules/stream-consume/README.md | 53 + node_modules/stream-consume/index.js | 14 + node_modules/stream-consume/package.json | 82 + node_modules/stream-consume/test/tests.js | 180 + node_modules/string-width/index.js | 37 + node_modules/string-width/license | 21 + node_modules/string-width/package.json | 125 + node_modules/string-width/readme.md | 42 + node_modules/string_decoder/.npmignore | 2 + node_modules/string_decoder/LICENSE | 20 + node_modules/string_decoder/README.md | 7 + node_modules/string_decoder/index.js | 221 + node_modules/string_decoder/package.json | 89 + node_modules/strip-ansi/index.js | 6 + node_modules/strip-ansi/license | 21 + node_modules/strip-ansi/package.json | 126 + node_modules/strip-ansi/readme.md | 33 + node_modules/strip-bom/cli.js | 42 + node_modules/strip-bom/index.js | 24 + node_modules/strip-bom/package.json | 113 + node_modules/strip-bom/readme.md | 59 + node_modules/supports-color/index.js | 50 + node_modules/supports-color/license | 21 + node_modules/supports-color/package.json | 113 + node_modules/supports-color/readme.md | 36 + .../terraformer-wkt-parser/.npmignore | 1 + .../terraformer-wkt-parser/.travis.yml | 8 + node_modules/terraformer-wkt-parser/AUTHORS | 2 + .../terraformer-wkt-parser/CHANGELOG.md | 38 + .../terraformer-wkt-parser/Gruntfile.js | 135 + node_modules/terraformer-wkt-parser/LICENSE | 7 + node_modules/terraformer-wkt-parser/README.md | 68 + .../terraformer-wkt-parser/bower.json | 8 + .../coverage/__root__/index.html | 93 + .../__root__/terraformer-wkt-parser.js.html | 2348 + .../terraformer-wkt-parser/coverage/base.css | 213 + .../coverage/coverage.json | 1 + .../coverage/dist/index.html | 93 + .../dist/terraformer-wkt-parser.js.html | 2348 + .../coverage/index.html | 93 + .../coverage/prettify.css | 1 + .../coverage/prettify.js | 1 + .../coverage/sort-arrow-sprite.png | Bin 0 -> 209 bytes .../terraformer-wkt-parser/coverage/sorter.js | 158 + .../dist/terraformer-wkt-parser.js | 761 + .../dist/terraformer-wkt-parser.min.js | 4 + .../examples/feature_collection.json | 48 + .../examples/linestring.json | 7 + .../examples/linestring.wkt | 1 + .../examples/multi_linestring.json | 13 + .../examples/multi_linestring.wkt | 2 + .../examples/multi_polygon.json | 30 + .../examples/multi_polygon.wkt | 2 + .../examples/multi_polygon_with_hole.wkt | 3 + .../examples/multipoint.json | 7 + .../examples/multipoint.wkt | 1 + .../examples/multipoint_alternate.wkt | 1 + .../examples/point.json | 4 + .../terraformer-wkt-parser/examples/point.wkt | 1 + .../examples/polygon.json | 12 + .../examples/polygon.wkt | 1 + .../examples/polygon_with_dots.wkt | 1 + .../examples/polygon_with_hole.json | 19 + .../examples/polygon_with_hole.wkt | 2 + .../terraformer-wkt-parser/package.json | 119 + .../terraformer-wkt-parser/spec/wktSpec.js | 718 + .../src/module-source.js | 320 + .../terraformer-wkt-parser/src/wkt.yy | 178 + .../terraformer-wkt-parser.d.ts | 8 + .../terraformer-wkt-parser.js | 761 + .../terraformer-wkt-parser.min.js | 4 + node_modules/terraformer-wkt-parser/test.js | 10 + node_modules/terraformer-wkt-parser/test.ts | 12 + .../test/convert-test.js | 121 + .../test/terraformer-parse-test.js | 93 + .../test/wkt-parse-test.js | 290 + .../terraformer-wkt-parser/tsconfig.json | 11 + .../terraformer-wkt-parser/typings.json | 8 + .../typings/globals/geojson/index.d.ts | 129 + .../typings/globals/geojson/typings.json | 8 + .../terraformer-wkt-parser/typings/index.d.ts | 1 + .../terraformer/.coverage/__root__/index.html | 93 + .../.coverage/__root__/terraformer.js.html | 4319 + node_modules/terraformer/.coverage/base.css | 213 + .../terraformer/.coverage/coverage.json | 1 + node_modules/terraformer/.coverage/index.html | 93 + .../terraformer/.coverage/prettify.css | 1 + .../terraformer/.coverage/prettify.js | 1 + .../.coverage/sort-arrow-sprite.png | Bin 0 -> 209 bytes node_modules/terraformer/.coverage/sorter.js | 158 + node_modules/terraformer/.npmignore | 14 + node_modules/terraformer/.travis.yml | 9 + node_modules/terraformer/CHANGELOG.md | 78 + node_modules/terraformer/Gemfile | 7 + node_modules/terraformer/Gemfile.lock | 101 + node_modules/terraformer/LICENSE | 7 + node_modules/terraformer/README.md | 125 + node_modules/terraformer/bower.json | 13 + node_modules/terraformer/docs-build/CNAME | 1 + .../docs-build/arcgis-parser/index.html | 197 + .../assets/css/terraformer-02847305.css | 1 + .../assets/fonts/esri-logo-3a94862e.svg | 283 + .../assets/fonts/esri-logo-71163913.ttf | Bin 0 -> 7860 bytes .../assets/fonts/esri-logo-80bed756.woff | Bin 0 -> 14468 bytes .../assets/fonts/esri-logo-fc93d7bf.eot | Bin 0 -> 8026 bytes .../assets/fonts/esri-logo.dev-aed9f839.svg | 283 + .../images/terraformer-arcparser-a0228324.png | Bin 0 -> 39315 bytes .../images/terraformer-core-93b83c36.png | Bin 0 -> 44547 bytes .../images/terraformer-geostore-9e09ce2c.png | Bin 0 -> 50945 bytes .../images/terraformer-parser-a57c9c2d.png | Bin 0 -> 24986 bytes .../images/terraformer-wktparser-b18bc9d9.png | Bin 0 -> 38482 bytes .../assets/javascripts/all-da39a3ee.js | 0 .../assets/javascripts/classie-b6db1f70.js | 1 + .../assets/javascripts/drawer-3a1490eb.js | 1 + .../javascripts/modernizr.custom-cadc78a2.js | 1 + .../terraformer/docs-build/core/index.html | 795 + .../terraformer/docs-build/favicon.ico | Bin 0 -> 6518 bytes .../geostore/alternate-indexes/index.html | 210 + .../geostore/core-concepts/index.html | 97 + .../geostore/data-stores/index.html | 251 + .../docs-build/geostore/index.html | 409 + .../geostore/spatial-indexes/index.html | 250 + .../docs-build/getting-started/index.html | 177 + .../docs-build/glossary/index.html | 449 + .../terraformer/docs-build/index.html | 172 + .../terraformer/docs-build/install/index.html | 155 + .../docs-build/partials/cover/index.html | 10 + .../docs-build/partials/doctoc/index.html | 23 + .../docs-build/partials/footer/index.html | 5 + .../index_partials/arcgis_parser/index.html | 25 + .../index_partials/geostore/index.html | 20 + .../terraformer_core/index.html | 18 + .../index_partials/wkt_parser/index.html | 22 + .../docs-build/partials/nav/index.html | 16 + .../docs-build/partials/subnav/index.html | 30 + .../docs-build/wkt-parser/index.html | 147 + node_modules/terraformer/gruntfile.js | 161 + node_modules/terraformer/package.json | 121 + node_modules/terraformer/release.sh | 37 + .../terraformer/spec/geojsonHelpers.js | 392 + .../terraformer/spec/spatialReferenceSpec.js | 537 + .../terraformer/spec/terraformerSpec.js | 1145 + .../terraformer/terraformer-1.0.8.min.js | 4 + node_modules/terraformer/terraformer.d.ts | 324 + node_modules/terraformer/terraformer.js | 1418 + node_modules/terraformer/test.js | 95 + node_modules/terraformer/test.ts | 121 + node_modules/terraformer/tsconfig.json | 12 + node_modules/terraformer/tslint.json | 17 + node_modules/through/.travis.yml | 5 + node_modules/through/LICENSE.APACHE2 | 15 + node_modules/through/LICENSE.MIT | 24 + node_modules/through/index.js | 108 + node_modules/through/package.json | 100 + node_modules/through/readme.markdown | 64 + node_modules/through/test/async.js | 28 + node_modules/through/test/auto-destroy.js | 30 + node_modules/through/test/buffering.js | 71 + node_modules/through/test/end.js | 45 + node_modules/through/test/index.js | 133 + node_modules/through2/.npmignore | 3 + node_modules/through2/LICENSE.html | 336 + node_modules/through2/LICENSE.md | 9 + node_modules/through2/README.md | 136 + .../node_modules/readable-stream/.npmignore | 9 + .../node_modules/readable-stream/.travis.yml | 49 + .../readable-stream/CONTRIBUTING.md | 38 + .../readable-stream/GOVERNANCE.md | 136 + .../node_modules/readable-stream/LICENSE | 47 + .../node_modules/readable-stream/README.md | 57 + .../doc/wg-meetings/2015-01-30.md | 60 + .../readable-stream/duplex-browser.js | 1 + .../node_modules/readable-stream/duplex.js | 1 + .../readable-stream/lib/_stream_duplex.js | 75 + .../lib/_stream_passthrough.js | 26 + .../readable-stream/lib/_stream_readable.js | 935 + .../readable-stream/lib/_stream_transform.js | 182 + .../readable-stream/lib/_stream_writable.js | 544 + .../lib/internal/streams/BufferList.js | 64 + .../lib/internal/streams/stream-browser.js | 1 + .../lib/internal/streams/stream.js | 1 + .../node_modules/readable-stream/package.json | 134 + .../readable-stream/passthrough.js | 1 + .../readable-stream/readable-browser.js | 7 + .../node_modules/readable-stream/readable.js | 19 + .../node_modules/readable-stream/transform.js | 1 + .../readable-stream/writable-browser.js | 1 + .../node_modules/readable-stream/writable.js | 8 + .../node_modules/string_decoder/.npmignore | 2 + .../node_modules/string_decoder/LICENSE | 48 + .../node_modules/string_decoder/README.md | 30 + .../string_decoder/lib/string_decoder.js | 273 + .../node_modules/string_decoder/package.json | 95 + node_modules/through2/package.json | 111 + node_modules/through2/through2.js | 96 + node_modules/tildify/index.js | 9 + node_modules/tildify/license | 21 + node_modules/tildify/package.json | 108 + node_modules/tildify/readme.md | 30 + node_modules/time-stamp/LICENSE | 21 + node_modules/time-stamp/README.md | 121 + node_modules/time-stamp/index.js | 47 + node_modules/time-stamp/package.json | 136 + node_modules/timers-ext/.lint | 17 + node_modules/timers-ext/.npmignore | 4 + node_modules/timers-ext/.travis.yml | 12 + node_modules/timers-ext/CHANGES | 21 + node_modules/timers-ext/LICENSE | 21 + node_modules/timers-ext/README.md | 55 + node_modules/timers-ext/delay.js | 19 + node_modules/timers-ext/max-timeout.js | 3 + node_modules/timers-ext/once.js | 41 + node_modules/timers-ext/package.json | 102 + node_modules/timers-ext/test/delay.js | 23 + node_modules/timers-ext/test/max-timeout.js | 11 + node_modules/timers-ext/test/once.js | 38 + node_modules/timers-ext/test/throttle.js | 33 + node_modules/timers-ext/test/valid-timeout.js | 8 + node_modules/timers-ext/throttle.js | 33 + node_modules/timers-ext/valid-timeout.js | 10 + node_modules/toposort-class/.eslintrc | 35 + node_modules/toposort-class/.gitattributes | 1 + node_modules/toposort-class/.npmignore | 44 + node_modules/toposort-class/LICENSE | 21 + node_modules/toposort-class/README.md | 93 + .../benchmark/0.3.1/toposort.js | 128 + .../toposort-class/benchmark/README.md | 11 + .../toposort-class/benchmark/general.js | 56 + .../toposort-class/benchmark/results.csv | 4 + node_modules/toposort-class/build/toposort.js | 281 + .../toposort-class/build/toposort.min.js | 1 + node_modules/toposort-class/index.js | 1 + node_modules/toposort-class/package.json | 102 + node_modules/transformers/.npmignore | 2 + node_modules/transformers/README.md | 141 + node_modules/transformers/history.md | 77 + node_modules/transformers/lib/shared.js | 162 + node_modules/transformers/lib/transformers.js | 604 + .../transformers/node_modules/.bin/uglifyjs | 1 + .../node_modules/is-promise/.npmignore | 6 + .../node_modules/is-promise/.travis.yml | 3 + .../node_modules/is-promise/LICENSE | 19 + .../node_modules/is-promise/index.js | 5 + .../node_modules/is-promise/package.json | 80 + .../node_modules/is-promise/readme.md | 29 + .../node_modules/promise/.npmignore | 6 + .../node_modules/promise/Readme.md | 85 + .../node_modules/promise/index.js | 164 + .../node_modules/promise/package.json | 83 + .../node_modules/source-map/.npmignore | 2 + .../node_modules/source-map/.travis.yml | 4 + .../node_modules/source-map/CHANGELOG.md | 194 + .../node_modules/source-map/LICENSE | 28 + .../source-map/Makefile.dryice.js | 166 + .../node_modules/source-map/README.md | 475 + .../source-map/build/assert-shim.js | 56 + .../source-map/build/mini-require.js | 152 + .../source-map/build/prefix-source-map.jsm | 20 + .../source-map/build/prefix-utils.jsm | 18 + .../source-map/build/suffix-browser.js | 8 + .../source-map/build/suffix-source-map.jsm | 6 + .../source-map/build/suffix-utils.jsm | 21 + .../source-map/build/test-prefix.js | 8 + .../source-map/build/test-suffix.js | 3 + .../node_modules/source-map/lib/source-map.js | 8 + .../source-map/lib/source-map/array-set.js | 97 + .../source-map/lib/source-map/base64-vlq.js | 142 + .../source-map/lib/source-map/base64.js | 42 + .../lib/source-map/binary-search.js | 80 + .../source-map/lib/source-map/mapping-list.js | 86 + .../lib/source-map/source-map-consumer.js | 575 + .../lib/source-map/source-map-generator.js | 400 + .../source-map/lib/source-map/source-node.js | 414 + .../source-map/lib/source-map/util.js | 319 + .../node_modules/source-map/package.json | 219 + .../node_modules/source-map/test/run-tests.js | 62 + .../source-map/test/source-map/test-api.js | 26 + .../test/source-map/test-array-set.js | 104 + .../test/source-map/test-base64-vlq.js | 23 + .../source-map/test/source-map/test-base64.js | 35 + .../test/source-map/test-binary-search.js | 54 + .../test/source-map/test-dog-fooding.js | 84 + .../source-map/test-source-map-consumer.js | 702 + .../source-map/test-source-map-generator.js | 679 + .../test/source-map/test-source-node.js | 612 + .../source-map/test/source-map/test-util.js | 216 + .../source-map/test/source-map/util.js | 192 + .../node_modules/uglify-js/.npmignore | 2 + .../node_modules/uglify-js/README.md | 544 + .../node_modules/uglify-js/bin/uglifyjs | 370 + .../node_modules/uglify-js/lib/ast.js | 964 + .../node_modules/uglify-js/lib/compress.js | 1968 + .../node_modules/uglify-js/lib/mozilla-ast.js | 265 + .../node_modules/uglify-js/lib/output.js | 1220 + .../node_modules/uglify-js/lib/parse.js | 1407 + .../node_modules/uglify-js/lib/scope.js | 580 + .../node_modules/uglify-js/lib/sourcemap.js | 81 + .../node_modules/uglify-js/lib/transform.js | 218 + .../node_modules/uglify-js/lib/utils.js | 288 + .../node_modules/uglify-js/package.json | 96 + .../uglify-js/test/compress/arrays.js | 12 + .../uglify-js/test/compress/blocks.js | 49 + .../uglify-js/test/compress/conditionals.js | 143 + .../uglify-js/test/compress/dead-code.js | 89 + .../uglify-js/test/compress/debugger.js | 24 + .../uglify-js/test/compress/drop-unused.js | 97 + .../uglify-js/test/compress/issue-105.js | 17 + .../uglify-js/test/compress/issue-12.js | 11 + .../uglify-js/test/compress/issue-22.js | 17 + .../uglify-js/test/compress/issue-44.js | 31 + .../uglify-js/test/compress/issue-59.js | 30 + .../uglify-js/test/compress/labels.js | 163 + .../uglify-js/test/compress/loops.js | 123 + .../uglify-js/test/compress/properties.js | 25 + .../uglify-js/test/compress/sequences.js | 161 + .../uglify-js/test/compress/switch.js | 210 + .../node_modules/uglify-js/test/run-tests.js | 170 + .../node_modules/uglify-js/tools/node.js | 164 + node_modules/transformers/package.json | 131 + node_modules/type-is/HISTORY.md | 218 + node_modules/type-is/LICENSE | 23 + node_modules/type-is/README.md | 146 + node_modules/type-is/index.js | 262 + node_modules/type-is/package.json | 122 + node_modules/uglify-js/LICENSE | 29 + node_modules/uglify-js/README.md | 1001 + node_modules/uglify-js/bin/extract-props.js | 77 + node_modules/uglify-js/bin/uglifyjs | 635 + node_modules/uglify-js/lib/ast.js | 1051 + node_modules/uglify-js/lib/compress.js | 3997 + node_modules/uglify-js/lib/mozilla-ast.js | 609 + node_modules/uglify-js/lib/output.js | 1424 + node_modules/uglify-js/lib/parse.js | 1572 + node_modules/uglify-js/lib/propmangle.js | 264 + node_modules/uglify-js/lib/scope.js | 661 + node_modules/uglify-js/lib/sourcemap.js | 97 + node_modules/uglify-js/lib/transform.js | 218 + node_modules/uglify-js/lib/utils.js | 362 + .../node_modules/source-map/CHANGELOG.md | 301 + .../uglify-js/node_modules/source-map/LICENSE | 28 + .../node_modules/source-map/README.md | 729 + .../source-map/dist/source-map.debug.js | 3056 + .../source-map/dist/source-map.js | 3055 + .../source-map/dist/source-map.min.js | 2 + .../source-map/dist/source-map.min.js.map | 1 + .../node_modules/source-map/lib/array-set.js | 104 + .../node_modules/source-map/lib/base64-vlq.js | 140 + .../node_modules/source-map/lib/base64.js | 67 + .../source-map/lib/binary-search.js | 111 + .../source-map/lib/mapping-list.js | 79 + .../node_modules/source-map/lib/quick-sort.js | 114 + .../source-map/lib/source-map-consumer.js | 1082 + .../source-map/lib/source-map-generator.js | 404 + .../source-map/lib/source-node.js | 407 + .../node_modules/source-map/lib/util.js | 417 + .../node_modules/source-map/package.json | 254 + .../node_modules/source-map/source-map.js | 8 + node_modules/uglify-js/package.json | 128 + node_modules/uglify-js/tools/domprops.json | 5603 + node_modules/uglify-js/tools/exports.js | 19 + node_modules/uglify-js/tools/node.js | 320 + node_modules/uglify-js/tools/props.html | 61 + node_modules/uglify-to-browserify/.npmignore | 14 + node_modules/uglify-to-browserify/.travis.yml | 3 + node_modules/uglify-to-browserify/LICENSE | 19 + node_modules/uglify-to-browserify/README.md | 15 + node_modules/uglify-to-browserify/index.js | 49 + .../uglify-to-browserify/package.json | 80 + .../uglify-to-browserify/test/index.js | 22 + node_modules/umzug/.jshintrc | 44 + node_modules/umzug/.npmignore | 30 + node_modules/umzug/.travis.yml | 23 + node_modules/umzug/CHANGELOG.md | 84 + node_modules/umzug/LICENSE | 22 + node_modules/umzug/README.md | 314 + node_modules/umzug/gulpfile.js | 35 + node_modules/umzug/index.js | 564 + node_modules/umzug/lib/helper.js | 29 + node_modules/umzug/lib/migration.js | 106 + node_modules/umzug/lib/storages/json.js | 86 + node_modules/umzug/lib/storages/none.js | 46 + node_modules/umzug/lib/storages/sequelize.js | 170 + .../umzug/node_modules/lodash/LICENSE | 47 + .../umzug/node_modules/lodash/README.md | 39 + .../umzug/node_modules/lodash/_DataView.js | 7 + .../umzug/node_modules/lodash/_Hash.js | 32 + .../umzug/node_modules/lodash/_LazyWrapper.js | 28 + .../umzug/node_modules/lodash/_ListCache.js | 32 + .../node_modules/lodash/_LodashWrapper.js | 22 + .../umzug/node_modules/lodash/_Map.js | 7 + .../umzug/node_modules/lodash/_MapCache.js | 32 + .../umzug/node_modules/lodash/_Promise.js | 7 + .../umzug/node_modules/lodash/_Set.js | 7 + .../umzug/node_modules/lodash/_SetCache.js | 27 + .../umzug/node_modules/lodash/_Stack.js | 27 + .../umzug/node_modules/lodash/_Symbol.js | 6 + .../umzug/node_modules/lodash/_Uint8Array.js | 6 + .../umzug/node_modules/lodash/_WeakMap.js | 7 + .../umzug/node_modules/lodash/_addMapEntry.js | 15 + .../umzug/node_modules/lodash/_addSetEntry.js | 15 + .../umzug/node_modules/lodash/_apply.js | 21 + .../node_modules/lodash/_arrayAggregator.js | 22 + .../umzug/node_modules/lodash/_arrayEach.js | 22 + .../node_modules/lodash/_arrayEachRight.js | 21 + .../umzug/node_modules/lodash/_arrayEvery.js | 23 + .../umzug/node_modules/lodash/_arrayFilter.js | 25 + .../node_modules/lodash/_arrayIncludes.js | 17 + .../node_modules/lodash/_arrayIncludesWith.js | 22 + .../node_modules/lodash/_arrayLikeKeys.js | 49 + .../umzug/node_modules/lodash/_arrayMap.js | 21 + .../umzug/node_modules/lodash/_arrayPush.js | 20 + .../umzug/node_modules/lodash/_arrayReduce.js | 26 + .../node_modules/lodash/_arrayReduceRight.js | 24 + .../umzug/node_modules/lodash/_arraySample.js | 15 + .../node_modules/lodash/_arraySampleSize.js | 17 + .../node_modules/lodash/_arrayShuffle.js | 15 + .../umzug/node_modules/lodash/_arraySome.js | 23 + .../umzug/node_modules/lodash/_asciiSize.js | 12 + .../node_modules/lodash/_asciiToArray.js | 12 + .../umzug/node_modules/lodash/_asciiWords.js | 15 + .../node_modules/lodash/_assignMergeValue.js | 20 + .../umzug/node_modules/lodash/_assignValue.js | 28 + .../node_modules/lodash/_assocIndexOf.js | 21 + .../node_modules/lodash/_baseAggregator.js | 21 + .../umzug/node_modules/lodash/_baseAssign.js | 17 + .../node_modules/lodash/_baseAssignIn.js | 17 + .../node_modules/lodash/_baseAssignValue.js | 25 + .../umzug/node_modules/lodash/_baseAt.js | 23 + .../umzug/node_modules/lodash/_baseClamp.js | 22 + .../umzug/node_modules/lodash/_baseClone.js | 153 + .../node_modules/lodash/_baseConforms.js | 18 + .../node_modules/lodash/_baseConformsTo.js | 27 + .../umzug/node_modules/lodash/_baseCreate.js | 30 + .../umzug/node_modules/lodash/_baseDelay.js | 21 + .../node_modules/lodash/_baseDifference.js | 67 + .../umzug/node_modules/lodash/_baseEach.js | 14 + .../node_modules/lodash/_baseEachRight.js | 14 + .../umzug/node_modules/lodash/_baseEvery.js | 21 + .../node_modules/lodash/_baseExtremum.js | 32 + .../umzug/node_modules/lodash/_baseFill.js | 32 + .../umzug/node_modules/lodash/_baseFilter.js | 21 + .../node_modules/lodash/_baseFindIndex.js | 24 + .../umzug/node_modules/lodash/_baseFindKey.js | 23 + .../umzug/node_modules/lodash/_baseFlatten.js | 38 + .../umzug/node_modules/lodash/_baseFor.js | 16 + .../umzug/node_modules/lodash/_baseForOwn.js | 16 + .../node_modules/lodash/_baseForOwnRight.js | 16 + .../node_modules/lodash/_baseForRight.js | 15 + .../node_modules/lodash/_baseFunctions.js | 19 + .../umzug/node_modules/lodash/_baseGet.js | 24 + .../node_modules/lodash/_baseGetAllKeys.js | 20 + .../umzug/node_modules/lodash/_baseGetTag.js | 28 + .../umzug/node_modules/lodash/_baseGt.js | 14 + .../umzug/node_modules/lodash/_baseHas.js | 19 + .../umzug/node_modules/lodash/_baseHasIn.js | 13 + .../umzug/node_modules/lodash/_baseInRange.js | 18 + .../umzug/node_modules/lodash/_baseIndexOf.js | 20 + .../node_modules/lodash/_baseIndexOfWith.js | 23 + .../node_modules/lodash/_baseIntersection.js | 74 + .../node_modules/lodash/_baseInverter.js | 21 + .../umzug/node_modules/lodash/_baseInvoke.js | 24 + .../node_modules/lodash/_baseIsArguments.js | 18 + .../node_modules/lodash/_baseIsArrayBuffer.js | 17 + .../umzug/node_modules/lodash/_baseIsDate.js | 18 + .../umzug/node_modules/lodash/_baseIsEqual.js | 28 + .../node_modules/lodash/_baseIsEqualDeep.js | 83 + .../umzug/node_modules/lodash/_baseIsMap.js | 18 + .../umzug/node_modules/lodash/_baseIsMatch.js | 62 + .../umzug/node_modules/lodash/_baseIsNaN.js | 12 + .../node_modules/lodash/_baseIsNative.js | 47 + .../node_modules/lodash/_baseIsRegExp.js | 18 + .../umzug/node_modules/lodash/_baseIsSet.js | 18 + .../node_modules/lodash/_baseIsTypedArray.js | 60 + .../node_modules/lodash/_baseIteratee.js | 31 + .../umzug/node_modules/lodash/_baseKeys.js | 30 + .../umzug/node_modules/lodash/_baseKeysIn.js | 33 + .../umzug/node_modules/lodash/_baseLodash.js | 10 + .../umzug/node_modules/lodash/_baseLt.js | 14 + .../umzug/node_modules/lodash/_baseMap.js | 22 + .../umzug/node_modules/lodash/_baseMatches.js | 22 + .../lodash/_baseMatchesProperty.js | 33 + .../umzug/node_modules/lodash/_baseMean.js | 20 + .../umzug/node_modules/lodash/_baseMerge.js | 41 + .../node_modules/lodash/_baseMergeDeep.js | 93 + .../umzug/node_modules/lodash/_baseNth.js | 20 + .../umzug/node_modules/lodash/_baseOrderBy.js | 34 + .../umzug/node_modules/lodash/_basePick.js | 19 + .../umzug/node_modules/lodash/_basePickBy.js | 30 + .../node_modules/lodash/_baseProperty.js | 14 + .../node_modules/lodash/_basePropertyDeep.js | 16 + .../node_modules/lodash/_basePropertyOf.js | 14 + .../umzug/node_modules/lodash/_basePullAll.js | 51 + .../umzug/node_modules/lodash/_basePullAt.js | 37 + .../umzug/node_modules/lodash/_baseRandom.js | 18 + .../umzug/node_modules/lodash/_baseRange.js | 28 + .../umzug/node_modules/lodash/_baseReduce.js | 23 + .../umzug/node_modules/lodash/_baseRepeat.js | 35 + .../umzug/node_modules/lodash/_baseRest.js | 17 + .../umzug/node_modules/lodash/_baseSample.js | 15 + .../node_modules/lodash/_baseSampleSize.js | 18 + .../umzug/node_modules/lodash/_baseSet.js | 47 + .../umzug/node_modules/lodash/_baseSetData.js | 17 + .../node_modules/lodash/_baseSetToString.js | 22 + .../umzug/node_modules/lodash/_baseShuffle.js | 15 + .../umzug/node_modules/lodash/_baseSlice.js | 31 + .../umzug/node_modules/lodash/_baseSome.js | 22 + .../umzug/node_modules/lodash/_baseSortBy.js | 21 + .../node_modules/lodash/_baseSortedIndex.js | 42 + .../node_modules/lodash/_baseSortedIndexBy.js | 64 + .../node_modules/lodash/_baseSortedUniq.js | 30 + .../umzug/node_modules/lodash/_baseSum.js | 24 + .../umzug/node_modules/lodash/_baseTimes.js | 20 + .../node_modules/lodash/_baseToNumber.js | 24 + .../umzug/node_modules/lodash/_baseToPairs.js | 18 + .../node_modules/lodash/_baseToString.js | 37 + .../umzug/node_modules/lodash/_baseUnary.js | 14 + .../umzug/node_modules/lodash/_baseUniq.js | 72 + .../umzug/node_modules/lodash/_baseUnset.js | 20 + .../umzug/node_modules/lodash/_baseUpdate.js | 18 + .../umzug/node_modules/lodash/_baseValues.js | 19 + .../umzug/node_modules/lodash/_baseWhile.js | 26 + .../node_modules/lodash/_baseWrapperValue.js | 25 + .../umzug/node_modules/lodash/_baseXor.js | 36 + .../node_modules/lodash/_baseZipObject.js | 23 + .../umzug/node_modules/lodash/_cacheHas.js | 13 + .../lodash/_castArrayLikeObject.js | 14 + .../node_modules/lodash/_castFunction.js | 14 + .../umzug/node_modules/lodash/_castPath.js | 21 + .../umzug/node_modules/lodash/_castRest.js | 14 + .../umzug/node_modules/lodash/_castSlice.js | 18 + .../node_modules/lodash/_charsEndIndex.js | 19 + .../node_modules/lodash/_charsStartIndex.js | 20 + .../node_modules/lodash/_cloneArrayBuffer.js | 16 + .../umzug/node_modules/lodash/_cloneBuffer.js | 35 + .../node_modules/lodash/_cloneDataView.js | 16 + .../umzug/node_modules/lodash/_cloneMap.js | 22 + .../umzug/node_modules/lodash/_cloneRegExp.js | 17 + .../umzug/node_modules/lodash/_cloneSet.js | 22 + .../umzug/node_modules/lodash/_cloneSymbol.js | 18 + .../node_modules/lodash/_cloneTypedArray.js | 16 + .../node_modules/lodash/_compareAscending.js | 41 + .../node_modules/lodash/_compareMultiple.js | 44 + .../umzug/node_modules/lodash/_composeArgs.js | 39 + .../node_modules/lodash/_composeArgsRight.js | 41 + .../umzug/node_modules/lodash/_copyArray.js | 20 + .../umzug/node_modules/lodash/_copyObject.js | 40 + .../umzug/node_modules/lodash/_copySymbols.js | 16 + .../node_modules/lodash/_copySymbolsIn.js | 16 + .../umzug/node_modules/lodash/_coreJsData.js | 6 + .../node_modules/lodash/_countHolders.js | 21 + .../node_modules/lodash/_createAggregator.js | 23 + .../node_modules/lodash/_createAssigner.js | 37 + .../node_modules/lodash/_createBaseEach.js | 32 + .../node_modules/lodash/_createBaseFor.js | 25 + .../umzug/node_modules/lodash/_createBind.js | 28 + .../node_modules/lodash/_createCaseFirst.js | 33 + .../node_modules/lodash/_createCompounder.js | 24 + .../umzug/node_modules/lodash/_createCtor.js | 37 + .../umzug/node_modules/lodash/_createCurry.js | 46 + .../umzug/node_modules/lodash/_createFind.js | 25 + .../umzug/node_modules/lodash/_createFlow.js | 78 + .../node_modules/lodash/_createHybrid.js | 92 + .../node_modules/lodash/_createInverter.js | 17 + .../lodash/_createMathOperation.js | 38 + .../umzug/node_modules/lodash/_createOver.js | 27 + .../node_modules/lodash/_createPadding.js | 33 + .../node_modules/lodash/_createPartial.js | 43 + .../umzug/node_modules/lodash/_createRange.js | 30 + .../node_modules/lodash/_createRecurry.js | 56 + .../lodash/_createRelationalOperation.js | 20 + .../umzug/node_modules/lodash/_createRound.js | 33 + .../umzug/node_modules/lodash/_createSet.js | 19 + .../node_modules/lodash/_createToPairs.js | 30 + .../umzug/node_modules/lodash/_createWrap.js | 106 + .../lodash/_customDefaultsAssignIn.js | 29 + .../lodash/_customDefaultsMerge.js | 28 + .../node_modules/lodash/_customOmitClone.js | 16 + .../node_modules/lodash/_deburrLetter.js | 71 + .../node_modules/lodash/_defineProperty.js | 11 + .../umzug/node_modules/lodash/_equalArrays.js | 83 + .../umzug/node_modules/lodash/_equalByTag.js | 112 + .../node_modules/lodash/_equalObjects.js | 89 + .../node_modules/lodash/_escapeHtmlChar.js | 21 + .../node_modules/lodash/_escapeStringChar.js | 22 + .../umzug/node_modules/lodash/_flatRest.js | 16 + .../umzug/node_modules/lodash/_freeGlobal.js | 4 + .../umzug/node_modules/lodash/_getAllKeys.js | 16 + .../node_modules/lodash/_getAllKeysIn.js | 17 + .../umzug/node_modules/lodash/_getData.js | 15 + .../umzug/node_modules/lodash/_getFuncName.js | 31 + .../umzug/node_modules/lodash/_getHolder.js | 13 + .../umzug/node_modules/lodash/_getMapData.js | 18 + .../node_modules/lodash/_getMatchData.js | 24 + .../umzug/node_modules/lodash/_getNative.js | 17 + .../node_modules/lodash/_getPrototype.js | 6 + .../umzug/node_modules/lodash/_getRawTag.js | 46 + .../umzug/node_modules/lodash/_getSymbols.js | 30 + .../node_modules/lodash/_getSymbolsIn.js | 25 + .../umzug/node_modules/lodash/_getTag.js | 58 + .../umzug/node_modules/lodash/_getValue.js | 13 + .../umzug/node_modules/lodash/_getView.js | 33 + .../node_modules/lodash/_getWrapDetails.js | 17 + .../umzug/node_modules/lodash/_hasPath.js | 39 + .../umzug/node_modules/lodash/_hasUnicode.js | 26 + .../node_modules/lodash/_hasUnicodeWord.js | 15 + .../umzug/node_modules/lodash/_hashClear.js | 15 + .../umzug/node_modules/lodash/_hashDelete.js | 17 + .../umzug/node_modules/lodash/_hashGet.js | 30 + .../umzug/node_modules/lodash/_hashHas.js | 23 + .../umzug/node_modules/lodash/_hashSet.js | 23 + .../node_modules/lodash/_initCloneArray.js | 26 + .../node_modules/lodash/_initCloneByTag.js | 80 + .../node_modules/lodash/_initCloneObject.js | 18 + .../node_modules/lodash/_insertWrapDetails.js | 23 + .../node_modules/lodash/_isFlattenable.js | 20 + .../umzug/node_modules/lodash/_isIndex.js | 22 + .../node_modules/lodash/_isIterateeCall.js | 30 + .../umzug/node_modules/lodash/_isKey.js | 29 + .../umzug/node_modules/lodash/_isKeyable.js | 15 + .../umzug/node_modules/lodash/_isLaziable.js | 28 + .../umzug/node_modules/lodash/_isMaskable.js | 14 + .../umzug/node_modules/lodash/_isMasked.js | 20 + .../umzug/node_modules/lodash/_isPrototype.js | 18 + .../lodash/_isStrictComparable.js | 15 + .../node_modules/lodash/_iteratorToArray.js | 18 + .../umzug/node_modules/lodash/_lazyClone.js | 23 + .../umzug/node_modules/lodash/_lazyReverse.js | 23 + .../umzug/node_modules/lodash/_lazyValue.js | 69 + .../node_modules/lodash/_listCacheClear.js | 13 + .../node_modules/lodash/_listCacheDelete.js | 35 + .../node_modules/lodash/_listCacheGet.js | 19 + .../node_modules/lodash/_listCacheHas.js | 16 + .../node_modules/lodash/_listCacheSet.js | 26 + .../node_modules/lodash/_mapCacheClear.js | 21 + .../node_modules/lodash/_mapCacheDelete.js | 18 + .../umzug/node_modules/lodash/_mapCacheGet.js | 16 + .../umzug/node_modules/lodash/_mapCacheHas.js | 16 + .../umzug/node_modules/lodash/_mapCacheSet.js | 22 + .../umzug/node_modules/lodash/_mapToArray.js | 18 + .../lodash/_matchesStrictComparable.js | 20 + .../node_modules/lodash/_memoizeCapped.js | 26 + .../umzug/node_modules/lodash/_mergeData.js | 90 + .../umzug/node_modules/lodash/_metaMap.js | 6 + .../node_modules/lodash/_nativeCreate.js | 6 + .../umzug/node_modules/lodash/_nativeKeys.js | 6 + .../node_modules/lodash/_nativeKeysIn.js | 20 + .../umzug/node_modules/lodash/_nodeUtil.js | 22 + .../node_modules/lodash/_objectToString.js | 22 + .../umzug/node_modules/lodash/_overArg.js | 15 + .../umzug/node_modules/lodash/_overRest.js | 36 + .../umzug/node_modules/lodash/_parent.js | 16 + .../umzug/node_modules/lodash/_reEscape.js | 4 + .../umzug/node_modules/lodash/_reEvaluate.js | 4 + .../node_modules/lodash/_reInterpolate.js | 4 + .../umzug/node_modules/lodash/_realNames.js | 4 + .../umzug/node_modules/lodash/_reorder.js | 29 + .../node_modules/lodash/_replaceHolders.js | 29 + .../umzug/node_modules/lodash/_root.js | 9 + .../umzug/node_modules/lodash/_setCacheAdd.js | 19 + .../umzug/node_modules/lodash/_setCacheHas.js | 14 + .../umzug/node_modules/lodash/_setData.js | 20 + .../umzug/node_modules/lodash/_setToArray.js | 18 + .../umzug/node_modules/lodash/_setToPairs.js | 18 + .../umzug/node_modules/lodash/_setToString.js | 14 + .../node_modules/lodash/_setWrapToString.js | 21 + .../umzug/node_modules/lodash/_shortOut.js | 37 + .../umzug/node_modules/lodash/_shuffleSelf.js | 28 + .../umzug/node_modules/lodash/_stackClear.js | 15 + .../umzug/node_modules/lodash/_stackDelete.js | 18 + .../umzug/node_modules/lodash/_stackGet.js | 14 + .../umzug/node_modules/lodash/_stackHas.js | 14 + .../umzug/node_modules/lodash/_stackSet.js | 34 + .../node_modules/lodash/_strictIndexOf.js | 23 + .../node_modules/lodash/_strictLastIndexOf.js | 21 + .../umzug/node_modules/lodash/_stringSize.js | 18 + .../node_modules/lodash/_stringToArray.js | 18 + .../node_modules/lodash/_stringToPath.js | 28 + .../umzug/node_modules/lodash/_toKey.js | 21 + .../umzug/node_modules/lodash/_toSource.js | 26 + .../node_modules/lodash/_unescapeHtmlChar.js | 21 + .../umzug/node_modules/lodash/_unicodeSize.js | 44 + .../node_modules/lodash/_unicodeToArray.js | 40 + .../node_modules/lodash/_unicodeWords.js | 69 + .../node_modules/lodash/_updateWrapDetails.js | 46 + .../node_modules/lodash/_wrapperClone.js | 23 + node_modules/umzug/node_modules/lodash/add.js | 22 + .../umzug/node_modules/lodash/after.js | 42 + .../umzug/node_modules/lodash/array.js | 67 + node_modules/umzug/node_modules/lodash/ary.js | 29 + .../umzug/node_modules/lodash/assign.js | 58 + .../umzug/node_modules/lodash/assignIn.js | 40 + .../umzug/node_modules/lodash/assignInWith.js | 38 + .../umzug/node_modules/lodash/assignWith.js | 37 + node_modules/umzug/node_modules/lodash/at.js | 23 + .../umzug/node_modules/lodash/attempt.js | 35 + .../umzug/node_modules/lodash/before.js | 40 + .../umzug/node_modules/lodash/bind.js | 57 + .../umzug/node_modules/lodash/bindAll.js | 41 + .../umzug/node_modules/lodash/bindKey.js | 68 + .../umzug/node_modules/lodash/camelCase.js | 29 + .../umzug/node_modules/lodash/capitalize.js | 23 + .../umzug/node_modules/lodash/castArray.js | 44 + .../umzug/node_modules/lodash/ceil.js | 26 + .../umzug/node_modules/lodash/chain.js | 38 + .../umzug/node_modules/lodash/chunk.js | 50 + .../umzug/node_modules/lodash/clamp.js | 39 + .../umzug/node_modules/lodash/clone.js | 36 + .../umzug/node_modules/lodash/cloneDeep.js | 29 + .../node_modules/lodash/cloneDeepWith.js | 40 + .../umzug/node_modules/lodash/cloneWith.js | 42 + .../umzug/node_modules/lodash/collection.js | 30 + .../umzug/node_modules/lodash/commit.js | 33 + .../umzug/node_modules/lodash/compact.js | 31 + .../umzug/node_modules/lodash/concat.js | 43 + .../umzug/node_modules/lodash/cond.js | 60 + .../umzug/node_modules/lodash/conforms.js | 35 + .../umzug/node_modules/lodash/conformsTo.js | 32 + .../umzug/node_modules/lodash/constant.js | 26 + .../umzug/node_modules/lodash/core.js | 3836 + .../umzug/node_modules/lodash/core.min.js | 29 + .../umzug/node_modules/lodash/countBy.js | 40 + .../umzug/node_modules/lodash/create.js | 43 + .../umzug/node_modules/lodash/curry.js | 57 + .../umzug/node_modules/lodash/curryRight.js | 54 + .../umzug/node_modules/lodash/date.js | 3 + .../umzug/node_modules/lodash/debounce.js | 188 + .../umzug/node_modules/lodash/deburr.js | 45 + .../umzug/node_modules/lodash/defaultTo.js | 25 + .../umzug/node_modules/lodash/defaults.js | 32 + .../umzug/node_modules/lodash/defaultsDeep.js | 30 + .../umzug/node_modules/lodash/defer.js | 26 + .../umzug/node_modules/lodash/delay.js | 28 + .../umzug/node_modules/lodash/difference.js | 33 + .../umzug/node_modules/lodash/differenceBy.js | 44 + .../node_modules/lodash/differenceWith.js | 40 + .../umzug/node_modules/lodash/divide.js | 22 + .../umzug/node_modules/lodash/drop.js | 38 + .../umzug/node_modules/lodash/dropRight.js | 39 + .../node_modules/lodash/dropRightWhile.js | 45 + .../umzug/node_modules/lodash/dropWhile.js | 45 + .../umzug/node_modules/lodash/each.js | 1 + .../umzug/node_modules/lodash/eachRight.js | 1 + .../umzug/node_modules/lodash/endsWith.js | 43 + .../umzug/node_modules/lodash/entries.js | 1 + .../umzug/node_modules/lodash/entriesIn.js | 1 + node_modules/umzug/node_modules/lodash/eq.js | 37 + .../umzug/node_modules/lodash/escape.js | 43 + .../umzug/node_modules/lodash/escapeRegExp.js | 32 + .../umzug/node_modules/lodash/every.js | 56 + .../umzug/node_modules/lodash/extend.js | 1 + .../umzug/node_modules/lodash/extendWith.js | 1 + .../umzug/node_modules/lodash/fill.js | 45 + .../umzug/node_modules/lodash/filter.js | 48 + .../umzug/node_modules/lodash/find.js | 42 + .../umzug/node_modules/lodash/findIndex.js | 55 + .../umzug/node_modules/lodash/findKey.js | 44 + .../umzug/node_modules/lodash/findLast.js | 25 + .../node_modules/lodash/findLastIndex.js | 59 + .../umzug/node_modules/lodash/findLastKey.js | 44 + .../umzug/node_modules/lodash/first.js | 1 + .../umzug/node_modules/lodash/flatMap.js | 29 + .../umzug/node_modules/lodash/flatMapDeep.js | 31 + .../umzug/node_modules/lodash/flatMapDepth.js | 31 + .../umzug/node_modules/lodash/flatten.js | 22 + .../umzug/node_modules/lodash/flattenDeep.js | 25 + .../umzug/node_modules/lodash/flattenDepth.js | 33 + .../umzug/node_modules/lodash/flip.js | 28 + .../umzug/node_modules/lodash/floor.js | 26 + .../umzug/node_modules/lodash/flow.js | 27 + .../umzug/node_modules/lodash/flowRight.js | 26 + .../umzug/node_modules/lodash/forEach.js | 41 + .../umzug/node_modules/lodash/forEachRight.js | 31 + .../umzug/node_modules/lodash/forIn.js | 39 + .../umzug/node_modules/lodash/forInRight.js | 37 + .../umzug/node_modules/lodash/forOwn.js | 36 + .../umzug/node_modules/lodash/forOwnRight.js | 34 + node_modules/umzug/node_modules/lodash/fp.js | 2 + .../umzug/node_modules/lodash/fp/F.js | 1 + .../umzug/node_modules/lodash/fp/T.js | 1 + .../umzug/node_modules/lodash/fp/__.js | 1 + .../node_modules/lodash/fp/_baseConvert.js | 568 + .../node_modules/lodash/fp/_convertBrowser.js | 18 + .../node_modules/lodash/fp/_falseOptions.js | 7 + .../umzug/node_modules/lodash/fp/_mapping.js | 368 + .../umzug/node_modules/lodash/fp/_util.js | 14 + .../umzug/node_modules/lodash/fp/add.js | 5 + .../umzug/node_modules/lodash/fp/after.js | 5 + .../umzug/node_modules/lodash/fp/all.js | 1 + .../umzug/node_modules/lodash/fp/allPass.js | 1 + .../umzug/node_modules/lodash/fp/always.js | 1 + .../umzug/node_modules/lodash/fp/any.js | 1 + .../umzug/node_modules/lodash/fp/anyPass.js | 1 + .../umzug/node_modules/lodash/fp/apply.js | 1 + .../umzug/node_modules/lodash/fp/array.js | 2 + .../umzug/node_modules/lodash/fp/ary.js | 5 + .../umzug/node_modules/lodash/fp/assign.js | 5 + .../umzug/node_modules/lodash/fp/assignAll.js | 5 + .../node_modules/lodash/fp/assignAllWith.js | 5 + .../umzug/node_modules/lodash/fp/assignIn.js | 5 + .../node_modules/lodash/fp/assignInAll.js | 5 + .../node_modules/lodash/fp/assignInAllWith.js | 5 + .../node_modules/lodash/fp/assignInWith.js | 5 + .../node_modules/lodash/fp/assignWith.js | 5 + .../umzug/node_modules/lodash/fp/assoc.js | 1 + .../umzug/node_modules/lodash/fp/assocPath.js | 1 + .../umzug/node_modules/lodash/fp/at.js | 5 + .../umzug/node_modules/lodash/fp/attempt.js | 5 + .../umzug/node_modules/lodash/fp/before.js | 5 + .../umzug/node_modules/lodash/fp/bind.js | 5 + .../umzug/node_modules/lodash/fp/bindAll.js | 5 + .../umzug/node_modules/lodash/fp/bindKey.js | 5 + .../umzug/node_modules/lodash/fp/camelCase.js | 5 + .../node_modules/lodash/fp/capitalize.js | 5 + .../umzug/node_modules/lodash/fp/castArray.js | 5 + .../umzug/node_modules/lodash/fp/ceil.js | 5 + .../umzug/node_modules/lodash/fp/chain.js | 5 + .../umzug/node_modules/lodash/fp/chunk.js | 5 + .../umzug/node_modules/lodash/fp/clamp.js | 5 + .../umzug/node_modules/lodash/fp/clone.js | 5 + .../umzug/node_modules/lodash/fp/cloneDeep.js | 5 + .../node_modules/lodash/fp/cloneDeepWith.js | 5 + .../umzug/node_modules/lodash/fp/cloneWith.js | 5 + .../node_modules/lodash/fp/collection.js | 2 + .../umzug/node_modules/lodash/fp/commit.js | 5 + .../umzug/node_modules/lodash/fp/compact.js | 5 + .../node_modules/lodash/fp/complement.js | 1 + .../umzug/node_modules/lodash/fp/compose.js | 1 + .../umzug/node_modules/lodash/fp/concat.js | 5 + .../umzug/node_modules/lodash/fp/cond.js | 5 + .../umzug/node_modules/lodash/fp/conforms.js | 1 + .../node_modules/lodash/fp/conformsTo.js | 5 + .../umzug/node_modules/lodash/fp/constant.js | 5 + .../umzug/node_modules/lodash/fp/contains.js | 1 + .../umzug/node_modules/lodash/fp/convert.js | 18 + .../umzug/node_modules/lodash/fp/countBy.js | 5 + .../umzug/node_modules/lodash/fp/create.js | 5 + .../umzug/node_modules/lodash/fp/curry.js | 5 + .../umzug/node_modules/lodash/fp/curryN.js | 5 + .../node_modules/lodash/fp/curryRight.js | 5 + .../node_modules/lodash/fp/curryRightN.js | 5 + .../umzug/node_modules/lodash/fp/date.js | 2 + .../umzug/node_modules/lodash/fp/debounce.js | 5 + .../umzug/node_modules/lodash/fp/deburr.js | 5 + .../umzug/node_modules/lodash/fp/defaultTo.js | 5 + .../umzug/node_modules/lodash/fp/defaults.js | 5 + .../node_modules/lodash/fp/defaultsAll.js | 5 + .../node_modules/lodash/fp/defaultsDeep.js | 5 + .../node_modules/lodash/fp/defaultsDeepAll.js | 5 + .../umzug/node_modules/lodash/fp/defer.js | 5 + .../umzug/node_modules/lodash/fp/delay.js | 5 + .../node_modules/lodash/fp/difference.js | 5 + .../node_modules/lodash/fp/differenceBy.js | 5 + .../node_modules/lodash/fp/differenceWith.js | 5 + .../umzug/node_modules/lodash/fp/dissoc.js | 1 + .../node_modules/lodash/fp/dissocPath.js | 1 + .../umzug/node_modules/lodash/fp/divide.js | 5 + .../umzug/node_modules/lodash/fp/drop.js | 5 + .../umzug/node_modules/lodash/fp/dropLast.js | 1 + .../node_modules/lodash/fp/dropLastWhile.js | 1 + .../umzug/node_modules/lodash/fp/dropRight.js | 5 + .../node_modules/lodash/fp/dropRightWhile.js | 5 + .../umzug/node_modules/lodash/fp/dropWhile.js | 5 + .../umzug/node_modules/lodash/fp/each.js | 1 + .../umzug/node_modules/lodash/fp/eachRight.js | 1 + .../umzug/node_modules/lodash/fp/endsWith.js | 5 + .../umzug/node_modules/lodash/fp/entries.js | 1 + .../umzug/node_modules/lodash/fp/entriesIn.js | 1 + .../umzug/node_modules/lodash/fp/eq.js | 5 + .../umzug/node_modules/lodash/fp/equals.js | 1 + .../umzug/node_modules/lodash/fp/escape.js | 5 + .../node_modules/lodash/fp/escapeRegExp.js | 5 + .../umzug/node_modules/lodash/fp/every.js | 5 + .../umzug/node_modules/lodash/fp/extend.js | 1 + .../umzug/node_modules/lodash/fp/extendAll.js | 1 + .../node_modules/lodash/fp/extendAllWith.js | 1 + .../node_modules/lodash/fp/extendWith.js | 1 + .../umzug/node_modules/lodash/fp/fill.js | 5 + .../umzug/node_modules/lodash/fp/filter.js | 5 + .../umzug/node_modules/lodash/fp/find.js | 5 + .../umzug/node_modules/lodash/fp/findFrom.js | 5 + .../umzug/node_modules/lodash/fp/findIndex.js | 5 + .../node_modules/lodash/fp/findIndexFrom.js | 5 + .../umzug/node_modules/lodash/fp/findKey.js | 5 + .../umzug/node_modules/lodash/fp/findLast.js | 5 + .../node_modules/lodash/fp/findLastFrom.js | 5 + .../node_modules/lodash/fp/findLastIndex.js | 5 + .../lodash/fp/findLastIndexFrom.js | 5 + .../node_modules/lodash/fp/findLastKey.js | 5 + .../umzug/node_modules/lodash/fp/first.js | 1 + .../umzug/node_modules/lodash/fp/flatMap.js | 5 + .../node_modules/lodash/fp/flatMapDeep.js | 5 + .../node_modules/lodash/fp/flatMapDepth.js | 5 + .../umzug/node_modules/lodash/fp/flatten.js | 5 + .../node_modules/lodash/fp/flattenDeep.js | 5 + .../node_modules/lodash/fp/flattenDepth.js | 5 + .../umzug/node_modules/lodash/fp/flip.js | 5 + .../umzug/node_modules/lodash/fp/floor.js | 5 + .../umzug/node_modules/lodash/fp/flow.js | 5 + .../umzug/node_modules/lodash/fp/flowRight.js | 5 + .../umzug/node_modules/lodash/fp/forEach.js | 5 + .../node_modules/lodash/fp/forEachRight.js | 5 + .../umzug/node_modules/lodash/fp/forIn.js | 5 + .../node_modules/lodash/fp/forInRight.js | 5 + .../umzug/node_modules/lodash/fp/forOwn.js | 5 + .../node_modules/lodash/fp/forOwnRight.js | 5 + .../umzug/node_modules/lodash/fp/fromPairs.js | 5 + .../umzug/node_modules/lodash/fp/function.js | 2 + .../umzug/node_modules/lodash/fp/functions.js | 5 + .../node_modules/lodash/fp/functionsIn.js | 5 + .../umzug/node_modules/lodash/fp/get.js | 5 + .../umzug/node_modules/lodash/fp/getOr.js | 5 + .../umzug/node_modules/lodash/fp/groupBy.js | 5 + .../umzug/node_modules/lodash/fp/gt.js | 5 + .../umzug/node_modules/lodash/fp/gte.js | 5 + .../umzug/node_modules/lodash/fp/has.js | 5 + .../umzug/node_modules/lodash/fp/hasIn.js | 5 + .../umzug/node_modules/lodash/fp/head.js | 5 + .../umzug/node_modules/lodash/fp/identical.js | 1 + .../umzug/node_modules/lodash/fp/identity.js | 5 + .../umzug/node_modules/lodash/fp/inRange.js | 5 + .../umzug/node_modules/lodash/fp/includes.js | 5 + .../node_modules/lodash/fp/includesFrom.js | 5 + .../umzug/node_modules/lodash/fp/indexBy.js | 1 + .../umzug/node_modules/lodash/fp/indexOf.js | 5 + .../node_modules/lodash/fp/indexOfFrom.js | 5 + .../umzug/node_modules/lodash/fp/init.js | 1 + .../umzug/node_modules/lodash/fp/initial.js | 5 + .../node_modules/lodash/fp/intersection.js | 5 + .../node_modules/lodash/fp/intersectionBy.js | 5 + .../lodash/fp/intersectionWith.js | 5 + .../umzug/node_modules/lodash/fp/invert.js | 5 + .../umzug/node_modules/lodash/fp/invertBy.js | 5 + .../umzug/node_modules/lodash/fp/invertObj.js | 1 + .../umzug/node_modules/lodash/fp/invoke.js | 5 + .../node_modules/lodash/fp/invokeArgs.js | 5 + .../node_modules/lodash/fp/invokeArgsMap.js | 5 + .../umzug/node_modules/lodash/fp/invokeMap.js | 5 + .../node_modules/lodash/fp/isArguments.js | 5 + .../umzug/node_modules/lodash/fp/isArray.js | 5 + .../node_modules/lodash/fp/isArrayBuffer.js | 5 + .../node_modules/lodash/fp/isArrayLike.js | 5 + .../lodash/fp/isArrayLikeObject.js | 5 + .../umzug/node_modules/lodash/fp/isBoolean.js | 5 + .../umzug/node_modules/lodash/fp/isBuffer.js | 5 + .../umzug/node_modules/lodash/fp/isDate.js | 5 + .../umzug/node_modules/lodash/fp/isElement.js | 5 + .../umzug/node_modules/lodash/fp/isEmpty.js | 5 + .../umzug/node_modules/lodash/fp/isEqual.js | 5 + .../node_modules/lodash/fp/isEqualWith.js | 5 + .../umzug/node_modules/lodash/fp/isError.js | 5 + .../umzug/node_modules/lodash/fp/isFinite.js | 5 + .../node_modules/lodash/fp/isFunction.js | 5 + .../umzug/node_modules/lodash/fp/isInteger.js | 5 + .../umzug/node_modules/lodash/fp/isLength.js | 5 + .../umzug/node_modules/lodash/fp/isMap.js | 5 + .../umzug/node_modules/lodash/fp/isMatch.js | 5 + .../node_modules/lodash/fp/isMatchWith.js | 5 + .../umzug/node_modules/lodash/fp/isNaN.js | 5 + .../umzug/node_modules/lodash/fp/isNative.js | 5 + .../umzug/node_modules/lodash/fp/isNil.js | 5 + .../umzug/node_modules/lodash/fp/isNull.js | 5 + .../umzug/node_modules/lodash/fp/isNumber.js | 5 + .../umzug/node_modules/lodash/fp/isObject.js | 5 + .../node_modules/lodash/fp/isObjectLike.js | 5 + .../node_modules/lodash/fp/isPlainObject.js | 5 + .../umzug/node_modules/lodash/fp/isRegExp.js | 5 + .../node_modules/lodash/fp/isSafeInteger.js | 5 + .../umzug/node_modules/lodash/fp/isSet.js | 5 + .../umzug/node_modules/lodash/fp/isString.js | 5 + .../umzug/node_modules/lodash/fp/isSymbol.js | 5 + .../node_modules/lodash/fp/isTypedArray.js | 5 + .../node_modules/lodash/fp/isUndefined.js | 5 + .../umzug/node_modules/lodash/fp/isWeakMap.js | 5 + .../umzug/node_modules/lodash/fp/isWeakSet.js | 5 + .../umzug/node_modules/lodash/fp/iteratee.js | 5 + .../umzug/node_modules/lodash/fp/join.js | 5 + .../umzug/node_modules/lodash/fp/juxt.js | 1 + .../umzug/node_modules/lodash/fp/kebabCase.js | 5 + .../umzug/node_modules/lodash/fp/keyBy.js | 5 + .../umzug/node_modules/lodash/fp/keys.js | 5 + .../umzug/node_modules/lodash/fp/keysIn.js | 5 + .../umzug/node_modules/lodash/fp/lang.js | 2 + .../umzug/node_modules/lodash/fp/last.js | 5 + .../node_modules/lodash/fp/lastIndexOf.js | 5 + .../node_modules/lodash/fp/lastIndexOfFrom.js | 5 + .../umzug/node_modules/lodash/fp/lowerCase.js | 5 + .../node_modules/lodash/fp/lowerFirst.js | 5 + .../umzug/node_modules/lodash/fp/lt.js | 5 + .../umzug/node_modules/lodash/fp/lte.js | 5 + .../umzug/node_modules/lodash/fp/map.js | 5 + .../umzug/node_modules/lodash/fp/mapKeys.js | 5 + .../umzug/node_modules/lodash/fp/mapValues.js | 5 + .../umzug/node_modules/lodash/fp/matches.js | 1 + .../node_modules/lodash/fp/matchesProperty.js | 5 + .../umzug/node_modules/lodash/fp/math.js | 2 + .../umzug/node_modules/lodash/fp/max.js | 5 + .../umzug/node_modules/lodash/fp/maxBy.js | 5 + .../umzug/node_modules/lodash/fp/mean.js | 5 + .../umzug/node_modules/lodash/fp/meanBy.js | 5 + .../umzug/node_modules/lodash/fp/memoize.js | 5 + .../umzug/node_modules/lodash/fp/merge.js | 5 + .../umzug/node_modules/lodash/fp/mergeAll.js | 5 + .../node_modules/lodash/fp/mergeAllWith.js | 5 + .../umzug/node_modules/lodash/fp/mergeWith.js | 5 + .../umzug/node_modules/lodash/fp/method.js | 5 + .../umzug/node_modules/lodash/fp/methodOf.js | 5 + .../umzug/node_modules/lodash/fp/min.js | 5 + .../umzug/node_modules/lodash/fp/minBy.js | 5 + .../umzug/node_modules/lodash/fp/mixin.js | 5 + .../umzug/node_modules/lodash/fp/multiply.js | 5 + .../umzug/node_modules/lodash/fp/nAry.js | 1 + .../umzug/node_modules/lodash/fp/negate.js | 5 + .../umzug/node_modules/lodash/fp/next.js | 5 + .../umzug/node_modules/lodash/fp/noop.js | 5 + .../umzug/node_modules/lodash/fp/now.js | 5 + .../umzug/node_modules/lodash/fp/nth.js | 5 + .../umzug/node_modules/lodash/fp/nthArg.js | 5 + .../umzug/node_modules/lodash/fp/number.js | 2 + .../umzug/node_modules/lodash/fp/object.js | 2 + .../umzug/node_modules/lodash/fp/omit.js | 5 + .../umzug/node_modules/lodash/fp/omitAll.js | 1 + .../umzug/node_modules/lodash/fp/omitBy.js | 5 + .../umzug/node_modules/lodash/fp/once.js | 5 + .../umzug/node_modules/lodash/fp/orderBy.js | 5 + .../umzug/node_modules/lodash/fp/over.js | 5 + .../umzug/node_modules/lodash/fp/overArgs.js | 5 + .../umzug/node_modules/lodash/fp/overEvery.js | 5 + .../umzug/node_modules/lodash/fp/overSome.js | 5 + .../umzug/node_modules/lodash/fp/pad.js | 5 + .../umzug/node_modules/lodash/fp/padChars.js | 5 + .../node_modules/lodash/fp/padCharsEnd.js | 5 + .../node_modules/lodash/fp/padCharsStart.js | 5 + .../umzug/node_modules/lodash/fp/padEnd.js | 5 + .../umzug/node_modules/lodash/fp/padStart.js | 5 + .../umzug/node_modules/lodash/fp/parseInt.js | 5 + .../umzug/node_modules/lodash/fp/partial.js | 5 + .../node_modules/lodash/fp/partialRight.js | 5 + .../umzug/node_modules/lodash/fp/partition.js | 5 + .../umzug/node_modules/lodash/fp/path.js | 1 + .../umzug/node_modules/lodash/fp/pathEq.js | 1 + .../umzug/node_modules/lodash/fp/pathOr.js | 1 + .../umzug/node_modules/lodash/fp/paths.js | 1 + .../umzug/node_modules/lodash/fp/pick.js | 5 + .../umzug/node_modules/lodash/fp/pickAll.js | 1 + .../umzug/node_modules/lodash/fp/pickBy.js | 5 + .../umzug/node_modules/lodash/fp/pipe.js | 1 + .../node_modules/lodash/fp/placeholder.js | 6 + .../umzug/node_modules/lodash/fp/plant.js | 5 + .../umzug/node_modules/lodash/fp/pluck.js | 1 + .../umzug/node_modules/lodash/fp/prop.js | 1 + .../umzug/node_modules/lodash/fp/propEq.js | 1 + .../umzug/node_modules/lodash/fp/propOr.js | 1 + .../umzug/node_modules/lodash/fp/property.js | 1 + .../node_modules/lodash/fp/propertyOf.js | 5 + .../umzug/node_modules/lodash/fp/props.js | 1 + .../umzug/node_modules/lodash/fp/pull.js | 5 + .../umzug/node_modules/lodash/fp/pullAll.js | 5 + .../umzug/node_modules/lodash/fp/pullAllBy.js | 5 + .../node_modules/lodash/fp/pullAllWith.js | 5 + .../umzug/node_modules/lodash/fp/pullAt.js | 5 + .../umzug/node_modules/lodash/fp/random.js | 5 + .../umzug/node_modules/lodash/fp/range.js | 5 + .../node_modules/lodash/fp/rangeRight.js | 5 + .../umzug/node_modules/lodash/fp/rangeStep.js | 5 + .../node_modules/lodash/fp/rangeStepRight.js | 5 + .../umzug/node_modules/lodash/fp/rearg.js | 5 + .../umzug/node_modules/lodash/fp/reduce.js | 5 + .../node_modules/lodash/fp/reduceRight.js | 5 + .../umzug/node_modules/lodash/fp/reject.js | 5 + .../umzug/node_modules/lodash/fp/remove.js | 5 + .../umzug/node_modules/lodash/fp/repeat.js | 5 + .../umzug/node_modules/lodash/fp/replace.js | 5 + .../umzug/node_modules/lodash/fp/rest.js | 5 + .../umzug/node_modules/lodash/fp/restFrom.js | 5 + .../umzug/node_modules/lodash/fp/result.js | 5 + .../umzug/node_modules/lodash/fp/reverse.js | 5 + .../umzug/node_modules/lodash/fp/round.js | 5 + .../umzug/node_modules/lodash/fp/sample.js | 5 + .../node_modules/lodash/fp/sampleSize.js | 5 + .../umzug/node_modules/lodash/fp/seq.js | 2 + .../umzug/node_modules/lodash/fp/set.js | 5 + .../umzug/node_modules/lodash/fp/setWith.js | 5 + .../umzug/node_modules/lodash/fp/shuffle.js | 5 + .../umzug/node_modules/lodash/fp/size.js | 5 + .../umzug/node_modules/lodash/fp/slice.js | 5 + .../umzug/node_modules/lodash/fp/snakeCase.js | 5 + .../umzug/node_modules/lodash/fp/some.js | 5 + .../umzug/node_modules/lodash/fp/sortBy.js | 5 + .../node_modules/lodash/fp/sortedIndex.js | 5 + .../node_modules/lodash/fp/sortedIndexBy.js | 5 + .../node_modules/lodash/fp/sortedIndexOf.js | 5 + .../node_modules/lodash/fp/sortedLastIndex.js | 5 + .../lodash/fp/sortedLastIndexBy.js | 5 + .../lodash/fp/sortedLastIndexOf.js | 5 + .../node_modules/lodash/fp/sortedUniq.js | 5 + .../node_modules/lodash/fp/sortedUniqBy.js | 5 + .../umzug/node_modules/lodash/fp/split.js | 5 + .../umzug/node_modules/lodash/fp/spread.js | 5 + .../node_modules/lodash/fp/spreadFrom.js | 5 + .../umzug/node_modules/lodash/fp/startCase.js | 5 + .../node_modules/lodash/fp/startsWith.js | 5 + .../umzug/node_modules/lodash/fp/string.js | 2 + .../umzug/node_modules/lodash/fp/stubArray.js | 5 + .../umzug/node_modules/lodash/fp/stubFalse.js | 5 + .../node_modules/lodash/fp/stubObject.js | 5 + .../node_modules/lodash/fp/stubString.js | 5 + .../umzug/node_modules/lodash/fp/stubTrue.js | 5 + .../umzug/node_modules/lodash/fp/subtract.js | 5 + .../umzug/node_modules/lodash/fp/sum.js | 5 + .../umzug/node_modules/lodash/fp/sumBy.js | 5 + .../lodash/fp/symmetricDifference.js | 1 + .../lodash/fp/symmetricDifferenceBy.js | 1 + .../lodash/fp/symmetricDifferenceWith.js | 1 + .../umzug/node_modules/lodash/fp/tail.js | 5 + .../umzug/node_modules/lodash/fp/take.js | 5 + .../umzug/node_modules/lodash/fp/takeLast.js | 1 + .../node_modules/lodash/fp/takeLastWhile.js | 1 + .../umzug/node_modules/lodash/fp/takeRight.js | 5 + .../node_modules/lodash/fp/takeRightWhile.js | 5 + .../umzug/node_modules/lodash/fp/takeWhile.js | 5 + .../umzug/node_modules/lodash/fp/tap.js | 5 + .../umzug/node_modules/lodash/fp/template.js | 5 + .../lodash/fp/templateSettings.js | 5 + .../umzug/node_modules/lodash/fp/throttle.js | 5 + .../umzug/node_modules/lodash/fp/thru.js | 5 + .../umzug/node_modules/lodash/fp/times.js | 5 + .../umzug/node_modules/lodash/fp/toArray.js | 5 + .../umzug/node_modules/lodash/fp/toFinite.js | 5 + .../umzug/node_modules/lodash/fp/toInteger.js | 5 + .../node_modules/lodash/fp/toIterator.js | 5 + .../umzug/node_modules/lodash/fp/toJSON.js | 5 + .../umzug/node_modules/lodash/fp/toLength.js | 5 + .../umzug/node_modules/lodash/fp/toLower.js | 5 + .../umzug/node_modules/lodash/fp/toNumber.js | 5 + .../umzug/node_modules/lodash/fp/toPairs.js | 5 + .../umzug/node_modules/lodash/fp/toPairsIn.js | 5 + .../umzug/node_modules/lodash/fp/toPath.js | 5 + .../node_modules/lodash/fp/toPlainObject.js | 5 + .../node_modules/lodash/fp/toSafeInteger.js | 5 + .../umzug/node_modules/lodash/fp/toString.js | 5 + .../umzug/node_modules/lodash/fp/toUpper.js | 5 + .../umzug/node_modules/lodash/fp/transform.js | 5 + .../umzug/node_modules/lodash/fp/trim.js | 5 + .../umzug/node_modules/lodash/fp/trimChars.js | 5 + .../node_modules/lodash/fp/trimCharsEnd.js | 5 + .../node_modules/lodash/fp/trimCharsStart.js | 5 + .../umzug/node_modules/lodash/fp/trimEnd.js | 5 + .../umzug/node_modules/lodash/fp/trimStart.js | 5 + .../umzug/node_modules/lodash/fp/truncate.js | 5 + .../umzug/node_modules/lodash/fp/unapply.js | 1 + .../umzug/node_modules/lodash/fp/unary.js | 5 + .../umzug/node_modules/lodash/fp/unescape.js | 5 + .../umzug/node_modules/lodash/fp/union.js | 5 + .../umzug/node_modules/lodash/fp/unionBy.js | 5 + .../umzug/node_modules/lodash/fp/unionWith.js | 5 + .../umzug/node_modules/lodash/fp/uniq.js | 5 + .../umzug/node_modules/lodash/fp/uniqBy.js | 5 + .../umzug/node_modules/lodash/fp/uniqWith.js | 5 + .../umzug/node_modules/lodash/fp/uniqueId.js | 5 + .../umzug/node_modules/lodash/fp/unnest.js | 1 + .../umzug/node_modules/lodash/fp/unset.js | 5 + .../umzug/node_modules/lodash/fp/unzip.js | 5 + .../umzug/node_modules/lodash/fp/unzipWith.js | 5 + .../umzug/node_modules/lodash/fp/update.js | 5 + .../node_modules/lodash/fp/updateWith.js | 5 + .../umzug/node_modules/lodash/fp/upperCase.js | 5 + .../node_modules/lodash/fp/upperFirst.js | 5 + .../umzug/node_modules/lodash/fp/useWith.js | 1 + .../umzug/node_modules/lodash/fp/util.js | 2 + .../umzug/node_modules/lodash/fp/value.js | 5 + .../umzug/node_modules/lodash/fp/valueOf.js | 5 + .../umzug/node_modules/lodash/fp/values.js | 5 + .../umzug/node_modules/lodash/fp/valuesIn.js | 5 + .../umzug/node_modules/lodash/fp/where.js | 1 + .../umzug/node_modules/lodash/fp/whereEq.js | 1 + .../umzug/node_modules/lodash/fp/without.js | 5 + .../umzug/node_modules/lodash/fp/words.js | 5 + .../umzug/node_modules/lodash/fp/wrap.js | 5 + .../umzug/node_modules/lodash/fp/wrapperAt.js | 5 + .../node_modules/lodash/fp/wrapperChain.js | 5 + .../node_modules/lodash/fp/wrapperLodash.js | 5 + .../node_modules/lodash/fp/wrapperReverse.js | 5 + .../node_modules/lodash/fp/wrapperValue.js | 5 + .../umzug/node_modules/lodash/fp/xor.js | 5 + .../umzug/node_modules/lodash/fp/xorBy.js | 5 + .../umzug/node_modules/lodash/fp/xorWith.js | 5 + .../umzug/node_modules/lodash/fp/zip.js | 5 + .../umzug/node_modules/lodash/fp/zipAll.js | 5 + .../umzug/node_modules/lodash/fp/zipObj.js | 1 + .../umzug/node_modules/lodash/fp/zipObject.js | 5 + .../node_modules/lodash/fp/zipObjectDeep.js | 5 + .../umzug/node_modules/lodash/fp/zipWith.js | 5 + .../umzug/node_modules/lodash/fromPairs.js | 28 + .../umzug/node_modules/lodash/function.js | 25 + .../umzug/node_modules/lodash/functions.js | 31 + .../umzug/node_modules/lodash/functionsIn.js | 31 + node_modules/umzug/node_modules/lodash/get.js | 33 + .../umzug/node_modules/lodash/groupBy.js | 41 + node_modules/umzug/node_modules/lodash/gt.js | 29 + node_modules/umzug/node_modules/lodash/gte.js | 30 + node_modules/umzug/node_modules/lodash/has.js | 35 + .../umzug/node_modules/lodash/hasIn.js | 34 + .../umzug/node_modules/lodash/head.js | 23 + .../umzug/node_modules/lodash/identity.js | 21 + .../umzug/node_modules/lodash/inRange.js | 55 + .../umzug/node_modules/lodash/includes.js | 53 + .../umzug/node_modules/lodash/index.js | 1 + .../umzug/node_modules/lodash/indexOf.js | 42 + .../umzug/node_modules/lodash/initial.js | 22 + .../umzug/node_modules/lodash/intersection.js | 30 + .../node_modules/lodash/intersectionBy.js | 45 + .../node_modules/lodash/intersectionWith.js | 41 + .../umzug/node_modules/lodash/invert.js | 27 + .../umzug/node_modules/lodash/invertBy.js | 44 + .../umzug/node_modules/lodash/invoke.js | 24 + .../umzug/node_modules/lodash/invokeMap.js | 41 + .../umzug/node_modules/lodash/isArguments.js | 36 + .../umzug/node_modules/lodash/isArray.js | 26 + .../node_modules/lodash/isArrayBuffer.js | 27 + .../umzug/node_modules/lodash/isArrayLike.js | 33 + .../node_modules/lodash/isArrayLikeObject.js | 33 + .../umzug/node_modules/lodash/isBoolean.js | 29 + .../umzug/node_modules/lodash/isBuffer.js | 38 + .../umzug/node_modules/lodash/isDate.js | 27 + .../umzug/node_modules/lodash/isElement.js | 25 + .../umzug/node_modules/lodash/isEmpty.js | 77 + .../umzug/node_modules/lodash/isEqual.js | 35 + .../umzug/node_modules/lodash/isEqualWith.js | 41 + .../umzug/node_modules/lodash/isError.js | 36 + .../umzug/node_modules/lodash/isFinite.js | 36 + .../umzug/node_modules/lodash/isFunction.js | 37 + .../umzug/node_modules/lodash/isInteger.js | 33 + .../umzug/node_modules/lodash/isLength.js | 35 + .../umzug/node_modules/lodash/isMap.js | 27 + .../umzug/node_modules/lodash/isMatch.js | 36 + .../umzug/node_modules/lodash/isMatchWith.js | 41 + .../umzug/node_modules/lodash/isNaN.js | 38 + .../umzug/node_modules/lodash/isNative.js | 40 + .../umzug/node_modules/lodash/isNil.js | 25 + .../umzug/node_modules/lodash/isNull.js | 22 + .../umzug/node_modules/lodash/isNumber.js | 38 + .../umzug/node_modules/lodash/isObject.js | 31 + .../umzug/node_modules/lodash/isObjectLike.js | 29 + .../node_modules/lodash/isPlainObject.js | 62 + .../umzug/node_modules/lodash/isRegExp.js | 27 + .../node_modules/lodash/isSafeInteger.js | 37 + .../umzug/node_modules/lodash/isSet.js | 27 + .../umzug/node_modules/lodash/isString.js | 30 + .../umzug/node_modules/lodash/isSymbol.js | 29 + .../umzug/node_modules/lodash/isTypedArray.js | 27 + .../umzug/node_modules/lodash/isUndefined.js | 22 + .../umzug/node_modules/lodash/isWeakMap.js | 28 + .../umzug/node_modules/lodash/isWeakSet.js | 28 + .../umzug/node_modules/lodash/iteratee.js | 53 + .../umzug/node_modules/lodash/join.js | 26 + .../umzug/node_modules/lodash/kebabCase.js | 28 + .../umzug/node_modules/lodash/keyBy.js | 36 + .../umzug/node_modules/lodash/keys.js | 37 + .../umzug/node_modules/lodash/keysIn.js | 32 + .../umzug/node_modules/lodash/lang.js | 58 + .../umzug/node_modules/lodash/last.js | 20 + .../umzug/node_modules/lodash/lastIndexOf.js | 46 + .../umzug/node_modules/lodash/lodash.js | 17084 ++ .../umzug/node_modules/lodash/lodash.min.js | 136 + .../umzug/node_modules/lodash/lowerCase.js | 27 + .../umzug/node_modules/lodash/lowerFirst.js | 22 + node_modules/umzug/node_modules/lodash/lt.js | 29 + node_modules/umzug/node_modules/lodash/lte.js | 30 + node_modules/umzug/node_modules/lodash/map.js | 53 + .../umzug/node_modules/lodash/mapKeys.js | 36 + .../umzug/node_modules/lodash/mapValues.js | 43 + .../umzug/node_modules/lodash/matches.js | 39 + .../node_modules/lodash/matchesProperty.js | 37 + .../umzug/node_modules/lodash/math.js | 17 + node_modules/umzug/node_modules/lodash/max.js | 29 + .../umzug/node_modules/lodash/maxBy.js | 34 + .../umzug/node_modules/lodash/mean.js | 22 + .../umzug/node_modules/lodash/meanBy.js | 31 + .../umzug/node_modules/lodash/memoize.js | 73 + .../umzug/node_modules/lodash/merge.js | 39 + .../umzug/node_modules/lodash/mergeWith.js | 39 + .../umzug/node_modules/lodash/method.js | 34 + .../umzug/node_modules/lodash/methodOf.js | 33 + node_modules/umzug/node_modules/lodash/min.js | 29 + .../umzug/node_modules/lodash/minBy.js | 34 + .../umzug/node_modules/lodash/mixin.js | 74 + .../umzug/node_modules/lodash/multiply.js | 22 + .../umzug/node_modules/lodash/negate.js | 40 + .../umzug/node_modules/lodash/next.js | 35 + .../umzug/node_modules/lodash/noop.js | 17 + node_modules/umzug/node_modules/lodash/now.js | 23 + node_modules/umzug/node_modules/lodash/nth.js | 29 + .../umzug/node_modules/lodash/nthArg.js | 32 + .../umzug/node_modules/lodash/number.js | 5 + .../umzug/node_modules/lodash/object.js | 49 + .../umzug/node_modules/lodash/omit.js | 57 + .../umzug/node_modules/lodash/omitBy.js | 29 + .../umzug/node_modules/lodash/once.js | 25 + .../umzug/node_modules/lodash/orderBy.js | 47 + .../umzug/node_modules/lodash/over.js | 24 + .../umzug/node_modules/lodash/overArgs.js | 61 + .../umzug/node_modules/lodash/overEvery.js | 30 + .../umzug/node_modules/lodash/overSome.js | 30 + .../umzug/node_modules/lodash/package.json | 106 + node_modules/umzug/node_modules/lodash/pad.js | 49 + .../umzug/node_modules/lodash/padEnd.js | 39 + .../umzug/node_modules/lodash/padStart.js | 39 + .../umzug/node_modules/lodash/parseInt.js | 43 + .../umzug/node_modules/lodash/partial.js | 50 + .../umzug/node_modules/lodash/partialRight.js | 49 + .../umzug/node_modules/lodash/partition.js | 43 + .../umzug/node_modules/lodash/pick.js | 25 + .../umzug/node_modules/lodash/pickBy.js | 37 + .../umzug/node_modules/lodash/plant.js | 48 + .../umzug/node_modules/lodash/property.js | 32 + .../umzug/node_modules/lodash/propertyOf.js | 30 + .../umzug/node_modules/lodash/pull.js | 29 + .../umzug/node_modules/lodash/pullAll.js | 29 + .../umzug/node_modules/lodash/pullAllBy.js | 33 + .../umzug/node_modules/lodash/pullAllWith.js | 32 + .../umzug/node_modules/lodash/pullAt.js | 43 + .../umzug/node_modules/lodash/random.js | 82 + .../umzug/node_modules/lodash/range.js | 46 + .../umzug/node_modules/lodash/rangeRight.js | 41 + .../umzug/node_modules/lodash/rearg.js | 33 + .../umzug/node_modules/lodash/reduce.js | 51 + .../umzug/node_modules/lodash/reduceRight.js | 36 + .../umzug/node_modules/lodash/reject.js | 46 + .../umzug/node_modules/lodash/remove.js | 53 + .../umzug/node_modules/lodash/repeat.js | 37 + .../umzug/node_modules/lodash/replace.js | 29 + .../umzug/node_modules/lodash/rest.js | 40 + .../umzug/node_modules/lodash/result.js | 56 + .../umzug/node_modules/lodash/reverse.js | 34 + .../umzug/node_modules/lodash/round.js | 26 + .../umzug/node_modules/lodash/sample.js | 24 + .../umzug/node_modules/lodash/sampleSize.js | 37 + node_modules/umzug/node_modules/lodash/seq.js | 16 + node_modules/umzug/node_modules/lodash/set.js | 35 + .../umzug/node_modules/lodash/setWith.js | 32 + .../umzug/node_modules/lodash/shuffle.js | 25 + .../umzug/node_modules/lodash/size.js | 46 + .../umzug/node_modules/lodash/slice.js | 37 + .../umzug/node_modules/lodash/snakeCase.js | 28 + .../umzug/node_modules/lodash/some.js | 51 + .../umzug/node_modules/lodash/sortBy.js | 48 + .../umzug/node_modules/lodash/sortedIndex.js | 24 + .../node_modules/lodash/sortedIndexBy.js | 33 + .../node_modules/lodash/sortedIndexOf.js | 31 + .../node_modules/lodash/sortedLastIndex.js | 25 + .../node_modules/lodash/sortedLastIndexBy.js | 33 + .../node_modules/lodash/sortedLastIndexOf.js | 31 + .../umzug/node_modules/lodash/sortedUniq.js | 24 + .../umzug/node_modules/lodash/sortedUniqBy.js | 26 + .../umzug/node_modules/lodash/split.js | 52 + .../umzug/node_modules/lodash/spread.js | 63 + .../umzug/node_modules/lodash/startCase.js | 29 + .../umzug/node_modules/lodash/startsWith.js | 39 + .../umzug/node_modules/lodash/string.js | 33 + .../umzug/node_modules/lodash/stubArray.js | 23 + .../umzug/node_modules/lodash/stubFalse.js | 18 + .../umzug/node_modules/lodash/stubObject.js | 23 + .../umzug/node_modules/lodash/stubString.js | 18 + .../umzug/node_modules/lodash/stubTrue.js | 18 + .../umzug/node_modules/lodash/subtract.js | 22 + node_modules/umzug/node_modules/lodash/sum.js | 24 + .../umzug/node_modules/lodash/sumBy.js | 33 + .../umzug/node_modules/lodash/tail.js | 22 + .../umzug/node_modules/lodash/take.js | 37 + .../umzug/node_modules/lodash/takeRight.js | 39 + .../node_modules/lodash/takeRightWhile.js | 45 + .../umzug/node_modules/lodash/takeWhile.js | 45 + node_modules/umzug/node_modules/lodash/tap.js | 29 + .../umzug/node_modules/lodash/template.js | 238 + .../node_modules/lodash/templateSettings.js | 67 + .../umzug/node_modules/lodash/throttle.js | 69 + .../umzug/node_modules/lodash/thru.js | 28 + .../umzug/node_modules/lodash/times.js | 51 + .../umzug/node_modules/lodash/toArray.js | 58 + .../umzug/node_modules/lodash/toFinite.js | 42 + .../umzug/node_modules/lodash/toInteger.js | 36 + .../umzug/node_modules/lodash/toIterator.js | 23 + .../umzug/node_modules/lodash/toJSON.js | 1 + .../umzug/node_modules/lodash/toLength.js | 38 + .../umzug/node_modules/lodash/toLower.js | 28 + .../umzug/node_modules/lodash/toNumber.js | 66 + .../umzug/node_modules/lodash/toPairs.js | 30 + .../umzug/node_modules/lodash/toPairsIn.js | 30 + .../umzug/node_modules/lodash/toPath.js | 33 + .../node_modules/lodash/toPlainObject.js | 32 + .../node_modules/lodash/toSafeInteger.js | 37 + .../umzug/node_modules/lodash/toString.js | 28 + .../umzug/node_modules/lodash/toUpper.js | 28 + .../umzug/node_modules/lodash/transform.js | 65 + .../umzug/node_modules/lodash/trim.js | 49 + .../umzug/node_modules/lodash/trimEnd.js | 43 + .../umzug/node_modules/lodash/trimStart.js | 43 + .../umzug/node_modules/lodash/truncate.js | 111 + .../umzug/node_modules/lodash/unary.js | 22 + .../umzug/node_modules/lodash/unescape.js | 34 + .../umzug/node_modules/lodash/union.js | 26 + .../umzug/node_modules/lodash/unionBy.js | 39 + .../umzug/node_modules/lodash/unionWith.js | 34 + .../umzug/node_modules/lodash/uniq.js | 25 + .../umzug/node_modules/lodash/uniqBy.js | 31 + .../umzug/node_modules/lodash/uniqWith.js | 28 + .../umzug/node_modules/lodash/uniqueId.js | 28 + .../umzug/node_modules/lodash/unset.js | 34 + .../umzug/node_modules/lodash/unzip.js | 45 + .../umzug/node_modules/lodash/unzipWith.js | 39 + .../umzug/node_modules/lodash/update.js | 35 + .../umzug/node_modules/lodash/updateWith.js | 33 + .../umzug/node_modules/lodash/upperCase.js | 27 + .../umzug/node_modules/lodash/upperFirst.js | 22 + .../umzug/node_modules/lodash/util.js | 34 + .../umzug/node_modules/lodash/value.js | 1 + .../umzug/node_modules/lodash/valueOf.js | 1 + .../umzug/node_modules/lodash/values.js | 34 + .../umzug/node_modules/lodash/valuesIn.js | 32 + .../umzug/node_modules/lodash/without.js | 31 + .../umzug/node_modules/lodash/words.js | 35 + .../umzug/node_modules/lodash/wrap.js | 30 + .../umzug/node_modules/lodash/wrapperAt.js | 48 + .../umzug/node_modules/lodash/wrapperChain.js | 34 + .../node_modules/lodash/wrapperLodash.js | 147 + .../node_modules/lodash/wrapperReverse.js | 44 + .../umzug/node_modules/lodash/wrapperValue.js | 21 + node_modules/umzug/node_modules/lodash/xor.js | 28 + .../umzug/node_modules/lodash/xorBy.js | 39 + .../umzug/node_modules/lodash/xorWith.js | 34 + node_modules/umzug/node_modules/lodash/zip.js | 22 + .../umzug/node_modules/lodash/zipObject.js | 24 + .../node_modules/lodash/zipObjectDeep.js | 23 + .../umzug/node_modules/lodash/zipWith.js | 32 + node_modules/umzug/package.json | 105 + node_modules/umzug/test/helper.js | 77 + .../umzug/test/index/constructor.test.js | 42 + node_modules/umzug/test/index/down.test.js | 363 + node_modules/umzug/test/index/execute.test.js | 256 + .../umzug/test/index/executed.test.js | 107 + node_modules/umzug/test/index/index.js | 10 + node_modules/umzug/test/index/pending.test.js | 99 + node_modules/umzug/test/index/up.test.js | 314 + node_modules/umzug/test/storages/index.js | 7 + node_modules/umzug/test/storages/json.test.js | 110 + node_modules/umzug/test/storages/none.test.js | 35 + .../umzug/test/storages/sequelize.test.js | 441 + node_modules/umzug/yarn.lock | 2237 + node_modules/unc-path-regex/LICENSE | 21 + node_modules/unc-path-regex/README.md | 88 + node_modules/unc-path-regex/index.js | 5 + node_modules/unc-path-regex/package.json | 124 + node_modules/unique-stream/.npmignore | 3 + node_modules/unique-stream/.travis.yml | 3 + node_modules/unique-stream/LICENSE | 20 + node_modules/unique-stream/README.md | 89 + node_modules/unique-stream/index.js | 54 + node_modules/unique-stream/package.json | 89 + node_modules/unique-stream/test/index.js | 109 + node_modules/unpipe/HISTORY.md | 4 + node_modules/unpipe/LICENSE | 22 + node_modules/unpipe/README.md | 43 + node_modules/unpipe/index.js | 69 + node_modules/unpipe/package.json | 94 + node_modules/user-home/cli.js | 26 + node_modules/user-home/index.js | 15 + node_modules/user-home/license | 21 + node_modules/user-home/package.json | 103 + node_modules/user-home/readme.md | 42 + node_modules/util-deprecate/History.md | 16 + node_modules/util-deprecate/LICENSE | 24 + node_modules/util-deprecate/README.md | 53 + node_modules/util-deprecate/browser.js | 67 + node_modules/util-deprecate/node.js | 6 + node_modules/util-deprecate/package.json | 89 + node_modules/utils-merge/.travis.yml | 6 + node_modules/utils-merge/LICENSE | 20 + node_modules/utils-merge/README.md | 34 + node_modules/utils-merge/index.js | 23 + node_modules/utils-merge/package.json | 93 + node_modules/uuid/.npmignore | 8 + node_modules/uuid/.travis.yml | 5 + node_modules/uuid/AUTHORS | 5 + node_modules/uuid/HISTORY.md | 28 + node_modules/uuid/LICENSE.md | 21 + node_modules/uuid/README.md | 132 + node_modules/uuid/bin/uuid | 26 + node_modules/uuid/index.js | 8 + node_modules/uuid/lib/bytesToUuid.js | 23 + node_modules/uuid/lib/rng-browser.js | 33 + node_modules/uuid/lib/rng.js | 10 + node_modules/uuid/package.json | 122 + node_modules/uuid/test/mocha.opts | 3 + node_modules/uuid/test/test.js | 96 + node_modules/uuid/v1.js | 103 + node_modules/uuid/v4.js | 29 + node_modules/v8flags/.npmignore | 4 + node_modules/v8flags/LICENSE | 22 + node_modules/v8flags/README.md | 49 + node_modules/v8flags/index.js | 133 + node_modules/v8flags/package.json | 110 + .../validate-npm-package-license/LICENSE | 174 + .../validate-npm-package-license/README.md | 113 + .../validate-npm-package-license/index.js | 84 + .../validate-npm-package-license/package.json | 96 + node_modules/validator/CHANGELOG.md | 242 + node_modules/validator/LICENSE | 20 + node_modules/validator/README.md | 174 + node_modules/validator/index.js | 286 + node_modules/validator/lib/alpha.js | 58 + node_modules/validator/lib/blacklist.js | 18 + node_modules/validator/lib/contains.js | 22 + node_modules/validator/lib/equals.js | 18 + node_modules/validator/lib/escape.js | 18 + node_modules/validator/lib/isAfter.js | 26 + node_modules/validator/lib/isAlpha.js | 25 + node_modules/validator/lib/isAlphanumeric.js | 25 + node_modules/validator/lib/isAscii.js | 22 + node_modules/validator/lib/isBase64.js | 25 + node_modules/validator/lib/isBefore.js | 26 + node_modules/validator/lib/isBoolean.js | 18 + node_modules/validator/lib/isByteLength.js | 33 + node_modules/validator/lib/isCreditCard.js | 45 + node_modules/validator/lib/isCurrency.js | 88 + node_modules/validator/lib/isDataURI.js | 20 + node_modules/validator/lib/isDate.js | 100 + node_modules/validator/lib/isDecimal.js | 20 + node_modules/validator/lib/isDivisibleBy.js | 22 + node_modules/validator/lib/isEmail.js | 86 + node_modules/validator/lib/isFQDN.js | 57 + node_modules/validator/lib/isFloat.js | 24 + node_modules/validator/lib/isFullWidth.js | 20 + node_modules/validator/lib/isHalfWidth.js | 20 + node_modules/validator/lib/isHexColor.js | 20 + node_modules/validator/lib/isHexadecimal.js | 20 + node_modules/validator/lib/isIP.js | 81 + node_modules/validator/lib/isISBN.js | 57 + node_modules/validator/lib/isISIN.js | 48 + node_modules/validator/lib/isISO8601.js | 22 + node_modules/validator/lib/isIn.js | 39 + node_modules/validator/lib/isInt.js | 31 + node_modules/validator/lib/isJSON.js | 25 + node_modules/validator/lib/isLength.js | 34 + node_modules/validator/lib/isLowercase.js | 18 + node_modules/validator/lib/isMACAddress.js | 20 + node_modules/validator/lib/isMD5.js | 20 + node_modules/validator/lib/isMobilePhone.js | 64 + node_modules/validator/lib/isMongoId.js | 22 + node_modules/validator/lib/isMultibyte.js | 22 + node_modules/validator/lib/isNull.js | 18 + node_modules/validator/lib/isNumeric.js | 20 + node_modules/validator/lib/isSurrogatePair.js | 20 + node_modules/validator/lib/isURL.js | 142 + node_modules/validator/lib/isUUID.js | 28 + node_modules/validator/lib/isUppercase.js | 18 + node_modules/validator/lib/isVariableWidth.js | 22 + node_modules/validator/lib/isWhitelisted.js | 23 + node_modules/validator/lib/ltrim.js | 19 + node_modules/validator/lib/matches.js | 21 + node_modules/validator/lib/normalizeEmail.js | 48 + node_modules/validator/lib/rtrim.js | 25 + node_modules/validator/lib/stripLow.js | 23 + node_modules/validator/lib/toBoolean.js | 21 + node_modules/validator/lib/toDate.js | 19 + node_modules/validator/lib/toFloat.js | 18 + node_modules/validator/lib/toInt.js | 18 + node_modules/validator/lib/trim.js | 21 + node_modules/validator/lib/unescape.js | 18 + .../validator/lib/util/assertString.js | 12 + node_modules/validator/lib/util/merge.js | 18 + node_modules/validator/lib/util/toString.js | 22 + node_modules/validator/lib/whitelist.js | 18 + node_modules/validator/package.json | 129 + node_modules/validator/validator.js | 1183 + node_modules/validator/validator.min.js | 23 + node_modules/vary/HISTORY.md | 34 + node_modules/vary/LICENSE | 22 + node_modules/vary/README.md | 101 + node_modules/vary/index.js | 131 + node_modules/vary/package.json | 109 + node_modules/vinyl-fs/LICENSE | 20 + node_modules/vinyl-fs/README.md | 93 + node_modules/vinyl-fs/index.js | 7 + node_modules/vinyl-fs/lib/dest/index.js | 61 + .../vinyl-fs/lib/dest/writeContents/index.js | 59 + .../lib/dest/writeContents/writeBuffer.js | 13 + .../lib/dest/writeContents/writeDir.js | 9 + .../lib/dest/writeContents/writeStream.js | 22 + .../lib/src/getContents/bufferFile.js | 16 + .../vinyl-fs/lib/src/getContents/index.js | 26 + .../vinyl-fs/lib/src/getContents/readDir.js | 8 + .../lib/src/getContents/streamFile.js | 13 + node_modules/vinyl-fs/lib/src/getStats.js | 19 + node_modules/vinyl-fs/lib/src/index.js | 61 + .../vinyl-fs/node_modules/clone/.npmignore | 1 + .../vinyl-fs/node_modules/clone/.travis.yml | 5 + .../vinyl-fs/node_modules/clone/LICENSE | 18 + .../vinyl-fs/node_modules/clone/README.md | 126 + .../vinyl-fs/node_modules/clone/clone.js | 144 + .../vinyl-fs/node_modules/clone/package.json | 159 + .../vinyl-fs/node_modules/clone/test.js | 289 + .../node_modules/graceful-fs/.npmignore | 3 + .../node_modules/graceful-fs/.travis.yml | 7 + .../vinyl-fs/node_modules/graceful-fs/LICENSE | 15 + .../node_modules/graceful-fs/README.md | 36 + .../vinyl-fs/node_modules/graceful-fs/fs.js | 1 + .../node_modules/graceful-fs/graceful-fs.js | 158 + .../node_modules/graceful-fs/package.json | 112 + .../node_modules/graceful-fs/polyfills.js | 255 + .../node_modules/graceful-fs/test/max-open.js | 69 + .../node_modules/graceful-fs/test/open.js | 39 + .../graceful-fs/test/readdir-sort.js | 20 + .../graceful-fs/test/write-then-read.js | 47 + .../vinyl-fs/node_modules/isarray/README.md | 54 + .../node_modules/isarray/build/build.js | 209 + .../node_modules/isarray/component.json | 19 + .../vinyl-fs/node_modules/isarray/index.js | 3 + .../node_modules/isarray/package.json | 86 + .../node_modules/readable-stream/.npmignore | 5 + .../node_modules/readable-stream/LICENSE | 18 + .../node_modules/readable-stream/README.md | 15 + .../node_modules/readable-stream/duplex.js | 1 + .../readable-stream/lib/_stream_duplex.js | 89 + .../lib/_stream_passthrough.js | 46 + .../readable-stream/lib/_stream_readable.js | 982 + .../readable-stream/lib/_stream_transform.js | 210 + .../readable-stream/lib/_stream_writable.js | 386 + .../node_modules/readable-stream/package.json | 112 + .../readable-stream/passthrough.js | 1 + .../node_modules/readable-stream/readable.js | 11 + .../node_modules/readable-stream/transform.js | 1 + .../node_modules/readable-stream/writable.js | 1 + .../vinyl-fs/node_modules/through2/.npmignore | 3 + .../vinyl-fs/node_modules/through2/LICENSE | 39 + .../vinyl-fs/node_modules/through2/README.md | 132 + .../node_modules/through2/package.json | 98 + .../node_modules/through2/through2.js | 96 + .../vinyl-fs/node_modules/vinyl/LICENSE | 20 + .../vinyl-fs/node_modules/vinyl/README.md | 127 + .../vinyl-fs/node_modules/vinyl/index.js | 175 + .../node_modules/vinyl/lib/cloneBuffer.js | 7 + .../node_modules/vinyl/lib/inspectStream.js | 11 + .../node_modules/vinyl/lib/isBuffer.js | 7 + .../vinyl-fs/node_modules/vinyl/lib/isNull.js | 3 + .../node_modules/vinyl/lib/isStream.js | 5 + .../vinyl-fs/node_modules/vinyl/package.json | 108 + node_modules/vinyl-fs/package.json | 124 + node_modules/vinyl/LICENSE | 20 + node_modules/vinyl/README.md | 195 + node_modules/vinyl/index.js | 213 + node_modules/vinyl/lib/cloneBuffer.js | 7 + node_modules/vinyl/lib/inspectStream.js | 11 + node_modules/vinyl/lib/isBuffer.js | 1 + node_modules/vinyl/lib/isNull.js | 3 + node_modules/vinyl/lib/isStream.js | 5 + node_modules/vinyl/package.json | 107 + node_modules/void-elements/.gitattributes | 1 + node_modules/void-elements/.npmignore | 1 + node_modules/void-elements/.travis.yml | 4 + node_modules/void-elements/LICENSE | 22 + node_modules/void-elements/README.md | 27 + node_modules/void-elements/index.js | 23 + node_modules/void-elements/package.json | 92 + node_modules/void-elements/pre-publish.js | 29 + node_modules/void-elements/test/index.js | 5 + node_modules/which-module/CHANGELOG.md | 11 + node_modules/which-module/LICENSE | 13 + node_modules/which-module/README.md | 55 + node_modules/which-module/index.js | 9 + node_modules/which-module/package.json | 104 + node_modules/which/CHANGELOG.md | 142 + node_modules/which/LICENSE | 15 + node_modules/which/README.md | 48 + node_modules/which/bin/which | 52 + node_modules/which/package.json | 101 + node_modules/which/which.js | 132 + node_modules/window-size/LICENSE-MIT | 22 + node_modules/window-size/README.md | 26 + node_modules/window-size/index.js | 33 + node_modules/window-size/package.json | 89 + node_modules/with/.npmignore | 2 + node_modules/with/LICENSE | 19 + node_modules/with/README.md | 81 + node_modules/with/index.js | 125 + node_modules/with/node_modules/.bin/acorn | 1 + .../with/node_modules/acorn/.editorconfig | 7 + .../with/node_modules/acorn/.gitattributes | 1 + .../with/node_modules/acorn/.npmignore | 3 + .../with/node_modules/acorn/.tern-project | 1 + .../with/node_modules/acorn/.travis.yml | 2 + node_modules/with/node_modules/acorn/AUTHORS | 38 + node_modules/with/node_modules/acorn/LICENSE | 19 + .../with/node_modules/acorn/README.md | 377 + .../with/node_modules/acorn/bin/acorn | 54 + .../node_modules/acorn/bin/build-acorn.js | 51 + .../acorn/bin/generate-identifier-regex.js | 47 + .../with/node_modules/acorn/bin/prepublish.sh | 2 + .../node_modules/acorn/bin/update_authors.sh | 6 + .../with/node_modules/acorn/bin/without_eval | 48 + .../with/node_modules/acorn/dist/.keep | 0 .../with/node_modules/acorn/dist/acorn.js | 4014 + .../with/node_modules/acorn/dist/acorn_csp.js | 3985 + .../node_modules/acorn/dist/acorn_loose.js | 1298 + .../with/node_modules/acorn/dist/walk.js | 342 + .../with/node_modules/acorn/package.json | 200 + .../with/node_modules/acorn/src/expression.js | 697 + .../with/node_modules/acorn/src/identifier.js | 129 + .../with/node_modules/acorn/src/index.js | 75 + .../with/node_modules/acorn/src/location.js | 68 + .../acorn/src/loose/acorn_loose.js | 0 .../acorn/src/loose/expression.js | 511 + .../node_modules/acorn/src/loose/index.js | 50 + .../node_modules/acorn/src/loose/parseutil.js | 126 + .../node_modules/acorn/src/loose/state.js | 17 + .../node_modules/acorn/src/loose/statement.js | 419 + .../node_modules/acorn/src/loose/tokenize.js | 108 + .../with/node_modules/acorn/src/lval.js | 213 + .../with/node_modules/acorn/src/node.js | 70 + .../with/node_modules/acorn/src/options.js | 119 + .../with/node_modules/acorn/src/parseutil.js | 89 + .../with/node_modules/acorn/src/state.js | 78 + .../with/node_modules/acorn/src/statement.js | 594 + .../node_modules/acorn/src/tokencontext.js | 107 + .../with/node_modules/acorn/src/tokenize.js | 672 + .../with/node_modules/acorn/src/tokentype.js | 142 + .../with/node_modules/acorn/src/util.js | 9 + .../with/node_modules/acorn/src/walk/index.js | 291 + .../with/node_modules/acorn/src/whitespace.js | 12 + node_modules/with/package.json | 85 + node_modules/wkx/.editorconfig | 12 + node_modules/wkx/.jshintignore | 3 + node_modules/wkx/.jshintrc | 12 + node_modules/wkx/.npmignore | 2 + node_modules/wkx/.travis.yml | 9 + node_modules/wkx/LICENSE.txt | 20 + node_modules/wkx/README.md | 92 + node_modules/wkx/bower.json | 30 + node_modules/wkx/build/update-testdata.js | 40 + node_modules/wkx/dist/wkx.js | 4638 + node_modules/wkx/dist/wkx.min.js | 2 + node_modules/wkx/lib/binaryreader.js | 47 + node_modules/wkx/lib/binarywriter.js | 65 + node_modules/wkx/lib/geometry.js | 378 + node_modules/wkx/lib/geometrycollection.js | 163 + node_modules/wkx/lib/linestring.js | 178 + node_modules/wkx/lib/multilinestring.js | 184 + node_modules/wkx/lib/multipoint.js | 167 + node_modules/wkx/lib/multipolygon.js | 221 + node_modules/wkx/lib/point.js | 214 + node_modules/wkx/lib/polygon.js | 288 + node_modules/wkx/lib/types.js | 29 + node_modules/wkx/lib/wktparser.js | 124 + node_modules/wkx/lib/wkx.js | 9 + node_modules/wkx/lib/zigzag.js | 8 + node_modules/wkx/package.json | 103 + node_modules/wkx/test/binaryreader.js | 12 + node_modules/wkx/test/binarywriter.js | 44 + node_modules/wkx/test/geojson.js | 102 + node_modules/wkx/test/testdata.json | 268 + node_modules/wkx/test/testdataM.json | 289 + node_modules/wkx/test/testdataZ.json | 278 + node_modules/wkx/test/testdataZM.json | 292 + node_modules/wkx/test/twkb.js | 37 + node_modules/wkx/test/wkx.js | 202 + node_modules/wkx/test/zigzag.js | 20 + node_modules/wordwrap/LICENSE | 18 + node_modules/wordwrap/README.markdown | 70 + node_modules/wordwrap/example/center.js | 10 + node_modules/wordwrap/example/meat.js | 3 + node_modules/wordwrap/index.js | 76 + node_modules/wordwrap/package.json | 97 + node_modules/wordwrap/test/break.js | 30 + node_modules/wordwrap/test/idleness.txt | 63 + node_modules/wordwrap/test/wrap.js | 31 + node_modules/wrap-ansi/index.js | 168 + node_modules/wrap-ansi/license | 21 + node_modules/wrap-ansi/package.json | 141 + node_modules/wrap-ansi/readme.md | 73 + node_modules/wrappy/LICENSE | 15 + node_modules/wrappy/README.md | 36 + node_modules/wrappy/package.json | 97 + node_modules/wrappy/wrappy.js | 33 + node_modules/xtend/.jshintrc | 30 + node_modules/xtend/.npmignore | 1 + node_modules/xtend/LICENCE | 19 + node_modules/xtend/Makefile | 4 + node_modules/xtend/README.md | 32 + node_modules/xtend/immutable.js | 19 + node_modules/xtend/mutable.js | 17 + node_modules/xtend/package.json | 120 + node_modules/xtend/test.js | 83 + node_modules/y18n/LICENSE | 13 + node_modules/y18n/README.md | 91 + node_modules/y18n/index.js | 172 + node_modules/y18n/package.json | 105 + node_modules/yallist/LICENSE | 15 + node_modules/yallist/README.md | 204 + node_modules/yallist/iterator.js | 7 + node_modules/yallist/package.json | 96 + node_modules/yallist/yallist.js | 370 + node_modules/yargs-parser/CHANGELOG.md | 169 + node_modules/yargs-parser/LICENSE.txt | 14 + node_modules/yargs-parser/README.md | 257 + node_modules/yargs-parser/index.js | 759 + .../yargs-parser/lib/tokenize-arg-string.js | 34 + .../node_modules/camelcase/index.js | 56 + .../node_modules/camelcase/license | 21 + .../node_modules/camelcase/package.json | 119 + .../node_modules/camelcase/readme.md | 57 + node_modules/yargs-parser/package.json | 114 + node_modules/yargs/CHANGELOG.md | 374 + node_modules/yargs/LICENSE | 21 + node_modules/yargs/README.md | 926 + node_modules/yargs/completion.sh.hbs | 22 + node_modules/yargs/index.js | 504 + node_modules/yargs/lib/completion.js | 71 + node_modules/yargs/lib/parser.js | 448 + node_modules/yargs/lib/usage.js | 314 + node_modules/yargs/lib/validation.js | 196 + node_modules/yargs/package.json | 153 + package.json | 17 + public/stylesheets/style.css | 8 + routes/index.js | 9 + routes/users.js | 16 + seeders/20170425042049-seed_data_contact.js | 22 + views/error.jade | 6 + views/index.jade | 5 + views/layout.jade | 7 + 7786 files changed, 806617 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 app.js create mode 100755 bin/www create mode 100644 config/config.json create mode 100644 controllers/user.js create mode 100644 migrations/20170425040805-create-contact.js create mode 100644 models/contact.js create mode 100644 models/index.js create mode 120000 node_modules/.bin/acorn create mode 120000 node_modules/.bin/cleancss create mode 120000 node_modules/.bin/cross-env create mode 120000 node_modules/.bin/css-beautify create mode 120000 node_modules/.bin/editorconfig create mode 120000 node_modules/.bin/gulp create mode 120000 node_modules/.bin/html-beautify create mode 120000 node_modules/.bin/jade create mode 120000 node_modules/.bin/js-beautify create mode 120000 node_modules/.bin/mime create mode 120000 node_modules/.bin/mkdirp create mode 120000 node_modules/.bin/nopt create mode 120000 node_modules/.bin/semver create mode 120000 node_modules/.bin/sequelize create mode 120000 node_modules/.bin/strip-bom create mode 120000 node_modules/.bin/uglifyjs create mode 120000 node_modules/.bin/user-home create mode 120000 node_modules/.bin/uuid create mode 120000 node_modules/.bin/which create mode 100644 node_modules/@types/geojson/LICENSE create mode 100644 node_modules/@types/geojson/README.md create mode 100644 node_modules/@types/geojson/index.d.ts create mode 100644 node_modules/@types/geojson/package.json create mode 100644 node_modules/abbrev/LICENSE create mode 100644 node_modules/abbrev/README.md create mode 100644 node_modules/abbrev/abbrev.js create mode 100644 node_modules/abbrev/package.json create mode 100644 node_modules/accepts/HISTORY.md create mode 100644 node_modules/accepts/LICENSE create mode 100644 node_modules/accepts/README.md create mode 100644 node_modules/accepts/index.js create mode 100644 node_modules/accepts/package.json create mode 100644 node_modules/acorn-globals/LICENSE create mode 100644 node_modules/acorn-globals/README.md create mode 100644 node_modules/acorn-globals/index.js create mode 100644 node_modules/acorn-globals/package.json create mode 100644 node_modules/acorn/.editorconfig create mode 100644 node_modules/acorn/.gitattributes create mode 100644 node_modules/acorn/.npmignore create mode 100644 node_modules/acorn/.tern-project create mode 100644 node_modules/acorn/.travis.yml create mode 100644 node_modules/acorn/AUTHORS create mode 100644 node_modules/acorn/LICENSE create mode 100644 node_modules/acorn/README.md create mode 100755 node_modules/acorn/bin/acorn create mode 100644 node_modules/acorn/bin/build-acorn.js create mode 100644 node_modules/acorn/bin/generate-identifier-regex.js create mode 100755 node_modules/acorn/bin/update_authors.sh create mode 100644 node_modules/acorn/dist/.keep create mode 100644 node_modules/acorn/dist/acorn.js create mode 100644 node_modules/acorn/dist/acorn_loose.js create mode 100644 node_modules/acorn/dist/walk.js create mode 100644 node_modules/acorn/package.json create mode 100644 node_modules/acorn/src/bin/acorn.js create mode 100644 node_modules/acorn/src/expression.js create mode 100644 node_modules/acorn/src/identifier.js create mode 100644 node_modules/acorn/src/index.js create mode 100644 node_modules/acorn/src/location.js create mode 100644 node_modules/acorn/src/locutil.js create mode 100644 node_modules/acorn/src/loose/acorn_loose.js create mode 100644 node_modules/acorn/src/loose/expression.js create mode 100644 node_modules/acorn/src/loose/index.js create mode 100644 node_modules/acorn/src/loose/parseutil.js create mode 100644 node_modules/acorn/src/loose/state.js create mode 100644 node_modules/acorn/src/loose/statement.js create mode 100644 node_modules/acorn/src/loose/tokenize.js create mode 100644 node_modules/acorn/src/lval.js create mode 100644 node_modules/acorn/src/node.js create mode 100644 node_modules/acorn/src/options.js create mode 100644 node_modules/acorn/src/parseutil.js create mode 100644 node_modules/acorn/src/state.js create mode 100644 node_modules/acorn/src/statement.js create mode 100644 node_modules/acorn/src/tokencontext.js create mode 100644 node_modules/acorn/src/tokenize.js create mode 100644 node_modules/acorn/src/tokentype.js create mode 100644 node_modules/acorn/src/util.js create mode 100644 node_modules/acorn/src/walk/index.js create mode 100644 node_modules/acorn/src/whitespace.js create mode 100644 node_modules/align-text/LICENSE create mode 100644 node_modules/align-text/README.md create mode 100644 node_modules/align-text/index.js create mode 100644 node_modules/align-text/package.json create mode 100644 node_modules/amdefine/LICENSE create mode 100644 node_modules/amdefine/README.md create mode 100644 node_modules/amdefine/amdefine.js create mode 100644 node_modules/amdefine/intercept.js create mode 100644 node_modules/amdefine/package.json create mode 100644 node_modules/ansi-regex/index.js create mode 100644 node_modules/ansi-regex/license create mode 100644 node_modules/ansi-regex/package.json create mode 100644 node_modules/ansi-regex/readme.md create mode 100644 node_modules/ansi-styles/index.js create mode 100644 node_modules/ansi-styles/license create mode 100644 node_modules/ansi-styles/package.json create mode 100644 node_modules/ansi-styles/readme.md create mode 100644 node_modules/ap/README.markdown create mode 100644 node_modules/ap/examples/z.js create mode 100644 node_modules/ap/index.js create mode 100644 node_modules/ap/package.json create mode 100644 node_modules/ap/test/curry.js create mode 100644 node_modules/archy/.travis.yml create mode 100644 node_modules/archy/LICENSE create mode 100644 node_modules/archy/examples/beep.js create mode 100644 node_modules/archy/examples/multi_line.js create mode 100644 node_modules/archy/index.js create mode 100644 node_modules/archy/package.json create mode 100644 node_modules/archy/readme.markdown create mode 100644 node_modules/archy/test/beep.js create mode 100644 node_modules/archy/test/multi_line.js create mode 100644 node_modules/archy/test/non_unicode.js create mode 100755 node_modules/arr-diff/LICENSE create mode 100644 node_modules/arr-diff/README.md create mode 100644 node_modules/arr-diff/index.js create mode 100644 node_modules/arr-diff/package.json create mode 100755 node_modules/arr-flatten/LICENSE create mode 100755 node_modules/arr-flatten/README.md create mode 100644 node_modules/arr-flatten/index.js create mode 100644 node_modules/arr-flatten/package.json create mode 100644 node_modules/array-differ/index.js create mode 100644 node_modules/array-differ/package.json create mode 100644 node_modules/array-differ/readme.md create mode 100644 node_modules/array-flatten/LICENSE create mode 100644 node_modules/array-flatten/README.md create mode 100644 node_modules/array-flatten/array-flatten.js create mode 100644 node_modules/array-flatten/package.json create mode 100644 node_modules/array-uniq/index.js create mode 100644 node_modules/array-uniq/license create mode 100644 node_modules/array-uniq/package.json create mode 100644 node_modules/array-uniq/readme.md create mode 100755 node_modules/array-unique/LICENSE create mode 100755 node_modules/array-unique/README.md create mode 100755 node_modules/array-unique/index.js create mode 100755 node_modules/array-unique/package.json create mode 100644 node_modules/asap/LICENSE.md create mode 100644 node_modules/asap/README.md create mode 100644 node_modules/asap/asap.js create mode 100644 node_modules/asap/package.json create mode 100644 node_modules/balanced-match/.npmignore create mode 100644 node_modules/balanced-match/LICENSE.md create mode 100644 node_modules/balanced-match/README.md create mode 100644 node_modules/balanced-match/index.js create mode 100644 node_modules/balanced-match/package.json create mode 100644 node_modules/basic-auth/HISTORY.md create mode 100644 node_modules/basic-auth/LICENSE create mode 100644 node_modules/basic-auth/README.md create mode 100644 node_modules/basic-auth/index.js create mode 100644 node_modules/basic-auth/package.json create mode 100644 node_modules/beeper/index.js create mode 100644 node_modules/beeper/license create mode 100644 node_modules/beeper/package.json create mode 100644 node_modules/beeper/readme.md create mode 100644 node_modules/bluebird/LICENSE create mode 100644 node_modules/bluebird/README.md create mode 100644 node_modules/bluebird/changelog.md create mode 100644 node_modules/bluebird/js/browser/bluebird.core.js create mode 100644 node_modules/bluebird/js/browser/bluebird.core.min.js create mode 100644 node_modules/bluebird/js/browser/bluebird.js create mode 100644 node_modules/bluebird/js/browser/bluebird.min.js create mode 100644 node_modules/bluebird/js/release/any.js create mode 100644 node_modules/bluebird/js/release/assert.js create mode 100644 node_modules/bluebird/js/release/async.js create mode 100644 node_modules/bluebird/js/release/bind.js create mode 100644 node_modules/bluebird/js/release/bluebird.js create mode 100644 node_modules/bluebird/js/release/call_get.js create mode 100644 node_modules/bluebird/js/release/cancel.js create mode 100644 node_modules/bluebird/js/release/catch_filter.js create mode 100644 node_modules/bluebird/js/release/context.js create mode 100644 node_modules/bluebird/js/release/debuggability.js create mode 100644 node_modules/bluebird/js/release/direct_resolve.js create mode 100644 node_modules/bluebird/js/release/each.js create mode 100644 node_modules/bluebird/js/release/errors.js create mode 100644 node_modules/bluebird/js/release/es5.js create mode 100644 node_modules/bluebird/js/release/filter.js create mode 100644 node_modules/bluebird/js/release/finally.js create mode 100644 node_modules/bluebird/js/release/generators.js create mode 100644 node_modules/bluebird/js/release/join.js create mode 100644 node_modules/bluebird/js/release/map.js create mode 100644 node_modules/bluebird/js/release/method.js create mode 100644 node_modules/bluebird/js/release/nodeback.js create mode 100644 node_modules/bluebird/js/release/nodeify.js create mode 100644 node_modules/bluebird/js/release/promise.js create mode 100644 node_modules/bluebird/js/release/promise_array.js create mode 100644 node_modules/bluebird/js/release/promisify.js create mode 100644 node_modules/bluebird/js/release/props.js create mode 100644 node_modules/bluebird/js/release/queue.js create mode 100644 node_modules/bluebird/js/release/race.js create mode 100644 node_modules/bluebird/js/release/reduce.js create mode 100644 node_modules/bluebird/js/release/schedule.js create mode 100644 node_modules/bluebird/js/release/settle.js create mode 100644 node_modules/bluebird/js/release/some.js create mode 100644 node_modules/bluebird/js/release/synchronous_inspection.js create mode 100644 node_modules/bluebird/js/release/thenables.js create mode 100644 node_modules/bluebird/js/release/timers.js create mode 100644 node_modules/bluebird/js/release/using.js create mode 100644 node_modules/bluebird/js/release/util.js create mode 100644 node_modules/bluebird/package.json create mode 100644 node_modules/body-parser/HISTORY.md create mode 100644 node_modules/body-parser/LICENSE create mode 100644 node_modules/body-parser/README.md create mode 100644 node_modules/body-parser/index.js create mode 100644 node_modules/body-parser/lib/read.js create mode 100644 node_modules/body-parser/lib/types/json.js create mode 100644 node_modules/body-parser/lib/types/raw.js create mode 100644 node_modules/body-parser/lib/types/text.js create mode 100644 node_modules/body-parser/lib/types/urlencoded.js create mode 100644 node_modules/body-parser/node_modules/debug/.coveralls.yml create mode 100644 node_modules/body-parser/node_modules/debug/.eslintrc create mode 100644 node_modules/body-parser/node_modules/debug/.npmignore create mode 100644 node_modules/body-parser/node_modules/debug/.travis.yml create mode 100644 node_modules/body-parser/node_modules/debug/CHANGELOG.md create mode 100644 node_modules/body-parser/node_modules/debug/LICENSE create mode 100644 node_modules/body-parser/node_modules/debug/Makefile create mode 100644 node_modules/body-parser/node_modules/debug/README.md create mode 100644 node_modules/body-parser/node_modules/debug/bower.json create mode 100644 node_modules/body-parser/node_modules/debug/component.json create mode 100644 node_modules/body-parser/node_modules/debug/karma.conf.js create mode 100644 node_modules/body-parser/node_modules/debug/node.js create mode 100644 node_modules/body-parser/node_modules/debug/package.json create mode 100644 node_modules/body-parser/node_modules/debug/src/browser.js create mode 100644 node_modules/body-parser/node_modules/debug/src/debug.js create mode 100644 node_modules/body-parser/node_modules/debug/src/index.js create mode 100644 node_modules/body-parser/node_modules/debug/src/node.js create mode 100644 node_modules/body-parser/package.json create mode 100644 node_modules/brace-expansion/README.md create mode 100644 node_modules/brace-expansion/index.js create mode 100644 node_modules/brace-expansion/package.json create mode 100644 node_modules/braces/LICENSE create mode 100644 node_modules/braces/README.md create mode 100644 node_modules/braces/index.js create mode 100644 node_modules/braces/package.json create mode 100644 node_modules/buffer-shims/index.js create mode 100644 node_modules/buffer-shims/license.md create mode 100644 node_modules/buffer-shims/package.json create mode 100644 node_modules/buffer-shims/readme.md create mode 100644 node_modules/buffer-writer/.npmignore create mode 100644 node_modules/buffer-writer/.travis.yml create mode 100644 node_modules/buffer-writer/LICENSE create mode 100644 node_modules/buffer-writer/README.md create mode 100644 node_modules/buffer-writer/benchmark/index.js create mode 100644 node_modules/buffer-writer/benchmark/int-16-benchmark.js create mode 100644 node_modules/buffer-writer/benchmark/int-32-benchmark.js create mode 100644 node_modules/buffer-writer/benchmark/join-benchmark.js create mode 100644 node_modules/buffer-writer/benchmark/resize-benchmark.js create mode 100644 node_modules/buffer-writer/benchmark/small-benchmark.js create mode 100644 node_modules/buffer-writer/index.js create mode 100644 node_modules/buffer-writer/package.json create mode 100644 node_modules/buffer-writer/test/mocha.opts create mode 100644 node_modules/buffer-writer/test/writer-tests.js create mode 100644 node_modules/builtin-modules/builtin-modules.json create mode 100644 node_modules/builtin-modules/index.js create mode 100644 node_modules/builtin-modules/license create mode 100644 node_modules/builtin-modules/package.json create mode 100644 node_modules/builtin-modules/readme.md create mode 100644 node_modules/builtin-modules/static.js create mode 100644 node_modules/bytes/History.md create mode 100644 node_modules/bytes/LICENSE create mode 100644 node_modules/bytes/Readme.md create mode 100644 node_modules/bytes/index.js create mode 100644 node_modules/bytes/package.json create mode 100644 node_modules/camelcase/index.js create mode 100644 node_modules/camelcase/license create mode 100644 node_modules/camelcase/package.json create mode 100644 node_modules/camelcase/readme.md create mode 100644 node_modules/center-align/LICENSE create mode 100644 node_modules/center-align/README.md create mode 100644 node_modules/center-align/index.js create mode 100644 node_modules/center-align/package.json create mode 100644 node_modules/center-align/utils.js create mode 100644 node_modules/chalk/index.js create mode 100644 node_modules/chalk/license create mode 100644 node_modules/chalk/package.json create mode 100644 node_modules/chalk/readme.md create mode 100644 node_modules/character-parser/.npmignore create mode 100644 node_modules/character-parser/LICENSE create mode 100644 node_modules/character-parser/README.md create mode 100644 node_modules/character-parser/index.js create mode 100644 node_modules/character-parser/package.json create mode 100644 node_modules/clean-css/History.md create mode 100644 node_modules/clean-css/LICENSE create mode 100644 node_modules/clean-css/README.md create mode 100755 node_modules/clean-css/bin/cleancss create mode 100644 node_modules/clean-css/index.js create mode 100644 node_modules/clean-css/lib/clean.js create mode 100644 node_modules/clean-css/lib/colors/hex-name-shortener.js create mode 100644 node_modules/clean-css/lib/colors/hsl.js create mode 100644 node_modules/clean-css/lib/colors/rgb.js create mode 100644 node_modules/clean-css/lib/imports/inliner.js create mode 100644 node_modules/clean-css/lib/properties/break-up.js create mode 100644 node_modules/clean-css/lib/properties/can-override.js create mode 100644 node_modules/clean-css/lib/properties/clone.js create mode 100644 node_modules/clean-css/lib/properties/compactable.js create mode 100644 node_modules/clean-css/lib/properties/every-combination.js create mode 100644 node_modules/clean-css/lib/properties/has-inherit.js create mode 100644 node_modules/clean-css/lib/properties/invalid-property-error.js create mode 100644 node_modules/clean-css/lib/properties/optimizer.js create mode 100644 node_modules/clean-css/lib/properties/override-compactor.js create mode 100644 node_modules/clean-css/lib/properties/populate-components.js create mode 100644 node_modules/clean-css/lib/properties/remove-unused.js create mode 100644 node_modules/clean-css/lib/properties/restore-from-optimizing.js create mode 100644 node_modules/clean-css/lib/properties/restore.js create mode 100644 node_modules/clean-css/lib/properties/shorthand-compactor.js create mode 100644 node_modules/clean-css/lib/properties/validator.js create mode 100644 node_modules/clean-css/lib/properties/vendor-prefixes.js create mode 100644 node_modules/clean-css/lib/properties/wrap-for-optimizing.js create mode 100644 node_modules/clean-css/lib/selectors/advanced.js create mode 100644 node_modules/clean-css/lib/selectors/clean-up.js create mode 100644 node_modules/clean-css/lib/selectors/extractor.js create mode 100644 node_modules/clean-css/lib/selectors/is-special.js create mode 100644 node_modules/clean-css/lib/selectors/merge-adjacent.js create mode 100644 node_modules/clean-css/lib/selectors/merge-media-queries.js create mode 100644 node_modules/clean-css/lib/selectors/merge-non-adjacent-by-body.js create mode 100644 node_modules/clean-css/lib/selectors/merge-non-adjacent-by-selector.js create mode 100644 node_modules/clean-css/lib/selectors/reduce-non-adjacent.js create mode 100644 node_modules/clean-css/lib/selectors/remove-duplicate-media-queries.js create mode 100644 node_modules/clean-css/lib/selectors/remove-duplicates.js create mode 100644 node_modules/clean-css/lib/selectors/reorderable.js create mode 100644 node_modules/clean-css/lib/selectors/restructure.js create mode 100644 node_modules/clean-css/lib/selectors/simple.js create mode 100644 node_modules/clean-css/lib/source-maps/track.js create mode 100644 node_modules/clean-css/lib/stringifier/helpers.js create mode 100644 node_modules/clean-css/lib/stringifier/one-time.js create mode 100644 node_modules/clean-css/lib/stringifier/simple.js create mode 100644 node_modules/clean-css/lib/stringifier/source-maps.js create mode 100644 node_modules/clean-css/lib/text/comments-processor.js create mode 100644 node_modules/clean-css/lib/text/escape-store.js create mode 100644 node_modules/clean-css/lib/text/expressions-processor.js create mode 100644 node_modules/clean-css/lib/text/free-text-processor.js create mode 100644 node_modules/clean-css/lib/text/urls-processor.js create mode 100644 node_modules/clean-css/lib/tokenizer/extract-properties.js create mode 100644 node_modules/clean-css/lib/tokenizer/extract-selectors.js create mode 100644 node_modules/clean-css/lib/tokenizer/tokenize.js create mode 100644 node_modules/clean-css/lib/urls/rebase.js create mode 100644 node_modules/clean-css/lib/urls/reduce.js create mode 100644 node_modules/clean-css/lib/urls/rewrite.js create mode 100644 node_modules/clean-css/lib/utils/clone-array.js create mode 100644 node_modules/clean-css/lib/utils/compatibility.js create mode 100644 node_modules/clean-css/lib/utils/input-source-map-tracker.js create mode 100644 node_modules/clean-css/lib/utils/object.js create mode 100644 node_modules/clean-css/lib/utils/quote-scanner.js create mode 100644 node_modules/clean-css/lib/utils/source-reader.js create mode 100644 node_modules/clean-css/lib/utils/source-tracker.js create mode 100644 node_modules/clean-css/lib/utils/split.js create mode 100644 node_modules/clean-css/node_modules/commander/History.md create mode 100644 node_modules/clean-css/node_modules/commander/LICENSE create mode 100644 node_modules/clean-css/node_modules/commander/Readme.md create mode 100644 node_modules/clean-css/node_modules/commander/index.js create mode 100644 node_modules/clean-css/node_modules/commander/package.json create mode 100644 node_modules/clean-css/package.json create mode 100644 node_modules/cli-color/.lint create mode 100644 node_modules/cli-color/.npmignore create mode 100644 node_modules/cli-color/.travis.yml create mode 100644 node_modules/cli-color/CHANGES create mode 100644 node_modules/cli-color/LICENSE create mode 100644 node_modules/cli-color/README.md create mode 100644 node_modules/cli-color/art.js create mode 100644 node_modules/cli-color/bare.js create mode 100644 node_modules/cli-color/beep.js create mode 100755 node_modules/cli-color/bin/generate-color-images create mode 100644 node_modules/cli-color/columns.js create mode 100644 node_modules/cli-color/erase.js create mode 100644 node_modules/cli-color/examples/art.js create mode 100644 node_modules/cli-color/examples/basic.js create mode 100644 node_modules/cli-color/examples/erase.js create mode 100644 node_modules/cli-color/examples/styles.js create mode 100644 node_modules/cli-color/examples/throbber.js create mode 100644 node_modules/cli-color/examples/xterm.js create mode 100644 node_modules/cli-color/get-stripped-length.js create mode 100644 node_modules/cli-color/index.js create mode 100644 node_modules/cli-color/lib/sgr.js create mode 100644 node_modules/cli-color/lib/xterm-colors.js create mode 100644 node_modules/cli-color/lib/xterm-match.js create mode 100644 node_modules/cli-color/move.js create mode 100644 node_modules/cli-color/package.json create mode 100644 node_modules/cli-color/reset.js create mode 100644 node_modules/cli-color/slice.js create mode 100644 node_modules/cli-color/strip.js create mode 100755 node_modules/cli-color/test/__playground/throbber.formatted.js create mode 100755 node_modules/cli-color/test/__playground/throbber.js create mode 100644 node_modules/cli-color/test/art.js create mode 100644 node_modules/cli-color/test/bare.js create mode 100644 node_modules/cli-color/test/beep.js create mode 100644 node_modules/cli-color/test/columns.js create mode 100644 node_modules/cli-color/test/erase.js create mode 100644 node_modules/cli-color/test/get-stripped-length.js create mode 100644 node_modules/cli-color/test/index.js create mode 100644 node_modules/cli-color/test/lib/sgr.js create mode 100644 node_modules/cli-color/test/lib/xterm-colors.js create mode 100644 node_modules/cli-color/test/lib/xterm-match.js create mode 100644 node_modules/cli-color/test/move.js create mode 100644 node_modules/cli-color/test/reset.js create mode 100644 node_modules/cli-color/test/slice.js create mode 100644 node_modules/cli-color/test/strip.js create mode 100644 node_modules/cli-color/test/throbber.js create mode 100644 node_modules/cli-color/test/visual.js create mode 100644 node_modules/cli-color/test/window-size.js create mode 100644 node_modules/cli-color/throbber.js create mode 100644 node_modules/cli-color/window-size.js create mode 100644 node_modules/cliui/.coveralls.yml create mode 100644 node_modules/cliui/.npmignore create mode 100644 node_modules/cliui/.travis.yml create mode 100644 node_modules/cliui/LICENSE.txt create mode 100644 node_modules/cliui/README.md create mode 100644 node_modules/cliui/index.js create mode 100644 node_modules/cliui/node_modules/wordwrap/.npmignore create mode 100644 node_modules/cliui/node_modules/wordwrap/README.markdown create mode 100644 node_modules/cliui/node_modules/wordwrap/example/center.js create mode 100644 node_modules/cliui/node_modules/wordwrap/example/meat.js create mode 100644 node_modules/cliui/node_modules/wordwrap/index.js create mode 100644 node_modules/cliui/node_modules/wordwrap/package.json create mode 100644 node_modules/cliui/node_modules/wordwrap/test/break.js create mode 100644 node_modules/cliui/node_modules/wordwrap/test/idleness.txt create mode 100644 node_modules/cliui/node_modules/wordwrap/test/wrap.js create mode 100644 node_modules/cliui/package.json create mode 100644 node_modules/cliui/test/cliui.js create mode 100644 node_modules/clone-stats/LICENSE.md create mode 100644 node_modules/clone-stats/README.md create mode 100644 node_modules/clone-stats/index.js create mode 100644 node_modules/clone-stats/package.json create mode 100644 node_modules/clone-stats/test.js create mode 100644 node_modules/clone/.npmignore create mode 100644 node_modules/clone/.travis.yml create mode 100644 node_modules/clone/LICENSE create mode 100644 node_modules/clone/README.md create mode 100644 node_modules/clone/clone.js create mode 100644 node_modules/clone/package.json create mode 100644 node_modules/clone/test-apart-ctx.html create mode 100644 node_modules/clone/test.html create mode 100644 node_modules/clone/test.js create mode 100644 node_modules/code-point-at/index.js create mode 100644 node_modules/code-point-at/license create mode 100644 node_modules/code-point-at/package.json create mode 100644 node_modules/code-point-at/readme.md create mode 100644 node_modules/commander/History.md create mode 100644 node_modules/commander/Readme.md create mode 100644 node_modules/commander/index.js create mode 100644 node_modules/commander/package.json create mode 100644 node_modules/concat-map/.travis.yml create mode 100644 node_modules/concat-map/LICENSE create mode 100644 node_modules/concat-map/README.markdown create mode 100644 node_modules/concat-map/example/map.js create mode 100644 node_modules/concat-map/index.js create mode 100644 node_modules/concat-map/package.json create mode 100644 node_modules/concat-map/test/map.js create mode 100644 node_modules/config-chain/.npmignore create mode 100644 node_modules/config-chain/LICENCE create mode 100755 node_modules/config-chain/index.js create mode 100644 node_modules/config-chain/package.json create mode 100644 node_modules/config-chain/readme.markdown create mode 100644 node_modules/config-chain/test/broken.js create mode 100644 node_modules/config-chain/test/broken.json create mode 100644 node_modules/config-chain/test/chain-class.js create mode 100644 node_modules/config-chain/test/env.js create mode 100644 node_modules/config-chain/test/find-file.js create mode 100644 node_modules/config-chain/test/get.js create mode 100644 node_modules/config-chain/test/ignore-unfound-file.js create mode 100644 node_modules/config-chain/test/ini.js create mode 100644 node_modules/config-chain/test/save.js create mode 100644 node_modules/constantinople/.gitattributes create mode 100644 node_modules/constantinople/.npmignore create mode 100644 node_modules/constantinople/.travis.yml create mode 100644 node_modules/constantinople/LICENSE create mode 100644 node_modules/constantinople/README.md create mode 100644 node_modules/constantinople/index.js create mode 100644 node_modules/constantinople/package.json create mode 100644 node_modules/constantinople/test/index.js create mode 100644 node_modules/content-disposition/HISTORY.md create mode 100644 node_modules/content-disposition/LICENSE create mode 100644 node_modules/content-disposition/README.md create mode 100644 node_modules/content-disposition/index.js create mode 100644 node_modules/content-disposition/package.json create mode 100644 node_modules/content-type/HISTORY.md create mode 100644 node_modules/content-type/LICENSE create mode 100644 node_modules/content-type/README.md create mode 100644 node_modules/content-type/index.js create mode 100644 node_modules/content-type/package.json create mode 100644 node_modules/cookie-parser/HISTORY.md create mode 100644 node_modules/cookie-parser/LICENSE create mode 100644 node_modules/cookie-parser/README.md create mode 100644 node_modules/cookie-parser/index.js create mode 100644 node_modules/cookie-parser/package.json create mode 100644 node_modules/cookie-signature/.npmignore create mode 100644 node_modules/cookie-signature/History.md create mode 100644 node_modules/cookie-signature/Readme.md create mode 100644 node_modules/cookie-signature/index.js create mode 100644 node_modules/cookie-signature/package.json create mode 100644 node_modules/cookie/HISTORY.md create mode 100644 node_modules/cookie/LICENSE create mode 100644 node_modules/cookie/README.md create mode 100644 node_modules/cookie/index.js create mode 100644 node_modules/cookie/package.json create mode 100644 node_modules/core-util-is/LICENSE create mode 100644 node_modules/core-util-is/README.md create mode 100644 node_modules/core-util-is/float.patch create mode 100644 node_modules/core-util-is/lib/util.js create mode 100644 node_modules/core-util-is/package.json create mode 100644 node_modules/core-util-is/test.js create mode 100644 node_modules/cross-env/CHANGELOG.md create mode 100644 node_modules/cross-env/LICENSE create mode 100644 node_modules/cross-env/README.md create mode 100755 node_modules/cross-env/dist/bin/cross-env.js create mode 100644 node_modules/cross-env/dist/command.js create mode 100644 node_modules/cross-env/dist/index.js create mode 100644 node_modules/cross-env/package.json create mode 100644 node_modules/cross-spawn/CHANGELOG.md create mode 100644 node_modules/cross-spawn/LICENSE create mode 100644 node_modules/cross-spawn/README.md create mode 100644 node_modules/cross-spawn/index.js create mode 100644 node_modules/cross-spawn/lib/enoent.js create mode 100644 node_modules/cross-spawn/lib/parse.js create mode 100644 node_modules/cross-spawn/lib/util/escapeArgument.js create mode 100644 node_modules/cross-spawn/lib/util/escapeCommand.js create mode 100644 node_modules/cross-spawn/lib/util/hasEmptyArgumentBug.js create mode 100644 node_modules/cross-spawn/lib/util/readShebang.js create mode 100644 node_modules/cross-spawn/lib/util/resolveCommand.js create mode 100644 node_modules/cross-spawn/package.json create mode 100644 node_modules/css-parse/.npmignore create mode 100644 node_modules/css-parse/History.md create mode 100644 node_modules/css-parse/Makefile create mode 100644 node_modules/css-parse/Readme.md create mode 100644 node_modules/css-parse/component.json create mode 100644 node_modules/css-parse/index.js create mode 100644 node_modules/css-parse/package.json create mode 100644 node_modules/css-stringify/.npmignore create mode 100644 node_modules/css-stringify/History.md create mode 100644 node_modules/css-stringify/Makefile create mode 100644 node_modules/css-stringify/Readme.md create mode 100644 node_modules/css-stringify/component.json create mode 100644 node_modules/css-stringify/index.js create mode 100644 node_modules/css-stringify/package.json create mode 100644 node_modules/css/.npmignore create mode 100644 node_modules/css/History.md create mode 100644 node_modules/css/Makefile create mode 100644 node_modules/css/Readme.md create mode 100644 node_modules/css/benchmark.js create mode 100644 node_modules/css/component.json create mode 100644 node_modules/css/index.js create mode 100644 node_modules/css/package.json create mode 100644 node_modules/css/test.js create mode 100644 node_modules/d/.lint create mode 100644 node_modules/d/.npmignore create mode 100644 node_modules/d/.travis.yml create mode 100644 node_modules/d/CHANGES create mode 100644 node_modules/d/LICENSE create mode 100644 node_modules/d/README.md create mode 100644 node_modules/d/auto-bind.js create mode 100644 node_modules/d/index.js create mode 100644 node_modules/d/lazy.js create mode 100644 node_modules/d/package.json create mode 100644 node_modules/d/test/auto-bind.js create mode 100644 node_modules/d/test/index.js create mode 100644 node_modules/d/test/lazy.js create mode 100644 node_modules/dateformat/.npmignore create mode 100644 node_modules/dateformat/LICENSE create mode 100644 node_modules/dateformat/Readme.md create mode 100644 node_modules/dateformat/lib/dateformat.js create mode 100644 node_modules/dateformat/package.json create mode 100644 node_modules/debug/.coveralls.yml create mode 100644 node_modules/debug/.eslintrc create mode 100644 node_modules/debug/.npmignore create mode 100644 node_modules/debug/.travis.yml create mode 100644 node_modules/debug/CHANGELOG.md create mode 100644 node_modules/debug/LICENSE create mode 100644 node_modules/debug/Makefile create mode 100644 node_modules/debug/README.md create mode 100644 node_modules/debug/component.json create mode 100644 node_modules/debug/karma.conf.js create mode 100644 node_modules/debug/node.js create mode 100644 node_modules/debug/node_modules/ms/index.js create mode 100644 node_modules/debug/node_modules/ms/license.md create mode 100644 node_modules/debug/node_modules/ms/package.json create mode 100644 node_modules/debug/node_modules/ms/readme.md create mode 100644 node_modules/debug/package.json create mode 100644 node_modules/debug/src/browser.js create mode 100644 node_modules/debug/src/debug.js create mode 100644 node_modules/debug/src/index.js create mode 100644 node_modules/debug/src/node.js create mode 100644 node_modules/decamelize/index.js create mode 100644 node_modules/decamelize/license create mode 100644 node_modules/decamelize/package.json create mode 100644 node_modules/decamelize/readme.md create mode 100644 node_modules/defaults/.npmignore create mode 100644 node_modules/defaults/LICENSE create mode 100644 node_modules/defaults/README.md create mode 100644 node_modules/defaults/index.js create mode 100644 node_modules/defaults/package.json create mode 100644 node_modules/defaults/test.js create mode 100644 node_modules/depd/History.md create mode 100644 node_modules/depd/LICENSE create mode 100644 node_modules/depd/Readme.md create mode 100644 node_modules/depd/index.js create mode 100644 node_modules/depd/lib/browser/index.js create mode 100644 node_modules/depd/lib/compat/buffer-concat.js create mode 100644 node_modules/depd/lib/compat/callsite-tostring.js create mode 100644 node_modules/depd/lib/compat/event-listener-count.js create mode 100644 node_modules/depd/lib/compat/index.js create mode 100644 node_modules/depd/package.json create mode 100644 node_modules/deprecated/.npmignore create mode 100644 node_modules/deprecated/.travis.yml create mode 100755 node_modules/deprecated/LICENSE create mode 100644 node_modules/deprecated/README.md create mode 100644 node_modules/deprecated/index.js create mode 100644 node_modules/deprecated/package.json create mode 100644 node_modules/deprecated/test/field.js create mode 100644 node_modules/deprecated/test/method.js create mode 100644 node_modules/destroy/LICENSE create mode 100644 node_modules/destroy/README.md create mode 100644 node_modules/destroy/index.js create mode 100644 node_modules/destroy/package.json create mode 100644 node_modules/detect-file/LICENSE create mode 100644 node_modules/detect-file/README.md create mode 100644 node_modules/detect-file/index.js create mode 100644 node_modules/detect-file/package.json create mode 100644 node_modules/dottie/.npmignore create mode 100644 node_modules/dottie/.travis.yml create mode 100644 node_modules/dottie/LICENSE create mode 100644 node_modules/dottie/README.md create mode 100644 node_modules/dottie/dottie.js create mode 100644 node_modules/dottie/package.json create mode 100644 node_modules/dottie/test/find.test.js create mode 100644 node_modules/dottie/test/flatten.test.js create mode 100644 node_modules/dottie/test/get.test.js create mode 100644 node_modules/dottie/test/paths.test.js create mode 100644 node_modules/dottie/test/set.test.js create mode 100644 node_modules/dottie/test/transform.test.js create mode 100644 node_modules/duplexer2/.npmignore create mode 100644 node_modules/duplexer2/.travis.yml create mode 100644 node_modules/duplexer2/LICENSE.md create mode 100644 node_modules/duplexer2/README.md create mode 100755 node_modules/duplexer2/example.js create mode 100644 node_modules/duplexer2/index.js create mode 100644 node_modules/duplexer2/package.json create mode 100644 node_modules/duplexer2/test/tests.js create mode 100644 node_modules/editorconfig/.editorconfig create mode 100644 node_modules/editorconfig/.gitattributes create mode 100644 node_modules/editorconfig/.gitmodules create mode 100644 node_modules/editorconfig/.npmignore create mode 100644 node_modules/editorconfig/.travis.yml create mode 100644 node_modules/editorconfig/CMakeLists.txt create mode 100644 node_modules/editorconfig/LICENSE create mode 100644 node_modules/editorconfig/README.md create mode 100755 node_modules/editorconfig/bin/editorconfig create mode 100644 node_modules/editorconfig/editorconfig.js create mode 100644 node_modules/editorconfig/lib/fnmatch.js create mode 100644 node_modules/editorconfig/lib/ini.js create mode 100644 node_modules/editorconfig/lib/version.js create mode 100644 node_modules/editorconfig/node_modules/commander/History.md create mode 100644 node_modules/editorconfig/node_modules/commander/LICENSE create mode 100644 node_modules/editorconfig/node_modules/commander/Readme.md create mode 100644 node_modules/editorconfig/node_modules/commander/index.js create mode 100644 node_modules/editorconfig/node_modules/commander/package.json create mode 100644 node_modules/editorconfig/node_modules/lru-cache/.npmignore create mode 100644 node_modules/editorconfig/node_modules/lru-cache/.travis.yml create mode 100644 node_modules/editorconfig/node_modules/lru-cache/CONTRIBUTORS create mode 100644 node_modules/editorconfig/node_modules/lru-cache/LICENSE create mode 100644 node_modules/editorconfig/node_modules/lru-cache/README.md create mode 100644 node_modules/editorconfig/node_modules/lru-cache/lib/lru-cache.js create mode 100644 node_modules/editorconfig/node_modules/lru-cache/package.json create mode 100644 node_modules/editorconfig/node_modules/lru-cache/test/basic.js create mode 100644 node_modules/editorconfig/node_modules/lru-cache/test/foreach.js create mode 100644 node_modules/editorconfig/node_modules/lru-cache/test/memory-leak.js create mode 100644 node_modules/editorconfig/node_modules/lru-cache/test/overflow.js create mode 100644 node_modules/editorconfig/node_modules/lru-cache/test/serialize.js create mode 100644 node_modules/editorconfig/package.json create mode 100644 node_modules/editorconfig/test/app.js create mode 100644 node_modules/editorconfig/test/index.js create mode 100644 node_modules/ee-first/LICENSE create mode 100644 node_modules/ee-first/README.md create mode 100644 node_modules/ee-first/index.js create mode 100644 node_modules/ee-first/package.json create mode 100644 node_modules/encodeurl/HISTORY.md create mode 100644 node_modules/encodeurl/LICENSE create mode 100644 node_modules/encodeurl/README.md create mode 100644 node_modules/encodeurl/index.js create mode 100644 node_modules/encodeurl/package.json create mode 100644 node_modules/end-of-stream/.npmignore create mode 100644 node_modules/end-of-stream/README.md create mode 100644 node_modules/end-of-stream/index.js create mode 100644 node_modules/end-of-stream/package.json create mode 100644 node_modules/end-of-stream/test.js create mode 100644 node_modules/error-ex/LICENSE create mode 100644 node_modules/error-ex/README.md create mode 100644 node_modules/error-ex/index.js create mode 100644 node_modules/error-ex/package.json create mode 100644 node_modules/es5-ext/.lint create mode 100644 node_modules/es5-ext/.lintignore create mode 100644 node_modules/es5-ext/.npmignore create mode 100644 node_modules/es5-ext/.travis.yml create mode 100644 node_modules/es5-ext/CHANGES create mode 100644 node_modules/es5-ext/LICENSE create mode 100644 node_modules/es5-ext/README.md create mode 100644 node_modules/es5-ext/array/#/@@iterator/implement.js create mode 100644 node_modules/es5-ext/array/#/@@iterator/index.js create mode 100644 node_modules/es5-ext/array/#/@@iterator/is-implemented.js create mode 100644 node_modules/es5-ext/array/#/@@iterator/shim.js create mode 100644 node_modules/es5-ext/array/#/_compare-by-length.js create mode 100644 node_modules/es5-ext/array/#/binary-search.js create mode 100644 node_modules/es5-ext/array/#/clear.js create mode 100644 node_modules/es5-ext/array/#/compact.js create mode 100644 node_modules/es5-ext/array/#/concat/implement.js create mode 100644 node_modules/es5-ext/array/#/concat/index.js create mode 100644 node_modules/es5-ext/array/#/concat/is-implemented.js create mode 100644 node_modules/es5-ext/array/#/concat/shim.js create mode 100644 node_modules/es5-ext/array/#/contains.js create mode 100644 node_modules/es5-ext/array/#/copy-within/implement.js create mode 100644 node_modules/es5-ext/array/#/copy-within/index.js create mode 100644 node_modules/es5-ext/array/#/copy-within/is-implemented.js create mode 100644 node_modules/es5-ext/array/#/copy-within/shim.js create mode 100644 node_modules/es5-ext/array/#/diff.js create mode 100644 node_modules/es5-ext/array/#/e-index-of.js create mode 100644 node_modules/es5-ext/array/#/e-last-index-of.js create mode 100644 node_modules/es5-ext/array/#/entries/implement.js create mode 100644 node_modules/es5-ext/array/#/entries/index.js create mode 100644 node_modules/es5-ext/array/#/entries/is-implemented.js create mode 100644 node_modules/es5-ext/array/#/entries/shim.js create mode 100644 node_modules/es5-ext/array/#/exclusion.js create mode 100644 node_modules/es5-ext/array/#/fill/implement.js create mode 100644 node_modules/es5-ext/array/#/fill/index.js create mode 100644 node_modules/es5-ext/array/#/fill/is-implemented.js create mode 100644 node_modules/es5-ext/array/#/fill/shim.js create mode 100644 node_modules/es5-ext/array/#/filter/implement.js create mode 100644 node_modules/es5-ext/array/#/filter/index.js create mode 100644 node_modules/es5-ext/array/#/filter/is-implemented.js create mode 100644 node_modules/es5-ext/array/#/filter/shim.js create mode 100644 node_modules/es5-ext/array/#/find-index/implement.js create mode 100644 node_modules/es5-ext/array/#/find-index/index.js create mode 100644 node_modules/es5-ext/array/#/find-index/is-implemented.js create mode 100644 node_modules/es5-ext/array/#/find-index/shim.js create mode 100644 node_modules/es5-ext/array/#/find/implement.js create mode 100644 node_modules/es5-ext/array/#/find/index.js create mode 100644 node_modules/es5-ext/array/#/find/is-implemented.js create mode 100644 node_modules/es5-ext/array/#/find/shim.js create mode 100644 node_modules/es5-ext/array/#/first-index.js create mode 100644 node_modules/es5-ext/array/#/first.js create mode 100644 node_modules/es5-ext/array/#/flatten.js create mode 100644 node_modules/es5-ext/array/#/for-each-right.js create mode 100644 node_modules/es5-ext/array/#/group.js create mode 100644 node_modules/es5-ext/array/#/index.js create mode 100644 node_modules/es5-ext/array/#/indexes-of.js create mode 100644 node_modules/es5-ext/array/#/intersection.js create mode 100644 node_modules/es5-ext/array/#/is-copy.js create mode 100644 node_modules/es5-ext/array/#/is-uniq.js create mode 100644 node_modules/es5-ext/array/#/keys/implement.js create mode 100644 node_modules/es5-ext/array/#/keys/index.js create mode 100644 node_modules/es5-ext/array/#/keys/is-implemented.js create mode 100644 node_modules/es5-ext/array/#/keys/shim.js create mode 100644 node_modules/es5-ext/array/#/last-index.js create mode 100644 node_modules/es5-ext/array/#/last.js create mode 100644 node_modules/es5-ext/array/#/map/implement.js create mode 100644 node_modules/es5-ext/array/#/map/index.js create mode 100644 node_modules/es5-ext/array/#/map/is-implemented.js create mode 100644 node_modules/es5-ext/array/#/map/shim.js create mode 100644 node_modules/es5-ext/array/#/remove.js create mode 100644 node_modules/es5-ext/array/#/separate.js create mode 100644 node_modules/es5-ext/array/#/slice/implement.js create mode 100644 node_modules/es5-ext/array/#/slice/index.js create mode 100644 node_modules/es5-ext/array/#/slice/is-implemented.js create mode 100644 node_modules/es5-ext/array/#/slice/shim.js create mode 100644 node_modules/es5-ext/array/#/some-right.js create mode 100644 node_modules/es5-ext/array/#/splice/implement.js create mode 100644 node_modules/es5-ext/array/#/splice/index.js create mode 100644 node_modules/es5-ext/array/#/splice/is-implemented.js create mode 100644 node_modules/es5-ext/array/#/splice/shim.js create mode 100644 node_modules/es5-ext/array/#/uniq.js create mode 100644 node_modules/es5-ext/array/#/values/implement.js create mode 100644 node_modules/es5-ext/array/#/values/index.js create mode 100644 node_modules/es5-ext/array/#/values/is-implemented.js create mode 100644 node_modules/es5-ext/array/#/values/shim.js create mode 100644 node_modules/es5-ext/array/_is-extensible.js create mode 100644 node_modules/es5-ext/array/_sub-array-dummy-safe.js create mode 100644 node_modules/es5-ext/array/_sub-array-dummy.js create mode 100644 node_modules/es5-ext/array/from/implement.js create mode 100644 node_modules/es5-ext/array/from/index.js create mode 100644 node_modules/es5-ext/array/from/is-implemented.js create mode 100644 node_modules/es5-ext/array/from/shim.js create mode 100644 node_modules/es5-ext/array/generate.js create mode 100644 node_modules/es5-ext/array/index.js create mode 100644 node_modules/es5-ext/array/is-plain-array.js create mode 100644 node_modules/es5-ext/array/of/implement.js create mode 100644 node_modules/es5-ext/array/of/index.js create mode 100644 node_modules/es5-ext/array/of/is-implemented.js create mode 100644 node_modules/es5-ext/array/of/shim.js create mode 100644 node_modules/es5-ext/array/to-array.js create mode 100644 node_modules/es5-ext/array/valid-array.js create mode 100644 node_modules/es5-ext/boolean/index.js create mode 100644 node_modules/es5-ext/boolean/is-boolean.js create mode 100644 node_modules/es5-ext/date/#/copy.js create mode 100644 node_modules/es5-ext/date/#/days-in-month.js create mode 100644 node_modules/es5-ext/date/#/floor-day.js create mode 100644 node_modules/es5-ext/date/#/floor-month.js create mode 100644 node_modules/es5-ext/date/#/floor-year.js create mode 100644 node_modules/es5-ext/date/#/format.js create mode 100644 node_modules/es5-ext/date/#/index.js create mode 100644 node_modules/es5-ext/date/index.js create mode 100644 node_modules/es5-ext/date/is-date.js create mode 100644 node_modules/es5-ext/date/valid-date.js create mode 100644 node_modules/es5-ext/error/#/index.js create mode 100644 node_modules/es5-ext/error/#/throw.js create mode 100644 node_modules/es5-ext/error/custom.js create mode 100644 node_modules/es5-ext/error/index.js create mode 100644 node_modules/es5-ext/error/is-error.js create mode 100644 node_modules/es5-ext/error/valid-error.js create mode 100644 node_modules/es5-ext/function/#/compose.js create mode 100644 node_modules/es5-ext/function/#/copy.js create mode 100644 node_modules/es5-ext/function/#/curry.js create mode 100644 node_modules/es5-ext/function/#/index.js create mode 100644 node_modules/es5-ext/function/#/lock.js create mode 100644 node_modules/es5-ext/function/#/not.js create mode 100644 node_modules/es5-ext/function/#/partial.js create mode 100644 node_modules/es5-ext/function/#/spread.js create mode 100644 node_modules/es5-ext/function/#/to-string-tokens.js create mode 100644 node_modules/es5-ext/function/_define-length.js create mode 100644 node_modules/es5-ext/function/constant.js create mode 100644 node_modules/es5-ext/function/identity.js create mode 100644 node_modules/es5-ext/function/index.js create mode 100644 node_modules/es5-ext/function/invoke.js create mode 100644 node_modules/es5-ext/function/is-arguments.js create mode 100644 node_modules/es5-ext/function/is-function.js create mode 100644 node_modules/es5-ext/function/noop.js create mode 100644 node_modules/es5-ext/function/pluck.js create mode 100644 node_modules/es5-ext/function/valid-function.js create mode 100644 node_modules/es5-ext/global.js create mode 100644 node_modules/es5-ext/index.js create mode 100644 node_modules/es5-ext/iterable/for-each.js create mode 100644 node_modules/es5-ext/iterable/index.js create mode 100644 node_modules/es5-ext/iterable/is.js create mode 100644 node_modules/es5-ext/iterable/validate-object.js create mode 100644 node_modules/es5-ext/iterable/validate.js create mode 100644 node_modules/es5-ext/json/index.js create mode 100644 node_modules/es5-ext/json/safe-stringify.js create mode 100644 node_modules/es5-ext/math/_pack-ieee754.js create mode 100644 node_modules/es5-ext/math/_unpack-ieee754.js create mode 100644 node_modules/es5-ext/math/acosh/implement.js create mode 100644 node_modules/es5-ext/math/acosh/index.js create mode 100644 node_modules/es5-ext/math/acosh/is-implemented.js create mode 100644 node_modules/es5-ext/math/acosh/shim.js create mode 100644 node_modules/es5-ext/math/asinh/implement.js create mode 100644 node_modules/es5-ext/math/asinh/index.js create mode 100644 node_modules/es5-ext/math/asinh/is-implemented.js create mode 100644 node_modules/es5-ext/math/asinh/shim.js create mode 100644 node_modules/es5-ext/math/atanh/implement.js create mode 100644 node_modules/es5-ext/math/atanh/index.js create mode 100644 node_modules/es5-ext/math/atanh/is-implemented.js create mode 100644 node_modules/es5-ext/math/atanh/shim.js create mode 100644 node_modules/es5-ext/math/cbrt/implement.js create mode 100644 node_modules/es5-ext/math/cbrt/index.js create mode 100644 node_modules/es5-ext/math/cbrt/is-implemented.js create mode 100644 node_modules/es5-ext/math/cbrt/shim.js create mode 100644 node_modules/es5-ext/math/clz32/implement.js create mode 100644 node_modules/es5-ext/math/clz32/index.js create mode 100644 node_modules/es5-ext/math/clz32/is-implemented.js create mode 100644 node_modules/es5-ext/math/clz32/shim.js create mode 100644 node_modules/es5-ext/math/cosh/implement.js create mode 100644 node_modules/es5-ext/math/cosh/index.js create mode 100644 node_modules/es5-ext/math/cosh/is-implemented.js create mode 100644 node_modules/es5-ext/math/cosh/shim.js create mode 100644 node_modules/es5-ext/math/expm1/implement.js create mode 100644 node_modules/es5-ext/math/expm1/index.js create mode 100644 node_modules/es5-ext/math/expm1/is-implemented.js create mode 100644 node_modules/es5-ext/math/expm1/shim.js create mode 100644 node_modules/es5-ext/math/fround/implement.js create mode 100644 node_modules/es5-ext/math/fround/index.js create mode 100644 node_modules/es5-ext/math/fround/is-implemented.js create mode 100644 node_modules/es5-ext/math/fround/shim.js create mode 100644 node_modules/es5-ext/math/hypot/implement.js create mode 100644 node_modules/es5-ext/math/hypot/index.js create mode 100644 node_modules/es5-ext/math/hypot/is-implemented.js create mode 100644 node_modules/es5-ext/math/hypot/shim.js create mode 100644 node_modules/es5-ext/math/imul/implement.js create mode 100644 node_modules/es5-ext/math/imul/index.js create mode 100644 node_modules/es5-ext/math/imul/is-implemented.js create mode 100644 node_modules/es5-ext/math/imul/shim.js create mode 100644 node_modules/es5-ext/math/index.js create mode 100644 node_modules/es5-ext/math/log10/implement.js create mode 100644 node_modules/es5-ext/math/log10/index.js create mode 100644 node_modules/es5-ext/math/log10/is-implemented.js create mode 100644 node_modules/es5-ext/math/log10/shim.js create mode 100644 node_modules/es5-ext/math/log1p/implement.js create mode 100644 node_modules/es5-ext/math/log1p/index.js create mode 100644 node_modules/es5-ext/math/log1p/is-implemented.js create mode 100644 node_modules/es5-ext/math/log1p/shim.js create mode 100644 node_modules/es5-ext/math/log2/implement.js create mode 100644 node_modules/es5-ext/math/log2/index.js create mode 100644 node_modules/es5-ext/math/log2/is-implemented.js create mode 100644 node_modules/es5-ext/math/log2/shim.js create mode 100644 node_modules/es5-ext/math/sign/implement.js create mode 100644 node_modules/es5-ext/math/sign/index.js create mode 100644 node_modules/es5-ext/math/sign/is-implemented.js create mode 100644 node_modules/es5-ext/math/sign/shim.js create mode 100644 node_modules/es5-ext/math/sinh/implement.js create mode 100644 node_modules/es5-ext/math/sinh/index.js create mode 100644 node_modules/es5-ext/math/sinh/is-implemented.js create mode 100644 node_modules/es5-ext/math/sinh/shim.js create mode 100644 node_modules/es5-ext/math/tanh/implement.js create mode 100644 node_modules/es5-ext/math/tanh/index.js create mode 100644 node_modules/es5-ext/math/tanh/is-implemented.js create mode 100644 node_modules/es5-ext/math/tanh/shim.js create mode 100644 node_modules/es5-ext/math/trunc/implement.js create mode 100644 node_modules/es5-ext/math/trunc/index.js create mode 100644 node_modules/es5-ext/math/trunc/is-implemented.js create mode 100644 node_modules/es5-ext/math/trunc/shim.js create mode 100644 node_modules/es5-ext/number/#/index.js create mode 100644 node_modules/es5-ext/number/#/pad.js create mode 100644 node_modules/es5-ext/number/epsilon/implement.js create mode 100644 node_modules/es5-ext/number/epsilon/index.js create mode 100644 node_modules/es5-ext/number/epsilon/is-implemented.js create mode 100644 node_modules/es5-ext/number/index.js create mode 100644 node_modules/es5-ext/number/is-finite/implement.js create mode 100644 node_modules/es5-ext/number/is-finite/index.js create mode 100644 node_modules/es5-ext/number/is-finite/is-implemented.js create mode 100644 node_modules/es5-ext/number/is-finite/shim.js create mode 100644 node_modules/es5-ext/number/is-integer/implement.js create mode 100644 node_modules/es5-ext/number/is-integer/index.js create mode 100644 node_modules/es5-ext/number/is-integer/is-implemented.js create mode 100644 node_modules/es5-ext/number/is-integer/shim.js create mode 100644 node_modules/es5-ext/number/is-nan/implement.js create mode 100644 node_modules/es5-ext/number/is-nan/index.js create mode 100644 node_modules/es5-ext/number/is-nan/is-implemented.js create mode 100644 node_modules/es5-ext/number/is-nan/shim.js create mode 100644 node_modules/es5-ext/number/is-natural.js create mode 100644 node_modules/es5-ext/number/is-number.js create mode 100644 node_modules/es5-ext/number/is-safe-integer/implement.js create mode 100644 node_modules/es5-ext/number/is-safe-integer/index.js create mode 100644 node_modules/es5-ext/number/is-safe-integer/is-implemented.js create mode 100644 node_modules/es5-ext/number/is-safe-integer/shim.js create mode 100644 node_modules/es5-ext/number/max-safe-integer/implement.js create mode 100644 node_modules/es5-ext/number/max-safe-integer/index.js create mode 100644 node_modules/es5-ext/number/max-safe-integer/is-implemented.js create mode 100644 node_modules/es5-ext/number/min-safe-integer/implement.js create mode 100644 node_modules/es5-ext/number/min-safe-integer/index.js create mode 100644 node_modules/es5-ext/number/min-safe-integer/is-implemented.js create mode 100644 node_modules/es5-ext/number/to-integer.js create mode 100644 node_modules/es5-ext/number/to-pos-integer.js create mode 100644 node_modules/es5-ext/number/to-uint32.js create mode 100644 node_modules/es5-ext/object/_iterate.js create mode 100644 node_modules/es5-ext/object/assign/implement.js create mode 100644 node_modules/es5-ext/object/assign/index.js create mode 100644 node_modules/es5-ext/object/assign/is-implemented.js create mode 100644 node_modules/es5-ext/object/assign/shim.js create mode 100644 node_modules/es5-ext/object/clear.js create mode 100644 node_modules/es5-ext/object/compact.js create mode 100644 node_modules/es5-ext/object/compare.js create mode 100644 node_modules/es5-ext/object/copy-deep.js create mode 100644 node_modules/es5-ext/object/copy.js create mode 100644 node_modules/es5-ext/object/count.js create mode 100644 node_modules/es5-ext/object/create.js create mode 100644 node_modules/es5-ext/object/ensure-natural-number-value.js create mode 100644 node_modules/es5-ext/object/ensure-natural-number.js create mode 100644 node_modules/es5-ext/object/eq.js create mode 100644 node_modules/es5-ext/object/every.js create mode 100644 node_modules/es5-ext/object/filter.js create mode 100644 node_modules/es5-ext/object/find-key.js create mode 100644 node_modules/es5-ext/object/find.js create mode 100644 node_modules/es5-ext/object/first-key.js create mode 100644 node_modules/es5-ext/object/flatten.js create mode 100644 node_modules/es5-ext/object/for-each.js create mode 100644 node_modules/es5-ext/object/get-property-names.js create mode 100644 node_modules/es5-ext/object/index.js create mode 100644 node_modules/es5-ext/object/is-array-like.js create mode 100644 node_modules/es5-ext/object/is-callable.js create mode 100644 node_modules/es5-ext/object/is-copy-deep.js create mode 100644 node_modules/es5-ext/object/is-copy.js create mode 100644 node_modules/es5-ext/object/is-empty.js create mode 100644 node_modules/es5-ext/object/is-number-value.js create mode 100644 node_modules/es5-ext/object/is-object.js create mode 100644 node_modules/es5-ext/object/is-plain-object.js create mode 100644 node_modules/es5-ext/object/is-value.js create mode 100644 node_modules/es5-ext/object/is.js create mode 100644 node_modules/es5-ext/object/key-of.js create mode 100644 node_modules/es5-ext/object/keys/implement.js create mode 100644 node_modules/es5-ext/object/keys/index.js create mode 100644 node_modules/es5-ext/object/keys/is-implemented.js create mode 100644 node_modules/es5-ext/object/keys/shim.js create mode 100644 node_modules/es5-ext/object/map-keys.js create mode 100644 node_modules/es5-ext/object/map.js create mode 100644 node_modules/es5-ext/object/mixin-prototypes.js create mode 100644 node_modules/es5-ext/object/mixin.js create mode 100644 node_modules/es5-ext/object/normalize-options.js create mode 100644 node_modules/es5-ext/object/primitive-set.js create mode 100644 node_modules/es5-ext/object/safe-traverse.js create mode 100644 node_modules/es5-ext/object/serialize.js create mode 100644 node_modules/es5-ext/object/set-prototype-of/implement.js create mode 100644 node_modules/es5-ext/object/set-prototype-of/index.js create mode 100644 node_modules/es5-ext/object/set-prototype-of/is-implemented.js create mode 100644 node_modules/es5-ext/object/set-prototype-of/shim.js create mode 100644 node_modules/es5-ext/object/some.js create mode 100644 node_modules/es5-ext/object/to-array.js create mode 100644 node_modules/es5-ext/object/unserialize.js create mode 100644 node_modules/es5-ext/object/valid-callable.js create mode 100644 node_modules/es5-ext/object/valid-object.js create mode 100644 node_modules/es5-ext/object/valid-value.js create mode 100644 node_modules/es5-ext/object/validate-array-like-object.js create mode 100644 node_modules/es5-ext/object/validate-array-like.js create mode 100644 node_modules/es5-ext/object/validate-stringifiable-value.js create mode 100644 node_modules/es5-ext/object/validate-stringifiable.js create mode 100644 node_modules/es5-ext/package.json create mode 100644 node_modules/es5-ext/reg-exp/#/index.js create mode 100644 node_modules/es5-ext/reg-exp/#/is-sticky.js create mode 100644 node_modules/es5-ext/reg-exp/#/is-unicode.js create mode 100644 node_modules/es5-ext/reg-exp/#/match/implement.js create mode 100644 node_modules/es5-ext/reg-exp/#/match/index.js create mode 100644 node_modules/es5-ext/reg-exp/#/match/is-implemented.js create mode 100644 node_modules/es5-ext/reg-exp/#/match/shim.js create mode 100644 node_modules/es5-ext/reg-exp/#/replace/implement.js create mode 100644 node_modules/es5-ext/reg-exp/#/replace/index.js create mode 100644 node_modules/es5-ext/reg-exp/#/replace/is-implemented.js create mode 100644 node_modules/es5-ext/reg-exp/#/replace/shim.js create mode 100644 node_modules/es5-ext/reg-exp/#/search/implement.js create mode 100644 node_modules/es5-ext/reg-exp/#/search/index.js create mode 100644 node_modules/es5-ext/reg-exp/#/search/is-implemented.js create mode 100644 node_modules/es5-ext/reg-exp/#/search/shim.js create mode 100644 node_modules/es5-ext/reg-exp/#/split/implement.js create mode 100644 node_modules/es5-ext/reg-exp/#/split/index.js create mode 100644 node_modules/es5-ext/reg-exp/#/split/is-implemented.js create mode 100644 node_modules/es5-ext/reg-exp/#/split/shim.js create mode 100644 node_modules/es5-ext/reg-exp/#/sticky/implement.js create mode 100644 node_modules/es5-ext/reg-exp/#/sticky/is-implemented.js create mode 100644 node_modules/es5-ext/reg-exp/#/unicode/implement.js create mode 100644 node_modules/es5-ext/reg-exp/#/unicode/is-implemented.js create mode 100644 node_modules/es5-ext/reg-exp/escape.js create mode 100644 node_modules/es5-ext/reg-exp/index.js create mode 100644 node_modules/es5-ext/reg-exp/is-reg-exp.js create mode 100644 node_modules/es5-ext/reg-exp/valid-reg-exp.js create mode 100644 node_modules/es5-ext/string/#/@@iterator/implement.js create mode 100644 node_modules/es5-ext/string/#/@@iterator/index.js create mode 100644 node_modules/es5-ext/string/#/@@iterator/is-implemented.js create mode 100644 node_modules/es5-ext/string/#/@@iterator/shim.js create mode 100644 node_modules/es5-ext/string/#/at.js create mode 100644 node_modules/es5-ext/string/#/camel-to-hyphen.js create mode 100644 node_modules/es5-ext/string/#/capitalize.js create mode 100644 node_modules/es5-ext/string/#/case-insensitive-compare.js create mode 100644 node_modules/es5-ext/string/#/code-point-at/implement.js create mode 100644 node_modules/es5-ext/string/#/code-point-at/index.js create mode 100644 node_modules/es5-ext/string/#/code-point-at/is-implemented.js create mode 100644 node_modules/es5-ext/string/#/code-point-at/shim.js create mode 100644 node_modules/es5-ext/string/#/contains/implement.js create mode 100644 node_modules/es5-ext/string/#/contains/index.js create mode 100644 node_modules/es5-ext/string/#/contains/is-implemented.js create mode 100644 node_modules/es5-ext/string/#/contains/shim.js create mode 100644 node_modules/es5-ext/string/#/ends-with/implement.js create mode 100644 node_modules/es5-ext/string/#/ends-with/index.js create mode 100644 node_modules/es5-ext/string/#/ends-with/is-implemented.js create mode 100644 node_modules/es5-ext/string/#/ends-with/shim.js create mode 100644 node_modules/es5-ext/string/#/hyphen-to-camel.js create mode 100644 node_modules/es5-ext/string/#/indent.js create mode 100644 node_modules/es5-ext/string/#/index.js create mode 100644 node_modules/es5-ext/string/#/last.js create mode 100644 node_modules/es5-ext/string/#/normalize/_data.js create mode 100644 node_modules/es5-ext/string/#/normalize/implement.js create mode 100644 node_modules/es5-ext/string/#/normalize/index.js create mode 100644 node_modules/es5-ext/string/#/normalize/is-implemented.js create mode 100644 node_modules/es5-ext/string/#/normalize/shim.js create mode 100644 node_modules/es5-ext/string/#/pad.js create mode 100644 node_modules/es5-ext/string/#/plain-replace-all.js create mode 100644 node_modules/es5-ext/string/#/plain-replace.js create mode 100644 node_modules/es5-ext/string/#/repeat/implement.js create mode 100644 node_modules/es5-ext/string/#/repeat/index.js create mode 100644 node_modules/es5-ext/string/#/repeat/is-implemented.js create mode 100644 node_modules/es5-ext/string/#/repeat/shim.js create mode 100644 node_modules/es5-ext/string/#/starts-with/implement.js create mode 100644 node_modules/es5-ext/string/#/starts-with/index.js create mode 100644 node_modules/es5-ext/string/#/starts-with/is-implemented.js create mode 100644 node_modules/es5-ext/string/#/starts-with/shim.js create mode 100644 node_modules/es5-ext/string/#/uncapitalize.js create mode 100644 node_modules/es5-ext/string/format-method.js create mode 100644 node_modules/es5-ext/string/from-code-point/implement.js create mode 100644 node_modules/es5-ext/string/from-code-point/index.js create mode 100644 node_modules/es5-ext/string/from-code-point/is-implemented.js create mode 100644 node_modules/es5-ext/string/from-code-point/shim.js create mode 100644 node_modules/es5-ext/string/index.js create mode 100644 node_modules/es5-ext/string/is-string.js create mode 100644 node_modules/es5-ext/string/random-uniq.js create mode 100644 node_modules/es5-ext/string/raw/implement.js create mode 100644 node_modules/es5-ext/string/raw/index.js create mode 100644 node_modules/es5-ext/string/raw/is-implemented.js create mode 100644 node_modules/es5-ext/string/raw/shim.js create mode 100644 node_modules/es5-ext/test/__tad.js create mode 100644 node_modules/es5-ext/test/array/#/@@iterator/implement.js create mode 100644 node_modules/es5-ext/test/array/#/@@iterator/index.js create mode 100644 node_modules/es5-ext/test/array/#/@@iterator/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/#/@@iterator/shim.js create mode 100644 node_modules/es5-ext/test/array/#/_compare-by-length.js create mode 100644 node_modules/es5-ext/test/array/#/binary-search.js create mode 100644 node_modules/es5-ext/test/array/#/clear.js create mode 100644 node_modules/es5-ext/test/array/#/compact.js create mode 100644 node_modules/es5-ext/test/array/#/concat/implement.js create mode 100644 node_modules/es5-ext/test/array/#/concat/index.js create mode 100644 node_modules/es5-ext/test/array/#/concat/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/#/concat/shim.js create mode 100644 node_modules/es5-ext/test/array/#/contains.js create mode 100644 node_modules/es5-ext/test/array/#/copy-within/implement.js create mode 100644 node_modules/es5-ext/test/array/#/copy-within/index.js create mode 100644 node_modules/es5-ext/test/array/#/copy-within/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/#/copy-within/shim.js create mode 100644 node_modules/es5-ext/test/array/#/diff.js create mode 100644 node_modules/es5-ext/test/array/#/e-index-of.js create mode 100644 node_modules/es5-ext/test/array/#/e-last-index-of.js create mode 100644 node_modules/es5-ext/test/array/#/entries/implement.js create mode 100644 node_modules/es5-ext/test/array/#/entries/index.js create mode 100644 node_modules/es5-ext/test/array/#/entries/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/#/entries/shim.js create mode 100644 node_modules/es5-ext/test/array/#/exclusion.js create mode 100644 node_modules/es5-ext/test/array/#/fill/implement.js create mode 100644 node_modules/es5-ext/test/array/#/fill/index.js create mode 100644 node_modules/es5-ext/test/array/#/fill/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/#/fill/shim.js create mode 100644 node_modules/es5-ext/test/array/#/filter/implement.js create mode 100644 node_modules/es5-ext/test/array/#/filter/index.js create mode 100644 node_modules/es5-ext/test/array/#/filter/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/#/filter/shim.js create mode 100644 node_modules/es5-ext/test/array/#/find-index/implement.js create mode 100644 node_modules/es5-ext/test/array/#/find-index/index.js create mode 100644 node_modules/es5-ext/test/array/#/find-index/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/#/find-index/shim.js create mode 100644 node_modules/es5-ext/test/array/#/find/implement.js create mode 100644 node_modules/es5-ext/test/array/#/find/index.js create mode 100644 node_modules/es5-ext/test/array/#/find/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/#/find/shim.js create mode 100644 node_modules/es5-ext/test/array/#/first-index.js create mode 100644 node_modules/es5-ext/test/array/#/first.js create mode 100644 node_modules/es5-ext/test/array/#/flatten.js create mode 100644 node_modules/es5-ext/test/array/#/for-each-right.js create mode 100644 node_modules/es5-ext/test/array/#/group.js create mode 100644 node_modules/es5-ext/test/array/#/indexes-of.js create mode 100644 node_modules/es5-ext/test/array/#/intersection.js create mode 100644 node_modules/es5-ext/test/array/#/is-copy.js create mode 100644 node_modules/es5-ext/test/array/#/is-uniq.js create mode 100644 node_modules/es5-ext/test/array/#/keys/implement.js create mode 100644 node_modules/es5-ext/test/array/#/keys/index.js create mode 100644 node_modules/es5-ext/test/array/#/keys/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/#/keys/shim.js create mode 100644 node_modules/es5-ext/test/array/#/last-index.js create mode 100644 node_modules/es5-ext/test/array/#/last.js create mode 100644 node_modules/es5-ext/test/array/#/map/implement.js create mode 100644 node_modules/es5-ext/test/array/#/map/index.js create mode 100644 node_modules/es5-ext/test/array/#/map/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/#/map/shim.js create mode 100644 node_modules/es5-ext/test/array/#/remove.js create mode 100644 node_modules/es5-ext/test/array/#/separate.js create mode 100644 node_modules/es5-ext/test/array/#/slice/implement.js create mode 100644 node_modules/es5-ext/test/array/#/slice/index.js create mode 100644 node_modules/es5-ext/test/array/#/slice/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/#/slice/shim.js create mode 100644 node_modules/es5-ext/test/array/#/some-right.js create mode 100644 node_modules/es5-ext/test/array/#/splice/implement.js create mode 100644 node_modules/es5-ext/test/array/#/splice/index.js create mode 100644 node_modules/es5-ext/test/array/#/splice/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/#/splice/shim.js create mode 100644 node_modules/es5-ext/test/array/#/uniq.js create mode 100644 node_modules/es5-ext/test/array/#/values/implement.js create mode 100644 node_modules/es5-ext/test/array/#/values/index.js create mode 100644 node_modules/es5-ext/test/array/#/values/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/#/values/shim.js create mode 100644 node_modules/es5-ext/test/array/__scopes.js create mode 100644 node_modules/es5-ext/test/array/_is-extensible.js create mode 100644 node_modules/es5-ext/test/array/_sub-array-dummy-safe.js create mode 100644 node_modules/es5-ext/test/array/_sub-array-dummy.js create mode 100644 node_modules/es5-ext/test/array/from/implement.js create mode 100644 node_modules/es5-ext/test/array/from/index.js create mode 100644 node_modules/es5-ext/test/array/from/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/from/shim.js create mode 100644 node_modules/es5-ext/test/array/generate.js create mode 100644 node_modules/es5-ext/test/array/is-plain-array.js create mode 100644 node_modules/es5-ext/test/array/of/implement.js create mode 100644 node_modules/es5-ext/test/array/of/index.js create mode 100644 node_modules/es5-ext/test/array/of/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/of/shim.js create mode 100644 node_modules/es5-ext/test/array/to-array.js create mode 100644 node_modules/es5-ext/test/array/valid-array.js create mode 100644 node_modules/es5-ext/test/boolean/is-boolean.js create mode 100644 node_modules/es5-ext/test/date/#/copy.js create mode 100644 node_modules/es5-ext/test/date/#/days-in-month.js create mode 100644 node_modules/es5-ext/test/date/#/floor-day.js create mode 100644 node_modules/es5-ext/test/date/#/floor-month.js create mode 100644 node_modules/es5-ext/test/date/#/floor-year.js create mode 100644 node_modules/es5-ext/test/date/#/format.js create mode 100644 node_modules/es5-ext/test/date/is-date.js create mode 100644 node_modules/es5-ext/test/date/valid-date.js create mode 100644 node_modules/es5-ext/test/error/#/throw.js create mode 100644 node_modules/es5-ext/test/error/custom.js create mode 100644 node_modules/es5-ext/test/error/is-error.js create mode 100644 node_modules/es5-ext/test/error/valid-error.js create mode 100644 node_modules/es5-ext/test/function/#/compose.js create mode 100644 node_modules/es5-ext/test/function/#/copy.js create mode 100644 node_modules/es5-ext/test/function/#/curry.js create mode 100644 node_modules/es5-ext/test/function/#/lock.js create mode 100644 node_modules/es5-ext/test/function/#/not.js create mode 100644 node_modules/es5-ext/test/function/#/partial.js create mode 100644 node_modules/es5-ext/test/function/#/spread.js create mode 100644 node_modules/es5-ext/test/function/#/to-string-tokens.js create mode 100644 node_modules/es5-ext/test/function/_define-length.js create mode 100644 node_modules/es5-ext/test/function/constant.js create mode 100644 node_modules/es5-ext/test/function/identity.js create mode 100644 node_modules/es5-ext/test/function/invoke.js create mode 100644 node_modules/es5-ext/test/function/is-arguments.js create mode 100644 node_modules/es5-ext/test/function/is-function.js create mode 100644 node_modules/es5-ext/test/function/noop.js create mode 100644 node_modules/es5-ext/test/function/pluck.js create mode 100644 node_modules/es5-ext/test/function/valid-function.js create mode 100644 node_modules/es5-ext/test/global.js create mode 100644 node_modules/es5-ext/test/iterable/for-each.js create mode 100644 node_modules/es5-ext/test/iterable/is.js create mode 100644 node_modules/es5-ext/test/iterable/validate-object.js create mode 100644 node_modules/es5-ext/test/iterable/validate.js create mode 100644 node_modules/es5-ext/test/json/safe-stringify.js create mode 100644 node_modules/es5-ext/test/math/_pack-ieee754.js create mode 100644 node_modules/es5-ext/test/math/_unpack-ieee754.js create mode 100644 node_modules/es5-ext/test/math/acosh/implement.js create mode 100644 node_modules/es5-ext/test/math/acosh/index.js create mode 100644 node_modules/es5-ext/test/math/acosh/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/acosh/shim.js create mode 100644 node_modules/es5-ext/test/math/asinh/implement.js create mode 100644 node_modules/es5-ext/test/math/asinh/index.js create mode 100644 node_modules/es5-ext/test/math/asinh/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/asinh/shim.js create mode 100644 node_modules/es5-ext/test/math/atanh/implement.js create mode 100644 node_modules/es5-ext/test/math/atanh/index.js create mode 100644 node_modules/es5-ext/test/math/atanh/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/atanh/shim.js create mode 100644 node_modules/es5-ext/test/math/cbrt/implement.js create mode 100644 node_modules/es5-ext/test/math/cbrt/index.js create mode 100644 node_modules/es5-ext/test/math/cbrt/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/cbrt/shim.js create mode 100644 node_modules/es5-ext/test/math/clz32/implement.js create mode 100644 node_modules/es5-ext/test/math/clz32/index.js create mode 100644 node_modules/es5-ext/test/math/clz32/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/clz32/shim.js create mode 100644 node_modules/es5-ext/test/math/cosh/implement.js create mode 100644 node_modules/es5-ext/test/math/cosh/index.js create mode 100644 node_modules/es5-ext/test/math/cosh/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/cosh/shim.js create mode 100644 node_modules/es5-ext/test/math/expm1/implement.js create mode 100644 node_modules/es5-ext/test/math/expm1/index.js create mode 100644 node_modules/es5-ext/test/math/expm1/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/expm1/shim.js create mode 100644 node_modules/es5-ext/test/math/fround/implement.js create mode 100644 node_modules/es5-ext/test/math/fround/index.js create mode 100644 node_modules/es5-ext/test/math/fround/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/fround/shim.js create mode 100644 node_modules/es5-ext/test/math/hypot/implement.js create mode 100644 node_modules/es5-ext/test/math/hypot/index.js create mode 100644 node_modules/es5-ext/test/math/hypot/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/hypot/shim.js create mode 100644 node_modules/es5-ext/test/math/imul/implement.js create mode 100644 node_modules/es5-ext/test/math/imul/index.js create mode 100644 node_modules/es5-ext/test/math/imul/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/imul/shim.js create mode 100644 node_modules/es5-ext/test/math/log10/implement.js create mode 100644 node_modules/es5-ext/test/math/log10/index.js create mode 100644 node_modules/es5-ext/test/math/log10/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/log10/shim.js create mode 100644 node_modules/es5-ext/test/math/log1p/implement.js create mode 100644 node_modules/es5-ext/test/math/log1p/index.js create mode 100644 node_modules/es5-ext/test/math/log1p/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/log1p/shim.js create mode 100644 node_modules/es5-ext/test/math/log2/implement.js create mode 100644 node_modules/es5-ext/test/math/log2/index.js create mode 100644 node_modules/es5-ext/test/math/log2/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/log2/shim.js create mode 100644 node_modules/es5-ext/test/math/sign/implement.js create mode 100644 node_modules/es5-ext/test/math/sign/index.js create mode 100644 node_modules/es5-ext/test/math/sign/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/sign/shim.js create mode 100644 node_modules/es5-ext/test/math/sinh/implement.js create mode 100644 node_modules/es5-ext/test/math/sinh/index.js create mode 100644 node_modules/es5-ext/test/math/sinh/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/sinh/shim.js create mode 100644 node_modules/es5-ext/test/math/tanh/implement.js create mode 100644 node_modules/es5-ext/test/math/tanh/index.js create mode 100644 node_modules/es5-ext/test/math/tanh/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/tanh/shim.js create mode 100644 node_modules/es5-ext/test/math/trunc/implement.js create mode 100644 node_modules/es5-ext/test/math/trunc/index.js create mode 100644 node_modules/es5-ext/test/math/trunc/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/trunc/shim.js create mode 100644 node_modules/es5-ext/test/number/#/pad.js create mode 100644 node_modules/es5-ext/test/number/epsilon/implement.js create mode 100644 node_modules/es5-ext/test/number/epsilon/index.js create mode 100644 node_modules/es5-ext/test/number/epsilon/is-implemented.js create mode 100644 node_modules/es5-ext/test/number/is-finite/implement.js create mode 100644 node_modules/es5-ext/test/number/is-finite/index.js create mode 100644 node_modules/es5-ext/test/number/is-finite/is-implemented.js create mode 100644 node_modules/es5-ext/test/number/is-finite/shim.js create mode 100644 node_modules/es5-ext/test/number/is-integer/implement.js create mode 100644 node_modules/es5-ext/test/number/is-integer/index.js create mode 100644 node_modules/es5-ext/test/number/is-integer/is-implemented.js create mode 100644 node_modules/es5-ext/test/number/is-integer/shim.js create mode 100644 node_modules/es5-ext/test/number/is-nan/implement.js create mode 100644 node_modules/es5-ext/test/number/is-nan/index.js create mode 100644 node_modules/es5-ext/test/number/is-nan/is-implemented.js create mode 100644 node_modules/es5-ext/test/number/is-nan/shim.js create mode 100644 node_modules/es5-ext/test/number/is-natural.js create mode 100644 node_modules/es5-ext/test/number/is-number.js create mode 100644 node_modules/es5-ext/test/number/is-safe-integer/implement.js create mode 100644 node_modules/es5-ext/test/number/is-safe-integer/index.js create mode 100644 node_modules/es5-ext/test/number/is-safe-integer/is-implemented.js create mode 100644 node_modules/es5-ext/test/number/is-safe-integer/shim.js create mode 100644 node_modules/es5-ext/test/number/max-safe-integer/implement.js create mode 100644 node_modules/es5-ext/test/number/max-safe-integer/index.js create mode 100644 node_modules/es5-ext/test/number/max-safe-integer/is-implemented.js create mode 100644 node_modules/es5-ext/test/number/min-safe-integer/implement.js create mode 100644 node_modules/es5-ext/test/number/min-safe-integer/index.js create mode 100644 node_modules/es5-ext/test/number/min-safe-integer/is-implemented.js create mode 100644 node_modules/es5-ext/test/number/to-integer.js create mode 100644 node_modules/es5-ext/test/number/to-pos-integer.js create mode 100644 node_modules/es5-ext/test/number/to-uint32.js create mode 100644 node_modules/es5-ext/test/object/_iterate.js create mode 100644 node_modules/es5-ext/test/object/assign/implement.js create mode 100644 node_modules/es5-ext/test/object/assign/index.js create mode 100644 node_modules/es5-ext/test/object/assign/is-implemented.js create mode 100644 node_modules/es5-ext/test/object/assign/shim.js create mode 100644 node_modules/es5-ext/test/object/clear.js create mode 100644 node_modules/es5-ext/test/object/compact.js create mode 100644 node_modules/es5-ext/test/object/compare.js create mode 100644 node_modules/es5-ext/test/object/copy-deep.js create mode 100644 node_modules/es5-ext/test/object/copy.js create mode 100644 node_modules/es5-ext/test/object/count.js create mode 100644 node_modules/es5-ext/test/object/create.js create mode 100644 node_modules/es5-ext/test/object/ensure-natural-number-value.js create mode 100644 node_modules/es5-ext/test/object/ensure-natural-number.js create mode 100644 node_modules/es5-ext/test/object/eq.js create mode 100644 node_modules/es5-ext/test/object/every.js create mode 100644 node_modules/es5-ext/test/object/filter.js create mode 100644 node_modules/es5-ext/test/object/find-key.js create mode 100644 node_modules/es5-ext/test/object/find.js create mode 100644 node_modules/es5-ext/test/object/first-key.js create mode 100644 node_modules/es5-ext/test/object/flatten.js create mode 100644 node_modules/es5-ext/test/object/for-each.js create mode 100644 node_modules/es5-ext/test/object/get-property-names.js create mode 100644 node_modules/es5-ext/test/object/is-array-like.js create mode 100644 node_modules/es5-ext/test/object/is-callable.js create mode 100644 node_modules/es5-ext/test/object/is-copy-deep.js create mode 100644 node_modules/es5-ext/test/object/is-copy.js create mode 100644 node_modules/es5-ext/test/object/is-empty.js create mode 100644 node_modules/es5-ext/test/object/is-number-value.js create mode 100644 node_modules/es5-ext/test/object/is-object.js create mode 100644 node_modules/es5-ext/test/object/is-plain-object.js create mode 100644 node_modules/es5-ext/test/object/is-value.js create mode 100644 node_modules/es5-ext/test/object/is.js create mode 100644 node_modules/es5-ext/test/object/key-of.js create mode 100644 node_modules/es5-ext/test/object/keys/implement.js create mode 100644 node_modules/es5-ext/test/object/keys/index.js create mode 100644 node_modules/es5-ext/test/object/keys/is-implemented.js create mode 100644 node_modules/es5-ext/test/object/keys/shim.js create mode 100644 node_modules/es5-ext/test/object/map-keys.js create mode 100644 node_modules/es5-ext/test/object/map.js create mode 100644 node_modules/es5-ext/test/object/mixin-prototypes.js create mode 100644 node_modules/es5-ext/test/object/mixin.js create mode 100644 node_modules/es5-ext/test/object/normalize-options.js create mode 100644 node_modules/es5-ext/test/object/primitive-set.js create mode 100644 node_modules/es5-ext/test/object/safe-traverse.js create mode 100644 node_modules/es5-ext/test/object/serialize.js create mode 100644 node_modules/es5-ext/test/object/set-prototype-of/implement.js create mode 100644 node_modules/es5-ext/test/object/set-prototype-of/index.js create mode 100644 node_modules/es5-ext/test/object/set-prototype-of/is-implemented.js create mode 100644 node_modules/es5-ext/test/object/set-prototype-of/shim.js create mode 100644 node_modules/es5-ext/test/object/some.js create mode 100644 node_modules/es5-ext/test/object/to-array.js create mode 100644 node_modules/es5-ext/test/object/unserialize.js create mode 100644 node_modules/es5-ext/test/object/valid-callable.js create mode 100644 node_modules/es5-ext/test/object/valid-object.js create mode 100644 node_modules/es5-ext/test/object/valid-value.js create mode 100644 node_modules/es5-ext/test/object/validate-array-like-object.js create mode 100644 node_modules/es5-ext/test/object/validate-array-like.js create mode 100644 node_modules/es5-ext/test/object/validate-stringifiable-value.js create mode 100644 node_modules/es5-ext/test/object/validate-stringifiable.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/index.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/is-sticky.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/is-unicode.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/match/implement.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/match/index.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/match/is-implemented.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/match/shim.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/replace/implement.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/replace/index.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/replace/is-implemented.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/replace/shim.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/search/implement.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/search/index.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/search/is-implemented.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/search/shim.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/split/implement.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/split/index.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/split/is-implemented.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/split/shim.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/sticky/implement.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/sticky/is-implemented.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/unicode/implement.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/unicode/is-implemented.js create mode 100644 node_modules/es5-ext/test/reg-exp/escape.js create mode 100644 node_modules/es5-ext/test/reg-exp/is-reg-exp.js create mode 100644 node_modules/es5-ext/test/reg-exp/valid-reg-exp.js create mode 100644 node_modules/es5-ext/test/string/#/@@iterator/implement.js create mode 100644 node_modules/es5-ext/test/string/#/@@iterator/index.js create mode 100644 node_modules/es5-ext/test/string/#/@@iterator/is-implemented.js create mode 100644 node_modules/es5-ext/test/string/#/@@iterator/shim.js create mode 100644 node_modules/es5-ext/test/string/#/at.js create mode 100644 node_modules/es5-ext/test/string/#/camel-to-hyphen.js create mode 100644 node_modules/es5-ext/test/string/#/capitalize.js create mode 100644 node_modules/es5-ext/test/string/#/case-insensitive-compare.js create mode 100644 node_modules/es5-ext/test/string/#/code-point-at/implement.js create mode 100644 node_modules/es5-ext/test/string/#/code-point-at/index.js create mode 100644 node_modules/es5-ext/test/string/#/code-point-at/is-implemented.js create mode 100644 node_modules/es5-ext/test/string/#/code-point-at/shim.js create mode 100644 node_modules/es5-ext/test/string/#/contains/implement.js create mode 100644 node_modules/es5-ext/test/string/#/contains/index.js create mode 100644 node_modules/es5-ext/test/string/#/contains/is-implemented.js create mode 100644 node_modules/es5-ext/test/string/#/contains/shim.js create mode 100644 node_modules/es5-ext/test/string/#/ends-with/implement.js create mode 100644 node_modules/es5-ext/test/string/#/ends-with/index.js create mode 100644 node_modules/es5-ext/test/string/#/ends-with/is-implemented.js create mode 100644 node_modules/es5-ext/test/string/#/ends-with/shim.js create mode 100644 node_modules/es5-ext/test/string/#/hyphen-to-camel.js create mode 100644 node_modules/es5-ext/test/string/#/indent.js create mode 100644 node_modules/es5-ext/test/string/#/last.js create mode 100644 node_modules/es5-ext/test/string/#/normalize/_data.js create mode 100644 node_modules/es5-ext/test/string/#/normalize/implement.js create mode 100644 node_modules/es5-ext/test/string/#/normalize/index.js create mode 100644 node_modules/es5-ext/test/string/#/normalize/is-implemented.js create mode 100644 node_modules/es5-ext/test/string/#/normalize/shim.js create mode 100644 node_modules/es5-ext/test/string/#/pad.js create mode 100644 node_modules/es5-ext/test/string/#/plain-replace-all.js create mode 100644 node_modules/es5-ext/test/string/#/plain-replace.js create mode 100644 node_modules/es5-ext/test/string/#/repeat/implement.js create mode 100644 node_modules/es5-ext/test/string/#/repeat/index.js create mode 100644 node_modules/es5-ext/test/string/#/repeat/is-implemented.js create mode 100644 node_modules/es5-ext/test/string/#/repeat/shim.js create mode 100644 node_modules/es5-ext/test/string/#/starts-with/implement.js create mode 100644 node_modules/es5-ext/test/string/#/starts-with/index.js create mode 100644 node_modules/es5-ext/test/string/#/starts-with/is-implemented.js create mode 100644 node_modules/es5-ext/test/string/#/starts-with/shim.js create mode 100644 node_modules/es5-ext/test/string/#/uncapitalize.js create mode 100644 node_modules/es5-ext/test/string/format-method.js create mode 100644 node_modules/es5-ext/test/string/from-code-point/implement.js create mode 100644 node_modules/es5-ext/test/string/from-code-point/index.js create mode 100644 node_modules/es5-ext/test/string/from-code-point/is-implemented.js create mode 100644 node_modules/es5-ext/test/string/from-code-point/shim.js create mode 100644 node_modules/es5-ext/test/string/is-string.js create mode 100644 node_modules/es5-ext/test/string/random-uniq.js create mode 100644 node_modules/es5-ext/test/string/raw/implement.js create mode 100644 node_modules/es5-ext/test/string/raw/index.js create mode 100644 node_modules/es5-ext/test/string/raw/is-implemented.js create mode 100644 node_modules/es5-ext/test/string/raw/shim.js create mode 100644 node_modules/es6-iterator/#/chain.js create mode 100644 node_modules/es6-iterator/.lint create mode 100644 node_modules/es6-iterator/.npmignore create mode 100644 node_modules/es6-iterator/.travis.yml create mode 100644 node_modules/es6-iterator/CHANGES create mode 100644 node_modules/es6-iterator/LICENSE create mode 100644 node_modules/es6-iterator/README.md create mode 100644 node_modules/es6-iterator/array.js create mode 100644 node_modules/es6-iterator/for-of.js create mode 100644 node_modules/es6-iterator/get.js create mode 100644 node_modules/es6-iterator/index.js create mode 100644 node_modules/es6-iterator/is-iterable.js create mode 100644 node_modules/es6-iterator/package.json create mode 100644 node_modules/es6-iterator/string.js create mode 100644 node_modules/es6-iterator/test/#/chain.js create mode 100644 node_modules/es6-iterator/test/array.js create mode 100644 node_modules/es6-iterator/test/for-of.js create mode 100644 node_modules/es6-iterator/test/get.js create mode 100644 node_modules/es6-iterator/test/index.js create mode 100644 node_modules/es6-iterator/test/is-iterable.js create mode 100644 node_modules/es6-iterator/test/string.js create mode 100644 node_modules/es6-iterator/test/valid-iterable.js create mode 100644 node_modules/es6-iterator/valid-iterable.js create mode 100644 node_modules/es6-symbol/.lint create mode 100644 node_modules/es6-symbol/.npmignore create mode 100644 node_modules/es6-symbol/.travis.yml create mode 100644 node_modules/es6-symbol/CHANGES create mode 100644 node_modules/es6-symbol/LICENSE create mode 100644 node_modules/es6-symbol/README.md create mode 100644 node_modules/es6-symbol/implement.js create mode 100644 node_modules/es6-symbol/index.js create mode 100644 node_modules/es6-symbol/is-implemented.js create mode 100644 node_modules/es6-symbol/is-native-implemented.js create mode 100644 node_modules/es6-symbol/is-symbol.js create mode 100644 node_modules/es6-symbol/package.json create mode 100644 node_modules/es6-symbol/polyfill.js create mode 100644 node_modules/es6-symbol/test/implement.js create mode 100644 node_modules/es6-symbol/test/index.js create mode 100644 node_modules/es6-symbol/test/is-implemented.js create mode 100644 node_modules/es6-symbol/test/is-native-implemented.js create mode 100644 node_modules/es6-symbol/test/is-symbol.js create mode 100644 node_modules/es6-symbol/test/polyfill.js create mode 100644 node_modules/es6-symbol/test/validate-symbol.js create mode 100644 node_modules/es6-symbol/validate-symbol.js create mode 100644 node_modules/es6-weak-map/.lint create mode 100644 node_modules/es6-weak-map/.npmignore create mode 100644 node_modules/es6-weak-map/.travis.yml create mode 100644 node_modules/es6-weak-map/CHANGES create mode 100644 node_modules/es6-weak-map/LICENSE create mode 100644 node_modules/es6-weak-map/README.md create mode 100644 node_modules/es6-weak-map/implement.js create mode 100644 node_modules/es6-weak-map/index.js create mode 100644 node_modules/es6-weak-map/is-implemented.js create mode 100644 node_modules/es6-weak-map/is-native-implemented.js create mode 100644 node_modules/es6-weak-map/is-weak-map.js create mode 100644 node_modules/es6-weak-map/package.json create mode 100644 node_modules/es6-weak-map/polyfill.js create mode 100644 node_modules/es6-weak-map/test/implement.js create mode 100644 node_modules/es6-weak-map/test/index.js create mode 100644 node_modules/es6-weak-map/test/is-implemented.js create mode 100644 node_modules/es6-weak-map/test/is-native-implemented.js create mode 100644 node_modules/es6-weak-map/test/is-weak-map.js create mode 100644 node_modules/es6-weak-map/test/polyfill.js create mode 100644 node_modules/es6-weak-map/test/valid-weak-map.js create mode 100644 node_modules/es6-weak-map/valid-weak-map.js create mode 100644 node_modules/escape-html/LICENSE create mode 100644 node_modules/escape-html/Readme.md create mode 100644 node_modules/escape-html/index.js create mode 100644 node_modules/escape-html/package.json create mode 100644 node_modules/escape-string-regexp/index.js create mode 100644 node_modules/escape-string-regexp/license create mode 100644 node_modules/escape-string-regexp/package.json create mode 100644 node_modules/escape-string-regexp/readme.md create mode 100644 node_modules/etag/HISTORY.md create mode 100644 node_modules/etag/LICENSE create mode 100644 node_modules/etag/README.md create mode 100644 node_modules/etag/index.js create mode 100644 node_modules/etag/package.json create mode 100644 node_modules/event-emitter/.lint create mode 100644 node_modules/event-emitter/.npmignore create mode 100644 node_modules/event-emitter/.testignore create mode 100644 node_modules/event-emitter/.travis.yml create mode 100644 node_modules/event-emitter/CHANGES create mode 100644 node_modules/event-emitter/LICENSE create mode 100644 node_modules/event-emitter/README.md create mode 100644 node_modules/event-emitter/all-off.js create mode 100644 node_modules/event-emitter/benchmark/many-on.js create mode 100644 node_modules/event-emitter/benchmark/single-on.js create mode 100644 node_modules/event-emitter/emit-error.js create mode 100644 node_modules/event-emitter/has-listeners.js create mode 100644 node_modules/event-emitter/index.js create mode 100644 node_modules/event-emitter/package.json create mode 100644 node_modules/event-emitter/pipe.js create mode 100644 node_modules/event-emitter/test/all-off.js create mode 100644 node_modules/event-emitter/test/emit-error.js create mode 100644 node_modules/event-emitter/test/has-listeners.js create mode 100644 node_modules/event-emitter/test/index.js create mode 100644 node_modules/event-emitter/test/pipe.js create mode 100644 node_modules/event-emitter/test/unify.js create mode 100644 node_modules/event-emitter/unify.js create mode 100644 node_modules/expand-brackets/LICENSE create mode 100644 node_modules/expand-brackets/README.md create mode 100644 node_modules/expand-brackets/index.js create mode 100644 node_modules/expand-brackets/package.json create mode 100644 node_modules/expand-range/LICENSE create mode 100644 node_modules/expand-range/README.md create mode 100644 node_modules/expand-range/index.js create mode 100644 node_modules/expand-range/package.json create mode 100644 node_modules/expand-tilde/LICENSE create mode 100644 node_modules/expand-tilde/index.js create mode 100644 node_modules/expand-tilde/package.json create mode 100644 node_modules/express/History.md create mode 100644 node_modules/express/LICENSE create mode 100644 node_modules/express/Readme.md create mode 100644 node_modules/express/index.js create mode 100644 node_modules/express/lib/application.js create mode 100644 node_modules/express/lib/express.js create mode 100644 node_modules/express/lib/middleware/init.js create mode 100644 node_modules/express/lib/middleware/query.js create mode 100644 node_modules/express/lib/request.js create mode 100644 node_modules/express/lib/response.js create mode 100644 node_modules/express/lib/router/index.js create mode 100644 node_modules/express/lib/router/layer.js create mode 100644 node_modules/express/lib/router/route.js create mode 100644 node_modules/express/lib/utils.js create mode 100644 node_modules/express/lib/view.js create mode 100644 node_modules/express/node_modules/debug/.jshintrc create mode 100644 node_modules/express/node_modules/debug/.npmignore create mode 100644 node_modules/express/node_modules/debug/History.md create mode 100644 node_modules/express/node_modules/debug/Makefile create mode 100644 node_modules/express/node_modules/debug/Readme.md create mode 100644 node_modules/express/node_modules/debug/bower.json create mode 100644 node_modules/express/node_modules/debug/browser.js create mode 100644 node_modules/express/node_modules/debug/component.json create mode 100644 node_modules/express/node_modules/debug/debug.js create mode 100644 node_modules/express/node_modules/debug/node.js create mode 100644 node_modules/express/node_modules/debug/package.json create mode 100644 node_modules/express/node_modules/ms/.npmignore create mode 100644 node_modules/express/node_modules/ms/History.md create mode 100644 node_modules/express/node_modules/ms/LICENSE create mode 100644 node_modules/express/node_modules/ms/README.md create mode 100644 node_modules/express/node_modules/ms/index.js create mode 100644 node_modules/express/node_modules/ms/package.json create mode 100644 node_modules/express/node_modules/qs/.eslintignore create mode 100644 node_modules/express/node_modules/qs/.eslintrc create mode 100644 node_modules/express/node_modules/qs/.jscs.json create mode 100644 node_modules/express/node_modules/qs/CHANGELOG.md create mode 100644 node_modules/express/node_modules/qs/CONTRIBUTING.md create mode 100644 node_modules/express/node_modules/qs/LICENSE create mode 100644 node_modules/express/node_modules/qs/dist/qs.js create mode 100755 node_modules/express/node_modules/qs/lib/index.js create mode 100755 node_modules/express/node_modules/qs/lib/parse.js create mode 100755 node_modules/express/node_modules/qs/lib/stringify.js create mode 100755 node_modules/express/node_modules/qs/lib/utils.js create mode 100644 node_modules/express/node_modules/qs/package.json create mode 100644 node_modules/express/node_modules/qs/test/index.js create mode 100755 node_modules/express/node_modules/qs/test/parse.js create mode 100755 node_modules/express/node_modules/qs/test/stringify.js create mode 100755 node_modules/express/node_modules/qs/test/utils.js create mode 100644 node_modules/express/package.json create mode 100644 node_modules/extend/.eslintrc create mode 100644 node_modules/extend/.jscs.json create mode 100644 node_modules/extend/.npmignore create mode 100644 node_modules/extend/.travis.yml create mode 100644 node_modules/extend/CHANGELOG.md create mode 100644 node_modules/extend/LICENSE create mode 100644 node_modules/extend/README.md create mode 100644 node_modules/extend/component.json create mode 100644 node_modules/extend/index.js create mode 100644 node_modules/extend/package.json create mode 100644 node_modules/extglob/LICENSE create mode 100644 node_modules/extglob/README.md create mode 100644 node_modules/extglob/index.js create mode 100644 node_modules/extglob/package.json create mode 100644 node_modules/fancy-log/LICENSE create mode 100644 node_modules/fancy-log/README.md create mode 100644 node_modules/fancy-log/index.js create mode 100644 node_modules/fancy-log/package.json create mode 100644 node_modules/filename-regex/README.md create mode 100644 node_modules/filename-regex/index.js create mode 100644 node_modules/filename-regex/package.json create mode 100755 node_modules/fill-range/LICENSE create mode 100755 node_modules/fill-range/README.md create mode 100644 node_modules/fill-range/index.js create mode 100644 node_modules/fill-range/package.json create mode 100644 node_modules/finalhandler/HISTORY.md create mode 100644 node_modules/finalhandler/LICENSE create mode 100644 node_modules/finalhandler/README.md create mode 100644 node_modules/finalhandler/index.js create mode 100644 node_modules/finalhandler/node_modules/debug/.jshintrc create mode 100644 node_modules/finalhandler/node_modules/debug/.npmignore create mode 100644 node_modules/finalhandler/node_modules/debug/History.md create mode 100644 node_modules/finalhandler/node_modules/debug/Makefile create mode 100644 node_modules/finalhandler/node_modules/debug/Readme.md create mode 100644 node_modules/finalhandler/node_modules/debug/bower.json create mode 100644 node_modules/finalhandler/node_modules/debug/browser.js create mode 100644 node_modules/finalhandler/node_modules/debug/component.json create mode 100644 node_modules/finalhandler/node_modules/debug/debug.js create mode 100644 node_modules/finalhandler/node_modules/debug/node.js create mode 100644 node_modules/finalhandler/node_modules/debug/package.json create mode 100644 node_modules/finalhandler/node_modules/ms/.npmignore create mode 100644 node_modules/finalhandler/node_modules/ms/History.md create mode 100644 node_modules/finalhandler/node_modules/ms/LICENSE create mode 100644 node_modules/finalhandler/node_modules/ms/README.md create mode 100644 node_modules/finalhandler/node_modules/ms/index.js create mode 100644 node_modules/finalhandler/node_modules/ms/package.json create mode 100644 node_modules/finalhandler/package.json create mode 100644 node_modules/find-index/README.md create mode 100644 node_modules/find-index/index.js create mode 100644 node_modules/find-index/last.js create mode 100644 node_modules/find-index/package.json create mode 100644 node_modules/find-up/index.js create mode 100644 node_modules/find-up/license create mode 100644 node_modules/find-up/package.json create mode 100644 node_modules/find-up/readme.md create mode 100644 node_modules/findup-sync/README.md create mode 100644 node_modules/findup-sync/index.js create mode 100644 node_modules/findup-sync/package.json create mode 100644 node_modules/fined/LICENSE create mode 100644 node_modules/fined/README.md create mode 100644 node_modules/fined/index.js create mode 100644 node_modules/fined/package.json create mode 100644 node_modules/first-chunk-stream/index.js create mode 100644 node_modules/first-chunk-stream/package.json create mode 100644 node_modules/first-chunk-stream/readme.md create mode 100644 node_modules/flagged-respawn/.npmignore create mode 100644 node_modules/flagged-respawn/.travis.yml create mode 100644 node_modules/flagged-respawn/LICENSE create mode 100644 node_modules/flagged-respawn/README.md create mode 100644 node_modules/flagged-respawn/index.js create mode 100644 node_modules/flagged-respawn/lib/reorder.js create mode 100644 node_modules/flagged-respawn/lib/respawn.js create mode 100644 node_modules/flagged-respawn/package.json create mode 100644 node_modules/flagged-respawn/test/bin/exit_code.js create mode 100644 node_modules/flagged-respawn/test/bin/respawner.js create mode 100644 node_modules/flagged-respawn/test/bin/signal.js create mode 100644 node_modules/flagged-respawn/test/index.js create mode 100644 node_modules/for-in/LICENSE create mode 100644 node_modules/for-in/README.md create mode 100644 node_modules/for-in/index.js create mode 100644 node_modules/for-in/package.json create mode 100644 node_modules/for-own/LICENSE create mode 100644 node_modules/for-own/README.md create mode 100644 node_modules/for-own/index.js create mode 100644 node_modules/for-own/package.json create mode 100644 node_modules/forwarded/HISTORY.md create mode 100644 node_modules/forwarded/LICENSE create mode 100644 node_modules/forwarded/README.md create mode 100644 node_modules/forwarded/index.js create mode 100644 node_modules/forwarded/package.json create mode 100644 node_modules/fresh/HISTORY.md create mode 100644 node_modules/fresh/LICENSE create mode 100644 node_modules/fresh/README.md create mode 100644 node_modules/fresh/index.js create mode 100644 node_modules/fresh/package.json create mode 100644 node_modules/fs-exists-sync/LICENSE create mode 100644 node_modules/fs-exists-sync/README.md create mode 100644 node_modules/fs-exists-sync/index.js create mode 100644 node_modules/fs-exists-sync/package.json create mode 100644 node_modules/fs-extra/.npmignore create mode 100644 node_modules/fs-extra/CHANGELOG.md create mode 100644 node_modules/fs-extra/LICENSE create mode 100644 node_modules/fs-extra/README.md create mode 100644 node_modules/fs-extra/docs/copy-sync.md create mode 100644 node_modules/fs-extra/docs/copy.md create mode 100644 node_modules/fs-extra/docs/emptyDir-sync.md create mode 100644 node_modules/fs-extra/docs/emptyDir.md create mode 100644 node_modules/fs-extra/docs/ensureDir-sync.md create mode 100644 node_modules/fs-extra/docs/ensureDir.md create mode 100644 node_modules/fs-extra/docs/ensureFile-sync.md create mode 100644 node_modules/fs-extra/docs/ensureFile.md create mode 100644 node_modules/fs-extra/docs/ensureLink-sync.md create mode 100644 node_modules/fs-extra/docs/ensureLink.md create mode 100644 node_modules/fs-extra/docs/ensureSymlink-sync.md create mode 100644 node_modules/fs-extra/docs/ensureSymlink.md create mode 100644 node_modules/fs-extra/docs/move-sync.md create mode 100644 node_modules/fs-extra/docs/move.md create mode 100644 node_modules/fs-extra/docs/outputFile-sync.md create mode 100644 node_modules/fs-extra/docs/outputFile.md create mode 100644 node_modules/fs-extra/docs/outputJson-sync.md create mode 100644 node_modules/fs-extra/docs/outputJson.md create mode 100644 node_modules/fs-extra/docs/readJson-sync.md create mode 100644 node_modules/fs-extra/docs/readJson.md create mode 100644 node_modules/fs-extra/docs/remove-sync.md create mode 100644 node_modules/fs-extra/docs/remove.md create mode 100644 node_modules/fs-extra/docs/writeJson-sync.md create mode 100644 node_modules/fs-extra/docs/writeJson.md create mode 100644 node_modules/fs-extra/lib/copy-sync/copy-file-sync.js create mode 100644 node_modules/fs-extra/lib/copy-sync/copy-sync.js create mode 100644 node_modules/fs-extra/lib/copy-sync/index.js create mode 100644 node_modules/fs-extra/lib/copy/copy.js create mode 100644 node_modules/fs-extra/lib/copy/index.js create mode 100644 node_modules/fs-extra/lib/copy/ncp.js create mode 100644 node_modules/fs-extra/lib/empty/index.js create mode 100644 node_modules/fs-extra/lib/ensure/file.js create mode 100644 node_modules/fs-extra/lib/ensure/index.js create mode 100644 node_modules/fs-extra/lib/ensure/link.js create mode 100644 node_modules/fs-extra/lib/ensure/symlink-paths.js create mode 100644 node_modules/fs-extra/lib/ensure/symlink-type.js create mode 100644 node_modules/fs-extra/lib/ensure/symlink.js create mode 100644 node_modules/fs-extra/lib/index.js create mode 100644 node_modules/fs-extra/lib/json/index.js create mode 100644 node_modules/fs-extra/lib/json/jsonfile.js create mode 100644 node_modules/fs-extra/lib/json/output-json-sync.js create mode 100644 node_modules/fs-extra/lib/json/output-json.js create mode 100644 node_modules/fs-extra/lib/mkdirs/index.js create mode 100644 node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js create mode 100644 node_modules/fs-extra/lib/mkdirs/mkdirs.js create mode 100644 node_modules/fs-extra/lib/mkdirs/win32.js create mode 100644 node_modules/fs-extra/lib/move-sync/index.js create mode 100644 node_modules/fs-extra/lib/move/index.js create mode 100644 node_modules/fs-extra/lib/output/index.js create mode 100644 node_modules/fs-extra/lib/remove/index.js create mode 100644 node_modules/fs-extra/lib/remove/rimraf.js create mode 100644 node_modules/fs-extra/lib/util/assign.js create mode 100644 node_modules/fs-extra/lib/util/utimes.js create mode 100644 node_modules/fs-extra/package.json create mode 100644 node_modules/gaze/LICENSE-MIT create mode 100644 node_modules/gaze/README.md create mode 100644 node_modules/gaze/lib/gaze.js create mode 100644 node_modules/gaze/lib/helper.js create mode 100644 node_modules/gaze/package.json create mode 100644 node_modules/generic-pool/.eslintrc.js create mode 100644 node_modules/generic-pool/.npmignore create mode 100644 node_modules/generic-pool/.travis.yml create mode 100644 node_modules/generic-pool/CHANGELOG.md create mode 100644 node_modules/generic-pool/Makefile create mode 100644 node_modules/generic-pool/README.md create mode 100644 node_modules/generic-pool/fabfile.py create mode 100644 node_modules/generic-pool/lib/generic-pool.js create mode 100644 node_modules/generic-pool/package.json create mode 100644 node_modules/generic-pool/test/generic-pool.test.js create mode 100644 node_modules/get-caller-file/README.md create mode 100644 node_modules/get-caller-file/index.js create mode 100644 node_modules/get-caller-file/package.json create mode 100644 node_modules/glob-base/LICENSE create mode 100644 node_modules/glob-base/README.md create mode 100644 node_modules/glob-base/index.js create mode 100644 node_modules/glob-base/package.json create mode 100644 node_modules/glob-parent/.npmignore create mode 100644 node_modules/glob-parent/.travis.yml create mode 100644 node_modules/glob-parent/LICENSE create mode 100644 node_modules/glob-parent/README.md create mode 100644 node_modules/glob-parent/index.js create mode 100644 node_modules/glob-parent/package.json create mode 100644 node_modules/glob-parent/test.js create mode 100755 node_modules/glob-stream/LICENSE create mode 100644 node_modules/glob-stream/README.md create mode 100644 node_modules/glob-stream/index.js create mode 100644 node_modules/glob-stream/node_modules/isarray/README.md create mode 100644 node_modules/glob-stream/node_modules/isarray/build/build.js create mode 100644 node_modules/glob-stream/node_modules/isarray/component.json create mode 100644 node_modules/glob-stream/node_modules/isarray/index.js create mode 100644 node_modules/glob-stream/node_modules/isarray/package.json create mode 100644 node_modules/glob-stream/node_modules/readable-stream/.npmignore create mode 100644 node_modules/glob-stream/node_modules/readable-stream/LICENSE create mode 100644 node_modules/glob-stream/node_modules/readable-stream/README.md create mode 100644 node_modules/glob-stream/node_modules/readable-stream/duplex.js create mode 100644 node_modules/glob-stream/node_modules/readable-stream/lib/_stream_duplex.js create mode 100644 node_modules/glob-stream/node_modules/readable-stream/lib/_stream_passthrough.js create mode 100644 node_modules/glob-stream/node_modules/readable-stream/lib/_stream_readable.js create mode 100644 node_modules/glob-stream/node_modules/readable-stream/lib/_stream_transform.js create mode 100644 node_modules/glob-stream/node_modules/readable-stream/lib/_stream_writable.js create mode 100644 node_modules/glob-stream/node_modules/readable-stream/package.json create mode 100644 node_modules/glob-stream/node_modules/readable-stream/passthrough.js create mode 100644 node_modules/glob-stream/node_modules/readable-stream/readable.js create mode 100644 node_modules/glob-stream/node_modules/readable-stream/transform.js create mode 100644 node_modules/glob-stream/node_modules/readable-stream/writable.js create mode 100644 node_modules/glob-stream/node_modules/through2/.npmignore create mode 100644 node_modules/glob-stream/node_modules/through2/LICENSE create mode 100644 node_modules/glob-stream/node_modules/through2/README.md create mode 100644 node_modules/glob-stream/node_modules/through2/package.json create mode 100644 node_modules/glob-stream/node_modules/through2/through2.js create mode 100644 node_modules/glob-stream/package.json create mode 100644 node_modules/glob-watcher/.npmignore create mode 100644 node_modules/glob-watcher/.travis.yml create mode 100755 node_modules/glob-watcher/LICENSE create mode 100644 node_modules/glob-watcher/README.md create mode 100644 node_modules/glob-watcher/index.js create mode 100644 node_modules/glob-watcher/package.json create mode 100644 node_modules/glob-watcher/test/fixtures/test.coffee create mode 100644 node_modules/glob-watcher/test/main.js create mode 100644 node_modules/glob/LICENSE create mode 100644 node_modules/glob/README.md create mode 100644 node_modules/glob/common.js create mode 100644 node_modules/glob/glob.js create mode 100644 node_modules/glob/package.json create mode 100644 node_modules/glob/sync.js create mode 100755 node_modules/glob2base/LICENSE create mode 100644 node_modules/glob2base/README.md create mode 100644 node_modules/glob2base/index.js create mode 100644 node_modules/glob2base/package.json create mode 100644 node_modules/global-modules/LICENSE create mode 100644 node_modules/global-modules/README.md create mode 100644 node_modules/global-modules/index.js create mode 100644 node_modules/global-modules/node_modules/is-windows/LICENSE create mode 100644 node_modules/global-modules/node_modules/is-windows/index.js create mode 100644 node_modules/global-modules/node_modules/is-windows/package.json create mode 100644 node_modules/global-modules/package.json create mode 100644 node_modules/global-prefix/LICENSE create mode 100644 node_modules/global-prefix/README.md create mode 100644 node_modules/global-prefix/index.js create mode 100644 node_modules/global-prefix/node_modules/is-windows/LICENSE create mode 100644 node_modules/global-prefix/node_modules/is-windows/index.js create mode 100644 node_modules/global-prefix/node_modules/is-windows/package.json create mode 100644 node_modules/global-prefix/package.json create mode 100644 node_modules/globule/.jshintrc create mode 100644 node_modules/globule/.npmignore create mode 100644 node_modules/globule/.travis.yml create mode 100644 node_modules/globule/Gruntfile.js create mode 100644 node_modules/globule/LICENSE-MIT create mode 100644 node_modules/globule/README.md create mode 100644 node_modules/globule/lib/globule.js create mode 100644 node_modules/globule/node_modules/glob/.npmignore create mode 100644 node_modules/globule/node_modules/glob/.travis.yml create mode 100644 node_modules/globule/node_modules/glob/LICENSE create mode 100644 node_modules/globule/node_modules/glob/README.md create mode 100644 node_modules/globule/node_modules/glob/examples/g.js create mode 100644 node_modules/globule/node_modules/glob/examples/usr-local.js create mode 100644 node_modules/globule/node_modules/glob/glob.js create mode 100644 node_modules/globule/node_modules/glob/package.json create mode 100644 node_modules/globule/node_modules/glob/test/00-setup.js create mode 100644 node_modules/globule/node_modules/glob/test/bash-comparison.js create mode 100644 node_modules/globule/node_modules/glob/test/bash-results.json create mode 100644 node_modules/globule/node_modules/glob/test/cwd-test.js create mode 100644 node_modules/globule/node_modules/glob/test/mark.js create mode 100644 node_modules/globule/node_modules/glob/test/nocase-nomagic.js create mode 100644 node_modules/globule/node_modules/glob/test/pause-resume.js create mode 100644 node_modules/globule/node_modules/glob/test/root-nomount.js create mode 100644 node_modules/globule/node_modules/glob/test/root.js create mode 100644 node_modules/globule/node_modules/glob/test/zz-cleanup.js create mode 100644 node_modules/globule/node_modules/graceful-fs/.npmignore create mode 100644 node_modules/globule/node_modules/graceful-fs/LICENSE create mode 100644 node_modules/globule/node_modules/graceful-fs/README.md create mode 100644 node_modules/globule/node_modules/graceful-fs/graceful-fs.js create mode 100644 node_modules/globule/node_modules/graceful-fs/package.json create mode 100644 node_modules/globule/node_modules/graceful-fs/test/open.js create mode 100644 node_modules/globule/node_modules/graceful-fs/test/ulimit.js create mode 100644 node_modules/globule/node_modules/inherits/LICENSE create mode 100644 node_modules/globule/node_modules/inherits/README.md create mode 100644 node_modules/globule/node_modules/inherits/inherits.js create mode 100644 node_modules/globule/node_modules/inherits/package.json create mode 100644 node_modules/globule/node_modules/lodash/LICENSE.txt create mode 100644 node_modules/globule/node_modules/lodash/README.md create mode 100644 node_modules/globule/node_modules/lodash/dist/lodash.compat.js create mode 100644 node_modules/globule/node_modules/lodash/dist/lodash.compat.min.js create mode 100644 node_modules/globule/node_modules/lodash/dist/lodash.js create mode 100644 node_modules/globule/node_modules/lodash/dist/lodash.min.js create mode 100644 node_modules/globule/node_modules/lodash/dist/lodash.underscore.js create mode 100644 node_modules/globule/node_modules/lodash/dist/lodash.underscore.min.js create mode 100644 node_modules/globule/node_modules/lodash/package.json create mode 100644 node_modules/globule/node_modules/lru-cache/.npmignore create mode 100644 node_modules/globule/node_modules/lru-cache/.travis.yml create mode 100644 node_modules/globule/node_modules/lru-cache/CONTRIBUTORS create mode 100644 node_modules/globule/node_modules/lru-cache/LICENSE create mode 100644 node_modules/globule/node_modules/lru-cache/README.md create mode 100644 node_modules/globule/node_modules/lru-cache/lib/lru-cache.js create mode 100644 node_modules/globule/node_modules/lru-cache/package.json create mode 100644 node_modules/globule/node_modules/lru-cache/test/basic.js create mode 100644 node_modules/globule/node_modules/lru-cache/test/foreach.js create mode 100644 node_modules/globule/node_modules/lru-cache/test/memory-leak.js create mode 100644 node_modules/globule/node_modules/lru-cache/test/serialize.js create mode 100644 node_modules/globule/node_modules/minimatch/.npmignore create mode 100644 node_modules/globule/node_modules/minimatch/LICENSE create mode 100644 node_modules/globule/node_modules/minimatch/README.md create mode 100644 node_modules/globule/node_modules/minimatch/minimatch.js create mode 100644 node_modules/globule/node_modules/minimatch/package.json create mode 100644 node_modules/globule/node_modules/minimatch/test/basic.js create mode 100644 node_modules/globule/node_modules/minimatch/test/brace-expand.js create mode 100644 node_modules/globule/node_modules/minimatch/test/caching.js create mode 100644 node_modules/globule/node_modules/minimatch/test/defaults.js create mode 100644 node_modules/globule/node_modules/minimatch/test/extglob-ending-with-state-char.js create mode 100644 node_modules/globule/package.json create mode 100644 node_modules/globule/test/fixtures/expand/README.md create mode 100644 node_modules/globule/test/fixtures/expand/css/baz.css create mode 100644 node_modules/globule/test/fixtures/expand/css/qux.css create mode 100644 node_modules/globule/test/fixtures/expand/deep/deep.txt create mode 100644 node_modules/globule/test/fixtures/expand/deep/deeper/deeper.txt create mode 100644 node_modules/globule/test/fixtures/expand/deep/deeper/deepest/deepest.txt create mode 100644 node_modules/globule/test/fixtures/expand/js/bar.js create mode 100644 node_modules/globule/test/fixtures/expand/js/foo.js create mode 100644 node_modules/globule/test/globule_test.js create mode 100644 node_modules/glogg/LICENSE create mode 100644 node_modules/glogg/README.md create mode 100644 node_modules/glogg/index.js create mode 100644 node_modules/glogg/package.json create mode 100644 node_modules/graceful-fs/LICENSE create mode 100644 node_modules/graceful-fs/README.md create mode 100644 node_modules/graceful-fs/fs.js create mode 100644 node_modules/graceful-fs/graceful-fs.js create mode 100644 node_modules/graceful-fs/legacy-streams.js create mode 100644 node_modules/graceful-fs/package.json create mode 100644 node_modules/graceful-fs/polyfills.js create mode 100644 node_modules/graceful-readlink/.npmignore create mode 100644 node_modules/graceful-readlink/.travis.yml create mode 100644 node_modules/graceful-readlink/LICENSE create mode 100644 node_modules/graceful-readlink/README.md create mode 100644 node_modules/graceful-readlink/index.js create mode 100644 node_modules/graceful-readlink/package.json create mode 100644 node_modules/gulp-help/index.js create mode 100644 node_modules/gulp-help/lib/attach-help.js create mode 100644 node_modules/gulp-help/lib/calculate-margin.js create mode 100644 node_modules/gulp-help/lib/noop.js create mode 100644 node_modules/gulp-help/license create mode 100644 node_modules/gulp-help/node_modules/object-assign/index.js create mode 100644 node_modules/gulp-help/node_modules/object-assign/license create mode 100644 node_modules/gulp-help/node_modules/object-assign/package.json create mode 100644 node_modules/gulp-help/node_modules/object-assign/readme.md create mode 100644 node_modules/gulp-help/package.json create mode 100644 node_modules/gulp-help/readme.md create mode 100755 node_modules/gulp-util/LICENSE create mode 100644 node_modules/gulp-util/README.md create mode 100644 node_modules/gulp-util/index.js create mode 100644 node_modules/gulp-util/lib/PluginError.js create mode 100644 node_modules/gulp-util/lib/buffer.js create mode 100644 node_modules/gulp-util/lib/combine.js create mode 100644 node_modules/gulp-util/lib/env.js create mode 100644 node_modules/gulp-util/lib/isBuffer.js create mode 100644 node_modules/gulp-util/lib/isNull.js create mode 100644 node_modules/gulp-util/lib/isStream.js create mode 100644 node_modules/gulp-util/lib/log.js create mode 100644 node_modules/gulp-util/lib/noop.js create mode 100644 node_modules/gulp-util/lib/template.js create mode 100644 node_modules/gulp-util/node_modules/minimist/.travis.yml create mode 100644 node_modules/gulp-util/node_modules/minimist/LICENSE create mode 100644 node_modules/gulp-util/node_modules/minimist/example/parse.js create mode 100644 node_modules/gulp-util/node_modules/minimist/index.js create mode 100644 node_modules/gulp-util/node_modules/minimist/package.json create mode 100644 node_modules/gulp-util/node_modules/minimist/readme.markdown create mode 100644 node_modules/gulp-util/node_modules/minimist/test/all_bool.js create mode 100644 node_modules/gulp-util/node_modules/minimist/test/bool.js create mode 100644 node_modules/gulp-util/node_modules/minimist/test/dash.js create mode 100644 node_modules/gulp-util/node_modules/minimist/test/default_bool.js create mode 100644 node_modules/gulp-util/node_modules/minimist/test/dotted.js create mode 100644 node_modules/gulp-util/node_modules/minimist/test/kv_short.js create mode 100644 node_modules/gulp-util/node_modules/minimist/test/long.js create mode 100644 node_modules/gulp-util/node_modules/minimist/test/num.js create mode 100644 node_modules/gulp-util/node_modules/minimist/test/parse.js create mode 100644 node_modules/gulp-util/node_modules/minimist/test/parse_modified.js create mode 100644 node_modules/gulp-util/node_modules/minimist/test/short.js create mode 100644 node_modules/gulp-util/node_modules/minimist/test/stop_early.js create mode 100644 node_modules/gulp-util/node_modules/minimist/test/unknown.js create mode 100644 node_modules/gulp-util/node_modules/minimist/test/whitespace.js create mode 100644 node_modules/gulp-util/node_modules/object-assign/index.js create mode 100644 node_modules/gulp-util/node_modules/object-assign/license create mode 100644 node_modules/gulp-util/node_modules/object-assign/package.json create mode 100644 node_modules/gulp-util/node_modules/object-assign/readme.md create mode 100644 node_modules/gulp-util/package.json create mode 100644 node_modules/gulp/CHANGELOG.md create mode 100644 node_modules/gulp/LICENSE create mode 100644 node_modules/gulp/README.md create mode 100755 node_modules/gulp/bin/gulp.js create mode 100644 node_modules/gulp/completion/README.md create mode 100644 node_modules/gulp/completion/bash create mode 100644 node_modules/gulp/completion/fish create mode 100644 node_modules/gulp/completion/powershell create mode 100644 node_modules/gulp/completion/zsh create mode 100644 node_modules/gulp/gulp.1 create mode 100644 node_modules/gulp/index.js create mode 100644 node_modules/gulp/lib/completion.js create mode 100644 node_modules/gulp/lib/taskTree.js create mode 100644 node_modules/gulp/node_modules/minimist/.travis.yml create mode 100644 node_modules/gulp/node_modules/minimist/LICENSE create mode 100644 node_modules/gulp/node_modules/minimist/example/parse.js create mode 100644 node_modules/gulp/node_modules/minimist/index.js create mode 100644 node_modules/gulp/node_modules/minimist/package.json create mode 100644 node_modules/gulp/node_modules/minimist/readme.markdown create mode 100644 node_modules/gulp/node_modules/minimist/test/all_bool.js create mode 100644 node_modules/gulp/node_modules/minimist/test/bool.js create mode 100644 node_modules/gulp/node_modules/minimist/test/dash.js create mode 100644 node_modules/gulp/node_modules/minimist/test/default_bool.js create mode 100644 node_modules/gulp/node_modules/minimist/test/dotted.js create mode 100644 node_modules/gulp/node_modules/minimist/test/kv_short.js create mode 100644 node_modules/gulp/node_modules/minimist/test/long.js create mode 100644 node_modules/gulp/node_modules/minimist/test/num.js create mode 100644 node_modules/gulp/node_modules/minimist/test/parse.js create mode 100644 node_modules/gulp/node_modules/minimist/test/parse_modified.js create mode 100644 node_modules/gulp/node_modules/minimist/test/short.js create mode 100644 node_modules/gulp/node_modules/minimist/test/stop_early.js create mode 100644 node_modules/gulp/node_modules/minimist/test/unknown.js create mode 100644 node_modules/gulp/node_modules/minimist/test/whitespace.js create mode 100644 node_modules/gulp/package.json create mode 100644 node_modules/gulplog/CHANGELOG.md create mode 100644 node_modules/gulplog/LICENSE create mode 100644 node_modules/gulplog/README.md create mode 100644 node_modules/gulplog/index.js create mode 100644 node_modules/gulplog/package.json create mode 100644 node_modules/has-ansi/index.js create mode 100644 node_modules/has-ansi/license create mode 100644 node_modules/has-ansi/package.json create mode 100644 node_modules/has-ansi/readme.md create mode 100644 node_modules/has-gulplog/LICENSE create mode 100644 node_modules/has-gulplog/README.md create mode 100644 node_modules/has-gulplog/index.js create mode 100644 node_modules/has-gulplog/package.json create mode 100644 node_modules/homedir-polyfill/LICENSE create mode 100644 node_modules/homedir-polyfill/README.md create mode 100644 node_modules/homedir-polyfill/index.js create mode 100644 node_modules/homedir-polyfill/package.json create mode 100644 node_modules/hosted-git-info/LICENSE create mode 100644 node_modules/hosted-git-info/README.md create mode 100644 node_modules/hosted-git-info/git-host-info.js create mode 100644 node_modules/hosted-git-info/git-host.js create mode 100644 node_modules/hosted-git-info/index.js create mode 100644 node_modules/hosted-git-info/package.json create mode 100644 node_modules/http-errors/HISTORY.md create mode 100644 node_modules/http-errors/LICENSE create mode 100644 node_modules/http-errors/README.md create mode 100644 node_modules/http-errors/index.js create mode 100644 node_modules/http-errors/package.json create mode 100644 node_modules/iconv-lite/.npmignore create mode 100644 node_modules/iconv-lite/.travis.yml create mode 100644 node_modules/iconv-lite/Changelog.md create mode 100644 node_modules/iconv-lite/LICENSE create mode 100644 node_modules/iconv-lite/README.md create mode 100644 node_modules/iconv-lite/encodings/dbcs-codec.js create mode 100644 node_modules/iconv-lite/encodings/dbcs-data.js create mode 100644 node_modules/iconv-lite/encodings/index.js create mode 100644 node_modules/iconv-lite/encodings/internal.js create mode 100644 node_modules/iconv-lite/encodings/sbcs-codec.js create mode 100644 node_modules/iconv-lite/encodings/sbcs-data-generated.js create mode 100644 node_modules/iconv-lite/encodings/sbcs-data.js create mode 100644 node_modules/iconv-lite/encodings/tables/big5-added.json create mode 100644 node_modules/iconv-lite/encodings/tables/cp936.json create mode 100644 node_modules/iconv-lite/encodings/tables/cp949.json create mode 100644 node_modules/iconv-lite/encodings/tables/cp950.json create mode 100644 node_modules/iconv-lite/encodings/tables/eucjp.json create mode 100644 node_modules/iconv-lite/encodings/tables/gb18030-ranges.json create mode 100644 node_modules/iconv-lite/encodings/tables/gbk-added.json create mode 100644 node_modules/iconv-lite/encodings/tables/shiftjis.json create mode 100644 node_modules/iconv-lite/encodings/utf16.js create mode 100644 node_modules/iconv-lite/encodings/utf7.js create mode 100644 node_modules/iconv-lite/lib/bom-handling.js create mode 100644 node_modules/iconv-lite/lib/extend-node.js create mode 100644 node_modules/iconv-lite/lib/index.d.ts create mode 100644 node_modules/iconv-lite/lib/index.js create mode 100644 node_modules/iconv-lite/lib/streams.js create mode 100644 node_modules/iconv-lite/package.json create mode 100644 node_modules/inflection/.npmignore create mode 100644 node_modules/inflection/History.md create mode 100644 node_modules/inflection/Readme.md create mode 100644 node_modules/inflection/bower.json create mode 100644 node_modules/inflection/component.json create mode 100644 node_modules/inflection/inflection.min.js create mode 100644 node_modules/inflection/lib/inflection.js create mode 100644 node_modules/inflection/package.json create mode 100644 node_modules/inflight/LICENSE create mode 100644 node_modules/inflight/README.md create mode 100644 node_modules/inflight/inflight.js create mode 100644 node_modules/inflight/package.json create mode 100644 node_modules/inherits/LICENSE create mode 100644 node_modules/inherits/README.md create mode 100644 node_modules/inherits/inherits.js create mode 100644 node_modules/inherits/inherits_browser.js create mode 100644 node_modules/inherits/package.json create mode 100644 node_modules/ini/LICENSE create mode 100644 node_modules/ini/README.md create mode 100644 node_modules/ini/ini.js create mode 100644 node_modules/ini/package.json create mode 100644 node_modules/interpret/CHANGELOG create mode 100644 node_modules/interpret/LICENSE create mode 100644 node_modules/interpret/README.md create mode 100644 node_modules/interpret/index.js create mode 100644 node_modules/interpret/package.json create mode 100644 node_modules/invert-kv/index.js create mode 100644 node_modules/invert-kv/package.json create mode 100644 node_modules/invert-kv/readme.md create mode 100644 node_modules/ipaddr.js/.npmignore create mode 100644 node_modules/ipaddr.js/.travis.yml create mode 100644 node_modules/ipaddr.js/Cakefile create mode 100644 node_modules/ipaddr.js/LICENSE create mode 100644 node_modules/ipaddr.js/README.md create mode 100644 node_modules/ipaddr.js/bower.json create mode 100644 node_modules/ipaddr.js/ipaddr.min.js create mode 100644 node_modules/ipaddr.js/lib/ipaddr.js create mode 100644 node_modules/ipaddr.js/package.json create mode 100644 node_modules/ipaddr.js/src/ipaddr.coffee create mode 100644 node_modules/ipaddr.js/test/ipaddr.test.coffee create mode 100644 node_modules/is-absolute/LICENSE create mode 100644 node_modules/is-absolute/README.md create mode 100644 node_modules/is-absolute/index.js create mode 100644 node_modules/is-absolute/node_modules/is-windows/LICENSE create mode 100644 node_modules/is-absolute/node_modules/is-windows/index.js create mode 100644 node_modules/is-absolute/node_modules/is-windows/package.json create mode 100644 node_modules/is-absolute/package.json create mode 100644 node_modules/is-arrayish/.editorconfig create mode 100644 node_modules/is-arrayish/.istanbul.yml create mode 100644 node_modules/is-arrayish/.npmignore create mode 100644 node_modules/is-arrayish/.travis.yml create mode 100644 node_modules/is-arrayish/LICENSE create mode 100644 node_modules/is-arrayish/README.md create mode 100644 node_modules/is-arrayish/index.js create mode 100644 node_modules/is-arrayish/package.json create mode 100644 node_modules/is-buffer/.npmignore create mode 100644 node_modules/is-buffer/LICENSE create mode 100644 node_modules/is-buffer/README.md create mode 100644 node_modules/is-buffer/index.js create mode 100644 node_modules/is-buffer/package.json create mode 100644 node_modules/is-buffer/test/basic.js create mode 100644 node_modules/is-builtin-module/index.js create mode 100644 node_modules/is-builtin-module/license create mode 100644 node_modules/is-builtin-module/package.json create mode 100644 node_modules/is-builtin-module/readme.md create mode 100644 node_modules/is-dotfile/LICENSE create mode 100644 node_modules/is-dotfile/README.md create mode 100644 node_modules/is-dotfile/index.js create mode 100644 node_modules/is-dotfile/package.json create mode 100644 node_modules/is-equal-shallow/LICENSE create mode 100644 node_modules/is-equal-shallow/README.md create mode 100644 node_modules/is-equal-shallow/index.js create mode 100644 node_modules/is-equal-shallow/package.json create mode 100644 node_modules/is-extendable/LICENSE create mode 100644 node_modules/is-extendable/README.md create mode 100644 node_modules/is-extendable/index.js create mode 100644 node_modules/is-extendable/package.json create mode 100644 node_modules/is-extglob/LICENSE create mode 100644 node_modules/is-extglob/README.md create mode 100644 node_modules/is-extglob/index.js create mode 100644 node_modules/is-extglob/package.json create mode 100644 node_modules/is-fullwidth-code-point/index.js create mode 100644 node_modules/is-fullwidth-code-point/license create mode 100644 node_modules/is-fullwidth-code-point/package.json create mode 100644 node_modules/is-fullwidth-code-point/readme.md create mode 100644 node_modules/is-glob/LICENSE create mode 100644 node_modules/is-glob/README.md create mode 100644 node_modules/is-glob/index.js create mode 100644 node_modules/is-glob/package.json create mode 100644 node_modules/is-number/LICENSE create mode 100644 node_modules/is-number/README.md create mode 100644 node_modules/is-number/index.js create mode 100644 node_modules/is-number/package.json create mode 100644 node_modules/is-posix-bracket/LICENSE create mode 100644 node_modules/is-posix-bracket/README.md create mode 100644 node_modules/is-posix-bracket/index.js create mode 100644 node_modules/is-posix-bracket/package.json create mode 100644 node_modules/is-primitive/LICENSE create mode 100644 node_modules/is-primitive/README.md create mode 100644 node_modules/is-primitive/index.js create mode 100644 node_modules/is-primitive/package.json create mode 100644 node_modules/is-promise/.npmignore create mode 100644 node_modules/is-promise/.travis.yml create mode 100644 node_modules/is-promise/LICENSE create mode 100644 node_modules/is-promise/index.js create mode 100644 node_modules/is-promise/package.json create mode 100644 node_modules/is-promise/readme.md create mode 100644 node_modules/is-relative/LICENSE create mode 100644 node_modules/is-relative/README.md create mode 100644 node_modules/is-relative/index.js create mode 100644 node_modules/is-relative/package.json create mode 100644 node_modules/is-unc-path/LICENSE create mode 100644 node_modules/is-unc-path/README.md create mode 100644 node_modules/is-unc-path/index.js create mode 100644 node_modules/is-unc-path/package.json create mode 100644 node_modules/is-utf8/LICENSE create mode 100644 node_modules/is-utf8/README.md create mode 100644 node_modules/is-utf8/is-utf8.js create mode 100644 node_modules/is-utf8/package.json create mode 100644 node_modules/is-windows/LICENSE create mode 100644 node_modules/is-windows/README.md create mode 100644 node_modules/is-windows/index.js create mode 100644 node_modules/is-windows/package.json create mode 100644 node_modules/isarray/.npmignore create mode 100644 node_modules/isarray/.travis.yml create mode 100644 node_modules/isarray/Makefile create mode 100644 node_modules/isarray/README.md create mode 100644 node_modules/isarray/component.json create mode 100644 node_modules/isarray/index.js create mode 100644 node_modules/isarray/package.json create mode 100644 node_modules/isarray/test.js create mode 100644 node_modules/isexe/.npmignore create mode 100644 node_modules/isexe/LICENSE create mode 100644 node_modules/isexe/README.md create mode 100644 node_modules/isexe/index.js create mode 100644 node_modules/isexe/mode.js create mode 100644 node_modules/isexe/package.json create mode 100644 node_modules/isexe/test/basic.js create mode 100644 node_modules/isexe/windows.js create mode 100644 node_modules/isobject/LICENSE create mode 100644 node_modules/isobject/README.md create mode 100644 node_modules/isobject/index.js create mode 100644 node_modules/isobject/package.json create mode 100644 node_modules/jade/.npmignore create mode 100644 node_modules/jade/.release.json create mode 100644 node_modules/jade/History.md create mode 100644 node_modules/jade/LICENSE create mode 100644 node_modules/jade/README.md create mode 100644 node_modules/jade/Readme_zh-cn.md create mode 100755 node_modules/jade/bin/jade.js create mode 100644 node_modules/jade/block-code.html create mode 100644 node_modules/jade/component.json create mode 100644 node_modules/jade/jade.js create mode 100644 node_modules/jade/lib/compiler.js create mode 100644 node_modules/jade/lib/doctypes.js create mode 100644 node_modules/jade/lib/filters-client.js create mode 100644 node_modules/jade/lib/filters.js create mode 100644 node_modules/jade/lib/index.js create mode 100644 node_modules/jade/lib/inline-tags.js create mode 100644 node_modules/jade/lib/lexer.js create mode 100644 node_modules/jade/lib/nodes/attrs.js create mode 100644 node_modules/jade/lib/nodes/block-comment.js create mode 100644 node_modules/jade/lib/nodes/block.js create mode 100644 node_modules/jade/lib/nodes/case.js create mode 100644 node_modules/jade/lib/nodes/code.js create mode 100644 node_modules/jade/lib/nodes/comment.js create mode 100644 node_modules/jade/lib/nodes/doctype.js create mode 100644 node_modules/jade/lib/nodes/each.js create mode 100644 node_modules/jade/lib/nodes/filter.js create mode 100644 node_modules/jade/lib/nodes/index.js create mode 100644 node_modules/jade/lib/nodes/literal.js create mode 100644 node_modules/jade/lib/nodes/mixin-block.js create mode 100644 node_modules/jade/lib/nodes/mixin.js create mode 100644 node_modules/jade/lib/nodes/node.js create mode 100644 node_modules/jade/lib/nodes/tag.js create mode 100644 node_modules/jade/lib/nodes/text.js create mode 100644 node_modules/jade/lib/parser.js create mode 100644 node_modules/jade/lib/runtime.js create mode 100644 node_modules/jade/lib/utils.js create mode 100644 node_modules/jade/package.json create mode 100644 node_modules/jade/release.js create mode 100644 node_modules/jade/runtime.js create mode 100644 node_modules/js-beautify/.codeclimate.yml create mode 100644 node_modules/js-beautify/.jshintignore create mode 100644 node_modules/js-beautify/.jshintrc create mode 100644 node_modules/js-beautify/.npmignore create mode 100644 node_modules/js-beautify/.travis.yml create mode 100644 node_modules/js-beautify/CHANGELOG.md create mode 100644 node_modules/js-beautify/CONTRIBUTING.md create mode 100644 node_modules/js-beautify/ISSUE_TEMPLATE.md create mode 100644 node_modules/js-beautify/LICENSE create mode 100644 node_modules/js-beautify/README.md create mode 100644 node_modules/js-beautify/appveyor.yml create mode 100644 node_modules/js-beautify/bower.json create mode 100755 node_modules/js-beautify/build create mode 100755 node_modules/js-beautify/js/bin/css-beautify.js create mode 100755 node_modules/js-beautify/js/bin/html-beautify.js create mode 100755 node_modules/js-beautify/js/bin/js-beautify.js create mode 100644 node_modules/js-beautify/js/config/defaults.json create mode 100644 node_modules/js-beautify/js/index.js create mode 100644 node_modules/js-beautify/js/lib/beautify-css.js create mode 100644 node_modules/js-beautify/js/lib/beautify-html.js create mode 100644 node_modules/js-beautify/js/lib/beautify.js create mode 100755 node_modules/js-beautify/js/lib/cli.js create mode 100644 node_modules/js-beautify/js/lib/unpackers/javascriptobfuscator_unpacker.js create mode 100644 node_modules/js-beautify/js/lib/unpackers/myobfuscate_unpacker.js create mode 100644 node_modules/js-beautify/js/lib/unpackers/p_a_c_k_e_r_unpacker.js create mode 100644 node_modules/js-beautify/js/lib/unpackers/urlencode_unpacker.js create mode 100755 node_modules/js-beautify/js/test/amd-beautify-tests.js create mode 100644 node_modules/js-beautify/js/test/generated/beautify-css-tests.js create mode 100644 node_modules/js-beautify/js/test/generated/beautify-html-tests.js create mode 100644 node_modules/js-beautify/js/test/generated/beautify-javascript-tests.js create mode 100644 node_modules/js-beautify/js/test/node-beautify-html-perf-tests.js create mode 100644 node_modules/js-beautify/js/test/node-beautify-perf-tests.js create mode 100755 node_modules/js-beautify/js/test/node-beautify-tests.js create mode 100644 node_modules/js-beautify/js/test/requirejs-html-beautify.html create mode 100644 node_modules/js-beautify/js/test/resources/configerror/.jsbeautifyrc create mode 100644 node_modules/js-beautify/js/test/resources/configerror/subDir1/subDir2/empty.txt create mode 100644 node_modules/js-beautify/js/test/resources/editorconfig/.editorconfig create mode 100644 node_modules/js-beautify/js/test/resources/editorconfig/cr/.editorconfig create mode 100644 node_modules/js-beautify/js/test/resources/editorconfig/crlf/.editorconfig create mode 100644 node_modules/js-beautify/js/test/resources/editorconfig/error/.editorconfig create mode 100644 node_modules/js-beautify/js/test/resources/editorconfig/example-base.js create mode 100644 node_modules/js-beautify/js/test/resources/example1.js create mode 100644 node_modules/js-beautify/js/test/resources/indent11chars/.jsbeautifyrc create mode 100644 node_modules/js-beautify/js/test/resources/indent11chars/subDir1/subDir2/empty.txt create mode 100755 node_modules/js-beautify/js/test/run-tests create mode 100644 node_modules/js-beautify/js/test/sanitytest.js create mode 100755 node_modules/js-beautify/js/test/shell-smoke-test.sh create mode 100644 node_modules/js-beautify/jsbeautifyrc create mode 100644 node_modules/js-beautify/package.json create mode 100644 node_modules/js-beautify/test/data/css/node.mustache create mode 100644 node_modules/js-beautify/test/data/css/python.mustache create mode 100644 node_modules/js-beautify/test/data/css/tests.js create mode 100644 node_modules/js-beautify/test/data/html/node.mustache create mode 100644 node_modules/js-beautify/test/data/html/tests.js create mode 100644 node_modules/js-beautify/test/data/javascript/inputlib.js create mode 100644 node_modules/js-beautify/test/data/javascript/node.mustache create mode 100644 node_modules/js-beautify/test/data/javascript/python.mustache create mode 100644 node_modules/js-beautify/test/data/javascript/tests.js create mode 100644 node_modules/js-beautify/test/generate-tests.js create mode 100644 node_modules/js-beautify/test/resources/html-with-base64image.html create mode 100644 node_modules/js-beautify/test/resources/underscore-min.js create mode 100644 node_modules/js-beautify/test/resources/underscore.js create mode 100755 node_modules/js-beautify/tools/build.sh create mode 100755 node_modules/js-beautify/tools/generate-changelog.sh create mode 100755 node_modules/js-beautify/tools/git-status-clear.sh create mode 100755 node_modules/js-beautify/tools/release-all.sh create mode 100644 node_modules/jsonfile/.npmignore create mode 100644 node_modules/jsonfile/CHANGELOG.md create mode 100644 node_modules/jsonfile/LICENSE create mode 100644 node_modules/jsonfile/README.md create mode 100644 node_modules/jsonfile/appveyor.yml create mode 100644 node_modules/jsonfile/index.js create mode 100644 node_modules/jsonfile/package.json create mode 100644 node_modules/jstransformer/LICENSE create mode 100644 node_modules/jstransformer/README.md create mode 100644 node_modules/jstransformer/index.js create mode 100644 node_modules/jstransformer/package.json create mode 100644 node_modules/kind-of/LICENSE create mode 100644 node_modules/kind-of/README.md create mode 100644 node_modules/kind-of/index.js create mode 100644 node_modules/kind-of/package.json create mode 100644 node_modules/lazy-cache/LICENSE create mode 100644 node_modules/lazy-cache/README.md create mode 100644 node_modules/lazy-cache/index.js create mode 100644 node_modules/lazy-cache/package.json create mode 100644 node_modules/lcid/index.js create mode 100644 node_modules/lcid/lcid.json create mode 100644 node_modules/lcid/license create mode 100644 node_modules/lcid/package.json create mode 100644 node_modules/lcid/readme.md create mode 100644 node_modules/liftoff/.jscsrc create mode 100644 node_modules/liftoff/.jshintrc create mode 100644 node_modules/liftoff/.npmignore create mode 100644 node_modules/liftoff/.travis.yml create mode 100644 node_modules/liftoff/CHANGELOG create mode 100644 node_modules/liftoff/LICENSE create mode 100644 node_modules/liftoff/README.md create mode 100644 node_modules/liftoff/UPGRADING.md create mode 100644 node_modules/liftoff/appveyor.yml create mode 100644 node_modules/liftoff/index.js create mode 100644 node_modules/liftoff/lib/build_config_name.js create mode 100644 node_modules/liftoff/lib/file_search.js create mode 100644 node_modules/liftoff/lib/find_config.js create mode 100644 node_modules/liftoff/lib/find_cwd.js create mode 100644 node_modules/liftoff/lib/parse_options.js create mode 100644 node_modules/liftoff/lib/register_loader.js create mode 100644 node_modules/liftoff/lib/silent_require.js create mode 100644 node_modules/liftoff/package.json create mode 100644 node_modules/load-json-file/index.js create mode 100644 node_modules/load-json-file/license create mode 100644 node_modules/load-json-file/node_modules/strip-bom/index.js create mode 100644 node_modules/load-json-file/node_modules/strip-bom/license create mode 100644 node_modules/load-json-file/node_modules/strip-bom/package.json create mode 100644 node_modules/load-json-file/node_modules/strip-bom/readme.md create mode 100644 node_modules/load-json-file/package.json create mode 100644 node_modules/load-json-file/readme.md create mode 100644 node_modules/lodash._basecopy/LICENSE.txt create mode 100644 node_modules/lodash._basecopy/README.md create mode 100644 node_modules/lodash._basecopy/index.js create mode 100644 node_modules/lodash._basecopy/package.json create mode 100644 node_modules/lodash._basetostring/LICENSE create mode 100644 node_modules/lodash._basetostring/README.md create mode 100644 node_modules/lodash._basetostring/index.js create mode 100644 node_modules/lodash._basetostring/package.json create mode 100644 node_modules/lodash._basevalues/LICENSE.txt create mode 100644 node_modules/lodash._basevalues/README.md create mode 100644 node_modules/lodash._basevalues/index.js create mode 100644 node_modules/lodash._basevalues/package.json create mode 100644 node_modules/lodash._getnative/LICENSE create mode 100644 node_modules/lodash._getnative/README.md create mode 100644 node_modules/lodash._getnative/index.js create mode 100644 node_modules/lodash._getnative/package.json create mode 100644 node_modules/lodash._isiterateecall/LICENSE.txt create mode 100644 node_modules/lodash._isiterateecall/README.md create mode 100644 node_modules/lodash._isiterateecall/index.js create mode 100644 node_modules/lodash._isiterateecall/package.json create mode 100644 node_modules/lodash._reescape/LICENSE.txt create mode 100644 node_modules/lodash._reescape/README.md create mode 100644 node_modules/lodash._reescape/index.js create mode 100644 node_modules/lodash._reescape/package.json create mode 100644 node_modules/lodash._reevaluate/LICENSE.txt create mode 100644 node_modules/lodash._reevaluate/README.md create mode 100644 node_modules/lodash._reevaluate/index.js create mode 100644 node_modules/lodash._reevaluate/package.json create mode 100644 node_modules/lodash._reinterpolate/LICENSE.txt create mode 100644 node_modules/lodash._reinterpolate/README.md create mode 100644 node_modules/lodash._reinterpolate/index.js create mode 100644 node_modules/lodash._reinterpolate/package.json create mode 100644 node_modules/lodash._root/LICENSE create mode 100644 node_modules/lodash._root/README.md create mode 100644 node_modules/lodash._root/index.js create mode 100644 node_modules/lodash._root/package.json create mode 100644 node_modules/lodash.assignwith/LICENSE create mode 100644 node_modules/lodash.assignwith/README.md create mode 100644 node_modules/lodash.assignwith/index.js create mode 100644 node_modules/lodash.assignwith/package.json create mode 100644 node_modules/lodash.escape/LICENSE create mode 100644 node_modules/lodash.escape/README.md create mode 100644 node_modules/lodash.escape/index.js create mode 100644 node_modules/lodash.escape/package.json create mode 100644 node_modules/lodash.isarguments/LICENSE create mode 100644 node_modules/lodash.isarguments/README.md create mode 100644 node_modules/lodash.isarguments/index.js create mode 100644 node_modules/lodash.isarguments/package.json create mode 100644 node_modules/lodash.isarray/LICENSE create mode 100644 node_modules/lodash.isarray/README.md create mode 100644 node_modules/lodash.isarray/index.js create mode 100644 node_modules/lodash.isarray/package.json create mode 100644 node_modules/lodash.isempty/LICENSE create mode 100644 node_modules/lodash.isempty/README.md create mode 100644 node_modules/lodash.isempty/index.js create mode 100644 node_modules/lodash.isempty/package.json create mode 100644 node_modules/lodash.isplainobject/LICENSE create mode 100644 node_modules/lodash.isplainobject/README.md create mode 100644 node_modules/lodash.isplainobject/index.js create mode 100644 node_modules/lodash.isplainobject/package.json create mode 100644 node_modules/lodash.isstring/LICENSE create mode 100644 node_modules/lodash.isstring/README.md create mode 100644 node_modules/lodash.isstring/index.js create mode 100644 node_modules/lodash.isstring/package.json create mode 100644 node_modules/lodash.keys/LICENSE create mode 100644 node_modules/lodash.keys/README.md create mode 100644 node_modules/lodash.keys/index.js create mode 100644 node_modules/lodash.keys/package.json create mode 100644 node_modules/lodash.mapvalues/LICENSE create mode 100644 node_modules/lodash.mapvalues/README.md create mode 100644 node_modules/lodash.mapvalues/index.js create mode 100644 node_modules/lodash.mapvalues/package.json create mode 100644 node_modules/lodash.pick/LICENSE create mode 100644 node_modules/lodash.pick/README.md create mode 100644 node_modules/lodash.pick/index.js create mode 100644 node_modules/lodash.pick/package.json create mode 100644 node_modules/lodash.restparam/LICENSE.txt create mode 100644 node_modules/lodash.restparam/README.md create mode 100644 node_modules/lodash.restparam/index.js create mode 100644 node_modules/lodash.restparam/package.json create mode 100644 node_modules/lodash.template/LICENSE create mode 100644 node_modules/lodash.template/README.md create mode 100644 node_modules/lodash.template/index.js create mode 100644 node_modules/lodash.template/package.json create mode 100644 node_modules/lodash.templatesettings/LICENSE create mode 100644 node_modules/lodash.templatesettings/README.md create mode 100644 node_modules/lodash.templatesettings/index.js create mode 100644 node_modules/lodash.templatesettings/package.json create mode 100644 node_modules/lodash/LICENSE create mode 100644 node_modules/lodash/README.md create mode 100644 node_modules/lodash/_DataView.js create mode 100644 node_modules/lodash/_Hash.js create mode 100644 node_modules/lodash/_LazyWrapper.js create mode 100644 node_modules/lodash/_ListCache.js create mode 100644 node_modules/lodash/_LodashWrapper.js create mode 100644 node_modules/lodash/_Map.js create mode 100644 node_modules/lodash/_MapCache.js create mode 100644 node_modules/lodash/_Promise.js create mode 100644 node_modules/lodash/_Reflect.js create mode 100644 node_modules/lodash/_Set.js create mode 100644 node_modules/lodash/_SetCache.js create mode 100644 node_modules/lodash/_Stack.js create mode 100644 node_modules/lodash/_Symbol.js create mode 100644 node_modules/lodash/_Uint8Array.js create mode 100644 node_modules/lodash/_WeakMap.js create mode 100644 node_modules/lodash/_addMapEntry.js create mode 100644 node_modules/lodash/_addSetEntry.js create mode 100644 node_modules/lodash/_apply.js create mode 100644 node_modules/lodash/_arrayAggregator.js create mode 100644 node_modules/lodash/_arrayEach.js create mode 100644 node_modules/lodash/_arrayEachRight.js create mode 100644 node_modules/lodash/_arrayEvery.js create mode 100644 node_modules/lodash/_arrayFilter.js create mode 100644 node_modules/lodash/_arrayIncludes.js create mode 100644 node_modules/lodash/_arrayIncludesWith.js create mode 100644 node_modules/lodash/_arrayMap.js create mode 100644 node_modules/lodash/_arrayPush.js create mode 100644 node_modules/lodash/_arrayReduce.js create mode 100644 node_modules/lodash/_arrayReduceRight.js create mode 100644 node_modules/lodash/_arraySome.js create mode 100644 node_modules/lodash/_assignInDefaults.js create mode 100644 node_modules/lodash/_assignMergeValue.js create mode 100644 node_modules/lodash/_assignValue.js create mode 100644 node_modules/lodash/_assocIndexOf.js create mode 100644 node_modules/lodash/_baseAggregator.js create mode 100644 node_modules/lodash/_baseAssign.js create mode 100644 node_modules/lodash/_baseAt.js create mode 100644 node_modules/lodash/_baseClamp.js create mode 100644 node_modules/lodash/_baseClone.js create mode 100644 node_modules/lodash/_baseConforms.js create mode 100644 node_modules/lodash/_baseCreate.js create mode 100644 node_modules/lodash/_baseDelay.js create mode 100644 node_modules/lodash/_baseDifference.js create mode 100644 node_modules/lodash/_baseEach.js create mode 100644 node_modules/lodash/_baseEachRight.js create mode 100644 node_modules/lodash/_baseEvery.js create mode 100644 node_modules/lodash/_baseExtremum.js create mode 100644 node_modules/lodash/_baseFill.js create mode 100644 node_modules/lodash/_baseFilter.js create mode 100644 node_modules/lodash/_baseFind.js create mode 100644 node_modules/lodash/_baseFindIndex.js create mode 100644 node_modules/lodash/_baseFlatten.js create mode 100644 node_modules/lodash/_baseFor.js create mode 100644 node_modules/lodash/_baseForOwn.js create mode 100644 node_modules/lodash/_baseForOwnRight.js create mode 100644 node_modules/lodash/_baseForRight.js create mode 100644 node_modules/lodash/_baseFunctions.js create mode 100644 node_modules/lodash/_baseGet.js create mode 100644 node_modules/lodash/_baseGetAllKeys.js create mode 100644 node_modules/lodash/_baseGt.js create mode 100644 node_modules/lodash/_baseHas.js create mode 100644 node_modules/lodash/_baseHasIn.js create mode 100644 node_modules/lodash/_baseInRange.js create mode 100644 node_modules/lodash/_baseIndexOf.js create mode 100644 node_modules/lodash/_baseIndexOfWith.js create mode 100644 node_modules/lodash/_baseIntersection.js create mode 100644 node_modules/lodash/_baseInverter.js create mode 100644 node_modules/lodash/_baseInvoke.js create mode 100644 node_modules/lodash/_baseIsEqual.js create mode 100644 node_modules/lodash/_baseIsEqualDeep.js create mode 100644 node_modules/lodash/_baseIsMatch.js create mode 100644 node_modules/lodash/_baseIteratee.js create mode 100644 node_modules/lodash/_baseKeys.js create mode 100644 node_modules/lodash/_baseKeysIn.js create mode 100644 node_modules/lodash/_baseLodash.js create mode 100644 node_modules/lodash/_baseLt.js create mode 100644 node_modules/lodash/_baseMap.js create mode 100644 node_modules/lodash/_baseMatches.js create mode 100644 node_modules/lodash/_baseMatchesProperty.js create mode 100644 node_modules/lodash/_baseMean.js create mode 100644 node_modules/lodash/_baseMerge.js create mode 100644 node_modules/lodash/_baseMergeDeep.js create mode 100644 node_modules/lodash/_baseNth.js create mode 100644 node_modules/lodash/_baseOrderBy.js create mode 100644 node_modules/lodash/_basePick.js create mode 100644 node_modules/lodash/_basePickBy.js create mode 100644 node_modules/lodash/_baseProperty.js create mode 100644 node_modules/lodash/_basePropertyDeep.js create mode 100644 node_modules/lodash/_basePullAll.js create mode 100644 node_modules/lodash/_basePullAt.js create mode 100644 node_modules/lodash/_baseRandom.js create mode 100644 node_modules/lodash/_baseRange.js create mode 100644 node_modules/lodash/_baseReduce.js create mode 100644 node_modules/lodash/_baseRepeat.js create mode 100644 node_modules/lodash/_baseSet.js create mode 100644 node_modules/lodash/_baseSetData.js create mode 100644 node_modules/lodash/_baseSlice.js create mode 100644 node_modules/lodash/_baseSome.js create mode 100644 node_modules/lodash/_baseSortBy.js create mode 100644 node_modules/lodash/_baseSortedIndex.js create mode 100644 node_modules/lodash/_baseSortedIndexBy.js create mode 100644 node_modules/lodash/_baseSortedUniq.js create mode 100644 node_modules/lodash/_baseSum.js create mode 100644 node_modules/lodash/_baseTimes.js create mode 100644 node_modules/lodash/_baseToNumber.js create mode 100644 node_modules/lodash/_baseToPairs.js create mode 100644 node_modules/lodash/_baseToString.js create mode 100644 node_modules/lodash/_baseUnary.js create mode 100644 node_modules/lodash/_baseUniq.js create mode 100644 node_modules/lodash/_baseUnset.js create mode 100644 node_modules/lodash/_baseUpdate.js create mode 100644 node_modules/lodash/_baseValues.js create mode 100644 node_modules/lodash/_baseWhile.js create mode 100644 node_modules/lodash/_baseWrapperValue.js create mode 100644 node_modules/lodash/_baseXor.js create mode 100644 node_modules/lodash/_baseZipObject.js create mode 100644 node_modules/lodash/_cacheHas.js create mode 100644 node_modules/lodash/_castArrayLikeObject.js create mode 100644 node_modules/lodash/_castFunction.js create mode 100644 node_modules/lodash/_castPath.js create mode 100644 node_modules/lodash/_castSlice.js create mode 100644 node_modules/lodash/_charsEndIndex.js create mode 100644 node_modules/lodash/_charsStartIndex.js create mode 100644 node_modules/lodash/_checkGlobal.js create mode 100644 node_modules/lodash/_cloneArrayBuffer.js create mode 100644 node_modules/lodash/_cloneBuffer.js create mode 100644 node_modules/lodash/_cloneDataView.js create mode 100644 node_modules/lodash/_cloneMap.js create mode 100644 node_modules/lodash/_cloneRegExp.js create mode 100644 node_modules/lodash/_cloneSet.js create mode 100644 node_modules/lodash/_cloneSymbol.js create mode 100644 node_modules/lodash/_cloneTypedArray.js create mode 100644 node_modules/lodash/_compareAscending.js create mode 100644 node_modules/lodash/_compareMultiple.js create mode 100644 node_modules/lodash/_composeArgs.js create mode 100644 node_modules/lodash/_composeArgsRight.js create mode 100644 node_modules/lodash/_copyArray.js create mode 100644 node_modules/lodash/_copyObject.js create mode 100644 node_modules/lodash/_copySymbols.js create mode 100644 node_modules/lodash/_countHolders.js create mode 100644 node_modules/lodash/_createAggregator.js create mode 100644 node_modules/lodash/_createAssigner.js create mode 100644 node_modules/lodash/_createBaseEach.js create mode 100644 node_modules/lodash/_createBaseFor.js create mode 100644 node_modules/lodash/_createBaseWrapper.js create mode 100644 node_modules/lodash/_createCaseFirst.js create mode 100644 node_modules/lodash/_createCompounder.js create mode 100644 node_modules/lodash/_createCtorWrapper.js create mode 100644 node_modules/lodash/_createCurryWrapper.js create mode 100644 node_modules/lodash/_createFlow.js create mode 100644 node_modules/lodash/_createHybridWrapper.js create mode 100644 node_modules/lodash/_createInverter.js create mode 100644 node_modules/lodash/_createMathOperation.js create mode 100644 node_modules/lodash/_createOver.js create mode 100644 node_modules/lodash/_createPadding.js create mode 100644 node_modules/lodash/_createPartialWrapper.js create mode 100644 node_modules/lodash/_createRange.js create mode 100644 node_modules/lodash/_createRecurryWrapper.js create mode 100644 node_modules/lodash/_createRelationalOperation.js create mode 100644 node_modules/lodash/_createRound.js create mode 100644 node_modules/lodash/_createSet.js create mode 100644 node_modules/lodash/_createToPairs.js create mode 100644 node_modules/lodash/_createWrapper.js create mode 100644 node_modules/lodash/_deburrLetter.js create mode 100644 node_modules/lodash/_equalArrays.js create mode 100644 node_modules/lodash/_equalByTag.js create mode 100644 node_modules/lodash/_equalObjects.js create mode 100644 node_modules/lodash/_escapeHtmlChar.js create mode 100644 node_modules/lodash/_escapeStringChar.js create mode 100644 node_modules/lodash/_getAllKeys.js create mode 100644 node_modules/lodash/_getAllKeysIn.js create mode 100644 node_modules/lodash/_getData.js create mode 100644 node_modules/lodash/_getFuncName.js create mode 100644 node_modules/lodash/_getHolder.js create mode 100644 node_modules/lodash/_getLength.js create mode 100644 node_modules/lodash/_getMapData.js create mode 100644 node_modules/lodash/_getMatchData.js create mode 100644 node_modules/lodash/_getNative.js create mode 100644 node_modules/lodash/_getPrototype.js create mode 100644 node_modules/lodash/_getSymbols.js create mode 100644 node_modules/lodash/_getSymbolsIn.js create mode 100644 node_modules/lodash/_getTag.js create mode 100644 node_modules/lodash/_getView.js create mode 100644 node_modules/lodash/_hasPath.js create mode 100644 node_modules/lodash/_hashClear.js create mode 100644 node_modules/lodash/_hashDelete.js create mode 100644 node_modules/lodash/_hashGet.js create mode 100644 node_modules/lodash/_hashHas.js create mode 100644 node_modules/lodash/_hashSet.js create mode 100644 node_modules/lodash/_indexKeys.js create mode 100644 node_modules/lodash/_indexOfNaN.js create mode 100644 node_modules/lodash/_initCloneArray.js create mode 100644 node_modules/lodash/_initCloneByTag.js create mode 100644 node_modules/lodash/_initCloneObject.js create mode 100644 node_modules/lodash/_isFlattenable.js create mode 100644 node_modules/lodash/_isFlattenableIteratee.js create mode 100644 node_modules/lodash/_isHostObject.js create mode 100644 node_modules/lodash/_isIndex.js create mode 100644 node_modules/lodash/_isIterateeCall.js create mode 100644 node_modules/lodash/_isKey.js create mode 100644 node_modules/lodash/_isKeyable.js create mode 100644 node_modules/lodash/_isLaziable.js create mode 100644 node_modules/lodash/_isPrototype.js create mode 100644 node_modules/lodash/_isStrictComparable.js create mode 100644 node_modules/lodash/_iteratorToArray.js create mode 100644 node_modules/lodash/_lazyClone.js create mode 100644 node_modules/lodash/_lazyReverse.js create mode 100644 node_modules/lodash/_lazyValue.js create mode 100644 node_modules/lodash/_listCacheClear.js create mode 100644 node_modules/lodash/_listCacheDelete.js create mode 100644 node_modules/lodash/_listCacheGet.js create mode 100644 node_modules/lodash/_listCacheHas.js create mode 100644 node_modules/lodash/_listCacheSet.js create mode 100644 node_modules/lodash/_mapCacheClear.js create mode 100644 node_modules/lodash/_mapCacheDelete.js create mode 100644 node_modules/lodash/_mapCacheGet.js create mode 100644 node_modules/lodash/_mapCacheHas.js create mode 100644 node_modules/lodash/_mapCacheSet.js create mode 100644 node_modules/lodash/_mapToArray.js create mode 100644 node_modules/lodash/_matchesStrictComparable.js create mode 100644 node_modules/lodash/_mergeData.js create mode 100644 node_modules/lodash/_mergeDefaults.js create mode 100644 node_modules/lodash/_metaMap.js create mode 100644 node_modules/lodash/_nativeCreate.js create mode 100644 node_modules/lodash/_parent.js create mode 100644 node_modules/lodash/_reEscape.js create mode 100644 node_modules/lodash/_reEvaluate.js create mode 100644 node_modules/lodash/_reHasComplexSymbol.js create mode 100644 node_modules/lodash/_reInterpolate.js create mode 100644 node_modules/lodash/_realNames.js create mode 100644 node_modules/lodash/_reorder.js create mode 100644 node_modules/lodash/_replaceHolders.js create mode 100644 node_modules/lodash/_root.js create mode 100644 node_modules/lodash/_setCacheAdd.js create mode 100644 node_modules/lodash/_setCacheHas.js create mode 100644 node_modules/lodash/_setData.js create mode 100644 node_modules/lodash/_setToArray.js create mode 100644 node_modules/lodash/_setToPairs.js create mode 100644 node_modules/lodash/_stackClear.js create mode 100644 node_modules/lodash/_stackDelete.js create mode 100644 node_modules/lodash/_stackGet.js create mode 100644 node_modules/lodash/_stackHas.js create mode 100644 node_modules/lodash/_stackSet.js create mode 100644 node_modules/lodash/_stringSize.js create mode 100644 node_modules/lodash/_stringToArray.js create mode 100644 node_modules/lodash/_stringToPath.js create mode 100644 node_modules/lodash/_toKey.js create mode 100644 node_modules/lodash/_toSource.js create mode 100644 node_modules/lodash/_unescapeHtmlChar.js create mode 100644 node_modules/lodash/_wrapperClone.js create mode 100644 node_modules/lodash/add.js create mode 100644 node_modules/lodash/after.js create mode 100644 node_modules/lodash/array.js create mode 100644 node_modules/lodash/ary.js create mode 100644 node_modules/lodash/assign.js create mode 100644 node_modules/lodash/assignIn.js create mode 100644 node_modules/lodash/assignInWith.js create mode 100644 node_modules/lodash/assignWith.js create mode 100644 node_modules/lodash/at.js create mode 100644 node_modules/lodash/attempt.js create mode 100644 node_modules/lodash/before.js create mode 100644 node_modules/lodash/bind.js create mode 100644 node_modules/lodash/bindAll.js create mode 100644 node_modules/lodash/bindKey.js create mode 100644 node_modules/lodash/camelCase.js create mode 100644 node_modules/lodash/capitalize.js create mode 100644 node_modules/lodash/castArray.js create mode 100644 node_modules/lodash/ceil.js create mode 100644 node_modules/lodash/chain.js create mode 100644 node_modules/lodash/chunk.js create mode 100644 node_modules/lodash/clamp.js create mode 100644 node_modules/lodash/clone.js create mode 100644 node_modules/lodash/cloneDeep.js create mode 100644 node_modules/lodash/cloneDeepWith.js create mode 100644 node_modules/lodash/cloneWith.js create mode 100644 node_modules/lodash/collection.js create mode 100644 node_modules/lodash/commit.js create mode 100644 node_modules/lodash/compact.js create mode 100644 node_modules/lodash/concat.js create mode 100644 node_modules/lodash/cond.js create mode 100644 node_modules/lodash/conforms.js create mode 100644 node_modules/lodash/constant.js create mode 100644 node_modules/lodash/core.js create mode 100644 node_modules/lodash/core.min.js create mode 100644 node_modules/lodash/countBy.js create mode 100644 node_modules/lodash/create.js create mode 100644 node_modules/lodash/curry.js create mode 100644 node_modules/lodash/curryRight.js create mode 100644 node_modules/lodash/date.js create mode 100644 node_modules/lodash/debounce.js create mode 100644 node_modules/lodash/deburr.js create mode 100644 node_modules/lodash/defaults.js create mode 100644 node_modules/lodash/defaultsDeep.js create mode 100644 node_modules/lodash/defer.js create mode 100644 node_modules/lodash/delay.js create mode 100644 node_modules/lodash/difference.js create mode 100644 node_modules/lodash/differenceBy.js create mode 100644 node_modules/lodash/differenceWith.js create mode 100644 node_modules/lodash/divide.js create mode 100644 node_modules/lodash/drop.js create mode 100644 node_modules/lodash/dropRight.js create mode 100644 node_modules/lodash/dropRightWhile.js create mode 100644 node_modules/lodash/dropWhile.js create mode 100644 node_modules/lodash/each.js create mode 100644 node_modules/lodash/eachRight.js create mode 100644 node_modules/lodash/endsWith.js create mode 100644 node_modules/lodash/entries.js create mode 100644 node_modules/lodash/entriesIn.js create mode 100644 node_modules/lodash/eq.js create mode 100644 node_modules/lodash/escape.js create mode 100644 node_modules/lodash/escapeRegExp.js create mode 100644 node_modules/lodash/every.js create mode 100644 node_modules/lodash/extend.js create mode 100644 node_modules/lodash/extendWith.js create mode 100644 node_modules/lodash/fill.js create mode 100644 node_modules/lodash/filter.js create mode 100644 node_modules/lodash/find.js create mode 100644 node_modules/lodash/findIndex.js create mode 100644 node_modules/lodash/findKey.js create mode 100644 node_modules/lodash/findLast.js create mode 100644 node_modules/lodash/findLastIndex.js create mode 100644 node_modules/lodash/findLastKey.js create mode 100644 node_modules/lodash/first.js create mode 100644 node_modules/lodash/flatMap.js create mode 100644 node_modules/lodash/flatMapDeep.js create mode 100644 node_modules/lodash/flatMapDepth.js create mode 100644 node_modules/lodash/flatten.js create mode 100644 node_modules/lodash/flattenDeep.js create mode 100644 node_modules/lodash/flattenDepth.js create mode 100644 node_modules/lodash/flip.js create mode 100644 node_modules/lodash/floor.js create mode 100644 node_modules/lodash/flow.js create mode 100644 node_modules/lodash/flowRight.js create mode 100644 node_modules/lodash/forEach.js create mode 100644 node_modules/lodash/forEachRight.js create mode 100644 node_modules/lodash/forIn.js create mode 100644 node_modules/lodash/forInRight.js create mode 100644 node_modules/lodash/forOwn.js create mode 100644 node_modules/lodash/forOwnRight.js create mode 100644 node_modules/lodash/fp.js create mode 100644 node_modules/lodash/fp/__.js create mode 100644 node_modules/lodash/fp/_baseConvert.js create mode 100644 node_modules/lodash/fp/_convertBrowser.js create mode 100644 node_modules/lodash/fp/_falseOptions.js create mode 100644 node_modules/lodash/fp/_mapping.js create mode 100644 node_modules/lodash/fp/_util.js create mode 100644 node_modules/lodash/fp/add.js create mode 100644 node_modules/lodash/fp/after.js create mode 100644 node_modules/lodash/fp/all.js create mode 100644 node_modules/lodash/fp/allPass.js create mode 100644 node_modules/lodash/fp/always.js create mode 100644 node_modules/lodash/fp/any.js create mode 100644 node_modules/lodash/fp/anyPass.js create mode 100644 node_modules/lodash/fp/apply.js create mode 100644 node_modules/lodash/fp/array.js create mode 100644 node_modules/lodash/fp/ary.js create mode 100644 node_modules/lodash/fp/assign.js create mode 100644 node_modules/lodash/fp/assignIn.js create mode 100644 node_modules/lodash/fp/assignInWith.js create mode 100644 node_modules/lodash/fp/assignWith.js create mode 100644 node_modules/lodash/fp/assoc.js create mode 100644 node_modules/lodash/fp/assocPath.js create mode 100644 node_modules/lodash/fp/at.js create mode 100644 node_modules/lodash/fp/attempt.js create mode 100644 node_modules/lodash/fp/before.js create mode 100644 node_modules/lodash/fp/bind.js create mode 100644 node_modules/lodash/fp/bindAll.js create mode 100644 node_modules/lodash/fp/bindKey.js create mode 100644 node_modules/lodash/fp/camelCase.js create mode 100644 node_modules/lodash/fp/capitalize.js create mode 100644 node_modules/lodash/fp/castArray.js create mode 100644 node_modules/lodash/fp/ceil.js create mode 100644 node_modules/lodash/fp/chain.js create mode 100644 node_modules/lodash/fp/chunk.js create mode 100644 node_modules/lodash/fp/clamp.js create mode 100644 node_modules/lodash/fp/clone.js create mode 100644 node_modules/lodash/fp/cloneDeep.js create mode 100644 node_modules/lodash/fp/cloneDeepWith.js create mode 100644 node_modules/lodash/fp/cloneWith.js create mode 100644 node_modules/lodash/fp/collection.js create mode 100644 node_modules/lodash/fp/commit.js create mode 100644 node_modules/lodash/fp/compact.js create mode 100644 node_modules/lodash/fp/complement.js create mode 100644 node_modules/lodash/fp/compose.js create mode 100644 node_modules/lodash/fp/concat.js create mode 100644 node_modules/lodash/fp/cond.js create mode 100644 node_modules/lodash/fp/conforms.js create mode 100644 node_modules/lodash/fp/constant.js create mode 100644 node_modules/lodash/fp/contains.js create mode 100644 node_modules/lodash/fp/convert.js create mode 100644 node_modules/lodash/fp/countBy.js create mode 100644 node_modules/lodash/fp/create.js create mode 100644 node_modules/lodash/fp/curry.js create mode 100644 node_modules/lodash/fp/curryN.js create mode 100644 node_modules/lodash/fp/curryRight.js create mode 100644 node_modules/lodash/fp/curryRightN.js create mode 100644 node_modules/lodash/fp/date.js create mode 100644 node_modules/lodash/fp/debounce.js create mode 100644 node_modules/lodash/fp/deburr.js create mode 100644 node_modules/lodash/fp/defaults.js create mode 100644 node_modules/lodash/fp/defaultsDeep.js create mode 100644 node_modules/lodash/fp/defer.js create mode 100644 node_modules/lodash/fp/delay.js create mode 100644 node_modules/lodash/fp/difference.js create mode 100644 node_modules/lodash/fp/differenceBy.js create mode 100644 node_modules/lodash/fp/differenceWith.js create mode 100644 node_modules/lodash/fp/dissoc.js create mode 100644 node_modules/lodash/fp/dissocPath.js create mode 100644 node_modules/lodash/fp/divide.js create mode 100644 node_modules/lodash/fp/drop.js create mode 100644 node_modules/lodash/fp/dropRight.js create mode 100644 node_modules/lodash/fp/dropRightWhile.js create mode 100644 node_modules/lodash/fp/dropWhile.js create mode 100644 node_modules/lodash/fp/each.js create mode 100644 node_modules/lodash/fp/eachRight.js create mode 100644 node_modules/lodash/fp/endsWith.js create mode 100644 node_modules/lodash/fp/entries.js create mode 100644 node_modules/lodash/fp/entriesIn.js create mode 100644 node_modules/lodash/fp/eq.js create mode 100644 node_modules/lodash/fp/equals.js create mode 100644 node_modules/lodash/fp/escape.js create mode 100644 node_modules/lodash/fp/escapeRegExp.js create mode 100644 node_modules/lodash/fp/every.js create mode 100644 node_modules/lodash/fp/extend.js create mode 100644 node_modules/lodash/fp/extendWith.js create mode 100644 node_modules/lodash/fp/fill.js create mode 100644 node_modules/lodash/fp/filter.js create mode 100644 node_modules/lodash/fp/find.js create mode 100644 node_modules/lodash/fp/findIndex.js create mode 100644 node_modules/lodash/fp/findKey.js create mode 100644 node_modules/lodash/fp/findLast.js create mode 100644 node_modules/lodash/fp/findLastIndex.js create mode 100644 node_modules/lodash/fp/findLastKey.js create mode 100644 node_modules/lodash/fp/first.js create mode 100644 node_modules/lodash/fp/flatMap.js create mode 100644 node_modules/lodash/fp/flatMapDeep.js create mode 100644 node_modules/lodash/fp/flatMapDepth.js create mode 100644 node_modules/lodash/fp/flatten.js create mode 100644 node_modules/lodash/fp/flattenDeep.js create mode 100644 node_modules/lodash/fp/flattenDepth.js create mode 100644 node_modules/lodash/fp/flip.js create mode 100644 node_modules/lodash/fp/floor.js create mode 100644 node_modules/lodash/fp/flow.js create mode 100644 node_modules/lodash/fp/flowRight.js create mode 100644 node_modules/lodash/fp/forEach.js create mode 100644 node_modules/lodash/fp/forEachRight.js create mode 100644 node_modules/lodash/fp/forIn.js create mode 100644 node_modules/lodash/fp/forInRight.js create mode 100644 node_modules/lodash/fp/forOwn.js create mode 100644 node_modules/lodash/fp/forOwnRight.js create mode 100644 node_modules/lodash/fp/fromPairs.js create mode 100644 node_modules/lodash/fp/function.js create mode 100644 node_modules/lodash/fp/functions.js create mode 100644 node_modules/lodash/fp/functionsIn.js create mode 100644 node_modules/lodash/fp/get.js create mode 100644 node_modules/lodash/fp/getOr.js create mode 100644 node_modules/lodash/fp/groupBy.js create mode 100644 node_modules/lodash/fp/gt.js create mode 100644 node_modules/lodash/fp/gte.js create mode 100644 node_modules/lodash/fp/has.js create mode 100644 node_modules/lodash/fp/hasIn.js create mode 100644 node_modules/lodash/fp/head.js create mode 100644 node_modules/lodash/fp/identical.js create mode 100644 node_modules/lodash/fp/identity.js create mode 100644 node_modules/lodash/fp/inRange.js create mode 100644 node_modules/lodash/fp/includes.js create mode 100644 node_modules/lodash/fp/indexOf.js create mode 100644 node_modules/lodash/fp/init.js create mode 100644 node_modules/lodash/fp/initial.js create mode 100644 node_modules/lodash/fp/intersection.js create mode 100644 node_modules/lodash/fp/intersectionBy.js create mode 100644 node_modules/lodash/fp/intersectionWith.js create mode 100644 node_modules/lodash/fp/invert.js create mode 100644 node_modules/lodash/fp/invertBy.js create mode 100644 node_modules/lodash/fp/invertObj.js create mode 100644 node_modules/lodash/fp/invoke.js create mode 100644 node_modules/lodash/fp/invokeArgs.js create mode 100644 node_modules/lodash/fp/invokeArgsMap.js create mode 100644 node_modules/lodash/fp/invokeMap.js create mode 100644 node_modules/lodash/fp/isArguments.js create mode 100644 node_modules/lodash/fp/isArray.js create mode 100644 node_modules/lodash/fp/isArrayBuffer.js create mode 100644 node_modules/lodash/fp/isArrayLike.js create mode 100644 node_modules/lodash/fp/isArrayLikeObject.js create mode 100644 node_modules/lodash/fp/isBoolean.js create mode 100644 node_modules/lodash/fp/isBuffer.js create mode 100644 node_modules/lodash/fp/isDate.js create mode 100644 node_modules/lodash/fp/isElement.js create mode 100644 node_modules/lodash/fp/isEmpty.js create mode 100644 node_modules/lodash/fp/isEqual.js create mode 100644 node_modules/lodash/fp/isEqualWith.js create mode 100644 node_modules/lodash/fp/isError.js create mode 100644 node_modules/lodash/fp/isFinite.js create mode 100644 node_modules/lodash/fp/isFunction.js create mode 100644 node_modules/lodash/fp/isInteger.js create mode 100644 node_modules/lodash/fp/isLength.js create mode 100644 node_modules/lodash/fp/isMap.js create mode 100644 node_modules/lodash/fp/isMatch.js create mode 100644 node_modules/lodash/fp/isMatchWith.js create mode 100644 node_modules/lodash/fp/isNaN.js create mode 100644 node_modules/lodash/fp/isNative.js create mode 100644 node_modules/lodash/fp/isNil.js create mode 100644 node_modules/lodash/fp/isNull.js create mode 100644 node_modules/lodash/fp/isNumber.js create mode 100644 node_modules/lodash/fp/isObject.js create mode 100644 node_modules/lodash/fp/isObjectLike.js create mode 100644 node_modules/lodash/fp/isPlainObject.js create mode 100644 node_modules/lodash/fp/isRegExp.js create mode 100644 node_modules/lodash/fp/isSafeInteger.js create mode 100644 node_modules/lodash/fp/isSet.js create mode 100644 node_modules/lodash/fp/isString.js create mode 100644 node_modules/lodash/fp/isSymbol.js create mode 100644 node_modules/lodash/fp/isTypedArray.js create mode 100644 node_modules/lodash/fp/isUndefined.js create mode 100644 node_modules/lodash/fp/isWeakMap.js create mode 100644 node_modules/lodash/fp/isWeakSet.js create mode 100644 node_modules/lodash/fp/iteratee.js create mode 100644 node_modules/lodash/fp/join.js create mode 100644 node_modules/lodash/fp/juxt.js create mode 100644 node_modules/lodash/fp/kebabCase.js create mode 100644 node_modules/lodash/fp/keyBy.js create mode 100644 node_modules/lodash/fp/keys.js create mode 100644 node_modules/lodash/fp/keysIn.js create mode 100644 node_modules/lodash/fp/lang.js create mode 100644 node_modules/lodash/fp/last.js create mode 100644 node_modules/lodash/fp/lastIndexOf.js create mode 100644 node_modules/lodash/fp/lowerCase.js create mode 100644 node_modules/lodash/fp/lowerFirst.js create mode 100644 node_modules/lodash/fp/lt.js create mode 100644 node_modules/lodash/fp/lte.js create mode 100644 node_modules/lodash/fp/map.js create mode 100644 node_modules/lodash/fp/mapKeys.js create mode 100644 node_modules/lodash/fp/mapValues.js create mode 100644 node_modules/lodash/fp/matches.js create mode 100644 node_modules/lodash/fp/matchesProperty.js create mode 100644 node_modules/lodash/fp/math.js create mode 100644 node_modules/lodash/fp/max.js create mode 100644 node_modules/lodash/fp/maxBy.js create mode 100644 node_modules/lodash/fp/mean.js create mode 100644 node_modules/lodash/fp/meanBy.js create mode 100644 node_modules/lodash/fp/memoize.js create mode 100644 node_modules/lodash/fp/merge.js create mode 100644 node_modules/lodash/fp/mergeWith.js create mode 100644 node_modules/lodash/fp/method.js create mode 100644 node_modules/lodash/fp/methodOf.js create mode 100644 node_modules/lodash/fp/min.js create mode 100644 node_modules/lodash/fp/minBy.js create mode 100644 node_modules/lodash/fp/mixin.js create mode 100644 node_modules/lodash/fp/multiply.js create mode 100644 node_modules/lodash/fp/nAry.js create mode 100644 node_modules/lodash/fp/negate.js create mode 100644 node_modules/lodash/fp/next.js create mode 100644 node_modules/lodash/fp/noop.js create mode 100644 node_modules/lodash/fp/now.js create mode 100644 node_modules/lodash/fp/nth.js create mode 100644 node_modules/lodash/fp/nthArg.js create mode 100644 node_modules/lodash/fp/number.js create mode 100644 node_modules/lodash/fp/object.js create mode 100644 node_modules/lodash/fp/omit.js create mode 100644 node_modules/lodash/fp/omitAll.js create mode 100644 node_modules/lodash/fp/omitBy.js create mode 100644 node_modules/lodash/fp/once.js create mode 100644 node_modules/lodash/fp/orderBy.js create mode 100644 node_modules/lodash/fp/over.js create mode 100644 node_modules/lodash/fp/overArgs.js create mode 100644 node_modules/lodash/fp/overEvery.js create mode 100644 node_modules/lodash/fp/overSome.js create mode 100644 node_modules/lodash/fp/pad.js create mode 100644 node_modules/lodash/fp/padChars.js create mode 100644 node_modules/lodash/fp/padCharsEnd.js create mode 100644 node_modules/lodash/fp/padCharsStart.js create mode 100644 node_modules/lodash/fp/padEnd.js create mode 100644 node_modules/lodash/fp/padStart.js create mode 100644 node_modules/lodash/fp/parseInt.js create mode 100644 node_modules/lodash/fp/partial.js create mode 100644 node_modules/lodash/fp/partialRight.js create mode 100644 node_modules/lodash/fp/partition.js create mode 100644 node_modules/lodash/fp/path.js create mode 100644 node_modules/lodash/fp/pathEq.js create mode 100644 node_modules/lodash/fp/pathOr.js create mode 100644 node_modules/lodash/fp/paths.js create mode 100644 node_modules/lodash/fp/pick.js create mode 100644 node_modules/lodash/fp/pickAll.js create mode 100644 node_modules/lodash/fp/pickBy.js create mode 100644 node_modules/lodash/fp/pipe.js create mode 100644 node_modules/lodash/fp/placeholder.js create mode 100644 node_modules/lodash/fp/plant.js create mode 100644 node_modules/lodash/fp/pluck.js create mode 100644 node_modules/lodash/fp/prop.js create mode 100644 node_modules/lodash/fp/propEq.js create mode 100644 node_modules/lodash/fp/propOr.js create mode 100644 node_modules/lodash/fp/property.js create mode 100644 node_modules/lodash/fp/propertyOf.js create mode 100644 node_modules/lodash/fp/props.js create mode 100644 node_modules/lodash/fp/pull.js create mode 100644 node_modules/lodash/fp/pullAll.js create mode 100644 node_modules/lodash/fp/pullAllBy.js create mode 100644 node_modules/lodash/fp/pullAllWith.js create mode 100644 node_modules/lodash/fp/pullAt.js create mode 100644 node_modules/lodash/fp/random.js create mode 100644 node_modules/lodash/fp/range.js create mode 100644 node_modules/lodash/fp/rangeRight.js create mode 100644 node_modules/lodash/fp/rearg.js create mode 100644 node_modules/lodash/fp/reduce.js create mode 100644 node_modules/lodash/fp/reduceRight.js create mode 100644 node_modules/lodash/fp/reject.js create mode 100644 node_modules/lodash/fp/remove.js create mode 100644 node_modules/lodash/fp/repeat.js create mode 100644 node_modules/lodash/fp/replace.js create mode 100644 node_modules/lodash/fp/rest.js create mode 100644 node_modules/lodash/fp/restFrom.js create mode 100644 node_modules/lodash/fp/result.js create mode 100644 node_modules/lodash/fp/reverse.js create mode 100644 node_modules/lodash/fp/round.js create mode 100644 node_modules/lodash/fp/sample.js create mode 100644 node_modules/lodash/fp/sampleSize.js create mode 100644 node_modules/lodash/fp/seq.js create mode 100644 node_modules/lodash/fp/set.js create mode 100644 node_modules/lodash/fp/setWith.js create mode 100644 node_modules/lodash/fp/shuffle.js create mode 100644 node_modules/lodash/fp/size.js create mode 100644 node_modules/lodash/fp/slice.js create mode 100644 node_modules/lodash/fp/snakeCase.js create mode 100644 node_modules/lodash/fp/some.js create mode 100644 node_modules/lodash/fp/sortBy.js create mode 100644 node_modules/lodash/fp/sortedIndex.js create mode 100644 node_modules/lodash/fp/sortedIndexBy.js create mode 100644 node_modules/lodash/fp/sortedIndexOf.js create mode 100644 node_modules/lodash/fp/sortedLastIndex.js create mode 100644 node_modules/lodash/fp/sortedLastIndexBy.js create mode 100644 node_modules/lodash/fp/sortedLastIndexOf.js create mode 100644 node_modules/lodash/fp/sortedUniq.js create mode 100644 node_modules/lodash/fp/sortedUniqBy.js create mode 100644 node_modules/lodash/fp/split.js create mode 100644 node_modules/lodash/fp/spread.js create mode 100644 node_modules/lodash/fp/spreadFrom.js create mode 100644 node_modules/lodash/fp/startCase.js create mode 100644 node_modules/lodash/fp/startsWith.js create mode 100644 node_modules/lodash/fp/string.js create mode 100644 node_modules/lodash/fp/subtract.js create mode 100644 node_modules/lodash/fp/sum.js create mode 100644 node_modules/lodash/fp/sumBy.js create mode 100644 node_modules/lodash/fp/tail.js create mode 100644 node_modules/lodash/fp/take.js create mode 100644 node_modules/lodash/fp/takeRight.js create mode 100644 node_modules/lodash/fp/takeRightWhile.js create mode 100644 node_modules/lodash/fp/takeWhile.js create mode 100644 node_modules/lodash/fp/tap.js create mode 100644 node_modules/lodash/fp/template.js create mode 100644 node_modules/lodash/fp/templateSettings.js create mode 100644 node_modules/lodash/fp/throttle.js create mode 100644 node_modules/lodash/fp/thru.js create mode 100644 node_modules/lodash/fp/times.js create mode 100644 node_modules/lodash/fp/toArray.js create mode 100644 node_modules/lodash/fp/toFinite.js create mode 100644 node_modules/lodash/fp/toInteger.js create mode 100644 node_modules/lodash/fp/toIterator.js create mode 100644 node_modules/lodash/fp/toJSON.js create mode 100644 node_modules/lodash/fp/toLength.js create mode 100644 node_modules/lodash/fp/toLower.js create mode 100644 node_modules/lodash/fp/toNumber.js create mode 100644 node_modules/lodash/fp/toPairs.js create mode 100644 node_modules/lodash/fp/toPairsIn.js create mode 100644 node_modules/lodash/fp/toPath.js create mode 100644 node_modules/lodash/fp/toPlainObject.js create mode 100644 node_modules/lodash/fp/toSafeInteger.js create mode 100644 node_modules/lodash/fp/toString.js create mode 100644 node_modules/lodash/fp/toUpper.js create mode 100644 node_modules/lodash/fp/transform.js create mode 100644 node_modules/lodash/fp/trim.js create mode 100644 node_modules/lodash/fp/trimChars.js create mode 100644 node_modules/lodash/fp/trimCharsEnd.js create mode 100644 node_modules/lodash/fp/trimCharsStart.js create mode 100644 node_modules/lodash/fp/trimEnd.js create mode 100644 node_modules/lodash/fp/trimStart.js create mode 100644 node_modules/lodash/fp/truncate.js create mode 100644 node_modules/lodash/fp/unapply.js create mode 100644 node_modules/lodash/fp/unary.js create mode 100644 node_modules/lodash/fp/unescape.js create mode 100644 node_modules/lodash/fp/union.js create mode 100644 node_modules/lodash/fp/unionBy.js create mode 100644 node_modules/lodash/fp/unionWith.js create mode 100644 node_modules/lodash/fp/uniq.js create mode 100644 node_modules/lodash/fp/uniqBy.js create mode 100644 node_modules/lodash/fp/uniqWith.js create mode 100644 node_modules/lodash/fp/uniqueId.js create mode 100644 node_modules/lodash/fp/unnest.js create mode 100644 node_modules/lodash/fp/unset.js create mode 100644 node_modules/lodash/fp/unzip.js create mode 100644 node_modules/lodash/fp/unzipWith.js create mode 100644 node_modules/lodash/fp/update.js create mode 100644 node_modules/lodash/fp/updateWith.js create mode 100644 node_modules/lodash/fp/upperCase.js create mode 100644 node_modules/lodash/fp/upperFirst.js create mode 100644 node_modules/lodash/fp/useWith.js create mode 100644 node_modules/lodash/fp/util.js create mode 100644 node_modules/lodash/fp/value.js create mode 100644 node_modules/lodash/fp/valueOf.js create mode 100644 node_modules/lodash/fp/values.js create mode 100644 node_modules/lodash/fp/valuesIn.js create mode 100644 node_modules/lodash/fp/whereEq.js create mode 100644 node_modules/lodash/fp/without.js create mode 100644 node_modules/lodash/fp/words.js create mode 100644 node_modules/lodash/fp/wrap.js create mode 100644 node_modules/lodash/fp/wrapperAt.js create mode 100644 node_modules/lodash/fp/wrapperChain.js create mode 100644 node_modules/lodash/fp/wrapperLodash.js create mode 100644 node_modules/lodash/fp/wrapperReverse.js create mode 100644 node_modules/lodash/fp/wrapperValue.js create mode 100644 node_modules/lodash/fp/xor.js create mode 100644 node_modules/lodash/fp/xorBy.js create mode 100644 node_modules/lodash/fp/xorWith.js create mode 100644 node_modules/lodash/fp/zip.js create mode 100644 node_modules/lodash/fp/zipObj.js create mode 100644 node_modules/lodash/fp/zipObject.js create mode 100644 node_modules/lodash/fp/zipObjectDeep.js create mode 100644 node_modules/lodash/fp/zipWith.js create mode 100644 node_modules/lodash/fromPairs.js create mode 100644 node_modules/lodash/function.js create mode 100644 node_modules/lodash/functions.js create mode 100644 node_modules/lodash/functionsIn.js create mode 100644 node_modules/lodash/get.js create mode 100644 node_modules/lodash/groupBy.js create mode 100644 node_modules/lodash/gt.js create mode 100644 node_modules/lodash/gte.js create mode 100644 node_modules/lodash/has.js create mode 100644 node_modules/lodash/hasIn.js create mode 100644 node_modules/lodash/head.js create mode 100644 node_modules/lodash/identity.js create mode 100644 node_modules/lodash/inRange.js create mode 100644 node_modules/lodash/includes.js create mode 100644 node_modules/lodash/index.js create mode 100644 node_modules/lodash/indexOf.js create mode 100644 node_modules/lodash/initial.js create mode 100644 node_modules/lodash/intersection.js create mode 100644 node_modules/lodash/intersectionBy.js create mode 100644 node_modules/lodash/intersectionWith.js create mode 100644 node_modules/lodash/invert.js create mode 100644 node_modules/lodash/invertBy.js create mode 100644 node_modules/lodash/invoke.js create mode 100644 node_modules/lodash/invokeMap.js create mode 100644 node_modules/lodash/isArguments.js create mode 100644 node_modules/lodash/isArray.js create mode 100644 node_modules/lodash/isArrayBuffer.js create mode 100644 node_modules/lodash/isArrayLike.js create mode 100644 node_modules/lodash/isArrayLikeObject.js create mode 100644 node_modules/lodash/isBoolean.js create mode 100644 node_modules/lodash/isBuffer.js create mode 100644 node_modules/lodash/isDate.js create mode 100644 node_modules/lodash/isElement.js create mode 100644 node_modules/lodash/isEmpty.js create mode 100644 node_modules/lodash/isEqual.js create mode 100644 node_modules/lodash/isEqualWith.js create mode 100644 node_modules/lodash/isError.js create mode 100644 node_modules/lodash/isFinite.js create mode 100644 node_modules/lodash/isFunction.js create mode 100644 node_modules/lodash/isInteger.js create mode 100644 node_modules/lodash/isLength.js create mode 100644 node_modules/lodash/isMap.js create mode 100644 node_modules/lodash/isMatch.js create mode 100644 node_modules/lodash/isMatchWith.js create mode 100644 node_modules/lodash/isNaN.js create mode 100644 node_modules/lodash/isNative.js create mode 100644 node_modules/lodash/isNil.js create mode 100644 node_modules/lodash/isNull.js create mode 100644 node_modules/lodash/isNumber.js create mode 100644 node_modules/lodash/isObject.js create mode 100644 node_modules/lodash/isObjectLike.js create mode 100644 node_modules/lodash/isPlainObject.js create mode 100644 node_modules/lodash/isRegExp.js create mode 100644 node_modules/lodash/isSafeInteger.js create mode 100644 node_modules/lodash/isSet.js create mode 100644 node_modules/lodash/isString.js create mode 100644 node_modules/lodash/isSymbol.js create mode 100644 node_modules/lodash/isTypedArray.js create mode 100644 node_modules/lodash/isUndefined.js create mode 100644 node_modules/lodash/isWeakMap.js create mode 100644 node_modules/lodash/isWeakSet.js create mode 100644 node_modules/lodash/iteratee.js create mode 100644 node_modules/lodash/join.js create mode 100644 node_modules/lodash/kebabCase.js create mode 100644 node_modules/lodash/keyBy.js create mode 100644 node_modules/lodash/keys.js create mode 100644 node_modules/lodash/keysIn.js create mode 100644 node_modules/lodash/lang.js create mode 100644 node_modules/lodash/last.js create mode 100644 node_modules/lodash/lastIndexOf.js create mode 100644 node_modules/lodash/lodash.js create mode 100644 node_modules/lodash/lodash.min.js create mode 100644 node_modules/lodash/lowerCase.js create mode 100644 node_modules/lodash/lowerFirst.js create mode 100644 node_modules/lodash/lt.js create mode 100644 node_modules/lodash/lte.js create mode 100644 node_modules/lodash/map.js create mode 100644 node_modules/lodash/mapKeys.js create mode 100644 node_modules/lodash/mapValues.js create mode 100644 node_modules/lodash/matches.js create mode 100644 node_modules/lodash/matchesProperty.js create mode 100644 node_modules/lodash/math.js create mode 100644 node_modules/lodash/max.js create mode 100644 node_modules/lodash/maxBy.js create mode 100644 node_modules/lodash/mean.js create mode 100644 node_modules/lodash/meanBy.js create mode 100644 node_modules/lodash/memoize.js create mode 100644 node_modules/lodash/merge.js create mode 100644 node_modules/lodash/mergeWith.js create mode 100644 node_modules/lodash/method.js create mode 100644 node_modules/lodash/methodOf.js create mode 100644 node_modules/lodash/min.js create mode 100644 node_modules/lodash/minBy.js create mode 100644 node_modules/lodash/mixin.js create mode 100644 node_modules/lodash/multiply.js create mode 100644 node_modules/lodash/negate.js create mode 100644 node_modules/lodash/next.js create mode 100644 node_modules/lodash/noop.js create mode 100644 node_modules/lodash/now.js create mode 100644 node_modules/lodash/nth.js create mode 100644 node_modules/lodash/nthArg.js create mode 100644 node_modules/lodash/number.js create mode 100644 node_modules/lodash/object.js create mode 100644 node_modules/lodash/omit.js create mode 100644 node_modules/lodash/omitBy.js create mode 100644 node_modules/lodash/once.js create mode 100644 node_modules/lodash/orderBy.js create mode 100644 node_modules/lodash/over.js create mode 100644 node_modules/lodash/overArgs.js create mode 100644 node_modules/lodash/overEvery.js create mode 100644 node_modules/lodash/overSome.js create mode 100644 node_modules/lodash/package.json create mode 100644 node_modules/lodash/pad.js create mode 100644 node_modules/lodash/padEnd.js create mode 100644 node_modules/lodash/padStart.js create mode 100644 node_modules/lodash/parseInt.js create mode 100644 node_modules/lodash/partial.js create mode 100644 node_modules/lodash/partialRight.js create mode 100644 node_modules/lodash/partition.js create mode 100644 node_modules/lodash/pick.js create mode 100644 node_modules/lodash/pickBy.js create mode 100644 node_modules/lodash/plant.js create mode 100644 node_modules/lodash/property.js create mode 100644 node_modules/lodash/propertyOf.js create mode 100644 node_modules/lodash/pull.js create mode 100644 node_modules/lodash/pullAll.js create mode 100644 node_modules/lodash/pullAllBy.js create mode 100644 node_modules/lodash/pullAllWith.js create mode 100644 node_modules/lodash/pullAt.js create mode 100644 node_modules/lodash/random.js create mode 100644 node_modules/lodash/range.js create mode 100644 node_modules/lodash/rangeRight.js create mode 100644 node_modules/lodash/rearg.js create mode 100644 node_modules/lodash/reduce.js create mode 100644 node_modules/lodash/reduceRight.js create mode 100644 node_modules/lodash/reject.js create mode 100644 node_modules/lodash/remove.js create mode 100644 node_modules/lodash/repeat.js create mode 100644 node_modules/lodash/replace.js create mode 100644 node_modules/lodash/rest.js create mode 100644 node_modules/lodash/result.js create mode 100644 node_modules/lodash/reverse.js create mode 100644 node_modules/lodash/round.js create mode 100644 node_modules/lodash/sample.js create mode 100644 node_modules/lodash/sampleSize.js create mode 100644 node_modules/lodash/seq.js create mode 100644 node_modules/lodash/set.js create mode 100644 node_modules/lodash/setWith.js create mode 100644 node_modules/lodash/shuffle.js create mode 100644 node_modules/lodash/size.js create mode 100644 node_modules/lodash/slice.js create mode 100644 node_modules/lodash/snakeCase.js create mode 100644 node_modules/lodash/some.js create mode 100644 node_modules/lodash/sortBy.js create mode 100644 node_modules/lodash/sortedIndex.js create mode 100644 node_modules/lodash/sortedIndexBy.js create mode 100644 node_modules/lodash/sortedIndexOf.js create mode 100644 node_modules/lodash/sortedLastIndex.js create mode 100644 node_modules/lodash/sortedLastIndexBy.js create mode 100644 node_modules/lodash/sortedLastIndexOf.js create mode 100644 node_modules/lodash/sortedUniq.js create mode 100644 node_modules/lodash/sortedUniqBy.js create mode 100644 node_modules/lodash/split.js create mode 100644 node_modules/lodash/spread.js create mode 100644 node_modules/lodash/startCase.js create mode 100644 node_modules/lodash/startsWith.js create mode 100644 node_modules/lodash/string.js create mode 100644 node_modules/lodash/subtract.js create mode 100644 node_modules/lodash/sum.js create mode 100644 node_modules/lodash/sumBy.js create mode 100644 node_modules/lodash/tail.js create mode 100644 node_modules/lodash/take.js create mode 100644 node_modules/lodash/takeRight.js create mode 100644 node_modules/lodash/takeRightWhile.js create mode 100644 node_modules/lodash/takeWhile.js create mode 100644 node_modules/lodash/tap.js create mode 100644 node_modules/lodash/template.js create mode 100644 node_modules/lodash/templateSettings.js create mode 100644 node_modules/lodash/throttle.js create mode 100644 node_modules/lodash/thru.js create mode 100644 node_modules/lodash/times.js create mode 100644 node_modules/lodash/toArray.js create mode 100644 node_modules/lodash/toFinite.js create mode 100644 node_modules/lodash/toInteger.js create mode 100644 node_modules/lodash/toIterator.js create mode 100644 node_modules/lodash/toJSON.js create mode 100644 node_modules/lodash/toLength.js create mode 100644 node_modules/lodash/toLower.js create mode 100644 node_modules/lodash/toNumber.js create mode 100644 node_modules/lodash/toPairs.js create mode 100644 node_modules/lodash/toPairsIn.js create mode 100644 node_modules/lodash/toPath.js create mode 100644 node_modules/lodash/toPlainObject.js create mode 100644 node_modules/lodash/toSafeInteger.js create mode 100644 node_modules/lodash/toString.js create mode 100644 node_modules/lodash/toUpper.js create mode 100644 node_modules/lodash/transform.js create mode 100644 node_modules/lodash/trim.js create mode 100644 node_modules/lodash/trimEnd.js create mode 100644 node_modules/lodash/trimStart.js create mode 100644 node_modules/lodash/truncate.js create mode 100644 node_modules/lodash/unary.js create mode 100644 node_modules/lodash/unescape.js create mode 100644 node_modules/lodash/union.js create mode 100644 node_modules/lodash/unionBy.js create mode 100644 node_modules/lodash/unionWith.js create mode 100644 node_modules/lodash/uniq.js create mode 100644 node_modules/lodash/uniqBy.js create mode 100644 node_modules/lodash/uniqWith.js create mode 100644 node_modules/lodash/uniqueId.js create mode 100644 node_modules/lodash/unset.js create mode 100644 node_modules/lodash/unzip.js create mode 100644 node_modules/lodash/unzipWith.js create mode 100644 node_modules/lodash/update.js create mode 100644 node_modules/lodash/updateWith.js create mode 100644 node_modules/lodash/upperCase.js create mode 100644 node_modules/lodash/upperFirst.js create mode 100644 node_modules/lodash/util.js create mode 100644 node_modules/lodash/value.js create mode 100644 node_modules/lodash/valueOf.js create mode 100644 node_modules/lodash/values.js create mode 100644 node_modules/lodash/valuesIn.js create mode 100644 node_modules/lodash/without.js create mode 100644 node_modules/lodash/words.js create mode 100644 node_modules/lodash/wrap.js create mode 100644 node_modules/lodash/wrapperAt.js create mode 100644 node_modules/lodash/wrapperChain.js create mode 100644 node_modules/lodash/wrapperLodash.js create mode 100644 node_modules/lodash/wrapperReverse.js create mode 100644 node_modules/lodash/wrapperValue.js create mode 100644 node_modules/lodash/xor.js create mode 100644 node_modules/lodash/xorBy.js create mode 100644 node_modules/lodash/xorWith.js create mode 100644 node_modules/lodash/zip.js create mode 100644 node_modules/lodash/zipObject.js create mode 100644 node_modules/lodash/zipObjectDeep.js create mode 100644 node_modules/lodash/zipWith.js create mode 100644 node_modules/longest/LICENSE create mode 100644 node_modules/longest/README.md create mode 100644 node_modules/longest/index.js create mode 100644 node_modules/longest/package.json create mode 100644 node_modules/lru-cache/LICENSE create mode 100644 node_modules/lru-cache/README.md create mode 100644 node_modules/lru-cache/lib/lru-cache.js create mode 100644 node_modules/lru-cache/package.json create mode 100644 node_modules/lru-queue/.lint create mode 100644 node_modules/lru-queue/.npmignore create mode 100644 node_modules/lru-queue/.travis.yml create mode 100644 node_modules/lru-queue/CHANGES create mode 100644 node_modules/lru-queue/LICENCE create mode 100644 node_modules/lru-queue/README.md create mode 100644 node_modules/lru-queue/index.js create mode 100644 node_modules/lru-queue/package.json create mode 100644 node_modules/lru-queue/test/index.js create mode 100644 node_modules/map-cache/LICENSE create mode 100644 node_modules/map-cache/README.md create mode 100644 node_modules/map-cache/index.js create mode 100644 node_modules/map-cache/package.json create mode 100644 node_modules/media-typer/HISTORY.md create mode 100644 node_modules/media-typer/LICENSE create mode 100644 node_modules/media-typer/README.md create mode 100644 node_modules/media-typer/index.js create mode 100644 node_modules/media-typer/package.json create mode 100644 node_modules/memoizee/.lint create mode 100644 node_modules/memoizee/.npmignore create mode 100644 node_modules/memoizee/.testignore create mode 100644 node_modules/memoizee/.travis.yml create mode 100644 node_modules/memoizee/.vscode/settings.json create mode 100644 node_modules/memoizee/CHANGES create mode 100644 node_modules/memoizee/LICENSE create mode 100644 node_modules/memoizee/README.md create mode 100644 node_modules/memoizee/benchmark/fibonacci.js create mode 100644 node_modules/memoizee/ext/async.js create mode 100644 node_modules/memoizee/ext/dispose.js create mode 100644 node_modules/memoizee/ext/max-age.js create mode 100644 node_modules/memoizee/ext/max.js create mode 100644 node_modules/memoizee/ext/promise.js create mode 100644 node_modules/memoizee/ext/ref-counter.js create mode 100644 node_modules/memoizee/index.js create mode 100644 node_modules/memoizee/lib/configure-map.js create mode 100644 node_modules/memoizee/lib/methods.js create mode 100644 node_modules/memoizee/lib/registered-extensions.js create mode 100644 node_modules/memoizee/lib/resolve-length.js create mode 100644 node_modules/memoizee/lib/resolve-normalize.js create mode 100644 node_modules/memoizee/lib/resolve-resolve.js create mode 100644 node_modules/memoizee/lib/weak.js create mode 100644 node_modules/memoizee/methods-plain.js create mode 100644 node_modules/memoizee/methods.js create mode 100644 node_modules/memoizee/normalizers/get-1.js create mode 100644 node_modules/memoizee/normalizers/get-fixed.js create mode 100644 node_modules/memoizee/normalizers/get-primitive-fixed.js create mode 100644 node_modules/memoizee/normalizers/get.js create mode 100644 node_modules/memoizee/normalizers/primitive.js create mode 100644 node_modules/memoizee/package.json create mode 100644 node_modules/memoizee/plain.js create mode 100644 node_modules/memoizee/profile.js create mode 100644 node_modules/memoizee/test/ext/async.js create mode 100644 node_modules/memoizee/test/ext/dispose.js create mode 100644 node_modules/memoizee/test/ext/max-age.js create mode 100644 node_modules/memoizee/test/ext/max.js create mode 100644 node_modules/memoizee/test/ext/promise.js create mode 100644 node_modules/memoizee/test/ext/ref-counter.js create mode 100644 node_modules/memoizee/test/index.js create mode 100644 node_modules/memoizee/test/lib/configure-map.js create mode 100644 node_modules/memoizee/test/lib/methods.js create mode 100644 node_modules/memoizee/test/lib/registered-extensions.js create mode 100644 node_modules/memoizee/test/lib/resolve-length.js create mode 100644 node_modules/memoizee/test/lib/resolve-normalize.js create mode 100644 node_modules/memoizee/test/lib/resolve-resolve.js create mode 100644 node_modules/memoizee/test/lib/weak.js create mode 100644 node_modules/memoizee/test/methods-plain.js create mode 100644 node_modules/memoizee/test/methods.js create mode 100644 node_modules/memoizee/test/normalizers/get-1.js create mode 100644 node_modules/memoizee/test/normalizers/get-fixed.js create mode 100644 node_modules/memoizee/test/normalizers/get-primitive-fixed.js create mode 100644 node_modules/memoizee/test/normalizers/get.js create mode 100644 node_modules/memoizee/test/normalizers/primitive.js create mode 100644 node_modules/memoizee/test/plain.js create mode 100644 node_modules/memoizee/test/profile.js create mode 100644 node_modules/memoizee/test/weak-plain.js create mode 100644 node_modules/memoizee/test/weak.js create mode 100644 node_modules/memoizee/weak-plain.js create mode 100644 node_modules/memoizee/weak.js create mode 100644 node_modules/merge-descriptors/HISTORY.md create mode 100644 node_modules/merge-descriptors/LICENSE create mode 100644 node_modules/merge-descriptors/README.md create mode 100644 node_modules/merge-descriptors/index.js create mode 100644 node_modules/merge-descriptors/package.json create mode 100644 node_modules/methods/HISTORY.md create mode 100644 node_modules/methods/LICENSE create mode 100644 node_modules/methods/README.md create mode 100644 node_modules/methods/index.js create mode 100644 node_modules/methods/package.json create mode 100755 node_modules/micromatch/LICENSE create mode 100644 node_modules/micromatch/README.md create mode 100755 node_modules/micromatch/index.js create mode 100644 node_modules/micromatch/lib/chars.js create mode 100644 node_modules/micromatch/lib/expand.js create mode 100644 node_modules/micromatch/lib/glob.js create mode 100644 node_modules/micromatch/lib/utils.js create mode 100644 node_modules/micromatch/package.json create mode 100644 node_modules/mime-db/HISTORY.md create mode 100644 node_modules/mime-db/LICENSE create mode 100644 node_modules/mime-db/README.md create mode 100644 node_modules/mime-db/db.json create mode 100644 node_modules/mime-db/index.js create mode 100644 node_modules/mime-db/package.json create mode 100644 node_modules/mime-types/HISTORY.md create mode 100644 node_modules/mime-types/LICENSE create mode 100644 node_modules/mime-types/README.md create mode 100644 node_modules/mime-types/index.js create mode 100644 node_modules/mime-types/package.json create mode 100644 node_modules/mime/.npmignore create mode 100644 node_modules/mime/LICENSE create mode 100644 node_modules/mime/README.md create mode 100644 node_modules/mime/build/build.js create mode 100644 node_modules/mime/build/test.js create mode 100755 node_modules/mime/cli.js create mode 100644 node_modules/mime/mime.js create mode 100644 node_modules/mime/package.json create mode 100644 node_modules/mime/types.json create mode 100644 node_modules/minimatch/LICENSE create mode 100644 node_modules/minimatch/README.md create mode 100644 node_modules/minimatch/browser.js create mode 100644 node_modules/minimatch/minimatch.js create mode 100644 node_modules/minimatch/package.json create mode 100644 node_modules/minimist/.travis.yml create mode 100644 node_modules/minimist/LICENSE create mode 100644 node_modules/minimist/example/parse.js create mode 100644 node_modules/minimist/index.js create mode 100644 node_modules/minimist/package.json create mode 100644 node_modules/minimist/readme.markdown create mode 100644 node_modules/minimist/test/dash.js create mode 100644 node_modules/minimist/test/default_bool.js create mode 100644 node_modules/minimist/test/dotted.js create mode 100644 node_modules/minimist/test/long.js create mode 100644 node_modules/minimist/test/parse.js create mode 100644 node_modules/minimist/test/parse_modified.js create mode 100644 node_modules/minimist/test/short.js create mode 100644 node_modules/minimist/test/whitespace.js create mode 100644 node_modules/mkdirp/.travis.yml create mode 100644 node_modules/mkdirp/LICENSE create mode 100755 node_modules/mkdirp/bin/cmd.js create mode 100644 node_modules/mkdirp/bin/usage.txt create mode 100644 node_modules/mkdirp/examples/pow.js create mode 100644 node_modules/mkdirp/index.js create mode 100644 node_modules/mkdirp/package.json create mode 100644 node_modules/mkdirp/readme.markdown create mode 100644 node_modules/mkdirp/test/chmod.js create mode 100644 node_modules/mkdirp/test/clobber.js create mode 100644 node_modules/mkdirp/test/mkdirp.js create mode 100644 node_modules/mkdirp/test/opts_fs.js create mode 100644 node_modules/mkdirp/test/opts_fs_sync.js create mode 100644 node_modules/mkdirp/test/perm.js create mode 100644 node_modules/mkdirp/test/perm_sync.js create mode 100644 node_modules/mkdirp/test/race.js create mode 100644 node_modules/mkdirp/test/rel.js create mode 100644 node_modules/mkdirp/test/return.js create mode 100644 node_modules/mkdirp/test/return_sync.js create mode 100644 node_modules/mkdirp/test/root.js create mode 100644 node_modules/mkdirp/test/sync.js create mode 100644 node_modules/mkdirp/test/umask.js create mode 100644 node_modules/mkdirp/test/umask_sync.js create mode 100644 node_modules/moment-timezone/.npmignore create mode 100644 node_modules/moment-timezone/LICENSE create mode 100644 node_modules/moment-timezone/README.md create mode 100644 node_modules/moment-timezone/builds/moment-timezone-with-data-2012-2022.js create mode 100644 node_modules/moment-timezone/builds/moment-timezone-with-data-2012-2022.min.js create mode 100644 node_modules/moment-timezone/builds/moment-timezone-with-data.js create mode 100644 node_modules/moment-timezone/builds/moment-timezone-with-data.min.js create mode 100644 node_modules/moment-timezone/builds/moment-timezone.min.js create mode 100644 node_modules/moment-timezone/changelog.md create mode 100644 node_modules/moment-timezone/composer.json create mode 100644 node_modules/moment-timezone/data/meta/latest.json create mode 100644 node_modules/moment-timezone/data/packed/latest.json create mode 100644 node_modules/moment-timezone/data/unpacked/latest.json create mode 100644 node_modules/moment-timezone/index.js create mode 100644 node_modules/moment-timezone/moment-timezone-utils.js create mode 100644 node_modules/moment-timezone/moment-timezone.js create mode 100644 node_modules/moment-timezone/package.json create mode 100644 node_modules/moment/CHANGELOG.md create mode 100644 node_modules/moment/LICENSE create mode 100644 node_modules/moment/README.md create mode 100644 node_modules/moment/ender.js create mode 100644 node_modules/moment/locale/af.js create mode 100644 node_modules/moment/locale/ar-dz.js create mode 100644 node_modules/moment/locale/ar-kw.js create mode 100644 node_modules/moment/locale/ar-ly.js create mode 100644 node_modules/moment/locale/ar-ma.js create mode 100644 node_modules/moment/locale/ar-sa.js create mode 100644 node_modules/moment/locale/ar-tn.js create mode 100644 node_modules/moment/locale/ar.js create mode 100644 node_modules/moment/locale/az.js create mode 100644 node_modules/moment/locale/be.js create mode 100644 node_modules/moment/locale/bg.js create mode 100644 node_modules/moment/locale/bn.js create mode 100644 node_modules/moment/locale/bo.js create mode 100644 node_modules/moment/locale/br.js create mode 100644 node_modules/moment/locale/bs.js create mode 100644 node_modules/moment/locale/ca.js create mode 100644 node_modules/moment/locale/cs.js create mode 100644 node_modules/moment/locale/cv.js create mode 100644 node_modules/moment/locale/cy.js create mode 100644 node_modules/moment/locale/da.js create mode 100644 node_modules/moment/locale/de-at.js create mode 100644 node_modules/moment/locale/de-ch.js create mode 100644 node_modules/moment/locale/de.js create mode 100644 node_modules/moment/locale/dv.js create mode 100644 node_modules/moment/locale/el.js create mode 100644 node_modules/moment/locale/en-au.js create mode 100644 node_modules/moment/locale/en-ca.js create mode 100644 node_modules/moment/locale/en-gb.js create mode 100644 node_modules/moment/locale/en-ie.js create mode 100644 node_modules/moment/locale/en-nz.js create mode 100644 node_modules/moment/locale/eo.js create mode 100644 node_modules/moment/locale/es-do.js create mode 100644 node_modules/moment/locale/es.js create mode 100644 node_modules/moment/locale/et.js create mode 100644 node_modules/moment/locale/eu.js create mode 100644 node_modules/moment/locale/fa.js create mode 100644 node_modules/moment/locale/fi.js create mode 100644 node_modules/moment/locale/fo.js create mode 100644 node_modules/moment/locale/fr-ca.js create mode 100644 node_modules/moment/locale/fr-ch.js create mode 100644 node_modules/moment/locale/fr.js create mode 100644 node_modules/moment/locale/fy.js create mode 100644 node_modules/moment/locale/gd.js create mode 100644 node_modules/moment/locale/gl.js create mode 100644 node_modules/moment/locale/gom-latn.js create mode 100644 node_modules/moment/locale/he.js create mode 100644 node_modules/moment/locale/hi.js create mode 100644 node_modules/moment/locale/hr.js create mode 100644 node_modules/moment/locale/hu.js create mode 100644 node_modules/moment/locale/hy-am.js create mode 100644 node_modules/moment/locale/id.js create mode 100644 node_modules/moment/locale/is.js create mode 100644 node_modules/moment/locale/it.js create mode 100644 node_modules/moment/locale/ja.js create mode 100644 node_modules/moment/locale/jv.js create mode 100644 node_modules/moment/locale/ka.js create mode 100644 node_modules/moment/locale/kk.js create mode 100644 node_modules/moment/locale/km.js create mode 100644 node_modules/moment/locale/kn.js create mode 100644 node_modules/moment/locale/ko.js create mode 100644 node_modules/moment/locale/ky.js create mode 100644 node_modules/moment/locale/lb.js create mode 100644 node_modules/moment/locale/lo.js create mode 100644 node_modules/moment/locale/lt.js create mode 100644 node_modules/moment/locale/lv.js create mode 100644 node_modules/moment/locale/me.js create mode 100644 node_modules/moment/locale/mi.js create mode 100644 node_modules/moment/locale/mk.js create mode 100644 node_modules/moment/locale/ml.js create mode 100644 node_modules/moment/locale/mr.js create mode 100644 node_modules/moment/locale/ms-my.js create mode 100644 node_modules/moment/locale/ms.js create mode 100644 node_modules/moment/locale/my.js create mode 100644 node_modules/moment/locale/nb.js create mode 100644 node_modules/moment/locale/ne.js create mode 100644 node_modules/moment/locale/nl-be.js create mode 100644 node_modules/moment/locale/nl.js create mode 100644 node_modules/moment/locale/nn.js create mode 100644 node_modules/moment/locale/pa-in.js create mode 100644 node_modules/moment/locale/pl.js create mode 100644 node_modules/moment/locale/pt-br.js create mode 100644 node_modules/moment/locale/pt.js create mode 100644 node_modules/moment/locale/ro.js create mode 100644 node_modules/moment/locale/ru.js create mode 100644 node_modules/moment/locale/sd.js create mode 100644 node_modules/moment/locale/se.js create mode 100644 node_modules/moment/locale/si.js create mode 100644 node_modules/moment/locale/sk.js create mode 100644 node_modules/moment/locale/sl.js create mode 100644 node_modules/moment/locale/sq.js create mode 100644 node_modules/moment/locale/sr-cyrl.js create mode 100644 node_modules/moment/locale/sr.js create mode 100644 node_modules/moment/locale/ss.js create mode 100644 node_modules/moment/locale/sv.js create mode 100644 node_modules/moment/locale/sw.js create mode 100644 node_modules/moment/locale/ta.js create mode 100644 node_modules/moment/locale/te.js create mode 100644 node_modules/moment/locale/tet.js create mode 100644 node_modules/moment/locale/th.js create mode 100644 node_modules/moment/locale/tl-ph.js create mode 100644 node_modules/moment/locale/tlh.js create mode 100644 node_modules/moment/locale/tr.js create mode 100644 node_modules/moment/locale/tzl.js create mode 100644 node_modules/moment/locale/tzm-latn.js create mode 100644 node_modules/moment/locale/tzm.js create mode 100644 node_modules/moment/locale/uk.js create mode 100644 node_modules/moment/locale/ur.js create mode 100644 node_modules/moment/locale/uz-latn.js create mode 100644 node_modules/moment/locale/uz.js create mode 100644 node_modules/moment/locale/vi.js create mode 100644 node_modules/moment/locale/x-pseudo.js create mode 100644 node_modules/moment/locale/yo.js create mode 100644 node_modules/moment/locale/zh-cn.js create mode 100644 node_modules/moment/locale/zh-hk.js create mode 100644 node_modules/moment/locale/zh-tw.js create mode 100644 node_modules/moment/min/locales.js create mode 100644 node_modules/moment/min/locales.min.js create mode 100644 node_modules/moment/min/moment-with-locales.js create mode 100644 node_modules/moment/min/moment-with-locales.min.js create mode 100644 node_modules/moment/min/moment.min.js create mode 100644 node_modules/moment/moment.d.ts create mode 100644 node_modules/moment/moment.js create mode 100644 node_modules/moment/package.js create mode 100644 node_modules/moment/package.json create mode 100644 node_modules/moment/src/lib/create/check-overflow.js create mode 100644 node_modules/moment/src/lib/create/date-from-array.js create mode 100644 node_modules/moment/src/lib/create/from-anything.js create mode 100644 node_modules/moment/src/lib/create/from-array.js create mode 100644 node_modules/moment/src/lib/create/from-object.js create mode 100644 node_modules/moment/src/lib/create/from-string-and-array.js create mode 100644 node_modules/moment/src/lib/create/from-string-and-format.js create mode 100644 node_modules/moment/src/lib/create/from-string.js create mode 100644 node_modules/moment/src/lib/create/local.js create mode 100644 node_modules/moment/src/lib/create/parsing-flags.js create mode 100644 node_modules/moment/src/lib/create/utc.js create mode 100644 node_modules/moment/src/lib/create/valid.js create mode 100644 node_modules/moment/src/lib/duration/abs.js create mode 100644 node_modules/moment/src/lib/duration/add-subtract.js create mode 100644 node_modules/moment/src/lib/duration/as.js create mode 100644 node_modules/moment/src/lib/duration/bubble.js create mode 100644 node_modules/moment/src/lib/duration/constructor.js create mode 100644 node_modules/moment/src/lib/duration/create.js create mode 100644 node_modules/moment/src/lib/duration/duration.js create mode 100644 node_modules/moment/src/lib/duration/get.js create mode 100644 node_modules/moment/src/lib/duration/humanize.js create mode 100644 node_modules/moment/src/lib/duration/iso-string.js create mode 100644 node_modules/moment/src/lib/duration/prototype.js create mode 100644 node_modules/moment/src/lib/duration/valid.js create mode 100644 node_modules/moment/src/lib/format/format.js create mode 100644 node_modules/moment/src/lib/locale/base-config.js create mode 100644 node_modules/moment/src/lib/locale/calendar.js create mode 100644 node_modules/moment/src/lib/locale/constructor.js create mode 100644 node_modules/moment/src/lib/locale/en.js create mode 100644 node_modules/moment/src/lib/locale/formats.js create mode 100644 node_modules/moment/src/lib/locale/invalid.js create mode 100644 node_modules/moment/src/lib/locale/lists.js create mode 100644 node_modules/moment/src/lib/locale/locale.js create mode 100644 node_modules/moment/src/lib/locale/locales.js create mode 100644 node_modules/moment/src/lib/locale/ordinal.js create mode 100644 node_modules/moment/src/lib/locale/pre-post-format.js create mode 100644 node_modules/moment/src/lib/locale/prototype.js create mode 100644 node_modules/moment/src/lib/locale/relative.js create mode 100644 node_modules/moment/src/lib/locale/set.js create mode 100644 node_modules/moment/src/lib/moment/add-subtract.js create mode 100644 node_modules/moment/src/lib/moment/calendar.js create mode 100644 node_modules/moment/src/lib/moment/clone.js create mode 100644 node_modules/moment/src/lib/moment/compare.js create mode 100644 node_modules/moment/src/lib/moment/constructor.js create mode 100644 node_modules/moment/src/lib/moment/creation-data.js create mode 100644 node_modules/moment/src/lib/moment/diff.js create mode 100644 node_modules/moment/src/lib/moment/format.js create mode 100644 node_modules/moment/src/lib/moment/from.js create mode 100644 node_modules/moment/src/lib/moment/get-set.js create mode 100644 node_modules/moment/src/lib/moment/locale.js create mode 100644 node_modules/moment/src/lib/moment/min-max.js create mode 100644 node_modules/moment/src/lib/moment/moment.js create mode 100644 node_modules/moment/src/lib/moment/now.js create mode 100644 node_modules/moment/src/lib/moment/prototype.js create mode 100644 node_modules/moment/src/lib/moment/start-end-of.js create mode 100644 node_modules/moment/src/lib/moment/to-type.js create mode 100644 node_modules/moment/src/lib/moment/to.js create mode 100644 node_modules/moment/src/lib/moment/valid.js create mode 100644 node_modules/moment/src/lib/parse/regex.js create mode 100644 node_modules/moment/src/lib/parse/token.js create mode 100644 node_modules/moment/src/lib/units/aliases.js create mode 100644 node_modules/moment/src/lib/units/constants.js create mode 100644 node_modules/moment/src/lib/units/day-of-month.js create mode 100644 node_modules/moment/src/lib/units/day-of-week.js create mode 100644 node_modules/moment/src/lib/units/day-of-year.js create mode 100644 node_modules/moment/src/lib/units/hour.js create mode 100644 node_modules/moment/src/lib/units/millisecond.js create mode 100644 node_modules/moment/src/lib/units/minute.js create mode 100644 node_modules/moment/src/lib/units/month.js create mode 100644 node_modules/moment/src/lib/units/offset.js create mode 100644 node_modules/moment/src/lib/units/priorities.js create mode 100644 node_modules/moment/src/lib/units/quarter.js create mode 100644 node_modules/moment/src/lib/units/second.js create mode 100644 node_modules/moment/src/lib/units/timestamp.js create mode 100644 node_modules/moment/src/lib/units/timezone.js create mode 100644 node_modules/moment/src/lib/units/units.js create mode 100644 node_modules/moment/src/lib/units/week-calendar-utils.js create mode 100644 node_modules/moment/src/lib/units/week-year.js create mode 100644 node_modules/moment/src/lib/units/week.js create mode 100644 node_modules/moment/src/lib/units/year.js create mode 100644 node_modules/moment/src/lib/utils/abs-ceil.js create mode 100644 node_modules/moment/src/lib/utils/abs-floor.js create mode 100644 node_modules/moment/src/lib/utils/abs-round.js create mode 100644 node_modules/moment/src/lib/utils/compare-arrays.js create mode 100644 node_modules/moment/src/lib/utils/defaults.js create mode 100644 node_modules/moment/src/lib/utils/deprecate.js create mode 100644 node_modules/moment/src/lib/utils/extend.js create mode 100644 node_modules/moment/src/lib/utils/has-own-prop.js create mode 100644 node_modules/moment/src/lib/utils/hooks.js create mode 100644 node_modules/moment/src/lib/utils/index-of.js create mode 100644 node_modules/moment/src/lib/utils/is-array.js create mode 100644 node_modules/moment/src/lib/utils/is-date.js create mode 100644 node_modules/moment/src/lib/utils/is-function.js create mode 100644 node_modules/moment/src/lib/utils/is-number.js create mode 100644 node_modules/moment/src/lib/utils/is-object-empty.js create mode 100644 node_modules/moment/src/lib/utils/is-object.js create mode 100644 node_modules/moment/src/lib/utils/is-undefined.js create mode 100644 node_modules/moment/src/lib/utils/keys.js create mode 100644 node_modules/moment/src/lib/utils/map.js create mode 100644 node_modules/moment/src/lib/utils/some.js create mode 100644 node_modules/moment/src/lib/utils/to-int.js create mode 100644 node_modules/moment/src/lib/utils/zero-fill.js create mode 100644 node_modules/moment/src/locale/af.js create mode 100644 node_modules/moment/src/locale/ar-dz.js create mode 100644 node_modules/moment/src/locale/ar-kw.js create mode 100644 node_modules/moment/src/locale/ar-ly.js create mode 100644 node_modules/moment/src/locale/ar-ma.js create mode 100644 node_modules/moment/src/locale/ar-sa.js create mode 100644 node_modules/moment/src/locale/ar-tn.js create mode 100644 node_modules/moment/src/locale/ar.js create mode 100644 node_modules/moment/src/locale/az.js create mode 100644 node_modules/moment/src/locale/be.js create mode 100644 node_modules/moment/src/locale/bg.js create mode 100644 node_modules/moment/src/locale/bn.js create mode 100644 node_modules/moment/src/locale/bo.js create mode 100644 node_modules/moment/src/locale/br.js create mode 100644 node_modules/moment/src/locale/bs.js create mode 100644 node_modules/moment/src/locale/ca.js create mode 100644 node_modules/moment/src/locale/cs.js create mode 100644 node_modules/moment/src/locale/cv.js create mode 100644 node_modules/moment/src/locale/cy.js create mode 100644 node_modules/moment/src/locale/da.js create mode 100644 node_modules/moment/src/locale/de-at.js create mode 100644 node_modules/moment/src/locale/de-ch.js create mode 100644 node_modules/moment/src/locale/de.js create mode 100644 node_modules/moment/src/locale/dv.js create mode 100644 node_modules/moment/src/locale/el.js create mode 100644 node_modules/moment/src/locale/en-au.js create mode 100644 node_modules/moment/src/locale/en-ca.js create mode 100644 node_modules/moment/src/locale/en-gb.js create mode 100644 node_modules/moment/src/locale/en-ie.js create mode 100644 node_modules/moment/src/locale/en-nz.js create mode 100644 node_modules/moment/src/locale/eo.js create mode 100644 node_modules/moment/src/locale/es-do.js create mode 100644 node_modules/moment/src/locale/es.js create mode 100644 node_modules/moment/src/locale/et.js create mode 100644 node_modules/moment/src/locale/eu.js create mode 100644 node_modules/moment/src/locale/fa.js create mode 100644 node_modules/moment/src/locale/fi.js create mode 100644 node_modules/moment/src/locale/fo.js create mode 100644 node_modules/moment/src/locale/fr-ca.js create mode 100644 node_modules/moment/src/locale/fr-ch.js create mode 100644 node_modules/moment/src/locale/fr.js create mode 100644 node_modules/moment/src/locale/fy.js create mode 100644 node_modules/moment/src/locale/gd.js create mode 100644 node_modules/moment/src/locale/gl.js create mode 100644 node_modules/moment/src/locale/gom-latn.js create mode 100644 node_modules/moment/src/locale/he.js create mode 100644 node_modules/moment/src/locale/hi.js create mode 100644 node_modules/moment/src/locale/hr.js create mode 100644 node_modules/moment/src/locale/hu.js create mode 100644 node_modules/moment/src/locale/hy-am.js create mode 100644 node_modules/moment/src/locale/id.js create mode 100644 node_modules/moment/src/locale/is.js create mode 100644 node_modules/moment/src/locale/it.js create mode 100644 node_modules/moment/src/locale/ja.js create mode 100644 node_modules/moment/src/locale/jv.js create mode 100644 node_modules/moment/src/locale/ka.js create mode 100644 node_modules/moment/src/locale/kk.js create mode 100644 node_modules/moment/src/locale/km.js create mode 100644 node_modules/moment/src/locale/kn.js create mode 100644 node_modules/moment/src/locale/ko.js create mode 100644 node_modules/moment/src/locale/ky.js create mode 100644 node_modules/moment/src/locale/lb.js create mode 100644 node_modules/moment/src/locale/lo.js create mode 100644 node_modules/moment/src/locale/lt.js create mode 100644 node_modules/moment/src/locale/lv.js create mode 100644 node_modules/moment/src/locale/me.js create mode 100644 node_modules/moment/src/locale/mi.js create mode 100644 node_modules/moment/src/locale/mk.js create mode 100644 node_modules/moment/src/locale/ml.js create mode 100644 node_modules/moment/src/locale/mr.js create mode 100644 node_modules/moment/src/locale/ms-my.js create mode 100644 node_modules/moment/src/locale/ms.js create mode 100644 node_modules/moment/src/locale/my.js create mode 100644 node_modules/moment/src/locale/nb.js create mode 100644 node_modules/moment/src/locale/ne.js create mode 100644 node_modules/moment/src/locale/nl-be.js create mode 100644 node_modules/moment/src/locale/nl.js create mode 100644 node_modules/moment/src/locale/nn.js create mode 100644 node_modules/moment/src/locale/pa-in.js create mode 100644 node_modules/moment/src/locale/pl.js create mode 100644 node_modules/moment/src/locale/pt-br.js create mode 100644 node_modules/moment/src/locale/pt.js create mode 100644 node_modules/moment/src/locale/ro.js create mode 100644 node_modules/moment/src/locale/ru.js create mode 100644 node_modules/moment/src/locale/sd.js create mode 100644 node_modules/moment/src/locale/se.js create mode 100644 node_modules/moment/src/locale/si.js create mode 100644 node_modules/moment/src/locale/sk.js create mode 100644 node_modules/moment/src/locale/sl.js create mode 100644 node_modules/moment/src/locale/sq.js create mode 100644 node_modules/moment/src/locale/sr-cyrl.js create mode 100644 node_modules/moment/src/locale/sr.js create mode 100644 node_modules/moment/src/locale/ss.js create mode 100644 node_modules/moment/src/locale/sv.js create mode 100644 node_modules/moment/src/locale/sw.js create mode 100644 node_modules/moment/src/locale/ta.js create mode 100644 node_modules/moment/src/locale/te.js create mode 100644 node_modules/moment/src/locale/tet.js create mode 100644 node_modules/moment/src/locale/th.js create mode 100644 node_modules/moment/src/locale/tl-ph.js create mode 100644 node_modules/moment/src/locale/tlh.js create mode 100644 node_modules/moment/src/locale/tr.js create mode 100644 node_modules/moment/src/locale/tzl.js create mode 100644 node_modules/moment/src/locale/tzm-latn.js create mode 100644 node_modules/moment/src/locale/tzm.js create mode 100644 node_modules/moment/src/locale/uk.js create mode 100644 node_modules/moment/src/locale/ur.js create mode 100644 node_modules/moment/src/locale/uz-latn.js create mode 100644 node_modules/moment/src/locale/uz.js create mode 100644 node_modules/moment/src/locale/vi.js create mode 100644 node_modules/moment/src/locale/x-pseudo.js create mode 100644 node_modules/moment/src/locale/yo.js create mode 100644 node_modules/moment/src/locale/zh-cn.js create mode 100644 node_modules/moment/src/locale/zh-hk.js create mode 100644 node_modules/moment/src/locale/zh-tw.js create mode 100644 node_modules/moment/src/moment.js create mode 100644 node_modules/morgan/HISTORY.md create mode 100644 node_modules/morgan/LICENSE create mode 100644 node_modules/morgan/README.md create mode 100644 node_modules/morgan/index.js create mode 100644 node_modules/morgan/node_modules/debug/.jshintrc create mode 100644 node_modules/morgan/node_modules/debug/.npmignore create mode 100644 node_modules/morgan/node_modules/debug/History.md create mode 100644 node_modules/morgan/node_modules/debug/Makefile create mode 100644 node_modules/morgan/node_modules/debug/Readme.md create mode 100644 node_modules/morgan/node_modules/debug/bower.json create mode 100644 node_modules/morgan/node_modules/debug/browser.js create mode 100644 node_modules/morgan/node_modules/debug/component.json create mode 100644 node_modules/morgan/node_modules/debug/debug.js create mode 100644 node_modules/morgan/node_modules/debug/node.js create mode 100644 node_modules/morgan/node_modules/debug/package.json create mode 100644 node_modules/morgan/node_modules/ms/.npmignore create mode 100644 node_modules/morgan/node_modules/ms/History.md create mode 100644 node_modules/morgan/node_modules/ms/LICENSE create mode 100644 node_modules/morgan/node_modules/ms/README.md create mode 100644 node_modules/morgan/node_modules/ms/index.js create mode 100644 node_modules/morgan/node_modules/ms/package.json create mode 100644 node_modules/morgan/package.json create mode 100644 node_modules/ms/LICENSE.md create mode 100644 node_modules/ms/README.md create mode 100644 node_modules/ms/index.js create mode 100644 node_modules/ms/package.json create mode 100644 node_modules/multipipe/.npmignore create mode 100644 node_modules/multipipe/.travis.yml create mode 100644 node_modules/multipipe/History.md create mode 100644 node_modules/multipipe/Makefile create mode 100644 node_modules/multipipe/Readme.md create mode 100644 node_modules/multipipe/index.js create mode 100644 node_modules/multipipe/package.json create mode 100644 node_modules/multipipe/test/multipipe.js create mode 100644 node_modules/natives/README.md create mode 100644 node_modules/natives/index.js create mode 100644 node_modules/natives/package.json create mode 100644 node_modules/negotiator/HISTORY.md create mode 100644 node_modules/negotiator/LICENSE create mode 100644 node_modules/negotiator/README.md create mode 100644 node_modules/negotiator/index.js create mode 100644 node_modules/negotiator/lib/charset.js create mode 100644 node_modules/negotiator/lib/encoding.js create mode 100644 node_modules/negotiator/lib/language.js create mode 100644 node_modules/negotiator/lib/mediaType.js create mode 100644 node_modules/negotiator/package.json create mode 100644 node_modules/next-tick/.lint create mode 100644 node_modules/next-tick/.npmignore create mode 100644 node_modules/next-tick/.travis.yml create mode 100644 node_modules/next-tick/CHANGES create mode 100644 node_modules/next-tick/LICENSE create mode 100644 node_modules/next-tick/README.md create mode 100644 node_modules/next-tick/index.js create mode 100644 node_modules/next-tick/package.json create mode 100644 node_modules/next-tick/test/index.js create mode 100644 node_modules/nopt/.npmignore create mode 100644 node_modules/nopt/.travis.yml create mode 100644 node_modules/nopt/LICENSE create mode 100644 node_modules/nopt/README.md create mode 100755 node_modules/nopt/bin/nopt.js create mode 100755 node_modules/nopt/examples/my-program.js create mode 100644 node_modules/nopt/lib/nopt.js create mode 100644 node_modules/nopt/package.json create mode 100644 node_modules/nopt/test/basic.js create mode 100644 node_modules/normalize-package-data/AUTHORS create mode 100644 node_modules/normalize-package-data/LICENSE create mode 100644 node_modules/normalize-package-data/README.md create mode 100644 node_modules/normalize-package-data/lib/extract_description.js create mode 100644 node_modules/normalize-package-data/lib/fixer.js create mode 100644 node_modules/normalize-package-data/lib/make_warning.js create mode 100644 node_modules/normalize-package-data/lib/normalize.js create mode 100644 node_modules/normalize-package-data/lib/safe_format.js create mode 100644 node_modules/normalize-package-data/lib/typos.json create mode 100644 node_modules/normalize-package-data/lib/warning_messages.json create mode 100644 node_modules/normalize-package-data/package.json create mode 100644 node_modules/normalize-path/LICENSE create mode 100644 node_modules/normalize-path/README.md create mode 100644 node_modules/normalize-path/index.js create mode 100644 node_modules/normalize-path/package.json create mode 100644 node_modules/number-is-nan/index.js create mode 100644 node_modules/number-is-nan/license create mode 100644 node_modules/number-is-nan/package.json create mode 100644 node_modules/number-is-nan/readme.md create mode 100644 node_modules/object-assign/index.js create mode 100644 node_modules/object-assign/license create mode 100644 node_modules/object-assign/package.json create mode 100644 node_modules/object-assign/readme.md create mode 100644 node_modules/object.omit/LICENSE create mode 100644 node_modules/object.omit/README.md create mode 100644 node_modules/object.omit/index.js create mode 100644 node_modules/object.omit/package.json create mode 100644 node_modules/on-finished/HISTORY.md create mode 100644 node_modules/on-finished/LICENSE create mode 100644 node_modules/on-finished/README.md create mode 100644 node_modules/on-finished/index.js create mode 100644 node_modules/on-finished/package.json create mode 100644 node_modules/on-headers/HISTORY.md create mode 100644 node_modules/on-headers/LICENSE create mode 100644 node_modules/on-headers/README.md create mode 100644 node_modules/on-headers/index.js create mode 100644 node_modules/on-headers/package.json create mode 100644 node_modules/once/LICENSE create mode 100644 node_modules/once/README.md create mode 100644 node_modules/once/once.js create mode 100644 node_modules/once/package.json create mode 100644 node_modules/optimist/.travis.yml create mode 100644 node_modules/optimist/LICENSE create mode 100644 node_modules/optimist/example/bool.js create mode 100644 node_modules/optimist/example/boolean_double.js create mode 100644 node_modules/optimist/example/boolean_single.js create mode 100644 node_modules/optimist/example/default_hash.js create mode 100644 node_modules/optimist/example/default_singles.js create mode 100644 node_modules/optimist/example/divide.js create mode 100644 node_modules/optimist/example/line_count.js create mode 100644 node_modules/optimist/example/line_count_options.js create mode 100644 node_modules/optimist/example/line_count_wrap.js create mode 100644 node_modules/optimist/example/nonopt.js create mode 100644 node_modules/optimist/example/reflect.js create mode 100644 node_modules/optimist/example/short.js create mode 100644 node_modules/optimist/example/string.js create mode 100644 node_modules/optimist/example/usage-options.js create mode 100644 node_modules/optimist/example/xup.js create mode 100644 node_modules/optimist/index.js create mode 100644 node_modules/optimist/package.json create mode 100644 node_modules/optimist/readme.markdown create mode 100644 node_modules/optimist/test/_.js create mode 100644 node_modules/optimist/test/_/argv.js create mode 100755 node_modules/optimist/test/_/bin.js create mode 100644 node_modules/optimist/test/parse.js create mode 100644 node_modules/optimist/test/usage.js create mode 100644 node_modules/orchestrator/.npmignore create mode 100644 node_modules/orchestrator/LICENSE create mode 100644 node_modules/orchestrator/README.md create mode 100644 node_modules/orchestrator/index.js create mode 100644 node_modules/orchestrator/lib/runTask.js create mode 100644 node_modules/orchestrator/package.json create mode 100644 node_modules/ordered-read-streams/.npmignore create mode 100644 node_modules/ordered-read-streams/.travis.yml create mode 100644 node_modules/ordered-read-streams/LICENSE create mode 100644 node_modules/ordered-read-streams/README.md create mode 100644 node_modules/ordered-read-streams/index.js create mode 100644 node_modules/ordered-read-streams/package.json create mode 100644 node_modules/ordered-read-streams/test/main.js create mode 100644 node_modules/os-homedir/index.js create mode 100644 node_modules/os-homedir/license create mode 100644 node_modules/os-homedir/package.json create mode 100644 node_modules/os-homedir/readme.md create mode 100644 node_modules/os-locale/index.js create mode 100644 node_modules/os-locale/license create mode 100644 node_modules/os-locale/package.json create mode 100644 node_modules/os-locale/readme.md create mode 100644 node_modules/packet-reader/.npmignore create mode 100644 node_modules/packet-reader/index.js create mode 100644 node_modules/packet-reader/package.json create mode 100644 node_modules/packet-reader/test/index.js create mode 100644 node_modules/parse-filepath/LICENSE create mode 100644 node_modules/parse-filepath/README.md create mode 100644 node_modules/parse-filepath/index.js create mode 100644 node_modules/parse-filepath/package.json create mode 100644 node_modules/parse-glob/LICENSE create mode 100644 node_modules/parse-glob/README.md create mode 100644 node_modules/parse-glob/index.js create mode 100644 node_modules/parse-glob/package.json create mode 100644 node_modules/parse-json/index.js create mode 100644 node_modules/parse-json/license create mode 100644 node_modules/parse-json/package.json create mode 100644 node_modules/parse-json/readme.md create mode 100644 node_modules/parse-json/vendor/parse.js create mode 100644 node_modules/parse-json/vendor/unicode.js create mode 100644 node_modules/parse-passwd/LICENSE create mode 100644 node_modules/parse-passwd/README.md create mode 100644 node_modules/parse-passwd/index.js create mode 100644 node_modules/parse-passwd/package.json create mode 100644 node_modules/parseurl/HISTORY.md create mode 100644 node_modules/parseurl/LICENSE create mode 100644 node_modules/parseurl/README.md create mode 100644 node_modules/parseurl/index.js create mode 100644 node_modules/parseurl/package.json create mode 100644 node_modules/path-exists/index.js create mode 100644 node_modules/path-exists/license create mode 100644 node_modules/path-exists/package.json create mode 100644 node_modules/path-exists/readme.md create mode 100644 node_modules/path-parse/.travis.yml create mode 100644 node_modules/path-parse/README.md create mode 100644 node_modules/path-parse/index.js create mode 100644 node_modules/path-parse/index.min.js create mode 100644 node_modules/path-parse/package.json create mode 100644 node_modules/path-parse/test.js create mode 100644 node_modules/path-parse/test.min.js create mode 100644 node_modules/path-root-regex/LICENSE create mode 100644 node_modules/path-root-regex/README.md create mode 100644 node_modules/path-root-regex/index.js create mode 100644 node_modules/path-root-regex/package.json create mode 100644 node_modules/path-root/LICENSE create mode 100644 node_modules/path-root/README.md create mode 100644 node_modules/path-root/index.js create mode 100644 node_modules/path-root/package.json create mode 100644 node_modules/path-to-regexp/History.md create mode 100644 node_modules/path-to-regexp/LICENSE create mode 100644 node_modules/path-to-regexp/Readme.md create mode 100644 node_modules/path-to-regexp/index.js create mode 100644 node_modules/path-to-regexp/package.json create mode 100644 node_modules/path-type/index.js create mode 100644 node_modules/path-type/license create mode 100644 node_modules/path-type/package.json create mode 100644 node_modules/path-type/readme.md create mode 100644 node_modules/pg-connection-string/.npmignore create mode 100644 node_modules/pg-connection-string/.travis.yml create mode 100644 node_modules/pg-connection-string/LICENSE create mode 100644 node_modules/pg-connection-string/README.md create mode 100644 node_modules/pg-connection-string/index.js create mode 100644 node_modules/pg-connection-string/package.json create mode 100644 node_modules/pg-connection-string/test/parse.js create mode 100644 node_modules/pg-pool/.npmignore create mode 100644 node_modules/pg-pool/.travis.yml create mode 100644 node_modules/pg-pool/Makefile create mode 100644 node_modules/pg-pool/README.md create mode 100644 node_modules/pg-pool/index.js create mode 100644 node_modules/pg-pool/package.json create mode 100644 node_modules/pg-pool/test/events.js create mode 100644 node_modules/pg-pool/test/index.js create mode 100644 node_modules/pg-pool/test/logging.js create mode 100644 node_modules/pg-pool/test/mocha.opts create mode 100644 node_modules/pg-types/.npmignore create mode 100644 node_modules/pg-types/.travis.yml create mode 100644 node_modules/pg-types/Makefile create mode 100644 node_modules/pg-types/README.md create mode 100644 node_modules/pg-types/index.js create mode 100644 node_modules/pg-types/lib/arrayParser.js create mode 100644 node_modules/pg-types/lib/binaryParsers.js create mode 100644 node_modules/pg-types/lib/textParsers.js create mode 100644 node_modules/pg-types/package.json create mode 100644 node_modules/pg-types/test/index.js create mode 100644 node_modules/pg-types/test/types.js create mode 100644 node_modules/pg/.jshintrc create mode 100644 node_modules/pg/.npmignore create mode 100644 node_modules/pg/.travis.yml create mode 100644 node_modules/pg/CHANGELOG.md create mode 100644 node_modules/pg/Makefile create mode 100644 node_modules/pg/README.md create mode 100644 node_modules/pg/lib/client.js create mode 100644 node_modules/pg/lib/connection-parameters.js create mode 100644 node_modules/pg/lib/connection.js create mode 100644 node_modules/pg/lib/defaults.js create mode 100644 node_modules/pg/lib/index.js create mode 100644 node_modules/pg/lib/native/index.js create mode 100644 node_modules/pg/lib/native/query.js create mode 100644 node_modules/pg/lib/native/result.js create mode 100644 node_modules/pg/lib/pool-factory.js create mode 100644 node_modules/pg/lib/query.js create mode 100644 node_modules/pg/lib/result.js create mode 100644 node_modules/pg/lib/type-overrides.js create mode 100644 node_modules/pg/lib/utils.js create mode 100644 node_modules/pg/package.json create mode 100644 node_modules/pgpass/.jshintrc create mode 100644 node_modules/pgpass/.npmignore create mode 100644 node_modules/pgpass/.travis.yml create mode 100644 node_modules/pgpass/README.md create mode 100644 node_modules/pgpass/coverage.json create mode 100644 node_modules/pgpass/lib/helper.js create mode 100644 node_modules/pgpass/lib/index.js create mode 100644 node_modules/pgpass/package.json create mode 100644 node_modules/pgpass/test/#1 de-escaping.js create mode 100644 node_modules/pgpass/test/#1 escaping.js create mode 100644 node_modules/pgpass/test/#6 too many open files.js create mode 100644 node_modules/pgpass/test/_pgpass create mode 100644 node_modules/pgpass/test/helper.js create mode 100644 node_modules/pgpass/test/index.js create mode 100644 node_modules/pgpass/test/integration/#1 escaping.js create mode 100644 node_modules/pify/index.js create mode 100644 node_modules/pify/license create mode 100644 node_modules/pify/package.json create mode 100644 node_modules/pify/readme.md create mode 100644 node_modules/pinkie-promise/index.js create mode 100644 node_modules/pinkie-promise/license create mode 100644 node_modules/pinkie-promise/package.json create mode 100644 node_modules/pinkie-promise/readme.md create mode 100644 node_modules/pinkie/index.js create mode 100644 node_modules/pinkie/license create mode 100644 node_modules/pinkie/package.json create mode 100644 node_modules/pinkie/readme.md create mode 100644 node_modules/postgres-array/index.js create mode 100644 node_modules/postgres-array/license create mode 100644 node_modules/postgres-array/package.json create mode 100644 node_modules/postgres-array/readme.md create mode 100644 node_modules/postgres-bytea/index.js create mode 100644 node_modules/postgres-bytea/license create mode 100644 node_modules/postgres-bytea/package.json create mode 100644 node_modules/postgres-bytea/readme.md create mode 100644 node_modules/postgres-date/index.js create mode 100644 node_modules/postgres-date/license create mode 100644 node_modules/postgres-date/package.json create mode 100644 node_modules/postgres-date/readme.md create mode 100644 node_modules/postgres-interval/index.js create mode 100644 node_modules/postgres-interval/license create mode 100644 node_modules/postgres-interval/package.json create mode 100644 node_modules/postgres-interval/readme.md create mode 100644 node_modules/preserve/.gitattributes create mode 100644 node_modules/preserve/.jshintrc create mode 100644 node_modules/preserve/.npmignore create mode 100644 node_modules/preserve/.travis.yml create mode 100644 node_modules/preserve/.verb.md create mode 100644 node_modules/preserve/LICENSE create mode 100644 node_modules/preserve/README.md create mode 100644 node_modules/preserve/index.js create mode 100644 node_modules/preserve/package.json create mode 100644 node_modules/preserve/test.js create mode 100644 node_modules/pretty-hrtime/.jshintignore create mode 100644 node_modules/pretty-hrtime/.npmignore create mode 100644 node_modules/pretty-hrtime/LICENSE create mode 100644 node_modules/pretty-hrtime/README.md create mode 100644 node_modules/pretty-hrtime/index.js create mode 100644 node_modules/pretty-hrtime/package.json create mode 100644 node_modules/process-nextick-args/.travis.yml create mode 100644 node_modules/process-nextick-args/index.js create mode 100644 node_modules/process-nextick-args/license.md create mode 100644 node_modules/process-nextick-args/package.json create mode 100644 node_modules/process-nextick-args/readme.md create mode 100644 node_modules/process-nextick-args/test.js create mode 100644 node_modules/promise/.jshintrc create mode 100644 node_modules/promise/.npmignore create mode 100644 node_modules/promise/LICENSE create mode 100644 node_modules/promise/Readme.md create mode 100644 node_modules/promise/core.js create mode 100644 node_modules/promise/index.js create mode 100644 node_modules/promise/lib/core.js create mode 100644 node_modules/promise/lib/done.js create mode 100644 node_modules/promise/lib/es6-extensions.js create mode 100644 node_modules/promise/lib/node-extensions.js create mode 100644 node_modules/promise/package.json create mode 100644 node_modules/promise/polyfill-done.js create mode 100644 node_modules/promise/polyfill.js create mode 100644 node_modules/proto-list/LICENSE create mode 100644 node_modules/proto-list/README.md create mode 100644 node_modules/proto-list/package.json create mode 100644 node_modules/proto-list/proto-list.js create mode 100644 node_modules/proto-list/test/basic.js create mode 100644 node_modules/proxy-addr/HISTORY.md create mode 100644 node_modules/proxy-addr/LICENSE create mode 100644 node_modules/proxy-addr/README.md create mode 100644 node_modules/proxy-addr/index.js create mode 100644 node_modules/proxy-addr/package.json create mode 100644 node_modules/pseudomap/LICENSE create mode 100644 node_modules/pseudomap/README.md create mode 100644 node_modules/pseudomap/map.js create mode 100644 node_modules/pseudomap/package.json create mode 100644 node_modules/pseudomap/pseudomap.js create mode 100644 node_modules/pseudomap/test/basic.js create mode 100644 node_modules/qs/.eslintignore create mode 100644 node_modules/qs/.eslintrc create mode 100644 node_modules/qs/CHANGELOG.md create mode 100644 node_modules/qs/CONTRIBUTING.md create mode 100644 node_modules/qs/LICENSE create mode 100644 node_modules/qs/README.md create mode 100644 node_modules/qs/dist/qs.js create mode 100755 node_modules/qs/lib/index.js create mode 100755 node_modules/qs/lib/parse.js create mode 100755 node_modules/qs/lib/stringify.js create mode 100755 node_modules/qs/lib/utils.js create mode 100644 node_modules/qs/package.json create mode 100644 node_modules/qs/test/index.js create mode 100755 node_modules/qs/test/parse.js create mode 100755 node_modules/qs/test/stringify.js create mode 100755 node_modules/qs/test/utils.js create mode 100755 node_modules/randomatic/LICENSE create mode 100644 node_modules/randomatic/README.md create mode 100644 node_modules/randomatic/index.js create mode 100644 node_modules/randomatic/package.json create mode 100644 node_modules/range-parser/HISTORY.md create mode 100644 node_modules/range-parser/LICENSE create mode 100644 node_modules/range-parser/README.md create mode 100644 node_modules/range-parser/index.js create mode 100644 node_modules/range-parser/package.json create mode 100644 node_modules/raw-body/HISTORY.md create mode 100644 node_modules/raw-body/LICENSE create mode 100644 node_modules/raw-body/README.md create mode 100644 node_modules/raw-body/index.js create mode 100644 node_modules/raw-body/package.json create mode 100644 node_modules/read-pkg-up/index.js create mode 100644 node_modules/read-pkg-up/license create mode 100644 node_modules/read-pkg-up/package.json create mode 100644 node_modules/read-pkg-up/readme.md create mode 100644 node_modules/read-pkg/index.js create mode 100644 node_modules/read-pkg/license create mode 100644 node_modules/read-pkg/package.json create mode 100644 node_modules/read-pkg/readme.md create mode 100644 node_modules/readable-stream/.npmignore create mode 100644 node_modules/readable-stream/LICENSE create mode 100644 node_modules/readable-stream/README.md create mode 100644 node_modules/readable-stream/duplex.js create mode 100644 node_modules/readable-stream/float.patch create mode 100644 node_modules/readable-stream/lib/_stream_duplex.js create mode 100644 node_modules/readable-stream/lib/_stream_passthrough.js create mode 100644 node_modules/readable-stream/lib/_stream_readable.js create mode 100644 node_modules/readable-stream/lib/_stream_transform.js create mode 100644 node_modules/readable-stream/lib/_stream_writable.js create mode 100644 node_modules/readable-stream/node_modules/isarray/README.md create mode 100644 node_modules/readable-stream/node_modules/isarray/build/build.js create mode 100644 node_modules/readable-stream/node_modules/isarray/component.json create mode 100644 node_modules/readable-stream/node_modules/isarray/index.js create mode 100644 node_modules/readable-stream/node_modules/isarray/package.json create mode 100644 node_modules/readable-stream/package.json create mode 100644 node_modules/readable-stream/passthrough.js create mode 100644 node_modules/readable-stream/readable.js create mode 100644 node_modules/readable-stream/transform.js create mode 100644 node_modules/readable-stream/writable.js create mode 100644 node_modules/rechoir/.npmignore create mode 100644 node_modules/rechoir/.travis.yml create mode 100644 node_modules/rechoir/CHANGELOG create mode 100644 node_modules/rechoir/LICENSE create mode 100644 node_modules/rechoir/README.md create mode 100644 node_modules/rechoir/index.js create mode 100644 node_modules/rechoir/lib/extension.js create mode 100644 node_modules/rechoir/lib/normalize.js create mode 100644 node_modules/rechoir/lib/register.js create mode 100644 node_modules/rechoir/package.json create mode 100644 node_modules/redefine/.gitattributes create mode 100644 node_modules/redefine/.npmignore create mode 100644 node_modules/redefine/.travis.yml create mode 100644 node_modules/redefine/HOWTO.md create mode 100644 node_modules/redefine/LICENSE.txt create mode 100644 node_modules/redefine/README.md create mode 100644 node_modules/redefine/build/redefine.js create mode 100644 node_modules/redefine/build/redefine.max.js create mode 100644 node_modules/redefine/package.json create mode 100644 node_modules/redefine/template/license.after create mode 100644 node_modules/redefine/template/license.before create mode 100644 node_modules/regex-cache/LICENSE create mode 100644 node_modules/regex-cache/README.md create mode 100644 node_modules/regex-cache/index.js create mode 100644 node_modules/regex-cache/package.json create mode 100644 node_modules/remove-trailing-separator/history.md create mode 100644 node_modules/remove-trailing-separator/index.js create mode 100644 node_modules/remove-trailing-separator/license create mode 100644 node_modules/remove-trailing-separator/package.json create mode 100644 node_modules/remove-trailing-separator/readme.md create mode 100644 node_modules/repeat-element/LICENSE create mode 100644 node_modules/repeat-element/README.md create mode 100644 node_modules/repeat-element/index.js create mode 100644 node_modules/repeat-element/package.json create mode 100644 node_modules/repeat-string/LICENSE create mode 100644 node_modules/repeat-string/README.md create mode 100644 node_modules/repeat-string/index.js create mode 100644 node_modules/repeat-string/package.json create mode 100644 node_modules/replace-ext/.npmignore create mode 100644 node_modules/replace-ext/.travis.yml create mode 100755 node_modules/replace-ext/LICENSE create mode 100644 node_modules/replace-ext/README.md create mode 100644 node_modules/replace-ext/index.js create mode 100644 node_modules/replace-ext/package.json create mode 100644 node_modules/replace-ext/test/main.js create mode 100644 node_modules/require-directory/.jshintrc create mode 100644 node_modules/require-directory/.npmignore create mode 100644 node_modules/require-directory/.travis.yml create mode 100644 node_modules/require-directory/LICENSE create mode 100644 node_modules/require-directory/README.markdown create mode 100644 node_modules/require-directory/index.js create mode 100644 node_modules/require-directory/package.json create mode 100644 node_modules/require-main-filename/.npmignore create mode 100644 node_modules/require-main-filename/.travis.yml create mode 100644 node_modules/require-main-filename/LICENSE.txt create mode 100644 node_modules/require-main-filename/README.md create mode 100644 node_modules/require-main-filename/index.js create mode 100644 node_modules/require-main-filename/package.json create mode 100644 node_modules/require-main-filename/test.js create mode 100644 node_modules/resolve-dir/LICENSE create mode 100644 node_modules/resolve-dir/README.md create mode 100644 node_modules/resolve-dir/index.js create mode 100644 node_modules/resolve-dir/package.json create mode 100644 node_modules/resolve/.eslintignore create mode 100644 node_modules/resolve/.eslintrc create mode 100644 node_modules/resolve/.npmignore create mode 100644 node_modules/resolve/.travis.yml create mode 100644 node_modules/resolve/LICENSE create mode 100644 node_modules/resolve/appveyor.yml create mode 100644 node_modules/resolve/example/async.js create mode 100644 node_modules/resolve/example/sync.js create mode 100644 node_modules/resolve/index.js create mode 100644 node_modules/resolve/lib/async.js create mode 100644 node_modules/resolve/lib/caller.js create mode 100644 node_modules/resolve/lib/core.js create mode 100644 node_modules/resolve/lib/core.json create mode 100644 node_modules/resolve/lib/node-modules-paths.js create mode 100644 node_modules/resolve/lib/sync.js create mode 100644 node_modules/resolve/package.json create mode 100644 node_modules/resolve/readme.markdown create mode 100644 node_modules/resolve/test/core.js create mode 100644 node_modules/resolve/test/dotdot.js create mode 100644 node_modules/resolve/test/dotdot/abc/index.js create mode 100644 node_modules/resolve/test/dotdot/index.js create mode 100644 node_modules/resolve/test/faulty_basedir.js create mode 100644 node_modules/resolve/test/filter.js create mode 100644 node_modules/resolve/test/filter_sync.js create mode 100644 node_modules/resolve/test/mock.js create mode 100644 node_modules/resolve/test/mock_sync.js create mode 100644 node_modules/resolve/test/module_dir.js create mode 100644 node_modules/resolve/test/module_dir/xmodules/aaa/index.js create mode 100644 node_modules/resolve/test/module_dir/ymodules/aaa/index.js create mode 100644 node_modules/resolve/test/module_dir/zmodules/bbb/main.js create mode 100644 node_modules/resolve/test/module_dir/zmodules/bbb/package.json create mode 100644 node_modules/resolve/test/node-modules-paths.js create mode 100644 node_modules/resolve/test/node_path.js create mode 100644 node_modules/resolve/test/node_path/x/aaa/index.js create mode 100644 node_modules/resolve/test/node_path/x/ccc/index.js create mode 100644 node_modules/resolve/test/node_path/y/bbb/index.js create mode 100644 node_modules/resolve/test/node_path/y/ccc/index.js create mode 100644 node_modules/resolve/test/nonstring.js create mode 100644 node_modules/resolve/test/pathfilter.js create mode 100644 node_modules/resolve/test/pathfilter/deep_ref/main.js create mode 100644 node_modules/resolve/test/precedence.js create mode 100644 node_modules/resolve/test/precedence/aaa.js create mode 100644 node_modules/resolve/test/precedence/aaa/index.js create mode 100644 node_modules/resolve/test/precedence/aaa/main.js create mode 100644 node_modules/resolve/test/precedence/bbb.js create mode 100644 node_modules/resolve/test/precedence/bbb/main.js create mode 100644 node_modules/resolve/test/resolver.js create mode 100644 node_modules/resolve/test/resolver/baz/doom.js create mode 100644 node_modules/resolve/test/resolver/baz/package.json create mode 100644 node_modules/resolve/test/resolver/baz/quux.js create mode 100644 node_modules/resolve/test/resolver/cup.coffee create mode 100644 node_modules/resolve/test/resolver/foo.js create mode 100644 node_modules/resolve/test/resolver/incorrect_main/index.js create mode 100644 node_modules/resolve/test/resolver/incorrect_main/package.json create mode 100644 node_modules/resolve/test/resolver/mug.coffee create mode 100644 node_modules/resolve/test/resolver/mug.js create mode 100644 node_modules/resolve/test/resolver/other_path/lib/other-lib.js create mode 100644 node_modules/resolve/test/resolver/other_path/root.js create mode 100644 node_modules/resolve/test/resolver/quux/foo/index.js create mode 100644 node_modules/resolve/test/resolver/same_names/foo.js create mode 100644 node_modules/resolve/test/resolver/same_names/foo/index.js create mode 100644 node_modules/resolve/test/resolver/without_basedir/main.js create mode 100644 node_modules/resolve/test/resolver_sync.js create mode 100644 node_modules/resolve/test/subdirs.js create mode 100644 node_modules/retry-as-promised/.npmignore create mode 100644 node_modules/retry-as-promised/LICENSE create mode 100644 node_modules/retry-as-promised/README.md create mode 100644 node_modules/retry-as-promised/index.js create mode 100644 node_modules/retry-as-promised/package.json create mode 100644 node_modules/retry-as-promised/test/bluebird.test.js create mode 100644 node_modules/right-align/LICENSE create mode 100644 node_modules/right-align/README.md create mode 100644 node_modules/right-align/index.js create mode 100644 node_modules/right-align/package.json create mode 100644 node_modules/semver/.npmignore create mode 100644 node_modules/semver/LICENSE create mode 100644 node_modules/semver/Makefile create mode 100644 node_modules/semver/README.md create mode 100755 node_modules/semver/bin/semver create mode 100644 node_modules/semver/foot.js.txt create mode 100644 node_modules/semver/head.js.txt create mode 100644 node_modules/semver/package.json create mode 100644 node_modules/semver/semver.browser.js create mode 100644 node_modules/semver/semver.browser.js.gz create mode 100644 node_modules/semver/semver.js create mode 100644 node_modules/semver/semver.min.js create mode 100644 node_modules/semver/semver.min.js.gz create mode 100644 node_modules/semver/test/amd.js create mode 100644 node_modules/semver/test/big-numbers.js create mode 100644 node_modules/semver/test/clean.js create mode 100644 node_modules/semver/test/gtr.js create mode 100644 node_modules/semver/test/index.js create mode 100644 node_modules/semver/test/ltr.js create mode 100644 node_modules/semver/test/major-minor-patch.js create mode 100644 node_modules/semver/test/no-module.js create mode 100644 node_modules/send/HISTORY.md create mode 100644 node_modules/send/LICENSE create mode 100644 node_modules/send/README.md create mode 100644 node_modules/send/index.js create mode 100644 node_modules/send/node_modules/debug/.jshintrc create mode 100644 node_modules/send/node_modules/debug/.npmignore create mode 100644 node_modules/send/node_modules/debug/History.md create mode 100644 node_modules/send/node_modules/debug/Makefile create mode 100644 node_modules/send/node_modules/debug/Readme.md create mode 100644 node_modules/send/node_modules/debug/bower.json create mode 100644 node_modules/send/node_modules/debug/browser.js create mode 100644 node_modules/send/node_modules/debug/component.json create mode 100644 node_modules/send/node_modules/debug/debug.js create mode 100644 node_modules/send/node_modules/debug/node.js create mode 100644 node_modules/send/node_modules/debug/node_modules/ms/.npmignore create mode 100644 node_modules/send/node_modules/debug/node_modules/ms/History.md create mode 100644 node_modules/send/node_modules/debug/node_modules/ms/LICENSE create mode 100644 node_modules/send/node_modules/debug/node_modules/ms/README.md create mode 100644 node_modules/send/node_modules/debug/node_modules/ms/index.js create mode 100644 node_modules/send/node_modules/debug/node_modules/ms/package.json create mode 100644 node_modules/send/node_modules/debug/package.json create mode 100644 node_modules/send/package.json create mode 100644 node_modules/sequelize-cli/.editorconfig create mode 100644 node_modules/sequelize-cli/.jscsrc create mode 100644 node_modules/sequelize-cli/.jshintrc create mode 100644 node_modules/sequelize-cli/.mention-bot create mode 100644 node_modules/sequelize-cli/.npmignore create mode 100644 node_modules/sequelize-cli/.travis.yml create mode 100644 node_modules/sequelize-cli/CHANGELOG.md create mode 100644 node_modules/sequelize-cli/LICENSE create mode 100644 node_modules/sequelize-cli/README.md create mode 100755 node_modules/sequelize-cli/bin/get-env-matrix create mode 100755 node_modules/sequelize-cli/bin/sequelize create mode 100644 node_modules/sequelize-cli/gulpfile.js create mode 100644 node_modules/sequelize-cli/lib/assets/migrations/create-table.js create mode 100644 node_modules/sequelize-cli/lib/assets/migrations/skeleton.js create mode 100644 node_modules/sequelize-cli/lib/assets/models/index.js create mode 100644 node_modules/sequelize-cli/lib/assets/models/model.js create mode 100644 node_modules/sequelize-cli/lib/assets/seeders/skeleton.js create mode 100644 node_modules/sequelize-cli/lib/gulpfile.js create mode 100644 node_modules/sequelize-cli/lib/helpers/asset-helper.js create mode 100644 node_modules/sequelize-cli/lib/helpers/config-helper.js create mode 100644 node_modules/sequelize-cli/lib/helpers/generic-helper.js create mode 100644 node_modules/sequelize-cli/lib/helpers/gulp-helper.js create mode 100644 node_modules/sequelize-cli/lib/helpers/index.js create mode 100644 node_modules/sequelize-cli/lib/helpers/init-helper.js create mode 100644 node_modules/sequelize-cli/lib/helpers/log-helper.js create mode 100644 node_modules/sequelize-cli/lib/helpers/migration-helper.js create mode 100644 node_modules/sequelize-cli/lib/helpers/model-helper.js create mode 100644 node_modules/sequelize-cli/lib/helpers/path-helper.js create mode 100644 node_modules/sequelize-cli/lib/helpers/template-helper.js create mode 100644 node_modules/sequelize-cli/lib/helpers/umzug-helper.js create mode 100644 node_modules/sequelize-cli/lib/helpers/version-helper.js create mode 100644 node_modules/sequelize-cli/lib/helpers/view-helper.js create mode 100644 node_modules/sequelize-cli/lib/tasks/db.js create mode 100644 node_modules/sequelize-cli/lib/tasks/init.js create mode 100644 node_modules/sequelize-cli/lib/tasks/migration.js create mode 100644 node_modules/sequelize-cli/lib/tasks/model.js create mode 100644 node_modules/sequelize-cli/lib/tasks/seed.js create mode 100644 node_modules/sequelize-cli/lib/tasks/version.js create mode 100644 node_modules/sequelize-cli/node_modules/camelcase/index.js create mode 100644 node_modules/sequelize-cli/node_modules/camelcase/license create mode 100644 node_modules/sequelize-cli/node_modules/camelcase/package.json create mode 100644 node_modules/sequelize-cli/node_modules/camelcase/readme.md create mode 100644 node_modules/sequelize-cli/node_modules/cliui/CHANGELOG.md create mode 100644 node_modules/sequelize-cli/node_modules/cliui/LICENSE.txt create mode 100644 node_modules/sequelize-cli/node_modules/cliui/README.md create mode 100644 node_modules/sequelize-cli/node_modules/cliui/index.js create mode 100644 node_modules/sequelize-cli/node_modules/cliui/package.json create mode 100644 node_modules/sequelize-cli/node_modules/lodash/LICENSE create mode 100644 node_modules/sequelize-cli/node_modules/lodash/README.md create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_DataView.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_Hash.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_LazyWrapper.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_ListCache.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_LodashWrapper.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_Map.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_MapCache.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_Promise.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_Set.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_SetCache.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_Stack.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_Symbol.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_Uint8Array.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_WeakMap.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_addMapEntry.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_addSetEntry.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_apply.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_arrayAggregator.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_arrayEach.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_arrayEachRight.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_arrayEvery.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_arrayFilter.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_arrayIncludes.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_arrayIncludesWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_arrayLikeKeys.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_arrayMap.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_arrayPush.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_arrayReduce.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_arrayReduceRight.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_arraySample.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_arraySampleSize.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_arrayShuffle.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_arraySome.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_asciiSize.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_asciiToArray.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_asciiWords.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_assignMergeValue.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_assignValue.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_assocIndexOf.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseAggregator.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseAssign.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseAssignIn.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseAssignValue.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseAt.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseClamp.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseClone.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseConforms.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseConformsTo.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseCreate.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseDelay.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseDifference.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseEach.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseEachRight.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseEvery.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseExtremum.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseFill.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseFilter.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseFindIndex.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseFindKey.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseFlatten.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseFor.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseForOwn.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseForOwnRight.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseForRight.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseFunctions.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseGet.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseGetAllKeys.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseGetTag.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseGt.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseHas.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseHasIn.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseInRange.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseIndexOf.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseIndexOfWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseIntersection.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseInverter.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseInvoke.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseIsArguments.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseIsArrayBuffer.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseIsDate.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseIsEqual.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseIsEqualDeep.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseIsMap.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseIsMatch.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseIsNaN.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseIsNative.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseIsRegExp.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseIsSet.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseIsTypedArray.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseIteratee.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseKeys.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseKeysIn.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseLodash.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseLt.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseMap.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseMatches.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseMatchesProperty.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseMean.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseMerge.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseMergeDeep.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseNth.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseOrderBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_basePick.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_basePickBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseProperty.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_basePropertyDeep.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_basePropertyOf.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_basePullAll.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_basePullAt.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseRandom.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseRange.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseReduce.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseRepeat.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseRest.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseSample.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseSampleSize.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseSet.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseSetData.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseSetToString.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseShuffle.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseSlice.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseSome.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseSortBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseSortedIndex.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseSortedIndexBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseSortedUniq.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseSum.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseTimes.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseToNumber.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseToPairs.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseToString.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseUnary.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseUniq.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseUnset.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseUpdate.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseValues.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseWhile.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseWrapperValue.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseXor.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_baseZipObject.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_cacheHas.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_castArrayLikeObject.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_castFunction.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_castPath.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_castRest.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_castSlice.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_charsEndIndex.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_charsStartIndex.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_cloneArrayBuffer.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_cloneBuffer.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_cloneDataView.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_cloneMap.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_cloneRegExp.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_cloneSet.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_cloneSymbol.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_cloneTypedArray.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_compareAscending.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_compareMultiple.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_composeArgs.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_composeArgsRight.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_copyArray.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_copyObject.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_copySymbols.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_copySymbolsIn.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_coreJsData.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_countHolders.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_createAggregator.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_createAssigner.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_createBaseEach.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_createBaseFor.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_createBind.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_createCaseFirst.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_createCompounder.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_createCtor.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_createCurry.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_createFind.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_createFlow.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_createHybrid.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_createInverter.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_createMathOperation.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_createOver.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_createPadding.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_createPartial.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_createRange.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_createRecurry.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_createRelationalOperation.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_createRound.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_createSet.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_createToPairs.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_createWrap.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_customDefaultsAssignIn.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_customDefaultsMerge.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_customOmitClone.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_deburrLetter.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_defineProperty.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_equalArrays.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_equalByTag.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_equalObjects.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_escapeHtmlChar.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_escapeStringChar.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_flatRest.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_freeGlobal.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_getAllKeys.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_getAllKeysIn.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_getData.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_getFuncName.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_getHolder.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_getMapData.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_getMatchData.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_getNative.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_getPrototype.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_getRawTag.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_getSymbols.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_getSymbolsIn.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_getTag.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_getValue.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_getView.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_getWrapDetails.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_hasPath.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_hasUnicode.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_hasUnicodeWord.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_hashClear.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_hashDelete.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_hashGet.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_hashHas.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_hashSet.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_initCloneArray.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_initCloneByTag.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_initCloneObject.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_insertWrapDetails.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_isFlattenable.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_isIndex.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_isIterateeCall.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_isKey.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_isKeyable.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_isLaziable.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_isMaskable.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_isMasked.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_isPrototype.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_isStrictComparable.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_iteratorToArray.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_lazyClone.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_lazyReverse.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_lazyValue.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_listCacheClear.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_listCacheDelete.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_listCacheGet.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_listCacheHas.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_listCacheSet.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_mapCacheClear.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_mapCacheDelete.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_mapCacheGet.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_mapCacheHas.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_mapCacheSet.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_mapToArray.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_matchesStrictComparable.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_memoizeCapped.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_mergeData.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_metaMap.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_nativeCreate.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_nativeKeys.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_nativeKeysIn.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_nodeUtil.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_objectToString.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_overArg.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_overRest.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_parent.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_reEscape.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_reEvaluate.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_reInterpolate.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_realNames.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_reorder.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_replaceHolders.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_root.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_setCacheAdd.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_setCacheHas.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_setData.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_setToArray.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_setToPairs.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_setToString.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_setWrapToString.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_shortOut.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_shuffleSelf.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_stackClear.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_stackDelete.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_stackGet.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_stackHas.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_stackSet.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_strictIndexOf.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_strictLastIndexOf.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_stringSize.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_stringToArray.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_stringToPath.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_toKey.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_toSource.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_unescapeHtmlChar.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_unicodeSize.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_unicodeToArray.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_unicodeWords.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_updateWrapDetails.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/_wrapperClone.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/add.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/after.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/array.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/ary.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/assign.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/assignIn.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/assignInWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/assignWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/at.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/attempt.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/before.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/bind.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/bindAll.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/bindKey.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/camelCase.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/capitalize.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/castArray.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/ceil.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/chain.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/chunk.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/clamp.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/clone.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/cloneDeep.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/cloneDeepWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/cloneWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/collection.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/commit.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/compact.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/concat.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/cond.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/conforms.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/conformsTo.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/constant.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/core.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/core.min.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/countBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/create.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/curry.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/curryRight.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/date.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/debounce.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/deburr.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/defaultTo.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/defaults.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/defaultsDeep.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/defer.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/delay.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/difference.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/differenceBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/differenceWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/divide.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/drop.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/dropRight.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/dropRightWhile.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/dropWhile.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/each.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/eachRight.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/endsWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/entries.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/entriesIn.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/eq.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/escape.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/escapeRegExp.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/every.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/extend.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/extendWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fill.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/filter.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/find.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/findIndex.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/findKey.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/findLast.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/findLastIndex.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/findLastKey.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/first.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/flatMap.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/flatMapDeep.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/flatMapDepth.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/flatten.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/flattenDeep.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/flattenDepth.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/flip.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/floor.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/flow.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/flowRight.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/forEach.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/forEachRight.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/forIn.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/forInRight.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/forOwn.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/forOwnRight.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/F.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/T.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/__.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/_baseConvert.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/_convertBrowser.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/_falseOptions.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/_mapping.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/_util.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/add.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/after.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/all.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/allPass.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/always.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/any.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/anyPass.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/apply.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/array.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/ary.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/assign.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/assignAll.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/assignAllWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/assignIn.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/assignInAll.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/assignInAllWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/assignInWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/assignWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/assoc.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/assocPath.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/at.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/attempt.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/before.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/bind.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/bindAll.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/bindKey.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/camelCase.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/capitalize.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/castArray.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/ceil.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/chain.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/chunk.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/clamp.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/clone.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/cloneDeep.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/cloneDeepWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/cloneWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/collection.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/commit.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/compact.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/complement.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/compose.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/concat.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/cond.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/conforms.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/conformsTo.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/constant.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/contains.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/convert.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/countBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/create.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/curry.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/curryN.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/curryRight.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/curryRightN.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/date.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/debounce.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/deburr.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/defaultTo.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/defaults.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/defaultsAll.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/defaultsDeep.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/defaultsDeepAll.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/defer.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/delay.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/difference.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/differenceBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/differenceWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/dissoc.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/dissocPath.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/divide.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/drop.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/dropLast.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/dropLastWhile.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/dropRight.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/dropRightWhile.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/dropWhile.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/each.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/eachRight.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/endsWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/entries.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/entriesIn.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/eq.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/equals.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/escape.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/escapeRegExp.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/every.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/extend.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/extendAll.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/extendAllWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/extendWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/fill.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/filter.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/find.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/findFrom.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/findIndex.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/findIndexFrom.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/findKey.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/findLast.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/findLastFrom.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/findLastIndex.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/findLastIndexFrom.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/findLastKey.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/first.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/flatMap.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/flatMapDeep.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/flatMapDepth.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/flatten.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/flattenDeep.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/flattenDepth.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/flip.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/floor.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/flow.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/flowRight.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/forEach.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/forEachRight.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/forIn.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/forInRight.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/forOwn.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/forOwnRight.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/fromPairs.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/function.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/functions.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/functionsIn.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/get.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/getOr.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/groupBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/gt.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/gte.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/has.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/hasIn.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/head.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/identical.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/identity.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/inRange.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/includes.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/includesFrom.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/indexBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/indexOf.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/indexOfFrom.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/init.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/initial.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/intersection.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/intersectionBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/intersectionWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/invert.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/invertBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/invertObj.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/invoke.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/invokeArgs.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/invokeArgsMap.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/invokeMap.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/isArguments.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/isArray.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/isArrayBuffer.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/isArrayLike.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/isArrayLikeObject.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/isBoolean.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/isBuffer.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/isDate.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/isElement.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/isEmpty.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/isEqual.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/isEqualWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/isError.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/isFinite.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/isFunction.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/isInteger.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/isLength.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/isMap.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/isMatch.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/isMatchWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/isNaN.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/isNative.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/isNil.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/isNull.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/isNumber.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/isObject.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/isObjectLike.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/isPlainObject.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/isRegExp.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/isSafeInteger.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/isSet.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/isString.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/isSymbol.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/isTypedArray.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/isUndefined.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/isWeakMap.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/isWeakSet.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/iteratee.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/join.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/juxt.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/kebabCase.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/keyBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/keys.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/keysIn.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/lang.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/last.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/lastIndexOf.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/lastIndexOfFrom.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/lowerCase.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/lowerFirst.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/lt.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/lte.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/map.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/mapKeys.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/mapValues.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/matches.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/matchesProperty.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/math.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/max.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/maxBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/mean.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/meanBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/memoize.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/merge.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/mergeAll.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/mergeAllWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/mergeWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/method.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/methodOf.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/min.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/minBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/mixin.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/multiply.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/nAry.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/negate.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/next.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/noop.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/now.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/nth.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/nthArg.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/number.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/object.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/omit.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/omitAll.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/omitBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/once.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/orderBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/over.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/overArgs.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/overEvery.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/overSome.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/pad.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/padChars.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/padCharsEnd.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/padCharsStart.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/padEnd.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/padStart.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/parseInt.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/partial.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/partialRight.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/partition.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/path.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/pathEq.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/pathOr.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/paths.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/pick.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/pickAll.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/pickBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/pipe.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/placeholder.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/plant.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/pluck.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/prop.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/propEq.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/propOr.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/property.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/propertyOf.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/props.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/pull.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/pullAll.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/pullAllBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/pullAllWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/pullAt.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/random.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/range.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/rangeRight.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/rangeStep.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/rangeStepRight.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/rearg.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/reduce.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/reduceRight.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/reject.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/remove.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/repeat.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/replace.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/rest.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/restFrom.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/result.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/reverse.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/round.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/sample.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/sampleSize.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/seq.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/set.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/setWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/shuffle.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/size.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/slice.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/snakeCase.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/some.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/sortBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/sortedIndex.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/sortedIndexBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/sortedIndexOf.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/sortedLastIndex.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/sortedLastIndexBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/sortedLastIndexOf.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/sortedUniq.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/sortedUniqBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/split.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/spread.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/spreadFrom.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/startCase.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/startsWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/string.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/stubArray.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/stubFalse.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/stubObject.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/stubString.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/stubTrue.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/subtract.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/sum.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/sumBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/symmetricDifference.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/symmetricDifferenceBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/symmetricDifferenceWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/tail.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/take.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/takeLast.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/takeLastWhile.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/takeRight.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/takeRightWhile.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/takeWhile.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/tap.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/template.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/templateSettings.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/throttle.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/thru.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/times.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/toArray.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/toFinite.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/toInteger.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/toIterator.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/toJSON.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/toLength.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/toLower.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/toNumber.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/toPairs.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/toPairsIn.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/toPath.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/toPlainObject.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/toSafeInteger.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/toString.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/toUpper.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/transform.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/trim.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/trimChars.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/trimCharsEnd.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/trimCharsStart.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/trimEnd.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/trimStart.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/truncate.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/unapply.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/unary.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/unescape.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/union.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/unionBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/unionWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/uniq.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/uniqBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/uniqWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/uniqueId.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/unnest.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/unset.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/unzip.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/unzipWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/update.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/updateWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/upperCase.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/upperFirst.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/useWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/util.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/value.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/valueOf.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/values.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/valuesIn.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/where.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/whereEq.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/without.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/words.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/wrap.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/wrapperAt.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/wrapperChain.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/wrapperLodash.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/wrapperReverse.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/wrapperValue.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/xor.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/xorBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/xorWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/zip.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/zipAll.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/zipObj.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/zipObject.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/zipObjectDeep.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fp/zipWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/fromPairs.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/function.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/functions.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/functionsIn.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/get.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/groupBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/gt.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/gte.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/has.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/hasIn.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/head.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/identity.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/inRange.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/includes.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/index.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/indexOf.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/initial.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/intersection.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/intersectionBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/intersectionWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/invert.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/invertBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/invoke.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/invokeMap.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/isArguments.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/isArray.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/isArrayBuffer.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/isArrayLike.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/isArrayLikeObject.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/isBoolean.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/isBuffer.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/isDate.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/isElement.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/isEmpty.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/isEqual.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/isEqualWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/isError.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/isFinite.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/isFunction.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/isInteger.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/isLength.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/isMap.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/isMatch.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/isMatchWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/isNaN.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/isNative.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/isNil.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/isNull.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/isNumber.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/isObject.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/isObjectLike.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/isPlainObject.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/isRegExp.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/isSafeInteger.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/isSet.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/isString.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/isSymbol.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/isTypedArray.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/isUndefined.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/isWeakMap.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/isWeakSet.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/iteratee.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/join.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/kebabCase.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/keyBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/keys.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/keysIn.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/lang.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/last.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/lastIndexOf.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/lodash.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/lodash.min.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/lowerCase.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/lowerFirst.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/lt.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/lte.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/map.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/mapKeys.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/mapValues.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/matches.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/matchesProperty.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/math.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/max.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/maxBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/mean.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/meanBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/memoize.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/merge.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/mergeWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/method.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/methodOf.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/min.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/minBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/mixin.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/multiply.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/negate.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/next.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/noop.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/now.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/nth.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/nthArg.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/number.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/object.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/omit.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/omitBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/once.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/orderBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/over.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/overArgs.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/overEvery.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/overSome.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/package.json create mode 100644 node_modules/sequelize-cli/node_modules/lodash/pad.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/padEnd.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/padStart.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/parseInt.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/partial.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/partialRight.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/partition.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/pick.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/pickBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/plant.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/property.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/propertyOf.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/pull.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/pullAll.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/pullAllBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/pullAllWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/pullAt.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/random.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/range.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/rangeRight.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/rearg.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/reduce.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/reduceRight.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/reject.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/remove.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/repeat.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/replace.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/rest.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/result.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/reverse.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/round.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/sample.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/sampleSize.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/seq.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/set.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/setWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/shuffle.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/size.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/slice.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/snakeCase.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/some.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/sortBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/sortedIndex.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/sortedIndexBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/sortedIndexOf.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/sortedLastIndex.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/sortedLastIndexBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/sortedLastIndexOf.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/sortedUniq.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/sortedUniqBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/split.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/spread.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/startCase.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/startsWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/string.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/stubArray.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/stubFalse.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/stubObject.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/stubString.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/stubTrue.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/subtract.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/sum.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/sumBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/tail.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/take.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/takeRight.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/takeRightWhile.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/takeWhile.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/tap.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/template.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/templateSettings.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/throttle.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/thru.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/times.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/toArray.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/toFinite.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/toInteger.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/toIterator.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/toJSON.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/toLength.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/toLower.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/toNumber.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/toPairs.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/toPairsIn.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/toPath.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/toPlainObject.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/toSafeInteger.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/toString.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/toUpper.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/transform.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/trim.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/trimEnd.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/trimStart.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/truncate.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/unary.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/unescape.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/union.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/unionBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/unionWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/uniq.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/uniqBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/uniqWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/uniqueId.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/unset.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/unzip.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/unzipWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/update.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/updateWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/upperCase.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/upperFirst.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/util.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/value.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/valueOf.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/values.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/valuesIn.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/without.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/words.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/wrap.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/wrapperAt.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/wrapperChain.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/wrapperLodash.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/wrapperReverse.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/wrapperValue.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/xor.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/xorBy.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/xorWith.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/zip.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/zipObject.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/zipObjectDeep.js create mode 100644 node_modules/sequelize-cli/node_modules/lodash/zipWith.js create mode 100644 node_modules/sequelize-cli/node_modules/yargs/CHANGELOG.md create mode 100644 node_modules/sequelize-cli/node_modules/yargs/LICENSE create mode 100644 node_modules/sequelize-cli/node_modules/yargs/README.md create mode 100644 node_modules/sequelize-cli/node_modules/yargs/completion.sh.hbs create mode 100644 node_modules/sequelize-cli/node_modules/yargs/index.js create mode 100644 node_modules/sequelize-cli/node_modules/yargs/lib/apply-extends.js create mode 100644 node_modules/sequelize-cli/node_modules/yargs/lib/argsert.js create mode 100644 node_modules/sequelize-cli/node_modules/yargs/lib/assign.js create mode 100644 node_modules/sequelize-cli/node_modules/yargs/lib/command.js create mode 100644 node_modules/sequelize-cli/node_modules/yargs/lib/completion.js create mode 100644 node_modules/sequelize-cli/node_modules/yargs/lib/levenshtein.js create mode 100644 node_modules/sequelize-cli/node_modules/yargs/lib/obj-filter.js create mode 100644 node_modules/sequelize-cli/node_modules/yargs/lib/usage.js create mode 100644 node_modules/sequelize-cli/node_modules/yargs/lib/validation.js create mode 100644 node_modules/sequelize-cli/node_modules/yargs/lib/yerror.js create mode 100644 node_modules/sequelize-cli/node_modules/yargs/locales/be.json create mode 100644 node_modules/sequelize-cli/node_modules/yargs/locales/de.json create mode 100644 node_modules/sequelize-cli/node_modules/yargs/locales/en.json create mode 100644 node_modules/sequelize-cli/node_modules/yargs/locales/es.json create mode 100644 node_modules/sequelize-cli/node_modules/yargs/locales/fr.json create mode 100644 node_modules/sequelize-cli/node_modules/yargs/locales/hi.json create mode 100644 node_modules/sequelize-cli/node_modules/yargs/locales/hu.json create mode 100644 node_modules/sequelize-cli/node_modules/yargs/locales/id.json create mode 100644 node_modules/sequelize-cli/node_modules/yargs/locales/it.json create mode 100644 node_modules/sequelize-cli/node_modules/yargs/locales/ja.json create mode 100644 node_modules/sequelize-cli/node_modules/yargs/locales/ko.json create mode 100644 node_modules/sequelize-cli/node_modules/yargs/locales/nb.json create mode 100644 node_modules/sequelize-cli/node_modules/yargs/locales/nl.json create mode 100644 node_modules/sequelize-cli/node_modules/yargs/locales/pirate.json create mode 100644 node_modules/sequelize-cli/node_modules/yargs/locales/pl.json create mode 100644 node_modules/sequelize-cli/node_modules/yargs/locales/pt.json create mode 100644 node_modules/sequelize-cli/node_modules/yargs/locales/pt_BR.json create mode 100644 node_modules/sequelize-cli/node_modules/yargs/locales/ru.json create mode 100644 node_modules/sequelize-cli/node_modules/yargs/locales/th.json create mode 100644 node_modules/sequelize-cli/node_modules/yargs/locales/tr.json create mode 100644 node_modules/sequelize-cli/node_modules/yargs/locales/zh_CN.json create mode 100644 node_modules/sequelize-cli/node_modules/yargs/locales/zh_TW.json create mode 100644 node_modules/sequelize-cli/node_modules/yargs/package.json create mode 100644 node_modules/sequelize-cli/node_modules/yargs/yargs.js create mode 100644 node_modules/sequelize-cli/package.json create mode 100644 node_modules/sequelize-cli/test/.jshintrc create mode 100644 node_modules/sequelize-cli/test/db/migrate-json.test.js create mode 100644 node_modules/sequelize-cli/test/db/migrate.test.js create mode 100644 node_modules/sequelize-cli/test/db/migrate/old_schema.test.js create mode 100644 node_modules/sequelize-cli/test/db/migrate/status.test.js create mode 100644 node_modules/sequelize-cli/test/db/migrate/undo.test.js create mode 100644 node_modules/sequelize-cli/test/db/migrate/undo/all.test.js create mode 100644 node_modules/sequelize-cli/test/db/seed-json.test.js create mode 100644 node_modules/sequelize-cli/test/db/seed.test.js create mode 100644 node_modules/sequelize-cli/test/db/seed/all.test.js create mode 100644 node_modules/sequelize-cli/test/db/seed/undo.test.js create mode 100644 node_modules/sequelize-cli/test/db/seed/undo/all.test.js create mode 100644 node_modules/sequelize-cli/test/environment-variable.test.js create mode 100644 node_modules/sequelize-cli/test/help.test.js create mode 100644 node_modules/sequelize-cli/test/init.test.js create mode 100644 node_modules/sequelize-cli/test/migration/create.test.js create mode 100644 node_modules/sequelize-cli/test/model/create.test.js create mode 100644 node_modules/sequelize-cli/test/options.test.js create mode 100644 node_modules/sequelize-cli/test/seed/create.test.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20111117063700-createPerson.coffee create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20111117063700-createPerson.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20111130161100-emptyMigration.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20111205064000-renamePersonToUser.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20111205162700-addSignatureColumnToUser.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20111205167000-addUniqueNameColumnToUser.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20111206061400-removeShopIdColumnFromUser.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20111206063000-changeSignatureColumnOfUserToMendatory.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20111206163300-renameSignatureColumnOfUserToSig.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20130909174103-createFunctionGetAnAnswer.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20130909174253-renameFunctionGetAnAnswerGetTheAnswer.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20130909175000-deleteFunctionGetTheAnswer.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20130909175939-createTestTableForTrigger.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20130909180846-createTriggerOnTriggerTestTable.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20130909181148-renameTriggerUpdatedAtToUpdateUpdatedAt.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20130909185621-deleteTriggerUpdateUpdatedAt.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/invalid/20141208213500-createPerson.coffee create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/invalid/20141208213500-createPerson.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/new/20141208213500-createPerson.coffee create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/new/20141208213500-createPerson.js create mode 100644 node_modules/sequelize-cli/test/support/assets/project.js create mode 100644 node_modules/sequelize-cli/test/support/assets/seeders/20111117063700-seedPerson.coffee create mode 100644 node_modules/sequelize-cli/test/support/assets/seeders/20111117063700-seedPerson.js create mode 100644 node_modules/sequelize-cli/test/support/assets/seeders/20111117063900-seedPerson2.js create mode 100644 node_modules/sequelize-cli/test/support/assets/seeders/new/20141208213500-seedPerson.coffee create mode 100644 node_modules/sequelize-cli/test/support/assets/seeders/new/20141208213500-seedPerson.coffee~ create mode 100644 node_modules/sequelize-cli/test/support/assets/seeders/new/20141208213500-seedPerson.js create mode 100644 node_modules/sequelize-cli/test/support/config/config.js create mode 100644 node_modules/sequelize-cli/test/support/config/options.js create mode 100644 node_modules/sequelize-cli/test/support/helpers.js create mode 100644 node_modules/sequelize-cli/test/support/index.js create mode 100644 node_modules/sequelize-cli/test/url.test.js create mode 100644 node_modules/sequelize-cli/test/version.test.js create mode 100644 node_modules/sequelize-cli/var/vagrant/README.md create mode 100644 node_modules/sequelize-cli/var/vagrant/Vagrantfile create mode 100644 node_modules/sequelize-cli/var/vagrant/provision.sh create mode 100644 node_modules/sequelize/.dockerignore create mode 100644 node_modules/sequelize/.editorconfig create mode 100644 node_modules/sequelize/.github/ISSUE_TEMPLATE.md create mode 100644 node_modules/sequelize/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 node_modules/sequelize/.gitmodules create mode 100644 node_modules/sequelize/.idea/dictionaries/jan.xml create mode 100644 node_modules/sequelize/.idea/encodings.xml create mode 100644 node_modules/sequelize/.idea/inspectionProfiles/Project_Default.xml create mode 100644 node_modules/sequelize/.idea/inspectionProfiles/profiles_settings.xml create mode 100644 node_modules/sequelize/.idea/jsLibraryMappings.xml create mode 100644 node_modules/sequelize/.idea/jsLinters/jshint.xml create mode 100644 node_modules/sequelize/.idea/misc.xml create mode 100644 node_modules/sequelize/.idea/modules.xml create mode 100644 node_modules/sequelize/.idea/sequelize.iml create mode 100644 node_modules/sequelize/.idea/vcs.xml create mode 100644 node_modules/sequelize/.idea/watcherTasks.xml create mode 100644 node_modules/sequelize/.idea/workspace.xml create mode 100644 node_modules/sequelize/.jshintrc create mode 100644 node_modules/sequelize/.npmignore create mode 100644 node_modules/sequelize/.travis.yml create mode 100644 node_modules/sequelize/CONTRIBUTING.DOCS.md create mode 100644 node_modules/sequelize/CONTRIBUTING.md create mode 100644 node_modules/sequelize/Dockerfile create mode 100644 node_modules/sequelize/LICENSE create mode 100644 node_modules/sequelize/README.md create mode 100644 node_modules/sequelize/appveyor-setup.ps1 create mode 100644 node_modules/sequelize/appveyor.yml create mode 100644 node_modules/sequelize/changelog.md create mode 100644 node_modules/sequelize/codecov.yml create mode 100644 node_modules/sequelize/docker-compose.yml create mode 100644 node_modules/sequelize/index.js create mode 100644 node_modules/sequelize/lib/associations/base.js create mode 100644 node_modules/sequelize/lib/associations/belongs-to-many.js create mode 100644 node_modules/sequelize/lib/associations/belongs-to.js create mode 100644 node_modules/sequelize/lib/associations/has-many.js create mode 100644 node_modules/sequelize/lib/associations/has-one.js create mode 100644 node_modules/sequelize/lib/associations/helpers.js create mode 100644 node_modules/sequelize/lib/associations/index.js create mode 100644 node_modules/sequelize/lib/associations/mixin.js create mode 100644 node_modules/sequelize/lib/data-types.js create mode 100644 node_modules/sequelize/lib/deferrable.js create mode 100644 node_modules/sequelize/lib/dialects/abstract/connection-manager.js create mode 100644 node_modules/sequelize/lib/dialects/abstract/index.js create mode 100644 node_modules/sequelize/lib/dialects/abstract/query-generator.js create mode 100755 node_modules/sequelize/lib/dialects/abstract/query.js create mode 100644 node_modules/sequelize/lib/dialects/mariadb/index.js create mode 100644 node_modules/sequelize/lib/dialects/mssql/connection-manager.js create mode 100644 node_modules/sequelize/lib/dialects/mssql/data-types.js create mode 100644 node_modules/sequelize/lib/dialects/mssql/index.js create mode 100644 node_modules/sequelize/lib/dialects/mssql/query-generator.js create mode 100644 node_modules/sequelize/lib/dialects/mssql/query-interface.js create mode 100644 node_modules/sequelize/lib/dialects/mssql/query.js create mode 100644 node_modules/sequelize/lib/dialects/mssql/resource-lock.js create mode 100644 node_modules/sequelize/lib/dialects/mysql/connection-manager.js create mode 100644 node_modules/sequelize/lib/dialects/mysql/data-types.js create mode 100644 node_modules/sequelize/lib/dialects/mysql/index.js create mode 100644 node_modules/sequelize/lib/dialects/mysql/query-generator.js create mode 100644 node_modules/sequelize/lib/dialects/mysql/query-interface.js create mode 100644 node_modules/sequelize/lib/dialects/mysql/query.js create mode 100644 node_modules/sequelize/lib/dialects/parserStore.js create mode 100644 node_modules/sequelize/lib/dialects/postgres/connection-manager.js create mode 100644 node_modules/sequelize/lib/dialects/postgres/data-types.js create mode 100644 node_modules/sequelize/lib/dialects/postgres/hstore.js create mode 100644 node_modules/sequelize/lib/dialects/postgres/index.js create mode 100644 node_modules/sequelize/lib/dialects/postgres/query-generator.js create mode 100644 node_modules/sequelize/lib/dialects/postgres/query.js create mode 100644 node_modules/sequelize/lib/dialects/postgres/range.js create mode 100644 node_modules/sequelize/lib/dialects/sqlite/connection-manager.js create mode 100644 node_modules/sequelize/lib/dialects/sqlite/data-types.js create mode 100644 node_modules/sequelize/lib/dialects/sqlite/index.js create mode 100644 node_modules/sequelize/lib/dialects/sqlite/query-generator.js create mode 100644 node_modules/sequelize/lib/dialects/sqlite/query-interface.js create mode 100644 node_modules/sequelize/lib/dialects/sqlite/query.js create mode 100644 node_modules/sequelize/lib/errors.js create mode 100644 node_modules/sequelize/lib/hooks.js create mode 100644 node_modules/sequelize/lib/instance-validator.js create mode 100644 node_modules/sequelize/lib/instance.js create mode 100644 node_modules/sequelize/lib/model-manager.js create mode 100644 node_modules/sequelize/lib/model.js create mode 100644 node_modules/sequelize/lib/model/attribute.js create mode 100644 node_modules/sequelize/lib/plugins/counter-cache.js create mode 100644 node_modules/sequelize/lib/promise.js create mode 100644 node_modules/sequelize/lib/query-interface.js create mode 100644 node_modules/sequelize/lib/query-types.js create mode 100755 node_modules/sequelize/lib/sequelize.js create mode 100644 node_modules/sequelize/lib/sql-string.js create mode 100644 node_modules/sequelize/lib/transaction.js create mode 100644 node_modules/sequelize/lib/utils.js create mode 100644 node_modules/sequelize/lib/utils/parameter-validator.js create mode 100644 node_modules/sequelize/lib/utils/validator-extras.js create mode 100644 node_modules/sequelize/mkdocs.yml create mode 120000 node_modules/sequelize/node_modules/.bin/semver create mode 100644 node_modules/sequelize/node_modules/generic-pool/.eslintrc.js create mode 100644 node_modules/sequelize/node_modules/generic-pool/.npmignore create mode 100644 node_modules/sequelize/node_modules/generic-pool/.travis.yml create mode 100644 node_modules/sequelize/node_modules/generic-pool/CHANGELOG.md create mode 100644 node_modules/sequelize/node_modules/generic-pool/Makefile create mode 100644 node_modules/sequelize/node_modules/generic-pool/README.md create mode 100644 node_modules/sequelize/node_modules/generic-pool/bugs/128.js create mode 100644 node_modules/sequelize/node_modules/generic-pool/fabfile.py create mode 100644 node_modules/sequelize/node_modules/generic-pool/lib/generic-pool.js create mode 100644 node_modules/sequelize/node_modules/generic-pool/package.json create mode 100644 node_modules/sequelize/node_modules/generic-pool/test/generic-pool.test.js create mode 100644 node_modules/sequelize/node_modules/semver/LICENSE create mode 100644 node_modules/sequelize/node_modules/semver/README.md create mode 100755 node_modules/sequelize/node_modules/semver/bin/semver create mode 100644 node_modules/sequelize/node_modules/semver/package.json create mode 100644 node_modules/sequelize/node_modules/semver/range.bnf create mode 100644 node_modules/sequelize/node_modules/semver/semver.js create mode 100644 node_modules/sequelize/package.json create mode 100644 node_modules/sequelize/sscce_template.js create mode 100644 node_modules/sequelize/test-app.js create mode 100644 node_modules/sequencify/.npmignore create mode 100644 node_modules/sequencify/.travis.yml create mode 100644 node_modules/sequencify/LICENSE create mode 100644 node_modules/sequencify/README.md create mode 100644 node_modules/sequencify/index.js create mode 100644 node_modules/sequencify/package.json create mode 100644 node_modules/serve-favicon/HISTORY.md create mode 100644 node_modules/serve-favicon/LICENSE create mode 100644 node_modules/serve-favicon/README.md create mode 100644 node_modules/serve-favicon/index.js create mode 100644 node_modules/serve-favicon/package.json create mode 100644 node_modules/serve-static/HISTORY.md create mode 100644 node_modules/serve-static/LICENSE create mode 100644 node_modules/serve-static/README.md create mode 100644 node_modules/serve-static/index.js create mode 100644 node_modules/serve-static/package.json create mode 100644 node_modules/set-blocking/CHANGELOG.md create mode 100644 node_modules/set-blocking/LICENSE.txt create mode 100644 node_modules/set-blocking/README.md create mode 100644 node_modules/set-blocking/index.js create mode 100644 node_modules/set-blocking/package.json create mode 100644 node_modules/setprototypeof/LICENSE create mode 100644 node_modules/setprototypeof/README.md create mode 100644 node_modules/setprototypeof/index.js create mode 100644 node_modules/setprototypeof/package.json create mode 100644 node_modules/shebang-command/index.js create mode 100644 node_modules/shebang-command/license create mode 100644 node_modules/shebang-command/package.json create mode 100644 node_modules/shebang-command/readme.md create mode 100644 node_modules/shebang-regex/index.js create mode 100644 node_modules/shebang-regex/license create mode 100644 node_modules/shebang-regex/package.json create mode 100644 node_modules/shebang-regex/readme.md create mode 100644 node_modules/shimmer/.npmignore create mode 100644 node_modules/shimmer/.travis.yml create mode 100644 node_modules/shimmer/README.md create mode 100644 node_modules/shimmer/index.js create mode 100644 node_modules/shimmer/package.json create mode 100644 node_modules/shimmer/test/init.tap.js create mode 100644 node_modules/shimmer/test/massWrap.tap.js create mode 100644 node_modules/shimmer/test/unwrap.tap.js create mode 100644 node_modules/shimmer/test/wrap.tap.js create mode 100644 node_modules/sigmund/LICENSE create mode 100644 node_modules/sigmund/README.md create mode 100644 node_modules/sigmund/bench.js create mode 100644 node_modules/sigmund/package.json create mode 100644 node_modules/sigmund/sigmund.js create mode 100644 node_modules/sigmund/test/basic.js create mode 100644 node_modules/source-map/README.md create mode 100644 node_modules/source-map/build/assert-shim.js create mode 100644 node_modules/source-map/build/mini-require.js create mode 100644 node_modules/source-map/build/prefix-source-map.jsm create mode 100644 node_modules/source-map/build/prefix-utils.jsm create mode 100644 node_modules/source-map/build/suffix-browser.js create mode 100644 node_modules/source-map/build/suffix-source-map.jsm create mode 100644 node_modules/source-map/build/suffix-utils.jsm create mode 100644 node_modules/source-map/build/test-prefix.js create mode 100644 node_modules/source-map/build/test-suffix.js create mode 100644 node_modules/source-map/lib/source-map.js create mode 100644 node_modules/source-map/lib/source-map/array-set.js create mode 100644 node_modules/source-map/lib/source-map/base64-vlq.js create mode 100644 node_modules/source-map/lib/source-map/base64.js create mode 100644 node_modules/source-map/lib/source-map/binary-search.js create mode 100644 node_modules/source-map/lib/source-map/mapping-list.js create mode 100644 node_modules/source-map/lib/source-map/quick-sort.js create mode 100644 node_modules/source-map/lib/source-map/source-map-consumer.js create mode 100644 node_modules/source-map/lib/source-map/source-map-generator.js create mode 100644 node_modules/source-map/lib/source-map/source-node.js create mode 100644 node_modules/source-map/lib/source-map/util.js create mode 100644 node_modules/source-map/package.json create mode 100644 node_modules/sparkles/LICENSE create mode 100644 node_modules/sparkles/README.md create mode 100644 node_modules/sparkles/index.js create mode 100644 node_modules/sparkles/package.json create mode 100644 node_modules/spdx-correct/LICENSE create mode 100644 node_modules/spdx-correct/README.md create mode 100644 node_modules/spdx-correct/index.js create mode 100644 node_modules/spdx-correct/package.json create mode 100644 node_modules/spdx-expression-parse/AUTHORS create mode 100644 node_modules/spdx-expression-parse/LICENSE create mode 100644 node_modules/spdx-expression-parse/README.md create mode 100644 node_modules/spdx-expression-parse/index.js create mode 100644 node_modules/spdx-expression-parse/package.json create mode 100644 node_modules/spdx-expression-parse/parser.js create mode 100644 node_modules/spdx-license-ids/LICENSE create mode 100755 node_modules/spdx-license-ids/README.md create mode 100644 node_modules/spdx-license-ids/package.json create mode 100644 node_modules/spdx-license-ids/spdx-license-ids.json create mode 100644 node_modules/split/.npmignore create mode 100644 node_modules/split/.travis.yml create mode 100644 node_modules/split/LICENCE create mode 100644 node_modules/split/examples/pretty.js create mode 100644 node_modules/split/index.js create mode 100644 node_modules/split/package.json create mode 100644 node_modules/split/readme.markdown create mode 100644 node_modules/split/test/options.asynct.js create mode 100644 node_modules/split/test/partitioned_unicode.js create mode 100644 node_modules/split/test/split.asynct.js create mode 100644 node_modules/split/test/try_catch.asynct.js create mode 100644 node_modules/statuses/HISTORY.md create mode 100644 node_modules/statuses/LICENSE create mode 100644 node_modules/statuses/README.md create mode 100644 node_modules/statuses/codes.json create mode 100644 node_modules/statuses/index.js create mode 100644 node_modules/statuses/package.json create mode 100644 node_modules/stream-consume/.npmignore create mode 100644 node_modules/stream-consume/README.md create mode 100644 node_modules/stream-consume/index.js create mode 100644 node_modules/stream-consume/package.json create mode 100644 node_modules/stream-consume/test/tests.js create mode 100644 node_modules/string-width/index.js create mode 100644 node_modules/string-width/license create mode 100644 node_modules/string-width/package.json create mode 100644 node_modules/string-width/readme.md create mode 100644 node_modules/string_decoder/.npmignore create mode 100644 node_modules/string_decoder/LICENSE create mode 100644 node_modules/string_decoder/README.md create mode 100644 node_modules/string_decoder/index.js create mode 100644 node_modules/string_decoder/package.json create mode 100644 node_modules/strip-ansi/index.js create mode 100644 node_modules/strip-ansi/license create mode 100644 node_modules/strip-ansi/package.json create mode 100644 node_modules/strip-ansi/readme.md create mode 100755 node_modules/strip-bom/cli.js create mode 100644 node_modules/strip-bom/index.js create mode 100644 node_modules/strip-bom/package.json create mode 100644 node_modules/strip-bom/readme.md create mode 100644 node_modules/supports-color/index.js create mode 100644 node_modules/supports-color/license create mode 100644 node_modules/supports-color/package.json create mode 100644 node_modules/supports-color/readme.md create mode 100644 node_modules/terraformer-wkt-parser/.npmignore create mode 100644 node_modules/terraformer-wkt-parser/.travis.yml create mode 100644 node_modules/terraformer-wkt-parser/AUTHORS create mode 100644 node_modules/terraformer-wkt-parser/CHANGELOG.md create mode 100644 node_modules/terraformer-wkt-parser/Gruntfile.js create mode 100644 node_modules/terraformer-wkt-parser/LICENSE create mode 100644 node_modules/terraformer-wkt-parser/README.md create mode 100644 node_modules/terraformer-wkt-parser/bower.json create mode 100644 node_modules/terraformer-wkt-parser/coverage/__root__/index.html create mode 100644 node_modules/terraformer-wkt-parser/coverage/__root__/terraformer-wkt-parser.js.html create mode 100644 node_modules/terraformer-wkt-parser/coverage/base.css create mode 100644 node_modules/terraformer-wkt-parser/coverage/coverage.json create mode 100644 node_modules/terraformer-wkt-parser/coverage/dist/index.html create mode 100644 node_modules/terraformer-wkt-parser/coverage/dist/terraformer-wkt-parser.js.html create mode 100644 node_modules/terraformer-wkt-parser/coverage/index.html create mode 100644 node_modules/terraformer-wkt-parser/coverage/prettify.css create mode 100644 node_modules/terraformer-wkt-parser/coverage/prettify.js create mode 100644 node_modules/terraformer-wkt-parser/coverage/sort-arrow-sprite.png create mode 100644 node_modules/terraformer-wkt-parser/coverage/sorter.js create mode 100644 node_modules/terraformer-wkt-parser/dist/terraformer-wkt-parser.js create mode 100644 node_modules/terraformer-wkt-parser/dist/terraformer-wkt-parser.min.js create mode 100644 node_modules/terraformer-wkt-parser/examples/feature_collection.json create mode 100644 node_modules/terraformer-wkt-parser/examples/linestring.json create mode 100644 node_modules/terraformer-wkt-parser/examples/linestring.wkt create mode 100644 node_modules/terraformer-wkt-parser/examples/multi_linestring.json create mode 100644 node_modules/terraformer-wkt-parser/examples/multi_linestring.wkt create mode 100644 node_modules/terraformer-wkt-parser/examples/multi_polygon.json create mode 100644 node_modules/terraformer-wkt-parser/examples/multi_polygon.wkt create mode 100644 node_modules/terraformer-wkt-parser/examples/multi_polygon_with_hole.wkt create mode 100644 node_modules/terraformer-wkt-parser/examples/multipoint.json create mode 100644 node_modules/terraformer-wkt-parser/examples/multipoint.wkt create mode 100644 node_modules/terraformer-wkt-parser/examples/multipoint_alternate.wkt create mode 100644 node_modules/terraformer-wkt-parser/examples/point.json create mode 100644 node_modules/terraformer-wkt-parser/examples/point.wkt create mode 100644 node_modules/terraformer-wkt-parser/examples/polygon.json create mode 100644 node_modules/terraformer-wkt-parser/examples/polygon.wkt create mode 100644 node_modules/terraformer-wkt-parser/examples/polygon_with_dots.wkt create mode 100644 node_modules/terraformer-wkt-parser/examples/polygon_with_hole.json create mode 100644 node_modules/terraformer-wkt-parser/examples/polygon_with_hole.wkt create mode 100644 node_modules/terraformer-wkt-parser/package.json create mode 100644 node_modules/terraformer-wkt-parser/spec/wktSpec.js create mode 100644 node_modules/terraformer-wkt-parser/src/module-source.js create mode 100644 node_modules/terraformer-wkt-parser/src/wkt.yy create mode 100644 node_modules/terraformer-wkt-parser/terraformer-wkt-parser.d.ts create mode 100644 node_modules/terraformer-wkt-parser/terraformer-wkt-parser.js create mode 100644 node_modules/terraformer-wkt-parser/terraformer-wkt-parser.min.js create mode 100644 node_modules/terraformer-wkt-parser/test.js create mode 100644 node_modules/terraformer-wkt-parser/test.ts create mode 100644 node_modules/terraformer-wkt-parser/test/convert-test.js create mode 100644 node_modules/terraformer-wkt-parser/test/terraformer-parse-test.js create mode 100644 node_modules/terraformer-wkt-parser/test/wkt-parse-test.js create mode 100644 node_modules/terraformer-wkt-parser/tsconfig.json create mode 100644 node_modules/terraformer-wkt-parser/typings.json create mode 100644 node_modules/terraformer-wkt-parser/typings/globals/geojson/index.d.ts create mode 100644 node_modules/terraformer-wkt-parser/typings/globals/geojson/typings.json create mode 100644 node_modules/terraformer-wkt-parser/typings/index.d.ts create mode 100644 node_modules/terraformer/.coverage/__root__/index.html create mode 100644 node_modules/terraformer/.coverage/__root__/terraformer.js.html create mode 100644 node_modules/terraformer/.coverage/base.css create mode 100644 node_modules/terraformer/.coverage/coverage.json create mode 100644 node_modules/terraformer/.coverage/index.html create mode 100644 node_modules/terraformer/.coverage/prettify.css create mode 100644 node_modules/terraformer/.coverage/prettify.js create mode 100644 node_modules/terraformer/.coverage/sort-arrow-sprite.png create mode 100644 node_modules/terraformer/.coverage/sorter.js create mode 100644 node_modules/terraformer/.npmignore create mode 100755 node_modules/terraformer/.travis.yml create mode 100644 node_modules/terraformer/CHANGELOG.md create mode 100644 node_modules/terraformer/Gemfile create mode 100644 node_modules/terraformer/Gemfile.lock create mode 100755 node_modules/terraformer/LICENSE create mode 100755 node_modules/terraformer/README.md create mode 100644 node_modules/terraformer/bower.json create mode 100644 node_modules/terraformer/docs-build/CNAME create mode 100644 node_modules/terraformer/docs-build/arcgis-parser/index.html create mode 100644 node_modules/terraformer/docs-build/assets/css/terraformer-02847305.css create mode 100644 node_modules/terraformer/docs-build/assets/fonts/esri-logo-3a94862e.svg create mode 100644 node_modules/terraformer/docs-build/assets/fonts/esri-logo-71163913.ttf create mode 100644 node_modules/terraformer/docs-build/assets/fonts/esri-logo-80bed756.woff create mode 100644 node_modules/terraformer/docs-build/assets/fonts/esri-logo-fc93d7bf.eot create mode 100644 node_modules/terraformer/docs-build/assets/fonts/esri-logo.dev-aed9f839.svg create mode 100644 node_modules/terraformer/docs-build/assets/images/terraformer-arcparser-a0228324.png create mode 100644 node_modules/terraformer/docs-build/assets/images/terraformer-core-93b83c36.png create mode 100644 node_modules/terraformer/docs-build/assets/images/terraformer-geostore-9e09ce2c.png create mode 100644 node_modules/terraformer/docs-build/assets/images/terraformer-parser-a57c9c2d.png create mode 100644 node_modules/terraformer/docs-build/assets/images/terraformer-wktparser-b18bc9d9.png create mode 100644 node_modules/terraformer/docs-build/assets/javascripts/all-da39a3ee.js create mode 100644 node_modules/terraformer/docs-build/assets/javascripts/classie-b6db1f70.js create mode 100644 node_modules/terraformer/docs-build/assets/javascripts/drawer-3a1490eb.js create mode 100644 node_modules/terraformer/docs-build/assets/javascripts/modernizr.custom-cadc78a2.js create mode 100644 node_modules/terraformer/docs-build/core/index.html create mode 100644 node_modules/terraformer/docs-build/favicon.ico create mode 100644 node_modules/terraformer/docs-build/geostore/alternate-indexes/index.html create mode 100644 node_modules/terraformer/docs-build/geostore/core-concepts/index.html create mode 100644 node_modules/terraformer/docs-build/geostore/data-stores/index.html create mode 100644 node_modules/terraformer/docs-build/geostore/index.html create mode 100644 node_modules/terraformer/docs-build/geostore/spatial-indexes/index.html create mode 100644 node_modules/terraformer/docs-build/getting-started/index.html create mode 100644 node_modules/terraformer/docs-build/glossary/index.html create mode 100644 node_modules/terraformer/docs-build/index.html create mode 100644 node_modules/terraformer/docs-build/install/index.html create mode 100644 node_modules/terraformer/docs-build/partials/cover/index.html create mode 100644 node_modules/terraformer/docs-build/partials/doctoc/index.html create mode 100644 node_modules/terraformer/docs-build/partials/footer/index.html create mode 100644 node_modules/terraformer/docs-build/partials/index_partials/arcgis_parser/index.html create mode 100644 node_modules/terraformer/docs-build/partials/index_partials/geostore/index.html create mode 100644 node_modules/terraformer/docs-build/partials/index_partials/terraformer_core/index.html create mode 100644 node_modules/terraformer/docs-build/partials/index_partials/wkt_parser/index.html create mode 100644 node_modules/terraformer/docs-build/partials/nav/index.html create mode 100644 node_modules/terraformer/docs-build/partials/subnav/index.html create mode 100644 node_modules/terraformer/docs-build/wkt-parser/index.html create mode 100755 node_modules/terraformer/gruntfile.js create mode 100644 node_modules/terraformer/package.json create mode 100755 node_modules/terraformer/release.sh create mode 100755 node_modules/terraformer/spec/geojsonHelpers.js create mode 100755 node_modules/terraformer/spec/spatialReferenceSpec.js create mode 100755 node_modules/terraformer/spec/terraformerSpec.js create mode 100644 node_modules/terraformer/terraformer-1.0.8.min.js create mode 100644 node_modules/terraformer/terraformer.d.ts create mode 100755 node_modules/terraformer/terraformer.js create mode 100644 node_modules/terraformer/test.js create mode 100644 node_modules/terraformer/test.ts create mode 100644 node_modules/terraformer/tsconfig.json create mode 100644 node_modules/terraformer/tslint.json create mode 100644 node_modules/through/.travis.yml create mode 100644 node_modules/through/LICENSE.APACHE2 create mode 100644 node_modules/through/LICENSE.MIT create mode 100644 node_modules/through/index.js create mode 100644 node_modules/through/package.json create mode 100644 node_modules/through/readme.markdown create mode 100644 node_modules/through/test/async.js create mode 100644 node_modules/through/test/auto-destroy.js create mode 100644 node_modules/through/test/buffering.js create mode 100644 node_modules/through/test/end.js create mode 100644 node_modules/through/test/index.js create mode 100644 node_modules/through2/.npmignore create mode 100644 node_modules/through2/LICENSE.html create mode 100644 node_modules/through2/LICENSE.md create mode 100644 node_modules/through2/README.md create mode 100644 node_modules/through2/node_modules/readable-stream/.npmignore create mode 100644 node_modules/through2/node_modules/readable-stream/.travis.yml create mode 100644 node_modules/through2/node_modules/readable-stream/CONTRIBUTING.md create mode 100644 node_modules/through2/node_modules/readable-stream/GOVERNANCE.md create mode 100644 node_modules/through2/node_modules/readable-stream/LICENSE create mode 100644 node_modules/through2/node_modules/readable-stream/README.md create mode 100644 node_modules/through2/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md create mode 100644 node_modules/through2/node_modules/readable-stream/duplex-browser.js create mode 100644 node_modules/through2/node_modules/readable-stream/duplex.js create mode 100644 node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js create mode 100644 node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js create mode 100644 node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js create mode 100644 node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js create mode 100644 node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js create mode 100644 node_modules/through2/node_modules/readable-stream/lib/internal/streams/BufferList.js create mode 100644 node_modules/through2/node_modules/readable-stream/lib/internal/streams/stream-browser.js create mode 100644 node_modules/through2/node_modules/readable-stream/lib/internal/streams/stream.js create mode 100644 node_modules/through2/node_modules/readable-stream/package.json create mode 100644 node_modules/through2/node_modules/readable-stream/passthrough.js create mode 100644 node_modules/through2/node_modules/readable-stream/readable-browser.js create mode 100644 node_modules/through2/node_modules/readable-stream/readable.js create mode 100644 node_modules/through2/node_modules/readable-stream/transform.js create mode 100644 node_modules/through2/node_modules/readable-stream/writable-browser.js create mode 100644 node_modules/through2/node_modules/readable-stream/writable.js create mode 100644 node_modules/through2/node_modules/string_decoder/.npmignore create mode 100644 node_modules/through2/node_modules/string_decoder/LICENSE create mode 100644 node_modules/through2/node_modules/string_decoder/README.md create mode 100644 node_modules/through2/node_modules/string_decoder/lib/string_decoder.js create mode 100644 node_modules/through2/node_modules/string_decoder/package.json create mode 100644 node_modules/through2/package.json create mode 100644 node_modules/through2/through2.js create mode 100644 node_modules/tildify/index.js create mode 100644 node_modules/tildify/license create mode 100644 node_modules/tildify/package.json create mode 100644 node_modules/tildify/readme.md create mode 100644 node_modules/time-stamp/LICENSE create mode 100644 node_modules/time-stamp/README.md create mode 100644 node_modules/time-stamp/index.js create mode 100644 node_modules/time-stamp/package.json create mode 100644 node_modules/timers-ext/.lint create mode 100644 node_modules/timers-ext/.npmignore create mode 100644 node_modules/timers-ext/.travis.yml create mode 100644 node_modules/timers-ext/CHANGES create mode 100644 node_modules/timers-ext/LICENSE create mode 100644 node_modules/timers-ext/README.md create mode 100644 node_modules/timers-ext/delay.js create mode 100644 node_modules/timers-ext/max-timeout.js create mode 100644 node_modules/timers-ext/once.js create mode 100644 node_modules/timers-ext/package.json create mode 100644 node_modules/timers-ext/test/delay.js create mode 100644 node_modules/timers-ext/test/max-timeout.js create mode 100644 node_modules/timers-ext/test/once.js create mode 100644 node_modules/timers-ext/test/throttle.js create mode 100644 node_modules/timers-ext/test/valid-timeout.js create mode 100644 node_modules/timers-ext/throttle.js create mode 100644 node_modules/timers-ext/valid-timeout.js create mode 100644 node_modules/toposort-class/.eslintrc create mode 100644 node_modules/toposort-class/.gitattributes create mode 100644 node_modules/toposort-class/.npmignore create mode 100644 node_modules/toposort-class/LICENSE create mode 100644 node_modules/toposort-class/README.md create mode 100644 node_modules/toposort-class/benchmark/0.3.1/toposort.js create mode 100644 node_modules/toposort-class/benchmark/README.md create mode 100644 node_modules/toposort-class/benchmark/general.js create mode 100644 node_modules/toposort-class/benchmark/results.csv create mode 100644 node_modules/toposort-class/build/toposort.js create mode 100644 node_modules/toposort-class/build/toposort.min.js create mode 100644 node_modules/toposort-class/index.js create mode 100644 node_modules/toposort-class/package.json create mode 100644 node_modules/transformers/.npmignore create mode 100644 node_modules/transformers/README.md create mode 100644 node_modules/transformers/history.md create mode 100644 node_modules/transformers/lib/shared.js create mode 100644 node_modules/transformers/lib/transformers.js create mode 120000 node_modules/transformers/node_modules/.bin/uglifyjs create mode 100644 node_modules/transformers/node_modules/is-promise/.npmignore create mode 100644 node_modules/transformers/node_modules/is-promise/.travis.yml create mode 100644 node_modules/transformers/node_modules/is-promise/LICENSE create mode 100644 node_modules/transformers/node_modules/is-promise/index.js create mode 100644 node_modules/transformers/node_modules/is-promise/package.json create mode 100644 node_modules/transformers/node_modules/is-promise/readme.md create mode 100644 node_modules/transformers/node_modules/promise/.npmignore create mode 100644 node_modules/transformers/node_modules/promise/Readme.md create mode 100644 node_modules/transformers/node_modules/promise/index.js create mode 100644 node_modules/transformers/node_modules/promise/package.json create mode 100644 node_modules/transformers/node_modules/source-map/.npmignore create mode 100644 node_modules/transformers/node_modules/source-map/.travis.yml create mode 100644 node_modules/transformers/node_modules/source-map/CHANGELOG.md create mode 100644 node_modules/transformers/node_modules/source-map/LICENSE create mode 100644 node_modules/transformers/node_modules/source-map/Makefile.dryice.js create mode 100644 node_modules/transformers/node_modules/source-map/README.md create mode 100644 node_modules/transformers/node_modules/source-map/build/assert-shim.js create mode 100644 node_modules/transformers/node_modules/source-map/build/mini-require.js create mode 100644 node_modules/transformers/node_modules/source-map/build/prefix-source-map.jsm create mode 100644 node_modules/transformers/node_modules/source-map/build/prefix-utils.jsm create mode 100644 node_modules/transformers/node_modules/source-map/build/suffix-browser.js create mode 100644 node_modules/transformers/node_modules/source-map/build/suffix-source-map.jsm create mode 100644 node_modules/transformers/node_modules/source-map/build/suffix-utils.jsm create mode 100644 node_modules/transformers/node_modules/source-map/build/test-prefix.js create mode 100644 node_modules/transformers/node_modules/source-map/build/test-suffix.js create mode 100644 node_modules/transformers/node_modules/source-map/lib/source-map.js create mode 100644 node_modules/transformers/node_modules/source-map/lib/source-map/array-set.js create mode 100644 node_modules/transformers/node_modules/source-map/lib/source-map/base64-vlq.js create mode 100644 node_modules/transformers/node_modules/source-map/lib/source-map/base64.js create mode 100644 node_modules/transformers/node_modules/source-map/lib/source-map/binary-search.js create mode 100644 node_modules/transformers/node_modules/source-map/lib/source-map/mapping-list.js create mode 100644 node_modules/transformers/node_modules/source-map/lib/source-map/source-map-consumer.js create mode 100644 node_modules/transformers/node_modules/source-map/lib/source-map/source-map-generator.js create mode 100644 node_modules/transformers/node_modules/source-map/lib/source-map/source-node.js create mode 100644 node_modules/transformers/node_modules/source-map/lib/source-map/util.js create mode 100644 node_modules/transformers/node_modules/source-map/package.json create mode 100755 node_modules/transformers/node_modules/source-map/test/run-tests.js create mode 100644 node_modules/transformers/node_modules/source-map/test/source-map/test-api.js create mode 100644 node_modules/transformers/node_modules/source-map/test/source-map/test-array-set.js create mode 100644 node_modules/transformers/node_modules/source-map/test/source-map/test-base64-vlq.js create mode 100644 node_modules/transformers/node_modules/source-map/test/source-map/test-base64.js create mode 100644 node_modules/transformers/node_modules/source-map/test/source-map/test-binary-search.js create mode 100644 node_modules/transformers/node_modules/source-map/test/source-map/test-dog-fooding.js create mode 100644 node_modules/transformers/node_modules/source-map/test/source-map/test-source-map-consumer.js create mode 100644 node_modules/transformers/node_modules/source-map/test/source-map/test-source-map-generator.js create mode 100644 node_modules/transformers/node_modules/source-map/test/source-map/test-source-node.js create mode 100644 node_modules/transformers/node_modules/source-map/test/source-map/test-util.js create mode 100644 node_modules/transformers/node_modules/source-map/test/source-map/util.js create mode 100644 node_modules/transformers/node_modules/uglify-js/.npmignore create mode 100644 node_modules/transformers/node_modules/uglify-js/README.md create mode 100755 node_modules/transformers/node_modules/uglify-js/bin/uglifyjs create mode 100644 node_modules/transformers/node_modules/uglify-js/lib/ast.js create mode 100644 node_modules/transformers/node_modules/uglify-js/lib/compress.js create mode 100644 node_modules/transformers/node_modules/uglify-js/lib/mozilla-ast.js create mode 100644 node_modules/transformers/node_modules/uglify-js/lib/output.js create mode 100644 node_modules/transformers/node_modules/uglify-js/lib/parse.js create mode 100644 node_modules/transformers/node_modules/uglify-js/lib/scope.js create mode 100644 node_modules/transformers/node_modules/uglify-js/lib/sourcemap.js create mode 100644 node_modules/transformers/node_modules/uglify-js/lib/transform.js create mode 100644 node_modules/transformers/node_modules/uglify-js/lib/utils.js create mode 100644 node_modules/transformers/node_modules/uglify-js/package.json create mode 100644 node_modules/transformers/node_modules/uglify-js/test/compress/arrays.js create mode 100644 node_modules/transformers/node_modules/uglify-js/test/compress/blocks.js create mode 100644 node_modules/transformers/node_modules/uglify-js/test/compress/conditionals.js create mode 100644 node_modules/transformers/node_modules/uglify-js/test/compress/dead-code.js create mode 100644 node_modules/transformers/node_modules/uglify-js/test/compress/debugger.js create mode 100644 node_modules/transformers/node_modules/uglify-js/test/compress/drop-unused.js create mode 100644 node_modules/transformers/node_modules/uglify-js/test/compress/issue-105.js create mode 100644 node_modules/transformers/node_modules/uglify-js/test/compress/issue-12.js create mode 100644 node_modules/transformers/node_modules/uglify-js/test/compress/issue-22.js create mode 100644 node_modules/transformers/node_modules/uglify-js/test/compress/issue-44.js create mode 100644 node_modules/transformers/node_modules/uglify-js/test/compress/issue-59.js create mode 100644 node_modules/transformers/node_modules/uglify-js/test/compress/labels.js create mode 100644 node_modules/transformers/node_modules/uglify-js/test/compress/loops.js create mode 100644 node_modules/transformers/node_modules/uglify-js/test/compress/properties.js create mode 100644 node_modules/transformers/node_modules/uglify-js/test/compress/sequences.js create mode 100644 node_modules/transformers/node_modules/uglify-js/test/compress/switch.js create mode 100755 node_modules/transformers/node_modules/uglify-js/test/run-tests.js create mode 100644 node_modules/transformers/node_modules/uglify-js/tools/node.js create mode 100644 node_modules/transformers/package.json create mode 100644 node_modules/type-is/HISTORY.md create mode 100644 node_modules/type-is/LICENSE create mode 100644 node_modules/type-is/README.md create mode 100644 node_modules/type-is/index.js create mode 100644 node_modules/type-is/package.json create mode 100644 node_modules/uglify-js/LICENSE create mode 100644 node_modules/uglify-js/README.md create mode 100644 node_modules/uglify-js/bin/extract-props.js create mode 100755 node_modules/uglify-js/bin/uglifyjs create mode 100644 node_modules/uglify-js/lib/ast.js create mode 100644 node_modules/uglify-js/lib/compress.js create mode 100644 node_modules/uglify-js/lib/mozilla-ast.js create mode 100644 node_modules/uglify-js/lib/output.js create mode 100644 node_modules/uglify-js/lib/parse.js create mode 100644 node_modules/uglify-js/lib/propmangle.js create mode 100644 node_modules/uglify-js/lib/scope.js create mode 100644 node_modules/uglify-js/lib/sourcemap.js create mode 100644 node_modules/uglify-js/lib/transform.js create mode 100644 node_modules/uglify-js/lib/utils.js create mode 100644 node_modules/uglify-js/node_modules/source-map/CHANGELOG.md create mode 100644 node_modules/uglify-js/node_modules/source-map/LICENSE create mode 100644 node_modules/uglify-js/node_modules/source-map/README.md create mode 100644 node_modules/uglify-js/node_modules/source-map/dist/source-map.debug.js create mode 100644 node_modules/uglify-js/node_modules/source-map/dist/source-map.js create mode 100644 node_modules/uglify-js/node_modules/source-map/dist/source-map.min.js create mode 100644 node_modules/uglify-js/node_modules/source-map/dist/source-map.min.js.map create mode 100644 node_modules/uglify-js/node_modules/source-map/lib/array-set.js create mode 100644 node_modules/uglify-js/node_modules/source-map/lib/base64-vlq.js create mode 100644 node_modules/uglify-js/node_modules/source-map/lib/base64.js create mode 100644 node_modules/uglify-js/node_modules/source-map/lib/binary-search.js create mode 100644 node_modules/uglify-js/node_modules/source-map/lib/mapping-list.js create mode 100644 node_modules/uglify-js/node_modules/source-map/lib/quick-sort.js create mode 100644 node_modules/uglify-js/node_modules/source-map/lib/source-map-consumer.js create mode 100644 node_modules/uglify-js/node_modules/source-map/lib/source-map-generator.js create mode 100644 node_modules/uglify-js/node_modules/source-map/lib/source-node.js create mode 100644 node_modules/uglify-js/node_modules/source-map/lib/util.js create mode 100644 node_modules/uglify-js/node_modules/source-map/package.json create mode 100644 node_modules/uglify-js/node_modules/source-map/source-map.js create mode 100644 node_modules/uglify-js/package.json create mode 100644 node_modules/uglify-js/tools/domprops.json create mode 100644 node_modules/uglify-js/tools/exports.js create mode 100644 node_modules/uglify-js/tools/node.js create mode 100644 node_modules/uglify-js/tools/props.html create mode 100644 node_modules/uglify-to-browserify/.npmignore create mode 100644 node_modules/uglify-to-browserify/.travis.yml create mode 100644 node_modules/uglify-to-browserify/LICENSE create mode 100644 node_modules/uglify-to-browserify/README.md create mode 100644 node_modules/uglify-to-browserify/index.js create mode 100644 node_modules/uglify-to-browserify/package.json create mode 100644 node_modules/uglify-to-browserify/test/index.js create mode 100644 node_modules/umzug/.jshintrc create mode 100644 node_modules/umzug/.npmignore create mode 100644 node_modules/umzug/.travis.yml create mode 100644 node_modules/umzug/CHANGELOG.md create mode 100644 node_modules/umzug/LICENSE create mode 100644 node_modules/umzug/README.md create mode 100644 node_modules/umzug/gulpfile.js create mode 100644 node_modules/umzug/index.js create mode 100644 node_modules/umzug/lib/helper.js create mode 100644 node_modules/umzug/lib/migration.js create mode 100644 node_modules/umzug/lib/storages/json.js create mode 100644 node_modules/umzug/lib/storages/none.js create mode 100644 node_modules/umzug/lib/storages/sequelize.js create mode 100644 node_modules/umzug/node_modules/lodash/LICENSE create mode 100644 node_modules/umzug/node_modules/lodash/README.md create mode 100644 node_modules/umzug/node_modules/lodash/_DataView.js create mode 100644 node_modules/umzug/node_modules/lodash/_Hash.js create mode 100644 node_modules/umzug/node_modules/lodash/_LazyWrapper.js create mode 100644 node_modules/umzug/node_modules/lodash/_ListCache.js create mode 100644 node_modules/umzug/node_modules/lodash/_LodashWrapper.js create mode 100644 node_modules/umzug/node_modules/lodash/_Map.js create mode 100644 node_modules/umzug/node_modules/lodash/_MapCache.js create mode 100644 node_modules/umzug/node_modules/lodash/_Promise.js create mode 100644 node_modules/umzug/node_modules/lodash/_Set.js create mode 100644 node_modules/umzug/node_modules/lodash/_SetCache.js create mode 100644 node_modules/umzug/node_modules/lodash/_Stack.js create mode 100644 node_modules/umzug/node_modules/lodash/_Symbol.js create mode 100644 node_modules/umzug/node_modules/lodash/_Uint8Array.js create mode 100644 node_modules/umzug/node_modules/lodash/_WeakMap.js create mode 100644 node_modules/umzug/node_modules/lodash/_addMapEntry.js create mode 100644 node_modules/umzug/node_modules/lodash/_addSetEntry.js create mode 100644 node_modules/umzug/node_modules/lodash/_apply.js create mode 100644 node_modules/umzug/node_modules/lodash/_arrayAggregator.js create mode 100644 node_modules/umzug/node_modules/lodash/_arrayEach.js create mode 100644 node_modules/umzug/node_modules/lodash/_arrayEachRight.js create mode 100644 node_modules/umzug/node_modules/lodash/_arrayEvery.js create mode 100644 node_modules/umzug/node_modules/lodash/_arrayFilter.js create mode 100644 node_modules/umzug/node_modules/lodash/_arrayIncludes.js create mode 100644 node_modules/umzug/node_modules/lodash/_arrayIncludesWith.js create mode 100644 node_modules/umzug/node_modules/lodash/_arrayLikeKeys.js create mode 100644 node_modules/umzug/node_modules/lodash/_arrayMap.js create mode 100644 node_modules/umzug/node_modules/lodash/_arrayPush.js create mode 100644 node_modules/umzug/node_modules/lodash/_arrayReduce.js create mode 100644 node_modules/umzug/node_modules/lodash/_arrayReduceRight.js create mode 100644 node_modules/umzug/node_modules/lodash/_arraySample.js create mode 100644 node_modules/umzug/node_modules/lodash/_arraySampleSize.js create mode 100644 node_modules/umzug/node_modules/lodash/_arrayShuffle.js create mode 100644 node_modules/umzug/node_modules/lodash/_arraySome.js create mode 100644 node_modules/umzug/node_modules/lodash/_asciiSize.js create mode 100644 node_modules/umzug/node_modules/lodash/_asciiToArray.js create mode 100644 node_modules/umzug/node_modules/lodash/_asciiWords.js create mode 100644 node_modules/umzug/node_modules/lodash/_assignMergeValue.js create mode 100644 node_modules/umzug/node_modules/lodash/_assignValue.js create mode 100644 node_modules/umzug/node_modules/lodash/_assocIndexOf.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseAggregator.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseAssign.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseAssignIn.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseAssignValue.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseAt.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseClamp.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseClone.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseConforms.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseConformsTo.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseCreate.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseDelay.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseDifference.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseEach.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseEachRight.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseEvery.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseExtremum.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseFill.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseFilter.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseFindIndex.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseFindKey.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseFlatten.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseFor.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseForOwn.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseForOwnRight.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseForRight.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseFunctions.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseGet.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseGetAllKeys.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseGetTag.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseGt.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseHas.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseHasIn.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseInRange.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseIndexOf.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseIndexOfWith.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseIntersection.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseInverter.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseInvoke.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseIsArguments.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseIsArrayBuffer.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseIsDate.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseIsEqual.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseIsEqualDeep.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseIsMap.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseIsMatch.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseIsNaN.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseIsNative.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseIsRegExp.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseIsSet.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseIsTypedArray.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseIteratee.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseKeys.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseKeysIn.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseLodash.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseLt.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseMap.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseMatches.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseMatchesProperty.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseMean.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseMerge.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseMergeDeep.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseNth.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseOrderBy.js create mode 100644 node_modules/umzug/node_modules/lodash/_basePick.js create mode 100644 node_modules/umzug/node_modules/lodash/_basePickBy.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseProperty.js create mode 100644 node_modules/umzug/node_modules/lodash/_basePropertyDeep.js create mode 100644 node_modules/umzug/node_modules/lodash/_basePropertyOf.js create mode 100644 node_modules/umzug/node_modules/lodash/_basePullAll.js create mode 100644 node_modules/umzug/node_modules/lodash/_basePullAt.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseRandom.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseRange.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseReduce.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseRepeat.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseRest.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseSample.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseSampleSize.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseSet.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseSetData.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseSetToString.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseShuffle.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseSlice.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseSome.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseSortBy.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseSortedIndex.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseSortedIndexBy.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseSortedUniq.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseSum.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseTimes.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseToNumber.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseToPairs.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseToString.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseUnary.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseUniq.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseUnset.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseUpdate.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseValues.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseWhile.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseWrapperValue.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseXor.js create mode 100644 node_modules/umzug/node_modules/lodash/_baseZipObject.js create mode 100644 node_modules/umzug/node_modules/lodash/_cacheHas.js create mode 100644 node_modules/umzug/node_modules/lodash/_castArrayLikeObject.js create mode 100644 node_modules/umzug/node_modules/lodash/_castFunction.js create mode 100644 node_modules/umzug/node_modules/lodash/_castPath.js create mode 100644 node_modules/umzug/node_modules/lodash/_castRest.js create mode 100644 node_modules/umzug/node_modules/lodash/_castSlice.js create mode 100644 node_modules/umzug/node_modules/lodash/_charsEndIndex.js create mode 100644 node_modules/umzug/node_modules/lodash/_charsStartIndex.js create mode 100644 node_modules/umzug/node_modules/lodash/_cloneArrayBuffer.js create mode 100644 node_modules/umzug/node_modules/lodash/_cloneBuffer.js create mode 100644 node_modules/umzug/node_modules/lodash/_cloneDataView.js create mode 100644 node_modules/umzug/node_modules/lodash/_cloneMap.js create mode 100644 node_modules/umzug/node_modules/lodash/_cloneRegExp.js create mode 100644 node_modules/umzug/node_modules/lodash/_cloneSet.js create mode 100644 node_modules/umzug/node_modules/lodash/_cloneSymbol.js create mode 100644 node_modules/umzug/node_modules/lodash/_cloneTypedArray.js create mode 100644 node_modules/umzug/node_modules/lodash/_compareAscending.js create mode 100644 node_modules/umzug/node_modules/lodash/_compareMultiple.js create mode 100644 node_modules/umzug/node_modules/lodash/_composeArgs.js create mode 100644 node_modules/umzug/node_modules/lodash/_composeArgsRight.js create mode 100644 node_modules/umzug/node_modules/lodash/_copyArray.js create mode 100644 node_modules/umzug/node_modules/lodash/_copyObject.js create mode 100644 node_modules/umzug/node_modules/lodash/_copySymbols.js create mode 100644 node_modules/umzug/node_modules/lodash/_copySymbolsIn.js create mode 100644 node_modules/umzug/node_modules/lodash/_coreJsData.js create mode 100644 node_modules/umzug/node_modules/lodash/_countHolders.js create mode 100644 node_modules/umzug/node_modules/lodash/_createAggregator.js create mode 100644 node_modules/umzug/node_modules/lodash/_createAssigner.js create mode 100644 node_modules/umzug/node_modules/lodash/_createBaseEach.js create mode 100644 node_modules/umzug/node_modules/lodash/_createBaseFor.js create mode 100644 node_modules/umzug/node_modules/lodash/_createBind.js create mode 100644 node_modules/umzug/node_modules/lodash/_createCaseFirst.js create mode 100644 node_modules/umzug/node_modules/lodash/_createCompounder.js create mode 100644 node_modules/umzug/node_modules/lodash/_createCtor.js create mode 100644 node_modules/umzug/node_modules/lodash/_createCurry.js create mode 100644 node_modules/umzug/node_modules/lodash/_createFind.js create mode 100644 node_modules/umzug/node_modules/lodash/_createFlow.js create mode 100644 node_modules/umzug/node_modules/lodash/_createHybrid.js create mode 100644 node_modules/umzug/node_modules/lodash/_createInverter.js create mode 100644 node_modules/umzug/node_modules/lodash/_createMathOperation.js create mode 100644 node_modules/umzug/node_modules/lodash/_createOver.js create mode 100644 node_modules/umzug/node_modules/lodash/_createPadding.js create mode 100644 node_modules/umzug/node_modules/lodash/_createPartial.js create mode 100644 node_modules/umzug/node_modules/lodash/_createRange.js create mode 100644 node_modules/umzug/node_modules/lodash/_createRecurry.js create mode 100644 node_modules/umzug/node_modules/lodash/_createRelationalOperation.js create mode 100644 node_modules/umzug/node_modules/lodash/_createRound.js create mode 100644 node_modules/umzug/node_modules/lodash/_createSet.js create mode 100644 node_modules/umzug/node_modules/lodash/_createToPairs.js create mode 100644 node_modules/umzug/node_modules/lodash/_createWrap.js create mode 100644 node_modules/umzug/node_modules/lodash/_customDefaultsAssignIn.js create mode 100644 node_modules/umzug/node_modules/lodash/_customDefaultsMerge.js create mode 100644 node_modules/umzug/node_modules/lodash/_customOmitClone.js create mode 100644 node_modules/umzug/node_modules/lodash/_deburrLetter.js create mode 100644 node_modules/umzug/node_modules/lodash/_defineProperty.js create mode 100644 node_modules/umzug/node_modules/lodash/_equalArrays.js create mode 100644 node_modules/umzug/node_modules/lodash/_equalByTag.js create mode 100644 node_modules/umzug/node_modules/lodash/_equalObjects.js create mode 100644 node_modules/umzug/node_modules/lodash/_escapeHtmlChar.js create mode 100644 node_modules/umzug/node_modules/lodash/_escapeStringChar.js create mode 100644 node_modules/umzug/node_modules/lodash/_flatRest.js create mode 100644 node_modules/umzug/node_modules/lodash/_freeGlobal.js create mode 100644 node_modules/umzug/node_modules/lodash/_getAllKeys.js create mode 100644 node_modules/umzug/node_modules/lodash/_getAllKeysIn.js create mode 100644 node_modules/umzug/node_modules/lodash/_getData.js create mode 100644 node_modules/umzug/node_modules/lodash/_getFuncName.js create mode 100644 node_modules/umzug/node_modules/lodash/_getHolder.js create mode 100644 node_modules/umzug/node_modules/lodash/_getMapData.js create mode 100644 node_modules/umzug/node_modules/lodash/_getMatchData.js create mode 100644 node_modules/umzug/node_modules/lodash/_getNative.js create mode 100644 node_modules/umzug/node_modules/lodash/_getPrototype.js create mode 100644 node_modules/umzug/node_modules/lodash/_getRawTag.js create mode 100644 node_modules/umzug/node_modules/lodash/_getSymbols.js create mode 100644 node_modules/umzug/node_modules/lodash/_getSymbolsIn.js create mode 100644 node_modules/umzug/node_modules/lodash/_getTag.js create mode 100644 node_modules/umzug/node_modules/lodash/_getValue.js create mode 100644 node_modules/umzug/node_modules/lodash/_getView.js create mode 100644 node_modules/umzug/node_modules/lodash/_getWrapDetails.js create mode 100644 node_modules/umzug/node_modules/lodash/_hasPath.js create mode 100644 node_modules/umzug/node_modules/lodash/_hasUnicode.js create mode 100644 node_modules/umzug/node_modules/lodash/_hasUnicodeWord.js create mode 100644 node_modules/umzug/node_modules/lodash/_hashClear.js create mode 100644 node_modules/umzug/node_modules/lodash/_hashDelete.js create mode 100644 node_modules/umzug/node_modules/lodash/_hashGet.js create mode 100644 node_modules/umzug/node_modules/lodash/_hashHas.js create mode 100644 node_modules/umzug/node_modules/lodash/_hashSet.js create mode 100644 node_modules/umzug/node_modules/lodash/_initCloneArray.js create mode 100644 node_modules/umzug/node_modules/lodash/_initCloneByTag.js create mode 100644 node_modules/umzug/node_modules/lodash/_initCloneObject.js create mode 100644 node_modules/umzug/node_modules/lodash/_insertWrapDetails.js create mode 100644 node_modules/umzug/node_modules/lodash/_isFlattenable.js create mode 100644 node_modules/umzug/node_modules/lodash/_isIndex.js create mode 100644 node_modules/umzug/node_modules/lodash/_isIterateeCall.js create mode 100644 node_modules/umzug/node_modules/lodash/_isKey.js create mode 100644 node_modules/umzug/node_modules/lodash/_isKeyable.js create mode 100644 node_modules/umzug/node_modules/lodash/_isLaziable.js create mode 100644 node_modules/umzug/node_modules/lodash/_isMaskable.js create mode 100644 node_modules/umzug/node_modules/lodash/_isMasked.js create mode 100644 node_modules/umzug/node_modules/lodash/_isPrototype.js create mode 100644 node_modules/umzug/node_modules/lodash/_isStrictComparable.js create mode 100644 node_modules/umzug/node_modules/lodash/_iteratorToArray.js create mode 100644 node_modules/umzug/node_modules/lodash/_lazyClone.js create mode 100644 node_modules/umzug/node_modules/lodash/_lazyReverse.js create mode 100644 node_modules/umzug/node_modules/lodash/_lazyValue.js create mode 100644 node_modules/umzug/node_modules/lodash/_listCacheClear.js create mode 100644 node_modules/umzug/node_modules/lodash/_listCacheDelete.js create mode 100644 node_modules/umzug/node_modules/lodash/_listCacheGet.js create mode 100644 node_modules/umzug/node_modules/lodash/_listCacheHas.js create mode 100644 node_modules/umzug/node_modules/lodash/_listCacheSet.js create mode 100644 node_modules/umzug/node_modules/lodash/_mapCacheClear.js create mode 100644 node_modules/umzug/node_modules/lodash/_mapCacheDelete.js create mode 100644 node_modules/umzug/node_modules/lodash/_mapCacheGet.js create mode 100644 node_modules/umzug/node_modules/lodash/_mapCacheHas.js create mode 100644 node_modules/umzug/node_modules/lodash/_mapCacheSet.js create mode 100644 node_modules/umzug/node_modules/lodash/_mapToArray.js create mode 100644 node_modules/umzug/node_modules/lodash/_matchesStrictComparable.js create mode 100644 node_modules/umzug/node_modules/lodash/_memoizeCapped.js create mode 100644 node_modules/umzug/node_modules/lodash/_mergeData.js create mode 100644 node_modules/umzug/node_modules/lodash/_metaMap.js create mode 100644 node_modules/umzug/node_modules/lodash/_nativeCreate.js create mode 100644 node_modules/umzug/node_modules/lodash/_nativeKeys.js create mode 100644 node_modules/umzug/node_modules/lodash/_nativeKeysIn.js create mode 100644 node_modules/umzug/node_modules/lodash/_nodeUtil.js create mode 100644 node_modules/umzug/node_modules/lodash/_objectToString.js create mode 100644 node_modules/umzug/node_modules/lodash/_overArg.js create mode 100644 node_modules/umzug/node_modules/lodash/_overRest.js create mode 100644 node_modules/umzug/node_modules/lodash/_parent.js create mode 100644 node_modules/umzug/node_modules/lodash/_reEscape.js create mode 100644 node_modules/umzug/node_modules/lodash/_reEvaluate.js create mode 100644 node_modules/umzug/node_modules/lodash/_reInterpolate.js create mode 100644 node_modules/umzug/node_modules/lodash/_realNames.js create mode 100644 node_modules/umzug/node_modules/lodash/_reorder.js create mode 100644 node_modules/umzug/node_modules/lodash/_replaceHolders.js create mode 100644 node_modules/umzug/node_modules/lodash/_root.js create mode 100644 node_modules/umzug/node_modules/lodash/_setCacheAdd.js create mode 100644 node_modules/umzug/node_modules/lodash/_setCacheHas.js create mode 100644 node_modules/umzug/node_modules/lodash/_setData.js create mode 100644 node_modules/umzug/node_modules/lodash/_setToArray.js create mode 100644 node_modules/umzug/node_modules/lodash/_setToPairs.js create mode 100644 node_modules/umzug/node_modules/lodash/_setToString.js create mode 100644 node_modules/umzug/node_modules/lodash/_setWrapToString.js create mode 100644 node_modules/umzug/node_modules/lodash/_shortOut.js create mode 100644 node_modules/umzug/node_modules/lodash/_shuffleSelf.js create mode 100644 node_modules/umzug/node_modules/lodash/_stackClear.js create mode 100644 node_modules/umzug/node_modules/lodash/_stackDelete.js create mode 100644 node_modules/umzug/node_modules/lodash/_stackGet.js create mode 100644 node_modules/umzug/node_modules/lodash/_stackHas.js create mode 100644 node_modules/umzug/node_modules/lodash/_stackSet.js create mode 100644 node_modules/umzug/node_modules/lodash/_strictIndexOf.js create mode 100644 node_modules/umzug/node_modules/lodash/_strictLastIndexOf.js create mode 100644 node_modules/umzug/node_modules/lodash/_stringSize.js create mode 100644 node_modules/umzug/node_modules/lodash/_stringToArray.js create mode 100644 node_modules/umzug/node_modules/lodash/_stringToPath.js create mode 100644 node_modules/umzug/node_modules/lodash/_toKey.js create mode 100644 node_modules/umzug/node_modules/lodash/_toSource.js create mode 100644 node_modules/umzug/node_modules/lodash/_unescapeHtmlChar.js create mode 100644 node_modules/umzug/node_modules/lodash/_unicodeSize.js create mode 100644 node_modules/umzug/node_modules/lodash/_unicodeToArray.js create mode 100644 node_modules/umzug/node_modules/lodash/_unicodeWords.js create mode 100644 node_modules/umzug/node_modules/lodash/_updateWrapDetails.js create mode 100644 node_modules/umzug/node_modules/lodash/_wrapperClone.js create mode 100644 node_modules/umzug/node_modules/lodash/add.js create mode 100644 node_modules/umzug/node_modules/lodash/after.js create mode 100644 node_modules/umzug/node_modules/lodash/array.js create mode 100644 node_modules/umzug/node_modules/lodash/ary.js create mode 100644 node_modules/umzug/node_modules/lodash/assign.js create mode 100644 node_modules/umzug/node_modules/lodash/assignIn.js create mode 100644 node_modules/umzug/node_modules/lodash/assignInWith.js create mode 100644 node_modules/umzug/node_modules/lodash/assignWith.js create mode 100644 node_modules/umzug/node_modules/lodash/at.js create mode 100644 node_modules/umzug/node_modules/lodash/attempt.js create mode 100644 node_modules/umzug/node_modules/lodash/before.js create mode 100644 node_modules/umzug/node_modules/lodash/bind.js create mode 100644 node_modules/umzug/node_modules/lodash/bindAll.js create mode 100644 node_modules/umzug/node_modules/lodash/bindKey.js create mode 100644 node_modules/umzug/node_modules/lodash/camelCase.js create mode 100644 node_modules/umzug/node_modules/lodash/capitalize.js create mode 100644 node_modules/umzug/node_modules/lodash/castArray.js create mode 100644 node_modules/umzug/node_modules/lodash/ceil.js create mode 100644 node_modules/umzug/node_modules/lodash/chain.js create mode 100644 node_modules/umzug/node_modules/lodash/chunk.js create mode 100644 node_modules/umzug/node_modules/lodash/clamp.js create mode 100644 node_modules/umzug/node_modules/lodash/clone.js create mode 100644 node_modules/umzug/node_modules/lodash/cloneDeep.js create mode 100644 node_modules/umzug/node_modules/lodash/cloneDeepWith.js create mode 100644 node_modules/umzug/node_modules/lodash/cloneWith.js create mode 100644 node_modules/umzug/node_modules/lodash/collection.js create mode 100644 node_modules/umzug/node_modules/lodash/commit.js create mode 100644 node_modules/umzug/node_modules/lodash/compact.js create mode 100644 node_modules/umzug/node_modules/lodash/concat.js create mode 100644 node_modules/umzug/node_modules/lodash/cond.js create mode 100644 node_modules/umzug/node_modules/lodash/conforms.js create mode 100644 node_modules/umzug/node_modules/lodash/conformsTo.js create mode 100644 node_modules/umzug/node_modules/lodash/constant.js create mode 100644 node_modules/umzug/node_modules/lodash/core.js create mode 100644 node_modules/umzug/node_modules/lodash/core.min.js create mode 100644 node_modules/umzug/node_modules/lodash/countBy.js create mode 100644 node_modules/umzug/node_modules/lodash/create.js create mode 100644 node_modules/umzug/node_modules/lodash/curry.js create mode 100644 node_modules/umzug/node_modules/lodash/curryRight.js create mode 100644 node_modules/umzug/node_modules/lodash/date.js create mode 100644 node_modules/umzug/node_modules/lodash/debounce.js create mode 100644 node_modules/umzug/node_modules/lodash/deburr.js create mode 100644 node_modules/umzug/node_modules/lodash/defaultTo.js create mode 100644 node_modules/umzug/node_modules/lodash/defaults.js create mode 100644 node_modules/umzug/node_modules/lodash/defaultsDeep.js create mode 100644 node_modules/umzug/node_modules/lodash/defer.js create mode 100644 node_modules/umzug/node_modules/lodash/delay.js create mode 100644 node_modules/umzug/node_modules/lodash/difference.js create mode 100644 node_modules/umzug/node_modules/lodash/differenceBy.js create mode 100644 node_modules/umzug/node_modules/lodash/differenceWith.js create mode 100644 node_modules/umzug/node_modules/lodash/divide.js create mode 100644 node_modules/umzug/node_modules/lodash/drop.js create mode 100644 node_modules/umzug/node_modules/lodash/dropRight.js create mode 100644 node_modules/umzug/node_modules/lodash/dropRightWhile.js create mode 100644 node_modules/umzug/node_modules/lodash/dropWhile.js create mode 100644 node_modules/umzug/node_modules/lodash/each.js create mode 100644 node_modules/umzug/node_modules/lodash/eachRight.js create mode 100644 node_modules/umzug/node_modules/lodash/endsWith.js create mode 100644 node_modules/umzug/node_modules/lodash/entries.js create mode 100644 node_modules/umzug/node_modules/lodash/entriesIn.js create mode 100644 node_modules/umzug/node_modules/lodash/eq.js create mode 100644 node_modules/umzug/node_modules/lodash/escape.js create mode 100644 node_modules/umzug/node_modules/lodash/escapeRegExp.js create mode 100644 node_modules/umzug/node_modules/lodash/every.js create mode 100644 node_modules/umzug/node_modules/lodash/extend.js create mode 100644 node_modules/umzug/node_modules/lodash/extendWith.js create mode 100644 node_modules/umzug/node_modules/lodash/fill.js create mode 100644 node_modules/umzug/node_modules/lodash/filter.js create mode 100644 node_modules/umzug/node_modules/lodash/find.js create mode 100644 node_modules/umzug/node_modules/lodash/findIndex.js create mode 100644 node_modules/umzug/node_modules/lodash/findKey.js create mode 100644 node_modules/umzug/node_modules/lodash/findLast.js create mode 100644 node_modules/umzug/node_modules/lodash/findLastIndex.js create mode 100644 node_modules/umzug/node_modules/lodash/findLastKey.js create mode 100644 node_modules/umzug/node_modules/lodash/first.js create mode 100644 node_modules/umzug/node_modules/lodash/flatMap.js create mode 100644 node_modules/umzug/node_modules/lodash/flatMapDeep.js create mode 100644 node_modules/umzug/node_modules/lodash/flatMapDepth.js create mode 100644 node_modules/umzug/node_modules/lodash/flatten.js create mode 100644 node_modules/umzug/node_modules/lodash/flattenDeep.js create mode 100644 node_modules/umzug/node_modules/lodash/flattenDepth.js create mode 100644 node_modules/umzug/node_modules/lodash/flip.js create mode 100644 node_modules/umzug/node_modules/lodash/floor.js create mode 100644 node_modules/umzug/node_modules/lodash/flow.js create mode 100644 node_modules/umzug/node_modules/lodash/flowRight.js create mode 100644 node_modules/umzug/node_modules/lodash/forEach.js create mode 100644 node_modules/umzug/node_modules/lodash/forEachRight.js create mode 100644 node_modules/umzug/node_modules/lodash/forIn.js create mode 100644 node_modules/umzug/node_modules/lodash/forInRight.js create mode 100644 node_modules/umzug/node_modules/lodash/forOwn.js create mode 100644 node_modules/umzug/node_modules/lodash/forOwnRight.js create mode 100644 node_modules/umzug/node_modules/lodash/fp.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/F.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/T.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/__.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/_baseConvert.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/_convertBrowser.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/_falseOptions.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/_mapping.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/_util.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/add.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/after.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/all.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/allPass.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/always.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/any.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/anyPass.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/apply.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/array.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/ary.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/assign.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/assignAll.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/assignAllWith.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/assignIn.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/assignInAll.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/assignInAllWith.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/assignInWith.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/assignWith.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/assoc.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/assocPath.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/at.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/attempt.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/before.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/bind.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/bindAll.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/bindKey.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/camelCase.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/capitalize.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/castArray.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/ceil.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/chain.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/chunk.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/clamp.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/clone.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/cloneDeep.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/cloneDeepWith.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/cloneWith.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/collection.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/commit.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/compact.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/complement.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/compose.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/concat.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/cond.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/conforms.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/conformsTo.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/constant.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/contains.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/convert.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/countBy.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/create.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/curry.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/curryN.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/curryRight.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/curryRightN.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/date.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/debounce.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/deburr.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/defaultTo.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/defaults.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/defaultsAll.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/defaultsDeep.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/defaultsDeepAll.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/defer.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/delay.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/difference.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/differenceBy.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/differenceWith.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/dissoc.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/dissocPath.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/divide.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/drop.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/dropLast.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/dropLastWhile.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/dropRight.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/dropRightWhile.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/dropWhile.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/each.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/eachRight.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/endsWith.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/entries.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/entriesIn.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/eq.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/equals.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/escape.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/escapeRegExp.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/every.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/extend.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/extendAll.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/extendAllWith.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/extendWith.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/fill.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/filter.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/find.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/findFrom.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/findIndex.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/findIndexFrom.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/findKey.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/findLast.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/findLastFrom.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/findLastIndex.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/findLastIndexFrom.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/findLastKey.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/first.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/flatMap.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/flatMapDeep.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/flatMapDepth.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/flatten.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/flattenDeep.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/flattenDepth.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/flip.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/floor.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/flow.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/flowRight.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/forEach.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/forEachRight.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/forIn.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/forInRight.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/forOwn.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/forOwnRight.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/fromPairs.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/function.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/functions.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/functionsIn.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/get.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/getOr.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/groupBy.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/gt.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/gte.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/has.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/hasIn.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/head.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/identical.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/identity.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/inRange.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/includes.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/includesFrom.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/indexBy.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/indexOf.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/indexOfFrom.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/init.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/initial.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/intersection.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/intersectionBy.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/intersectionWith.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/invert.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/invertBy.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/invertObj.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/invoke.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/invokeArgs.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/invokeArgsMap.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/invokeMap.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/isArguments.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/isArray.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/isArrayBuffer.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/isArrayLike.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/isArrayLikeObject.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/isBoolean.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/isBuffer.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/isDate.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/isElement.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/isEmpty.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/isEqual.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/isEqualWith.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/isError.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/isFinite.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/isFunction.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/isInteger.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/isLength.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/isMap.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/isMatch.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/isMatchWith.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/isNaN.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/isNative.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/isNil.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/isNull.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/isNumber.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/isObject.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/isObjectLike.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/isPlainObject.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/isRegExp.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/isSafeInteger.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/isSet.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/isString.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/isSymbol.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/isTypedArray.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/isUndefined.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/isWeakMap.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/isWeakSet.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/iteratee.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/join.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/juxt.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/kebabCase.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/keyBy.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/keys.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/keysIn.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/lang.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/last.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/lastIndexOf.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/lastIndexOfFrom.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/lowerCase.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/lowerFirst.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/lt.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/lte.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/map.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/mapKeys.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/mapValues.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/matches.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/matchesProperty.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/math.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/max.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/maxBy.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/mean.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/meanBy.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/memoize.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/merge.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/mergeAll.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/mergeAllWith.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/mergeWith.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/method.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/methodOf.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/min.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/minBy.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/mixin.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/multiply.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/nAry.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/negate.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/next.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/noop.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/now.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/nth.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/nthArg.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/number.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/object.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/omit.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/omitAll.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/omitBy.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/once.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/orderBy.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/over.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/overArgs.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/overEvery.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/overSome.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/pad.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/padChars.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/padCharsEnd.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/padCharsStart.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/padEnd.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/padStart.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/parseInt.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/partial.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/partialRight.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/partition.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/path.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/pathEq.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/pathOr.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/paths.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/pick.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/pickAll.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/pickBy.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/pipe.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/placeholder.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/plant.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/pluck.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/prop.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/propEq.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/propOr.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/property.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/propertyOf.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/props.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/pull.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/pullAll.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/pullAllBy.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/pullAllWith.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/pullAt.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/random.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/range.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/rangeRight.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/rangeStep.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/rangeStepRight.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/rearg.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/reduce.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/reduceRight.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/reject.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/remove.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/repeat.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/replace.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/rest.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/restFrom.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/result.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/reverse.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/round.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/sample.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/sampleSize.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/seq.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/set.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/setWith.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/shuffle.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/size.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/slice.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/snakeCase.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/some.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/sortBy.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/sortedIndex.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/sortedIndexBy.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/sortedIndexOf.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/sortedLastIndex.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/sortedLastIndexBy.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/sortedLastIndexOf.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/sortedUniq.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/sortedUniqBy.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/split.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/spread.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/spreadFrom.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/startCase.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/startsWith.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/string.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/stubArray.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/stubFalse.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/stubObject.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/stubString.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/stubTrue.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/subtract.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/sum.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/sumBy.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/symmetricDifference.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/symmetricDifferenceBy.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/symmetricDifferenceWith.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/tail.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/take.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/takeLast.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/takeLastWhile.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/takeRight.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/takeRightWhile.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/takeWhile.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/tap.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/template.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/templateSettings.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/throttle.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/thru.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/times.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/toArray.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/toFinite.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/toInteger.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/toIterator.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/toJSON.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/toLength.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/toLower.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/toNumber.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/toPairs.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/toPairsIn.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/toPath.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/toPlainObject.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/toSafeInteger.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/toString.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/toUpper.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/transform.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/trim.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/trimChars.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/trimCharsEnd.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/trimCharsStart.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/trimEnd.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/trimStart.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/truncate.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/unapply.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/unary.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/unescape.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/union.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/unionBy.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/unionWith.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/uniq.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/uniqBy.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/uniqWith.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/uniqueId.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/unnest.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/unset.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/unzip.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/unzipWith.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/update.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/updateWith.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/upperCase.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/upperFirst.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/useWith.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/util.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/value.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/valueOf.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/values.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/valuesIn.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/where.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/whereEq.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/without.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/words.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/wrap.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/wrapperAt.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/wrapperChain.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/wrapperLodash.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/wrapperReverse.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/wrapperValue.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/xor.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/xorBy.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/xorWith.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/zip.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/zipAll.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/zipObj.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/zipObject.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/zipObjectDeep.js create mode 100644 node_modules/umzug/node_modules/lodash/fp/zipWith.js create mode 100644 node_modules/umzug/node_modules/lodash/fromPairs.js create mode 100644 node_modules/umzug/node_modules/lodash/function.js create mode 100644 node_modules/umzug/node_modules/lodash/functions.js create mode 100644 node_modules/umzug/node_modules/lodash/functionsIn.js create mode 100644 node_modules/umzug/node_modules/lodash/get.js create mode 100644 node_modules/umzug/node_modules/lodash/groupBy.js create mode 100644 node_modules/umzug/node_modules/lodash/gt.js create mode 100644 node_modules/umzug/node_modules/lodash/gte.js create mode 100644 node_modules/umzug/node_modules/lodash/has.js create mode 100644 node_modules/umzug/node_modules/lodash/hasIn.js create mode 100644 node_modules/umzug/node_modules/lodash/head.js create mode 100644 node_modules/umzug/node_modules/lodash/identity.js create mode 100644 node_modules/umzug/node_modules/lodash/inRange.js create mode 100644 node_modules/umzug/node_modules/lodash/includes.js create mode 100644 node_modules/umzug/node_modules/lodash/index.js create mode 100644 node_modules/umzug/node_modules/lodash/indexOf.js create mode 100644 node_modules/umzug/node_modules/lodash/initial.js create mode 100644 node_modules/umzug/node_modules/lodash/intersection.js create mode 100644 node_modules/umzug/node_modules/lodash/intersectionBy.js create mode 100644 node_modules/umzug/node_modules/lodash/intersectionWith.js create mode 100644 node_modules/umzug/node_modules/lodash/invert.js create mode 100644 node_modules/umzug/node_modules/lodash/invertBy.js create mode 100644 node_modules/umzug/node_modules/lodash/invoke.js create mode 100644 node_modules/umzug/node_modules/lodash/invokeMap.js create mode 100644 node_modules/umzug/node_modules/lodash/isArguments.js create mode 100644 node_modules/umzug/node_modules/lodash/isArray.js create mode 100644 node_modules/umzug/node_modules/lodash/isArrayBuffer.js create mode 100644 node_modules/umzug/node_modules/lodash/isArrayLike.js create mode 100644 node_modules/umzug/node_modules/lodash/isArrayLikeObject.js create mode 100644 node_modules/umzug/node_modules/lodash/isBoolean.js create mode 100644 node_modules/umzug/node_modules/lodash/isBuffer.js create mode 100644 node_modules/umzug/node_modules/lodash/isDate.js create mode 100644 node_modules/umzug/node_modules/lodash/isElement.js create mode 100644 node_modules/umzug/node_modules/lodash/isEmpty.js create mode 100644 node_modules/umzug/node_modules/lodash/isEqual.js create mode 100644 node_modules/umzug/node_modules/lodash/isEqualWith.js create mode 100644 node_modules/umzug/node_modules/lodash/isError.js create mode 100644 node_modules/umzug/node_modules/lodash/isFinite.js create mode 100644 node_modules/umzug/node_modules/lodash/isFunction.js create mode 100644 node_modules/umzug/node_modules/lodash/isInteger.js create mode 100644 node_modules/umzug/node_modules/lodash/isLength.js create mode 100644 node_modules/umzug/node_modules/lodash/isMap.js create mode 100644 node_modules/umzug/node_modules/lodash/isMatch.js create mode 100644 node_modules/umzug/node_modules/lodash/isMatchWith.js create mode 100644 node_modules/umzug/node_modules/lodash/isNaN.js create mode 100644 node_modules/umzug/node_modules/lodash/isNative.js create mode 100644 node_modules/umzug/node_modules/lodash/isNil.js create mode 100644 node_modules/umzug/node_modules/lodash/isNull.js create mode 100644 node_modules/umzug/node_modules/lodash/isNumber.js create mode 100644 node_modules/umzug/node_modules/lodash/isObject.js create mode 100644 node_modules/umzug/node_modules/lodash/isObjectLike.js create mode 100644 node_modules/umzug/node_modules/lodash/isPlainObject.js create mode 100644 node_modules/umzug/node_modules/lodash/isRegExp.js create mode 100644 node_modules/umzug/node_modules/lodash/isSafeInteger.js create mode 100644 node_modules/umzug/node_modules/lodash/isSet.js create mode 100644 node_modules/umzug/node_modules/lodash/isString.js create mode 100644 node_modules/umzug/node_modules/lodash/isSymbol.js create mode 100644 node_modules/umzug/node_modules/lodash/isTypedArray.js create mode 100644 node_modules/umzug/node_modules/lodash/isUndefined.js create mode 100644 node_modules/umzug/node_modules/lodash/isWeakMap.js create mode 100644 node_modules/umzug/node_modules/lodash/isWeakSet.js create mode 100644 node_modules/umzug/node_modules/lodash/iteratee.js create mode 100644 node_modules/umzug/node_modules/lodash/join.js create mode 100644 node_modules/umzug/node_modules/lodash/kebabCase.js create mode 100644 node_modules/umzug/node_modules/lodash/keyBy.js create mode 100644 node_modules/umzug/node_modules/lodash/keys.js create mode 100644 node_modules/umzug/node_modules/lodash/keysIn.js create mode 100644 node_modules/umzug/node_modules/lodash/lang.js create mode 100644 node_modules/umzug/node_modules/lodash/last.js create mode 100644 node_modules/umzug/node_modules/lodash/lastIndexOf.js create mode 100644 node_modules/umzug/node_modules/lodash/lodash.js create mode 100644 node_modules/umzug/node_modules/lodash/lodash.min.js create mode 100644 node_modules/umzug/node_modules/lodash/lowerCase.js create mode 100644 node_modules/umzug/node_modules/lodash/lowerFirst.js create mode 100644 node_modules/umzug/node_modules/lodash/lt.js create mode 100644 node_modules/umzug/node_modules/lodash/lte.js create mode 100644 node_modules/umzug/node_modules/lodash/map.js create mode 100644 node_modules/umzug/node_modules/lodash/mapKeys.js create mode 100644 node_modules/umzug/node_modules/lodash/mapValues.js create mode 100644 node_modules/umzug/node_modules/lodash/matches.js create mode 100644 node_modules/umzug/node_modules/lodash/matchesProperty.js create mode 100644 node_modules/umzug/node_modules/lodash/math.js create mode 100644 node_modules/umzug/node_modules/lodash/max.js create mode 100644 node_modules/umzug/node_modules/lodash/maxBy.js create mode 100644 node_modules/umzug/node_modules/lodash/mean.js create mode 100644 node_modules/umzug/node_modules/lodash/meanBy.js create mode 100644 node_modules/umzug/node_modules/lodash/memoize.js create mode 100644 node_modules/umzug/node_modules/lodash/merge.js create mode 100644 node_modules/umzug/node_modules/lodash/mergeWith.js create mode 100644 node_modules/umzug/node_modules/lodash/method.js create mode 100644 node_modules/umzug/node_modules/lodash/methodOf.js create mode 100644 node_modules/umzug/node_modules/lodash/min.js create mode 100644 node_modules/umzug/node_modules/lodash/minBy.js create mode 100644 node_modules/umzug/node_modules/lodash/mixin.js create mode 100644 node_modules/umzug/node_modules/lodash/multiply.js create mode 100644 node_modules/umzug/node_modules/lodash/negate.js create mode 100644 node_modules/umzug/node_modules/lodash/next.js create mode 100644 node_modules/umzug/node_modules/lodash/noop.js create mode 100644 node_modules/umzug/node_modules/lodash/now.js create mode 100644 node_modules/umzug/node_modules/lodash/nth.js create mode 100644 node_modules/umzug/node_modules/lodash/nthArg.js create mode 100644 node_modules/umzug/node_modules/lodash/number.js create mode 100644 node_modules/umzug/node_modules/lodash/object.js create mode 100644 node_modules/umzug/node_modules/lodash/omit.js create mode 100644 node_modules/umzug/node_modules/lodash/omitBy.js create mode 100644 node_modules/umzug/node_modules/lodash/once.js create mode 100644 node_modules/umzug/node_modules/lodash/orderBy.js create mode 100644 node_modules/umzug/node_modules/lodash/over.js create mode 100644 node_modules/umzug/node_modules/lodash/overArgs.js create mode 100644 node_modules/umzug/node_modules/lodash/overEvery.js create mode 100644 node_modules/umzug/node_modules/lodash/overSome.js create mode 100644 node_modules/umzug/node_modules/lodash/package.json create mode 100644 node_modules/umzug/node_modules/lodash/pad.js create mode 100644 node_modules/umzug/node_modules/lodash/padEnd.js create mode 100644 node_modules/umzug/node_modules/lodash/padStart.js create mode 100644 node_modules/umzug/node_modules/lodash/parseInt.js create mode 100644 node_modules/umzug/node_modules/lodash/partial.js create mode 100644 node_modules/umzug/node_modules/lodash/partialRight.js create mode 100644 node_modules/umzug/node_modules/lodash/partition.js create mode 100644 node_modules/umzug/node_modules/lodash/pick.js create mode 100644 node_modules/umzug/node_modules/lodash/pickBy.js create mode 100644 node_modules/umzug/node_modules/lodash/plant.js create mode 100644 node_modules/umzug/node_modules/lodash/property.js create mode 100644 node_modules/umzug/node_modules/lodash/propertyOf.js create mode 100644 node_modules/umzug/node_modules/lodash/pull.js create mode 100644 node_modules/umzug/node_modules/lodash/pullAll.js create mode 100644 node_modules/umzug/node_modules/lodash/pullAllBy.js create mode 100644 node_modules/umzug/node_modules/lodash/pullAllWith.js create mode 100644 node_modules/umzug/node_modules/lodash/pullAt.js create mode 100644 node_modules/umzug/node_modules/lodash/random.js create mode 100644 node_modules/umzug/node_modules/lodash/range.js create mode 100644 node_modules/umzug/node_modules/lodash/rangeRight.js create mode 100644 node_modules/umzug/node_modules/lodash/rearg.js create mode 100644 node_modules/umzug/node_modules/lodash/reduce.js create mode 100644 node_modules/umzug/node_modules/lodash/reduceRight.js create mode 100644 node_modules/umzug/node_modules/lodash/reject.js create mode 100644 node_modules/umzug/node_modules/lodash/remove.js create mode 100644 node_modules/umzug/node_modules/lodash/repeat.js create mode 100644 node_modules/umzug/node_modules/lodash/replace.js create mode 100644 node_modules/umzug/node_modules/lodash/rest.js create mode 100644 node_modules/umzug/node_modules/lodash/result.js create mode 100644 node_modules/umzug/node_modules/lodash/reverse.js create mode 100644 node_modules/umzug/node_modules/lodash/round.js create mode 100644 node_modules/umzug/node_modules/lodash/sample.js create mode 100644 node_modules/umzug/node_modules/lodash/sampleSize.js create mode 100644 node_modules/umzug/node_modules/lodash/seq.js create mode 100644 node_modules/umzug/node_modules/lodash/set.js create mode 100644 node_modules/umzug/node_modules/lodash/setWith.js create mode 100644 node_modules/umzug/node_modules/lodash/shuffle.js create mode 100644 node_modules/umzug/node_modules/lodash/size.js create mode 100644 node_modules/umzug/node_modules/lodash/slice.js create mode 100644 node_modules/umzug/node_modules/lodash/snakeCase.js create mode 100644 node_modules/umzug/node_modules/lodash/some.js create mode 100644 node_modules/umzug/node_modules/lodash/sortBy.js create mode 100644 node_modules/umzug/node_modules/lodash/sortedIndex.js create mode 100644 node_modules/umzug/node_modules/lodash/sortedIndexBy.js create mode 100644 node_modules/umzug/node_modules/lodash/sortedIndexOf.js create mode 100644 node_modules/umzug/node_modules/lodash/sortedLastIndex.js create mode 100644 node_modules/umzug/node_modules/lodash/sortedLastIndexBy.js create mode 100644 node_modules/umzug/node_modules/lodash/sortedLastIndexOf.js create mode 100644 node_modules/umzug/node_modules/lodash/sortedUniq.js create mode 100644 node_modules/umzug/node_modules/lodash/sortedUniqBy.js create mode 100644 node_modules/umzug/node_modules/lodash/split.js create mode 100644 node_modules/umzug/node_modules/lodash/spread.js create mode 100644 node_modules/umzug/node_modules/lodash/startCase.js create mode 100644 node_modules/umzug/node_modules/lodash/startsWith.js create mode 100644 node_modules/umzug/node_modules/lodash/string.js create mode 100644 node_modules/umzug/node_modules/lodash/stubArray.js create mode 100644 node_modules/umzug/node_modules/lodash/stubFalse.js create mode 100644 node_modules/umzug/node_modules/lodash/stubObject.js create mode 100644 node_modules/umzug/node_modules/lodash/stubString.js create mode 100644 node_modules/umzug/node_modules/lodash/stubTrue.js create mode 100644 node_modules/umzug/node_modules/lodash/subtract.js create mode 100644 node_modules/umzug/node_modules/lodash/sum.js create mode 100644 node_modules/umzug/node_modules/lodash/sumBy.js create mode 100644 node_modules/umzug/node_modules/lodash/tail.js create mode 100644 node_modules/umzug/node_modules/lodash/take.js create mode 100644 node_modules/umzug/node_modules/lodash/takeRight.js create mode 100644 node_modules/umzug/node_modules/lodash/takeRightWhile.js create mode 100644 node_modules/umzug/node_modules/lodash/takeWhile.js create mode 100644 node_modules/umzug/node_modules/lodash/tap.js create mode 100644 node_modules/umzug/node_modules/lodash/template.js create mode 100644 node_modules/umzug/node_modules/lodash/templateSettings.js create mode 100644 node_modules/umzug/node_modules/lodash/throttle.js create mode 100644 node_modules/umzug/node_modules/lodash/thru.js create mode 100644 node_modules/umzug/node_modules/lodash/times.js create mode 100644 node_modules/umzug/node_modules/lodash/toArray.js create mode 100644 node_modules/umzug/node_modules/lodash/toFinite.js create mode 100644 node_modules/umzug/node_modules/lodash/toInteger.js create mode 100644 node_modules/umzug/node_modules/lodash/toIterator.js create mode 100644 node_modules/umzug/node_modules/lodash/toJSON.js create mode 100644 node_modules/umzug/node_modules/lodash/toLength.js create mode 100644 node_modules/umzug/node_modules/lodash/toLower.js create mode 100644 node_modules/umzug/node_modules/lodash/toNumber.js create mode 100644 node_modules/umzug/node_modules/lodash/toPairs.js create mode 100644 node_modules/umzug/node_modules/lodash/toPairsIn.js create mode 100644 node_modules/umzug/node_modules/lodash/toPath.js create mode 100644 node_modules/umzug/node_modules/lodash/toPlainObject.js create mode 100644 node_modules/umzug/node_modules/lodash/toSafeInteger.js create mode 100644 node_modules/umzug/node_modules/lodash/toString.js create mode 100644 node_modules/umzug/node_modules/lodash/toUpper.js create mode 100644 node_modules/umzug/node_modules/lodash/transform.js create mode 100644 node_modules/umzug/node_modules/lodash/trim.js create mode 100644 node_modules/umzug/node_modules/lodash/trimEnd.js create mode 100644 node_modules/umzug/node_modules/lodash/trimStart.js create mode 100644 node_modules/umzug/node_modules/lodash/truncate.js create mode 100644 node_modules/umzug/node_modules/lodash/unary.js create mode 100644 node_modules/umzug/node_modules/lodash/unescape.js create mode 100644 node_modules/umzug/node_modules/lodash/union.js create mode 100644 node_modules/umzug/node_modules/lodash/unionBy.js create mode 100644 node_modules/umzug/node_modules/lodash/unionWith.js create mode 100644 node_modules/umzug/node_modules/lodash/uniq.js create mode 100644 node_modules/umzug/node_modules/lodash/uniqBy.js create mode 100644 node_modules/umzug/node_modules/lodash/uniqWith.js create mode 100644 node_modules/umzug/node_modules/lodash/uniqueId.js create mode 100644 node_modules/umzug/node_modules/lodash/unset.js create mode 100644 node_modules/umzug/node_modules/lodash/unzip.js create mode 100644 node_modules/umzug/node_modules/lodash/unzipWith.js create mode 100644 node_modules/umzug/node_modules/lodash/update.js create mode 100644 node_modules/umzug/node_modules/lodash/updateWith.js create mode 100644 node_modules/umzug/node_modules/lodash/upperCase.js create mode 100644 node_modules/umzug/node_modules/lodash/upperFirst.js create mode 100644 node_modules/umzug/node_modules/lodash/util.js create mode 100644 node_modules/umzug/node_modules/lodash/value.js create mode 100644 node_modules/umzug/node_modules/lodash/valueOf.js create mode 100644 node_modules/umzug/node_modules/lodash/values.js create mode 100644 node_modules/umzug/node_modules/lodash/valuesIn.js create mode 100644 node_modules/umzug/node_modules/lodash/without.js create mode 100644 node_modules/umzug/node_modules/lodash/words.js create mode 100644 node_modules/umzug/node_modules/lodash/wrap.js create mode 100644 node_modules/umzug/node_modules/lodash/wrapperAt.js create mode 100644 node_modules/umzug/node_modules/lodash/wrapperChain.js create mode 100644 node_modules/umzug/node_modules/lodash/wrapperLodash.js create mode 100644 node_modules/umzug/node_modules/lodash/wrapperReverse.js create mode 100644 node_modules/umzug/node_modules/lodash/wrapperValue.js create mode 100644 node_modules/umzug/node_modules/lodash/xor.js create mode 100644 node_modules/umzug/node_modules/lodash/xorBy.js create mode 100644 node_modules/umzug/node_modules/lodash/xorWith.js create mode 100644 node_modules/umzug/node_modules/lodash/zip.js create mode 100644 node_modules/umzug/node_modules/lodash/zipObject.js create mode 100644 node_modules/umzug/node_modules/lodash/zipObjectDeep.js create mode 100644 node_modules/umzug/node_modules/lodash/zipWith.js create mode 100644 node_modules/umzug/package.json create mode 100644 node_modules/umzug/test/helper.js create mode 100644 node_modules/umzug/test/index/constructor.test.js create mode 100644 node_modules/umzug/test/index/down.test.js create mode 100644 node_modules/umzug/test/index/execute.test.js create mode 100644 node_modules/umzug/test/index/executed.test.js create mode 100644 node_modules/umzug/test/index/index.js create mode 100644 node_modules/umzug/test/index/pending.test.js create mode 100644 node_modules/umzug/test/index/up.test.js create mode 100644 node_modules/umzug/test/storages/index.js create mode 100644 node_modules/umzug/test/storages/json.test.js create mode 100644 node_modules/umzug/test/storages/none.test.js create mode 100644 node_modules/umzug/test/storages/sequelize.test.js create mode 100644 node_modules/umzug/yarn.lock create mode 100644 node_modules/unc-path-regex/LICENSE create mode 100644 node_modules/unc-path-regex/README.md create mode 100644 node_modules/unc-path-regex/index.js create mode 100644 node_modules/unc-path-regex/package.json create mode 100644 node_modules/unique-stream/.npmignore create mode 100644 node_modules/unique-stream/.travis.yml create mode 100644 node_modules/unique-stream/LICENSE create mode 100644 node_modules/unique-stream/README.md create mode 100644 node_modules/unique-stream/index.js create mode 100644 node_modules/unique-stream/package.json create mode 100644 node_modules/unique-stream/test/index.js create mode 100644 node_modules/unpipe/HISTORY.md create mode 100644 node_modules/unpipe/LICENSE create mode 100644 node_modules/unpipe/README.md create mode 100644 node_modules/unpipe/index.js create mode 100644 node_modules/unpipe/package.json create mode 100755 node_modules/user-home/cli.js create mode 100644 node_modules/user-home/index.js create mode 100644 node_modules/user-home/license create mode 100644 node_modules/user-home/package.json create mode 100644 node_modules/user-home/readme.md create mode 100644 node_modules/util-deprecate/History.md create mode 100644 node_modules/util-deprecate/LICENSE create mode 100644 node_modules/util-deprecate/README.md create mode 100644 node_modules/util-deprecate/browser.js create mode 100644 node_modules/util-deprecate/node.js create mode 100644 node_modules/util-deprecate/package.json create mode 100644 node_modules/utils-merge/.travis.yml create mode 100644 node_modules/utils-merge/LICENSE create mode 100644 node_modules/utils-merge/README.md create mode 100644 node_modules/utils-merge/index.js create mode 100644 node_modules/utils-merge/package.json create mode 100644 node_modules/uuid/.npmignore create mode 100644 node_modules/uuid/.travis.yml create mode 100644 node_modules/uuid/AUTHORS create mode 100644 node_modules/uuid/HISTORY.md create mode 100644 node_modules/uuid/LICENSE.md create mode 100644 node_modules/uuid/README.md create mode 100755 node_modules/uuid/bin/uuid create mode 100644 node_modules/uuid/index.js create mode 100644 node_modules/uuid/lib/bytesToUuid.js create mode 100644 node_modules/uuid/lib/rng-browser.js create mode 100644 node_modules/uuid/lib/rng.js create mode 100644 node_modules/uuid/package.json create mode 100644 node_modules/uuid/test/mocha.opts create mode 100644 node_modules/uuid/test/test.js create mode 100644 node_modules/uuid/v1.js create mode 100644 node_modules/uuid/v4.js create mode 100644 node_modules/v8flags/.npmignore create mode 100644 node_modules/v8flags/LICENSE create mode 100644 node_modules/v8flags/README.md create mode 100644 node_modules/v8flags/index.js create mode 100644 node_modules/v8flags/package.json create mode 100644 node_modules/validate-npm-package-license/LICENSE create mode 100644 node_modules/validate-npm-package-license/README.md create mode 100644 node_modules/validate-npm-package-license/index.js create mode 100644 node_modules/validate-npm-package-license/package.json create mode 100644 node_modules/validator/CHANGELOG.md create mode 100644 node_modules/validator/LICENSE create mode 100644 node_modules/validator/README.md create mode 100644 node_modules/validator/index.js create mode 100644 node_modules/validator/lib/alpha.js create mode 100644 node_modules/validator/lib/blacklist.js create mode 100644 node_modules/validator/lib/contains.js create mode 100644 node_modules/validator/lib/equals.js create mode 100644 node_modules/validator/lib/escape.js create mode 100644 node_modules/validator/lib/isAfter.js create mode 100644 node_modules/validator/lib/isAlpha.js create mode 100644 node_modules/validator/lib/isAlphanumeric.js create mode 100644 node_modules/validator/lib/isAscii.js create mode 100644 node_modules/validator/lib/isBase64.js create mode 100644 node_modules/validator/lib/isBefore.js create mode 100644 node_modules/validator/lib/isBoolean.js create mode 100644 node_modules/validator/lib/isByteLength.js create mode 100644 node_modules/validator/lib/isCreditCard.js create mode 100644 node_modules/validator/lib/isCurrency.js create mode 100644 node_modules/validator/lib/isDataURI.js create mode 100644 node_modules/validator/lib/isDate.js create mode 100644 node_modules/validator/lib/isDecimal.js create mode 100644 node_modules/validator/lib/isDivisibleBy.js create mode 100644 node_modules/validator/lib/isEmail.js create mode 100644 node_modules/validator/lib/isFQDN.js create mode 100644 node_modules/validator/lib/isFloat.js create mode 100644 node_modules/validator/lib/isFullWidth.js create mode 100644 node_modules/validator/lib/isHalfWidth.js create mode 100644 node_modules/validator/lib/isHexColor.js create mode 100644 node_modules/validator/lib/isHexadecimal.js create mode 100644 node_modules/validator/lib/isIP.js create mode 100644 node_modules/validator/lib/isISBN.js create mode 100644 node_modules/validator/lib/isISIN.js create mode 100644 node_modules/validator/lib/isISO8601.js create mode 100644 node_modules/validator/lib/isIn.js create mode 100644 node_modules/validator/lib/isInt.js create mode 100644 node_modules/validator/lib/isJSON.js create mode 100644 node_modules/validator/lib/isLength.js create mode 100644 node_modules/validator/lib/isLowercase.js create mode 100644 node_modules/validator/lib/isMACAddress.js create mode 100644 node_modules/validator/lib/isMD5.js create mode 100644 node_modules/validator/lib/isMobilePhone.js create mode 100644 node_modules/validator/lib/isMongoId.js create mode 100644 node_modules/validator/lib/isMultibyte.js create mode 100644 node_modules/validator/lib/isNull.js create mode 100644 node_modules/validator/lib/isNumeric.js create mode 100644 node_modules/validator/lib/isSurrogatePair.js create mode 100644 node_modules/validator/lib/isURL.js create mode 100644 node_modules/validator/lib/isUUID.js create mode 100644 node_modules/validator/lib/isUppercase.js create mode 100644 node_modules/validator/lib/isVariableWidth.js create mode 100644 node_modules/validator/lib/isWhitelisted.js create mode 100644 node_modules/validator/lib/ltrim.js create mode 100644 node_modules/validator/lib/matches.js create mode 100644 node_modules/validator/lib/normalizeEmail.js create mode 100644 node_modules/validator/lib/rtrim.js create mode 100644 node_modules/validator/lib/stripLow.js create mode 100644 node_modules/validator/lib/toBoolean.js create mode 100644 node_modules/validator/lib/toDate.js create mode 100644 node_modules/validator/lib/toFloat.js create mode 100644 node_modules/validator/lib/toInt.js create mode 100644 node_modules/validator/lib/trim.js create mode 100644 node_modules/validator/lib/unescape.js create mode 100644 node_modules/validator/lib/util/assertString.js create mode 100644 node_modules/validator/lib/util/merge.js create mode 100644 node_modules/validator/lib/util/toString.js create mode 100644 node_modules/validator/lib/whitelist.js create mode 100644 node_modules/validator/package.json create mode 100644 node_modules/validator/validator.js create mode 100644 node_modules/validator/validator.min.js create mode 100644 node_modules/vary/HISTORY.md create mode 100644 node_modules/vary/LICENSE create mode 100644 node_modules/vary/README.md create mode 100644 node_modules/vary/index.js create mode 100644 node_modules/vary/package.json create mode 100755 node_modules/vinyl-fs/LICENSE create mode 100644 node_modules/vinyl-fs/README.md create mode 100644 node_modules/vinyl-fs/index.js create mode 100644 node_modules/vinyl-fs/lib/dest/index.js create mode 100644 node_modules/vinyl-fs/lib/dest/writeContents/index.js create mode 100644 node_modules/vinyl-fs/lib/dest/writeContents/writeBuffer.js create mode 100644 node_modules/vinyl-fs/lib/dest/writeContents/writeDir.js create mode 100644 node_modules/vinyl-fs/lib/dest/writeContents/writeStream.js create mode 100644 node_modules/vinyl-fs/lib/src/getContents/bufferFile.js create mode 100644 node_modules/vinyl-fs/lib/src/getContents/index.js create mode 100644 node_modules/vinyl-fs/lib/src/getContents/readDir.js create mode 100644 node_modules/vinyl-fs/lib/src/getContents/streamFile.js create mode 100644 node_modules/vinyl-fs/lib/src/getStats.js create mode 100644 node_modules/vinyl-fs/lib/src/index.js create mode 100644 node_modules/vinyl-fs/node_modules/clone/.npmignore create mode 100644 node_modules/vinyl-fs/node_modules/clone/.travis.yml create mode 100644 node_modules/vinyl-fs/node_modules/clone/LICENSE create mode 100644 node_modules/vinyl-fs/node_modules/clone/README.md create mode 100644 node_modules/vinyl-fs/node_modules/clone/clone.js create mode 100644 node_modules/vinyl-fs/node_modules/clone/package.json create mode 100644 node_modules/vinyl-fs/node_modules/clone/test.js create mode 100644 node_modules/vinyl-fs/node_modules/graceful-fs/.npmignore create mode 100644 node_modules/vinyl-fs/node_modules/graceful-fs/.travis.yml create mode 100644 node_modules/vinyl-fs/node_modules/graceful-fs/LICENSE create mode 100644 node_modules/vinyl-fs/node_modules/graceful-fs/README.md create mode 100644 node_modules/vinyl-fs/node_modules/graceful-fs/fs.js create mode 100644 node_modules/vinyl-fs/node_modules/graceful-fs/graceful-fs.js create mode 100644 node_modules/vinyl-fs/node_modules/graceful-fs/package.json create mode 100644 node_modules/vinyl-fs/node_modules/graceful-fs/polyfills.js create mode 100644 node_modules/vinyl-fs/node_modules/graceful-fs/test/max-open.js create mode 100644 node_modules/vinyl-fs/node_modules/graceful-fs/test/open.js create mode 100644 node_modules/vinyl-fs/node_modules/graceful-fs/test/readdir-sort.js create mode 100644 node_modules/vinyl-fs/node_modules/graceful-fs/test/write-then-read.js create mode 100644 node_modules/vinyl-fs/node_modules/isarray/README.md create mode 100644 node_modules/vinyl-fs/node_modules/isarray/build/build.js create mode 100644 node_modules/vinyl-fs/node_modules/isarray/component.json create mode 100644 node_modules/vinyl-fs/node_modules/isarray/index.js create mode 100644 node_modules/vinyl-fs/node_modules/isarray/package.json create mode 100644 node_modules/vinyl-fs/node_modules/readable-stream/.npmignore create mode 100644 node_modules/vinyl-fs/node_modules/readable-stream/LICENSE create mode 100644 node_modules/vinyl-fs/node_modules/readable-stream/README.md create mode 100644 node_modules/vinyl-fs/node_modules/readable-stream/duplex.js create mode 100644 node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_duplex.js create mode 100644 node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_passthrough.js create mode 100644 node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_readable.js create mode 100644 node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_transform.js create mode 100644 node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_writable.js create mode 100644 node_modules/vinyl-fs/node_modules/readable-stream/package.json create mode 100644 node_modules/vinyl-fs/node_modules/readable-stream/passthrough.js create mode 100644 node_modules/vinyl-fs/node_modules/readable-stream/readable.js create mode 100644 node_modules/vinyl-fs/node_modules/readable-stream/transform.js create mode 100644 node_modules/vinyl-fs/node_modules/readable-stream/writable.js create mode 100644 node_modules/vinyl-fs/node_modules/through2/.npmignore create mode 100644 node_modules/vinyl-fs/node_modules/through2/LICENSE create mode 100644 node_modules/vinyl-fs/node_modules/through2/README.md create mode 100644 node_modules/vinyl-fs/node_modules/through2/package.json create mode 100644 node_modules/vinyl-fs/node_modules/through2/through2.js create mode 100644 node_modules/vinyl-fs/node_modules/vinyl/LICENSE create mode 100644 node_modules/vinyl-fs/node_modules/vinyl/README.md create mode 100644 node_modules/vinyl-fs/node_modules/vinyl/index.js create mode 100644 node_modules/vinyl-fs/node_modules/vinyl/lib/cloneBuffer.js create mode 100644 node_modules/vinyl-fs/node_modules/vinyl/lib/inspectStream.js create mode 100644 node_modules/vinyl-fs/node_modules/vinyl/lib/isBuffer.js create mode 100644 node_modules/vinyl-fs/node_modules/vinyl/lib/isNull.js create mode 100644 node_modules/vinyl-fs/node_modules/vinyl/lib/isStream.js create mode 100644 node_modules/vinyl-fs/node_modules/vinyl/package.json create mode 100644 node_modules/vinyl-fs/package.json create mode 100644 node_modules/vinyl/LICENSE create mode 100644 node_modules/vinyl/README.md create mode 100644 node_modules/vinyl/index.js create mode 100644 node_modules/vinyl/lib/cloneBuffer.js create mode 100644 node_modules/vinyl/lib/inspectStream.js create mode 100644 node_modules/vinyl/lib/isBuffer.js create mode 100644 node_modules/vinyl/lib/isNull.js create mode 100644 node_modules/vinyl/lib/isStream.js create mode 100644 node_modules/vinyl/package.json create mode 100644 node_modules/void-elements/.gitattributes create mode 100644 node_modules/void-elements/.npmignore create mode 100644 node_modules/void-elements/.travis.yml create mode 100644 node_modules/void-elements/LICENSE create mode 100644 node_modules/void-elements/README.md create mode 100644 node_modules/void-elements/index.js create mode 100644 node_modules/void-elements/package.json create mode 100644 node_modules/void-elements/pre-publish.js create mode 100644 node_modules/void-elements/test/index.js create mode 100644 node_modules/which-module/CHANGELOG.md create mode 100644 node_modules/which-module/LICENSE create mode 100644 node_modules/which-module/README.md create mode 100644 node_modules/which-module/index.js create mode 100644 node_modules/which-module/package.json create mode 100644 node_modules/which/CHANGELOG.md create mode 100644 node_modules/which/LICENSE create mode 100644 node_modules/which/README.md create mode 100755 node_modules/which/bin/which create mode 100644 node_modules/which/package.json create mode 100644 node_modules/which/which.js create mode 100644 node_modules/window-size/LICENSE-MIT create mode 100644 node_modules/window-size/README.md create mode 100644 node_modules/window-size/index.js create mode 100644 node_modules/window-size/package.json create mode 100644 node_modules/with/.npmignore create mode 100644 node_modules/with/LICENSE create mode 100644 node_modules/with/README.md create mode 100644 node_modules/with/index.js create mode 120000 node_modules/with/node_modules/.bin/acorn create mode 100644 node_modules/with/node_modules/acorn/.editorconfig create mode 100644 node_modules/with/node_modules/acorn/.gitattributes create mode 100644 node_modules/with/node_modules/acorn/.npmignore create mode 100644 node_modules/with/node_modules/acorn/.tern-project create mode 100644 node_modules/with/node_modules/acorn/.travis.yml create mode 100644 node_modules/with/node_modules/acorn/AUTHORS create mode 100644 node_modules/with/node_modules/acorn/LICENSE create mode 100644 node_modules/with/node_modules/acorn/README.md create mode 100755 node_modules/with/node_modules/acorn/bin/acorn create mode 100644 node_modules/with/node_modules/acorn/bin/build-acorn.js create mode 100644 node_modules/with/node_modules/acorn/bin/generate-identifier-regex.js create mode 100755 node_modules/with/node_modules/acorn/bin/prepublish.sh create mode 100755 node_modules/with/node_modules/acorn/bin/update_authors.sh create mode 100755 node_modules/with/node_modules/acorn/bin/without_eval create mode 100644 node_modules/with/node_modules/acorn/dist/.keep create mode 100644 node_modules/with/node_modules/acorn/dist/acorn.js create mode 100644 node_modules/with/node_modules/acorn/dist/acorn_csp.js create mode 100644 node_modules/with/node_modules/acorn/dist/acorn_loose.js create mode 100644 node_modules/with/node_modules/acorn/dist/walk.js create mode 100644 node_modules/with/node_modules/acorn/package.json create mode 100755 node_modules/with/node_modules/acorn/src/expression.js create mode 100644 node_modules/with/node_modules/acorn/src/identifier.js create mode 100644 node_modules/with/node_modules/acorn/src/index.js create mode 100755 node_modules/with/node_modules/acorn/src/location.js create mode 100644 node_modules/with/node_modules/acorn/src/loose/acorn_loose.js create mode 100644 node_modules/with/node_modules/acorn/src/loose/expression.js create mode 100644 node_modules/with/node_modules/acorn/src/loose/index.js create mode 100644 node_modules/with/node_modules/acorn/src/loose/parseutil.js create mode 100644 node_modules/with/node_modules/acorn/src/loose/state.js create mode 100644 node_modules/with/node_modules/acorn/src/loose/statement.js create mode 100644 node_modules/with/node_modules/acorn/src/loose/tokenize.js create mode 100755 node_modules/with/node_modules/acorn/src/lval.js create mode 100755 node_modules/with/node_modules/acorn/src/node.js create mode 100644 node_modules/with/node_modules/acorn/src/options.js create mode 100644 node_modules/with/node_modules/acorn/src/parseutil.js create mode 100644 node_modules/with/node_modules/acorn/src/state.js create mode 100644 node_modules/with/node_modules/acorn/src/statement.js create mode 100644 node_modules/with/node_modules/acorn/src/tokencontext.js create mode 100644 node_modules/with/node_modules/acorn/src/tokenize.js create mode 100644 node_modules/with/node_modules/acorn/src/tokentype.js create mode 100644 node_modules/with/node_modules/acorn/src/util.js create mode 100644 node_modules/with/node_modules/acorn/src/walk/index.js create mode 100644 node_modules/with/node_modules/acorn/src/whitespace.js create mode 100644 node_modules/with/package.json create mode 100644 node_modules/wkx/.editorconfig create mode 100644 node_modules/wkx/.jshintignore create mode 100644 node_modules/wkx/.jshintrc create mode 100644 node_modules/wkx/.npmignore create mode 100644 node_modules/wkx/.travis.yml create mode 100644 node_modules/wkx/LICENSE.txt create mode 100644 node_modules/wkx/README.md create mode 100644 node_modules/wkx/bower.json create mode 100644 node_modules/wkx/build/update-testdata.js create mode 100644 node_modules/wkx/dist/wkx.js create mode 100644 node_modules/wkx/dist/wkx.min.js create mode 100644 node_modules/wkx/lib/binaryreader.js create mode 100644 node_modules/wkx/lib/binarywriter.js create mode 100644 node_modules/wkx/lib/geometry.js create mode 100644 node_modules/wkx/lib/geometrycollection.js create mode 100644 node_modules/wkx/lib/linestring.js create mode 100644 node_modules/wkx/lib/multilinestring.js create mode 100644 node_modules/wkx/lib/multipoint.js create mode 100644 node_modules/wkx/lib/multipolygon.js create mode 100644 node_modules/wkx/lib/point.js create mode 100644 node_modules/wkx/lib/polygon.js create mode 100644 node_modules/wkx/lib/types.js create mode 100644 node_modules/wkx/lib/wktparser.js create mode 100644 node_modules/wkx/lib/wkx.js create mode 100644 node_modules/wkx/lib/zigzag.js create mode 100644 node_modules/wkx/package.json create mode 100644 node_modules/wkx/test/binaryreader.js create mode 100644 node_modules/wkx/test/binarywriter.js create mode 100644 node_modules/wkx/test/geojson.js create mode 100644 node_modules/wkx/test/testdata.json create mode 100644 node_modules/wkx/test/testdataM.json create mode 100644 node_modules/wkx/test/testdataZ.json create mode 100644 node_modules/wkx/test/testdataZM.json create mode 100644 node_modules/wkx/test/twkb.js create mode 100644 node_modules/wkx/test/wkx.js create mode 100644 node_modules/wkx/test/zigzag.js create mode 100644 node_modules/wordwrap/LICENSE create mode 100644 node_modules/wordwrap/README.markdown create mode 100644 node_modules/wordwrap/example/center.js create mode 100644 node_modules/wordwrap/example/meat.js create mode 100644 node_modules/wordwrap/index.js create mode 100644 node_modules/wordwrap/package.json create mode 100644 node_modules/wordwrap/test/break.js create mode 100644 node_modules/wordwrap/test/idleness.txt create mode 100644 node_modules/wordwrap/test/wrap.js create mode 100755 node_modules/wrap-ansi/index.js create mode 100644 node_modules/wrap-ansi/license create mode 100644 node_modules/wrap-ansi/package.json create mode 100644 node_modules/wrap-ansi/readme.md create mode 100644 node_modules/wrappy/LICENSE create mode 100644 node_modules/wrappy/README.md create mode 100644 node_modules/wrappy/package.json create mode 100644 node_modules/wrappy/wrappy.js create mode 100644 node_modules/xtend/.jshintrc create mode 100644 node_modules/xtend/.npmignore create mode 100644 node_modules/xtend/LICENCE create mode 100644 node_modules/xtend/Makefile create mode 100644 node_modules/xtend/README.md create mode 100644 node_modules/xtend/immutable.js create mode 100644 node_modules/xtend/mutable.js create mode 100644 node_modules/xtend/package.json create mode 100644 node_modules/xtend/test.js create mode 100644 node_modules/y18n/LICENSE create mode 100644 node_modules/y18n/README.md create mode 100644 node_modules/y18n/index.js create mode 100644 node_modules/y18n/package.json create mode 100644 node_modules/yallist/LICENSE create mode 100644 node_modules/yallist/README.md create mode 100644 node_modules/yallist/iterator.js create mode 100644 node_modules/yallist/package.json create mode 100644 node_modules/yallist/yallist.js create mode 100644 node_modules/yargs-parser/CHANGELOG.md create mode 100644 node_modules/yargs-parser/LICENSE.txt create mode 100644 node_modules/yargs-parser/README.md create mode 100644 node_modules/yargs-parser/index.js create mode 100644 node_modules/yargs-parser/lib/tokenize-arg-string.js create mode 100644 node_modules/yargs-parser/node_modules/camelcase/index.js create mode 100644 node_modules/yargs-parser/node_modules/camelcase/license create mode 100644 node_modules/yargs-parser/node_modules/camelcase/package.json create mode 100644 node_modules/yargs-parser/node_modules/camelcase/readme.md create mode 100644 node_modules/yargs-parser/package.json create mode 100644 node_modules/yargs/CHANGELOG.md create mode 100644 node_modules/yargs/LICENSE create mode 100644 node_modules/yargs/README.md create mode 100644 node_modules/yargs/completion.sh.hbs create mode 100644 node_modules/yargs/index.js create mode 100644 node_modules/yargs/lib/completion.js create mode 100644 node_modules/yargs/lib/parser.js create mode 100644 node_modules/yargs/lib/usage.js create mode 100644 node_modules/yargs/lib/validation.js create mode 100644 node_modules/yargs/package.json create mode 100644 package.json create mode 100644 public/stylesheets/style.css create mode 100644 routes/index.js create mode 100644 routes/users.js create mode 100644 seeders/20170425042049-seed_data_contact.js create mode 100644 views/error.jade create mode 100644 views/index.jade create mode 100644 views/layout.jade diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules diff --git a/README.md b/README.md index 6379a41..768d012 100644 --- a/README.md +++ b/README.md @@ -1 +1,14 @@ -# api-basic \ No newline at end of file +# api-basic + +My Phone Contact App + +Route +/api/users GET Get all the users +/api/users/:id GET Get a single users +/api/users POST Create a user +/api/users/:id DELETE Delete a user +/api/users/:id PUT Update a user with new info + +To Use +npm install +npm start diff --git a/app.js b/app.js new file mode 100644 index 0000000..bdd6eb6 --- /dev/null +++ b/app.js @@ -0,0 +1,46 @@ +var express = require('express'); +var path = require('path'); +var favicon = require('serve-favicon'); +var logger = require('morgan'); +var cookieParser = require('cookie-parser'); +var bodyParser = require('body-parser'); + +var index = require('./routes/index'); +var users = require('./routes/users'); + +var app = express(); + +// view engine setup +app.set('views', path.join(__dirname, 'views')); +app.set('view engine', 'jade'); + +// uncomment after placing your favicon in /public +//app.use(favicon(path.join(__dirname, 'public', 'favicon.ico'))); +app.use(logger('dev')); +app.use(bodyParser.json()); +app.use(bodyParser.urlencoded({ extended: false })); +app.use(cookieParser()); +app.use(express.static(path.join(__dirname, 'public'))); + +app.use('/', index); +app.use('/api/users', users); + +// catch 404 and forward to error handler +app.use(function(req, res, next) { + var err = new Error('Not Found'); + err.status = 404; + next(err); +}); + +// error handler +app.use(function(err, req, res, next) { + // set locals, only providing error in development + res.locals.message = err.message; + res.locals.error = req.app.get('env') === 'development' ? err : {}; + + // render the error page + res.status(err.status || 500); + res.render('error'); +}); + +module.exports = app; diff --git a/bin/www b/bin/www new file mode 100755 index 0000000..e49e193 --- /dev/null +++ b/bin/www @@ -0,0 +1,90 @@ +#!/usr/bin/env node + +/** + * Module dependencies. + */ + +var app = require('../app'); +var debug = require('debug')('api-basic:server'); +var http = require('http'); + +/** + * Get port from environment and store in Express. + */ + +var port = normalizePort(process.env.PORT || '3000'); +app.set('port', port); + +/** + * Create HTTP server. + */ + +var server = http.createServer(app); + +/** + * Listen on provided port, on all network interfaces. + */ + +server.listen(port); +server.on('error', onError); +server.on('listening', onListening); + +/** + * Normalize a port into a number, string, or false. + */ + +function normalizePort(val) { + var port = parseInt(val, 10); + + if (isNaN(port)) { + // named pipe + return val; + } + + if (port >= 0) { + // port number + return port; + } + + return false; +} + +/** + * Event listener for HTTP server "error" event. + */ + +function onError(error) { + if (error.syscall !== 'listen') { + throw error; + } + + var bind = typeof port === 'string' + ? 'Pipe ' + port + : 'Port ' + port; + + // handle specific listen errors with friendly messages + switch (error.code) { + case 'EACCES': + console.error(bind + ' requires elevated privileges'); + process.exit(1); + break; + case 'EADDRINUSE': + console.error(bind + ' is already in use'); + process.exit(1); + break; + default: + throw error; + } +} + +/** + * Event listener for HTTP server "listening" event. + */ + +function onListening() { + var addr = server.address(); + var bind = typeof addr === 'string' + ? 'pipe ' + addr + : 'port ' + addr.port; + debug('Listening on ' + bind); +} diff --git a/config/config.json b/config/config.json new file mode 100644 index 0000000..9ddbe59 --- /dev/null +++ b/config/config.json @@ -0,0 +1,23 @@ +{ + "development": { + "username": "postgres", + "password": "postgres1", + "database": "api-basic", + "host": "127.0.0.1", + "dialect": "postgres" + }, + "test": { + "username": "root", + "password": null, + "database": "database_test", + "host": "127.0.0.1", + "dialect": "mysql" + }, + "production": { + "username": "root", + "password": null, + "database": "database_production", + "host": "127.0.0.1", + "dialect": "mysql" + } +} diff --git a/controllers/user.js b/controllers/user.js new file mode 100644 index 0000000..e78be76 --- /dev/null +++ b/controllers/user.js @@ -0,0 +1,62 @@ +const db = require('../models') +const methods = {} +// router.get('/', userController.getAll ); +methods.getAll = function(req, res, next) { + db.Contact.findAll() + .then( user => { + res.json(user) + }) + .catch( error => { + res.json({error}) + }) +}// getAll + +// router.get('/:id', userController.getById ); +methods.getById = function(req, res, next) { + db.Contact.findById(req.params.id) + .then( contact => { + res.json(contact) + }) + .catch( error => { + res.json({error}) + }) +} +// router.post('/', userController.createUser ); +methods.createUser = function(req, res, next) { + db.Contact.create( + {name: req.body.name, phone: parseInt(req.body.phone)} + ) .then(data => { + res.send("data berhasil ditambahkan !") + }) + .catch( error => { + res.json({error}) + }) +} +// router.delete('/:id', userController.deleteById ); +methods.deleteById = function(req, res, next) { + db.Contact.destroy({ + where: {id:req.params.id} + }) + .then( contact => { + res.send("berhasil dihapus") + }) + .catch( error => { + res.json({error}) + }) +} +// router.put('/:id', userController.updateById ); +methods.updateById = function(req, res, next) { + db.Contact.update({ + name: req.body.name, + phone: parseInt(req.body.phone) + },{ + where: {id:req.params.id} + }) + .then( contact => { + res.send('berhasil di update') + }) + .catch( error => { + res.json({error}) + }) +} +module.exports = methods diff --git a/migrations/20170425040805-create-contact.js b/migrations/20170425040805-create-contact.js new file mode 100644 index 0000000..5d76a41 --- /dev/null +++ b/migrations/20170425040805-create-contact.js @@ -0,0 +1,30 @@ +'use strict'; +module.exports = { + up: function(queryInterface, Sequelize) { + return queryInterface.createTable('Contacts', { + id: { + allowNull: false, + autoIncrement: true, + primaryKey: true, + type: Sequelize.INTEGER + }, + name: { + type: Sequelize.STRING + }, + phone: { + type: Sequelize.INTEGER + }, + createdAt: { + allowNull: false, + type: Sequelize.DATE + }, + updatedAt: { + allowNull: false, + type: Sequelize.DATE + } + }); + }, + down: function(queryInterface, Sequelize) { + return queryInterface.dropTable('Contacts'); + } +}; \ No newline at end of file diff --git a/models/contact.js b/models/contact.js new file mode 100644 index 0000000..1e9875f --- /dev/null +++ b/models/contact.js @@ -0,0 +1,14 @@ +'use strict'; +module.exports = function(sequelize, DataTypes) { + var Contact = sequelize.define('Contact', { + name: DataTypes.STRING, + phone: DataTypes.INTEGER + }, { + classMethods: { + associate: function(models) { + // associations can be defined here + } + } + }); + return Contact; +}; \ No newline at end of file diff --git a/models/index.js b/models/index.js new file mode 100644 index 0000000..7540dba --- /dev/null +++ b/models/index.js @@ -0,0 +1,36 @@ +'use strict'; + +var fs = require('fs'); +var path = require('path'); +var Sequelize = require('sequelize'); +var basename = path.basename(module.filename); +var env = process.env.NODE_ENV || 'development'; +var config = require(__dirname + '/../config/config.json')[env]; +var db = {}; + +if (config.use_env_variable) { + var sequelize = new Sequelize(process.env[config.use_env_variable]); +} else { + var sequelize = new Sequelize(config.database, config.username, config.password, config); +} + +fs + .readdirSync(__dirname) + .filter(function(file) { + return (file.indexOf('.') !== 0) && (file !== basename) && (file.slice(-3) === '.js'); + }) + .forEach(function(file) { + var model = sequelize['import'](path.join(__dirname, file)); + db[model.name] = model; + }); + +Object.keys(db).forEach(function(modelName) { + if (db[modelName].associate) { + db[modelName].associate(db); + } +}); + +db.sequelize = sequelize; +db.Sequelize = Sequelize; + +module.exports = db; diff --git a/node_modules/.bin/acorn b/node_modules/.bin/acorn new file mode 120000 index 0000000..cf76760 --- /dev/null +++ b/node_modules/.bin/acorn @@ -0,0 +1 @@ +../acorn/bin/acorn \ No newline at end of file diff --git a/node_modules/.bin/cleancss b/node_modules/.bin/cleancss new file mode 120000 index 0000000..2a3439e --- /dev/null +++ b/node_modules/.bin/cleancss @@ -0,0 +1 @@ +../clean-css/bin/cleancss \ No newline at end of file diff --git a/node_modules/.bin/cross-env b/node_modules/.bin/cross-env new file mode 120000 index 0000000..f68f48a --- /dev/null +++ b/node_modules/.bin/cross-env @@ -0,0 +1 @@ +../cross-env/dist/bin/cross-env.js \ No newline at end of file diff --git a/node_modules/.bin/css-beautify b/node_modules/.bin/css-beautify new file mode 120000 index 0000000..d9b8ee2 --- /dev/null +++ b/node_modules/.bin/css-beautify @@ -0,0 +1 @@ +../js-beautify/js/bin/css-beautify.js \ No newline at end of file diff --git a/node_modules/.bin/editorconfig b/node_modules/.bin/editorconfig new file mode 120000 index 0000000..a151e0b --- /dev/null +++ b/node_modules/.bin/editorconfig @@ -0,0 +1 @@ +../editorconfig/bin/editorconfig \ No newline at end of file diff --git a/node_modules/.bin/gulp b/node_modules/.bin/gulp new file mode 120000 index 0000000..5de7332 --- /dev/null +++ b/node_modules/.bin/gulp @@ -0,0 +1 @@ +../gulp/bin/gulp.js \ No newline at end of file diff --git a/node_modules/.bin/html-beautify b/node_modules/.bin/html-beautify new file mode 120000 index 0000000..c17c69c --- /dev/null +++ b/node_modules/.bin/html-beautify @@ -0,0 +1 @@ +../js-beautify/js/bin/html-beautify.js \ No newline at end of file diff --git a/node_modules/.bin/jade b/node_modules/.bin/jade new file mode 120000 index 0000000..65a3bac --- /dev/null +++ b/node_modules/.bin/jade @@ -0,0 +1 @@ +../jade/bin/jade.js \ No newline at end of file diff --git a/node_modules/.bin/js-beautify b/node_modules/.bin/js-beautify new file mode 120000 index 0000000..548ddf4 --- /dev/null +++ b/node_modules/.bin/js-beautify @@ -0,0 +1 @@ +../js-beautify/js/bin/js-beautify.js \ No newline at end of file diff --git a/node_modules/.bin/mime b/node_modules/.bin/mime new file mode 120000 index 0000000..fbb7ee0 --- /dev/null +++ b/node_modules/.bin/mime @@ -0,0 +1 @@ +../mime/cli.js \ No newline at end of file diff --git a/node_modules/.bin/mkdirp b/node_modules/.bin/mkdirp new file mode 120000 index 0000000..017896c --- /dev/null +++ b/node_modules/.bin/mkdirp @@ -0,0 +1 @@ +../mkdirp/bin/cmd.js \ No newline at end of file diff --git a/node_modules/.bin/nopt b/node_modules/.bin/nopt new file mode 120000 index 0000000..6b6566e --- /dev/null +++ b/node_modules/.bin/nopt @@ -0,0 +1 @@ +../nopt/bin/nopt.js \ No newline at end of file diff --git a/node_modules/.bin/semver b/node_modules/.bin/semver new file mode 120000 index 0000000..317eb29 --- /dev/null +++ b/node_modules/.bin/semver @@ -0,0 +1 @@ +../semver/bin/semver \ No newline at end of file diff --git a/node_modules/.bin/sequelize b/node_modules/.bin/sequelize new file mode 120000 index 0000000..c7e502b --- /dev/null +++ b/node_modules/.bin/sequelize @@ -0,0 +1 @@ +../sequelize-cli/bin/sequelize \ No newline at end of file diff --git a/node_modules/.bin/strip-bom b/node_modules/.bin/strip-bom new file mode 120000 index 0000000..ba65fdf --- /dev/null +++ b/node_modules/.bin/strip-bom @@ -0,0 +1 @@ +../strip-bom/cli.js \ No newline at end of file diff --git a/node_modules/.bin/uglifyjs b/node_modules/.bin/uglifyjs new file mode 120000 index 0000000..fef3468 --- /dev/null +++ b/node_modules/.bin/uglifyjs @@ -0,0 +1 @@ +../uglify-js/bin/uglifyjs \ No newline at end of file diff --git a/node_modules/.bin/user-home b/node_modules/.bin/user-home new file mode 120000 index 0000000..d72d76b --- /dev/null +++ b/node_modules/.bin/user-home @@ -0,0 +1 @@ +../user-home/cli.js \ No newline at end of file diff --git a/node_modules/.bin/uuid b/node_modules/.bin/uuid new file mode 120000 index 0000000..b3e45bc --- /dev/null +++ b/node_modules/.bin/uuid @@ -0,0 +1 @@ +../uuid/bin/uuid \ No newline at end of file diff --git a/node_modules/.bin/which b/node_modules/.bin/which new file mode 120000 index 0000000..f62471c --- /dev/null +++ b/node_modules/.bin/which @@ -0,0 +1 @@ +../which/bin/which \ No newline at end of file diff --git a/node_modules/@types/geojson/LICENSE b/node_modules/@types/geojson/LICENSE new file mode 100644 index 0000000..2107107 --- /dev/null +++ b/node_modules/@types/geojson/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + 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 diff --git a/node_modules/@types/geojson/README.md b/node_modules/@types/geojson/README.md new file mode 100644 index 0000000..1f9a39c --- /dev/null +++ b/node_modules/@types/geojson/README.md @@ -0,0 +1,16 @@ +# Installation +> `npm install --save @types/geojson` + +# Summary +This package contains type definitions for GeoJSON Format Specification Revision (http://geojson.org/). + +# Details +Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/geojson + +Additional Details + * Last updated: Mon, 17 Apr 2017 17:55:17 GMT + * Dependencies: none + * Global values: GeoJSON + +# Credits +These definitions were written by Jacob Bruun . diff --git a/node_modules/@types/geojson/index.d.ts b/node_modules/@types/geojson/index.d.ts new file mode 100644 index 0000000..9902b97 --- /dev/null +++ b/node_modules/@types/geojson/index.d.ts @@ -0,0 +1,121 @@ +// Type definitions for GeoJSON Format Specification Revision 1.0 +// Project: http://geojson.org/ +// Definitions by: Jacob Bruun +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export as namespace GeoJSON; + +/*** +* http://geojson.org/geojson-spec.html#geojson-objects +*/ +export interface GeoJsonObject { + type: string; + bbox?: number[]; + crs?: CoordinateReferenceSystem; +} + +/*** +* http://geojson.org/geojson-spec.html#positions +*/ +export type Position = number[]; + +/*** +* http://geojson.org/geojson-spec.html#geometry-objects +*/ +export interface DirectGeometryObject extends GeoJsonObject { + coordinates: Position[][][] | Position[][] | Position[] | Position; +} +/** + * GeometryObject supports geometry collection as well + */ +export type GeometryObject = DirectGeometryObject | GeometryCollection; + +/*** +* http://geojson.org/geojson-spec.html#point +*/ +export interface Point extends DirectGeometryObject { + type: 'Point'; + coordinates: Position; +} + +/*** +* http://geojson.org/geojson-spec.html#multipoint +*/ +export interface MultiPoint extends DirectGeometryObject { + type: 'MultiPoint'; + coordinates: Position[]; +} + +/*** +* http://geojson.org/geojson-spec.html#linestring +*/ +export interface LineString extends DirectGeometryObject { + type: 'LineString'; + coordinates: Position[]; +} + +/*** +* http://geojson.org/geojson-spec.html#multilinestring +*/ +export interface MultiLineString extends DirectGeometryObject { + type: 'MultiLineString'; + coordinates: Position[][]; +} + +/*** +* http://geojson.org/geojson-spec.html#polygon +*/ +export interface Polygon extends DirectGeometryObject { + type: 'Polygon'; + coordinates: Position[][]; +} + +/*** +* http://geojson.org/geojson-spec.html#multipolygon +*/ +export interface MultiPolygon extends DirectGeometryObject { + type: 'MultiPolygon'; + coordinates: Position[][][]; +} + +/*** +* http://geojson.org/geojson-spec.html#geometry-collection +*/ +export interface GeometryCollection extends GeoJsonObject { + type: 'GeometryCollection'; + geometries: GeometryObject[]; +} + +/*** +* http://geojson.org/geojson-spec.html#feature-objects +*/ +export interface Feature extends GeoJsonObject { + type: 'Feature'; + geometry: T; + properties: {} | null; + id?: string; +} + +/*** +* http://geojson.org/geojson-spec.html#feature-collection-objects +*/ +export interface FeatureCollection extends GeoJsonObject { + type: 'FeatureCollection'; + features: Array>; +} + +/*** +* http://geojson.org/geojson-spec.html#coordinate-reference-system-objects +*/ +export interface CoordinateReferenceSystem { + type: string; + properties: any; +} + +export interface NamedCoordinateReferenceSystem extends CoordinateReferenceSystem { + properties: { name: string }; +} + +export interface LinkedCoordinateReferenceSystem extends CoordinateReferenceSystem { + properties: { href: string; type: string }; +} diff --git a/node_modules/@types/geojson/package.json b/node_modules/@types/geojson/package.json new file mode 100644 index 0000000..51d5583 --- /dev/null +++ b/node_modules/@types/geojson/package.json @@ -0,0 +1,80 @@ +{ + "_args": [ + [ + { + "raw": "@types/geojson@^1.0.0", + "scope": "@types", + "escapedName": "@types%2fgeojson", + "name": "@types/geojson", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/terraformer" + ] + ], + "_from": "@types/geojson@>=1.0.0 <2.0.0", + "_id": "@types/geojson@1.0.2", + "_inCache": true, + "_location": "/@types/geojson", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/geojson-1.0.2.tgz_1492451765652_0.5249417354352772" + }, + "_npmUser": { + "name": "types", + "email": "ts-npm-types@microsoft.com" + }, + "_phantomChildren": {}, + "_requested": { + "raw": "@types/geojson@^1.0.0", + "scope": "@types", + "escapedName": "@types%2fgeojson", + "name": "@types/geojson", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/terraformer" + ], + "_resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-1.0.2.tgz", + "_shasum": "b02d10ab028e2928ac592a051aaa4981a1941d03", + "_shrinkwrap": null, + "_spec": "@types/geojson@^1.0.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/terraformer", + "contributors": [ + { + "name": "Jacob Bruun", + "url": "https://github.com/cobster/" + } + ], + "dependencies": {}, + "description": "TypeScript definitions for GeoJSON Format Specification Revision", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "b02d10ab028e2928ac592a051aaa4981a1941d03", + "tarball": "https://registry.npmjs.org/@types/geojson/-/geojson-1.0.2.tgz" + }, + "license": "MIT", + "main": "", + "maintainers": [ + { + "name": "types", + "email": "ts-npm-types@microsoft.com" + } + ], + "name": "@types/geojson", + "optionalDependencies": {}, + "peerDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" + }, + "scripts": {}, + "typeScriptVersion": "2.0", + "typesPublisherContentHash": "8af0f83b55578253a8217e74c8a6b4d11cf8aad1b82772cf45162e9ebc4eb776", + "version": "1.0.2" +} diff --git a/node_modules/abbrev/LICENSE b/node_modules/abbrev/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/node_modules/abbrev/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/abbrev/README.md b/node_modules/abbrev/README.md new file mode 100644 index 0000000..99746fe --- /dev/null +++ b/node_modules/abbrev/README.md @@ -0,0 +1,23 @@ +# abbrev-js + +Just like [ruby's Abbrev](http://apidock.com/ruby/Abbrev). + +Usage: + + var abbrev = require("abbrev"); + abbrev("foo", "fool", "folding", "flop"); + + // returns: + { fl: 'flop' + , flo: 'flop' + , flop: 'flop' + , fol: 'folding' + , fold: 'folding' + , foldi: 'folding' + , foldin: 'folding' + , folding: 'folding' + , foo: 'foo' + , fool: 'fool' + } + +This is handy for command-line scripts, or other cases where you want to be able to accept shorthands. diff --git a/node_modules/abbrev/abbrev.js b/node_modules/abbrev/abbrev.js new file mode 100644 index 0000000..7b1dc5d --- /dev/null +++ b/node_modules/abbrev/abbrev.js @@ -0,0 +1,61 @@ +module.exports = exports = abbrev.abbrev = abbrev + +abbrev.monkeyPatch = monkeyPatch + +function monkeyPatch () { + Object.defineProperty(Array.prototype, 'abbrev', { + value: function () { return abbrev(this) }, + enumerable: false, configurable: true, writable: true + }) + + Object.defineProperty(Object.prototype, 'abbrev', { + value: function () { return abbrev(Object.keys(this)) }, + enumerable: false, configurable: true, writable: true + }) +} + +function abbrev (list) { + if (arguments.length !== 1 || !Array.isArray(list)) { + list = Array.prototype.slice.call(arguments, 0) + } + for (var i = 0, l = list.length, args = [] ; i < l ; i ++) { + args[i] = typeof list[i] === "string" ? list[i] : String(list[i]) + } + + // sort them lexicographically, so that they're next to their nearest kin + args = args.sort(lexSort) + + // walk through each, seeing how much it has in common with the next and previous + var abbrevs = {} + , prev = "" + for (var i = 0, l = args.length ; i < l ; i ++) { + var current = args[i] + , next = args[i + 1] || "" + , nextMatches = true + , prevMatches = true + if (current === next) continue + for (var j = 0, cl = current.length ; j < cl ; j ++) { + var curChar = current.charAt(j) + nextMatches = nextMatches && curChar === next.charAt(j) + prevMatches = prevMatches && curChar === prev.charAt(j) + if (!nextMatches && !prevMatches) { + j ++ + break + } + } + prev = current + if (j === cl) { + abbrevs[current] = current + continue + } + for (var a = current.substr(0, j) ; j <= cl ; j ++) { + abbrevs[a] = current + a += current.charAt(j) + } + } + return abbrevs +} + +function lexSort (a, b) { + return a === b ? 0 : a > b ? 1 : -1 +} diff --git a/node_modules/abbrev/package.json b/node_modules/abbrev/package.json new file mode 100644 index 0000000..6474c41 --- /dev/null +++ b/node_modules/abbrev/package.json @@ -0,0 +1,92 @@ +{ + "_args": [ + [ + { + "raw": "abbrev@1", + "scope": null, + "escapedName": "abbrev", + "name": "abbrev", + "rawSpec": "1", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/nopt" + ] + ], + "_from": "abbrev@>=1.0.0 <2.0.0", + "_id": "abbrev@1.1.0", + "_inCache": true, + "_location": "/abbrev", + "_nodeVersion": "8.0.0-pre", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/abbrev-1.1.0.tgz_1487054000015_0.9229173036292195" + }, + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "_npmVersion": "4.3.0", + "_phantomChildren": {}, + "_requested": { + "raw": "abbrev@1", + "scope": null, + "escapedName": "abbrev", + "name": "abbrev", + "rawSpec": "1", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/nopt" + ], + "_resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz", + "_shasum": "d0554c2256636e2f56e7c2e5ad183f859428d81f", + "_shrinkwrap": null, + "_spec": "abbrev@1", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/nopt", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me" + }, + "bugs": { + "url": "https://github.com/isaacs/abbrev-js/issues" + }, + "dependencies": {}, + "description": "Like ruby's abbrev module, but in js", + "devDependencies": { + "tap": "^10.1" + }, + "directories": {}, + "dist": { + "shasum": "d0554c2256636e2f56e7c2e5ad183f859428d81f", + "tarball": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz" + }, + "files": [ + "abbrev.js" + ], + "gitHead": "7136d4d95449dc44115d4f78b80ec907724f64e0", + "homepage": "https://github.com/isaacs/abbrev-js#readme", + "license": "ISC", + "main": "abbrev.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "abbrev", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/isaacs/abbrev-js.git" + }, + "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap test.js --100" + }, + "version": "1.1.0" +} diff --git a/node_modules/accepts/HISTORY.md b/node_modules/accepts/HISTORY.md new file mode 100644 index 0000000..0477ed7 --- /dev/null +++ b/node_modules/accepts/HISTORY.md @@ -0,0 +1,212 @@ +1.3.3 / 2016-05-02 +================== + + * deps: mime-types@~2.1.11 + - deps: mime-db@~1.23.0 + * deps: negotiator@0.6.1 + - perf: improve `Accept` parsing speed + - perf: improve `Accept-Charset` parsing speed + - perf: improve `Accept-Encoding` parsing speed + - perf: improve `Accept-Language` parsing speed + +1.3.2 / 2016-03-08 +================== + + * deps: mime-types@~2.1.10 + - Fix extension of `application/dash+xml` + - Update primary extension for `audio/mp4` + - deps: mime-db@~1.22.0 + +1.3.1 / 2016-01-19 +================== + + * deps: mime-types@~2.1.9 + - deps: mime-db@~1.21.0 + +1.3.0 / 2015-09-29 +================== + + * deps: mime-types@~2.1.7 + - deps: mime-db@~1.19.0 + * deps: negotiator@0.6.0 + - Fix including type extensions in parameters in `Accept` parsing + - Fix parsing `Accept` parameters with quoted equals + - Fix parsing `Accept` parameters with quoted semicolons + - Lazy-load modules from main entry point + - perf: delay type concatenation until needed + - perf: enable strict mode + - perf: hoist regular expressions + - perf: remove closures getting spec properties + - perf: remove a closure from media type parsing + - perf: remove property delete from media type parsing + +1.2.13 / 2015-09-06 +=================== + + * deps: mime-types@~2.1.6 + - deps: mime-db@~1.18.0 + +1.2.12 / 2015-07-30 +=================== + + * deps: mime-types@~2.1.4 + - deps: mime-db@~1.16.0 + +1.2.11 / 2015-07-16 +=================== + + * deps: mime-types@~2.1.3 + - deps: mime-db@~1.15.0 + +1.2.10 / 2015-07-01 +=================== + + * deps: mime-types@~2.1.2 + - deps: mime-db@~1.14.0 + +1.2.9 / 2015-06-08 +================== + + * deps: mime-types@~2.1.1 + - perf: fix deopt during mapping + +1.2.8 / 2015-06-07 +================== + + * deps: mime-types@~2.1.0 + - deps: mime-db@~1.13.0 + * perf: avoid argument reassignment & argument slice + * perf: avoid negotiator recursive construction + * perf: enable strict mode + * perf: remove unnecessary bitwise operator + +1.2.7 / 2015-05-10 +================== + + * deps: negotiator@0.5.3 + - Fix media type parameter matching to be case-insensitive + +1.2.6 / 2015-05-07 +================== + + * deps: mime-types@~2.0.11 + - deps: mime-db@~1.9.1 + * deps: negotiator@0.5.2 + - Fix comparing media types with quoted values + - Fix splitting media types with quoted commas + +1.2.5 / 2015-03-13 +================== + + * deps: mime-types@~2.0.10 + - deps: mime-db@~1.8.0 + +1.2.4 / 2015-02-14 +================== + + * Support Node.js 0.6 + * deps: mime-types@~2.0.9 + - deps: mime-db@~1.7.0 + * deps: negotiator@0.5.1 + - Fix preference sorting to be stable for long acceptable lists + +1.2.3 / 2015-01-31 +================== + + * deps: mime-types@~2.0.8 + - deps: mime-db@~1.6.0 + +1.2.2 / 2014-12-30 +================== + + * deps: mime-types@~2.0.7 + - deps: mime-db@~1.5.0 + +1.2.1 / 2014-12-30 +================== + + * deps: mime-types@~2.0.5 + - deps: mime-db@~1.3.1 + +1.2.0 / 2014-12-19 +================== + + * deps: negotiator@0.5.0 + - Fix list return order when large accepted list + - Fix missing identity encoding when q=0 exists + - Remove dynamic building of Negotiator class + +1.1.4 / 2014-12-10 +================== + + * deps: mime-types@~2.0.4 + - deps: mime-db@~1.3.0 + +1.1.3 / 2014-11-09 +================== + + * deps: mime-types@~2.0.3 + - deps: mime-db@~1.2.0 + +1.1.2 / 2014-10-14 +================== + + * deps: negotiator@0.4.9 + - Fix error when media type has invalid parameter + +1.1.1 / 2014-09-28 +================== + + * deps: mime-types@~2.0.2 + - deps: mime-db@~1.1.0 + * deps: negotiator@0.4.8 + - Fix all negotiations to be case-insensitive + - Stable sort preferences of same quality according to client order + +1.1.0 / 2014-09-02 +================== + + * update `mime-types` + +1.0.7 / 2014-07-04 +================== + + * Fix wrong type returned from `type` when match after unknown extension + +1.0.6 / 2014-06-24 +================== + + * deps: negotiator@0.4.7 + +1.0.5 / 2014-06-20 +================== + + * fix crash when unknown extension given + +1.0.4 / 2014-06-19 +================== + + * use `mime-types` + +1.0.3 / 2014-06-11 +================== + + * deps: negotiator@0.4.6 + - Order by specificity when quality is the same + +1.0.2 / 2014-05-29 +================== + + * Fix interpretation when header not in request + * deps: pin negotiator@0.4.5 + +1.0.1 / 2014-01-18 +================== + + * Identity encoding isn't always acceptable + * deps: negotiator@~0.4.0 + +1.0.0 / 2013-12-27 +================== + + * Genesis diff --git a/node_modules/accepts/LICENSE b/node_modules/accepts/LICENSE new file mode 100644 index 0000000..0616607 --- /dev/null +++ b/node_modules/accepts/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2014 Jonathan Ong +Copyright (c) 2015 Douglas Christopher Wilson + +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. diff --git a/node_modules/accepts/README.md b/node_modules/accepts/README.md new file mode 100644 index 0000000..ae36676 --- /dev/null +++ b/node_modules/accepts/README.md @@ -0,0 +1,135 @@ +# accepts + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +Higher level content negotiation based on [negotiator](https://www.npmjs.com/package/negotiator). Extracted from [koa](https://www.npmjs.com/package/koa) for general use. + +In addition to negotiator, it allows: + +- Allows types as an array or arguments list, ie `(['text/html', 'application/json'])` as well as `('text/html', 'application/json')`. +- Allows type shorthands such as `json`. +- Returns `false` when no types match +- Treats non-existent headers as `*` + +## Installation + +```sh +npm install accepts +``` + +## API + +```js +var accepts = require('accepts') +``` + +### accepts(req) + +Create a new `Accepts` object for the given `req`. + +#### .charset(charsets) + +Return the first accepted charset. If nothing in `charsets` is accepted, +then `false` is returned. + +#### .charsets() + +Return the charsets that the request accepts, in the order of the client's +preference (most preferred first). + +#### .encoding(encodings) + +Return the first accepted encoding. If nothing in `encodings` is accepted, +then `false` is returned. + +#### .encodings() + +Return the encodings that the request accepts, in the order of the client's +preference (most preferred first). + +#### .language(languages) + +Return the first accepted language. If nothing in `languages` is accepted, +then `false` is returned. + +#### .languages() + +Return the languages that the request accepts, in the order of the client's +preference (most preferred first). + +#### .type(types) + +Return the first accepted type (and it is returned as the same text as what +appears in the `types` array). If nothing in `types` is accepted, then `false` +is returned. + +The `types` array can contain full MIME types or file extensions. Any value +that is not a full MIME types is passed to `require('mime-types').lookup`. + +#### .types() + +Return the types that the request accepts, in the order of the client's +preference (most preferred first). + +## Examples + +### Simple type negotiation + +This simple example shows how to use `accepts` to return a different typed +respond body based on what the client wants to accept. The server lists it's +preferences in order and will get back the best match between the client and +server. + +```js +var accepts = require('accepts') +var http = require('http') + +function app(req, res) { + var accept = accepts(req) + + // the order of this list is significant; should be server preferred order + switch(accept.type(['json', 'html'])) { + case 'json': + res.setHeader('Content-Type', 'application/json') + res.write('{"hello":"world!"}') + break + case 'html': + res.setHeader('Content-Type', 'text/html') + res.write('hello, world!') + break + default: + // the fallback is text/plain, so no need to specify it above + res.setHeader('Content-Type', 'text/plain') + res.write('hello, world!') + break + } + + res.end() +} + +http.createServer(app).listen(3000) +``` + +You can test this out with the cURL program: +```sh +curl -I -H'Accept: text/html' http://localhost:3000/ +``` + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/accepts.svg +[npm-url]: https://npmjs.org/package/accepts +[node-version-image]: https://img.shields.io/node/v/accepts.svg +[node-version-url]: http://nodejs.org/download/ +[travis-image]: https://img.shields.io/travis/jshttp/accepts/master.svg +[travis-url]: https://travis-ci.org/jshttp/accepts +[coveralls-image]: https://img.shields.io/coveralls/jshttp/accepts/master.svg +[coveralls-url]: https://coveralls.io/r/jshttp/accepts +[downloads-image]: https://img.shields.io/npm/dm/accepts.svg +[downloads-url]: https://npmjs.org/package/accepts diff --git a/node_modules/accepts/index.js b/node_modules/accepts/index.js new file mode 100644 index 0000000..e80192a --- /dev/null +++ b/node_modules/accepts/index.js @@ -0,0 +1,231 @@ +/*! + * accepts + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var Negotiator = require('negotiator') +var mime = require('mime-types') + +/** + * Module exports. + * @public + */ + +module.exports = Accepts + +/** + * Create a new Accepts object for the given req. + * + * @param {object} req + * @public + */ + +function Accepts(req) { + if (!(this instanceof Accepts)) + return new Accepts(req) + + this.headers = req.headers + this.negotiator = new Negotiator(req) +} + +/** + * Check if the given `type(s)` is acceptable, returning + * the best match when true, otherwise `undefined`, in which + * case you should respond with 406 "Not Acceptable". + * + * The `type` value may be a single mime type string + * such as "application/json", the extension name + * such as "json" or an array `["json", "html", "text/plain"]`. When a list + * or array is given the _best_ match, if any is returned. + * + * Examples: + * + * // Accept: text/html + * this.types('html'); + * // => "html" + * + * // Accept: text/*, application/json + * this.types('html'); + * // => "html" + * this.types('text/html'); + * // => "text/html" + * this.types('json', 'text'); + * // => "json" + * this.types('application/json'); + * // => "application/json" + * + * // Accept: text/*, application/json + * this.types('image/png'); + * this.types('png'); + * // => undefined + * + * // Accept: text/*;q=.5, application/json + * this.types(['html', 'json']); + * this.types('html', 'json'); + * // => "json" + * + * @param {String|Array} types... + * @return {String|Array|Boolean} + * @public + */ + +Accepts.prototype.type = +Accepts.prototype.types = function (types_) { + var types = types_ + + // support flattened arguments + if (types && !Array.isArray(types)) { + types = new Array(arguments.length) + for (var i = 0; i < types.length; i++) { + types[i] = arguments[i] + } + } + + // no types, return all requested types + if (!types || types.length === 0) { + return this.negotiator.mediaTypes() + } + + if (!this.headers.accept) return types[0]; + var mimes = types.map(extToMime); + var accepts = this.negotiator.mediaTypes(mimes.filter(validMime)); + var first = accepts[0]; + if (!first) return false; + return types[mimes.indexOf(first)]; +} + +/** + * Return accepted encodings or best fit based on `encodings`. + * + * Given `Accept-Encoding: gzip, deflate` + * an array sorted by quality is returned: + * + * ['gzip', 'deflate'] + * + * @param {String|Array} encodings... + * @return {String|Array} + * @public + */ + +Accepts.prototype.encoding = +Accepts.prototype.encodings = function (encodings_) { + var encodings = encodings_ + + // support flattened arguments + if (encodings && !Array.isArray(encodings)) { + encodings = new Array(arguments.length) + for (var i = 0; i < encodings.length; i++) { + encodings[i] = arguments[i] + } + } + + // no encodings, return all requested encodings + if (!encodings || encodings.length === 0) { + return this.negotiator.encodings() + } + + return this.negotiator.encodings(encodings)[0] || false +} + +/** + * Return accepted charsets or best fit based on `charsets`. + * + * Given `Accept-Charset: utf-8, iso-8859-1;q=0.2, utf-7;q=0.5` + * an array sorted by quality is returned: + * + * ['utf-8', 'utf-7', 'iso-8859-1'] + * + * @param {String|Array} charsets... + * @return {String|Array} + * @public + */ + +Accepts.prototype.charset = +Accepts.prototype.charsets = function (charsets_) { + var charsets = charsets_ + + // support flattened arguments + if (charsets && !Array.isArray(charsets)) { + charsets = new Array(arguments.length) + for (var i = 0; i < charsets.length; i++) { + charsets[i] = arguments[i] + } + } + + // no charsets, return all requested charsets + if (!charsets || charsets.length === 0) { + return this.negotiator.charsets() + } + + return this.negotiator.charsets(charsets)[0] || false +} + +/** + * Return accepted languages or best fit based on `langs`. + * + * Given `Accept-Language: en;q=0.8, es, pt` + * an array sorted by quality is returned: + * + * ['es', 'pt', 'en'] + * + * @param {String|Array} langs... + * @return {Array|String} + * @public + */ + +Accepts.prototype.lang = +Accepts.prototype.langs = +Accepts.prototype.language = +Accepts.prototype.languages = function (languages_) { + var languages = languages_ + + // support flattened arguments + if (languages && !Array.isArray(languages)) { + languages = new Array(arguments.length) + for (var i = 0; i < languages.length; i++) { + languages[i] = arguments[i] + } + } + + // no languages, return all requested languages + if (!languages || languages.length === 0) { + return this.negotiator.languages() + } + + return this.negotiator.languages(languages)[0] || false +} + +/** + * Convert extnames to mime. + * + * @param {String} type + * @return {String} + * @private + */ + +function extToMime(type) { + return type.indexOf('/') === -1 + ? mime.lookup(type) + : type +} + +/** + * Check if mime is valid. + * + * @param {String} type + * @return {String} + * @private + */ + +function validMime(type) { + return typeof type === 'string'; +} diff --git a/node_modules/accepts/package.json b/node_modules/accepts/package.json new file mode 100644 index 0000000..fe1c035 --- /dev/null +++ b/node_modules/accepts/package.json @@ -0,0 +1,112 @@ +{ + "_args": [ + [ + { + "raw": "accepts@~1.3.3", + "scope": null, + "escapedName": "accepts", + "name": "accepts", + "rawSpec": "~1.3.3", + "spec": ">=1.3.3 <1.4.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/express" + ] + ], + "_from": "accepts@>=1.3.3 <1.4.0", + "_id": "accepts@1.3.3", + "_inCache": true, + "_location": "/accepts", + "_nodeVersion": "4.4.3", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/accepts-1.3.3.tgz_1462251932032_0.7092335098423064" + }, + "_npmUser": { + "name": "dougwilson", + "email": "doug@somethingdoug.com" + }, + "_npmVersion": "2.15.1", + "_phantomChildren": {}, + "_requested": { + "raw": "accepts@~1.3.3", + "scope": null, + "escapedName": "accepts", + "name": "accepts", + "rawSpec": "~1.3.3", + "spec": ">=1.3.3 <1.4.0", + "type": "range" + }, + "_requiredBy": [ + "/express" + ], + "_resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz", + "_shasum": "c3ca7434938648c3e0d9c1e328dd68b622c284ca", + "_shrinkwrap": null, + "_spec": "accepts@~1.3.3", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/express", + "bugs": { + "url": "https://github.com/jshttp/accepts/issues" + }, + "contributors": [ + { + "name": "Douglas Christopher Wilson", + "email": "doug@somethingdoug.com" + }, + { + "name": "Jonathan Ong", + "email": "me@jongleberry.com", + "url": "http://jongleberry.com" + } + ], + "dependencies": { + "mime-types": "~2.1.11", + "negotiator": "0.6.1" + }, + "description": "Higher-level content negotiation", + "devDependencies": { + "istanbul": "0.4.3", + "mocha": "~1.21.5" + }, + "directories": {}, + "dist": { + "shasum": "c3ca7434938648c3e0d9c1e328dd68b622c284ca", + "tarball": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz" + }, + "engines": { + "node": ">= 0.6" + }, + "files": [ + "LICENSE", + "HISTORY.md", + "index.js" + ], + "gitHead": "3e925b1e65ed7da2798849683d49814680dfa426", + "homepage": "https://github.com/jshttp/accepts#readme", + "keywords": [ + "content", + "negotiation", + "accept", + "accepts" + ], + "license": "MIT", + "maintainers": [ + { + "name": "dougwilson", + "email": "doug@somethingdoug.com" + } + ], + "name": "accepts", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jshttp/accepts.git" + }, + "scripts": { + "test": "mocha --reporter spec --check-leaks --bail test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" + }, + "version": "1.3.3" +} diff --git a/node_modules/acorn-globals/LICENSE b/node_modules/acorn-globals/LICENSE new file mode 100644 index 0000000..27cc9f3 --- /dev/null +++ b/node_modules/acorn-globals/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2014 Forbes Lindesay + +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. \ No newline at end of file diff --git a/node_modules/acorn-globals/README.md b/node_modules/acorn-globals/README.md new file mode 100644 index 0000000..d8cd372 --- /dev/null +++ b/node_modules/acorn-globals/README.md @@ -0,0 +1,76 @@ +# acorn-globals + +Detect global variables in JavaScript using acorn + +[![Build Status](https://img.shields.io/travis/ForbesLindesay/acorn-globals/master.svg)](https://travis-ci.org/ForbesLindesay/acorn-globals) +[![Dependency Status](https://img.shields.io/david/ForbesLindesay/acorn-globals.svg)](https://david-dm.org/ForbesLindesay/acorn-globals) +[![NPM version](https://img.shields.io/npm/v/acorn-globals.svg)](https://www.npmjs.org/package/acorn-globals) + +## Installation + + npm install acorn-globals + +## Usage + +detect.js + +```js +var fs = require('fs'); +var detect = require('acorn-globals'); + +var src = fs.readFileSync(__dirname + '/input.js', 'utf8'); + +var scope = detect(src); +console.dir(scope); +``` + +input.js + +```js +var x = 5; +var y = 3, z = 2; + +w.foo(); +w = 2; + +RAWR=444; +RAWR.foo(); + +BLARG=3; + +foo(function () { + var BAR = 3; + process.nextTick(function (ZZZZZZZZZZZZ) { + console.log('beep boop'); + var xyz = 4; + x += 10; + x.zzzzzz; + ZZZ=6; + }); + function doom () { + } + ZZZ.foo(); + +}); + +console.log(xyz); +``` + +output: + +``` +$ node example/detect.js +[ { name: 'BLARG', nodes: [ [Object] ] }, + { name: 'RAWR', nodes: [ [Object], [Object] ] }, + { name: 'ZZZ', nodes: [ [Object], [Object] ] }, + { name: 'console', nodes: [ [Object], [Object] ] }, + { name: 'foo', nodes: [ [Object] ] }, + { name: 'process', nodes: [ [Object] ] }, + { name: 'w', nodes: [ [Object], [Object] ] }, + { name: 'xyz', nodes: [ [Object] ] } ] +``` + + +## License + + MIT diff --git a/node_modules/acorn-globals/index.js b/node_modules/acorn-globals/index.js new file mode 100644 index 0000000..ff924c9 --- /dev/null +++ b/node_modules/acorn-globals/index.js @@ -0,0 +1,180 @@ +'use strict'; + +var acorn = require('acorn'); +var walk = require('acorn/dist/walk'); + +function isScope(node) { + return node.type === 'FunctionExpression' || node.type === 'FunctionDeclaration' || node.type === 'ArrowFunctionExpression' || node.type === 'Program'; +} +function isBlockScope(node) { + return node.type === 'BlockStatement' || isScope(node); +} + +function declaresArguments(node) { + return node.type === 'FunctionExpression' || node.type === 'FunctionDeclaration'; +} + +function declaresThis(node) { + return node.type === 'FunctionExpression' || node.type === 'FunctionDeclaration'; +} + +function reallyParse(source) { + try { + return acorn.parse(source, { + ecmaVersion: 6, + allowReturnOutsideFunction: true, + allowImportExportEverywhere: true, + allowHashBang: true + }); + } catch (ex) { + return acorn.parse(source, { + ecmaVersion: 5, + allowReturnOutsideFunction: true, + allowImportExportEverywhere: true, + allowHashBang: true + }); + } +} +module.exports = findGlobals; +module.exports.parse = reallyParse; +function findGlobals(source) { + var globals = []; + var ast; + // istanbul ignore else + if (typeof source === 'string') { + ast = reallyParse(source); + } else { + ast = source; + } + // istanbul ignore if + if (!(ast && typeof ast === 'object' && ast.type === 'Program')) { + throw new TypeError('Source must be either a string of JavaScript or an acorn AST'); + } + var declareFunction = function (node) { + var fn = node; + fn.locals = fn.locals || {}; + node.params.forEach(function (node) { + declarePattern(node, fn); + }); + if (node.id) { + fn.locals[node.id.name] = true; + } + } + var declarePattern = function (node, parent) { + switch (node.type) { + case 'Identifier': + parent.locals[node.name] = true; + break; + case 'ObjectPattern': + node.properties.forEach(function (node) { + declarePattern(node.value, parent); + }); + break; + case 'ArrayPattern': + node.elements.forEach(function (node) { + if (node) declarePattern(node, parent); + }); + break; + case 'RestElement': + declarePattern(node.argument, parent); + break; + case 'AssignmentPattern': + declarePattern(node.left, parent); + break; + // istanbul ignore next + default: + throw new Error('Unrecognized pattern type: ' + node.type); + } + } + var declareModuleSpecifier = function (node, parents) { + ast.locals = ast.locals || {}; + ast.locals[node.local.name] = true; + } + walk.ancestor(ast, { + 'VariableDeclaration': function (node, parents) { + var parent = null; + for (var i = parents.length - 1; i >= 0 && parent === null; i--) { + if (node.kind === 'var' ? isScope(parents[i]) : isBlockScope(parents[i])) { + parent = parents[i]; + } + } + parent.locals = parent.locals || {}; + node.declarations.forEach(function (declaration) { + declarePattern(declaration.id, parent); + }); + }, + 'FunctionDeclaration': function (node, parents) { + var parent = null; + for (var i = parents.length - 2; i >= 0 && parent === null; i--) { + if (isScope(parents[i])) { + parent = parents[i]; + } + } + parent.locals = parent.locals || {}; + parent.locals[node.id.name] = true; + declareFunction(node); + }, + 'Function': declareFunction, + 'ClassDeclaration': function (node, parents) { + var parent = null; + for (var i = parents.length - 2; i >= 0 && parent === null; i--) { + if (isScope(parents[i])) { + parent = parents[i]; + } + } + parent.locals = parent.locals || {}; + parent.locals[node.id.name] = true; + }, + 'TryStatement': function (node) { + if (node.handler === null) return; + node.handler.body.locals = node.handler.body.locals || {}; + node.handler.body.locals[node.handler.param.name] = true; + }, + 'ImportDefaultSpecifier': declareModuleSpecifier, + 'ImportSpecifier': declareModuleSpecifier, + 'ImportNamespaceSpecifier': declareModuleSpecifier + }); + function identifier(node, parents) { + var name = node.name; + if (name === 'undefined') return; + for (var i = 0; i < parents.length; i++) { + if (name === 'arguments' && declaresArguments(parents[i])) { + return; + } + if (parents[i].locals && name in parents[i].locals) { + return; + } + } + if ( + parents[parents.length - 2] && + parents[parents.length - 2].type === 'TryStatement' && + parents[parents.length - 2].handler && + node === parents[parents.length - 2].handler.param + ) { + return; + } + node.parents = parents; + globals.push(node); + } + walk.ancestor(ast, { + 'VariablePattern': identifier, + 'Identifier': identifier, + 'ThisExpression': function (node, parents) { + for (var i = 0; i < parents.length; i++) { + if (declaresThis(parents[i])) { + return; + } + } + node.parents = parents; + globals.push(node); + } + }); + var groupedGlobals = {}; + globals.forEach(function (node) { + groupedGlobals[node.name] = (groupedGlobals[node.name] || []); + groupedGlobals[node.name].push(node); + }); + return Object.keys(groupedGlobals).sort().map(function (name) { + return {name: name, nodes: groupedGlobals[name]}; + }); +} diff --git a/node_modules/acorn-globals/package.json b/node_modules/acorn-globals/package.json new file mode 100644 index 0000000..af0a80b --- /dev/null +++ b/node_modules/acorn-globals/package.json @@ -0,0 +1,100 @@ +{ + "_args": [ + [ + { + "raw": "acorn-globals@^1.0.3", + "scope": null, + "escapedName": "acorn-globals", + "name": "acorn-globals", + "rawSpec": "^1.0.3", + "spec": ">=1.0.3 <2.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/with" + ] + ], + "_from": "acorn-globals@>=1.0.3 <2.0.0", + "_id": "acorn-globals@1.0.9", + "_inCache": true, + "_location": "/acorn-globals", + "_nodeVersion": "1.6.2", + "_npmUser": { + "name": "forbeslindesay", + "email": "forbes@lindesay.co.uk" + }, + "_npmVersion": "2.7.1", + "_phantomChildren": {}, + "_requested": { + "raw": "acorn-globals@^1.0.3", + "scope": null, + "escapedName": "acorn-globals", + "name": "acorn-globals", + "rawSpec": "^1.0.3", + "spec": ">=1.0.3 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/with" + ], + "_resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-1.0.9.tgz", + "_shasum": "55bb5e98691507b74579d0513413217c380c54cf", + "_shrinkwrap": null, + "_spec": "acorn-globals@^1.0.3", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/with", + "author": { + "name": "ForbesLindesay" + }, + "bugs": { + "url": "https://github.com/ForbesLindesay/acorn-globals/issues" + }, + "dependencies": { + "acorn": "^2.1.0" + }, + "description": "Detect global variables in JavaScript using acorn", + "devDependencies": { + "testit": "^2.0.2" + }, + "directories": {}, + "dist": { + "shasum": "55bb5e98691507b74579d0513413217c380c54cf", + "tarball": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-1.0.9.tgz" + }, + "files": [ + "index.js", + "LICENSE" + ], + "gitHead": "808cab09764b63679138b012602ca1bb51657f97", + "homepage": "https://github.com/ForbesLindesay/acorn-globals", + "keywords": [ + "ast", + "variable", + "name", + "lexical", + "scope", + "local", + "global", + "implicit" + ], + "license": "MIT", + "maintainers": [ + { + "name": "forbeslindesay", + "email": "forbes@lindesay.co.uk" + }, + { + "name": "timothygu", + "email": "timothygu99@gmail.com" + } + ], + "name": "acorn-globals", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/ForbesLindesay/acorn-globals.git" + }, + "scripts": { + "test": "node test" + }, + "version": "1.0.9" +} diff --git a/node_modules/acorn/.editorconfig b/node_modules/acorn/.editorconfig new file mode 100644 index 0000000..c14d5c6 --- /dev/null +++ b/node_modules/acorn/.editorconfig @@ -0,0 +1,7 @@ +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +insert_final_newline = true diff --git a/node_modules/acorn/.gitattributes b/node_modules/acorn/.gitattributes new file mode 100644 index 0000000..fcadb2c --- /dev/null +++ b/node_modules/acorn/.gitattributes @@ -0,0 +1 @@ +* text eol=lf diff --git a/node_modules/acorn/.npmignore b/node_modules/acorn/.npmignore new file mode 100644 index 0000000..ecba291 --- /dev/null +++ b/node_modules/acorn/.npmignore @@ -0,0 +1,3 @@ +/.tern-port +/test +/local diff --git a/node_modules/acorn/.tern-project b/node_modules/acorn/.tern-project new file mode 100644 index 0000000..6718ce0 --- /dev/null +++ b/node_modules/acorn/.tern-project @@ -0,0 +1,6 @@ +{ + "plugins": { + "node": true, + "es_modules": true + } +} \ No newline at end of file diff --git a/node_modules/acorn/.travis.yml b/node_modules/acorn/.travis.yml new file mode 100644 index 0000000..f50c379 --- /dev/null +++ b/node_modules/acorn/.travis.yml @@ -0,0 +1,6 @@ +language: node_js +sudo: false +node_js: + - '0.10' + - '0.12' + - '4' diff --git a/node_modules/acorn/AUTHORS b/node_modules/acorn/AUTHORS new file mode 100644 index 0000000..0e8f48b --- /dev/null +++ b/node_modules/acorn/AUTHORS @@ -0,0 +1,43 @@ +List of Acorn contributors. Updated before every release. + +Adrian Rakovsky +Alistair Braidwood +Andres Suarez +Aparajita Fishman +Arian Stolwijk +Artem Govorov +Brandon Mills +Charles Hughes +Conrad Irwin +David Bonnet +ForbesLindesay +Forbes Lindesay +Gilad Peleg +impinball +Ingvar Stepanyan +Jesse McCarthy +Jiaxing Wang +Joel Kemp +Johannes Herr +Jürg Lehni +keeyipchan +Kevin Kwok +krator +Marijn Haverbeke +Martin Carlberg +Mathias Bynens +Mathieu 'p01' Henri +Max Schaefer +Max Zerzouri +Mihai Bazon +Mike Rennie +Nick Fitzgerald +Oskar Schöldström +Paul Harper +Peter Rust +PlNG +r-e-d +Rich Harris +Sebastian McKenzie +Timothy Gu +zsjforcn diff --git a/node_modules/acorn/LICENSE b/node_modules/acorn/LICENSE new file mode 100644 index 0000000..d4c7fc5 --- /dev/null +++ b/node_modules/acorn/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) 2012-2014 by various contributors (see AUTHORS) + +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. diff --git a/node_modules/acorn/README.md b/node_modules/acorn/README.md new file mode 100644 index 0000000..acd39a8 --- /dev/null +++ b/node_modules/acorn/README.md @@ -0,0 +1,396 @@ +# Acorn + +[![Build Status](https://travis-ci.org/ternjs/acorn.svg?branch=master)](https://travis-ci.org/ternjs/acorn) +[![NPM version](https://img.shields.io/npm/v/acorn.svg)](https://www.npmjs.com/package/acorn) +[Author funding status: ![maintainer happiness](https://marijnhaverbeke.nl/fund/status_s.png?force)](https://marijnhaverbeke.nl/fund/) + +A tiny, fast JavaScript parser, written completely in JavaScript. + +## Community + +Acorn is open source software released under an +[MIT license](https://github.com/ternjs/acorn/blob/master/LICENSE). + +You are welcome to +[report bugs](https://github.com/ternjs/acorn/issues) or create pull +requests on [github](https://github.com/ternjs/acorn). For questions +and discussion, please use the +[Tern discussion forum](https://discuss.ternjs.net). + +## Installation + +The easiest way to install acorn is with [`npm`][npm]. + +[npm]: https://www.npmjs.com/ + +```sh +npm install acorn +``` + +Alternately, download the source. + +```sh +git clone https://github.com/ternjs/acorn.git +``` + +## Components + +When run in a CommonJS (node.js) or AMD environment, exported values +appear in the interfaces exposed by the individual files, as usual. +When loaded in the browser (Acorn works in any JS-enabled browser more +recent than IE5) without any kind of module management, a single +global object `acorn` will be defined, and all the exported properties +will be added to that. + +### Main parser + +This is implemented in `dist/acorn.js`, and is what you get when you +`require("acorn")` in node.js. + +**parse**`(input, options)` is used to parse a JavaScript program. +The `input` parameter is a string, `options` can be undefined or an +object setting some of the options listed below. The return value will +be an abstract syntax tree object as specified by the +[ESTree spec][estree]. + +When encountering a syntax error, the parser will raise a +`SyntaxError` object with a meaningful message. The error object will +have a `pos` property that indicates the character offset at which the +error occurred, and a `loc` object that contains a `{line, column}` +object referring to that same position. + +[estree]: https://github.com/estree/estree + +- **ecmaVersion**: Indicates the ECMAScript version to parse. Must be + either 3, 5, or 6. This influences support for strict mode, the set + of reserved words, and support for new syntax features. Default is 5. + +- **sourceType**: Indicate the mode the code should be parsed in. Can be + either `"script"` or `"module"`. + +- **onInsertedSemicolon**: If given a callback, that callback will be + called whenever a missing semicolon is inserted by the parser. The + callback will be given the character offset of the point where the + semicolon is inserted as argument, and if `locations` is on, also a + `{line, column}` object representing this position. + +- **onTrailingComma**: Like `onInsertedSemicolon`, but for trailing + commas. + +- **allowReserved**: If `false`, using a reserved word will generate + an error. Defaults to `true` for `ecmaVersion` 3, `false` for higher + versions. When given the value `"never"`, reserved words and + keywords can also not be used as property names (as in Internet + Explorer's old parser). + +- **allowReturnOutsideFunction**: By default, a return statement at + the top level raises an error. Set this to `true` to accept such + code. + +- **allowImportExportEverywhere**: By default, `import` and `export` + declarations can only appear at a program's top level. Setting this + option to `true` allows them anywhere where a statement is allowed. + +- **allowHashBang**: When this is enabled (off by default), if the + code starts with the characters `#!` (as in a shellscript), the + first line will be treated as a comment. + +- **locations**: When `true`, each node has a `loc` object attached + with `start` and `end` subobjects, each of which contains the + one-based line and zero-based column numbers in `{line, column}` + form. Default is `false`. + +- **onToken**: If a function is passed for this option, each found + token will be passed in same format as tokens returned from + `tokenizer().getToken()`. + + If array is passed, each found token is pushed to it. + + Note that you are not allowed to call the parser from the + callback—that will corrupt its internal state. + +- **onComment**: If a function is passed for this option, whenever a + comment is encountered the function will be called with the + following parameters: + + - `block`: `true` if the comment is a block comment, false if it + is a line comment. + - `text`: The content of the comment. + - `start`: Character offset of the start of the comment. + - `end`: Character offset of the end of the comment. + + When the `locations` options is on, the `{line, column}` locations + of the comment’s start and end are passed as two additional + parameters. + + If array is passed for this option, each found comment is pushed + to it as object in Esprima format: + + ```javascript + { + "type": "Line" | "Block", + "value": "comment text", + "start": Number, + "end": Number, + // If `locations` option is on: + "loc": { + "start": {line: Number, column: Number} + "end": {line: Number, column: Number} + }, + // If `ranges` option is on: + "range": [Number, Number] + } + ``` + + Note that you are not allowed to call the parser from the + callback—that will corrupt its internal state. + +- **ranges**: Nodes have their start and end characters offsets + recorded in `start` and `end` properties (directly on the node, + rather than the `loc` object, which holds line/column data. To also + add a [semi-standardized][range] `range` property holding a + `[start, end]` array with the same numbers, set the `ranges` option + to `true`. + +- **program**: It is possible to parse multiple files into a single + AST by passing the tree produced by parsing the first file as the + `program` option in subsequent parses. This will add the toplevel + forms of the parsed file to the "Program" (top) node of an existing + parse tree. + +- **sourceFile**: When the `locations` option is `true`, you can pass + this option to add a `source` attribute in every node’s `loc` + object. Note that the contents of this option are not examined or + processed in any way; you are free to use whatever format you + choose. + +- **directSourceFile**: Like `sourceFile`, but a `sourceFile` property + will be added directly to the nodes, rather than the `loc` object. + +- **preserveParens**: If this option is `true`, parenthesized expressions + are represented by (non-standard) `ParenthesizedExpression` nodes + that have a single `expression` property containing the expression + inside parentheses. + +[range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 + +**parseExpressionAt**`(input, offset, options)` will parse a single +expression in a string, and return its AST. It will not complain if +there is more of the string left after the expression. + +**getLineInfo**`(input, offset)` can be used to get a `{line, +column}` object for a given program string and character offset. + +**tokenizer**`(input, options)` returns an object with a `getToken` +method that can be called repeatedly to get the next token, a `{start, +end, type, value}` object (with added `loc` property when the +`locations` option is enabled and `range` property when the `ranges` +option is enabled). When the token's type is `tokTypes.eof`, you +should stop calling the method, since it will keep returning that same +token forever. + +In ES6 environment, returned result can be used as any other +protocol-compliant iterable: + +```javascript +for (let token of acorn.tokenizer(str)) { + // iterate over the tokens +} + +// transform code to array of tokens: +var tokens = [...acorn.tokenizer(str)]; +``` + +**tokTypes** holds an object mapping names to the token type objects +that end up in the `type` properties of tokens. + +#### Note on using with [Escodegen][escodegen] + +Escodegen supports generating comments from AST, attached in +Esprima-specific format. In order to simulate same format in +Acorn, consider following example: + +```javascript +var comments = [], tokens = []; + +var ast = acorn.parse('var x = 42; // answer', { + // collect ranges for each node + ranges: true, + // collect comments in Esprima's format + onComment: comments, + // collect token ranges + onToken: tokens +}); + +// attach comments using collected information +escodegen.attachComments(ast, comments, tokens); + +// generate code +console.log(escodegen.generate(ast, {comment: true})); +// > 'var x = 42; // answer' +``` + +[escodegen]: https://github.com/estools/escodegen + +### dist/acorn_loose.js ### + +This file implements an error-tolerant parser. It exposes a single +function. The loose parser is accessible in node.js via `require("acorn/dist/acorn_loose")`. + +**parse_dammit**`(input, options)` takes the same arguments and +returns the same syntax tree as the `parse` function in `acorn.js`, +but never raises an error, and will do its best to parse syntactically +invalid code in as meaningful a way as it can. It'll insert identifier +nodes with name `"✖"` as placeholders in places where it can't make +sense of the input. Depends on `acorn.js`, because it uses the same +tokenizer. + +### dist/walk.js ### + +Implements an abstract syntax tree walker. Will store its interface in +`acorn.walk` when loaded without a module system. + +**simple**`(node, visitors, base, state)` does a 'simple' walk over +a tree. `node` should be the AST node to walk, and `visitors` an +object with properties whose names correspond to node types in the +[ESTree spec][estree]. The properties should contain functions +that will be called with the node object and, if applicable the state +at that point. The last two arguments are optional. `base` is a walker +algorithm, and `state` is a start state. The default walker will +simply visit all statements and expressions and not produce a +meaningful state. (An example of a use of state is to track scope at +each point in the tree.) + +**ancestor**`(node, visitors, base, state)` does a 'simple' walk over +a tree, building up an array of ancestor nodes (including the current node) +and passing the array to callbacks in the `state` parameter. + +**recursive**`(node, state, functions, base)` does a 'recursive' +walk, where the walker functions are responsible for continuing the +walk on the child nodes of their target node. `state` is the start +state, and `functions` should contain an object that maps node types +to walker functions. Such functions are called with `(node, state, c)` +arguments, and can cause the walk to continue on a sub-node by calling +the `c` argument on it with `(node, state)` arguments. The optional +`base` argument provides the fallback walker functions for node types +that aren't handled in the `functions` object. If not given, the +default walkers will be used. + +**make**`(functions, base)` builds a new walker object by using the +walker functions in `functions` and filling in the missing ones by +taking defaults from `base`. + +**findNodeAt**`(node, start, end, test, base, state)` tries to +locate a node in a tree at the given start and/or end offsets, which +satisfies the predicate `test`. `start` and `end` can be either `null` +(as wildcard) or a number. `test` may be a string (indicating a node +type) or a function that takes `(nodeType, node)` arguments and +returns a boolean indicating whether this node is interesting. `base` +and `state` are optional, and can be used to specify a custom walker. +Nodes are tested from inner to outer, so if two nodes match the +boundaries, the inner one will be preferred. + +**findNodeAround**`(node, pos, test, base, state)` is a lot like +`findNodeAt`, but will match any node that exists 'around' (spanning) +the given position. + +**findNodeAfter**`(node, pos, test, base, state)` is similar to +`findNodeAround`, but will match all nodes *after* the given position +(testing outer nodes before inner nodes). + +## Command line interface + +The `bin/acorn` utility can be used to parse a file from the command +line. It accepts as arguments its input file and the following +options: + +- `--ecma3|--ecma5|--ecma6`: Sets the ECMAScript version to parse. Default is + version 5. + +- `--module`: Sets the parsing mode to `"module"`. Is set to `"script"` otherwise. + +- `--locations`: Attaches a "loc" object to each node with "start" and + "end" subobjects, each of which contains the one-based line and + zero-based column numbers in `{line, column}` form. + +- `--allow-hash-bang`: If the code starts with the characters #! (as in a shellscript), the first line will be treated as a comment. + +- `--compact`: No whitespace is used in the AST output. + +- `--silent`: Do not output the AST, just return the exit status. + +- `--help`: Print the usage information and quit. + +The utility spits out the syntax tree as JSON data. + +## Build system + +Acorn is written in ECMAScript 6, as a set of small modules, in the +project's `src` directory, and compiled down to bigger ECMAScript 3 +files in `dist` using [Browserify](http://browserify.org) and +[Babel](http://babeljs.io/). If you are already using Babel, you can +consider including the modules directly. + +The command-line test runner (`npm test`) uses the ES6 modules. The +browser-based test page (`test/index.html`) uses the compiled modules. +The `bin/build-acorn.js` script builds the latter from the former. + +If you are working on Acorn, you'll probably want to try the code out +directly, without an intermediate build step. In your scripts, you can +register the Babel require shim like this: + + require("babel-core/register") + +That will allow you to directly `require` the ES6 modules. + +## Plugins + +Acorn is designed support allow plugins which, within reasonable +bounds, redefine the way the parser works. Plugins can add new token +types and new tokenizer contexts (if necessary), and extend methods in +the parser object. This is not a clean, elegant API—using it requires +an understanding of Acorn's internals, and plugins are likely to break +whenever those internals are significantly changed. But still, it is +_possible_, in this way, to create parsers for JavaScript dialects +without forking all of Acorn. And in principle it is even possible to +combine such plugins, so that if you have, for example, a plugin for +parsing types and a plugin for parsing JSX-style XML literals, you +could load them both and parse code with both JSX tags and types. + +A plugin should register itself by adding a property to +`acorn.plugins`, which holds a function. Calling `acorn.parse`, a +`plugins` option can be passed, holding an object mapping plugin names +to configuration values (or just `true` for plugins that don't take +options). After the parser object has been created, the initialization +functions for the chosen plugins are called with `(parser, +configValue)` arguments. They are expected to use the `parser.extend` +method to extend parser methods. For example, the `readToken` method +could be extended like this: + +```javascript +parser.extend("readToken", function(nextMethod) { + return function(code) { + console.log("Reading a token!") + return nextMethod.call(this, code) + } +}) +``` + +The `nextMethod` argument passed to `extend`'s second argument is the +previous value of this method, and should usually be called through to +whenever the extended method does not handle the call itself. + +Similarly, the loose parser allows plugins to register themselves via +`acorn.pluginsLoose`. The extension mechanism is the same as for the +normal parser: + +```javascript +looseParser.extend("readToken", function(nextMethod) { + return function() { + console.log("Reading a token in the loose parser!") + return nextMethod.call(this) + } +}) +``` + +There is a proof-of-concept JSX plugin in the [`acorn-jsx`](https://github.com/RReverser/acorn-jsx) project. diff --git a/node_modules/acorn/bin/acorn b/node_modules/acorn/bin/acorn new file mode 100755 index 0000000..db07909 --- /dev/null +++ b/node_modules/acorn/bin/acorn @@ -0,0 +1,71 @@ +#!/usr/bin/env node +"use strict"; + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj["default"] = obj; return newObj; } } + +var _path = require("path"); + +var _fs = require("fs"); + +var _distAcornJs = require("../dist/acorn.js"); + +var acorn = _interopRequireWildcard(_distAcornJs); + +var infile = undefined, + forceFile = undefined, + silent = false, + compact = false, + tokenize = false; +var options = {}; + +function help(status) { + var print = status == 0 ? console.log : console.error; + print("usage: " + (0, _path.basename)(process.argv[1]) + " [--ecma3|--ecma5|--ecma6]"); + print(" [--tokenize] [--locations] [---allow-hash-bang] [--compact] [--silent] [--module] [--help] [--] [infile]"); + process.exit(status); +} + +for (var i = 2; i < process.argv.length; ++i) { + var arg = process.argv[i]; + if ((arg == "-" || arg[0] != "-") && !infile) infile = arg;else if (arg == "--" && !infile && i + 2 == process.argv.length) forceFile = infile = process.argv[++i];else if (arg == "--ecma3") options.ecmaVersion = 3;else if (arg == "--ecma5") options.ecmaVersion = 5;else if (arg == "--ecma6") options.ecmaVersion = 6;else if (arg == "--locations") options.locations = true;else if (arg == "--allow-hash-bang") options.allowHashBang = true;else if (arg == "--silent") silent = true;else if (arg == "--compact") compact = true;else if (arg == "--help") help(0);else if (arg == "--tokenize") tokenize = true;else if (arg == "--module") options.sourceType = 'module';else help(1); +} + +function run(code) { + var result = undefined; + if (!tokenize) { + try { + result = acorn.parse(code, options); + } catch (e) { + console.error(e.message);process.exit(1); + } + } else { + result = []; + var tokenizer = acorn.tokenizer(code, options), + token = undefined; + while (true) { + try { + token = tokenizer.getToken(); + } catch (e) { + console.error(e.message);process.exit(1); + } + result.push(token); + if (token.type == acorn.tokTypes.eof) break; + } + } + if (!silent) console.log(JSON.stringify(result, null, compact ? null : 2)); +} + +if (forceFile || infile && infile != "-") { + run((0, _fs.readFileSync)(infile, "utf8")); +} else { + (function () { + var code = ""; + process.stdin.resume(); + process.stdin.on("data", function (chunk) { + return code += chunk; + }); + process.stdin.on("end", function () { + return run(code); + }); + })(); +} \ No newline at end of file diff --git a/node_modules/acorn/bin/build-acorn.js b/node_modules/acorn/bin/build-acorn.js new file mode 100644 index 0000000..71f2cf9 --- /dev/null +++ b/node_modules/acorn/bin/build-acorn.js @@ -0,0 +1,82 @@ +var fs = require("fs"), path = require("path") +var stream = require("stream") + +var browserify = require("browserify") +var babel = require('babel-core') +var babelify = require("babelify").configure({loose: "all"}) + +process.chdir(path.resolve(__dirname, "..")) + +browserify({standalone: "acorn"}) + .plugin(require('browserify-derequire')) + .transform(babelify) + .require("./src/index.js", {entry: true}) + .bundle() + .on("error", function (err) { console.log("Error: " + err.message) }) + .pipe(fs.createWriteStream("dist/acorn.js")) + +var ACORN_PLACEHOLDER = "this_function_call_should_be_replaced_with_a_call_to_load_acorn()"; +function acornShimPrepare(file) { + var tr = new stream.Transform + if (file == path.resolve(__dirname, "../src/index.js")) { + var sent = false + tr._transform = function(chunk, _, callback) { + if (!sent) { + sent = true + callback(null, ACORN_PLACEHOLDER); + } else { + callback() + } + } + } else { + tr._transform = function(chunk, _, callback) { callback(null, chunk) } + } + return tr +} +function acornShimComplete() { + var tr = new stream.Transform + var buffer = ""; + tr._transform = function(chunk, _, callback) { + buffer += chunk.toString("utf8"); + callback(); + }; + tr._flush = function (callback) { + tr.push(buffer.replace(ACORN_PLACEHOLDER, "module.exports = typeof acorn != 'undefined' ? acorn : require(\"./acorn\")")); + callback(null); + }; + return tr; +} + +browserify({standalone: "acorn.loose"}) + .plugin(require('browserify-derequire')) + .transform(acornShimPrepare) + .transform(babelify) + .require("./src/loose/index.js", {entry: true}) + .bundle() + .on("error", function (err) { console.log("Error: " + err.message) }) + .pipe(acornShimComplete()) + .pipe(fs.createWriteStream("dist/acorn_loose.js")) + +browserify({standalone: "acorn.walk"}) + .plugin(require('browserify-derequire')) + .transform(acornShimPrepare) + .transform(babelify) + .require("./src/walk/index.js", {entry: true}) + .bundle() + .on("error", function (err) { console.log("Error: " + err.message) }) + .pipe(acornShimComplete()) + .pipe(fs.createWriteStream("dist/walk.js")) + +babel.transformFile("./src/bin/acorn.js", function (err, result) { + if (err) return console.log("Error: " + err.message) + fs.writeFile("bin/acorn", result.code, function (err) { + if (err) return console.log("Error: " + err.message) + + // Make bin/acorn executable + if (process.platform === 'win32') + return + var stat = fs.statSync("bin/acorn") + var newPerm = stat.mode | parseInt('111', 8) + fs.chmodSync("bin/acorn", newPerm) + }) +}) diff --git a/node_modules/acorn/bin/generate-identifier-regex.js b/node_modules/acorn/bin/generate-identifier-regex.js new file mode 100644 index 0000000..0d7c50f --- /dev/null +++ b/node_modules/acorn/bin/generate-identifier-regex.js @@ -0,0 +1,47 @@ +// Note: run `npm install unicode-7.0.0` first. + +// Which Unicode version should be used? +var version = '7.0.0'; + +var start = require('unicode-' + version + '/properties/ID_Start/code-points') + .filter(function(ch) { return ch > 127; }); +var cont = [0x200c, 0x200d].concat(require('unicode-' + version + '/properties/ID_Continue/code-points') + .filter(function(ch) { return ch > 127 && start.indexOf(ch) == -1; })); + +function pad(str, width) { + while (str.length < width) str = "0" + str; + return str; +} + +function esc(code) { + var hex = code.toString(16); + if (hex.length <= 2) return "\\x" + pad(hex, 2); + else return "\\u" + pad(hex, 4); +} + +function generate(chars) { + var astral = [], re = ""; + for (var i = 0, at = 0x10000; i < chars.length; i++) { + var from = chars[i], to = from; + while (i < chars.length - 1 && chars[i + 1] == to + 1) { + i++; + to++; + } + if (to <= 0xffff) { + if (from == to) re += esc(from); + else if (from + 1 == to) re += esc(from) + esc(to); + else re += esc(from) + "-" + esc(to); + } else { + astral.push(from - at, to - from); + at = to; + } + } + return {nonASCII: re, astral: astral}; +} + +var startData = generate(start), contData = generate(cont); + +console.log(" var nonASCIIidentifierStartChars = \"" + startData.nonASCII + "\";"); +console.log(" var nonASCIIidentifierChars = \"" + contData.nonASCII + "\";"); +console.log(" var astralIdentifierStartCodes = " + JSON.stringify(startData.astral) + ";"); +console.log(" var astralIdentifierCodes = " + JSON.stringify(contData.astral) + ";"); diff --git a/node_modules/acorn/bin/update_authors.sh b/node_modules/acorn/bin/update_authors.sh new file mode 100755 index 0000000..466c8db --- /dev/null +++ b/node_modules/acorn/bin/update_authors.sh @@ -0,0 +1,6 @@ +# Combine existing list of authors with everyone known in git, sort, add header. +tail --lines=+3 AUTHORS > AUTHORS.tmp +git log --format='%aN' | grep -v abraidwood >> AUTHORS.tmp +echo -e "List of Acorn contributors. Updated before every release.\n" > AUTHORS +sort -u AUTHORS.tmp >> AUTHORS +rm -f AUTHORS.tmp diff --git a/node_modules/acorn/dist/.keep b/node_modules/acorn/dist/.keep new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/acorn/dist/acorn.js b/node_modules/acorn/dist/acorn.js new file mode 100644 index 0000000..9419f86 --- /dev/null +++ b/node_modules/acorn/dist/acorn.js @@ -0,0 +1,3340 @@ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.acorn = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= 6 && (prop.computed || prop.method || prop.shorthand)) return; + var key = prop.key;var name = undefined; + switch (key.type) { + case "Identifier": + name = key.name;break; + case "Literal": + name = String(key.value);break; + default: + return; + } + var kind = prop.kind; + + if (this.options.ecmaVersion >= 6) { + if (name === "__proto__" && kind === "init") { + if (propHash.proto) this.raise(key.start, "Redefinition of __proto__ property"); + propHash.proto = true; + } + return; + } + name = "$" + name; + var other = propHash[name]; + if (other) { + var isGetSet = kind !== "init"; + if ((this.strict || isGetSet) && other[kind] || !(isGetSet ^ other.init)) this.raise(key.start, "Redefinition of property"); + } else { + other = propHash[name] = { + init: false, + get: false, + set: false + }; + } + other[kind] = true; +}; + +// ### Expression parsing + +// These nest, from the most general expression type at the top to +// 'atomic', nondivisible expression types at the bottom. Most of +// the functions will simply let the function(s) below them parse, +// and, *if* the syntactic construct they handle is present, wrap +// the AST node that the inner parser gave them in another node. + +// Parse a full expression. The optional arguments are used to +// forbid the `in` operator (in for loops initalization expressions) +// and provide reference for storing '=' operator inside shorthand +// property assignment in contexts where both object expression +// and object pattern might appear (so it's possible to raise +// delayed syntax error at correct position). + +pp.parseExpression = function (noIn, refDestructuringErrors) { + var startPos = this.start, + startLoc = this.startLoc; + var expr = this.parseMaybeAssign(noIn, refDestructuringErrors); + if (this.type === _tokentype.types.comma) { + var node = this.startNodeAt(startPos, startLoc); + node.expressions = [expr]; + while (this.eat(_tokentype.types.comma)) node.expressions.push(this.parseMaybeAssign(noIn, refDestructuringErrors)); + return this.finishNode(node, "SequenceExpression"); + } + return expr; +}; + +// Parse an assignment expression. This includes applications of +// operators like `+=`. + +pp.parseMaybeAssign = function (noIn, refDestructuringErrors, afterLeftParse) { + if (this.type == _tokentype.types._yield && this.inGenerator) return this.parseYield(); + + var validateDestructuring = false; + if (!refDestructuringErrors) { + refDestructuringErrors = { shorthandAssign: 0, trailingComma: 0 }; + validateDestructuring = true; + } + var startPos = this.start, + startLoc = this.startLoc; + if (this.type == _tokentype.types.parenL || this.type == _tokentype.types.name) this.potentialArrowAt = this.start; + var left = this.parseMaybeConditional(noIn, refDestructuringErrors); + if (afterLeftParse) left = afterLeftParse.call(this, left, startPos, startLoc); + if (this.type.isAssign) { + if (validateDestructuring) this.checkPatternErrors(refDestructuringErrors, true); + var node = this.startNodeAt(startPos, startLoc); + node.operator = this.value; + node.left = this.type === _tokentype.types.eq ? this.toAssignable(left) : left; + refDestructuringErrors.shorthandAssign = 0; // reset because shorthand default was used correctly + this.checkLVal(left); + this.next(); + node.right = this.parseMaybeAssign(noIn); + return this.finishNode(node, "AssignmentExpression"); + } else { + if (validateDestructuring) this.checkExpressionErrors(refDestructuringErrors, true); + } + return left; +}; + +// Parse a ternary conditional (`?:`) operator. + +pp.parseMaybeConditional = function (noIn, refDestructuringErrors) { + var startPos = this.start, + startLoc = this.startLoc; + var expr = this.parseExprOps(noIn, refDestructuringErrors); + if (this.checkExpressionErrors(refDestructuringErrors)) return expr; + if (this.eat(_tokentype.types.question)) { + var node = this.startNodeAt(startPos, startLoc); + node.test = expr; + node.consequent = this.parseMaybeAssign(); + this.expect(_tokentype.types.colon); + node.alternate = this.parseMaybeAssign(noIn); + return this.finishNode(node, "ConditionalExpression"); + } + return expr; +}; + +// Start the precedence parser. + +pp.parseExprOps = function (noIn, refDestructuringErrors) { + var startPos = this.start, + startLoc = this.startLoc; + var expr = this.parseMaybeUnary(refDestructuringErrors); + if (this.checkExpressionErrors(refDestructuringErrors)) return expr; + return this.parseExprOp(expr, startPos, startLoc, -1, noIn); +}; + +// Parse binary operators with the operator precedence parsing +// algorithm. `left` is the left-hand side of the operator. +// `minPrec` provides context that allows the function to stop and +// defer further parser to one of its callers when it encounters an +// operator that has a lower precedence than the set it is parsing. + +pp.parseExprOp = function (left, leftStartPos, leftStartLoc, minPrec, noIn) { + var prec = this.type.binop; + if (prec != null && (!noIn || this.type !== _tokentype.types._in)) { + if (prec > minPrec) { + var node = this.startNodeAt(leftStartPos, leftStartLoc); + node.left = left; + node.operator = this.value; + var op = this.type; + this.next(); + var startPos = this.start, + startLoc = this.startLoc; + node.right = this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, prec, noIn); + this.finishNode(node, op === _tokentype.types.logicalOR || op === _tokentype.types.logicalAND ? "LogicalExpression" : "BinaryExpression"); + return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn); + } + } + return left; +}; + +// Parse unary operators, both prefix and postfix. + +pp.parseMaybeUnary = function (refDestructuringErrors) { + if (this.type.prefix) { + var node = this.startNode(), + update = this.type === _tokentype.types.incDec; + node.operator = this.value; + node.prefix = true; + this.next(); + node.argument = this.parseMaybeUnary(); + this.checkExpressionErrors(refDestructuringErrors, true); + if (update) this.checkLVal(node.argument);else if (this.strict && node.operator === "delete" && node.argument.type === "Identifier") this.raise(node.start, "Deleting local variable in strict mode"); + return this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); + } + var startPos = this.start, + startLoc = this.startLoc; + var expr = this.parseExprSubscripts(refDestructuringErrors); + if (this.checkExpressionErrors(refDestructuringErrors)) return expr; + while (this.type.postfix && !this.canInsertSemicolon()) { + var node = this.startNodeAt(startPos, startLoc); + node.operator = this.value; + node.prefix = false; + node.argument = expr; + this.checkLVal(expr); + this.next(); + expr = this.finishNode(node, "UpdateExpression"); + } + return expr; +}; + +// Parse call, dot, and `[]`-subscript expressions. + +pp.parseExprSubscripts = function (refDestructuringErrors) { + var startPos = this.start, + startLoc = this.startLoc; + var expr = this.parseExprAtom(refDestructuringErrors); + var skipArrowSubscripts = expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")"; + if (this.checkExpressionErrors(refDestructuringErrors) || skipArrowSubscripts) return expr; + return this.parseSubscripts(expr, startPos, startLoc); +}; + +pp.parseSubscripts = function (base, startPos, startLoc, noCalls) { + for (;;) { + if (this.eat(_tokentype.types.dot)) { + var node = this.startNodeAt(startPos, startLoc); + node.object = base; + node.property = this.parseIdent(true); + node.computed = false; + base = this.finishNode(node, "MemberExpression"); + } else if (this.eat(_tokentype.types.bracketL)) { + var node = this.startNodeAt(startPos, startLoc); + node.object = base; + node.property = this.parseExpression(); + node.computed = true; + this.expect(_tokentype.types.bracketR); + base = this.finishNode(node, "MemberExpression"); + } else if (!noCalls && this.eat(_tokentype.types.parenL)) { + var node = this.startNodeAt(startPos, startLoc); + node.callee = base; + node.arguments = this.parseExprList(_tokentype.types.parenR, false); + base = this.finishNode(node, "CallExpression"); + } else if (this.type === _tokentype.types.backQuote) { + var node = this.startNodeAt(startPos, startLoc); + node.tag = base; + node.quasi = this.parseTemplate(); + base = this.finishNode(node, "TaggedTemplateExpression"); + } else { + return base; + } + } +}; + +// Parse an atomic expression — either a single token that is an +// expression, an expression started by a keyword like `function` or +// `new`, or an expression wrapped in punctuation like `()`, `[]`, +// or `{}`. + +pp.parseExprAtom = function (refDestructuringErrors) { + var node = undefined, + canBeArrow = this.potentialArrowAt == this.start; + switch (this.type) { + case _tokentype.types._super: + if (!this.inFunction) this.raise(this.start, "'super' outside of function or class"); + case _tokentype.types._this: + var type = this.type === _tokentype.types._this ? "ThisExpression" : "Super"; + node = this.startNode(); + this.next(); + return this.finishNode(node, type); + + case _tokentype.types._yield: + if (this.inGenerator) this.unexpected(); + + case _tokentype.types.name: + var startPos = this.start, + startLoc = this.startLoc; + var id = this.parseIdent(this.type !== _tokentype.types.name); + if (canBeArrow && !this.canInsertSemicolon() && this.eat(_tokentype.types.arrow)) return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id]); + return id; + + case _tokentype.types.regexp: + var value = this.value; + node = this.parseLiteral(value.value); + node.regex = { pattern: value.pattern, flags: value.flags }; + return node; + + case _tokentype.types.num:case _tokentype.types.string: + return this.parseLiteral(this.value); + + case _tokentype.types._null:case _tokentype.types._true:case _tokentype.types._false: + node = this.startNode(); + node.value = this.type === _tokentype.types._null ? null : this.type === _tokentype.types._true; + node.raw = this.type.keyword; + this.next(); + return this.finishNode(node, "Literal"); + + case _tokentype.types.parenL: + return this.parseParenAndDistinguishExpression(canBeArrow); + + case _tokentype.types.bracketL: + node = this.startNode(); + this.next(); + // check whether this is array comprehension or regular array + if (this.options.ecmaVersion >= 7 && this.type === _tokentype.types._for) { + return this.parseComprehension(node, false); + } + node.elements = this.parseExprList(_tokentype.types.bracketR, true, true, refDestructuringErrors); + return this.finishNode(node, "ArrayExpression"); + + case _tokentype.types.braceL: + return this.parseObj(false, refDestructuringErrors); + + case _tokentype.types._function: + node = this.startNode(); + this.next(); + return this.parseFunction(node, false); + + case _tokentype.types._class: + return this.parseClass(this.startNode(), false); + + case _tokentype.types._new: + return this.parseNew(); + + case _tokentype.types.backQuote: + return this.parseTemplate(); + + default: + this.unexpected(); + } +}; + +pp.parseLiteral = function (value) { + var node = this.startNode(); + node.value = value; + node.raw = this.input.slice(this.start, this.end); + this.next(); + return this.finishNode(node, "Literal"); +}; + +pp.parseParenExpression = function () { + this.expect(_tokentype.types.parenL); + var val = this.parseExpression(); + this.expect(_tokentype.types.parenR); + return val; +}; + +pp.parseParenAndDistinguishExpression = function (canBeArrow) { + var startPos = this.start, + startLoc = this.startLoc, + val = undefined; + if (this.options.ecmaVersion >= 6) { + this.next(); + + if (this.options.ecmaVersion >= 7 && this.type === _tokentype.types._for) { + return this.parseComprehension(this.startNodeAt(startPos, startLoc), true); + } + + var innerStartPos = this.start, + innerStartLoc = this.startLoc; + var exprList = [], + first = true; + var refDestructuringErrors = { shorthandAssign: 0, trailingComma: 0 }, + spreadStart = undefined, + innerParenStart = undefined; + while (this.type !== _tokentype.types.parenR) { + first ? first = false : this.expect(_tokentype.types.comma); + if (this.type === _tokentype.types.ellipsis) { + spreadStart = this.start; + exprList.push(this.parseParenItem(this.parseRest())); + break; + } else { + if (this.type === _tokentype.types.parenL && !innerParenStart) { + innerParenStart = this.start; + } + exprList.push(this.parseMaybeAssign(false, refDestructuringErrors, this.parseParenItem)); + } + } + var innerEndPos = this.start, + innerEndLoc = this.startLoc; + this.expect(_tokentype.types.parenR); + + if (canBeArrow && !this.canInsertSemicolon() && this.eat(_tokentype.types.arrow)) { + this.checkPatternErrors(refDestructuringErrors, true); + if (innerParenStart) this.unexpected(innerParenStart); + return this.parseParenArrowList(startPos, startLoc, exprList); + } + + if (!exprList.length) this.unexpected(this.lastTokStart); + if (spreadStart) this.unexpected(spreadStart); + this.checkExpressionErrors(refDestructuringErrors, true); + + if (exprList.length > 1) { + val = this.startNodeAt(innerStartPos, innerStartLoc); + val.expressions = exprList; + this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc); + } else { + val = exprList[0]; + } + } else { + val = this.parseParenExpression(); + } + + if (this.options.preserveParens) { + var par = this.startNodeAt(startPos, startLoc); + par.expression = val; + return this.finishNode(par, "ParenthesizedExpression"); + } else { + return val; + } +}; + +pp.parseParenItem = function (item) { + return item; +}; + +pp.parseParenArrowList = function (startPos, startLoc, exprList) { + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList); +}; + +// New's precedence is slightly tricky. It must allow its argument to +// be a `[]` or dot subscript expression, but not a call — at least, +// not without wrapping it in parentheses. Thus, it uses the noCalls +// argument to parseSubscripts to prevent it from consuming the +// argument list. + +var empty = []; + +pp.parseNew = function () { + var node = this.startNode(); + var meta = this.parseIdent(true); + if (this.options.ecmaVersion >= 6 && this.eat(_tokentype.types.dot)) { + node.meta = meta; + node.property = this.parseIdent(true); + if (node.property.name !== "target") this.raise(node.property.start, "The only valid meta property for new is new.target"); + if (!this.inFunction) this.raise(node.start, "new.target can only be used in functions"); + return this.finishNode(node, "MetaProperty"); + } + var startPos = this.start, + startLoc = this.startLoc; + node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true); + if (this.eat(_tokentype.types.parenL)) node.arguments = this.parseExprList(_tokentype.types.parenR, false);else node.arguments = empty; + return this.finishNode(node, "NewExpression"); +}; + +// Parse template expression. + +pp.parseTemplateElement = function () { + var elem = this.startNode(); + elem.value = { + raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, '\n'), + cooked: this.value + }; + this.next(); + elem.tail = this.type === _tokentype.types.backQuote; + return this.finishNode(elem, "TemplateElement"); +}; + +pp.parseTemplate = function () { + var node = this.startNode(); + this.next(); + node.expressions = []; + var curElt = this.parseTemplateElement(); + node.quasis = [curElt]; + while (!curElt.tail) { + this.expect(_tokentype.types.dollarBraceL); + node.expressions.push(this.parseExpression()); + this.expect(_tokentype.types.braceR); + node.quasis.push(curElt = this.parseTemplateElement()); + } + this.next(); + return this.finishNode(node, "TemplateLiteral"); +}; + +// Parse an object literal or binding pattern. + +pp.parseObj = function (isPattern, refDestructuringErrors) { + var node = this.startNode(), + first = true, + propHash = {}; + node.properties = []; + this.next(); + while (!this.eat(_tokentype.types.braceR)) { + if (!first) { + this.expect(_tokentype.types.comma); + if (this.afterTrailingComma(_tokentype.types.braceR)) break; + } else first = false; + + var prop = this.startNode(), + isGenerator = undefined, + startPos = undefined, + startLoc = undefined; + if (this.options.ecmaVersion >= 6) { + prop.method = false; + prop.shorthand = false; + if (isPattern || refDestructuringErrors) { + startPos = this.start; + startLoc = this.startLoc; + } + if (!isPattern) isGenerator = this.eat(_tokentype.types.star); + } + this.parsePropertyName(prop); + this.parsePropertyValue(prop, isPattern, isGenerator, startPos, startLoc, refDestructuringErrors); + this.checkPropClash(prop, propHash); + node.properties.push(this.finishNode(prop, "Property")); + } + return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression"); +}; + +pp.parsePropertyValue = function (prop, isPattern, isGenerator, startPos, startLoc, refDestructuringErrors) { + if (this.eat(_tokentype.types.colon)) { + prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors); + prop.kind = "init"; + } else if (this.options.ecmaVersion >= 6 && this.type === _tokentype.types.parenL) { + if (isPattern) this.unexpected(); + prop.kind = "init"; + prop.method = true; + prop.value = this.parseMethod(isGenerator); + } else if (this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && (this.type != _tokentype.types.comma && this.type != _tokentype.types.braceR)) { + if (isGenerator || isPattern) this.unexpected(); + prop.kind = prop.key.name; + this.parsePropertyName(prop); + prop.value = this.parseMethod(false); + var paramCount = prop.kind === "get" ? 0 : 1; + if (prop.value.params.length !== paramCount) { + var start = prop.value.start; + if (prop.kind === "get") this.raise(start, "getter should have no params");else this.raise(start, "setter should have exactly one param"); + } + if (prop.kind === "set" && prop.value.params[0].type === "RestElement") this.raise(prop.value.params[0].start, "Setter cannot use rest params"); + } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { + prop.kind = "init"; + if (isPattern) { + if (this.keywords.test(prop.key.name) || (this.strict ? this.reservedWordsStrictBind : this.reservedWords).test(prop.key.name)) this.raise(prop.key.start, "Binding " + prop.key.name); + prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); + } else if (this.type === _tokentype.types.eq && refDestructuringErrors) { + if (!refDestructuringErrors.shorthandAssign) refDestructuringErrors.shorthandAssign = this.start; + prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); + } else { + prop.value = prop.key; + } + prop.shorthand = true; + } else this.unexpected(); +}; + +pp.parsePropertyName = function (prop) { + if (this.options.ecmaVersion >= 6) { + if (this.eat(_tokentype.types.bracketL)) { + prop.computed = true; + prop.key = this.parseMaybeAssign(); + this.expect(_tokentype.types.bracketR); + return prop.key; + } else { + prop.computed = false; + } + } + return prop.key = this.type === _tokentype.types.num || this.type === _tokentype.types.string ? this.parseExprAtom() : this.parseIdent(true); +}; + +// Initialize empty function node. + +pp.initFunction = function (node) { + node.id = null; + if (this.options.ecmaVersion >= 6) { + node.generator = false; + node.expression = false; + } +}; + +// Parse object or class method. + +pp.parseMethod = function (isGenerator) { + var node = this.startNode(); + this.initFunction(node); + this.expect(_tokentype.types.parenL); + node.params = this.parseBindingList(_tokentype.types.parenR, false, false); + if (this.options.ecmaVersion >= 6) node.generator = isGenerator; + this.parseFunctionBody(node, false); + return this.finishNode(node, "FunctionExpression"); +}; + +// Parse arrow function expression with given parameters. + +pp.parseArrowExpression = function (node, params) { + this.initFunction(node); + node.params = this.toAssignableList(params, true); + this.parseFunctionBody(node, true); + return this.finishNode(node, "ArrowFunctionExpression"); +}; + +// Parse function body and check parameters. + +pp.parseFunctionBody = function (node, isArrowFunction) { + var isExpression = isArrowFunction && this.type !== _tokentype.types.braceL; + + if (isExpression) { + node.body = this.parseMaybeAssign(); + node.expression = true; + } else { + // Start a new scope with regard to labels and the `inFunction` + // flag (restore them to their old value afterwards). + var oldInFunc = this.inFunction, + oldInGen = this.inGenerator, + oldLabels = this.labels; + this.inFunction = true;this.inGenerator = node.generator;this.labels = []; + node.body = this.parseBlock(true); + node.expression = false; + this.inFunction = oldInFunc;this.inGenerator = oldInGen;this.labels = oldLabels; + } + + // If this is a strict mode function, verify that argument names + // are not repeated, and it does not try to bind the words `eval` + // or `arguments`. + if (this.strict || !isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) { + var oldStrict = this.strict; + this.strict = true; + if (node.id) this.checkLVal(node.id, true); + this.checkParams(node); + this.strict = oldStrict; + } else if (isArrowFunction) { + this.checkParams(node); + } +}; + +// Checks function params for various disallowed patterns such as using "eval" +// or "arguments" and duplicate parameters. + +pp.checkParams = function (node) { + var nameHash = {}; + for (var i = 0; i < node.params.length; i++) { + this.checkLVal(node.params[i], true, nameHash); + } +}; + +// Parses a comma-separated list of expressions, and returns them as +// an array. `close` is the token type that ends the list, and +// `allowEmpty` can be turned on to allow subsequent commas with +// nothing in between them to be parsed as `null` (which is needed +// for array literals). + +pp.parseExprList = function (close, allowTrailingComma, allowEmpty, refDestructuringErrors) { + var elts = [], + first = true; + while (!this.eat(close)) { + if (!first) { + this.expect(_tokentype.types.comma); + if (this.type === close && refDestructuringErrors && !refDestructuringErrors.trailingComma) { + refDestructuringErrors.trailingComma = this.lastTokStart; + } + if (allowTrailingComma && this.afterTrailingComma(close)) break; + } else first = false; + + var elt = undefined; + if (allowEmpty && this.type === _tokentype.types.comma) elt = null;else if (this.type === _tokentype.types.ellipsis) elt = this.parseSpread(refDestructuringErrors);else elt = this.parseMaybeAssign(false, refDestructuringErrors); + elts.push(elt); + } + return elts; +}; + +// Parse the next token as an identifier. If `liberal` is true (used +// when parsing properties), it will also convert keywords into +// identifiers. + +pp.parseIdent = function (liberal) { + var node = this.startNode(); + if (liberal && this.options.allowReserved == "never") liberal = false; + if (this.type === _tokentype.types.name) { + if (!liberal && (this.strict ? this.reservedWordsStrict : this.reservedWords).test(this.value) && (this.options.ecmaVersion >= 6 || this.input.slice(this.start, this.end).indexOf("\\") == -1)) this.raise(this.start, "The keyword '" + this.value + "' is reserved"); + node.name = this.value; + } else if (liberal && this.type.keyword) { + node.name = this.type.keyword; + } else { + this.unexpected(); + } + this.next(); + return this.finishNode(node, "Identifier"); +}; + +// Parses yield expression inside generator. + +pp.parseYield = function () { + var node = this.startNode(); + this.next(); + if (this.type == _tokentype.types.semi || this.canInsertSemicolon() || this.type != _tokentype.types.star && !this.type.startsExpr) { + node.delegate = false; + node.argument = null; + } else { + node.delegate = this.eat(_tokentype.types.star); + node.argument = this.parseMaybeAssign(); + } + return this.finishNode(node, "YieldExpression"); +}; + +// Parses array and generator comprehensions. + +pp.parseComprehension = function (node, isGenerator) { + node.blocks = []; + while (this.type === _tokentype.types._for) { + var block = this.startNode(); + this.next(); + this.expect(_tokentype.types.parenL); + block.left = this.parseBindingAtom(); + this.checkLVal(block.left, true); + this.expectContextual("of"); + block.right = this.parseExpression(); + this.expect(_tokentype.types.parenR); + node.blocks.push(this.finishNode(block, "ComprehensionBlock")); + } + node.filter = this.eat(_tokentype.types._if) ? this.parseParenExpression() : null; + node.body = this.parseExpression(); + this.expect(isGenerator ? _tokentype.types.parenR : _tokentype.types.bracketR); + node.generator = isGenerator; + return this.finishNode(node, "ComprehensionExpression"); +}; + +},{"./state":10,"./tokentype":14}],2:[function(_dereq_,module,exports){ +// This is a trick taken from Esprima. It turns out that, on +// non-Chrome browsers, to check whether a string is in a set, a +// predicate containing a big ugly `switch` statement is faster than +// a regular expression, and on Chrome the two are about on par. +// This function uses `eval` (non-lexical) to produce such a +// predicate from a space-separated string of words. +// +// It starts by sorting the words by length. + +// Reserved word lists for various dialects of the language + +"use strict"; + +exports.__esModule = true; +exports.isIdentifierStart = isIdentifierStart; +exports.isIdentifierChar = isIdentifierChar; +var reservedWords = { + 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile", + 5: "class enum extends super const export import", + 6: "enum", + strict: "implements interface let package private protected public static yield", + strictBind: "eval arguments" +}; + +exports.reservedWords = reservedWords; +// And the keywords + +var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"; + +var keywords = { + 5: ecma5AndLessKeywords, + 6: ecma5AndLessKeywords + " let const class extends export import yield super" +}; + +exports.keywords = keywords; +// ## Character categories + +// Big ugly regular expressions that match characters in the +// whitespace, identifier, and identifier-start categories. These +// are only applied when a character is found to actually have a +// code point above 128. +// Generated by `bin/generate-identifier-regex.js`. + +var nonASCIIidentifierStartChars = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢲऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"; +var nonASCIIidentifierChars = "‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣤ-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏ᦰ-ᧀᧈᧉ᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷼-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-꣄꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︭︳︴﹍-﹏0-9_"; + +var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); +var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); + +nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; + +// These are a run-length and offset encoded representation of the +// >0xffff code points that are a valid part of identifiers. The +// offset starts at 0x10000, and each pair of numbers represents an +// offset to the next range, and then a size of the range. They were +// generated by tools/generate-identifier-regex.js +var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 17, 26, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 99, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 98, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 26, 45, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 955, 52, 76, 44, 33, 24, 27, 35, 42, 34, 4, 0, 13, 47, 15, 3, 22, 0, 38, 17, 2, 24, 133, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 32, 4, 287, 47, 21, 1, 2, 0, 185, 46, 82, 47, 21, 0, 60, 42, 502, 63, 32, 0, 449, 56, 1288, 920, 104, 110, 2962, 1070, 13266, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 881, 68, 12, 0, 67, 12, 16481, 1, 3071, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 4149, 196, 1340, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42710, 42, 4148, 12, 221, 16355, 541]; +var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 1306, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 52, 0, 13, 2, 49, 13, 16, 9, 83, 11, 168, 11, 6, 9, 8, 2, 57, 0, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 316, 19, 13, 9, 214, 6, 3, 8, 112, 16, 16, 9, 82, 12, 9, 9, 535, 9, 20855, 9, 135, 4, 60, 6, 26, 9, 1016, 45, 17, 3, 19723, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 4305, 6, 792618, 239]; + +// This has a complexity linear to the value of the code. The +// assumption is that looking up astral identifier characters is +// rare. +function isInAstralSet(code, set) { + var pos = 0x10000; + for (var i = 0; i < set.length; i += 2) { + pos += set[i]; + if (pos > code) return false; + pos += set[i + 1]; + if (pos >= code) return true; + } +} + +// Test whether a given character code starts an identifier. + +function isIdentifierStart(code, astral) { + if (code < 65) return code === 36; + if (code < 91) return true; + if (code < 97) return code === 95; + if (code < 123) return true; + if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)); + if (astral === false) return false; + return isInAstralSet(code, astralIdentifierStartCodes); +} + +// Test whether a given character is part of an identifier. + +function isIdentifierChar(code, astral) { + if (code < 48) return code === 36; + if (code < 58) return true; + if (code < 65) return false; + if (code < 91) return true; + if (code < 97) return code === 95; + if (code < 123) return true; + if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)); + if (astral === false) return false; + return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); +} + +},{}],3:[function(_dereq_,module,exports){ +// Acorn is a tiny, fast JavaScript parser written in JavaScript. +// +// Acorn was written by Marijn Haverbeke, Ingvar Stepanyan, and +// various contributors and released under an MIT license. +// +// Git repositories for Acorn are available at +// +// http://marijnhaverbeke.nl/git/acorn +// https://github.com/ternjs/acorn.git +// +// Please use the [github bug tracker][ghbt] to report issues. +// +// [ghbt]: https://github.com/ternjs/acorn/issues +// +// This file defines the main parser interface. The library also comes +// with a [error-tolerant parser][dammit] and an +// [abstract syntax tree walker][walk], defined in other files. +// +// [dammit]: acorn_loose.js +// [walk]: util/walk.js + +"use strict"; + +exports.__esModule = true; +exports.parse = parse; +exports.parseExpressionAt = parseExpressionAt; +exports.tokenizer = tokenizer; + +var _state = _dereq_("./state"); + +_dereq_("./parseutil"); + +_dereq_("./statement"); + +_dereq_("./lval"); + +_dereq_("./expression"); + +_dereq_("./location"); + +exports.Parser = _state.Parser; +exports.plugins = _state.plugins; + +var _options = _dereq_("./options"); + +exports.defaultOptions = _options.defaultOptions; + +var _locutil = _dereq_("./locutil"); + +exports.Position = _locutil.Position; +exports.SourceLocation = _locutil.SourceLocation; +exports.getLineInfo = _locutil.getLineInfo; + +var _node = _dereq_("./node"); + +exports.Node = _node.Node; + +var _tokentype = _dereq_("./tokentype"); + +exports.TokenType = _tokentype.TokenType; +exports.tokTypes = _tokentype.types; + +var _tokencontext = _dereq_("./tokencontext"); + +exports.TokContext = _tokencontext.TokContext; +exports.tokContexts = _tokencontext.types; + +var _identifier = _dereq_("./identifier"); + +exports.isIdentifierChar = _identifier.isIdentifierChar; +exports.isIdentifierStart = _identifier.isIdentifierStart; + +var _tokenize = _dereq_("./tokenize"); + +exports.Token = _tokenize.Token; + +var _whitespace = _dereq_("./whitespace"); + +exports.isNewLine = _whitespace.isNewLine; +exports.lineBreak = _whitespace.lineBreak; +exports.lineBreakG = _whitespace.lineBreakG; +var version = "2.7.0"; + +exports.version = version; +// The main exported interface (under `self.acorn` when in the +// browser) is a `parse` function that takes a code string and +// returns an abstract syntax tree as specified by [Mozilla parser +// API][api]. +// +// [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API + +function parse(input, options) { + return new _state.Parser(options, input).parse(); +} + +// This function tries to parse a single expression at a given +// offset in a string. Useful for parsing mixed-language formats +// that embed JavaScript expressions. + +function parseExpressionAt(input, pos, options) { + var p = new _state.Parser(options, input, pos); + p.nextToken(); + return p.parseExpression(); +} + +// Acorn is organized as a tokenizer and a recursive-descent parser. +// The `tokenizer` export provides an interface to the tokenizer. + +function tokenizer(input, options) { + return new _state.Parser(options, input); +} + +},{"./expression":1,"./identifier":2,"./location":4,"./locutil":5,"./lval":6,"./node":7,"./options":8,"./parseutil":9,"./state":10,"./statement":11,"./tokencontext":12,"./tokenize":13,"./tokentype":14,"./whitespace":16}],4:[function(_dereq_,module,exports){ +"use strict"; + +var _state = _dereq_("./state"); + +var _locutil = _dereq_("./locutil"); + +var pp = _state.Parser.prototype; + +// This function is used to raise exceptions on parse errors. It +// takes an offset integer (into the current `input`) to indicate +// the location of the error, attaches the position to the end +// of the error message, and then raises a `SyntaxError` with that +// message. + +pp.raise = function (pos, message) { + var loc = _locutil.getLineInfo(this.input, pos); + message += " (" + loc.line + ":" + loc.column + ")"; + var err = new SyntaxError(message); + err.pos = pos;err.loc = loc;err.raisedAt = this.pos; + throw err; +}; + +pp.curPosition = function () { + if (this.options.locations) { + return new _locutil.Position(this.curLine, this.pos - this.lineStart); + } +}; + +},{"./locutil":5,"./state":10}],5:[function(_dereq_,module,exports){ +"use strict"; + +exports.__esModule = true; +exports.getLineInfo = getLineInfo; + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var _whitespace = _dereq_("./whitespace"); + +// These are used when `options.locations` is on, for the +// `startLoc` and `endLoc` properties. + +var Position = (function () { + function Position(line, col) { + _classCallCheck(this, Position); + + this.line = line; + this.column = col; + } + + Position.prototype.offset = function offset(n) { + return new Position(this.line, this.column + n); + }; + + return Position; +})(); + +exports.Position = Position; + +var SourceLocation = function SourceLocation(p, start, end) { + _classCallCheck(this, SourceLocation); + + this.start = start; + this.end = end; + if (p.sourceFile !== null) this.source = p.sourceFile; +} + +// The `getLineInfo` function is mostly useful when the +// `locations` option is off (for performance reasons) and you +// want to find the line/column position for a given character +// offset. `input` should be the code string that the offset refers +// into. + +; + +exports.SourceLocation = SourceLocation; + +function getLineInfo(input, offset) { + for (var line = 1, cur = 0;;) { + _whitespace.lineBreakG.lastIndex = cur; + var match = _whitespace.lineBreakG.exec(input); + if (match && match.index < offset) { + ++line; + cur = match.index + match[0].length; + } else { + return new Position(line, offset - cur); + } + } +} + +},{"./whitespace":16}],6:[function(_dereq_,module,exports){ +"use strict"; + +var _tokentype = _dereq_("./tokentype"); + +var _state = _dereq_("./state"); + +var _util = _dereq_("./util"); + +var pp = _state.Parser.prototype; + +// Convert existing expression atom to assignable pattern +// if possible. + +pp.toAssignable = function (node, isBinding) { + if (this.options.ecmaVersion >= 6 && node) { + switch (node.type) { + case "Identifier": + case "ObjectPattern": + case "ArrayPattern": + break; + + case "ObjectExpression": + node.type = "ObjectPattern"; + for (var i = 0; i < node.properties.length; i++) { + var prop = node.properties[i]; + if (prop.kind !== "init") this.raise(prop.key.start, "Object pattern can't contain getter or setter"); + this.toAssignable(prop.value, isBinding); + } + break; + + case "ArrayExpression": + node.type = "ArrayPattern"; + this.toAssignableList(node.elements, isBinding); + break; + + case "AssignmentExpression": + if (node.operator === "=") { + node.type = "AssignmentPattern"; + delete node.operator; + // falls through to AssignmentPattern + } else { + this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); + break; + } + + case "AssignmentPattern": + if (node.right.type === "YieldExpression") this.raise(node.right.start, "Yield expression cannot be a default value"); + break; + + case "ParenthesizedExpression": + node.expression = this.toAssignable(node.expression, isBinding); + break; + + case "MemberExpression": + if (!isBinding) break; + + default: + this.raise(node.start, "Assigning to rvalue"); + } + } + return node; +}; + +// Convert list of expression atoms to binding list. + +pp.toAssignableList = function (exprList, isBinding) { + var end = exprList.length; + if (end) { + var last = exprList[end - 1]; + if (last && last.type == "RestElement") { + --end; + } else if (last && last.type == "SpreadElement") { + last.type = "RestElement"; + var arg = last.argument; + this.toAssignable(arg, isBinding); + if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern") this.unexpected(arg.start); + --end; + } + + if (isBinding && last.type === "RestElement" && last.argument.type !== "Identifier") this.unexpected(last.argument.start); + } + for (var i = 0; i < end; i++) { + var elt = exprList[i]; + if (elt) this.toAssignable(elt, isBinding); + } + return exprList; +}; + +// Parses spread element. + +pp.parseSpread = function (refDestructuringErrors) { + var node = this.startNode(); + this.next(); + node.argument = this.parseMaybeAssign(refDestructuringErrors); + return this.finishNode(node, "SpreadElement"); +}; + +pp.parseRest = function (allowNonIdent) { + var node = this.startNode(); + this.next(); + + // RestElement inside of a function parameter must be an identifier + if (allowNonIdent) node.argument = this.type === _tokentype.types.name ? this.parseIdent() : this.unexpected();else node.argument = this.type === _tokentype.types.name || this.type === _tokentype.types.bracketL ? this.parseBindingAtom() : this.unexpected(); + + return this.finishNode(node, "RestElement"); +}; + +// Parses lvalue (assignable) atom. + +pp.parseBindingAtom = function () { + if (this.options.ecmaVersion < 6) return this.parseIdent(); + switch (this.type) { + case _tokentype.types.name: + return this.parseIdent(); + + case _tokentype.types.bracketL: + var node = this.startNode(); + this.next(); + node.elements = this.parseBindingList(_tokentype.types.bracketR, true, true); + return this.finishNode(node, "ArrayPattern"); + + case _tokentype.types.braceL: + return this.parseObj(true); + + default: + this.unexpected(); + } +}; + +pp.parseBindingList = function (close, allowEmpty, allowTrailingComma, allowNonIdent) { + var elts = [], + first = true; + while (!this.eat(close)) { + if (first) first = false;else this.expect(_tokentype.types.comma); + if (allowEmpty && this.type === _tokentype.types.comma) { + elts.push(null); + } else if (allowTrailingComma && this.afterTrailingComma(close)) { + break; + } else if (this.type === _tokentype.types.ellipsis) { + var rest = this.parseRest(allowNonIdent); + this.parseBindingListItem(rest); + elts.push(rest); + this.expect(close); + break; + } else { + var elem = this.parseMaybeDefault(this.start, this.startLoc); + this.parseBindingListItem(elem); + elts.push(elem); + } + } + return elts; +}; + +pp.parseBindingListItem = function (param) { + return param; +}; + +// Parses assignment pattern around given atom if possible. + +pp.parseMaybeDefault = function (startPos, startLoc, left) { + left = left || this.parseBindingAtom(); + if (this.options.ecmaVersion < 6 || !this.eat(_tokentype.types.eq)) return left; + var node = this.startNodeAt(startPos, startLoc); + node.left = left; + node.right = this.parseMaybeAssign(); + return this.finishNode(node, "AssignmentPattern"); +}; + +// Verify that a node is an lval — something that can be assigned +// to. + +pp.checkLVal = function (expr, isBinding, checkClashes) { + switch (expr.type) { + case "Identifier": + if (this.strict && this.reservedWordsStrictBind.test(expr.name)) this.raise(expr.start, (isBinding ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); + if (checkClashes) { + if (_util.has(checkClashes, expr.name)) this.raise(expr.start, "Argument name clash"); + checkClashes[expr.name] = true; + } + break; + + case "MemberExpression": + if (isBinding) this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " member expression"); + break; + + case "ObjectPattern": + for (var i = 0; i < expr.properties.length; i++) { + this.checkLVal(expr.properties[i].value, isBinding, checkClashes); + }break; + + case "ArrayPattern": + for (var i = 0; i < expr.elements.length; i++) { + var elem = expr.elements[i]; + if (elem) this.checkLVal(elem, isBinding, checkClashes); + } + break; + + case "AssignmentPattern": + this.checkLVal(expr.left, isBinding, checkClashes); + break; + + case "RestElement": + this.checkLVal(expr.argument, isBinding, checkClashes); + break; + + case "ParenthesizedExpression": + this.checkLVal(expr.expression, isBinding, checkClashes); + break; + + default: + this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " rvalue"); + } +}; + +},{"./state":10,"./tokentype":14,"./util":15}],7:[function(_dereq_,module,exports){ +"use strict"; + +exports.__esModule = true; + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var _state = _dereq_("./state"); + +var _locutil = _dereq_("./locutil"); + +var Node = function Node(parser, pos, loc) { + _classCallCheck(this, Node); + + this.type = ""; + this.start = pos; + this.end = 0; + if (parser.options.locations) this.loc = new _locutil.SourceLocation(parser, loc); + if (parser.options.directSourceFile) this.sourceFile = parser.options.directSourceFile; + if (parser.options.ranges) this.range = [pos, 0]; +} + +// Start an AST node, attaching a start offset. + +; + +exports.Node = Node; +var pp = _state.Parser.prototype; + +pp.startNode = function () { + return new Node(this, this.start, this.startLoc); +}; + +pp.startNodeAt = function (pos, loc) { + return new Node(this, pos, loc); +}; + +// Finish an AST node, adding `type` and `end` properties. + +function finishNodeAt(node, type, pos, loc) { + node.type = type; + node.end = pos; + if (this.options.locations) node.loc.end = loc; + if (this.options.ranges) node.range[1] = pos; + return node; +} + +pp.finishNode = function (node, type) { + return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc); +}; + +// Finish node at given position + +pp.finishNodeAt = function (node, type, pos, loc) { + return finishNodeAt.call(this, node, type, pos, loc); +}; + +},{"./locutil":5,"./state":10}],8:[function(_dereq_,module,exports){ +"use strict"; + +exports.__esModule = true; +exports.getOptions = getOptions; + +var _util = _dereq_("./util"); + +var _locutil = _dereq_("./locutil"); + +// A second optional argument can be given to further configure +// the parser process. These options are recognized: + +var defaultOptions = { + // `ecmaVersion` indicates the ECMAScript version to parse. Must + // be either 3, or 5, or 6. This influences support for strict + // mode, the set of reserved words, support for getters and + // setters and other features. + ecmaVersion: 5, + // Source type ("script" or "module") for different semantics + sourceType: "script", + // `onInsertedSemicolon` can be a callback that will be called + // when a semicolon is automatically inserted. It will be passed + // th position of the comma as an offset, and if `locations` is + // enabled, it is given the location as a `{line, column}` object + // as second argument. + onInsertedSemicolon: null, + // `onTrailingComma` is similar to `onInsertedSemicolon`, but for + // trailing commas. + onTrailingComma: null, + // By default, reserved words are only enforced if ecmaVersion >= 5. + // Set `allowReserved` to a boolean value to explicitly turn this on + // an off. When this option has the value "never", reserved words + // and keywords can also not be used as property names. + allowReserved: null, + // When enabled, a return at the top level is not considered an + // error. + allowReturnOutsideFunction: false, + // When enabled, import/export statements are not constrained to + // appearing at the top of the program. + allowImportExportEverywhere: false, + // When enabled, hashbang directive in the beginning of file + // is allowed and treated as a line comment. + allowHashBang: false, + // When `locations` is on, `loc` properties holding objects with + // `start` and `end` properties in `{line, column}` form (with + // line being 1-based and column 0-based) will be attached to the + // nodes. + locations: false, + // A function can be passed as `onToken` option, which will + // cause Acorn to call that function with object in the same + // format as tokens returned from `tokenizer().getToken()`. Note + // that you are not allowed to call the parser from the + // callback—that will corrupt its internal state. + onToken: null, + // A function can be passed as `onComment` option, which will + // cause Acorn to call that function with `(block, text, start, + // end)` parameters whenever a comment is skipped. `block` is a + // boolean indicating whether this is a block (`/* */`) comment, + // `text` is the content of the comment, and `start` and `end` are + // character offsets that denote the start and end of the comment. + // When the `locations` option is on, two more parameters are + // passed, the full `{line, column}` locations of the start and + // end of the comments. Note that you are not allowed to call the + // parser from the callback—that will corrupt its internal state. + onComment: null, + // Nodes have their start and end characters offsets recorded in + // `start` and `end` properties (directly on the node, rather than + // the `loc` object, which holds line/column data. To also add a + // [semi-standardized][range] `range` property holding a `[start, + // end]` array with the same numbers, set the `ranges` option to + // `true`. + // + // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 + ranges: false, + // It is possible to parse multiple files into a single AST by + // passing the tree produced by parsing the first file as + // `program` option in subsequent parses. This will add the + // toplevel forms of the parsed file to the `Program` (top) node + // of an existing parse tree. + program: null, + // When `locations` is on, you can pass this to record the source + // file in every node's `loc` object. + sourceFile: null, + // This value, if given, is stored in every node, whether + // `locations` is on or off. + directSourceFile: null, + // When enabled, parenthesized expressions are represented by + // (non-standard) ParenthesizedExpression nodes + preserveParens: false, + plugins: {} +}; + +exports.defaultOptions = defaultOptions; +// Interpret and default an options object + +function getOptions(opts) { + var options = {}; + for (var opt in defaultOptions) { + options[opt] = opts && _util.has(opts, opt) ? opts[opt] : defaultOptions[opt]; + }if (options.allowReserved == null) options.allowReserved = options.ecmaVersion < 5; + + if (_util.isArray(options.onToken)) { + (function () { + var tokens = options.onToken; + options.onToken = function (token) { + return tokens.push(token); + }; + })(); + } + if (_util.isArray(options.onComment)) options.onComment = pushComment(options, options.onComment); + + return options; +} + +function pushComment(options, array) { + return function (block, text, start, end, startLoc, endLoc) { + var comment = { + type: block ? 'Block' : 'Line', + value: text, + start: start, + end: end + }; + if (options.locations) comment.loc = new _locutil.SourceLocation(this, startLoc, endLoc); + if (options.ranges) comment.range = [start, end]; + array.push(comment); + }; +} + +},{"./locutil":5,"./util":15}],9:[function(_dereq_,module,exports){ +"use strict"; + +var _tokentype = _dereq_("./tokentype"); + +var _state = _dereq_("./state"); + +var _whitespace = _dereq_("./whitespace"); + +var pp = _state.Parser.prototype; + +// ## Parser utilities + +// Test whether a statement node is the string literal `"use strict"`. + +pp.isUseStrict = function (stmt) { + return this.options.ecmaVersion >= 5 && stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && stmt.expression.raw.slice(1, -1) === "use strict"; +}; + +// Predicate that tests whether the next token is of the given +// type, and if yes, consumes it as a side effect. + +pp.eat = function (type) { + if (this.type === type) { + this.next(); + return true; + } else { + return false; + } +}; + +// Tests whether parsed token is a contextual keyword. + +pp.isContextual = function (name) { + return this.type === _tokentype.types.name && this.value === name; +}; + +// Consumes contextual keyword if possible. + +pp.eatContextual = function (name) { + return this.value === name && this.eat(_tokentype.types.name); +}; + +// Asserts that following token is given contextual keyword. + +pp.expectContextual = function (name) { + if (!this.eatContextual(name)) this.unexpected(); +}; + +// Test whether a semicolon can be inserted at the current position. + +pp.canInsertSemicolon = function () { + return this.type === _tokentype.types.eof || this.type === _tokentype.types.braceR || _whitespace.lineBreak.test(this.input.slice(this.lastTokEnd, this.start)); +}; + +pp.insertSemicolon = function () { + if (this.canInsertSemicolon()) { + if (this.options.onInsertedSemicolon) this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc); + return true; + } +}; + +// Consume a semicolon, or, failing that, see if we are allowed to +// pretend that there is a semicolon at this position. + +pp.semicolon = function () { + if (!this.eat(_tokentype.types.semi) && !this.insertSemicolon()) this.unexpected(); +}; + +pp.afterTrailingComma = function (tokType) { + if (this.type == tokType) { + if (this.options.onTrailingComma) this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc); + this.next(); + return true; + } +}; + +// Expect a token of a given type. If found, consume it, otherwise, +// raise an unexpected token error. + +pp.expect = function (type) { + this.eat(type) || this.unexpected(); +}; + +// Raise an unexpected token error. + +pp.unexpected = function (pos) { + this.raise(pos != null ? pos : this.start, "Unexpected token"); +}; + +pp.checkPatternErrors = function (refDestructuringErrors, andThrow) { + var pos = refDestructuringErrors && refDestructuringErrors.trailingComma; + if (!andThrow) return !!pos; + if (pos) this.raise(pos, "Trailing comma is not permitted in destructuring patterns"); +}; + +pp.checkExpressionErrors = function (refDestructuringErrors, andThrow) { + var pos = refDestructuringErrors && refDestructuringErrors.shorthandAssign; + if (!andThrow) return !!pos; + if (pos) this.raise(pos, "Shorthand property assignments are valid only in destructuring patterns"); +}; + +},{"./state":10,"./tokentype":14,"./whitespace":16}],10:[function(_dereq_,module,exports){ +"use strict"; + +exports.__esModule = true; + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var _identifier = _dereq_("./identifier"); + +var _tokentype = _dereq_("./tokentype"); + +var _whitespace = _dereq_("./whitespace"); + +var _options = _dereq_("./options"); + +// Registered plugins +var plugins = {}; + +exports.plugins = plugins; +function keywordRegexp(words) { + return new RegExp("^(" + words.replace(/ /g, "|") + ")$"); +} + +var Parser = (function () { + function Parser(options, input, startPos) { + _classCallCheck(this, Parser); + + this.options = options = _options.getOptions(options); + this.sourceFile = options.sourceFile; + this.keywords = keywordRegexp(_identifier.keywords[options.ecmaVersion >= 6 ? 6 : 5]); + var reserved = options.allowReserved ? "" : _identifier.reservedWords[options.ecmaVersion] + (options.sourceType == "module" ? " await" : ""); + this.reservedWords = keywordRegexp(reserved); + var reservedStrict = (reserved ? reserved + " " : "") + _identifier.reservedWords.strict; + this.reservedWordsStrict = keywordRegexp(reservedStrict); + this.reservedWordsStrictBind = keywordRegexp(reservedStrict + " " + _identifier.reservedWords.strictBind); + this.input = String(input); + + // Used to signal to callers of `readWord1` whether the word + // contained any escape sequences. This is needed because words with + // escape sequences must not be interpreted as keywords. + this.containsEsc = false; + + // Load plugins + this.loadPlugins(options.plugins); + + // Set up token state + + // The current position of the tokenizer in the input. + if (startPos) { + this.pos = startPos; + this.lineStart = Math.max(0, this.input.lastIndexOf("\n", startPos)); + this.curLine = this.input.slice(0, this.lineStart).split(_whitespace.lineBreak).length; + } else { + this.pos = this.lineStart = 0; + this.curLine = 1; + } + + // Properties of the current token: + // Its type + this.type = _tokentype.types.eof; + // For tokens that include more information than their type, the value + this.value = null; + // Its start and end offset + this.start = this.end = this.pos; + // And, if locations are used, the {line, column} object + // corresponding to those offsets + this.startLoc = this.endLoc = this.curPosition(); + + // Position information for the previous token + this.lastTokEndLoc = this.lastTokStartLoc = null; + this.lastTokStart = this.lastTokEnd = this.pos; + + // The context stack is used to superficially track syntactic + // context to predict whether a regular expression is allowed in a + // given position. + this.context = this.initialContext(); + this.exprAllowed = true; + + // Figure out if it's a module code. + this.strict = this.inModule = options.sourceType === "module"; + + // Used to signify the start of a potential arrow function + this.potentialArrowAt = -1; + + // Flags to track whether we are in a function, a generator. + this.inFunction = this.inGenerator = false; + // Labels in scope. + this.labels = []; + + // If enabled, skip leading hashbang line. + if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === '#!') this.skipLineComment(2); + } + + // DEPRECATED Kept for backwards compatibility until 3.0 in case a plugin uses them + + Parser.prototype.isKeyword = function isKeyword(word) { + return this.keywords.test(word); + }; + + Parser.prototype.isReservedWord = function isReservedWord(word) { + return this.reservedWords.test(word); + }; + + Parser.prototype.extend = function extend(name, f) { + this[name] = f(this[name]); + }; + + Parser.prototype.loadPlugins = function loadPlugins(pluginConfigs) { + for (var _name in pluginConfigs) { + var plugin = plugins[_name]; + if (!plugin) throw new Error("Plugin '" + _name + "' not found"); + plugin(this, pluginConfigs[_name]); + } + }; + + Parser.prototype.parse = function parse() { + var node = this.options.program || this.startNode(); + this.nextToken(); + return this.parseTopLevel(node); + }; + + return Parser; +})(); + +exports.Parser = Parser; + +},{"./identifier":2,"./options":8,"./tokentype":14,"./whitespace":16}],11:[function(_dereq_,module,exports){ +"use strict"; + +var _tokentype = _dereq_("./tokentype"); + +var _state = _dereq_("./state"); + +var _whitespace = _dereq_("./whitespace"); + +var pp = _state.Parser.prototype; + +// ### Statement parsing + +// Parse a program. Initializes the parser, reads any number of +// statements, and wraps them in a Program node. Optionally takes a +// `program` argument. If present, the statements will be appended +// to its body instead of creating a new node. + +pp.parseTopLevel = function (node) { + var first = true; + if (!node.body) node.body = []; + while (this.type !== _tokentype.types.eof) { + var stmt = this.parseStatement(true, true); + node.body.push(stmt); + if (first) { + if (this.isUseStrict(stmt)) this.setStrict(true); + first = false; + } + } + this.next(); + if (this.options.ecmaVersion >= 6) { + node.sourceType = this.options.sourceType; + } + return this.finishNode(node, "Program"); +}; + +var loopLabel = { kind: "loop" }, + switchLabel = { kind: "switch" }; + +// Parse a single statement. +// +// If expecting a statement and finding a slash operator, parse a +// regular expression literal. This is to handle cases like +// `if (foo) /blah/.exec(foo)`, where looking at the previous token +// does not help. + +pp.parseStatement = function (declaration, topLevel) { + var starttype = this.type, + node = this.startNode(); + + // Most types of statements are recognized by the keyword they + // start with. Many are trivial to parse, some require a bit of + // complexity. + + switch (starttype) { + case _tokentype.types._break:case _tokentype.types._continue: + return this.parseBreakContinueStatement(node, starttype.keyword); + case _tokentype.types._debugger: + return this.parseDebuggerStatement(node); + case _tokentype.types._do: + return this.parseDoStatement(node); + case _tokentype.types._for: + return this.parseForStatement(node); + case _tokentype.types._function: + if (!declaration && this.options.ecmaVersion >= 6) this.unexpected(); + return this.parseFunctionStatement(node); + case _tokentype.types._class: + if (!declaration) this.unexpected(); + return this.parseClass(node, true); + case _tokentype.types._if: + return this.parseIfStatement(node); + case _tokentype.types._return: + return this.parseReturnStatement(node); + case _tokentype.types._switch: + return this.parseSwitchStatement(node); + case _tokentype.types._throw: + return this.parseThrowStatement(node); + case _tokentype.types._try: + return this.parseTryStatement(node); + case _tokentype.types._let:case _tokentype.types._const: + if (!declaration) this.unexpected(); // NOTE: falls through to _var + case _tokentype.types._var: + return this.parseVarStatement(node, starttype); + case _tokentype.types._while: + return this.parseWhileStatement(node); + case _tokentype.types._with: + return this.parseWithStatement(node); + case _tokentype.types.braceL: + return this.parseBlock(); + case _tokentype.types.semi: + return this.parseEmptyStatement(node); + case _tokentype.types._export: + case _tokentype.types._import: + if (!this.options.allowImportExportEverywhere) { + if (!topLevel) this.raise(this.start, "'import' and 'export' may only appear at the top level"); + if (!this.inModule) this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'"); + } + return starttype === _tokentype.types._import ? this.parseImport(node) : this.parseExport(node); + + // If the statement does not start with a statement keyword or a + // brace, it's an ExpressionStatement or LabeledStatement. We + // simply start parsing an expression, and afterwards, if the + // next token is a colon and the expression was a simple + // Identifier node, we switch to interpreting it as a label. + default: + var maybeName = this.value, + expr = this.parseExpression(); + if (starttype === _tokentype.types.name && expr.type === "Identifier" && this.eat(_tokentype.types.colon)) return this.parseLabeledStatement(node, maybeName, expr);else return this.parseExpressionStatement(node, expr); + } +}; + +pp.parseBreakContinueStatement = function (node, keyword) { + var isBreak = keyword == "break"; + this.next(); + if (this.eat(_tokentype.types.semi) || this.insertSemicolon()) node.label = null;else if (this.type !== _tokentype.types.name) this.unexpected();else { + node.label = this.parseIdent(); + this.semicolon(); + } + + // Verify that there is an actual destination to break or + // continue to. + for (var i = 0; i < this.labels.length; ++i) { + var lab = this.labels[i]; + if (node.label == null || lab.name === node.label.name) { + if (lab.kind != null && (isBreak || lab.kind === "loop")) break; + if (node.label && isBreak) break; + } + } + if (i === this.labels.length) this.raise(node.start, "Unsyntactic " + keyword); + return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement"); +}; + +pp.parseDebuggerStatement = function (node) { + this.next(); + this.semicolon(); + return this.finishNode(node, "DebuggerStatement"); +}; + +pp.parseDoStatement = function (node) { + this.next(); + this.labels.push(loopLabel); + node.body = this.parseStatement(false); + this.labels.pop(); + this.expect(_tokentype.types._while); + node.test = this.parseParenExpression(); + if (this.options.ecmaVersion >= 6) this.eat(_tokentype.types.semi);else this.semicolon(); + return this.finishNode(node, "DoWhileStatement"); +}; + +// Disambiguating between a `for` and a `for`/`in` or `for`/`of` +// loop is non-trivial. Basically, we have to parse the init `var` +// statement or expression, disallowing the `in` operator (see +// the second parameter to `parseExpression`), and then check +// whether the next token is `in` or `of`. When there is no init +// part (semicolon immediately after the opening parenthesis), it +// is a regular `for` loop. + +pp.parseForStatement = function (node) { + this.next(); + this.labels.push(loopLabel); + this.expect(_tokentype.types.parenL); + if (this.type === _tokentype.types.semi) return this.parseFor(node, null); + if (this.type === _tokentype.types._var || this.type === _tokentype.types._let || this.type === _tokentype.types._const) { + var _init = this.startNode(), + varKind = this.type; + this.next(); + this.parseVar(_init, true, varKind); + this.finishNode(_init, "VariableDeclaration"); + if ((this.type === _tokentype.types._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && _init.declarations.length === 1 && !(varKind !== _tokentype.types._var && _init.declarations[0].init)) return this.parseForIn(node, _init); + return this.parseFor(node, _init); + } + var refDestructuringErrors = { shorthandAssign: 0, trailingComma: 0 }; + var init = this.parseExpression(true, refDestructuringErrors); + if (this.type === _tokentype.types._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) { + this.checkPatternErrors(refDestructuringErrors, true); + this.toAssignable(init); + this.checkLVal(init); + return this.parseForIn(node, init); + } else { + this.checkExpressionErrors(refDestructuringErrors, true); + } + return this.parseFor(node, init); +}; + +pp.parseFunctionStatement = function (node) { + this.next(); + return this.parseFunction(node, true); +}; + +pp.parseIfStatement = function (node) { + this.next(); + node.test = this.parseParenExpression(); + node.consequent = this.parseStatement(false); + node.alternate = this.eat(_tokentype.types._else) ? this.parseStatement(false) : null; + return this.finishNode(node, "IfStatement"); +}; + +pp.parseReturnStatement = function (node) { + if (!this.inFunction && !this.options.allowReturnOutsideFunction) this.raise(this.start, "'return' outside of function"); + this.next(); + + // In `return` (and `break`/`continue`), the keywords with + // optional arguments, we eagerly look for a semicolon or the + // possibility to insert one. + + if (this.eat(_tokentype.types.semi) || this.insertSemicolon()) node.argument = null;else { + node.argument = this.parseExpression();this.semicolon(); + } + return this.finishNode(node, "ReturnStatement"); +}; + +pp.parseSwitchStatement = function (node) { + this.next(); + node.discriminant = this.parseParenExpression(); + node.cases = []; + this.expect(_tokentype.types.braceL); + this.labels.push(switchLabel); + + // Statements under must be grouped (by label) in SwitchCase + // nodes. `cur` is used to keep the node that we are currently + // adding statements to. + + for (var cur, sawDefault = false; this.type != _tokentype.types.braceR;) { + if (this.type === _tokentype.types._case || this.type === _tokentype.types._default) { + var isCase = this.type === _tokentype.types._case; + if (cur) this.finishNode(cur, "SwitchCase"); + node.cases.push(cur = this.startNode()); + cur.consequent = []; + this.next(); + if (isCase) { + cur.test = this.parseExpression(); + } else { + if (sawDefault) this.raise(this.lastTokStart, "Multiple default clauses"); + sawDefault = true; + cur.test = null; + } + this.expect(_tokentype.types.colon); + } else { + if (!cur) this.unexpected(); + cur.consequent.push(this.parseStatement(true)); + } + } + if (cur) this.finishNode(cur, "SwitchCase"); + this.next(); // Closing brace + this.labels.pop(); + return this.finishNode(node, "SwitchStatement"); +}; + +pp.parseThrowStatement = function (node) { + this.next(); + if (_whitespace.lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) this.raise(this.lastTokEnd, "Illegal newline after throw"); + node.argument = this.parseExpression(); + this.semicolon(); + return this.finishNode(node, "ThrowStatement"); +}; + +// Reused empty array added for node fields that are always empty. + +var empty = []; + +pp.parseTryStatement = function (node) { + this.next(); + node.block = this.parseBlock(); + node.handler = null; + if (this.type === _tokentype.types._catch) { + var clause = this.startNode(); + this.next(); + this.expect(_tokentype.types.parenL); + clause.param = this.parseBindingAtom(); + this.checkLVal(clause.param, true); + this.expect(_tokentype.types.parenR); + clause.body = this.parseBlock(); + node.handler = this.finishNode(clause, "CatchClause"); + } + node.finalizer = this.eat(_tokentype.types._finally) ? this.parseBlock() : null; + if (!node.handler && !node.finalizer) this.raise(node.start, "Missing catch or finally clause"); + return this.finishNode(node, "TryStatement"); +}; + +pp.parseVarStatement = function (node, kind) { + this.next(); + this.parseVar(node, false, kind); + this.semicolon(); + return this.finishNode(node, "VariableDeclaration"); +}; + +pp.parseWhileStatement = function (node) { + this.next(); + node.test = this.parseParenExpression(); + this.labels.push(loopLabel); + node.body = this.parseStatement(false); + this.labels.pop(); + return this.finishNode(node, "WhileStatement"); +}; + +pp.parseWithStatement = function (node) { + if (this.strict) this.raise(this.start, "'with' in strict mode"); + this.next(); + node.object = this.parseParenExpression(); + node.body = this.parseStatement(false); + return this.finishNode(node, "WithStatement"); +}; + +pp.parseEmptyStatement = function (node) { + this.next(); + return this.finishNode(node, "EmptyStatement"); +}; + +pp.parseLabeledStatement = function (node, maybeName, expr) { + for (var i = 0; i < this.labels.length; ++i) { + if (this.labels[i].name === maybeName) this.raise(expr.start, "Label '" + maybeName + "' is already declared"); + }var kind = this.type.isLoop ? "loop" : this.type === _tokentype.types._switch ? "switch" : null; + for (var i = this.labels.length - 1; i >= 0; i--) { + var label = this.labels[i]; + if (label.statementStart == node.start) { + label.statementStart = this.start; + label.kind = kind; + } else break; + } + this.labels.push({ name: maybeName, kind: kind, statementStart: this.start }); + node.body = this.parseStatement(true); + this.labels.pop(); + node.label = expr; + return this.finishNode(node, "LabeledStatement"); +}; + +pp.parseExpressionStatement = function (node, expr) { + node.expression = expr; + this.semicolon(); + return this.finishNode(node, "ExpressionStatement"); +}; + +// Parse a semicolon-enclosed block of statements, handling `"use +// strict"` declarations when `allowStrict` is true (used for +// function bodies). + +pp.parseBlock = function (allowStrict) { + var node = this.startNode(), + first = true, + oldStrict = undefined; + node.body = []; + this.expect(_tokentype.types.braceL); + while (!this.eat(_tokentype.types.braceR)) { + var stmt = this.parseStatement(true); + node.body.push(stmt); + if (first && allowStrict && this.isUseStrict(stmt)) { + oldStrict = this.strict; + this.setStrict(this.strict = true); + } + first = false; + } + if (oldStrict === false) this.setStrict(false); + return this.finishNode(node, "BlockStatement"); +}; + +// Parse a regular `for` loop. The disambiguation code in +// `parseStatement` will already have parsed the init statement or +// expression. + +pp.parseFor = function (node, init) { + node.init = init; + this.expect(_tokentype.types.semi); + node.test = this.type === _tokentype.types.semi ? null : this.parseExpression(); + this.expect(_tokentype.types.semi); + node.update = this.type === _tokentype.types.parenR ? null : this.parseExpression(); + this.expect(_tokentype.types.parenR); + node.body = this.parseStatement(false); + this.labels.pop(); + return this.finishNode(node, "ForStatement"); +}; + +// Parse a `for`/`in` and `for`/`of` loop, which are almost +// same from parser's perspective. + +pp.parseForIn = function (node, init) { + var type = this.type === _tokentype.types._in ? "ForInStatement" : "ForOfStatement"; + this.next(); + node.left = init; + node.right = this.parseExpression(); + this.expect(_tokentype.types.parenR); + node.body = this.parseStatement(false); + this.labels.pop(); + return this.finishNode(node, type); +}; + +// Parse a list of variable declarations. + +pp.parseVar = function (node, isFor, kind) { + node.declarations = []; + node.kind = kind.keyword; + for (;;) { + var decl = this.startNode(); + this.parseVarId(decl); + if (this.eat(_tokentype.types.eq)) { + decl.init = this.parseMaybeAssign(isFor); + } else if (kind === _tokentype.types._const && !(this.type === _tokentype.types._in || this.options.ecmaVersion >= 6 && this.isContextual("of"))) { + this.unexpected(); + } else if (decl.id.type != "Identifier" && !(isFor && (this.type === _tokentype.types._in || this.isContextual("of")))) { + this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value"); + } else { + decl.init = null; + } + node.declarations.push(this.finishNode(decl, "VariableDeclarator")); + if (!this.eat(_tokentype.types.comma)) break; + } + return node; +}; + +pp.parseVarId = function (decl) { + decl.id = this.parseBindingAtom(); + this.checkLVal(decl.id, true); +}; + +// Parse a function declaration or literal (depending on the +// `isStatement` parameter). + +pp.parseFunction = function (node, isStatement, allowExpressionBody) { + this.initFunction(node); + if (this.options.ecmaVersion >= 6) node.generator = this.eat(_tokentype.types.star); + if (isStatement || this.type === _tokentype.types.name) node.id = this.parseIdent(); + this.parseFunctionParams(node); + this.parseFunctionBody(node, allowExpressionBody); + return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression"); +}; + +pp.parseFunctionParams = function (node) { + this.expect(_tokentype.types.parenL); + node.params = this.parseBindingList(_tokentype.types.parenR, false, false, true); +}; + +// Parse a class declaration or literal (depending on the +// `isStatement` parameter). + +pp.parseClass = function (node, isStatement) { + this.next(); + this.parseClassId(node, isStatement); + this.parseClassSuper(node); + var classBody = this.startNode(); + var hadConstructor = false; + classBody.body = []; + this.expect(_tokentype.types.braceL); + while (!this.eat(_tokentype.types.braceR)) { + if (this.eat(_tokentype.types.semi)) continue; + var method = this.startNode(); + var isGenerator = this.eat(_tokentype.types.star); + var isMaybeStatic = this.type === _tokentype.types.name && this.value === "static"; + this.parsePropertyName(method); + method["static"] = isMaybeStatic && this.type !== _tokentype.types.parenL; + if (method["static"]) { + if (isGenerator) this.unexpected(); + isGenerator = this.eat(_tokentype.types.star); + this.parsePropertyName(method); + } + method.kind = "method"; + var isGetSet = false; + if (!method.computed) { + var key = method.key; + + if (!isGenerator && key.type === "Identifier" && this.type !== _tokentype.types.parenL && (key.name === "get" || key.name === "set")) { + isGetSet = true; + method.kind = key.name; + key = this.parsePropertyName(method); + } + if (!method["static"] && (key.type === "Identifier" && key.name === "constructor" || key.type === "Literal" && key.value === "constructor")) { + if (hadConstructor) this.raise(key.start, "Duplicate constructor in the same class"); + if (isGetSet) this.raise(key.start, "Constructor can't have get/set modifier"); + if (isGenerator) this.raise(key.start, "Constructor can't be a generator"); + method.kind = "constructor"; + hadConstructor = true; + } + } + this.parseClassMethod(classBody, method, isGenerator); + if (isGetSet) { + var paramCount = method.kind === "get" ? 0 : 1; + if (method.value.params.length !== paramCount) { + var start = method.value.start; + if (method.kind === "get") this.raise(start, "getter should have no params");else this.raise(start, "setter should have exactly one param"); + } + if (method.kind === "set" && method.value.params[0].type === "RestElement") this.raise(method.value.params[0].start, "Setter cannot use rest params"); + } + } + node.body = this.finishNode(classBody, "ClassBody"); + return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression"); +}; + +pp.parseClassMethod = function (classBody, method, isGenerator) { + method.value = this.parseMethod(isGenerator); + classBody.body.push(this.finishNode(method, "MethodDefinition")); +}; + +pp.parseClassId = function (node, isStatement) { + node.id = this.type === _tokentype.types.name ? this.parseIdent() : isStatement ? this.unexpected() : null; +}; + +pp.parseClassSuper = function (node) { + node.superClass = this.eat(_tokentype.types._extends) ? this.parseExprSubscripts() : null; +}; + +// Parses module export declaration. + +pp.parseExport = function (node) { + this.next(); + // export * from '...' + if (this.eat(_tokentype.types.star)) { + this.expectContextual("from"); + node.source = this.type === _tokentype.types.string ? this.parseExprAtom() : this.unexpected(); + this.semicolon(); + return this.finishNode(node, "ExportAllDeclaration"); + } + if (this.eat(_tokentype.types._default)) { + // export default ... + var expr = this.parseMaybeAssign(); + var needsSemi = true; + if (expr.type == "FunctionExpression" || expr.type == "ClassExpression") { + needsSemi = false; + if (expr.id) { + expr.type = expr.type == "FunctionExpression" ? "FunctionDeclaration" : "ClassDeclaration"; + } + } + node.declaration = expr; + if (needsSemi) this.semicolon(); + return this.finishNode(node, "ExportDefaultDeclaration"); + } + // export var|const|let|function|class ... + if (this.shouldParseExportStatement()) { + node.declaration = this.parseStatement(true); + node.specifiers = []; + node.source = null; + } else { + // export { x, y as z } [from '...'] + node.declaration = null; + node.specifiers = this.parseExportSpecifiers(); + if (this.eatContextual("from")) { + node.source = this.type === _tokentype.types.string ? this.parseExprAtom() : this.unexpected(); + } else { + // check for keywords used as local names + for (var i = 0; i < node.specifiers.length; i++) { + if (this.keywords.test(node.specifiers[i].local.name) || this.reservedWords.test(node.specifiers[i].local.name)) { + this.unexpected(node.specifiers[i].local.start); + } + } + + node.source = null; + } + this.semicolon(); + } + return this.finishNode(node, "ExportNamedDeclaration"); +}; + +pp.shouldParseExportStatement = function () { + return this.type.keyword; +}; + +// Parses a comma-separated list of module exports. + +pp.parseExportSpecifiers = function () { + var nodes = [], + first = true; + // export { x, y as z } [from '...'] + this.expect(_tokentype.types.braceL); + while (!this.eat(_tokentype.types.braceR)) { + if (!first) { + this.expect(_tokentype.types.comma); + if (this.afterTrailingComma(_tokentype.types.braceR)) break; + } else first = false; + + var node = this.startNode(); + node.local = this.parseIdent(this.type === _tokentype.types._default); + node.exported = this.eatContextual("as") ? this.parseIdent(true) : node.local; + nodes.push(this.finishNode(node, "ExportSpecifier")); + } + return nodes; +}; + +// Parses import declaration. + +pp.parseImport = function (node) { + this.next(); + // import '...' + if (this.type === _tokentype.types.string) { + node.specifiers = empty; + node.source = this.parseExprAtom(); + } else { + node.specifiers = this.parseImportSpecifiers(); + this.expectContextual("from"); + node.source = this.type === _tokentype.types.string ? this.parseExprAtom() : this.unexpected(); + } + this.semicolon(); + return this.finishNode(node, "ImportDeclaration"); +}; + +// Parses a comma-separated list of module imports. + +pp.parseImportSpecifiers = function () { + var nodes = [], + first = true; + if (this.type === _tokentype.types.name) { + // import defaultObj, { x, y as z } from '...' + var node = this.startNode(); + node.local = this.parseIdent(); + this.checkLVal(node.local, true); + nodes.push(this.finishNode(node, "ImportDefaultSpecifier")); + if (!this.eat(_tokentype.types.comma)) return nodes; + } + if (this.type === _tokentype.types.star) { + var node = this.startNode(); + this.next(); + this.expectContextual("as"); + node.local = this.parseIdent(); + this.checkLVal(node.local, true); + nodes.push(this.finishNode(node, "ImportNamespaceSpecifier")); + return nodes; + } + this.expect(_tokentype.types.braceL); + while (!this.eat(_tokentype.types.braceR)) { + if (!first) { + this.expect(_tokentype.types.comma); + if (this.afterTrailingComma(_tokentype.types.braceR)) break; + } else first = false; + + var node = this.startNode(); + node.imported = this.parseIdent(true); + if (this.eatContextual("as")) { + node.local = this.parseIdent(); + } else { + node.local = node.imported; + if (this.isKeyword(node.local.name)) this.unexpected(node.local.start); + if (this.reservedWordsStrict.test(node.local.name)) this.raise(node.local.start, "The keyword '" + node.local.name + "' is reserved"); + } + this.checkLVal(node.local, true); + nodes.push(this.finishNode(node, "ImportSpecifier")); + } + return nodes; +}; + +},{"./state":10,"./tokentype":14,"./whitespace":16}],12:[function(_dereq_,module,exports){ +// The algorithm used to determine whether a regexp can appear at a +// given point in the program is loosely based on sweet.js' approach. +// See https://github.com/mozilla/sweet.js/wiki/design + +"use strict"; + +exports.__esModule = true; + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var _state = _dereq_("./state"); + +var _tokentype = _dereq_("./tokentype"); + +var _whitespace = _dereq_("./whitespace"); + +var TokContext = function TokContext(token, isExpr, preserveSpace, override) { + _classCallCheck(this, TokContext); + + this.token = token; + this.isExpr = !!isExpr; + this.preserveSpace = !!preserveSpace; + this.override = override; +}; + +exports.TokContext = TokContext; +var types = { + b_stat: new TokContext("{", false), + b_expr: new TokContext("{", true), + b_tmpl: new TokContext("${", true), + p_stat: new TokContext("(", false), + p_expr: new TokContext("(", true), + q_tmpl: new TokContext("`", true, true, function (p) { + return p.readTmplToken(); + }), + f_expr: new TokContext("function", true) +}; + +exports.types = types; +var pp = _state.Parser.prototype; + +pp.initialContext = function () { + return [types.b_stat]; +}; + +pp.braceIsBlock = function (prevType) { + if (prevType === _tokentype.types.colon) { + var _parent = this.curContext(); + if (_parent === types.b_stat || _parent === types.b_expr) return !_parent.isExpr; + } + if (prevType === _tokentype.types._return) return _whitespace.lineBreak.test(this.input.slice(this.lastTokEnd, this.start)); + if (prevType === _tokentype.types._else || prevType === _tokentype.types.semi || prevType === _tokentype.types.eof || prevType === _tokentype.types.parenR) return true; + if (prevType == _tokentype.types.braceL) return this.curContext() === types.b_stat; + return !this.exprAllowed; +}; + +pp.updateContext = function (prevType) { + var update = undefined, + type = this.type; + if (type.keyword && prevType == _tokentype.types.dot) this.exprAllowed = false;else if (update = type.updateContext) update.call(this, prevType);else this.exprAllowed = type.beforeExpr; +}; + +// Token-specific context update code + +_tokentype.types.parenR.updateContext = _tokentype.types.braceR.updateContext = function () { + if (this.context.length == 1) { + this.exprAllowed = true; + return; + } + var out = this.context.pop(); + if (out === types.b_stat && this.curContext() === types.f_expr) { + this.context.pop(); + this.exprAllowed = false; + } else if (out === types.b_tmpl) { + this.exprAllowed = true; + } else { + this.exprAllowed = !out.isExpr; + } +}; + +_tokentype.types.braceL.updateContext = function (prevType) { + this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr); + this.exprAllowed = true; +}; + +_tokentype.types.dollarBraceL.updateContext = function () { + this.context.push(types.b_tmpl); + this.exprAllowed = true; +}; + +_tokentype.types.parenL.updateContext = function (prevType) { + var statementParens = prevType === _tokentype.types._if || prevType === _tokentype.types._for || prevType === _tokentype.types._with || prevType === _tokentype.types._while; + this.context.push(statementParens ? types.p_stat : types.p_expr); + this.exprAllowed = true; +}; + +_tokentype.types.incDec.updateContext = function () { + // tokExprAllowed stays unchanged +}; + +_tokentype.types._function.updateContext = function () { + if (this.curContext() !== types.b_stat) this.context.push(types.f_expr); + this.exprAllowed = false; +}; + +_tokentype.types.backQuote.updateContext = function () { + if (this.curContext() === types.q_tmpl) this.context.pop();else this.context.push(types.q_tmpl); + this.exprAllowed = false; +}; + +},{"./state":10,"./tokentype":14,"./whitespace":16}],13:[function(_dereq_,module,exports){ +"use strict"; + +exports.__esModule = true; + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var _identifier = _dereq_("./identifier"); + +var _tokentype = _dereq_("./tokentype"); + +var _state = _dereq_("./state"); + +var _locutil = _dereq_("./locutil"); + +var _whitespace = _dereq_("./whitespace"); + +// Object type used to represent tokens. Note that normally, tokens +// simply exist as properties on the parser object. This is only +// used for the onToken callback and the external tokenizer. + +var Token = function Token(p) { + _classCallCheck(this, Token); + + this.type = p.type; + this.value = p.value; + this.start = p.start; + this.end = p.end; + if (p.options.locations) this.loc = new _locutil.SourceLocation(p, p.startLoc, p.endLoc); + if (p.options.ranges) this.range = [p.start, p.end]; +} + +// ## Tokenizer + +; + +exports.Token = Token; +var pp = _state.Parser.prototype; + +// Are we running under Rhino? +var isRhino = typeof Packages == "object" && Object.prototype.toString.call(Packages) == "[object JavaPackage]"; + +// Move to the next token + +pp.next = function () { + if (this.options.onToken) this.options.onToken(new Token(this)); + + this.lastTokEnd = this.end; + this.lastTokStart = this.start; + this.lastTokEndLoc = this.endLoc; + this.lastTokStartLoc = this.startLoc; + this.nextToken(); +}; + +pp.getToken = function () { + this.next(); + return new Token(this); +}; + +// If we're in an ES6 environment, make parsers iterable +if (typeof Symbol !== "undefined") pp[Symbol.iterator] = function () { + var self = this; + return { next: function next() { + var token = self.getToken(); + return { + done: token.type === _tokentype.types.eof, + value: token + }; + } }; +}; + +// Toggle strict mode. Re-reads the next number or string to please +// pedantic tests (`"use strict"; 010;` should fail). + +pp.setStrict = function (strict) { + this.strict = strict; + if (this.type !== _tokentype.types.num && this.type !== _tokentype.types.string) return; + this.pos = this.start; + if (this.options.locations) { + while (this.pos < this.lineStart) { + this.lineStart = this.input.lastIndexOf("\n", this.lineStart - 2) + 1; + --this.curLine; + } + } + this.nextToken(); +}; + +pp.curContext = function () { + return this.context[this.context.length - 1]; +}; + +// Read a single token, updating the parser object's token-related +// properties. + +pp.nextToken = function () { + var curContext = this.curContext(); + if (!curContext || !curContext.preserveSpace) this.skipSpace(); + + this.start = this.pos; + if (this.options.locations) this.startLoc = this.curPosition(); + if (this.pos >= this.input.length) return this.finishToken(_tokentype.types.eof); + + if (curContext.override) return curContext.override(this);else this.readToken(this.fullCharCodeAtPos()); +}; + +pp.readToken = function (code) { + // Identifier or keyword. '\uXXXX' sequences are allowed in + // identifiers, so '\' also dispatches to that. + if (_identifier.isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) return this.readWord(); + + return this.getTokenFromCode(code); +}; + +pp.fullCharCodeAtPos = function () { + var code = this.input.charCodeAt(this.pos); + if (code <= 0xd7ff || code >= 0xe000) return code; + var next = this.input.charCodeAt(this.pos + 1); + return (code << 10) + next - 0x35fdc00; +}; + +pp.skipBlockComment = function () { + var startLoc = this.options.onComment && this.curPosition(); + var start = this.pos, + end = this.input.indexOf("*/", this.pos += 2); + if (end === -1) this.raise(this.pos - 2, "Unterminated comment"); + this.pos = end + 2; + if (this.options.locations) { + _whitespace.lineBreakG.lastIndex = start; + var match = undefined; + while ((match = _whitespace.lineBreakG.exec(this.input)) && match.index < this.pos) { + ++this.curLine; + this.lineStart = match.index + match[0].length; + } + } + if (this.options.onComment) this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, startLoc, this.curPosition()); +}; + +pp.skipLineComment = function (startSkip) { + var start = this.pos; + var startLoc = this.options.onComment && this.curPosition(); + var ch = this.input.charCodeAt(this.pos += startSkip); + while (this.pos < this.input.length && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233) { + ++this.pos; + ch = this.input.charCodeAt(this.pos); + } + if (this.options.onComment) this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, startLoc, this.curPosition()); +}; + +// Called at the start of the parse and after every token. Skips +// whitespace and comments, and. + +pp.skipSpace = function () { + loop: while (this.pos < this.input.length) { + var ch = this.input.charCodeAt(this.pos); + switch (ch) { + case 32:case 160: + // ' ' + ++this.pos; + break; + case 13: + if (this.input.charCodeAt(this.pos + 1) === 10) { + ++this.pos; + } + case 10:case 8232:case 8233: + ++this.pos; + if (this.options.locations) { + ++this.curLine; + this.lineStart = this.pos; + } + break; + case 47: + // '/' + switch (this.input.charCodeAt(this.pos + 1)) { + case 42: + // '*' + this.skipBlockComment(); + break; + case 47: + this.skipLineComment(2); + break; + default: + break loop; + } + break; + default: + if (ch > 8 && ch < 14 || ch >= 5760 && _whitespace.nonASCIIwhitespace.test(String.fromCharCode(ch))) { + ++this.pos; + } else { + break loop; + } + } + } +}; + +// Called at the end of every token. Sets `end`, `val`, and +// maintains `context` and `exprAllowed`, and skips the space after +// the token, so that the next one's `start` will point at the +// right position. + +pp.finishToken = function (type, val) { + this.end = this.pos; + if (this.options.locations) this.endLoc = this.curPosition(); + var prevType = this.type; + this.type = type; + this.value = val; + + this.updateContext(prevType); +}; + +// ### Token reading + +// This is the function that is called to fetch the next token. It +// is somewhat obscure, because it works in character codes rather +// than characters, and because operator parsing has been inlined +// into it. +// +// All in the name of speed. +// +pp.readToken_dot = function () { + var next = this.input.charCodeAt(this.pos + 1); + if (next >= 48 && next <= 57) return this.readNumber(true); + var next2 = this.input.charCodeAt(this.pos + 2); + if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { + // 46 = dot '.' + this.pos += 3; + return this.finishToken(_tokentype.types.ellipsis); + } else { + ++this.pos; + return this.finishToken(_tokentype.types.dot); + } +}; + +pp.readToken_slash = function () { + // '/' + var next = this.input.charCodeAt(this.pos + 1); + if (this.exprAllowed) { + ++this.pos;return this.readRegexp(); + } + if (next === 61) return this.finishOp(_tokentype.types.assign, 2); + return this.finishOp(_tokentype.types.slash, 1); +}; + +pp.readToken_mult_modulo = function (code) { + // '%*' + var next = this.input.charCodeAt(this.pos + 1); + if (next === 61) return this.finishOp(_tokentype.types.assign, 2); + return this.finishOp(code === 42 ? _tokentype.types.star : _tokentype.types.modulo, 1); +}; + +pp.readToken_pipe_amp = function (code) { + // '|&' + var next = this.input.charCodeAt(this.pos + 1); + if (next === code) return this.finishOp(code === 124 ? _tokentype.types.logicalOR : _tokentype.types.logicalAND, 2); + if (next === 61) return this.finishOp(_tokentype.types.assign, 2); + return this.finishOp(code === 124 ? _tokentype.types.bitwiseOR : _tokentype.types.bitwiseAND, 1); +}; + +pp.readToken_caret = function () { + // '^' + var next = this.input.charCodeAt(this.pos + 1); + if (next === 61) return this.finishOp(_tokentype.types.assign, 2); + return this.finishOp(_tokentype.types.bitwiseXOR, 1); +}; + +pp.readToken_plus_min = function (code) { + // '+-' + var next = this.input.charCodeAt(this.pos + 1); + if (next === code) { + if (next == 45 && this.input.charCodeAt(this.pos + 2) == 62 && _whitespace.lineBreak.test(this.input.slice(this.lastTokEnd, this.pos))) { + // A `-->` line comment + this.skipLineComment(3); + this.skipSpace(); + return this.nextToken(); + } + return this.finishOp(_tokentype.types.incDec, 2); + } + if (next === 61) return this.finishOp(_tokentype.types.assign, 2); + return this.finishOp(_tokentype.types.plusMin, 1); +}; + +pp.readToken_lt_gt = function (code) { + // '<>' + var next = this.input.charCodeAt(this.pos + 1); + var size = 1; + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; + if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(_tokentype.types.assign, size + 1); + return this.finishOp(_tokentype.types.bitShift, size); + } + if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && this.input.charCodeAt(this.pos + 3) == 45) { + if (this.inModule) this.unexpected(); + // `` line comment + this.skipLineComment(3) + this.skipSpace() + return this.nextToken() + } + return this.finishOp(tt.incDec, 2) + } + if (next === 61) return this.finishOp(tt.assign, 2) + return this.finishOp(tt.plusMin, 1) +} + +pp.readToken_lt_gt = function(code) { // '<>' + let next = this.input.charCodeAt(this.pos + 1) + let size = 1 + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2 + if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1) + return this.finishOp(tt.bitShift, size) + } + if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && + this.input.charCodeAt(this.pos + 3) == 45) { + if (this.inModule) this.unexpected() + // ` + +```js +var bodyParser = require('body-parser') +``` + +The `bodyParser` object exposes various factories to create middlewares. All +middlewares will populate the `req.body` property with the parsed body, or an +empty object (`{}`) if there was no body to parse (or an error was returned). + +The various errors returned by this module are described in the +[errors section](#errors). + +### bodyParser.json(options) + +Returns middleware that only parses `json`. This parser accepts any Unicode +encoding of the body and supports automatic inflation of `gzip` and `deflate` +encodings. + +A new `body` object containing the parsed data is populated on the `request` +object after the middleware (i.e. `req.body`). + +#### Options + +The `json` function takes an option `options` object that may contain any of +the following keys: + +##### inflate + +When set to `true`, then deflated (compressed) bodies will be inflated; when +`false`, deflated bodies are rejected. Defaults to `true`. + +##### limit + +Controls the maximum request body size. If this is a number, then the value +specifies the number of bytes; if it is a string, the value is passed to the +[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults +to `'100kb'`. + +##### reviver + +The `reviver` option is passed directly to `JSON.parse` as the second +argument. You can find more information on this argument +[in the MDN documentation about JSON.parse](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#Example.3A_Using_the_reviver_parameter). + +##### strict + +When set to `true`, will only accept arrays and objects; when `false` will +accept anything `JSON.parse` accepts. Defaults to `true`. + +##### type + +The `type` option is used to determine what media type the middleware will +parse. This option can be a function or a string. If a string, `type` option +is passed directly to the [type-is](https://www.npmjs.org/package/type-is#readme) +library and this can be an extension name (like `json`), a mime type (like +`application/json`), or a mime type with a wildcard (like `*/*` or `*/json`). +If a function, the `type` option is called as `fn(req)` and the request is +parsed if it returns a truthy value. Defaults to `application/json`. + +##### verify + +The `verify` option, if supplied, is called as `verify(req, res, buf, encoding)`, +where `buf` is a `Buffer` of the raw request body and `encoding` is the +encoding of the request. The parsing can be aborted by throwing an error. + +### bodyParser.raw(options) + +Returns middleware that parses all bodies as a `Buffer`. This parser +supports automatic inflation of `gzip` and `deflate` encodings. + +A new `body` object containing the parsed data is populated on the `request` +object after the middleware (i.e. `req.body`). This will be a `Buffer` object +of the body. + +#### Options + +The `raw` function takes an option `options` object that may contain any of +the following keys: + +##### inflate + +When set to `true`, then deflated (compressed) bodies will be inflated; when +`false`, deflated bodies are rejected. Defaults to `true`. + +##### limit + +Controls the maximum request body size. If this is a number, then the value +specifies the number of bytes; if it is a string, the value is passed to the +[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults +to `'100kb'`. + +##### type + +The `type` option is used to determine what media type the middleware will +parse. This option can be a function or a string. If a string, `type` option +is passed directly to the [type-is](https://www.npmjs.org/package/type-is#readme) +library and this can be an extension name (like `bin`), a mime type (like +`application/octet-stream`), or a mime type with a wildcard (like `*/*` or +`application/*`). If a function, the `type` option is called as `fn(req)` +and the request is parsed if it returns a truthy value. Defaults to +`application/octet-stream`. + +##### verify + +The `verify` option, if supplied, is called as `verify(req, res, buf, encoding)`, +where `buf` is a `Buffer` of the raw request body and `encoding` is the +encoding of the request. The parsing can be aborted by throwing an error. + +### bodyParser.text(options) + +Returns middleware that parses all bodies as a string. This parser supports +automatic inflation of `gzip` and `deflate` encodings. + +A new `body` string containing the parsed data is populated on the `request` +object after the middleware (i.e. `req.body`). This will be a string of the +body. + +#### Options + +The `text` function takes an option `options` object that may contain any of +the following keys: + +##### defaultCharset + +Specify the default character set for the text content if the charset is not +specified in the `Content-Type` header of the request. Defaults to `utf-8`. + +##### inflate + +When set to `true`, then deflated (compressed) bodies will be inflated; when +`false`, deflated bodies are rejected. Defaults to `true`. + +##### limit + +Controls the maximum request body size. If this is a number, then the value +specifies the number of bytes; if it is a string, the value is passed to the +[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults +to `'100kb'`. + +##### type + +The `type` option is used to determine what media type the middleware will +parse. This option can be a function or a string. If a string, `type` option +is passed directly to the [type-is](https://www.npmjs.org/package/type-is#readme) +library and this can be an extension name (like `txt`), a mime type (like +`text/plain`), or a mime type with a wildcard (like `*/*` or `text/*`). +If a function, the `type` option is called as `fn(req)` and the request is +parsed if it returns a truthy value. Defaults to `text/plain`. + +##### verify + +The `verify` option, if supplied, is called as `verify(req, res, buf, encoding)`, +where `buf` is a `Buffer` of the raw request body and `encoding` is the +encoding of the request. The parsing can be aborted by throwing an error. + +### bodyParser.urlencoded(options) + +Returns middleware that only parses `urlencoded` bodies. This parser accepts +only UTF-8 encoding of the body and supports automatic inflation of `gzip` +and `deflate` encodings. + +A new `body` object containing the parsed data is populated on the `request` +object after the middleware (i.e. `req.body`). This object will contain +key-value pairs, where the value can be a string or array (when `extended` is +`false`), or any type (when `extended` is `true`). + +#### Options + +The `urlencoded` function takes an option `options` object that may contain +any of the following keys: + +##### extended + +The `extended` option allows to choose between parsing the URL-encoded data +with the `querystring` library (when `false`) or the `qs` library (when +`true`). The "extended" syntax allows for rich objects and arrays to be +encoded into the URL-encoded format, allowing for a JSON-like experience +with URL-encoded. For more information, please +[see the qs library](https://www.npmjs.org/package/qs#readme). + +Defaults to `true`, but using the default has been deprecated. Please +research into the difference between `qs` and `querystring` and choose the +appropriate setting. + +##### inflate + +When set to `true`, then deflated (compressed) bodies will be inflated; when +`false`, deflated bodies are rejected. Defaults to `true`. + +##### limit + +Controls the maximum request body size. If this is a number, then the value +specifies the number of bytes; if it is a string, the value is passed to the +[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults +to `'100kb'`. + +##### parameterLimit + +The `parameterLimit` option controls the maximum number of parameters that +are allowed in the URL-encoded data. If a request contains more parameters +than this value, a 413 will be returned to the client. Defaults to `1000`. + +##### type + +The `type` option is used to determine what media type the middleware will +parse. This option can be a function or a string. If a string, `type` option +is passed directly to the [type-is](https://www.npmjs.org/package/type-is#readme) +library and this can be an extension name (like `urlencoded`), a mime type (like +`application/x-www-form-urlencoded`), or a mime type with a wildcard (like +`*/x-www-form-urlencoded`). If a function, the `type` option is called as +`fn(req)` and the request is parsed if it returns a truthy value. Defaults +to `application/x-www-form-urlencoded`. + +##### verify + +The `verify` option, if supplied, is called as `verify(req, res, buf, encoding)`, +where `buf` is a `Buffer` of the raw request body and `encoding` is the +encoding of the request. The parsing can be aborted by throwing an error. + +## Errors + +The middlewares provided by this module create errors depending on the error +condition during parsing. The errors will typically have a `status` property +that contains the suggested HTTP response code and a `body` property containing +the read body, if available. + +The following are the common errors emitted, though any error can come through +for various reasons. + +### content encoding unsupported + +This error will occur when the request had a `Content-Encoding` header that +contained an encoding but the "inflation" option was set to `false`. The +`status` property is set to `415`. + +### request aborted + +This error will occur when the request is aborted by the client before reading +the body has finished. The `received` property will be set to the number of +bytes received before the request was aborted and the `expected` property is +set to the number of expected bytes. The `status` property is set to `400`. + +### request entity too large + +This error will occur when the request body's size is larger than the "limit" +option. The `limit` property will be set to the byte limit and the `length` +property will be set to the request body's length. The `status` property is +set to `413`. + +### request size did not match content length + +This error will occur when the request's length did not match the length from +the `Content-Length` header. This typically occurs when the request is malformed, +typically when the `Content-Length` header was calculated based on characters +instead of bytes. The `status` property is set to `400`. + +### stream encoding should not be set + +This error will occur when something called the `req.setEncoding` method prior +to this middleware. This module operates directly on bytes only and you cannot +call `req.setEncoding` when using this module. The `status` property is set to +`500`. + +### unsupported charset "BOGUS" + +This error will occur when the request had a charset parameter in the +`Content-Type` header, but the `iconv-lite` module does not support it OR the +parser does not support it. The charset is contained in the message as well +as in the `charset` property. The `status` property is set to `415`. + +### unsupported content encoding "bogus" + +This error will occur when the request had a `Content-Encoding` header that +contained an unsupported encoding. The encoding is contained in the message +as well as in the `encoding` property. The `status` property is set to `415`. + +## Examples + +### Express/Connect top-level generic + +This example demonstrates adding a generic JSON and URL-encoded parser as a +top-level middleware, which will parse the bodies of all incoming requests. +This is the simplest setup. + +```js +var express = require('express') +var bodyParser = require('body-parser') + +var app = express() + +// parse application/x-www-form-urlencoded +app.use(bodyParser.urlencoded({ extended: false })) + +// parse application/json +app.use(bodyParser.json()) + +app.use(function (req, res) { + res.setHeader('Content-Type', 'text/plain') + res.write('you posted:\n') + res.end(JSON.stringify(req.body, null, 2)) +}) +``` + +### Express route-specific + +This example demonstrates adding body parsers specifically to the routes that +need them. In general, this is the most recommended way to use body-parser with +Express. + +```js +var express = require('express') +var bodyParser = require('body-parser') + +var app = express() + +// create application/json parser +var jsonParser = bodyParser.json() + +// create application/x-www-form-urlencoded parser +var urlencodedParser = bodyParser.urlencoded({ extended: false }) + +// POST /login gets urlencoded bodies +app.post('/login', urlencodedParser, function (req, res) { + if (!req.body) return res.sendStatus(400) + res.send('welcome, ' + req.body.username) +}) + +// POST /api/users gets JSON bodies +app.post('/api/users', jsonParser, function (req, res) { + if (!req.body) return res.sendStatus(400) + // create user in req.body +}) +``` + +### Change accepted type for parsers + +All the parsers accept a `type` option which allows you to change the +`Content-Type` that the middleware will parse. + +```js +var express = require('express') +var bodyParser = require('body-parser') + +var app = express() + +// parse various different custom JSON types as JSON +app.use(bodyParser.json({ type: 'application/*+json' })) + +// parse some custom thing into a Buffer +app.use(bodyParser.raw({ type: 'application/vnd.custom-type' })) + +// parse an HTML body into a string +app.use(bodyParser.text({ type: 'text/html' })) +``` + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/body-parser.svg +[npm-url]: https://npmjs.org/package/body-parser +[travis-image]: https://img.shields.io/travis/expressjs/body-parser/master.svg +[travis-url]: https://travis-ci.org/expressjs/body-parser +[coveralls-image]: https://img.shields.io/coveralls/expressjs/body-parser/master.svg +[coveralls-url]: https://coveralls.io/r/expressjs/body-parser?branch=master +[downloads-image]: https://img.shields.io/npm/dm/body-parser.svg +[downloads-url]: https://npmjs.org/package/body-parser +[gratipay-image]: https://img.shields.io/gratipay/dougwilson.svg +[gratipay-url]: https://www.gratipay.com/dougwilson/ diff --git a/node_modules/body-parser/index.js b/node_modules/body-parser/index.js new file mode 100644 index 0000000..93c3a1f --- /dev/null +++ b/node_modules/body-parser/index.js @@ -0,0 +1,157 @@ +/*! + * body-parser + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var deprecate = require('depd')('body-parser') + +/** + * Cache of loaded parsers. + * @private + */ + +var parsers = Object.create(null) + +/** + * @typedef Parsers + * @type {function} + * @property {function} json + * @property {function} raw + * @property {function} text + * @property {function} urlencoded + */ + +/** + * Module exports. + * @type {Parsers} + */ + +exports = module.exports = deprecate.function(bodyParser, + 'bodyParser: use individual json/urlencoded middlewares') + +/** + * JSON parser. + * @public + */ + +Object.defineProperty(exports, 'json', { + configurable: true, + enumerable: true, + get: createParserGetter('json') +}) + +/** + * Raw parser. + * @public + */ + +Object.defineProperty(exports, 'raw', { + configurable: true, + enumerable: true, + get: createParserGetter('raw') +}) + +/** + * Text parser. + * @public + */ + +Object.defineProperty(exports, 'text', { + configurable: true, + enumerable: true, + get: createParserGetter('text') +}) + +/** + * URL-encoded parser. + * @public + */ + +Object.defineProperty(exports, 'urlencoded', { + configurable: true, + enumerable: true, + get: createParserGetter('urlencoded') +}) + +/** + * Create a middleware to parse json and urlencoded bodies. + * + * @param {object} [options] + * @return {function} + * @deprecated + * @public + */ + +function bodyParser (options) { + var opts = {} + + // exclude type option + if (options) { + for (var prop in options) { + if (prop !== 'type') { + opts[prop] = options[prop] + } + } + } + + var _urlencoded = exports.urlencoded(opts) + var _json = exports.json(opts) + + return function bodyParser (req, res, next) { + _json(req, res, function (err) { + if (err) return next(err) + _urlencoded(req, res, next) + }) + } +} + +/** + * Create a getter for loading a parser. + * @private + */ + +function createParserGetter (name) { + return function get () { + return loadParser(name) + } +} + +/** + * Load a parser module. + * @private + */ + +function loadParser (parserName) { + var parser = parsers[parserName] + + if (parser !== undefined) { + return parser + } + + // this uses a switch for static require analysis + switch (parserName) { + case 'json': + parser = require('./lib/types/json') + break + case 'raw': + parser = require('./lib/types/raw') + break + case 'text': + parser = require('./lib/types/text') + break + case 'urlencoded': + parser = require('./lib/types/urlencoded') + break + } + + // store to prevent invoking require() + return (parsers[parserName] = parser) +} diff --git a/node_modules/body-parser/lib/read.js b/node_modules/body-parser/lib/read.js new file mode 100644 index 0000000..3c0fe93 --- /dev/null +++ b/node_modules/body-parser/lib/read.js @@ -0,0 +1,188 @@ +/*! + * body-parser + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var createError = require('http-errors') +var getBody = require('raw-body') +var iconv = require('iconv-lite') +var onFinished = require('on-finished') +var zlib = require('zlib') + +/** + * Module exports. + */ + +module.exports = read + +/** + * Read a request into a buffer and parse. + * + * @param {object} req + * @param {object} res + * @param {function} next + * @param {function} parse + * @param {function} debug + * @param {object} [options] + * @api private + */ + +function read (req, res, next, parse, debug, options) { + var length + var opts = options || {} + var stream + + // flag as parsed + req._body = true + + // read options + var encoding = opts.encoding !== null + ? opts.encoding || 'utf-8' + : null + var verify = opts.verify + + try { + // get the content stream + stream = contentstream(req, debug, opts.inflate) + length = stream.length + stream.length = undefined + } catch (err) { + return next(err) + } + + // set raw-body options + opts.length = length + opts.encoding = verify + ? null + : encoding + + // assert charset is supported + if (opts.encoding === null && encoding !== null && !iconv.encodingExists(encoding)) { + return next(createError(415, 'unsupported charset "' + encoding.toUpperCase() + '"', { + charset: encoding.toLowerCase() + })) + } + + // read body + debug('read body') + getBody(stream, opts, function (err, body) { + if (err) { + // default to 400 + setErrorStatus(err, 400) + + // echo back charset + if (err.type === 'encoding.unsupported') { + err = createError(415, 'unsupported charset "' + encoding.toUpperCase() + '"', { + charset: encoding.toLowerCase() + }) + } + + // read off entire request + stream.resume() + onFinished(req, function onfinished () { + next(err) + }) + return + } + + // verify + if (verify) { + try { + debug('verify body') + verify(req, res, body, encoding) + } catch (err) { + // default to 403 + setErrorStatus(err, 403) + next(err) + return + } + } + + // parse + var str + try { + debug('parse body') + str = typeof body !== 'string' && encoding !== null + ? iconv.decode(body, encoding) + : body + req.body = parse(str) + } catch (err) { + err.body = str === undefined + ? body + : str + + // default to 400 + setErrorStatus(err, 400) + + next(err) + return + } + + next() + }) +} + +/** + * Get the content stream of the request. + * + * @param {object} req + * @param {function} debug + * @param {boolean} [inflate=true] + * @return {object} + * @api private + */ + +function contentstream (req, debug, inflate) { + var encoding = (req.headers['content-encoding'] || 'identity').toLowerCase() + var length = req.headers['content-length'] + var stream + + debug('content-encoding "%s"', encoding) + + if (inflate === false && encoding !== 'identity') { + throw createError(415, 'content encoding unsupported') + } + + switch (encoding) { + case 'deflate': + stream = zlib.createInflate() + debug('inflate body') + req.pipe(stream) + break + case 'gzip': + stream = zlib.createGunzip() + debug('gunzip body') + req.pipe(stream) + break + case 'identity': + stream = req + stream.length = length + break + default: + throw createError(415, 'unsupported content encoding "' + encoding + '"', { + encoding: encoding + }) + } + + return stream +} + +/** + * Set a status on an error object, if ones does not exist + * @private + */ + +function setErrorStatus (error, status) { + if (!error.status && !error.statusCode) { + error.status = status + error.statusCode = status + } +} diff --git a/node_modules/body-parser/lib/types/json.js b/node_modules/body-parser/lib/types/json.js new file mode 100644 index 0000000..d0023c7 --- /dev/null +++ b/node_modules/body-parser/lib/types/json.js @@ -0,0 +1,175 @@ +/*! + * body-parser + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var bytes = require('bytes') +var contentType = require('content-type') +var createError = require('http-errors') +var debug = require('debug')('body-parser:json') +var read = require('../read') +var typeis = require('type-is') + +/** + * Module exports. + */ + +module.exports = json + +/** + * RegExp to match the first non-space in a string. + * + * Allowed whitespace is defined in RFC 7159: + * + * ws = *( + * %x20 / ; Space + * %x09 / ; Horizontal tab + * %x0A / ; Line feed or New line + * %x0D ) ; Carriage return + */ + +var FIRST_CHAR_REGEXP = /^[\x20\x09\x0a\x0d]*(.)/ // eslint-disable-line no-control-regex + +/** + * Create a middleware to parse JSON bodies. + * + * @param {object} [options] + * @return {function} + * @public + */ + +function json (options) { + var opts = options || {} + + var limit = typeof opts.limit !== 'number' + ? bytes.parse(opts.limit || '100kb') + : opts.limit + var inflate = opts.inflate !== false + var reviver = opts.reviver + var strict = opts.strict !== false + var type = opts.type || 'application/json' + var verify = opts.verify || false + + if (verify !== false && typeof verify !== 'function') { + throw new TypeError('option verify must be function') + } + + // create the appropriate type checking function + var shouldParse = typeof type !== 'function' + ? typeChecker(type) + : type + + function parse (body) { + if (body.length === 0) { + // special-case empty json body, as it's a common client-side mistake + // TODO: maybe make this configurable or part of "strict" option + return {} + } + + if (strict) { + var first = firstchar(body) + + if (first !== '{' && first !== '[') { + debug('strict violation') + throw new SyntaxError('Unexpected token ' + first) + } + } + + debug('parse json') + return JSON.parse(body, reviver) + } + + return function jsonParser (req, res, next) { + if (req._body) { + debug('body already parsed') + next() + return + } + + req.body = req.body || {} + + // skip requests without bodies + if (!typeis.hasBody(req)) { + debug('skip empty body') + next() + return + } + + debug('content-type %j', req.headers['content-type']) + + // determine if request should be parsed + if (!shouldParse(req)) { + debug('skip parsing') + next() + return + } + + // assert charset per RFC 7159 sec 8.1 + var charset = getCharset(req) || 'utf-8' + if (charset.substr(0, 4) !== 'utf-') { + debug('invalid charset') + next(createError(415, 'unsupported charset "' + charset.toUpperCase() + '"', { + charset: charset + })) + return + } + + // read + read(req, res, next, parse, debug, { + encoding: charset, + inflate: inflate, + limit: limit, + verify: verify + }) + } +} + +/** + * Get the first non-whitespace character in a string. + * + * @param {string} str + * @return {function} + * @api public + */ + +function firstchar (str) { + var match = FIRST_CHAR_REGEXP.exec(str) + return match ? match[1] : '' +} + +/** + * Get the charset of a request. + * + * @param {object} req + * @api private + */ + +function getCharset (req) { + try { + return contentType.parse(req).parameters.charset.toLowerCase() + } catch (e) { + return undefined + } +} + +/** + * Get the simple type checker. + * + * @param {string} type + * @return {function} + */ + +function typeChecker (type) { + return function checkType (req) { + return Boolean(typeis(req, type)) + } +} diff --git a/node_modules/body-parser/lib/types/raw.js b/node_modules/body-parser/lib/types/raw.js new file mode 100644 index 0000000..f5d1b67 --- /dev/null +++ b/node_modules/body-parser/lib/types/raw.js @@ -0,0 +1,101 @@ +/*! + * body-parser + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + */ + +var bytes = require('bytes') +var debug = require('debug')('body-parser:raw') +var read = require('../read') +var typeis = require('type-is') + +/** + * Module exports. + */ + +module.exports = raw + +/** + * Create a middleware to parse raw bodies. + * + * @param {object} [options] + * @return {function} + * @api public + */ + +function raw (options) { + var opts = options || {} + + var inflate = opts.inflate !== false + var limit = typeof opts.limit !== 'number' + ? bytes.parse(opts.limit || '100kb') + : opts.limit + var type = opts.type || 'application/octet-stream' + var verify = opts.verify || false + + if (verify !== false && typeof verify !== 'function') { + throw new TypeError('option verify must be function') + } + + // create the appropriate type checking function + var shouldParse = typeof type !== 'function' + ? typeChecker(type) + : type + + function parse (buf) { + return buf + } + + return function rawParser (req, res, next) { + if (req._body) { + debug('body already parsed') + next() + return + } + + req.body = req.body || {} + + // skip requests without bodies + if (!typeis.hasBody(req)) { + debug('skip empty body') + next() + return + } + + debug('content-type %j', req.headers['content-type']) + + // determine if request should be parsed + if (!shouldParse(req)) { + debug('skip parsing') + next() + return + } + + // read + read(req, res, next, parse, debug, { + encoding: null, + inflate: inflate, + limit: limit, + verify: verify + }) + } +} + +/** + * Get the simple type checker. + * + * @param {string} type + * @return {function} + */ + +function typeChecker (type) { + return function checkType (req) { + return Boolean(typeis(req, type)) + } +} diff --git a/node_modules/body-parser/lib/types/text.js b/node_modules/body-parser/lib/types/text.js new file mode 100644 index 0000000..8bf2637 --- /dev/null +++ b/node_modules/body-parser/lib/types/text.js @@ -0,0 +1,121 @@ +/*! + * body-parser + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + */ + +var bytes = require('bytes') +var contentType = require('content-type') +var debug = require('debug')('body-parser:text') +var read = require('../read') +var typeis = require('type-is') + +/** + * Module exports. + */ + +module.exports = text + +/** + * Create a middleware to parse text bodies. + * + * @param {object} [options] + * @return {function} + * @api public + */ + +function text (options) { + var opts = options || {} + + var defaultCharset = opts.defaultCharset || 'utf-8' + var inflate = opts.inflate !== false + var limit = typeof opts.limit !== 'number' + ? bytes.parse(opts.limit || '100kb') + : opts.limit + var type = opts.type || 'text/plain' + var verify = opts.verify || false + + if (verify !== false && typeof verify !== 'function') { + throw new TypeError('option verify must be function') + } + + // create the appropriate type checking function + var shouldParse = typeof type !== 'function' + ? typeChecker(type) + : type + + function parse (buf) { + return buf + } + + return function textParser (req, res, next) { + if (req._body) { + debug('body already parsed') + next() + return + } + + req.body = req.body || {} + + // skip requests without bodies + if (!typeis.hasBody(req)) { + debug('skip empty body') + next() + return + } + + debug('content-type %j', req.headers['content-type']) + + // determine if request should be parsed + if (!shouldParse(req)) { + debug('skip parsing') + next() + return + } + + // get charset + var charset = getCharset(req) || defaultCharset + + // read + read(req, res, next, parse, debug, { + encoding: charset, + inflate: inflate, + limit: limit, + verify: verify + }) + } +} + +/** + * Get the charset of a request. + * + * @param {object} req + * @api private + */ + +function getCharset (req) { + try { + return contentType.parse(req).parameters.charset.toLowerCase() + } catch (e) { + return undefined + } +} + +/** + * Get the simple type checker. + * + * @param {string} type + * @return {function} + */ + +function typeChecker (type) { + return function checkType (req) { + return Boolean(typeis(req, type)) + } +} diff --git a/node_modules/body-parser/lib/types/urlencoded.js b/node_modules/body-parser/lib/types/urlencoded.js new file mode 100644 index 0000000..08157ae --- /dev/null +++ b/node_modules/body-parser/lib/types/urlencoded.js @@ -0,0 +1,279 @@ +/*! + * body-parser + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var bytes = require('bytes') +var contentType = require('content-type') +var createError = require('http-errors') +var debug = require('debug')('body-parser:urlencoded') +var deprecate = require('depd')('body-parser') +var read = require('../read') +var typeis = require('type-is') + +/** + * Module exports. + */ + +module.exports = urlencoded + +/** + * Cache of parser modules. + */ + +var parsers = Object.create(null) + +/** + * Create a middleware to parse urlencoded bodies. + * + * @param {object} [options] + * @return {function} + * @public + */ + +function urlencoded (options) { + var opts = options || {} + + // notice because option default will flip in next major + if (opts.extended === undefined) { + deprecate('undefined extended: provide extended option') + } + + var extended = opts.extended !== false + var inflate = opts.inflate !== false + var limit = typeof opts.limit !== 'number' + ? bytes.parse(opts.limit || '100kb') + : opts.limit + var type = opts.type || 'application/x-www-form-urlencoded' + var verify = opts.verify || false + + if (verify !== false && typeof verify !== 'function') { + throw new TypeError('option verify must be function') + } + + // create the appropriate query parser + var queryparse = extended + ? extendedparser(opts) + : simpleparser(opts) + + // create the appropriate type checking function + var shouldParse = typeof type !== 'function' + ? typeChecker(type) + : type + + function parse (body) { + return body.length + ? queryparse(body) + : {} + } + + return function urlencodedParser (req, res, next) { + if (req._body) { + debug('body already parsed') + next() + return + } + + req.body = req.body || {} + + // skip requests without bodies + if (!typeis.hasBody(req)) { + debug('skip empty body') + next() + return + } + + debug('content-type %j', req.headers['content-type']) + + // determine if request should be parsed + if (!shouldParse(req)) { + debug('skip parsing') + next() + return + } + + // assert charset + var charset = getCharset(req) || 'utf-8' + if (charset !== 'utf-8') { + debug('invalid charset') + next(createError(415, 'unsupported charset "' + charset.toUpperCase() + '"', { + charset: charset + })) + return + } + + // read + read(req, res, next, parse, debug, { + debug: debug, + encoding: charset, + inflate: inflate, + limit: limit, + verify: verify + }) + } +} + +/** + * Get the extended query parser. + * + * @param {object} options + */ + +function extendedparser (options) { + var parameterLimit = options.parameterLimit !== undefined + ? options.parameterLimit + : 1000 + var parse = parser('qs') + + if (isNaN(parameterLimit) || parameterLimit < 1) { + throw new TypeError('option parameterLimit must be a positive number') + } + + if (isFinite(parameterLimit)) { + parameterLimit = parameterLimit | 0 + } + + return function queryparse (body) { + var paramCount = parameterCount(body, parameterLimit) + + if (paramCount === undefined) { + debug('too many parameters') + throw createError(413, 'too many parameters') + } + + var arrayLimit = Math.max(100, paramCount) + + debug('parse extended urlencoding') + return parse(body, { + allowPrototypes: true, + arrayLimit: arrayLimit, + depth: Infinity, + parameterLimit: parameterLimit + }) + } +} + +/** + * Get the charset of a request. + * + * @param {object} req + * @api private + */ + +function getCharset (req) { + try { + return contentType.parse(req).parameters.charset.toLowerCase() + } catch (e) { + return undefined + } +} + +/** + * Count the number of parameters, stopping once limit reached + * + * @param {string} body + * @param {number} limit + * @api private + */ + +function parameterCount (body, limit) { + var count = 0 + var index = 0 + + while ((index = body.indexOf('&', index)) !== -1) { + count++ + index++ + + if (count === limit) { + return undefined + } + } + + return count +} + +/** + * Get parser for module name dynamically. + * + * @param {string} name + * @return {function} + * @api private + */ + +function parser (name) { + var mod = parsers[name] + + if (mod !== undefined) { + return mod.parse + } + + // this uses a switch for static require analysis + switch (name) { + case 'qs': + mod = require('qs') + break + case 'querystring': + mod = require('querystring') + break + } + + // store to prevent invoking require() + parsers[name] = mod + + return mod.parse +} + +/** + * Get the simple query parser. + * + * @param {object} options + */ + +function simpleparser (options) { + var parameterLimit = options.parameterLimit !== undefined + ? options.parameterLimit + : 1000 + var parse = parser('querystring') + + if (isNaN(parameterLimit) || parameterLimit < 1) { + throw new TypeError('option parameterLimit must be a positive number') + } + + if (isFinite(parameterLimit)) { + parameterLimit = parameterLimit | 0 + } + + return function queryparse (body) { + var paramCount = parameterCount(body, parameterLimit) + + if (paramCount === undefined) { + debug('too many parameters') + throw createError(413, 'too many parameters') + } + + debug('parse urlencoding') + return parse(body, undefined, undefined, {maxKeys: parameterLimit}) + } +} + +/** + * Get the simple type checker. + * + * @param {string} type + * @return {function} + */ + +function typeChecker (type) { + return function checkType (req) { + return Boolean(typeis(req, type)) + } +} diff --git a/node_modules/body-parser/node_modules/debug/.coveralls.yml b/node_modules/body-parser/node_modules/debug/.coveralls.yml new file mode 100644 index 0000000..20a7068 --- /dev/null +++ b/node_modules/body-parser/node_modules/debug/.coveralls.yml @@ -0,0 +1 @@ +repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve diff --git a/node_modules/body-parser/node_modules/debug/.eslintrc b/node_modules/body-parser/node_modules/debug/.eslintrc new file mode 100644 index 0000000..8a37ae2 --- /dev/null +++ b/node_modules/body-parser/node_modules/debug/.eslintrc @@ -0,0 +1,11 @@ +{ + "env": { + "browser": true, + "node": true + }, + "rules": { + "no-console": 0, + "no-empty": [1, { "allowEmptyCatch": true }] + }, + "extends": "eslint:recommended" +} diff --git a/node_modules/body-parser/node_modules/debug/.npmignore b/node_modules/body-parser/node_modules/debug/.npmignore new file mode 100644 index 0000000..db2fbb9 --- /dev/null +++ b/node_modules/body-parser/node_modules/debug/.npmignore @@ -0,0 +1,8 @@ +support +test +examples +example +*.sock +dist +yarn.lock +coverage diff --git a/node_modules/body-parser/node_modules/debug/.travis.yml b/node_modules/body-parser/node_modules/debug/.travis.yml new file mode 100644 index 0000000..6c6090c --- /dev/null +++ b/node_modules/body-parser/node_modules/debug/.travis.yml @@ -0,0 +1,14 @@ + +language: node_js +node_js: + - "6" + - "5" + - "4" + +install: + - make node_modules + +script: + - make lint + - make test + - make coveralls diff --git a/node_modules/body-parser/node_modules/debug/CHANGELOG.md b/node_modules/body-parser/node_modules/debug/CHANGELOG.md new file mode 100644 index 0000000..99abf97 --- /dev/null +++ b/node_modules/body-parser/node_modules/debug/CHANGELOG.md @@ -0,0 +1,316 @@ +2.6.1 / 2017-02-10 +================== + + * Fix: Module's `export default` syntax fix for IE8 `Expected identifier` error + * Fix: Whitelist DEBUG_FD for values 1 and 2 only (#415, @pi0) + * Fix: IE8 "Expected identifier" error (#414, @vgoma) + * Fix: Namespaces would not disable once enabled (#409, @musikov) + +2.6.0 / 2016-12-28 +================== + + * Fix: added better null pointer checks for browser useColors (@thebigredgeek) + * Improvement: removed explicit `window.debug` export (#404, @tootallnate) + * Improvement: deprecated `DEBUG_FD` environment variable (#405, @tootallnate) + +2.5.2 / 2016-12-25 +================== + + * Fix: reference error on window within webworkers (#393, @KlausTrainer) + * Docs: fixed README typo (#391, @lurch) + * Docs: added notice about v3 api discussion (@thebigredgeek) + +2.5.1 / 2016-12-20 +================== + + * Fix: babel-core compatibility + +2.5.0 / 2016-12-20 +================== + + * Fix: wrong reference in bower file (@thebigredgeek) + * Fix: webworker compatibility (@thebigredgeek) + * Fix: output formatting issue (#388, @kribblo) + * Fix: babel-loader compatibility (#383, @escwald) + * Misc: removed built asset from repo and publications (@thebigredgeek) + * Misc: moved source files to /src (#378, @yamikuronue) + * Test: added karma integration and replaced babel with browserify for browser tests (#378, @yamikuronue) + * Test: coveralls integration (#378, @yamikuronue) + * Docs: simplified language in the opening paragraph (#373, @yamikuronue) + +2.4.5 / 2016-12-17 +================== + + * Fix: `navigator` undefined in Rhino (#376, @jochenberger) + * Fix: custom log function (#379, @hsiliev) + * Improvement: bit of cleanup + linting fixes (@thebigredgeek) + * Improvement: rm non-maintainted `dist/` dir (#375, @freewil) + * Docs: simplified language in the opening paragraph. (#373, @yamikuronue) + +2.4.4 / 2016-12-14 +================== + + * Fix: work around debug being loaded in preload scripts for electron (#368, @paulcbetts) + +2.4.3 / 2016-12-14 +================== + + * Fix: navigation.userAgent error for react native (#364, @escwald) + +2.4.2 / 2016-12-14 +================== + + * Fix: browser colors (#367, @tootallnate) + * Misc: travis ci integration (@thebigredgeek) + * Misc: added linting and testing boilerplate with sanity check (@thebigredgeek) + +2.4.1 / 2016-12-13 +================== + + * Fix: typo that broke the package (#356) + +2.4.0 / 2016-12-13 +================== + + * Fix: bower.json references unbuilt src entry point (#342, @justmatt) + * Fix: revert "handle regex special characters" (@tootallnate) + * Feature: configurable util.inspect()`options for NodeJS (#327, @tootallnate) + * Feature: %O`(big O) pretty-prints objects (#322, @tootallnate) + * Improvement: allow colors in workers (#335, @botverse) + * Improvement: use same color for same namespace. (#338, @lchenay) + +2.3.3 / 2016-11-09 +================== + + * Fix: Catch `JSON.stringify()` errors (#195, Jovan Alleyne) + * Fix: Returning `localStorage` saved values (#331, Levi Thomason) + * Improvement: Don't create an empty object when no `process` (Nathan Rajlich) + +2.3.2 / 2016-11-09 +================== + + * Fix: be super-safe in index.js as well (@TooTallNate) + * Fix: should check whether process exists (Tom Newby) + +2.3.1 / 2016-11-09 +================== + + * Fix: Added electron compatibility (#324, @paulcbetts) + * Improvement: Added performance optimizations (@tootallnate) + * Readme: Corrected PowerShell environment variable example (#252, @gimre) + * Misc: Removed yarn lock file from source control (#321, @fengmk2) + +2.3.0 / 2016-11-07 +================== + + * Fix: Consistent placement of ms diff at end of output (#215, @gorangajic) + * Fix: Escaping of regex special characters in namespace strings (#250, @zacronos) + * Fix: Fixed bug causing crash on react-native (#282, @vkarpov15) + * Feature: Enabled ES6+ compatible import via default export (#212 @bucaran) + * Feature: Added %O formatter to reflect Chrome's console.log capability (#279, @oncletom) + * Package: Update "ms" to 0.7.2 (#315, @DevSide) + * Package: removed superfluous version property from bower.json (#207 @kkirsche) + * Readme: fix USE_COLORS to DEBUG_COLORS + * Readme: Doc fixes for format string sugar (#269, @mlucool) + * Readme: Updated docs for DEBUG_FD and DEBUG_COLORS environment variables (#232, @mattlyons0) + * Readme: doc fixes for PowerShell (#271 #243, @exoticknight @unreadable) + * Readme: better docs for browser support (#224, @matthewmueller) + * Tooling: Added yarn integration for development (#317, @thebigredgeek) + * Misc: Renamed History.md to CHANGELOG.md (@thebigredgeek) + * Misc: Added license file (#226 #274, @CantemoInternal @sdaitzman) + * Misc: Updated contributors (@thebigredgeek) + +2.2.0 / 2015-05-09 +================== + + * package: update "ms" to v0.7.1 (#202, @dougwilson) + * README: add logging to file example (#193, @DanielOchoa) + * README: fixed a typo (#191, @amir-s) + * browser: expose `storage` (#190, @stephenmathieson) + * Makefile: add a `distclean` target (#189, @stephenmathieson) + +2.1.3 / 2015-03-13 +================== + + * Updated stdout/stderr example (#186) + * Updated example/stdout.js to match debug current behaviour + * Renamed example/stderr.js to stdout.js + * Update Readme.md (#184) + * replace high intensity foreground color for bold (#182, #183) + +2.1.2 / 2015-03-01 +================== + + * dist: recompile + * update "ms" to v0.7.0 + * package: update "browserify" to v9.0.3 + * component: fix "ms.js" repo location + * changed bower package name + * updated documentation about using debug in a browser + * fix: security error on safari (#167, #168, @yields) + +2.1.1 / 2014-12-29 +================== + + * browser: use `typeof` to check for `console` existence + * browser: check for `console.log` truthiness (fix IE 8/9) + * browser: add support for Chrome apps + * Readme: added Windows usage remarks + * Add `bower.json` to properly support bower install + +2.1.0 / 2014-10-15 +================== + + * node: implement `DEBUG_FD` env variable support + * package: update "browserify" to v6.1.0 + * package: add "license" field to package.json (#135, @panuhorsmalahti) + +2.0.0 / 2014-09-01 +================== + + * package: update "browserify" to v5.11.0 + * node: use stderr rather than stdout for logging (#29, @stephenmathieson) + +1.0.4 / 2014-07-15 +================== + + * dist: recompile + * example: remove `console.info()` log usage + * example: add "Content-Type" UTF-8 header to browser example + * browser: place %c marker after the space character + * browser: reset the "content" color via `color: inherit` + * browser: add colors support for Firefox >= v31 + * debug: prefer an instance `log()` function over the global one (#119) + * Readme: update documentation about styled console logs for FF v31 (#116, @wryk) + +1.0.3 / 2014-07-09 +================== + + * Add support for multiple wildcards in namespaces (#122, @seegno) + * browser: fix lint + +1.0.2 / 2014-06-10 +================== + + * browser: update color palette (#113, @gscottolson) + * common: make console logging function configurable (#108, @timoxley) + * node: fix %o colors on old node <= 0.8.x + * Makefile: find node path using shell/which (#109, @timoxley) + +1.0.1 / 2014-06-06 +================== + + * browser: use `removeItem()` to clear localStorage + * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777) + * package: add "contributors" section + * node: fix comment typo + * README: list authors + +1.0.0 / 2014-06-04 +================== + + * make ms diff be global, not be scope + * debug: ignore empty strings in enable() + * node: make DEBUG_COLORS able to disable coloring + * *: export the `colors` array + * npmignore: don't publish the `dist` dir + * Makefile: refactor to use browserify + * package: add "browserify" as a dev dependency + * Readme: add Web Inspector Colors section + * node: reset terminal color for the debug content + * node: map "%o" to `util.inspect()` + * browser: map "%j" to `JSON.stringify()` + * debug: add custom "formatters" + * debug: use "ms" module for humanizing the diff + * Readme: add "bash" syntax highlighting + * browser: add Firebug color support + * browser: add colors for WebKit browsers + * node: apply log to `console` + * rewrite: abstract common logic for Node & browsers + * add .jshintrc file + +0.8.1 / 2014-04-14 +================== + + * package: re-add the "component" section + +0.8.0 / 2014-03-30 +================== + + * add `enable()` method for nodejs. Closes #27 + * change from stderr to stdout + * remove unnecessary index.js file + +0.7.4 / 2013-11-13 +================== + + * remove "browserify" key from package.json (fixes something in browserify) + +0.7.3 / 2013-10-30 +================== + + * fix: catch localStorage security error when cookies are blocked (Chrome) + * add debug(err) support. Closes #46 + * add .browser prop to package.json. Closes #42 + +0.7.2 / 2013-02-06 +================== + + * fix package.json + * fix: Mobile Safari (private mode) is broken with debug + * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript + +0.7.1 / 2013-02-05 +================== + + * add repository URL to package.json + * add DEBUG_COLORED to force colored output + * add browserify support + * fix component. Closes #24 + +0.7.0 / 2012-05-04 +================== + + * Added .component to package.json + * Added debug.component.js build + +0.6.0 / 2012-03-16 +================== + + * Added support for "-" prefix in DEBUG [Vinay Pulim] + * Added `.enabled` flag to the node version [TooTallNate] + +0.5.0 / 2012-02-02 +================== + + * Added: humanize diffs. Closes #8 + * Added `debug.disable()` to the CS variant + * Removed padding. Closes #10 + * Fixed: persist client-side variant again. Closes #9 + +0.4.0 / 2012-02-01 +================== + + * Added browser variant support for older browsers [TooTallNate] + * Added `debug.enable('project:*')` to browser variant [TooTallNate] + * Added padding to diff (moved it to the right) + +0.3.0 / 2012-01-26 +================== + + * Added millisecond diff when isatty, otherwise UTC string + +0.2.0 / 2012-01-22 +================== + + * Added wildcard support + +0.1.0 / 2011-12-02 +================== + + * Added: remove colors unless stderr isatty [TooTallNate] + +0.0.1 / 2010-01-03 +================== + + * Initial release diff --git a/node_modules/body-parser/node_modules/debug/LICENSE b/node_modules/body-parser/node_modules/debug/LICENSE new file mode 100644 index 0000000..658c933 --- /dev/null +++ b/node_modules/body-parser/node_modules/debug/LICENSE @@ -0,0 +1,19 @@ +(The MIT License) + +Copyright (c) 2014 TJ Holowaychuk + +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. + diff --git a/node_modules/body-parser/node_modules/debug/Makefile b/node_modules/body-parser/node_modules/debug/Makefile new file mode 100644 index 0000000..584da8b --- /dev/null +++ b/node_modules/body-parser/node_modules/debug/Makefile @@ -0,0 +1,50 @@ +# get Makefile directory name: http://stackoverflow.com/a/5982798/376773 +THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) +THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd) + +# BIN directory +BIN := $(THIS_DIR)/node_modules/.bin + +# Path +PATH := node_modules/.bin:$(PATH) +SHELL := /bin/bash + +# applications +NODE ?= $(shell which node) +YARN ?= $(shell which yarn) +PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm)) +BROWSERIFY ?= $(NODE) $(BIN)/browserify + +.FORCE: + +install: node_modules + +node_modules: package.json + @NODE_ENV= $(PKG) install + @touch node_modules + +lint: .FORCE + eslint browser.js debug.js index.js node.js + +test-node: .FORCE + istanbul cover node_modules/mocha/bin/_mocha -- test/**.js + +test-browser: .FORCE + mkdir -p dist + + @$(BROWSERIFY) \ + --standalone debug \ + . > dist/debug.js + + karma start --single-run + rimraf dist + +test: .FORCE + concurrently \ + "make test-node" \ + "make test-browser" + +coveralls: + cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js + +.PHONY: all install clean distclean diff --git a/node_modules/body-parser/node_modules/debug/README.md b/node_modules/body-parser/node_modules/debug/README.md new file mode 100644 index 0000000..2c57ddf --- /dev/null +++ b/node_modules/body-parser/node_modules/debug/README.md @@ -0,0 +1,238 @@ +# debug +[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) + +A tiny node.js debugging utility modelled after node core's debugging technique. + +**Discussion around the V3 API is under way [here](https://github.com/visionmedia/debug/issues/370)** + +## Installation + +```bash +$ npm install debug +``` + +## Usage + +`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole. + +Example _app.js_: + +```js +var debug = require('debug')('http') + , http = require('http') + , name = 'My App'; + +// fake app + +debug('booting %s', name); + +http.createServer(function(req, res){ + debug(req.method + ' ' + req.url); + res.end('hello\n'); +}).listen(3000, function(){ + debug('listening'); +}); + +// fake worker of some kind + +require('./worker'); +``` + +Example _worker.js_: + +```js +var debug = require('debug')('worker'); + +setInterval(function(){ + debug('doing some work'); +}, 1000); +``` + + The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples: + + ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png) + + ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png) + +#### Windows note + + On Windows the environment variable is set using the `set` command. + + ```cmd + set DEBUG=*,-not_this + ``` + + Note that PowerShell uses different syntax to set environment variables. + + ```cmd + $env:DEBUG = "*,-not_this" + ``` + +Then, run the program to be debugged as usual. + +## Millisecond diff + + When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. + + ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png) + + When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below: + + ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png) + +## Conventions + + If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". + +## Wildcards + + The `*` character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. + + You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=*,-connect:*` would include all debuggers except those starting with "connect:". + +## Environment Variables + + When running through Node.js, you can set a few environment variables that will + change the behavior of the debug logging: + +| Name | Purpose | +|-----------|-------------------------------------------------| +| `DEBUG` | Enables/disabled specific debugging namespaces. | +| `DEBUG_COLORS`| Whether or not to use colors in the debug output. | +| `DEBUG_DEPTH` | Object inspection depth. | +| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. | + + + __Note:__ The environment variables beginning with `DEBUG_` end up being + converted into an Options object that gets used with `%o`/`%O` formatters. + See the Node.js documentation for + [`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options) + for the complete list. + +## Formatters + + + Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. Below are the officially supported formatters: + +| Formatter | Representation | +|-----------|----------------| +| `%O` | Pretty-print an Object on multiple lines. | +| `%o` | Pretty-print an Object all on a single line. | +| `%s` | String. | +| `%d` | Number (both integer and float). | +| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. | +| `%%` | Single percent sign ('%'). This does not consume an argument. | + +### Custom formatters + + You can add custom formatters by extending the `debug.formatters` object. For example, if you wanted to add support for rendering a Buffer as hex with `%h`, you could do something like: + +```js +const createDebug = require('debug') +createDebug.formatters.h = (v) => { + return v.toString('hex') +} + +// …elsewhere +const debug = createDebug('foo') +debug('this is hex: %h', new Buffer('hello world')) +// foo this is hex: 68656c6c6f20776f726c6421 +0ms +``` + +## Browser support + You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify), + or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest), + if you don't want to build it yourself. + + Debug's enable state is currently persisted by `localStorage`. + Consider the situation shown below where you have `worker:a` and `worker:b`, + and wish to debug both. You can enable this using `localStorage.debug`: + +```js +localStorage.debug = 'worker:*' +``` + +And then refresh the page. + +```js +a = debug('worker:a'); +b = debug('worker:b'); + +setInterval(function(){ + a('doing some work'); +}, 1000); + +setInterval(function(){ + b('doing some work'); +}, 1200); +``` + +#### Web Inspector Colors + + Colors are also enabled on "Web Inspectors" that understand the `%c` formatting + option. These are WebKit web inspectors, Firefox ([since version + 31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/)) + and the Firebug plugin for Firefox (any version). + + Colored output looks something like: + + ![](https://cloud.githubusercontent.com/assets/71256/3139768/b98c5fd8-e8ef-11e3-862a-f7253b6f47c6.png) + + +## Output streams + + By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method: + +Example _stdout.js_: + +```js +var debug = require('debug'); +var error = debug('app:error'); + +// by default stderr is used +error('goes to stderr!'); + +var log = debug('app:log'); +// set this namespace to log via console.log +log.log = console.log.bind(console); // don't forget to bind to console! +log('goes to stdout'); +error('still goes to stderr!'); + +// set all output to go via console.info +// overrides all per-namespace log settings +debug.log = console.info.bind(console); +error('now goes to stdout via console.info'); +log('still goes to stdout, but via console.info now'); +``` + + +## Authors + + - TJ Holowaychuk + - Nathan Rajlich + - Andrew Rhyne + +## License + +(The MIT License) + +Copyright (c) 2014-2016 TJ Holowaychuk <tj@vision-media.ca> + +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. diff --git a/node_modules/body-parser/node_modules/debug/bower.json b/node_modules/body-parser/node_modules/debug/bower.json new file mode 100644 index 0000000..027804c --- /dev/null +++ b/node_modules/body-parser/node_modules/debug/bower.json @@ -0,0 +1,29 @@ +{ + "name": "visionmedia-debug", + "main": "./src/browser.js", + "homepage": "https://github.com/visionmedia/debug", + "authors": [ + "TJ Holowaychuk ", + "Nathan Rajlich (http://n8.io)", + "Andrew Rhyne " + ], + "description": "visionmedia-debug", + "moduleType": [ + "amd", + "es6", + "globals", + "node" + ], + "keywords": [ + "visionmedia", + "debug" + ], + "license": "MIT", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ] +} diff --git a/node_modules/body-parser/node_modules/debug/component.json b/node_modules/body-parser/node_modules/debug/component.json new file mode 100644 index 0000000..4861027 --- /dev/null +++ b/node_modules/body-parser/node_modules/debug/component.json @@ -0,0 +1,19 @@ +{ + "name": "debug", + "repo": "visionmedia/debug", + "description": "small debugging utility", + "version": "2.6.1", + "keywords": [ + "debug", + "log", + "debugger" + ], + "main": "src/browser.js", + "scripts": [ + "src/browser.js", + "src/debug.js" + ], + "dependencies": { + "rauchg/ms.js": "0.7.1" + } +} diff --git a/node_modules/body-parser/node_modules/debug/karma.conf.js b/node_modules/body-parser/node_modules/debug/karma.conf.js new file mode 100644 index 0000000..103a82d --- /dev/null +++ b/node_modules/body-parser/node_modules/debug/karma.conf.js @@ -0,0 +1,70 @@ +// Karma configuration +// Generated on Fri Dec 16 2016 13:09:51 GMT+0000 (UTC) + +module.exports = function(config) { + config.set({ + + // base path that will be used to resolve all patterns (eg. files, exclude) + basePath: '', + + + // frameworks to use + // available frameworks: https://npmjs.org/browse/keyword/karma-adapter + frameworks: ['mocha', 'chai', 'sinon'], + + + // list of files / patterns to load in the browser + files: [ + 'dist/debug.js', + 'test/*spec.js' + ], + + + // list of files to exclude + exclude: [ + 'src/node.js' + ], + + + // preprocess matching files before serving them to the browser + // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor + preprocessors: { + }, + + // test results reporter to use + // possible values: 'dots', 'progress' + // available reporters: https://npmjs.org/browse/keyword/karma-reporter + reporters: ['progress'], + + + // web server port + port: 9876, + + + // enable / disable colors in the output (reporters and logs) + colors: true, + + + // level of logging + // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG + logLevel: config.LOG_INFO, + + + // enable / disable watching file and executing tests whenever any file changes + autoWatch: true, + + + // start these browsers + // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher + browsers: ['PhantomJS'], + + + // Continuous Integration mode + // if true, Karma captures browsers, runs the tests and exits + singleRun: false, + + // Concurrency level + // how many browser should be started simultaneous + concurrency: Infinity + }) +} diff --git a/node_modules/body-parser/node_modules/debug/node.js b/node_modules/body-parser/node_modules/debug/node.js new file mode 100644 index 0000000..7fc36fe --- /dev/null +++ b/node_modules/body-parser/node_modules/debug/node.js @@ -0,0 +1 @@ +module.exports = require('./src/node'); diff --git a/node_modules/body-parser/node_modules/debug/package.json b/node_modules/body-parser/node_modules/debug/package.json new file mode 100644 index 0000000..f10846a --- /dev/null +++ b/node_modules/body-parser/node_modules/debug/package.json @@ -0,0 +1,124 @@ +{ + "_args": [ + [ + { + "raw": "debug@2.6.1", + "scope": null, + "escapedName": "debug", + "name": "debug", + "rawSpec": "2.6.1", + "spec": "2.6.1", + "type": "version" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/body-parser" + ] + ], + "_from": "debug@2.6.1", + "_id": "debug@2.6.1", + "_inCache": true, + "_location": "/body-parser/debug", + "_nodeVersion": "6.9.0", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/debug-2.6.1.tgz_1486753226738_0.07569954148493707" + }, + "_npmUser": { + "name": "thebigredgeek", + "email": "rhyneandrew@gmail.com" + }, + "_npmVersion": "4.0.3", + "_phantomChildren": {}, + "_requested": { + "raw": "debug@2.6.1", + "scope": null, + "escapedName": "debug", + "name": "debug", + "rawSpec": "2.6.1", + "spec": "2.6.1", + "type": "version" + }, + "_requiredBy": [ + "/body-parser" + ], + "_resolved": "https://registry.npmjs.org/debug/-/debug-2.6.1.tgz", + "_shasum": "79855090ba2c4e3115cc7d8769491d58f0491351", + "_shrinkwrap": null, + "_spec": "debug@2.6.1", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/body-parser", + "author": { + "name": "TJ Holowaychuk", + "email": "tj@vision-media.ca" + }, + "browser": "./src/browser.js", + "bugs": { + "url": "https://github.com/visionmedia/debug/issues" + }, + "component": { + "scripts": { + "debug/index.js": "browser.js", + "debug/debug.js": "debug.js" + } + }, + "contributors": [ + { + "name": "Nathan Rajlich", + "email": "nathan@tootallnate.net", + "url": "http://n8.io" + }, + { + "name": "Andrew Rhyne", + "email": "rhyneandrew@gmail.com" + } + ], + "dependencies": { + "ms": "0.7.2" + }, + "description": "small debugging utility", + "devDependencies": { + "browserify": "9.0.3", + "chai": "^3.5.0", + "concurrently": "^3.1.0", + "coveralls": "^2.11.15", + "eslint": "^3.12.1", + "istanbul": "^0.4.5", + "karma": "^1.3.0", + "karma-chai": "^0.1.0", + "karma-mocha": "^1.3.0", + "karma-phantomjs-launcher": "^1.0.2", + "karma-sinon": "^1.0.5", + "mocha": "^3.2.0", + "mocha-lcov-reporter": "^1.2.0", + "rimraf": "^2.5.4", + "sinon": "^1.17.6", + "sinon-chai": "^2.8.0" + }, + "directories": {}, + "dist": { + "shasum": "79855090ba2c4e3115cc7d8769491d58f0491351", + "tarball": "https://registry.npmjs.org/debug/-/debug-2.6.1.tgz" + }, + "gitHead": "941653e3334e9e3e2cca87cad9bbf6c5cb245215", + "homepage": "https://github.com/visionmedia/debug#readme", + "keywords": [ + "debug", + "log", + "debugger" + ], + "license": "MIT", + "main": "./src/index.js", + "maintainers": [ + { + "name": "thebigredgeek", + "email": "rhyneandrew@gmail.com" + } + ], + "name": "debug", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/visionmedia/debug.git" + }, + "scripts": {}, + "version": "2.6.1" +} diff --git a/node_modules/body-parser/node_modules/debug/src/browser.js b/node_modules/body-parser/node_modules/debug/src/browser.js new file mode 100644 index 0000000..38d6391 --- /dev/null +++ b/node_modules/body-parser/node_modules/debug/src/browser.js @@ -0,0 +1,182 @@ +/** + * This is the web browser implementation of `debug()`. + * + * Expose `debug()` as the module. + */ + +exports = module.exports = require('./debug'); +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.storage = 'undefined' != typeof chrome + && 'undefined' != typeof chrome.storage + ? chrome.storage.local + : localstorage(); + +/** + * Colors. + */ + +exports.colors = [ + 'lightseagreen', + 'forestgreen', + 'goldenrod', + 'dodgerblue', + 'darkorchid', + 'crimson' +]; + +/** + * Currently only WebKit-based Web Inspectors, Firefox >= v31, + * and the Firebug extension (any Firefox version) are known + * to support "%c" CSS customizations. + * + * TODO: add a `localStorage` variable to explicitly enable/disable colors + */ + +function useColors() { + // NB: In an Electron preload script, document will be defined but not fully + // initialized. Since we know we're in Chrome, we'll just detect this case + // explicitly + if (typeof window !== 'undefined' && window && typeof window.process !== 'undefined' && window.process.type === 'renderer') { + return true; + } + + // is webkit? http://stackoverflow.com/a/16459606/376773 + // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 + return (typeof document !== 'undefined' && document && 'WebkitAppearance' in document.documentElement.style) || + // is firebug? http://stackoverflow.com/a/398120/376773 + (typeof window !== 'undefined' && window && window.console && (console.firebug || (console.exception && console.table))) || + // is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || + // double check webkit in userAgent just in case we are in a worker + (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); +} + +/** + * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. + */ + +exports.formatters.j = function(v) { + try { + return JSON.stringify(v); + } catch (err) { + return '[UnexpectedJSONParseError]: ' + err.message; + } +}; + + +/** + * Colorize log arguments if enabled. + * + * @api public + */ + +function formatArgs(args) { + var useColors = this.useColors; + + args[0] = (useColors ? '%c' : '') + + this.namespace + + (useColors ? ' %c' : ' ') + + args[0] + + (useColors ? '%c ' : ' ') + + '+' + exports.humanize(this.diff); + + if (!useColors) return; + + var c = 'color: ' + this.color; + args.splice(1, 0, c, 'color: inherit') + + // the final "%c" is somewhat tricky, because there could be other + // arguments passed either before or after the %c, so we need to + // figure out the correct index to insert the CSS into + var index = 0; + var lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, function(match) { + if ('%%' === match) return; + index++; + if ('%c' === match) { + // we only are interested in the *last* %c + // (the user may have provided their own) + lastC = index; + } + }); + + args.splice(lastC, 0, c); +} + +/** + * Invokes `console.log()` when available. + * No-op when `console.log` is not a "function". + * + * @api public + */ + +function log() { + // this hackery is required for IE8/9, where + // the `console.log` function doesn't have 'apply' + return 'object' === typeof console + && console.log + && Function.prototype.apply.call(console.log, console, arguments); +} + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ + +function save(namespaces) { + try { + if (null == namespaces) { + exports.storage.removeItem('debug'); + } else { + exports.storage.debug = namespaces; + } + } catch(e) {} +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + +function load() { + try { + return exports.storage.debug; + } catch(e) {} + + // If debug isn't set in LS, and we're in Electron, try to load $DEBUG + if (typeof process !== 'undefined' && 'env' in process) { + return process.env.DEBUG; + } +} + +/** + * Enable namespaces listed in `localStorage.debug` initially. + */ + +exports.enable(load()); + +/** + * Localstorage attempts to return the localstorage. + * + * This is necessary because safari throws + * when a user disables cookies/localstorage + * and you attempt to access it. + * + * @return {LocalStorage} + * @api private + */ + +function localstorage() { + try { + return window.localStorage; + } catch (e) {} +} diff --git a/node_modules/body-parser/node_modules/debug/src/debug.js b/node_modules/body-parser/node_modules/debug/src/debug.js new file mode 100644 index 0000000..d5d6d16 --- /dev/null +++ b/node_modules/body-parser/node_modules/debug/src/debug.js @@ -0,0 +1,202 @@ + +/** + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + * + * Expose `debug()` as the module. + */ + +exports = module.exports = createDebug.debug = createDebug['default'] = createDebug; +exports.coerce = coerce; +exports.disable = disable; +exports.enable = enable; +exports.enabled = enabled; +exports.humanize = require('ms'); + +/** + * The currently active debug mode names, and names to skip. + */ + +exports.names = []; +exports.skips = []; + +/** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". + */ + +exports.formatters = {}; + +/** + * Previous log timestamp. + */ + +var prevTime; + +/** + * Select a color. + * @param {String} namespace + * @return {Number} + * @api private + */ + +function selectColor(namespace) { + var hash = 0, i; + + for (i in namespace) { + hash = ((hash << 5) - hash) + namespace.charCodeAt(i); + hash |= 0; // Convert to 32bit integer + } + + return exports.colors[Math.abs(hash) % exports.colors.length]; +} + +/** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + +function createDebug(namespace) { + + function debug() { + // disabled? + if (!debug.enabled) return; + + var self = debug; + + // set `diff` timestamp + var curr = +new Date(); + var ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + + // turn the `arguments` into a proper Array + var args = new Array(arguments.length); + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i]; + } + + args[0] = exports.coerce(args[0]); + + if ('string' !== typeof args[0]) { + // anything else let's inspect with %O + args.unshift('%O'); + } + + // apply any `formatters` transformations + var index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) { + // if we encounter an escaped % then don't increase the array index + if (match === '%%') return match; + index++; + var formatter = exports.formatters[format]; + if ('function' === typeof formatter) { + var val = args[index]; + match = formatter.call(self, val); + + // now we need to remove `args[index]` since it's inlined in the `format` + args.splice(index, 1); + index--; + } + return match; + }); + + // apply env-specific formatting (colors, etc.) + exports.formatArgs.call(self, args); + + var logFn = debug.log || exports.log || console.log.bind(console); + logFn.apply(self, args); + } + + debug.namespace = namespace; + debug.enabled = exports.enabled(namespace); + debug.useColors = exports.useColors(); + debug.color = selectColor(namespace); + + // env-specific initialization logic for debug instances + if ('function' === typeof exports.init) { + exports.init(debug); + } + + return debug; +} + +/** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + +function enable(namespaces) { + exports.save(namespaces); + + exports.names = []; + exports.skips = []; + + var split = (namespaces || '').split(/[\s,]+/); + var len = split.length; + + for (var i = 0; i < len; i++) { + if (!split[i]) continue; // ignore empty strings + namespaces = split[i].replace(/\*/g, '.*?'); + if (namespaces[0] === '-') { + exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); + } else { + exports.names.push(new RegExp('^' + namespaces + '$')); + } + } +} + +/** + * Disable debug output. + * + * @api public + */ + +function disable() { + exports.enable(''); +} + +/** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + +function enabled(name) { + var i, len; + for (i = 0, len = exports.skips.length; i < len; i++) { + if (exports.skips[i].test(name)) { + return false; + } + } + for (i = 0, len = exports.names.length; i < len; i++) { + if (exports.names[i].test(name)) { + return true; + } + } + return false; +} + +/** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + +function coerce(val) { + if (val instanceof Error) return val.stack || val.message; + return val; +} diff --git a/node_modules/body-parser/node_modules/debug/src/index.js b/node_modules/body-parser/node_modules/debug/src/index.js new file mode 100644 index 0000000..e12cf4d --- /dev/null +++ b/node_modules/body-parser/node_modules/debug/src/index.js @@ -0,0 +1,10 @@ +/** + * Detect Electron renderer process, which is node, but we should + * treat as a browser. + */ + +if (typeof process !== 'undefined' && process.type === 'renderer') { + module.exports = require('./browser.js'); +} else { + module.exports = require('./node.js'); +} diff --git a/node_modules/body-parser/node_modules/debug/src/node.js b/node_modules/body-parser/node_modules/debug/src/node.js new file mode 100644 index 0000000..4fa564b --- /dev/null +++ b/node_modules/body-parser/node_modules/debug/src/node.js @@ -0,0 +1,241 @@ +/** + * Module dependencies. + */ + +var tty = require('tty'); +var util = require('util'); + +/** + * This is the Node.js implementation of `debug()`. + * + * Expose `debug()` as the module. + */ + +exports = module.exports = require('./debug'); +exports.init = init; +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; + +/** + * Colors. + */ + +exports.colors = [6, 2, 3, 4, 5, 1]; + +/** + * Build up the default `inspectOpts` object from the environment variables. + * + * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js + */ + +exports.inspectOpts = Object.keys(process.env).filter(function (key) { + return /^debug_/i.test(key); +}).reduce(function (obj, key) { + // camel-case + var prop = key + .substring(6) + .toLowerCase() + .replace(/_([a-z])/, function (_, k) { return k.toUpperCase() }); + + // coerce string value into JS value + var val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) val = true; + else if (/^(no|off|false|disabled)$/i.test(val)) val = false; + else if (val === 'null') val = null; + else val = Number(val); + + obj[prop] = val; + return obj; +}, {}); + +/** + * The file descriptor to write the `debug()` calls to. + * Set the `DEBUG_FD` env variable to override with another value. i.e.: + * + * $ DEBUG_FD=3 node script.js 3>debug.log + */ + +var fd = parseInt(process.env.DEBUG_FD, 10) || 2; + +if (1 !== fd && 2 !== fd) { + util.deprecate(function(){}, 'except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)')() +} + +var stream = 1 === fd ? process.stdout : + 2 === fd ? process.stderr : + createWritableStdioStream(fd); + +/** + * Is stdout a TTY? Colored output is enabled when `true`. + */ + +function useColors() { + return 'colors' in exports.inspectOpts + ? Boolean(exports.inspectOpts.colors) + : tty.isatty(fd); +} + +/** + * Map %o to `util.inspect()`, all on a single line. + */ + +exports.formatters.o = function(v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts) + .replace(/\s*\n\s*/g, ' '); +}; + +/** + * Map %o to `util.inspect()`, allowing multiple lines if needed. + */ + +exports.formatters.O = function(v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts); +}; + +/** + * Adds ANSI color escape codes if enabled. + * + * @api public + */ + +function formatArgs(args) { + var name = this.namespace; + var useColors = this.useColors; + + if (useColors) { + var c = this.color; + var prefix = ' \u001b[3' + c + ';1m' + name + ' ' + '\u001b[0m'; + + args[0] = prefix + args[0].split('\n').join('\n' + prefix); + args.push('\u001b[3' + c + 'm+' + exports.humanize(this.diff) + '\u001b[0m'); + } else { + args[0] = new Date().toUTCString() + + ' ' + name + ' ' + args[0]; + } +} + +/** + * Invokes `util.format()` with the specified arguments and writes to `stream`. + */ + +function log() { + return stream.write(util.format.apply(util, arguments) + '\n'); +} + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ + +function save(namespaces) { + if (null == namespaces) { + // If you set a process.env field to null or undefined, it gets cast to the + // string 'null' or 'undefined'. Just delete instead. + delete process.env.DEBUG; + } else { + process.env.DEBUG = namespaces; + } +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + +function load() { + return process.env.DEBUG; +} + +/** + * Copied from `node/src/node.js`. + * + * XXX: It's lame that node doesn't expose this API out-of-the-box. It also + * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame. + */ + +function createWritableStdioStream (fd) { + var stream; + var tty_wrap = process.binding('tty_wrap'); + + // Note stream._type is used for test-module-load-list.js + + switch (tty_wrap.guessHandleType(fd)) { + case 'TTY': + stream = new tty.WriteStream(fd); + stream._type = 'tty'; + + // Hack to have stream not keep the event loop alive. + // See https://github.com/joyent/node/issues/1726 + if (stream._handle && stream._handle.unref) { + stream._handle.unref(); + } + break; + + case 'FILE': + var fs = require('fs'); + stream = new fs.SyncWriteStream(fd, { autoClose: false }); + stream._type = 'fs'; + break; + + case 'PIPE': + case 'TCP': + var net = require('net'); + stream = new net.Socket({ + fd: fd, + readable: false, + writable: true + }); + + // FIXME Should probably have an option in net.Socket to create a + // stream from an existing fd which is writable only. But for now + // we'll just add this hack and set the `readable` member to false. + // Test: ./node test/fixtures/echo.js < /etc/passwd + stream.readable = false; + stream.read = null; + stream._type = 'pipe'; + + // FIXME Hack to have stream not keep the event loop alive. + // See https://github.com/joyent/node/issues/1726 + if (stream._handle && stream._handle.unref) { + stream._handle.unref(); + } + break; + + default: + // Probably an error on in uv_guess_handle() + throw new Error('Implement me. Unknown stream file type!'); + } + + // For supporting legacy API we put the FD here. + stream.fd = fd; + + stream._isStdio = true; + + return stream; +} + +/** + * Init logic for `debug` instances. + * + * Create a new `inspectOpts` object in case `useColors` is set + * differently for a particular `debug` instance. + */ + +function init (debug) { + debug.inspectOpts = util._extend({}, exports.inspectOpts); +} + +/** + * Enable namespaces listed in `process.env.DEBUG` initially. + */ + +exports.enable(load()); diff --git a/node_modules/body-parser/package.json b/node_modules/body-parser/package.json new file mode 100644 index 0000000..2c05d4a --- /dev/null +++ b/node_modules/body-parser/package.json @@ -0,0 +1,125 @@ +{ + "_args": [ + [ + { + "raw": "body-parser@~1.16.0", + "scope": null, + "escapedName": "body-parser", + "name": "body-parser", + "rawSpec": "~1.16.0", + "spec": ">=1.16.0 <1.17.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic" + ] + ], + "_from": "body-parser@>=1.16.0 <1.17.0", + "_id": "body-parser@1.16.1", + "_inCache": true, + "_location": "/body-parser", + "_nodeVersion": "4.6.1", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/body-parser-1.16.1.tgz_1486777002177_0.4995518890209496" + }, + "_npmUser": { + "name": "dougwilson", + "email": "doug@somethingdoug.com" + }, + "_npmVersion": "2.15.9", + "_phantomChildren": { + "ms": "0.7.2" + }, + "_requested": { + "raw": "body-parser@~1.16.0", + "scope": null, + "escapedName": "body-parser", + "name": "body-parser", + "rawSpec": "~1.16.0", + "spec": ">=1.16.0 <1.17.0", + "type": "range" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.16.1.tgz", + "_shasum": "51540d045adfa7a0c6995a014bb6b1ed9b802329", + "_shrinkwrap": null, + "_spec": "body-parser@~1.16.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic", + "bugs": { + "url": "https://github.com/expressjs/body-parser/issues" + }, + "contributors": [ + { + "name": "Douglas Christopher Wilson", + "email": "doug@somethingdoug.com" + }, + { + "name": "Jonathan Ong", + "email": "me@jongleberry.com", + "url": "http://jongleberry.com" + } + ], + "dependencies": { + "bytes": "2.4.0", + "content-type": "~1.0.2", + "debug": "2.6.1", + "depd": "~1.1.0", + "http-errors": "~1.5.1", + "iconv-lite": "0.4.15", + "on-finished": "~2.3.0", + "qs": "6.2.1", + "raw-body": "~2.2.0", + "type-is": "~1.6.14" + }, + "description": "Node.js body parsing middleware", + "devDependencies": { + "eslint": "3.15.0", + "eslint-config-standard": "6.2.1", + "eslint-plugin-markdown": "1.0.0-beta.3", + "eslint-plugin-promise": "3.4.0", + "eslint-plugin-standard": "2.0.1", + "istanbul": "0.4.5", + "methods": "1.1.2", + "mocha": "2.5.3", + "supertest": "1.1.0" + }, + "directories": {}, + "dist": { + "shasum": "51540d045adfa7a0c6995a014bb6b1ed9b802329", + "tarball": "https://registry.npmjs.org/body-parser/-/body-parser-1.16.1.tgz" + }, + "engines": { + "node": ">= 0.8" + }, + "files": [ + "lib/", + "LICENSE", + "HISTORY.md", + "index.js" + ], + "gitHead": "7b630f701d084267a8b9883b27f627014e003d47", + "homepage": "https://github.com/expressjs/body-parser#readme", + "license": "MIT", + "maintainers": [ + { + "name": "dougwilson", + "email": "doug@somethingdoug.com" + } + ], + "name": "body-parser", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/expressjs/body-parser.git" + }, + "scripts": { + "lint": "eslint --plugin markdown --ext js,md .", + "test": "mocha --require test/support/env --reporter spec --check-leaks --bail test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --require test/support/env --reporter dot --check-leaks test/", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --require test/support/env --reporter spec --check-leaks test/" + }, + "version": "1.16.1" +} diff --git a/node_modules/brace-expansion/README.md b/node_modules/brace-expansion/README.md new file mode 100644 index 0000000..ed2ec1f --- /dev/null +++ b/node_modules/brace-expansion/README.md @@ -0,0 +1,123 @@ +# brace-expansion + +[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html), +as known from sh/bash, in JavaScript. + +[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion) +[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion) +[![Greenkeeper badge](https://badges.greenkeeper.io/juliangruber/brace-expansion.svg)](https://greenkeeper.io/) + +[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion) + +## Example + +```js +var expand = require('brace-expansion'); + +expand('file-{a,b,c}.jpg') +// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] + +expand('-v{,,}') +// => ['-v', '-v', '-v'] + +expand('file{0..2}.jpg') +// => ['file0.jpg', 'file1.jpg', 'file2.jpg'] + +expand('file-{a..c}.jpg') +// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] + +expand('file{2..0}.jpg') +// => ['file2.jpg', 'file1.jpg', 'file0.jpg'] + +expand('file{0..4..2}.jpg') +// => ['file0.jpg', 'file2.jpg', 'file4.jpg'] + +expand('file-{a..e..2}.jpg') +// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg'] + +expand('file{00..10..5}.jpg') +// => ['file00.jpg', 'file05.jpg', 'file10.jpg'] + +expand('{{A..C},{a..c}}') +// => ['A', 'B', 'C', 'a', 'b', 'c'] + +expand('ppp{,config,oe{,conf}}') +// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf'] +``` + +## API + +```js +var expand = require('brace-expansion'); +``` + +### var expanded = expand(str) + +Return an array of all possible and valid expansions of `str`. If none are +found, `[str]` is returned. + +Valid expansions are: + +```js +/^(.*,)+(.+)?$/ +// {a,b,...} +``` + +A comma seperated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`. + +```js +/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ +// {x..y[..incr]} +``` + +A numeric sequence from `x` to `y` inclusive, with optional increment. +If `x` or `y` start with a leading `0`, all the numbers will be padded +to have equal length. Negative numbers and backwards iteration work too. + +```js +/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ +// {x..y[..incr]} +``` + +An alphabetic sequence from `x` to `y` inclusive, with optional increment. +`x` and `y` must be exactly one character, and if given, `incr` must be a +number. + +For compatibility reasons, the string `${` is not eligible for brace expansion. + +## Installation + +With [npm](https://npmjs.org) do: + +```bash +npm install brace-expansion +``` + +## Contributors + +- [Julian Gruber](https://github.com/juliangruber) +- [Isaac Z. Schlueter](https://github.com/isaacs) + +## License + +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> + +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. diff --git a/node_modules/brace-expansion/index.js b/node_modules/brace-expansion/index.js new file mode 100644 index 0000000..0478be8 --- /dev/null +++ b/node_modules/brace-expansion/index.js @@ -0,0 +1,201 @@ +var concatMap = require('concat-map'); +var balanced = require('balanced-match'); + +module.exports = expandTop; + +var escSlash = '\0SLASH'+Math.random()+'\0'; +var escOpen = '\0OPEN'+Math.random()+'\0'; +var escClose = '\0CLOSE'+Math.random()+'\0'; +var escComma = '\0COMMA'+Math.random()+'\0'; +var escPeriod = '\0PERIOD'+Math.random()+'\0'; + +function numeric(str) { + return parseInt(str, 10) == str + ? parseInt(str, 10) + : str.charCodeAt(0); +} + +function escapeBraces(str) { + return str.split('\\\\').join(escSlash) + .split('\\{').join(escOpen) + .split('\\}').join(escClose) + .split('\\,').join(escComma) + .split('\\.').join(escPeriod); +} + +function unescapeBraces(str) { + return str.split(escSlash).join('\\') + .split(escOpen).join('{') + .split(escClose).join('}') + .split(escComma).join(',') + .split(escPeriod).join('.'); +} + + +// Basically just str.split(","), but handling cases +// where we have nested braced sections, which should be +// treated as individual members, like {a,{b,c},d} +function parseCommaParts(str) { + if (!str) + return ['']; + + var parts = []; + var m = balanced('{', '}', str); + + if (!m) + return str.split(','); + + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(','); + + p[p.length-1] += '{' + body + '}'; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length-1] += postParts.shift(); + p.push.apply(p, postParts); + } + + parts.push.apply(parts, p); + + return parts; +} + +function expandTop(str) { + if (!str) + return []; + + // I don't know why Bash 4.3 does this, but it does. + // Anything starting with {} will have the first two bytes preserved + // but *only* at the top level, so {},a}b will not expand to anything, + // but a{},b}c will be expanded to [a}c,abc]. + // One could argue that this is a bug in Bash, but since the goal of + // this module is to match Bash's rules, we escape a leading {} + if (str.substr(0, 2) === '{}') { + str = '\\{\\}' + str.substr(2); + } + + return expand(escapeBraces(str), true).map(unescapeBraces); +} + +function identity(e) { + return e; +} + +function embrace(str) { + return '{' + str + '}'; +} +function isPadded(el) { + return /^-?0\d/.test(el); +} + +function lte(i, y) { + return i <= y; +} +function gte(i, y) { + return i >= y; +} + +function expand(str, isTop) { + var expansions = []; + + var m = balanced('{', '}', str); + if (!m || /\$$/.test(m.pre)) return [str]; + + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(',') >= 0; + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,.*\}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + return expand(str); + } + return [str]; + } + + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length + ? expand(m.post, false) + : ['']; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + + // at this point, n is the parts, and we know it's not a comma set + // with a single entry. + + // no need to expand pre, since it is guaranteed to be free of brace-sets + var pre = m.pre; + var post = m.post.length + ? expand(m.post, false) + : ['']; + + var N; + + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length) + var incr = n.length == 3 + ? Math.abs(numeric(n[2])) + : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + + N = []; + + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') + c = ''; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join('0'); + if (i < 0) + c = '-' + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = concatMap(n, function(el) { return expand(el, false) }); + } + + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + + return expansions; +} + diff --git a/node_modules/brace-expansion/package.json b/node_modules/brace-expansion/package.json new file mode 100644 index 0000000..3278a16 --- /dev/null +++ b/node_modules/brace-expansion/package.json @@ -0,0 +1,114 @@ +{ + "_args": [ + [ + { + "raw": "brace-expansion@^1.0.0", + "scope": null, + "escapedName": "brace-expansion", + "name": "brace-expansion", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/minimatch" + ] + ], + "_from": "brace-expansion@>=1.0.0 <2.0.0", + "_id": "brace-expansion@1.1.7", + "_inCache": true, + "_location": "/brace-expansion", + "_nodeVersion": "7.8.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/brace-expansion-1.1.7.tgz_1491552830231_0.7213963181711733" + }, + "_npmUser": { + "name": "juliangruber", + "email": "julian@juliangruber.com" + }, + "_npmVersion": "4.2.0", + "_phantomChildren": {}, + "_requested": { + "raw": "brace-expansion@^1.0.0", + "scope": null, + "escapedName": "brace-expansion", + "name": "brace-expansion", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/minimatch" + ], + "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz", + "_shasum": "3effc3c50e000531fb720eaff80f0ae8ef23cf59", + "_shrinkwrap": null, + "_spec": "brace-expansion@^1.0.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/minimatch", + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "bugs": { + "url": "https://github.com/juliangruber/brace-expansion/issues" + }, + "dependencies": { + "balanced-match": "^0.4.1", + "concat-map": "0.0.1" + }, + "description": "Brace expansion as known from sh/bash", + "devDependencies": { + "matcha": "^0.7.0", + "tape": "^4.6.0" + }, + "directories": {}, + "dist": { + "shasum": "3effc3c50e000531fb720eaff80f0ae8ef23cf59", + "tarball": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz" + }, + "gitHead": "892512024872ca7680554be90f6e8ce065053372", + "homepage": "https://github.com/juliangruber/brace-expansion", + "keywords": [], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "juliangruber", + "email": "julian@juliangruber.com" + }, + { + "name": "isaacs", + "email": "isaacs@npmjs.com" + } + ], + "name": "brace-expansion", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/brace-expansion.git" + }, + "scripts": { + "bench": "matcha test/perf/bench.js", + "gentest": "bash test/generate.sh", + "test": "tape test/*.js" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "firefox/20..latest", + "firefox/nightly", + "chrome/25..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + }, + "version": "1.1.7" +} diff --git a/node_modules/braces/LICENSE b/node_modules/braces/LICENSE new file mode 100644 index 0000000..39245ac --- /dev/null +++ b/node_modules/braces/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2016, Jon Schlinkert. + +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. diff --git a/node_modules/braces/README.md b/node_modules/braces/README.md new file mode 100644 index 0000000..52fa756 --- /dev/null +++ b/node_modules/braces/README.md @@ -0,0 +1,248 @@ +# braces [![NPM version](https://img.shields.io/npm/v/braces.svg?style=flat)](https://www.npmjs.com/package/braces) [![NPM downloads](https://img.shields.io/npm/dm/braces.svg?style=flat)](https://npmjs.org/package/braces) [![Build Status](https://img.shields.io/travis/jonschlinkert/braces.svg?style=flat)](https://travis-ci.org/jonschlinkert/braces) + +Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces specification. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install braces --save +``` + +## Features + +* Complete support for the braces part of the [Bash 4.3 Brace Expansion](www.gnu.org/software/bash/). Braces passes [all of the relevant unit tests](#bash-4-3-support) from the spec. +* Expands comma-separated values: `a/{b,c}/d` => `['a/b/d', 'a/c/d']` +* Expands alphabetical or numerical ranges: `{1..3}` => `['1', '2', '3']` +* [Very fast](#benchmarks) +* [Special characters](./patterns.md) can be used to generate interesting patterns. + +## Example usage + +```js +var braces = require('braces'); + +braces('a/{x,y}/c{d}e') +//=> ['a/x/cde', 'a/y/cde'] + +braces('a/b/c/{x,y}') +//=> ['a/b/c/x', 'a/b/c/y'] + +braces('a/{x,{1..5},y}/c{d}e') +//=> ['a/x/cde', 'a/1/cde', 'a/y/cde', 'a/2/cde', 'a/3/cde', 'a/4/cde', 'a/5/cde'] +``` + +### Use case: fixtures + +> Use braces to generate test fixtures! + +**Example** + +```js +var braces = require('./'); +var path = require('path'); +var fs = require('fs'); + +braces('blah/{a..z}.js').forEach(function(fp) { + if (!fs.existsSync(path.dirname(fp))) { + fs.mkdirSync(path.dirname(fp)); + } + fs.writeFileSync(fp, ''); +}); +``` + +See the [tests](./test/test.js) for more examples and use cases (also see the [bash spec tests](./test/bash-mm-adjusted.js)); + +### Range expansion + +Uses [expand-range](https://github.com/jonschlinkert/expand-range) for range expansion. + +```js +braces('a{1..3}b') +//=> ['a1b', 'a2b', 'a3b'] + +braces('a{5..8}b') +//=> ['a5b', 'a6b', 'a7b', 'a8b'] + +braces('a{00..05}b') +//=> ['a00b', 'a01b', 'a02b', 'a03b', 'a04b', 'a05b'] + +braces('a{01..03}b') +//=> ['a01b', 'a02b', 'a03b'] + +braces('a{000..005}b') +//=> ['a000b', 'a001b', 'a002b', 'a003b', 'a004b', 'a005b'] + +braces('a{a..e}b') +//=> ['aab', 'abb', 'acb', 'adb', 'aeb'] + +braces('a{A..E}b') +//=> ['aAb', 'aBb', 'aCb', 'aDb', 'aEb'] +``` + +Pass a function as the last argument to customize range expansions: + +```js +var range = braces('x{a..e}y', function (str, i) { + return String.fromCharCode(str) + i; +}); + +console.log(range); +//=> ['xa0y', 'xb1y', 'xc2y', 'xd3y', 'xe4y'] +``` + +See [expand-range](https://github.com/jonschlinkert/expand-range) for benchmarks, tests and the full list of range expansion features. + +## Options + +### options.makeRe + +Type: `Boolean` + +Deafault: `false` + +Return a regex-optimal string. If you're using braces to generate regex, this will result in dramatically faster performance. + +**Examples** + +With the default settings (`{makeRe: false}`): + +```js +braces('{1..5}'); +//=> ['1', '2', '3', '4', '5'] +``` + +With `{makeRe: true}`: + +```js +braces('{1..5}', {makeRe: true}); +//=> ['[1-5]'] + +braces('{3..9..3}', {makeRe: true}); +//=> ['(3|6|9)'] +``` + +### options.bash + +Type: `Boolean` + +Default: `false` + +Enables complete support for the Bash specification. The downside is a 20-25% speed decrease. + +**Example** + +Using the default setting (`{bash: false}`): + +```js +braces('a{b}c'); +//=> ['abc'] +``` + +In bash (and minimatch), braces with one item are not expanded. To get the same result with braces, set `{bash: true}`: + +```js +braces('a{b}c', {bash: true}); +//=> ['a{b}c'] +``` + +### options.nodupes + +Type: `Boolean` + +Deafault: `true` + +Duplicates are removed by default. To keep duplicates, pass `{nodupes: false}` on the options + +## Bash 4.3 Support + +> Better support for Bash 4.3 than minimatch + +This project has comprehensive unit tests, including tests coverted from [Bash 4.3](www.gnu.org/software/bash/). Currently only 8 of 102 unit tests fail, and + +## Run benchmarks + +Install dev dependencies: + +```bash +npm i -d && npm benchmark +``` + +### Latest results + +```bash +#1: escape.js + brace-expansion.js x 114,934 ops/sec ±1.24% (93 runs sampled) + braces.js x 342,254 ops/sec ±0.84% (90 runs sampled) + +#2: exponent.js + brace-expansion.js x 12,359 ops/sec ±0.86% (96 runs sampled) + braces.js x 20,389 ops/sec ±0.71% (97 runs sampled) + +#3: multiple.js + brace-expansion.js x 114,469 ops/sec ±1.44% (94 runs sampled) + braces.js x 401,621 ops/sec ±0.87% (91 runs sampled) + +#4: nested.js + brace-expansion.js x 102,769 ops/sec ±1.55% (92 runs sampled) + braces.js x 314,088 ops/sec ±0.71% (98 runs sampled) + +#5: normal.js + brace-expansion.js x 157,577 ops/sec ±1.65% (91 runs sampled) + braces.js x 1,115,950 ops/sec ±0.74% (94 runs sampled) + +#6: range.js + brace-expansion.js x 138,822 ops/sec ±1.71% (91 runs sampled) + braces.js x 1,108,353 ops/sec ±0.85% (94 runs sampled) +``` + +## Related projects + +You might also be interested in these projects: + +* [expand-range](https://www.npmjs.com/package/expand-range): Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See… [more](https://www.npmjs.com/package/expand-range) | [homepage](https://github.com/jonschlinkert/expand-range) +* [fill-range](https://www.npmjs.com/package/fill-range): Fill in a range of numbers or letters, optionally passing an increment or multiplier to… [more](https://www.npmjs.com/package/fill-range) | [homepage](https://github.com/jonschlinkert/fill-range) +* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/jonschlinkert/micromatch) + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/braces/issues/new). + +## Building docs + +Generate readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install verb && npm run docs +``` + +Or, if [verb](https://github.com/verbose/verb) is installed globally: + +```sh +$ verb +``` + +## Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +## Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/braces/blob/master/LICENSE). + +*** + +_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on May 21, 2016._ \ No newline at end of file diff --git a/node_modules/braces/index.js b/node_modules/braces/index.js new file mode 100644 index 0000000..3b4c58d --- /dev/null +++ b/node_modules/braces/index.js @@ -0,0 +1,399 @@ +/*! + * braces + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT license. + */ + +'use strict'; + +/** + * Module dependencies + */ + +var expand = require('expand-range'); +var repeat = require('repeat-element'); +var tokens = require('preserve'); + +/** + * Expose `braces` + */ + +module.exports = function(str, options) { + if (typeof str !== 'string') { + throw new Error('braces expects a string'); + } + return braces(str, options); +}; + +/** + * Expand `{foo,bar}` or `{1..5}` braces in the + * given `string`. + * + * @param {String} `str` + * @param {Array} `arr` + * @param {Object} `options` + * @return {Array} + */ + +function braces(str, arr, options) { + if (str === '') { + return []; + } + + if (!Array.isArray(arr)) { + options = arr; + arr = []; + } + + var opts = options || {}; + arr = arr || []; + + if (typeof opts.nodupes === 'undefined') { + opts.nodupes = true; + } + + var fn = opts.fn; + var es6; + + if (typeof opts === 'function') { + fn = opts; + opts = {}; + } + + if (!(patternRe instanceof RegExp)) { + patternRe = patternRegex(); + } + + var matches = str.match(patternRe) || []; + var m = matches[0]; + + switch(m) { + case '\\,': + return escapeCommas(str, arr, opts); + case '\\.': + return escapeDots(str, arr, opts); + case '\/.': + return escapePaths(str, arr, opts); + case ' ': + return splitWhitespace(str); + case '{,}': + return exponential(str, opts, braces); + case '{}': + return emptyBraces(str, arr, opts); + case '\\{': + case '\\}': + return escapeBraces(str, arr, opts); + case '${': + if (!/\{[^{]+\{/.test(str)) { + return arr.concat(str); + } else { + es6 = true; + str = tokens.before(str, es6Regex()); + } + } + + if (!(braceRe instanceof RegExp)) { + braceRe = braceRegex(); + } + + var match = braceRe.exec(str); + if (match == null) { + return [str]; + } + + var outter = match[1]; + var inner = match[2]; + if (inner === '') { return [str]; } + + var segs, segsLength; + + if (inner.indexOf('..') !== -1) { + segs = expand(inner, opts, fn) || inner.split(','); + segsLength = segs.length; + + } else if (inner[0] === '"' || inner[0] === '\'') { + return arr.concat(str.split(/['"]/).join('')); + + } else { + segs = inner.split(','); + if (opts.makeRe) { + return braces(str.replace(outter, wrap(segs, '|')), opts); + } + + segsLength = segs.length; + if (segsLength === 1 && opts.bash) { + segs[0] = wrap(segs[0], '\\'); + } + } + + var len = segs.length; + var i = 0, val; + + while (len--) { + var path = segs[i++]; + + if (/(\.[^.\/])/.test(path)) { + if (segsLength > 1) { + return segs; + } else { + return [str]; + } + } + + val = splice(str, outter, path); + + if (/\{[^{}]+?\}/.test(val)) { + arr = braces(val, arr, opts); + } else if (val !== '') { + if (opts.nodupes && arr.indexOf(val) !== -1) { continue; } + arr.push(es6 ? tokens.after(val) : val); + } + } + + if (opts.strict) { return filter(arr, filterEmpty); } + return arr; +} + +/** + * Expand exponential ranges + * + * `a{,}{,}` => ['a', 'a', 'a', 'a'] + */ + +function exponential(str, options, fn) { + if (typeof options === 'function') { + fn = options; + options = null; + } + + var opts = options || {}; + var esc = '__ESC_EXP__'; + var exp = 0; + var res; + + var parts = str.split('{,}'); + if (opts.nodupes) { + return fn(parts.join(''), opts); + } + + exp = parts.length - 1; + res = fn(parts.join(esc), opts); + var len = res.length; + var arr = []; + var i = 0; + + while (len--) { + var ele = res[i++]; + var idx = ele.indexOf(esc); + + if (idx === -1) { + arr.push(ele); + + } else { + ele = ele.split('__ESC_EXP__').join(''); + if (!!ele && opts.nodupes !== false) { + arr.push(ele); + + } else { + var num = Math.pow(2, exp); + arr.push.apply(arr, repeat(ele, num)); + } + } + } + return arr; +} + +/** + * Wrap a value with parens, brackets or braces, + * based on the given character/separator. + * + * @param {String|Array} `val` + * @param {String} `ch` + * @return {String} + */ + +function wrap(val, ch) { + if (ch === '|') { + return '(' + val.join(ch) + ')'; + } + if (ch === ',') { + return '{' + val.join(ch) + '}'; + } + if (ch === '-') { + return '[' + val.join(ch) + ']'; + } + if (ch === '\\') { + return '\\{' + val + '\\}'; + } +} + +/** + * Handle empty braces: `{}` + */ + +function emptyBraces(str, arr, opts) { + return braces(str.split('{}').join('\\{\\}'), arr, opts); +} + +/** + * Filter out empty-ish values + */ + +function filterEmpty(ele) { + return !!ele && ele !== '\\'; +} + +/** + * Handle patterns with whitespace + */ + +function splitWhitespace(str) { + var segs = str.split(' '); + var len = segs.length; + var res = []; + var i = 0; + + while (len--) { + res.push.apply(res, braces(segs[i++])); + } + return res; +} + +/** + * Handle escaped braces: `\\{foo,bar}` + */ + +function escapeBraces(str, arr, opts) { + if (!/\{[^{]+\{/.test(str)) { + return arr.concat(str.split('\\').join('')); + } else { + str = str.split('\\{').join('__LT_BRACE__'); + str = str.split('\\}').join('__RT_BRACE__'); + return map(braces(str, arr, opts), function(ele) { + ele = ele.split('__LT_BRACE__').join('{'); + return ele.split('__RT_BRACE__').join('}'); + }); + } +} + +/** + * Handle escaped dots: `{1\\.2}` + */ + +function escapeDots(str, arr, opts) { + if (!/[^\\]\..+\\\./.test(str)) { + return arr.concat(str.split('\\').join('')); + } else { + str = str.split('\\.').join('__ESC_DOT__'); + return map(braces(str, arr, opts), function(ele) { + return ele.split('__ESC_DOT__').join('.'); + }); + } +} + +/** + * Handle escaped dots: `{1\\.2}` + */ + +function escapePaths(str, arr, opts) { + str = str.split('\/.').join('__ESC_PATH__'); + return map(braces(str, arr, opts), function(ele) { + return ele.split('__ESC_PATH__').join('\/.'); + }); +} + +/** + * Handle escaped commas: `{a\\,b}` + */ + +function escapeCommas(str, arr, opts) { + if (!/\w,/.test(str)) { + return arr.concat(str.split('\\').join('')); + } else { + str = str.split('\\,').join('__ESC_COMMA__'); + return map(braces(str, arr, opts), function(ele) { + return ele.split('__ESC_COMMA__').join(','); + }); + } +} + +/** + * Regex for common patterns + */ + +function patternRegex() { + return /\${|( (?=[{,}])|(?=[{,}]) )|{}|{,}|\\,(?=.*[{}])|\/\.(?=.*[{}])|\\\.(?={)|\\{|\\}/; +} + +/** + * Braces regex. + */ + +function braceRegex() { + return /.*(\\?\{([^}]+)\})/; +} + +/** + * es6 delimiter regex. + */ + +function es6Regex() { + return /\$\{([^}]+)\}/; +} + +var braceRe; +var patternRe; + +/** + * Faster alternative to `String.replace()` when the + * index of the token to be replaces can't be supplied + */ + +function splice(str, token, replacement) { + var i = str.indexOf(token); + return str.substr(0, i) + replacement + + str.substr(i + token.length); +} + +/** + * Fast array map + */ + +function map(arr, fn) { + if (arr == null) { + return []; + } + + var len = arr.length; + var res = new Array(len); + var i = -1; + + while (++i < len) { + res[i] = fn(arr[i], i, arr); + } + + return res; +} + +/** + * Fast array filter + */ + +function filter(arr, cb) { + if (arr == null) return []; + if (typeof cb !== 'function') { + throw new TypeError('braces: filter expects a callback function.'); + } + + var len = arr.length; + var res = arr.slice(); + var i = 0; + + while (len--) { + if (!cb(arr[len], i++)) { + res.splice(len, 1); + } + } + return res; +} diff --git a/node_modules/braces/package.json b/node_modules/braces/package.json new file mode 100644 index 0000000..791f18c --- /dev/null +++ b/node_modules/braces/package.json @@ -0,0 +1,157 @@ +{ + "_args": [ + [ + { + "raw": "braces@^1.8.2", + "scope": null, + "escapedName": "braces", + "name": "braces", + "rawSpec": "^1.8.2", + "spec": ">=1.8.2 <2.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/micromatch" + ] + ], + "_from": "braces@>=1.8.2 <2.0.0", + "_id": "braces@1.8.5", + "_inCache": true, + "_location": "/braces", + "_nodeVersion": "5.5.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/braces-1.8.5.tgz_1463843581552_0.5618140168953687" + }, + "_npmUser": { + "name": "jonschlinkert", + "email": "github@sellside.com" + }, + "_npmVersion": "3.6.0", + "_phantomChildren": {}, + "_requested": { + "raw": "braces@^1.8.2", + "scope": null, + "escapedName": "braces", + "name": "braces", + "rawSpec": "^1.8.2", + "spec": ">=1.8.2 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/micromatch" + ], + "_resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "_shasum": "ba77962e12dff969d6b76711e914b737857bf6a7", + "_shrinkwrap": null, + "_spec": "braces@^1.8.2", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/micromatch", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/braces/issues" + }, + "dependencies": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + }, + "description": "Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces specification.", + "devDependencies": { + "benchmarked": "^0.1.5", + "brace-expansion": "^1.1.3", + "chalk": "^1.1.3", + "gulp-format-md": "^0.1.8", + "minimatch": "^3.0.0", + "minimist": "^1.2.0", + "mocha": "^2.4.5", + "should": "^8.3.1" + }, + "directories": {}, + "dist": { + "shasum": "ba77962e12dff969d6b76711e914b737857bf6a7", + "tarball": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "24874614ebeda1c5405180f1f6c9f374bcf384ce", + "homepage": "https://github.com/jonschlinkert/braces", + "keywords": [ + "alpha", + "alphabetical", + "bash", + "brace", + "expand", + "expansion", + "filepath", + "fill", + "fs", + "glob", + "globbing", + "letter", + "match", + "matches", + "matching", + "number", + "numerical", + "path", + "range", + "ranges", + "sh" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "jonschlinkert", + "email": "github@sellside.com" + }, + { + "name": "es128", + "email": "elan.shanker+npm@gmail.com" + }, + { + "name": "doowb", + "email": "brian.woodward@gmail.com" + } + ], + "name": "braces", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/braces.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "plugins": [ + "gulp-format-md" + ], + "reflinks": [ + "verb" + ], + "toc": false, + "layout": "default", + "lint": { + "reflinks": true + }, + "tasks": [ + "readme" + ], + "related": { + "list": [ + "micromatch", + "expand-range", + "fill-range" + ] + } + }, + "version": "1.8.5" +} diff --git a/node_modules/buffer-shims/index.js b/node_modules/buffer-shims/index.js new file mode 100644 index 0000000..1cab4c0 --- /dev/null +++ b/node_modules/buffer-shims/index.js @@ -0,0 +1,108 @@ +'use strict'; + +var buffer = require('buffer'); +var Buffer = buffer.Buffer; +var SlowBuffer = buffer.SlowBuffer; +var MAX_LEN = buffer.kMaxLength || 2147483647; +exports.alloc = function alloc(size, fill, encoding) { + if (typeof Buffer.alloc === 'function') { + return Buffer.alloc(size, fill, encoding); + } + if (typeof encoding === 'number') { + throw new TypeError('encoding must not be number'); + } + if (typeof size !== 'number') { + throw new TypeError('size must be a number'); + } + if (size > MAX_LEN) { + throw new RangeError('size is too large'); + } + var enc = encoding; + var _fill = fill; + if (_fill === undefined) { + enc = undefined; + _fill = 0; + } + var buf = new Buffer(size); + if (typeof _fill === 'string') { + var fillBuf = new Buffer(_fill, enc); + var flen = fillBuf.length; + var i = -1; + while (++i < size) { + buf[i] = fillBuf[i % flen]; + } + } else { + buf.fill(_fill); + } + return buf; +} +exports.allocUnsafe = function allocUnsafe(size) { + if (typeof Buffer.allocUnsafe === 'function') { + return Buffer.allocUnsafe(size); + } + if (typeof size !== 'number') { + throw new TypeError('size must be a number'); + } + if (size > MAX_LEN) { + throw new RangeError('size is too large'); + } + return new Buffer(size); +} +exports.from = function from(value, encodingOrOffset, length) { + if (typeof Buffer.from === 'function' && (!global.Uint8Array || Uint8Array.from !== Buffer.from)) { + return Buffer.from(value, encodingOrOffset, length); + } + if (typeof value === 'number') { + throw new TypeError('"value" argument must not be a number'); + } + if (typeof value === 'string') { + return new Buffer(value, encodingOrOffset); + } + if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { + var offset = encodingOrOffset; + if (arguments.length === 1) { + return new Buffer(value); + } + if (typeof offset === 'undefined') { + offset = 0; + } + var len = length; + if (typeof len === 'undefined') { + len = value.byteLength - offset; + } + if (offset >= value.byteLength) { + throw new RangeError('\'offset\' is out of bounds'); + } + if (len > value.byteLength - offset) { + throw new RangeError('\'length\' is out of bounds'); + } + return new Buffer(value.slice(offset, offset + len)); + } + if (Buffer.isBuffer(value)) { + var out = new Buffer(value.length); + value.copy(out, 0, 0, value.length); + return out; + } + if (value) { + if (Array.isArray(value) || (typeof ArrayBuffer !== 'undefined' && value.buffer instanceof ArrayBuffer) || 'length' in value) { + return new Buffer(value); + } + if (value.type === 'Buffer' && Array.isArray(value.data)) { + return new Buffer(value.data); + } + } + + throw new TypeError('First argument must be a string, Buffer, ' + 'ArrayBuffer, Array, or array-like object.'); +} +exports.allocUnsafeSlow = function allocUnsafeSlow(size) { + if (typeof Buffer.allocUnsafeSlow === 'function') { + return Buffer.allocUnsafeSlow(size); + } + if (typeof size !== 'number') { + throw new TypeError('size must be a number'); + } + if (size >= MAX_LEN) { + throw new RangeError('size is too large'); + } + return new SlowBuffer(size); +} diff --git a/node_modules/buffer-shims/license.md b/node_modules/buffer-shims/license.md new file mode 100644 index 0000000..01cfaef --- /dev/null +++ b/node_modules/buffer-shims/license.md @@ -0,0 +1,19 @@ +# Copyright (c) 2016 Calvin Metcalf + +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.** diff --git a/node_modules/buffer-shims/package.json b/node_modules/buffer-shims/package.json new file mode 100644 index 0000000..5eeae28 --- /dev/null +++ b/node_modules/buffer-shims/package.json @@ -0,0 +1,86 @@ +{ + "_args": [ + [ + { + "raw": "buffer-shims@~1.0.0", + "scope": null, + "escapedName": "buffer-shims", + "name": "buffer-shims", + "rawSpec": "~1.0.0", + "spec": ">=1.0.0 <1.1.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/through2/node_modules/readable-stream" + ] + ], + "_from": "buffer-shims@>=1.0.0 <1.1.0", + "_id": "buffer-shims@1.0.0", + "_inCache": true, + "_location": "/buffer-shims", + "_nodeVersion": "5.11.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/buffer-shims-1.0.0.tgz_1462560889323_0.8640750856138766" + }, + "_npmUser": { + "name": "cwmma", + "email": "calvin.metcalf@gmail.com" + }, + "_npmVersion": "3.8.6", + "_phantomChildren": {}, + "_requested": { + "raw": "buffer-shims@~1.0.0", + "scope": null, + "escapedName": "buffer-shims", + "name": "buffer-shims", + "rawSpec": "~1.0.0", + "spec": ">=1.0.0 <1.1.0", + "type": "range" + }, + "_requiredBy": [ + "/through2/readable-stream", + "/through2/string_decoder" + ], + "_resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz", + "_shasum": "9978ce317388c649ad8793028c3477ef044a8b51", + "_shrinkwrap": null, + "_spec": "buffer-shims@~1.0.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/through2/node_modules/readable-stream", + "bugs": { + "url": "https://github.com/calvinmetcalf/buffer-shims/issues" + }, + "dependencies": {}, + "description": "some shims for node buffers", + "devDependencies": { + "tape": "^4.5.1" + }, + "directories": {}, + "dist": { + "shasum": "9978ce317388c649ad8793028c3477ef044a8b51", + "tarball": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz" + }, + "files": [ + "index.js" + ], + "gitHead": "ea89b3857ab5b8203957922a84e9a48cf4c47e0a", + "homepage": "https://github.com/calvinmetcalf/buffer-shims#readme", + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "cwmma", + "email": "calvin.metcalf@gmail.com" + } + ], + "name": "buffer-shims", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/calvinmetcalf/buffer-shims.git" + }, + "scripts": { + "test": "tape test/*.js" + }, + "version": "1.0.0" +} diff --git a/node_modules/buffer-shims/readme.md b/node_modules/buffer-shims/readme.md new file mode 100644 index 0000000..7ea6475 --- /dev/null +++ b/node_modules/buffer-shims/readme.md @@ -0,0 +1,21 @@ +buffer-shims +=== + +functions to make sure the new buffer methods work in older browsers. + +```js +var bufferShim = require('buffer-shims'); +bufferShim.from('foo'); +bufferShim.alloc(9, 'cafeface', 'hex'); +bufferShim.allocUnsafe(15); +bufferShim.allocUnsafeSlow(21); +``` + +should just use the original in newer nodes and on older nodes uses fallbacks. + +Known Issues +=== +- this does not patch the buffer object, only the constructor stuff +- it's actually a polyfill + +![](https://i.imgur.com/zxII3jJ.gif) diff --git a/node_modules/buffer-writer/.npmignore b/node_modules/buffer-writer/.npmignore new file mode 100644 index 0000000..9f60d21 --- /dev/null +++ b/node_modules/buffer-writer/.npmignore @@ -0,0 +1,2 @@ +benchmark/versions/ +node_modules diff --git a/node_modules/buffer-writer/.travis.yml b/node_modules/buffer-writer/.travis.yml new file mode 100644 index 0000000..ed178f6 --- /dev/null +++ b/node_modules/buffer-writer/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.8 + - 0.9 diff --git a/node_modules/buffer-writer/LICENSE b/node_modules/buffer-writer/LICENSE new file mode 100644 index 0000000..72dc60d --- /dev/null +++ b/node_modules/buffer-writer/LICENSE @@ -0,0 +1,19 @@ +The MIT License (MIT) + +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. diff --git a/node_modules/buffer-writer/README.md b/node_modules/buffer-writer/README.md new file mode 100644 index 0000000..81eccc0 --- /dev/null +++ b/node_modules/buffer-writer/README.md @@ -0,0 +1,48 @@ +# buffer-writer + +[![Build Status](https://secure.travis-ci.org/brianc/node-buffer-writer.png?branch=master)](http://travis-ci.org/brianc/node-buffer-writer) + +Fast & efficient buffer writer used to keep memory usage low by internally recycling a single large buffer. + +Used as the binary protocol writer in [node-postgres](https://github.com/brianc/node-postgres) + +Since postgres requires big endian encoding, this only writes big endian numbers for now, but can & probably will easily be extended to write little endian as well. + +I'll admit this has a few postgres specific things I might need to take out in the future, such as `addHeader` + +## api + +`var writer = new (require('buffer-writer')());` + +### writer.addInt32(num) + +Writes a 4-byte big endian binary encoded number to the end of the buffer. + +### writer.addInt16(num) + +Writes a 2-byte big endian binary encoded number to the end of the buffer. + +### writer.addCString(string) + +Writes a string to the buffer `utf8` encoded and adds a null character (`\0`) at the end. + +### var buffer = writer.addHeader(char) + +Writes the 5 byte PostgreSQL required header to the beginning of the buffer. (1 byte for character, 1 BE Int32 for length of the buffer) + +### var buffer = writer.join() + +Collects all data in the writer and joins it into a single, new buffer. + +### var buffer = writer.flush(char) + +Writes the 5 byte postgres required message header, collects all data in the writer and joins it into a single, new buffer, and then resets the writer. + +## thoughts + +This is kind of node-postgres specific. If you're interested in using this for a more general purpose thing, lemme know. +I would love to work with you on getting this more reusable for your needs. + +## license + +MIT diff --git a/node_modules/buffer-writer/benchmark/index.js b/node_modules/buffer-writer/benchmark/index.js new file mode 100644 index 0000000..69d8f4b --- /dev/null +++ b/node_modules/buffer-writer/benchmark/index.js @@ -0,0 +1,86 @@ +var fs = require('fs'); +var path = require('path'); + +var bench = require('bench'); +var async = require('async'); +var rmdir = require('rmdir'); +var ok = require('okay'); +var cloned = require('cloned'); +cloned.workingDir = __dirname + '/versions'; + +exports.compare = { + 'math': function() { + var two = 1 + 1; + }, + 'another': function() { + var yay = 2 + 2; + } +}; + +var clone = function(rev, cb) { + var outputDir = path.join(cloned.workingDir, rev); + console.log(outputDir) + if(fs.existsSync(outputDir)) { + return cb(null, { + rev: rev, + dir: outputDir + }); + } + console.log('cloning version ' + rev); + cloned(rev, ok(cb, function(dir) { + console.log('cloned version ' + rev + ' to ' + dir); + cb(null, { + rev: rev, + dir: dir + }); + })); +}; + +var versions = [ + 'ef599d3' +]; + +var scripts = fs.readdirSync(__dirname).filter(function(x) { + return x.indexOf('benchmark') > 0; +}); + +if(process.argv[2]) { + scripts = [process.argv[2]] +} + + +var run = function() { + async.map(versions, clone, function(err, results) { + if(err) throw err; + exports.compare = { }; + var suites = []; + scripts.forEach(function(script) { + for(var i = 0; i < results.length; i++) { + var result = results[i]; + var benchPath = path.join(result.dir, 'benchmark', script); + var suite = {}; + suites.push(suite); + if(fs.existsSync(benchPath)) { + var bench = require(benchPath); + suite[script + '@' + result.rev] = bench; + } else { + console.log('%s missing at revision %s', benchPath, result.rev); + } + } + suite[script + '@HEAD'] = require(__dirname + '/' + script); + }); + var compare = function(suite, cb) { + console.log('running...') + bench.compare(suite, null, null, null, function(err, data) { + if(err) return cb(err); + bench.show(data); + cb(null); + }); + } + async.eachSeries(suites, compare, function(err, res) { + console.log('all suites done') + }) + }); +}; + +run(); diff --git a/node_modules/buffer-writer/benchmark/int-16-benchmark.js b/node_modules/buffer-writer/benchmark/int-16-benchmark.js new file mode 100644 index 0000000..4a4e676 --- /dev/null +++ b/node_modules/buffer-writer/benchmark/int-16-benchmark.js @@ -0,0 +1,31 @@ +var Writer = require(__dirname + '/../'); + +module.exports = function() { + var writer = new Writer(); + writer.addInt16(-100000000); + writer.addInt16(-1000); + writer.addInt16(-1); + writer.addInt16(0); + writer.addInt16(1); + writer.addInt16(1000); + writer.addInt16(1000000000); + writer.addInt16(-100000000); + writer.addInt16(-100000000); + writer.addInt16(-1000); + writer.addInt16(-1); + writer.addInt16(0); + writer.addInt16(1); + writer.addInt16(1000); + writer.addInt16(1000000000); + writer.addInt16(-1000); + writer.addInt16(-1); + writer.addInt16(0); + writer.addInt16(1); + writer.addInt16(1000); + writer.addInt16(1000000000); +}; + +if(!module.parent) { + module.exports(); + console.log('benchmark ok'); +} diff --git a/node_modules/buffer-writer/benchmark/int-32-benchmark.js b/node_modules/buffer-writer/benchmark/int-32-benchmark.js new file mode 100644 index 0000000..bff4ace --- /dev/null +++ b/node_modules/buffer-writer/benchmark/int-32-benchmark.js @@ -0,0 +1,17 @@ +var Writer = require(__dirname + '/../'); + +module.exports = function() { + var writer = new Writer(); + writer.addInt32(-10000000000000); + writer.addInt32(-1000); + writer.addInt32(-1); + writer.addInt32(0); + writer.addInt32(1); + writer.addInt32(1000); + writer.addInt32(10000000000000); +}; + +if(!module.parent) { + module.exports(); + console.log('benchmark ok'); +} diff --git a/node_modules/buffer-writer/benchmark/join-benchmark.js b/node_modules/buffer-writer/benchmark/join-benchmark.js new file mode 100644 index 0000000..49e4238 --- /dev/null +++ b/node_modules/buffer-writer/benchmark/join-benchmark.js @@ -0,0 +1,16 @@ +var Writer = require(__dirname + '/../'); + +var writer = new Writer(); +writer.addCString('hello'); +writer.addCString('something else, really'); +writer.addInt32(38013); +writer.addCString('and that\'s all she wrote, folks\n...\n...not really'); + +module.exports = function() { + writer.join(0x50); +}; + +if(!module.parent) { + module.exports(); + console.log('benchmark ok'); +} diff --git a/node_modules/buffer-writer/benchmark/resize-benchmark.js b/node_modules/buffer-writer/benchmark/resize-benchmark.js new file mode 100644 index 0000000..3845566 --- /dev/null +++ b/node_modules/buffer-writer/benchmark/resize-benchmark.js @@ -0,0 +1,23 @@ +var Writer = require(__dirname + '/../'); + +var string = ""; +for(var i = 0; i < 10; i++) { + string += 'Once upon a time long ago there lived a little programming language named JavaScript'; +} + +module.exports = function() { + var writer = new Writer(4); + writer.addCString(string); + writer.addCString(string); + writer.addCString(string); + writer.addCString(string); + writer.addCString(string); + writer.addCString(string); + writer.addCString(string); + writer.addCString(string); +}; + +if(!module.parent) { + module.exports(); + console.log('benchmark ok'); +} diff --git a/node_modules/buffer-writer/benchmark/small-benchmark.js b/node_modules/buffer-writer/benchmark/small-benchmark.js new file mode 100644 index 0000000..1c129f3 --- /dev/null +++ b/node_modules/buffer-writer/benchmark/small-benchmark.js @@ -0,0 +1,14 @@ +var Writer = require(__dirname + '/../'); + +module.exports = function() { + var writer = new Writer(); + writer.addInt32(10); + writer.addInt16(5); + writer.addCString('test'); + writer.flush('X'); +}; + +if(!module.parent) { + module.exports(); + console.log('benchmark ok'); +} diff --git a/node_modules/buffer-writer/index.js b/node_modules/buffer-writer/index.js new file mode 100644 index 0000000..d4b463e --- /dev/null +++ b/node_modules/buffer-writer/index.js @@ -0,0 +1,129 @@ +//binary data writer tuned for creating +//postgres message packets as effeciently as possible by reusing the +//same buffer to avoid memcpy and limit memory allocations +var Writer = module.exports = function(size) { + this.size = size || 1024; + this.buffer = Buffer(this.size + 5); + this.offset = 5; + this.headerPosition = 0; +}; + +//resizes internal buffer if not enough size left +Writer.prototype._ensure = function(size) { + var remaining = this.buffer.length - this.offset; + if(remaining < size) { + var oldBuffer = this.buffer; + // exponential growth factor of around ~ 1.5 + // https://stackoverflow.com/questions/2269063/buffer-growth-strategy + var newSize = oldBuffer.length + (oldBuffer.length >> 1) + size; + this.buffer = new Buffer(newSize); + oldBuffer.copy(this.buffer); + } +}; + +Writer.prototype.addInt32 = function(num) { + this._ensure(4); + this.buffer[this.offset++] = (num >>> 24 & 0xFF); + this.buffer[this.offset++] = (num >>> 16 & 0xFF); + this.buffer[this.offset++] = (num >>> 8 & 0xFF); + this.buffer[this.offset++] = (num >>> 0 & 0xFF); + return this; +}; + +Writer.prototype.addInt16 = function(num) { + this._ensure(2); + this.buffer[this.offset++] = (num >>> 8 & 0xFF); + this.buffer[this.offset++] = (num >>> 0 & 0xFF); + return this; +}; + +//for versions of node requiring 'length' as 3rd argument to buffer.write +var writeString = function(buffer, string, offset, len) { + buffer.write(string, offset, len); +}; + +//overwrite function for older versions of node +if(Buffer.prototype.write.length === 3) { + writeString = function(buffer, string, offset, len) { + buffer.write(string, offset); + }; +} + +Writer.prototype.addCString = function(string) { + //just write a 0 for empty or null strings + if(!string) { + this._ensure(1); + } else { + var len = Buffer.byteLength(string); + this._ensure(len + 1); //+1 for null terminator + writeString(this.buffer, string, this.offset, len); + this.offset += len; + } + + this.buffer[this.offset++] = 0; // null terminator + return this; +}; + +Writer.prototype.addChar = function(c) { + this._ensure(1); + writeString(this.buffer, c, this.offset, 1); + this.offset++; + return this; +}; + +Writer.prototype.addString = function(string) { + string = string || ""; + var len = Buffer.byteLength(string); + this._ensure(len); + this.buffer.write(string, this.offset); + this.offset += len; + return this; +}; + +Writer.prototype.getByteLength = function() { + return this.offset - 5; +}; + +Writer.prototype.add = function(otherBuffer) { + this._ensure(otherBuffer.length); + otherBuffer.copy(this.buffer, this.offset); + this.offset += otherBuffer.length; + return this; +}; + +Writer.prototype.clear = function() { + this.offset = 5; + this.headerPosition = 0; + this.lastEnd = 0; +}; + +//appends a header block to all the written data since the last +//subsequent header or to the beginning if there is only one data block +Writer.prototype.addHeader = function(code, last) { + var origOffset = this.offset; + this.offset = this.headerPosition; + this.buffer[this.offset++] = code; + //length is everything in this packet minus the code + this.addInt32(origOffset - (this.headerPosition+1)); + //set next header position + this.headerPosition = origOffset; + //make space for next header + this.offset = origOffset; + if(!last) { + this._ensure(5); + this.offset += 5; + } +}; + +Writer.prototype.join = function(code) { + if(code) { + this.addHeader(code, true); + } + return this.buffer.slice(code ? 0 : 5, this.offset); +}; + +Writer.prototype.flush = function(code) { + var result = this.join(code); + this.clear(); + return result; +}; diff --git a/node_modules/buffer-writer/package.json b/node_modules/buffer-writer/package.json new file mode 100644 index 0000000..1a147ef --- /dev/null +++ b/node_modules/buffer-writer/package.json @@ -0,0 +1,97 @@ +{ + "_args": [ + [ + { + "raw": "buffer-writer@1.0.1", + "scope": null, + "escapedName": "buffer-writer", + "name": "buffer-writer", + "rawSpec": "1.0.1", + "spec": "1.0.1", + "type": "version" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/pg" + ] + ], + "_from": "buffer-writer@1.0.1", + "_id": "buffer-writer@1.0.1", + "_inCache": true, + "_location": "/buffer-writer", + "_nodeVersion": "5.5.0", + "_npmOperationalInternal": { + "host": "packages-5-east.internal.npmjs.com", + "tmp": "tmp/buffer-writer-1.0.1.tgz_1455554615929_0.2564993395935744" + }, + "_npmUser": { + "name": "brianc", + "email": "brian.m.carlson@gmail.com" + }, + "_npmVersion": "3.3.12", + "_phantomChildren": {}, + "_requested": { + "raw": "buffer-writer@1.0.1", + "scope": null, + "escapedName": "buffer-writer", + "name": "buffer-writer", + "rawSpec": "1.0.1", + "spec": "1.0.1", + "type": "version" + }, + "_requiredBy": [ + "/pg" + ], + "_resolved": "https://registry.npmjs.org/buffer-writer/-/buffer-writer-1.0.1.tgz", + "_shasum": "22a936901e3029afcd7547eb4487ceb697a3bf08", + "_shrinkwrap": null, + "_spec": "buffer-writer@1.0.1", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/pg", + "author": { + "name": "Brian M. Carlson" + }, + "bugs": { + "url": "https://github.com/brianc/node-buffer-writer/issues" + }, + "dependencies": {}, + "description": "a fast, efficient buffer writer", + "devDependencies": { + "async": "~0.2.6", + "bench": "~0.3.5", + "benchmark": "~1.0.0", + "cloned": "0.0.1", + "microtime": "~0.3.3", + "mocha": "~1.8.1", + "okay": "0.0.2", + "rmdir": "~1.0.0" + }, + "directories": {}, + "dist": { + "shasum": "22a936901e3029afcd7547eb4487ceb697a3bf08", + "tarball": "https://registry.npmjs.org/buffer-writer/-/buffer-writer-1.0.1.tgz" + }, + "gitHead": "d7c48cb142d87d76662954359bf1abcd25144329", + "homepage": "https://github.com/brianc/node-buffer-writer#readme", + "keywords": [ + "buffer", + "writer", + "builder" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "brianc", + "email": "brian.m.carlson@gmail.com" + } + ], + "name": "buffer-writer", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/brianc/node-buffer-writer.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "1.0.1" +} diff --git a/node_modules/buffer-writer/test/mocha.opts b/node_modules/buffer-writer/test/mocha.opts new file mode 100644 index 0000000..5efaf24 --- /dev/null +++ b/node_modules/buffer-writer/test/mocha.opts @@ -0,0 +1 @@ +--ui tdd diff --git a/node_modules/buffer-writer/test/writer-tests.js b/node_modules/buffer-writer/test/writer-tests.js new file mode 100644 index 0000000..685298a --- /dev/null +++ b/node_modules/buffer-writer/test/writer-tests.js @@ -0,0 +1,218 @@ +var Writer = require(__dirname + "/../"); + +var assert = require('assert'); +var util = require('util'); + +assert.equalBuffers = function(actual, expected) { + var spit = function(actual, expected) { + console.log(""); + console.log("actual " + util.inspect(actual)); + console.log("expect " + util.inspect(expected)); + console.log(""); + }; + if(actual.length != expected.length) { + spit(actual, expected); + assert.equal(actual.length, expected.length); + } + for(var i = 0; i < actual.length; i++) { + if(actual[i] != expected[i]) { + spit(actual, expected); + } + assert.equal(actual[i],expected[i]); + } +}; + +suite('adding int32', function() { + var testAddingInt32 = function(int, expectedBuffer) { + test('writes ' + int, function() { + var subject = new Writer(); + var result = subject.addInt32(int).join(); + assert.equalBuffers(result, expectedBuffer); + }); + }; + + testAddingInt32(0, [0, 0, 0, 0]); + testAddingInt32(1, [0, 0, 0, 1]); + testAddingInt32(256, [0, 0, 1, 0]); + test('writes largest int32', function() { + //todo need to find largest int32 when I have internet access + return false; + }); + + test('writing multiple int32s', function() { + var subject = new Writer(); + var result = subject.addInt32(1).addInt32(10).addInt32(0).join(); + assert.equalBuffers(result, [0, 0, 0, 1, 0, 0, 0, 0x0a, 0, 0, 0, 0]); + }); + + suite('having to resize the buffer', function() { + test('after resize correct result returned', function() { + var subject = new Writer(10); + subject.addInt32(1).addInt32(1).addInt32(1); + assert.equalBuffers(subject.join(), [0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1]); + }); + }); +}); + +suite('int16', function() { + test('writes 0', function() { + var subject = new Writer(); + var result = subject.addInt16(0).join(); + assert.equalBuffers(result, [0,0]); + }); + + test('writes 400', function() { + var subject = new Writer(); + var result = subject.addInt16(400).join(); + assert.equalBuffers(result, [1, 0x90]); + }); + + test('writes many', function() { + var subject = new Writer(); + var result = subject.addInt16(0).addInt16(1).addInt16(2).join(); + assert.equalBuffers(result, [0, 0, 0, 1, 0, 2]); + }); + + test('resizes if internal buffer fills up', function() { + var subject = new Writer(3); + var result = subject.addInt16(2).addInt16(3).join(); + assert.equalBuffers(result, [0, 2, 0, 3]); + }); + +}); + +suite('cString', function() { + test('writes empty cstring', function() { + var subject = new Writer(); + var result = subject.addCString().join(); + assert.equalBuffers(result, [0]); + }); + + test('writes two empty cstrings', function() { + var subject = new Writer(); + var result = subject.addCString("").addCString("").join(); + assert.equalBuffers(result, [0, 0]); + }); + + + test('writes non-empty cstring', function() { + var subject = new Writer(); + var result = subject.addCString("!!!").join(); + assert.equalBuffers(result, [33, 33, 33, 0]); + }); + + test('resizes if reached end', function() { + var subject = new Writer(3); + var result = subject.addCString("!!!").join(); + assert.equalBuffers(result, [33, 33, 33, 0]); + }); + + test('writes multiple cstrings', function() { + var subject = new Writer(); + var result = subject.addCString("!").addCString("!").join(); + assert.equalBuffers(result, [33, 0, 33, 0]); + }); + +}); + +test('writes char', function() { + var subject = new Writer(2); + var result = subject.addChar('a').addChar('b').addChar('c').join(); + assert.equalBuffers(result, [0x61, 0x62, 0x63]); +}); + +test('gets correct byte length', function() { + var subject = new Writer(5); + assert.equal(subject.getByteLength(), 0); + subject.addInt32(0); + assert.equal(subject.getByteLength(), 4); + subject.addCString("!"); + assert.equal(subject.getByteLength(), 6); +}); + +test('can add arbitrary buffer to the end', function() { + var subject = new Writer(4); + subject.addCString("!!!") + var result = subject.add(Buffer("@@@")).join(); + assert.equalBuffers(result, [33, 33, 33, 0, 0x40, 0x40, 0x40]); +}); + +suite('can write normal string', function() { + var subject = new Writer(4); + var result = subject.addString("!").join(); + assert.equalBuffers(result, [33]); + test('can write cString too', function() { + var result = subject.addCString("!").join(); + assert.equalBuffers(result, [33, 33, 0]); + }); + test('can resize', function() { + var result = subject.addString("!!").join(); + assert.equalBuffers(result, [33, 33, 0, 33, 33]); + }); +}); + + +suite('clearing', function() { + var subject = new Writer(); + subject.addCString("@!!#!#"); + subject.addInt32(10401); + test('clears', function() { + subject.clear(); + assert.equalBuffers(subject.join(), []); + }); + test('writing more', function() { + var joinedResult = subject.addCString("!").addInt32(9).addInt16(2).join(); + assert.equalBuffers(joinedResult, [33, 0, 0, 0, 0, 9, 0, 2]); + }); + test('returns result', function() { + var flushedResult = subject.flush(); + assert.equalBuffers(flushedResult, [33, 0, 0, 0, 0, 9, 0, 2]) + }); + test('clears the writer', function() { + assert.equalBuffers(subject.join(), []) + assert.equalBuffers(subject.flush(), []) + }); +}); + +test("resizing to much larger", function() { + var subject = new Writer(2); + var string = "!!!!!!!!"; + var result = subject.addCString(string).flush(); + assert.equalBuffers(result, [33, 33, 33, 33, 33, 33, 33, 33, 0]); +}); + +suite("flush", function() { + test('added as a hex code to a full writer', function() { + var subject = new Writer(2); + var result = subject.addCString("!").flush(0x50); + assert.equalBuffers(result, [0x50, 0, 0, 0, 6, 33, 0]); + }); + + test('added as a hex code to a non-full writer', function() { + var subject = new Writer(10).addCString("!"); + var joinedResult = subject.join(0x50); + var result = subject.flush(0x50); + assert.equalBuffers(result, [0x50, 0, 0, 0, 6, 33, 0]); + }); + + test('added as a hex code to a buffer which requires resizing', function() { + var result = new Writer(2).addCString("!!!!!!!!").flush(0x50); + assert.equalBuffers(result, [0x50, 0, 0, 0, 0x0D, 33, 33, 33, 33, 33, 33, 33, 33, 0]); + }); +}); + +suite("header", function() { + test('adding two packets with headers', function() { + var subject = new Writer(10).addCString("!"); + subject.addHeader(0x50); + subject.addCString("!!"); + subject.addHeader(0x40); + subject.addCString("!"); + var result = subject.flush(0x10); + assert.equalBuffers(result, [0x50, 0, 0, 0, 6, 33, 0, 0x40, 0, 0, 0, 7, 33, 33, 0, 0x10, 0, 0, 0, 6, 33, 0 ]); + }); +}); + + + + diff --git a/node_modules/builtin-modules/builtin-modules.json b/node_modules/builtin-modules/builtin-modules.json new file mode 100644 index 0000000..72670f6 --- /dev/null +++ b/node_modules/builtin-modules/builtin-modules.json @@ -0,0 +1,35 @@ +[ + "assert", + "buffer", + "child_process", + "cluster", + "console", + "constants", + "crypto", + "dgram", + "dns", + "domain", + "events", + "fs", + "http", + "https", + "module", + "net", + "os", + "path", + "process", + "punycode", + "querystring", + "readline", + "repl", + "stream", + "string_decoder", + "timers", + "tls", + "tty", + "url", + "util", + "v8", + "vm", + "zlib" +] diff --git a/node_modules/builtin-modules/index.js b/node_modules/builtin-modules/index.js new file mode 100644 index 0000000..9ef35ab --- /dev/null +++ b/node_modules/builtin-modules/index.js @@ -0,0 +1,10 @@ +'use strict'; + +var blacklist = [ + 'freelist', + 'sys' +]; + +module.exports = Object.keys(process.binding('natives')).filter(function (el) { + return !/^_|^internal|\//.test(el) && blacklist.indexOf(el) === -1; +}).sort(); diff --git a/node_modules/builtin-modules/license b/node_modules/builtin-modules/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/builtin-modules/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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. diff --git a/node_modules/builtin-modules/package.json b/node_modules/builtin-modules/package.json new file mode 100644 index 0000000..73e5177 --- /dev/null +++ b/node_modules/builtin-modules/package.json @@ -0,0 +1,104 @@ +{ + "_args": [ + [ + { + "raw": "builtin-modules@^1.0.0", + "scope": null, + "escapedName": "builtin-modules", + "name": "builtin-modules", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/is-builtin-module" + ] + ], + "_from": "builtin-modules@>=1.0.0 <2.0.0", + "_id": "builtin-modules@1.1.1", + "_inCache": true, + "_location": "/builtin-modules", + "_nodeVersion": "5.3.0", + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "3.3.12", + "_phantomChildren": {}, + "_requested": { + "raw": "builtin-modules@^1.0.0", + "scope": null, + "escapedName": "builtin-modules", + "name": "builtin-modules", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/is-builtin-module" + ], + "_resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "_shasum": "270f076c5a72c02f5b65a47df94c5fe3a278892f", + "_shrinkwrap": null, + "_spec": "builtin-modules@^1.0.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/is-builtin-module", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/builtin-modules/issues" + }, + "dependencies": {}, + "description": "List of the Node.js builtin modules", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "270f076c5a72c02f5b65a47df94c5fe3a278892f", + "tarball": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js", + "static.js", + "builtin-modules.json" + ], + "gitHead": "0ea253452b1d8cb3a70d16464f909dbc0bc370fe", + "homepage": "https://github.com/sindresorhus/builtin-modules#readme", + "keywords": [ + "builtin", + "built-in", + "builtins", + "node", + "modules", + "core", + "bundled", + "list", + "array", + "names" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "builtin-modules", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/builtin-modules.git" + }, + "scripts": { + "make": "node make.js", + "test": "xo && ava" + }, + "version": "1.1.1" +} diff --git a/node_modules/builtin-modules/readme.md b/node_modules/builtin-modules/readme.md new file mode 100644 index 0000000..f1894b1 --- /dev/null +++ b/node_modules/builtin-modules/readme.md @@ -0,0 +1,41 @@ +# builtin-modules [![Build Status](https://travis-ci.org/sindresorhus/builtin-modules.svg?branch=master)](https://travis-ci.org/sindresorhus/builtin-modules) + +> List of the Node.js builtin modules + +The list is just a [JSON file](builtin-modules.json) and can be used wherever. + + +## Install + +``` +$ npm install --save builtin-modules +``` + + +## Usage + +```js +var builtinModules = require('builtin-modules'); + +console.log(builinModules); +//=> ['assert', 'buffer', ...] +``` + + +## API + +Returns an array of builtin modules fetched from the running Node.js version. + +### Static list + +This module also comes bundled with a static array of builtin modules generated from the latest Node.js version. You can get it with `require('builtin-modules/static');` + + +## Related + +- [is-builtin-module](https://github.com/sindresorhus/is-builtin-module) - Check if a string matches the name of a Node.js builtin module + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/builtin-modules/static.js b/node_modules/builtin-modules/static.js new file mode 100644 index 0000000..9508f8f --- /dev/null +++ b/node_modules/builtin-modules/static.js @@ -0,0 +1,2 @@ +'use strict'; +module.exports = require('./builtin-modules.json'); diff --git a/node_modules/bytes/History.md b/node_modules/bytes/History.md new file mode 100644 index 0000000..56932a4 --- /dev/null +++ b/node_modules/bytes/History.md @@ -0,0 +1,70 @@ +2.4.0 / 2016-06-01 +================== + + * Add option "unitSeparator" + +2.3.0 / 2016-02-15 +================== + + * Drop partial bytes on all parsed units + * Fix non-finite numbers to `.format` to return `null` + * Fix parsing byte string that looks like hex + * perf: hoist regular expressions + +2.2.0 / 2015-11-13 +================== + + * add option "decimalPlaces" + * add option "fixedDecimals" + +2.1.0 / 2015-05-21 +================== + + * add `.format` export + * add `.parse` export + +2.0.2 / 2015-05-20 +================== + + * remove map recreation + * remove unnecessary object construction + +2.0.1 / 2015-05-07 +================== + + * fix browserify require + * remove node.extend dependency + +2.0.0 / 2015-04-12 +================== + + * add option "case" + * add option "thousandsSeparator" + * return "null" on invalid parse input + * support proper round-trip: bytes(bytes(num)) === num + * units no longer case sensitive when parsing + +1.0.0 / 2014-05-05 +================== + + * add negative support. fixes #6 + +0.3.0 / 2014-03-19 +================== + + * added terabyte support + +0.2.1 / 2013-04-01 +================== + + * add .component + +0.2.0 / 2012-10-28 +================== + + * bytes(200).should.eql('200b') + +0.1.0 / 2012-07-04 +================== + + * add bytes to string conversion [yields] diff --git a/node_modules/bytes/LICENSE b/node_modules/bytes/LICENSE new file mode 100644 index 0000000..63e95a9 --- /dev/null +++ b/node_modules/bytes/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2012-2014 TJ Holowaychuk +Copyright (c) 2015 Jed Watson + +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. diff --git a/node_modules/bytes/Readme.md b/node_modules/bytes/Readme.md new file mode 100644 index 0000000..7465fde --- /dev/null +++ b/node_modules/bytes/Readme.md @@ -0,0 +1,114 @@ +# Bytes utility + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Build Status][travis-image]][travis-url] + +Utility to parse a string bytes (ex: `1TB`) to bytes (`1099511627776`) and vice-versa. + +## Usage + +```js +var bytes = require('bytes'); +``` + +#### bytes.format(number value, [options]): string|null + +Format the given value in bytes into a string. If the value is negative, it is kept as such. If it is a float, it is + rounded. + +**Arguments** + +| Name | Type | Description | +|---------|--------|--------------------| +| value | `number` | Value in bytes | +| options | `Object` | Conversion options | + +**Options** + +| Property | Type | Description | +|-------------------|--------|-----------------------------------------------------------------------------------------| +| decimalPlaces | `number`|`null` | Maximum number of decimal places to include in output. Default value to `2`. | +| fixedDecimals | `boolean`|`null` | Whether to always display the maximum number of decimal places. Default value to `false` | +| thousandsSeparator | `string`|`null` | Example of values: `' '`, `','` and `.`... Default value to `' '`. | +| unitSeparator | `string`|`null` | Separator to use between number and unit. Default value to `''`. | + +**Returns** + +| Name | Type | Description | +|---------|-------------|-------------------------| +| results | `string`|`null` | Return null upon error. String value otherwise. | + +**Example** + +```js +bytes(1024); +// output: '1kB' + +bytes(1000); +// output: '1000B' + +bytes(1000, {thousandsSeparator: ' '}); +// output: '1 000B' + +bytes(1024 * 1.7, {decimalPlaces: 0}); +// output: '2kB' + +bytes(1024, {unitSeparator: ' '}); +// output: '1 kB' + +``` + +#### bytes.parse(string value): number|null + +Parse the string value into an integer in bytes. If no unit is given, it is assumed the value is in bytes. + +Supported units and abbreviations are as follows and are case-insensitive: + + * "b" for bytes + * "kb" for kilobytes + * "mb" for megabytes + * "gb" for gigabytes + * "tb" for terabytes + +The units are in powers of two, not ten. This means 1kb = 1024b according to this parser. + +**Arguments** + +| Name | Type | Description | +|---------------|--------|--------------------| +| value | `string` | String to parse. | + +**Returns** + +| Name | Type | Description | +|---------|-------------|-------------------------| +| results | `number`|`null` | Return null upon error. Value in bytes otherwise. | + +**Example** + +```js +bytes('1kB'); +// output: 1024 + +bytes('1024'); +// output: 1024 +``` + +## Installation + +```bash +npm install bytes --save +component install visionmedia/bytes.js +``` + +## License + +[![npm](https://img.shields.io/npm/l/express.svg)](https://github.com/visionmedia/bytes.js/blob/master/LICENSE) + +[downloads-image]: https://img.shields.io/npm/dm/bytes.svg +[downloads-url]: https://npmjs.org/package/bytes +[npm-image]: https://img.shields.io/npm/v/bytes.svg +[npm-url]: https://npmjs.org/package/bytes +[travis-image]: https://img.shields.io/travis/visionmedia/bytes.js/master.svg +[travis-url]: https://travis-ci.org/visionmedia/bytes.js diff --git a/node_modules/bytes/index.js b/node_modules/bytes/index.js new file mode 100644 index 0000000..aa24231 --- /dev/null +++ b/node_modules/bytes/index.js @@ -0,0 +1,157 @@ +/*! + * bytes + * Copyright(c) 2012-2014 TJ Holowaychuk + * Copyright(c) 2015 Jed Watson + * MIT Licensed + */ + +'use strict'; + +/** + * Module exports. + * @public + */ + +module.exports = bytes; +module.exports.format = format; +module.exports.parse = parse; + +/** + * Module variables. + * @private + */ + +var formatThousandsRegExp = /\B(?=(\d{3})+(?!\d))/g; + +var formatDecimalsRegExp = /(?:\.0*|(\.[^0]+)0+)$/; + +var map = { + b: 1, + kb: 1 << 10, + mb: 1 << 20, + gb: 1 << 30, + tb: ((1 << 30) * 1024) +}; + +// TODO: use is-finite module? +var numberIsFinite = Number.isFinite || function (v) { return typeof v === 'number' && isFinite(v); }; + +var parseRegExp = /^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb)$/i; + +/** + * Convert the given value in bytes into a string or parse to string to an integer in bytes. + * + * @param {string|number} value + * @param {{ + * case: [string], + * decimalPlaces: [number] + * fixedDecimals: [boolean] + * thousandsSeparator: [string] + * unitSeparator: [string] + * }} [options] bytes options. + * + * @returns {string|number|null} + */ + +function bytes(value, options) { + if (typeof value === 'string') { + return parse(value); + } + + if (typeof value === 'number') { + return format(value, options); + } + + return null; +} + +/** + * Format the given value in bytes into a string. + * + * If the value is negative, it is kept as such. If it is a float, + * it is rounded. + * + * @param {number} value + * @param {object} [options] + * @param {number} [options.decimalPlaces=2] + * @param {number} [options.fixedDecimals=false] + * @param {string} [options.thousandsSeparator=] + * @param {string} [options.unitSeparator=] + * + * @returns {string|null} + * @public + */ + +function format(value, options) { + if (!numberIsFinite(value)) { + return null; + } + + var mag = Math.abs(value); + var thousandsSeparator = (options && options.thousandsSeparator) || ''; + var unitSeparator = (options && options.unitSeparator) || ''; + var decimalPlaces = (options && options.decimalPlaces !== undefined) ? options.decimalPlaces : 2; + var fixedDecimals = Boolean(options && options.fixedDecimals); + var unit = 'B'; + + if (mag >= map.tb) { + unit = 'TB'; + } else if (mag >= map.gb) { + unit = 'GB'; + } else if (mag >= map.mb) { + unit = 'MB'; + } else if (mag >= map.kb) { + unit = 'kB'; + } + + var val = value / map[unit.toLowerCase()]; + var str = val.toFixed(decimalPlaces); + + if (!fixedDecimals) { + str = str.replace(formatDecimalsRegExp, '$1'); + } + + if (thousandsSeparator) { + str = str.replace(formatThousandsRegExp, thousandsSeparator); + } + + return str + unitSeparator + unit; +} + +/** + * Parse the string value into an integer in bytes. + * + * If no unit is given, it is assumed the value is in bytes. + * + * @param {number|string} val + * + * @returns {number|null} + * @public + */ + +function parse(val) { + if (typeof val === 'number' && !isNaN(val)) { + return val; + } + + if (typeof val !== 'string') { + return null; + } + + // Test if the string passed is valid + var results = parseRegExp.exec(val); + var floatValue; + var unit = 'b'; + + if (!results) { + // Nothing could be extracted from the given string + floatValue = parseInt(val, 10); + unit = 'b' + } else { + // Retrieve the value and the unit + floatValue = parseFloat(results[1]); + unit = results[4].toLowerCase(); + } + + return Math.floor(map[unit] * floatValue); +} diff --git a/node_modules/bytes/package.json b/node_modules/bytes/package.json new file mode 100644 index 0000000..4e89ad2 --- /dev/null +++ b/node_modules/bytes/package.json @@ -0,0 +1,120 @@ +{ + "_args": [ + [ + { + "raw": "bytes@2.4.0", + "scope": null, + "escapedName": "bytes", + "name": "bytes", + "rawSpec": "2.4.0", + "spec": "2.4.0", + "type": "version" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/body-parser" + ] + ], + "_from": "bytes@2.4.0", + "_id": "bytes@2.4.0", + "_inCache": true, + "_location": "/bytes", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/bytes-2.4.0.tgz_1464812473023_0.6271433881483972" + }, + "_npmUser": { + "name": "dougwilson", + "email": "doug@somethingdoug.com" + }, + "_npmVersion": "1.4.28", + "_phantomChildren": {}, + "_requested": { + "raw": "bytes@2.4.0", + "scope": null, + "escapedName": "bytes", + "name": "bytes", + "rawSpec": "2.4.0", + "spec": "2.4.0", + "type": "version" + }, + "_requiredBy": [ + "/body-parser", + "/raw-body" + ], + "_resolved": "https://registry.npmjs.org/bytes/-/bytes-2.4.0.tgz", + "_shasum": "7d97196f9d5baf7f6935e25985549edd2a6c2339", + "_shrinkwrap": null, + "_spec": "bytes@2.4.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/body-parser", + "author": { + "name": "TJ Holowaychuk", + "email": "tj@vision-media.ca", + "url": "http://tjholowaychuk.com" + }, + "bugs": { + "url": "https://github.com/visionmedia/bytes.js/issues" + }, + "component": { + "scripts": { + "bytes/index.js": "index.js" + } + }, + "contributors": [ + { + "name": "Jed Watson", + "email": "jed.watson@me.com" + }, + { + "name": "Théo FIDRY", + "email": "theo.fidry@gmail.com" + } + ], + "dependencies": {}, + "description": "Utility to parse a string bytes to bytes and vice-versa", + "devDependencies": { + "mocha": "1.21.5" + }, + "directories": {}, + "dist": { + "shasum": "7d97196f9d5baf7f6935e25985549edd2a6c2339", + "tarball": "https://registry.npmjs.org/bytes/-/bytes-2.4.0.tgz" + }, + "files": [ + "History.md", + "LICENSE", + "Readme.md", + "index.js" + ], + "gitHead": "2a598442bdfa796df8d01a96cc54495cda550e70", + "homepage": "https://github.com/visionmedia/bytes.js", + "keywords": [ + "byte", + "bytes", + "utility", + "parse", + "parser", + "convert", + "converter" + ], + "license": "MIT", + "maintainers": [ + { + "name": "dougwilson", + "email": "doug@somethingdoug.com" + }, + { + "name": "tjholowaychuk", + "email": "tj@vision-media.ca" + } + ], + "name": "bytes", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/visionmedia/bytes.js.git" + }, + "scripts": { + "test": "mocha --check-leaks --reporter spec" + }, + "version": "2.4.0" +} diff --git a/node_modules/camelcase/index.js b/node_modules/camelcase/index.js new file mode 100644 index 0000000..b46e100 --- /dev/null +++ b/node_modules/camelcase/index.js @@ -0,0 +1,27 @@ +'use strict'; +module.exports = function () { + var str = [].map.call(arguments, function (str) { + return str.trim(); + }).filter(function (str) { + return str.length; + }).join('-'); + + if (!str.length) { + return ''; + } + + if (str.length === 1 || !(/[_.\- ]+/).test(str) ) { + if (str[0] === str[0].toLowerCase() && str.slice(1) !== str.slice(1).toLowerCase()) { + return str; + } + + return str.toLowerCase(); + } + + return str + .replace(/^[_.\- ]+/, '') + .toLowerCase() + .replace(/[_.\- ]+(\w|$)/g, function (m, p1) { + return p1.toUpperCase(); + }); +}; diff --git a/node_modules/camelcase/license b/node_modules/camelcase/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/camelcase/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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. diff --git a/node_modules/camelcase/package.json b/node_modules/camelcase/package.json new file mode 100644 index 0000000..00fe225 --- /dev/null +++ b/node_modules/camelcase/package.json @@ -0,0 +1,102 @@ +{ + "_args": [ + [ + { + "raw": "camelcase@^1.0.2", + "scope": null, + "escapedName": "camelcase", + "name": "camelcase", + "rawSpec": "^1.0.2", + "spec": ">=1.0.2 <2.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/yargs" + ] + ], + "_from": "camelcase@>=1.0.2 <2.0.0", + "_id": "camelcase@1.2.1", + "_inCache": true, + "_location": "/camelcase", + "_nodeVersion": "0.12.5", + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "2.11.2", + "_phantomChildren": {}, + "_requested": { + "raw": "camelcase@^1.0.2", + "scope": null, + "escapedName": "camelcase", + "name": "camelcase", + "rawSpec": "^1.0.2", + "spec": ">=1.0.2 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/yargs" + ], + "_resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "_shasum": "9bb5304d2e0b56698b2c758b08a3eaa9daa58a39", + "_shrinkwrap": null, + "_spec": "camelcase@^1.0.2", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/yargs", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/camelcase/issues" + }, + "dependencies": {}, + "description": "Convert a dash/dot/underscore/space separated string to camelCase: foo-bar → fooBar", + "devDependencies": { + "ava": "0.0.4" + }, + "directories": {}, + "dist": { + "shasum": "9bb5304d2e0b56698b2c758b08a3eaa9daa58a39", + "tarball": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "185ba12da723be9c1ee986cc2956bdc4c517a141", + "homepage": "https://github.com/sindresorhus/camelcase", + "keywords": [ + "camelcase", + "camel-case", + "camel", + "case", + "dash", + "hyphen", + "dot", + "underscore", + "separator", + "string", + "text", + "convert" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "camelcase", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/camelcase.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.2.1" +} diff --git a/node_modules/camelcase/readme.md b/node_modules/camelcase/readme.md new file mode 100644 index 0000000..516dc39 --- /dev/null +++ b/node_modules/camelcase/readme.md @@ -0,0 +1,56 @@ +# camelcase [![Build Status](https://travis-ci.org/sindresorhus/camelcase.svg?branch=master)](https://travis-ci.org/sindresorhus/camelcase) + +> Convert a dash/dot/underscore/space separated string to camelCase: `foo-bar` → `fooBar` + + +## Install + +```sh +$ npm install --save camelcase +``` + + +## Usage + +```js +var camelCase = require('camelcase'); + +camelCase('foo-bar'); +//=> fooBar + +camelCase('foo_bar'); +//=> fooBar + +camelCase('Foo-Bar'); +//=> fooBar + +camelCase('--foo.bar'); +//=> fooBar + +camelCase('__foo__bar__'); +//=> fooBar + +camelCase('foo bar'); +//=> fooBar + +console.log(process.argv[3]); +//=> --foo-bar +camelCase(process.argv[3]); +//=> fooBar + +camelCase('foo', 'bar'); +//=> fooBar + +camelCase('__foo__', '--bar'); +//=> fooBar +``` + + +## Related + +See [`decamelize`](https://github.com/sindresorhus/decamelize) for the inverse. + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/center-align/LICENSE b/node_modules/center-align/LICENSE new file mode 100644 index 0000000..65f90ac --- /dev/null +++ b/node_modules/center-align/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, Jon Schlinkert. + +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. diff --git a/node_modules/center-align/README.md b/node_modules/center-align/README.md new file mode 100644 index 0000000..cbcf3be --- /dev/null +++ b/node_modules/center-align/README.md @@ -0,0 +1,74 @@ +# center-align [![NPM version](https://badge.fury.io/js/center-align.svg)](http://badge.fury.io/js/center-align) + +> Center-align the text in a string. + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i center-align --save +``` + +## Usage + +```js +var centerAlign = require('center-align'); +``` + +**Example** + +If used on the following: + +``` +Lorem ipsum dolor sit amet, +consectetur adipiscing +elit, sed do eiusmod tempor incididunt +ut labore et dolore +magna aliqua. Ut enim ad minim +veniam, quis +``` + +The result would be: + +``` + Lorem ipsum dolor sit amet, + consectetur adipiscing +elit, sed do eiusmod tempor incididunt + ut labore et dolore + magna aliqua. Ut enim ad minim + veniam, quis +``` + +## Related projects + +* [align-text](https://www.npmjs.com/package/align-text): Align the text in a string. | [homepage](https://github.com/jonschlinkert/align-text) +* [justified](https://www.npmjs.com/package/justified): Wrap words to a specified length and justified the text. | [homepage](https://github.com/jonschlinkert/justified) +* [right-align](https://www.npmjs.com/package/right-align): Right-align the text in a string. | [homepage](https://github.com/jonschlinkert/right-align) +* [word-wrap](https://www.npmjs.com/package/word-wrap): Wrap words to a specified length. | [homepage](https://github.com/jonschlinkert/word-wrap) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/center-align/issues/new). + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on October 27, 2015._ \ No newline at end of file diff --git a/node_modules/center-align/index.js b/node_modules/center-align/index.js new file mode 100644 index 0000000..c6ed54a --- /dev/null +++ b/node_modules/center-align/index.js @@ -0,0 +1,16 @@ +/*! + * center-align + * + * Copycenter (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var utils = require('./utils'); + +module.exports = function centerAlign(val) { + return utils.align(val, function (len, longest) { + return Math.floor((longest - len) / 2); + }); +}; diff --git a/node_modules/center-align/package.json b/node_modules/center-align/package.json new file mode 100644 index 0000000..ff4a42c --- /dev/null +++ b/node_modules/center-align/package.json @@ -0,0 +1,121 @@ +{ + "_args": [ + [ + { + "raw": "center-align@^0.1.1", + "scope": null, + "escapedName": "center-align", + "name": "center-align", + "rawSpec": "^0.1.1", + "spec": ">=0.1.1 <0.2.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/cliui" + ] + ], + "_from": "center-align@>=0.1.1 <0.2.0", + "_id": "center-align@0.1.3", + "_inCache": true, + "_location": "/center-align", + "_nodeVersion": "5.3.0", + "_npmOperationalInternal": { + "host": "packages-9-west.internal.npmjs.com", + "tmp": "tmp/center-align-0.1.3.tgz_1454366538829_0.9471865000668913" + }, + "_npmUser": { + "name": "jonschlinkert", + "email": "github@sellside.com" + }, + "_npmVersion": "3.3.12", + "_phantomChildren": {}, + "_requested": { + "raw": "center-align@^0.1.1", + "scope": null, + "escapedName": "center-align", + "name": "center-align", + "rawSpec": "^0.1.1", + "spec": ">=0.1.1 <0.2.0", + "type": "range" + }, + "_requiredBy": [ + "/cliui" + ], + "_resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "_shasum": "aa0d32629b6ee972200411cbd4461c907bc2b7ad", + "_shrinkwrap": null, + "_spec": "center-align@^0.1.1", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/cliui", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/center-align/issues" + }, + "dependencies": { + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" + }, + "description": "Center-align the text in a string.", + "devDependencies": { + "mocha": "^2.2.0" + }, + "directories": {}, + "dist": { + "shasum": "aa0d32629b6ee972200411cbd4461c907bc2b7ad", + "tarball": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js", + "utils.js" + ], + "gitHead": "5c5fab5012fceaa3e21a00162958c0ed11109419", + "homepage": "https://github.com/jonschlinkert/center-align", + "keywords": [ + "align", + "align-center", + "center", + "center-align", + "right", + "right-align", + "text", + "typography" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "doowb", + "email": "brian.woodward@gmail.com" + }, + { + "name": "jonschlinkert", + "email": "github@sellside.com" + } + ], + "name": "center-align", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/center-align.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "related": { + "description": "", + "list": [ + "align-text", + "right-align", + "justified", + "word-wrap" + ] + } + }, + "version": "0.1.3" +} diff --git a/node_modules/center-align/utils.js b/node_modules/center-align/utils.js new file mode 100644 index 0000000..aead6d2 --- /dev/null +++ b/node_modules/center-align/utils.js @@ -0,0 +1,40 @@ +'use strict'; + +/** + * Lazily-required module dependencies (makes the application + * faster) + */ + +var utils = require('lazy-cache')(require); + +/** + * Temporarily re-assign `require` to trick browserify and + * webpack into reconizing lazy dependencies. + * + * This tiny bit of ugliness has the huge dual advantage of + * only loading modules that are actually called at some + * point in the lifecycle of the application, whilst also + * allowing browserify and webpack to find modules that + * are depended on but never actually called. + */ + +var fn = require; +require = utils; + +/** + * Lazily required module dependencies + */ + +require('align-text', 'align'); + +/** + * Restore `require` + */ + +require = fn; + +/** + * Expose `utils` modules + */ + +module.exports = utils; diff --git a/node_modules/chalk/index.js b/node_modules/chalk/index.js new file mode 100644 index 0000000..2d85a91 --- /dev/null +++ b/node_modules/chalk/index.js @@ -0,0 +1,116 @@ +'use strict'; +var escapeStringRegexp = require('escape-string-regexp'); +var ansiStyles = require('ansi-styles'); +var stripAnsi = require('strip-ansi'); +var hasAnsi = require('has-ansi'); +var supportsColor = require('supports-color'); +var defineProps = Object.defineProperties; +var isSimpleWindowsTerm = process.platform === 'win32' && !/^xterm/i.test(process.env.TERM); + +function Chalk(options) { + // detect mode if not set manually + this.enabled = !options || options.enabled === undefined ? supportsColor : options.enabled; +} + +// use bright blue on Windows as the normal blue color is illegible +if (isSimpleWindowsTerm) { + ansiStyles.blue.open = '\u001b[94m'; +} + +var styles = (function () { + var ret = {}; + + Object.keys(ansiStyles).forEach(function (key) { + ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); + + ret[key] = { + get: function () { + return build.call(this, this._styles.concat(key)); + } + }; + }); + + return ret; +})(); + +var proto = defineProps(function chalk() {}, styles); + +function build(_styles) { + var builder = function () { + return applyStyle.apply(builder, arguments); + }; + + builder._styles = _styles; + builder.enabled = this.enabled; + // __proto__ is used because we must return a function, but there is + // no way to create a function with a different prototype. + /* eslint-disable no-proto */ + builder.__proto__ = proto; + + return builder; +} + +function applyStyle() { + // support varags, but simply cast to string in case there's only one arg + var args = arguments; + var argsLen = args.length; + var str = argsLen !== 0 && String(arguments[0]); + + if (argsLen > 1) { + // don't slice `arguments`, it prevents v8 optimizations + for (var a = 1; a < argsLen; a++) { + str += ' ' + args[a]; + } + } + + if (!this.enabled || !str) { + return str; + } + + var nestedStyles = this._styles; + var i = nestedStyles.length; + + // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, + // see https://github.com/chalk/chalk/issues/58 + // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. + var originalDim = ansiStyles.dim.open; + if (isSimpleWindowsTerm && (nestedStyles.indexOf('gray') !== -1 || nestedStyles.indexOf('grey') !== -1)) { + ansiStyles.dim.open = ''; + } + + while (i--) { + var code = ansiStyles[nestedStyles[i]]; + + // Replace any instances already present with a re-opening code + // otherwise only the part of the string until said closing code + // will be colored, and the rest will simply be 'plain'. + str = code.open + str.replace(code.closeRe, code.open) + code.close; + } + + // Reset the original 'dim' if we changed it to work around the Windows dimmed gray issue. + ansiStyles.dim.open = originalDim; + + return str; +} + +function init() { + var ret = {}; + + Object.keys(styles).forEach(function (name) { + ret[name] = { + get: function () { + return build.call(this, [name]); + } + }; + }); + + return ret; +} + +defineProps(Chalk.prototype, init()); + +module.exports = new Chalk(); +module.exports.styles = ansiStyles; +module.exports.hasColor = hasAnsi; +module.exports.stripColor = stripAnsi; +module.exports.supportsColor = supportsColor; diff --git a/node_modules/chalk/license b/node_modules/chalk/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/chalk/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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. diff --git a/node_modules/chalk/package.json b/node_modules/chalk/package.json new file mode 100644 index 0000000..488a345 --- /dev/null +++ b/node_modules/chalk/package.json @@ -0,0 +1,143 @@ +{ + "_args": [ + [ + { + "raw": "chalk@^1.0.0", + "scope": null, + "escapedName": "chalk", + "name": "chalk", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/gulp" + ] + ], + "_from": "chalk@>=1.0.0 <2.0.0", + "_id": "chalk@1.1.3", + "_inCache": true, + "_location": "/chalk", + "_nodeVersion": "0.10.32", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/chalk-1.1.3.tgz_1459210604109_0.3892582862172276" + }, + "_npmUser": { + "name": "qix", + "email": "i.am.qix@gmail.com" + }, + "_npmVersion": "2.14.2", + "_phantomChildren": {}, + "_requested": { + "raw": "chalk@^1.0.0", + "scope": null, + "escapedName": "chalk", + "name": "chalk", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fancy-log", + "/gulp", + "/gulp-help", + "/gulp-util" + ], + "_resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "_shasum": "a8115c55e4a702fe4d150abd3872822a7e09fc98", + "_shrinkwrap": null, + "_spec": "chalk@^1.0.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/gulp", + "bugs": { + "url": "https://github.com/chalk/chalk/issues" + }, + "dependencies": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "description": "Terminal string styling done right. Much color.", + "devDependencies": { + "coveralls": "^2.11.2", + "matcha": "^0.6.0", + "mocha": "*", + "nyc": "^3.0.0", + "require-uncached": "^1.0.2", + "resolve-from": "^1.0.0", + "semver": "^4.3.3", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "a8115c55e4a702fe4d150abd3872822a7e09fc98", + "tarball": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "0d8d8c204eb87a4038219131ad4d8369c9f59d24", + "homepage": "https://github.com/chalk/chalk#readme", + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "str", + "ansi", + "style", + "styles", + "tty", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "license": "MIT", + "maintainers": [ + { + "name": "qix", + "email": "i.am.qix@gmail.com" + }, + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + { + "name": "unicorn", + "email": "sindresorhus+unicorn@gmail.com" + } + ], + "name": "chalk", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/chalk.git" + }, + "scripts": { + "bench": "matcha benchmark.js", + "coverage": "nyc npm test && nyc report", + "coveralls": "nyc npm test && nyc report --reporter=text-lcov | coveralls", + "test": "xo && mocha" + }, + "version": "1.1.3", + "xo": { + "envs": [ + "node", + "mocha" + ] + } +} diff --git a/node_modules/chalk/readme.md b/node_modules/chalk/readme.md new file mode 100644 index 0000000..5cf111e --- /dev/null +++ b/node_modules/chalk/readme.md @@ -0,0 +1,213 @@ +

+
+
+ chalk +
+
+
+

+ +> Terminal string styling done right + +[![Build Status](https://travis-ci.org/chalk/chalk.svg?branch=master)](https://travis-ci.org/chalk/chalk) +[![Coverage Status](https://coveralls.io/repos/chalk/chalk/badge.svg?branch=master)](https://coveralls.io/r/chalk/chalk?branch=master) +[![](http://img.shields.io/badge/unicorn-approved-ff69b4.svg)](https://www.youtube.com/watch?v=9auOCbH5Ns4) + + +[colors.js](https://github.com/Marak/colors.js) used to be the most popular string styling module, but it has serious deficiencies like extending `String.prototype` which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68). Although there are other ones, they either do too much or not enough. + +**Chalk is a clean and focused alternative.** + +![](https://github.com/chalk/ansi-styles/raw/master/screenshot.png) + + +## Why + +- Highly performant +- Doesn't extend `String.prototype` +- Expressive API +- Ability to nest styles +- Clean and focused +- Auto-detects color support +- Actively maintained +- [Used by ~4500 modules](https://www.npmjs.com/browse/depended/chalk) as of July 15, 2015 + + +## Install + +``` +$ npm install --save chalk +``` + + +## Usage + +Chalk comes with an easy to use composable API where you just chain and nest the styles you want. + +```js +var chalk = require('chalk'); + +// style a string +chalk.blue('Hello world!'); + +// combine styled and normal strings +chalk.blue('Hello') + 'World' + chalk.red('!'); + +// compose multiple styles using the chainable API +chalk.blue.bgRed.bold('Hello world!'); + +// pass in multiple arguments +chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz'); + +// nest styles +chalk.red('Hello', chalk.underline.bgBlue('world') + '!'); + +// nest styles of the same type even (color, underline, background) +chalk.green( + 'I am a green line ' + + chalk.blue.underline.bold('with a blue substring') + + ' that becomes green again!' +); +``` + +Easily define your own themes. + +```js +var chalk = require('chalk'); +var error = chalk.bold.red; +console.log(error('Error!')); +``` + +Take advantage of console.log [string substitution](http://nodejs.org/docs/latest/api/console.html#console_console_log_data). + +```js +var name = 'Sindre'; +console.log(chalk.green('Hello %s'), name); +//=> Hello Sindre +``` + + +## API + +### chalk.`', + // -- output -- + ''); + bth( + '', + // -- output -- + ''); + bth( + '', + // -- output -- + ''); + bth( + '', + // -- output -- + ''); + bth( + '', + // -- output -- + ''); + + + //============================================================ + // Attribute Wrap alignment with spaces - () + reset_options(); + opts.wrap_attributes = 'force-aligned'; + opts.indent_with_tabs = true; + test_fragment( + '
test
', + // -- output -- + '
\n' + + '\t
\n' + + '\t\t
test
\n' + + '\t
\n' + + '
'); + + + //============================================================ + // Attribute Wrap de-indent - () + reset_options(); + opts.wrap_attributes = 'force-aligned'; + opts.indent_with_tabs = false; + bth( + '
test
', + // -- output -- + '
\n' + + '
test
\n' + + '
'); + + + //============================================================ + // Attribute Wrap - (indent_attr = "\n ", indent_attr_first = " ", indent_end = "", indent_end_selfclosing = " ", indent_over80 = "\n ") + reset_options(); + opts.wrap_attributes = 'force'; + test_fragment('
This is some text
', '
This is some text
'); + test_fragment('
This is some text
', '
This is some text
'); + test_fragment( + '
This is some text
', + // -- output -- + '
This is some text
'); + test_fragment( + '
This is some text
', + // -- output -- + '
This is some text
'); + test_fragment( + '', + // -- output -- + ''); + test_fragment( + '', + // -- output -- + '\n' + + ''); + test_fragment( + '', + // -- output -- + ''); + + // Attribute Wrap - (indent_attr = "\n ", indent_attr_first = " ", indent_end = "", indent_end_selfclosing = " ", indent_over80 = "\n ") + reset_options(); + opts.wrap_attributes = 'force'; + opts.wrap_line_length = 80; + test_fragment('
This is some text
', '
This is some text
'); + test_fragment('
This is some text
', '
This is some text
'); + test_fragment( + '
This is some text
', + // -- output -- + '
This is some text
'); + test_fragment( + '
This is some text
', + // -- output -- + '
This is some text
'); + test_fragment( + '', + // -- output -- + ''); + test_fragment( + '', + // -- output -- + '\n' + + ''); + test_fragment( + '', + // -- output -- + ''); + + // Attribute Wrap - (indent_attr = "\n ", indent_attr_first = " ", indent_end = "", indent_end_selfclosing = " ", indent_over80 = "\n ") + reset_options(); + opts.wrap_attributes = 'force'; + opts.wrap_attributes_indent_size = 8; + test_fragment('
This is some text
', '
This is some text
'); + test_fragment('
This is some text
', '
This is some text
'); + test_fragment( + '
This is some text
', + // -- output -- + '
This is some text
'); + test_fragment( + '
This is some text
', + // -- output -- + '
This is some text
'); + test_fragment( + '', + // -- output -- + ''); + test_fragment( + '', + // -- output -- + '\n' + + ''); + test_fragment( + '', + // -- output -- + ''); + + // Attribute Wrap - (indent_attr = " ", indent_attr_first = " ", indent_end = "", indent_end_selfclosing = " ", indent_over80 = "\n") + reset_options(); + opts.wrap_attributes = 'auto'; + opts.wrap_line_length = 80; + opts.wrap_attributes_indent_size = 0; + test_fragment('
This is some text
', '
This is some text
'); + test_fragment('
This is some text
', '
This is some text
'); + test_fragment('
This is some text
'); + test_fragment( + '
This is some text
', + // -- output -- + '
This is some text
'); + test_fragment('', ''); + test_fragment( + '', + // -- output -- + '\n' + + ''); + test_fragment( + '', + // -- output -- + ''); + + // Attribute Wrap - (indent_attr = " ", indent_attr_first = " ", indent_end = "", indent_end_selfclosing = " ", indent_over80 = "\n ") + reset_options(); + opts.wrap_attributes = 'auto'; + opts.wrap_line_length = 80; + opts.wrap_attributes_indent_size = 4; + test_fragment('
This is some text
', '
This is some text
'); + test_fragment('
This is some text
', '
This is some text
'); + test_fragment('
This is some text
'); + test_fragment( + '
This is some text
', + // -- output -- + '
This is some text
'); + test_fragment('', ''); + test_fragment( + '', + // -- output -- + '\n' + + ''); + test_fragment( + '', + // -- output -- + ''); + + // Attribute Wrap - (indent_attr = " ", indent_attr_first = " ", indent_end = "", indent_end_selfclosing = " ", indent_over80 = " ") + reset_options(); + opts.wrap_attributes = 'auto'; + opts.wrap_line_length = 0; + test_fragment('
This is some text
', '
This is some text
'); + test_fragment('
This is some text
', '
This is some text
'); + test_fragment('
This is some text
'); + test_fragment('
This is some text
'); + test_fragment('', ''); + test_fragment( + '', + // -- output -- + '\n' + + ''); + test_fragment(''); + + // Attribute Wrap - (indent_attr = "\n ", indent_attr_faligned = " ", indent_attr_first = " ", indent_end = "", indent_end_selfclosing = " ", indent_over80 = "\n ") + reset_options(); + opts.wrap_attributes = 'force-aligned'; + test_fragment('
This is some text
', '
This is some text
'); + test_fragment('
This is some text
', '
This is some text
'); + test_fragment( + '
This is some text
', + // -- output -- + '
This is some text
'); + test_fragment( + '
This is some text
', + // -- output -- + '
This is some text
'); + test_fragment( + '', + // -- output -- + ''); + test_fragment( + '', + // -- output -- + '\n' + + ''); + test_fragment( + '', + // -- output -- + ''); + + // Attribute Wrap - (indent_attr = "\n ", indent_attr_faligned = " ", indent_attr_first = " ", indent_end = "", indent_end_selfclosing = " ", indent_over80 = "\n ") + reset_options(); + opts.wrap_attributes = 'force-aligned'; + opts.wrap_line_length = 80; + test_fragment('
This is some text
', '
This is some text
'); + test_fragment('
This is some text
', '
This is some text
'); + test_fragment( + '
This is some text
', + // -- output -- + '
This is some text
'); + test_fragment( + '
This is some text
', + // -- output -- + '
This is some text
'); + test_fragment( + '', + // -- output -- + ''); + test_fragment( + '', + // -- output -- + '\n' + + ''); + test_fragment( + '', + // -- output -- + ''); + + // Attribute Wrap - (indent_attr = "\n ", indent_attr_faligned = " ", indent_attr_first = " ", indent_end = "", indent_end_selfclosing = " ", indent_over80 = "\n ") + reset_options(); + opts.wrap_attributes = 'force-aligned'; + opts.wrap_attributes_indent_size = 8; + test_fragment('
This is some text
', '
This is some text
'); + test_fragment('
This is some text
', '
This is some text
'); + test_fragment( + '
This is some text
', + // -- output -- + '
This is some text
'); + test_fragment( + '
This is some text
', + // -- output -- + '
This is some text
'); + test_fragment( + '', + // -- output -- + ''); + test_fragment( + '', + // -- output -- + '\n' + + ''); + test_fragment( + '', + // -- output -- + ''); + + // Attribute Wrap - (indent_attr = "\n ", indent_attr_first = "\n ", indent_end = "\n", indent_end_selfclosing = "\n", indent_over80 = "\n ") + reset_options(); + opts.wrap_attributes = 'force-expand-multiline'; + opts.wrap_attributes_indent_size = 4; + test_fragment('
This is some text
', '
This is some text
'); + test_fragment('
This is some text
', '
This is some text
'); + test_fragment( + '
This is some text
', + // -- output -- + 'This is some text'); + test_fragment( + '
This is some text
', + // -- output -- + 'This is some text'); + test_fragment( + '', + // -- output -- + ''); + test_fragment( + '', + // -- output -- + '\n' + + ''); + test_fragment( + '', + // -- output -- + ''); + + // Attribute Wrap - (indent_attr = "\n ", indent_attr_first = "\n ", indent_end = "\n", indent_end_selfclosing = "\n", indent_over80 = "\n ") + reset_options(); + opts.wrap_attributes = 'force-expand-multiline'; + opts.wrap_attributes_indent_size = 4; + opts.wrap_line_length = 80; + test_fragment('
This is some text
', '
This is some text
'); + test_fragment('
This is some text
', '
This is some text
'); + test_fragment( + '
This is some text
', + // -- output -- + 'This is some text'); + test_fragment( + '
This is some text
', + // -- output -- + 'This is some text'); + test_fragment( + '', + // -- output -- + ''); + test_fragment( + '', + // -- output -- + '\n' + + ''); + test_fragment( + '', + // -- output -- + ''); + + // Attribute Wrap - (indent_attr = "\n ", indent_attr_first = "\n ", indent_end = "\n", indent_end_selfclosing = "\n", indent_over80 = "\n ") + reset_options(); + opts.wrap_attributes = 'force-expand-multiline'; + opts.wrap_attributes_indent_size = 8; + test_fragment('
This is some text
', '
This is some text
'); + test_fragment('
This is some text
', '
This is some text
'); + test_fragment( + '
This is some text
', + // -- output -- + 'This is some text'); + test_fragment( + '
This is some text
', + // -- output -- + 'This is some text'); + test_fragment( + '', + // -- output -- + ''); + test_fragment( + '', + // -- output -- + '\n' + + ''); + test_fragment( + '', + // -- output -- + ''); + + + //============================================================ + // Handlebars Indenting Off + reset_options(); + opts.indent_handlebars = false; + test_fragment( + '{{#if 0}}\n' + + '
\n' + + '
\n' + + '{{/if}}', + // -- output -- + '{{#if 0}}\n' + + '
\n' + + '
\n' + + '{{/if}}'); + test_fragment( + '
\n' + + '{{#each thing}}\n' + + ' {{name}}\n' + + '{{/each}}\n' + + '
', + // -- output -- + '
\n' + + ' {{#each thing}} {{name}} {{/each}}\n' + + '
'); + + + //============================================================ + // Handlebars Indenting On - (content = "{{field}}") + reset_options(); + opts.indent_handlebars = true; + test_fragment('{{page-title}}'); + test_fragment('{{#if 0}}{{/if}}'); + test_fragment('{{#if 0}}{{field}}{{/if}}'); + test_fragment( + '{{#if 0}}\n' + + '{{/if}}'); + test_fragment( + '{{#if words}}{{/if}}', + // -- output -- + '{{#if words}}{{/if}}'); + test_fragment( + '{{#if words}}{{field}}{{/if}}', + // -- output -- + '{{#if words}}{{field}}{{/if}}'); + test_fragment( + '{{#if words}}{{field}}{{/if}}', + // -- output -- + '{{#if words}}{{field}}{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
\n' + + '
\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
\n' + + '
\n' + + '{{/if}}', + // -- output -- + '{{#if 1}}\n' + + '
\n' + + '
\n' + + '{{/if}}'); + test_fragment( + '
\n' + + ' {{#if 1}}\n' + + ' {{/if}}\n' + + '
'); + test_fragment( + '
\n' + + '{{#if 1}}\n' + + '{{/if}}\n' + + '
', + // -- output -- + '
\n' + + ' {{#if 1}}\n' + + ' {{/if}}\n' + + '
'); + test_fragment( + '{{#if}}\n' + + '{{#each}}\n' + + '{{#if}}\n' + + '{{field}}\n' + + '{{/if}}\n' + + '{{#if}}\n' + + '{{field}}\n' + + '{{/if}}\n' + + '{{/each}}\n' + + '{{/if}}', + // -- output -- + '{{#if}}\n' + + ' {{#each}}\n' + + ' {{#if}}\n' + + ' {{field}}\n' + + ' {{/if}}\n' + + ' {{#if}}\n' + + ' {{field}}\n' + + ' {{/if}}\n' + + ' {{/each}}\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
\n' + + '
\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + ' {{field}}\n' + + ' {{else}}\n' + + ' {{field}}\n' + + '{{/if}}', + // -- output -- + '{{#if 1}}\n' + + ' {{field}}\n' + + '{{else}}\n' + + ' {{field}}\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + ' {{else}}\n' + + ' {{/if}}', + // -- output -- + '{{#if 1}}\n' + + '{{else}}\n' + + '{{/if}}'); + test_fragment( + '{{#if thing}}\n' + + '{{#if otherthing}}\n' + + ' {{field}}\n' + + ' {{else}}\n' + + '{{field}}\n' + + ' {{/if}}\n' + + ' {{else}}\n' + + '{{field}}\n' + + '{{/if}}', + // -- output -- + '{{#if thing}}\n' + + ' {{#if otherthing}}\n' + + ' {{field}}\n' + + ' {{else}}\n' + + ' {{field}}\n' + + ' {{/if}}\n' + + '{{else}}\n' + + ' {{field}}\n' + + '{{/if}}'); + test_fragment( + '', + // -- output -- + '
'); + test_fragment( + '{{field}}', + // -- output -- + '
{{field}}
'); + test_fragment( + '{{field}}', + // -- output -- + '
{{field}}
'); + test_fragment( + '{{field}}', + // -- output -- + '{{field}}'); + test_fragment('
{{field}}
'); + test_fragment('
{{field}}
'); + test_fragment('
'); + test_fragment('
'); + test_fragment('
'); + test_fragment('
'); + test_fragment('{{condition < 0 ? "result1" : "result2"}}'); + test_fragment('{{condition1 && condition2 && condition3 && condition4 < 0 ? "resForTrue" : "resForFalse"}}'); + + // Handlebars Indenting On - (content = "{{! comment}}") + reset_options(); + opts.indent_handlebars = true; + test_fragment('{{page-title}}'); + test_fragment('{{#if 0}}{{/if}}'); + test_fragment('{{#if 0}}{{! comment}}{{/if}}'); + test_fragment( + '{{#if 0}}\n' + + '{{/if}}'); + test_fragment( + '{{#if words}}{{/if}}', + // -- output -- + '{{#if words}}{{/if}}'); + test_fragment( + '{{#if words}}{{! comment}}{{/if}}', + // -- output -- + '{{#if words}}{{! comment}}{{/if}}'); + test_fragment( + '{{#if words}}{{! comment}}{{/if}}', + // -- output -- + '{{#if words}}{{! comment}}{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
\n' + + '
\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
\n' + + '
\n' + + '{{/if}}', + // -- output -- + '{{#if 1}}\n' + + '
\n' + + '
\n' + + '{{/if}}'); + test_fragment( + '
\n' + + ' {{#if 1}}\n' + + ' {{/if}}\n' + + '
'); + test_fragment( + '
\n' + + '{{#if 1}}\n' + + '{{/if}}\n' + + '
', + // -- output -- + '
\n' + + ' {{#if 1}}\n' + + ' {{/if}}\n' + + '
'); + test_fragment( + '{{#if}}\n' + + '{{#each}}\n' + + '{{#if}}\n' + + '{{! comment}}\n' + + '{{/if}}\n' + + '{{#if}}\n' + + '{{! comment}}\n' + + '{{/if}}\n' + + '{{/each}}\n' + + '{{/if}}', + // -- output -- + '{{#if}}\n' + + ' {{#each}}\n' + + ' {{#if}}\n' + + ' {{! comment}}\n' + + ' {{/if}}\n' + + ' {{#if}}\n' + + ' {{! comment}}\n' + + ' {{/if}}\n' + + ' {{/each}}\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
\n' + + '
\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + ' {{! comment}}\n' + + ' {{else}}\n' + + ' {{! comment}}\n' + + '{{/if}}', + // -- output -- + '{{#if 1}}\n' + + ' {{! comment}}\n' + + '{{else}}\n' + + ' {{! comment}}\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + ' {{else}}\n' + + ' {{/if}}', + // -- output -- + '{{#if 1}}\n' + + '{{else}}\n' + + '{{/if}}'); + test_fragment( + '{{#if thing}}\n' + + '{{#if otherthing}}\n' + + ' {{! comment}}\n' + + ' {{else}}\n' + + '{{! comment}}\n' + + ' {{/if}}\n' + + ' {{else}}\n' + + '{{! comment}}\n' + + '{{/if}}', + // -- output -- + '{{#if thing}}\n' + + ' {{#if otherthing}}\n' + + ' {{! comment}}\n' + + ' {{else}}\n' + + ' {{! comment}}\n' + + ' {{/if}}\n' + + '{{else}}\n' + + ' {{! comment}}\n' + + '{{/if}}'); + test_fragment( + '', + // -- output -- + '
'); + test_fragment( + '{{! comment}}', + // -- output -- + '
{{! comment}}
'); + test_fragment( + '{{! comment}}', + // -- output -- + '
{{! comment}}
'); + test_fragment( + '{{! comment}}', + // -- output -- + '{{! comment}}'); + test_fragment('
{{! comment}}
'); + test_fragment('
{{! comment}}
'); + test_fragment('
'); + test_fragment('
'); + test_fragment('
'); + test_fragment('
'); + test_fragment('{{condition < 0 ? "result1" : "result2"}}'); + test_fragment('{{condition1 && condition2 && condition3 && condition4 < 0 ? "resForTrue" : "resForFalse"}}'); + + // Handlebars Indenting On - (content = "{{!-- comment--}}") + reset_options(); + opts.indent_handlebars = true; + test_fragment('{{page-title}}'); + test_fragment('{{#if 0}}{{/if}}'); + test_fragment('{{#if 0}}{{!-- comment--}}{{/if}}'); + test_fragment( + '{{#if 0}}\n' + + '{{/if}}'); + test_fragment( + '{{#if words}}{{/if}}', + // -- output -- + '{{#if words}}{{/if}}'); + test_fragment( + '{{#if words}}{{!-- comment--}}{{/if}}', + // -- output -- + '{{#if words}}{{!-- comment--}}{{/if}}'); + test_fragment( + '{{#if words}}{{!-- comment--}}{{/if}}', + // -- output -- + '{{#if words}}{{!-- comment--}}{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
\n' + + '
\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
\n' + + '
\n' + + '{{/if}}', + // -- output -- + '{{#if 1}}\n' + + '
\n' + + '
\n' + + '{{/if}}'); + test_fragment( + '
\n' + + ' {{#if 1}}\n' + + ' {{/if}}\n' + + '
'); + test_fragment( + '
\n' + + '{{#if 1}}\n' + + '{{/if}}\n' + + '
', + // -- output -- + '
\n' + + ' {{#if 1}}\n' + + ' {{/if}}\n' + + '
'); + test_fragment( + '{{#if}}\n' + + '{{#each}}\n' + + '{{#if}}\n' + + '{{!-- comment--}}\n' + + '{{/if}}\n' + + '{{#if}}\n' + + '{{!-- comment--}}\n' + + '{{/if}}\n' + + '{{/each}}\n' + + '{{/if}}', + // -- output -- + '{{#if}}\n' + + ' {{#each}}\n' + + ' {{#if}}\n' + + ' {{!-- comment--}}\n' + + ' {{/if}}\n' + + ' {{#if}}\n' + + ' {{!-- comment--}}\n' + + ' {{/if}}\n' + + ' {{/each}}\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
\n' + + '
\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + ' {{!-- comment--}}\n' + + ' {{else}}\n' + + ' {{!-- comment--}}\n' + + '{{/if}}', + // -- output -- + '{{#if 1}}\n' + + ' {{!-- comment--}}\n' + + '{{else}}\n' + + ' {{!-- comment--}}\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + ' {{else}}\n' + + ' {{/if}}', + // -- output -- + '{{#if 1}}\n' + + '{{else}}\n' + + '{{/if}}'); + test_fragment( + '{{#if thing}}\n' + + '{{#if otherthing}}\n' + + ' {{!-- comment--}}\n' + + ' {{else}}\n' + + '{{!-- comment--}}\n' + + ' {{/if}}\n' + + ' {{else}}\n' + + '{{!-- comment--}}\n' + + '{{/if}}', + // -- output -- + '{{#if thing}}\n' + + ' {{#if otherthing}}\n' + + ' {{!-- comment--}}\n' + + ' {{else}}\n' + + ' {{!-- comment--}}\n' + + ' {{/if}}\n' + + '{{else}}\n' + + ' {{!-- comment--}}\n' + + '{{/if}}'); + test_fragment( + '', + // -- output -- + '
'); + test_fragment( + '{{!-- comment--}}', + // -- output -- + '
{{!-- comment--}}
'); + test_fragment( + '{{!-- comment--}}', + // -- output -- + '
{{!-- comment--}}
'); + test_fragment( + '{{!-- comment--}}', + // -- output -- + '{{!-- comment--}}'); + test_fragment('
{{!-- comment--}}
'); + test_fragment('
{{!-- comment--}}
'); + test_fragment('
'); + test_fragment('
'); + test_fragment('
'); + test_fragment('
'); + test_fragment('{{condition < 0 ? "result1" : "result2"}}'); + test_fragment('{{condition1 && condition2 && condition3 && condition4 < 0 ? "resForTrue" : "resForFalse"}}'); + + // Handlebars Indenting On - (content = "{pre{{field1}} {{field2}} {{field3}}post") + reset_options(); + opts.indent_handlebars = true; + test_fragment('{{page-title}}'); + test_fragment('{{#if 0}}{{/if}}'); + test_fragment('{{#if 0}}{pre{{field1}} {{field2}} {{field3}}post{{/if}}'); + test_fragment( + '{{#if 0}}\n' + + '{{/if}}'); + test_fragment( + '{{#if words}}{{/if}}', + // -- output -- + '{{#if words}}{{/if}}'); + test_fragment( + '{{#if words}}{pre{{field1}} {{field2}} {{field3}}post{{/if}}', + // -- output -- + '{{#if words}}{pre{{field1}} {{field2}} {{field3}}post{{/if}}'); + test_fragment( + '{{#if words}}{pre{{field1}} {{field2}} {{field3}}post{{/if}}', + // -- output -- + '{{#if words}}{pre{{field1}} {{field2}} {{field3}}post{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
\n' + + '
\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
\n' + + '
\n' + + '{{/if}}', + // -- output -- + '{{#if 1}}\n' + + '
\n' + + '
\n' + + '{{/if}}'); + test_fragment( + '
\n' + + ' {{#if 1}}\n' + + ' {{/if}}\n' + + '
'); + test_fragment( + '
\n' + + '{{#if 1}}\n' + + '{{/if}}\n' + + '
', + // -- output -- + '
\n' + + ' {{#if 1}}\n' + + ' {{/if}}\n' + + '
'); + test_fragment( + '{{#if}}\n' + + '{{#each}}\n' + + '{{#if}}\n' + + '{pre{{field1}} {{field2}} {{field3}}post\n' + + '{{/if}}\n' + + '{{#if}}\n' + + '{pre{{field1}} {{field2}} {{field3}}post\n' + + '{{/if}}\n' + + '{{/each}}\n' + + '{{/if}}', + // -- output -- + '{{#if}}\n' + + ' {{#each}}\n' + + ' {{#if}}\n' + + ' {pre{{field1}} {{field2}} {{field3}}post\n' + + ' {{/if}}\n' + + ' {{#if}}\n' + + ' {pre{{field1}} {{field2}} {{field3}}post\n' + + ' {{/if}}\n' + + ' {{/each}}\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
\n' + + '
\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + ' {pre{{field1}} {{field2}} {{field3}}post\n' + + ' {{else}}\n' + + ' {pre{{field1}} {{field2}} {{field3}}post\n' + + '{{/if}}', + // -- output -- + '{{#if 1}}\n' + + ' {pre{{field1}} {{field2}} {{field3}}post\n' + + '{{else}}\n' + + ' {pre{{field1}} {{field2}} {{field3}}post\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + ' {{else}}\n' + + ' {{/if}}', + // -- output -- + '{{#if 1}}\n' + + '{{else}}\n' + + '{{/if}}'); + test_fragment( + '{{#if thing}}\n' + + '{{#if otherthing}}\n' + + ' {pre{{field1}} {{field2}} {{field3}}post\n' + + ' {{else}}\n' + + '{pre{{field1}} {{field2}} {{field3}}post\n' + + ' {{/if}}\n' + + ' {{else}}\n' + + '{pre{{field1}} {{field2}} {{field3}}post\n' + + '{{/if}}', + // -- output -- + '{{#if thing}}\n' + + ' {{#if otherthing}}\n' + + ' {pre{{field1}} {{field2}} {{field3}}post\n' + + ' {{else}}\n' + + ' {pre{{field1}} {{field2}} {{field3}}post\n' + + ' {{/if}}\n' + + '{{else}}\n' + + ' {pre{{field1}} {{field2}} {{field3}}post\n' + + '{{/if}}'); + test_fragment( + '', + // -- output -- + '
'); + test_fragment( + '{pre{{field1}} {{field2}} {{field3}}post', + // -- output -- + '
{pre{{field1}} {{field2}} {{field3}}post
'); + test_fragment( + '{pre{{field1}} {{field2}} {{field3}}post', + // -- output -- + '
{pre{{field1}} {{field2}} {{field3}}post
'); + test_fragment( + '{pre{{field1}} {{field2}} {{field3}}post', + // -- output -- + '{pre{{field1}} {{field2}} {{field3}}post'); + test_fragment('
{pre{{field1}} {{field2}} {{field3}}post
'); + test_fragment('
{pre{{field1}} {{field2}} {{field3}}post
'); + test_fragment('
'); + test_fragment('
'); + test_fragment('
'); + test_fragment('
'); + test_fragment('{{condition < 0 ? "result1" : "result2"}}'); + test_fragment('{{condition1 && condition2 && condition3 && condition4 < 0 ? "resForTrue" : "resForFalse"}}'); + + // Handlebars Indenting On - (content = "{{! \n mult-line\ncomment \n with spacing\n}}") + reset_options(); + opts.indent_handlebars = true; + test_fragment('{{page-title}}'); + test_fragment('{{#if 0}}{{/if}}'); + test_fragment( + '{{#if 0}}{{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}{{/if}}'); + test_fragment( + '{{#if 0}}\n' + + '{{/if}}'); + test_fragment( + '{{#if words}}{{/if}}', + // -- output -- + '{{#if words}}{{/if}}'); + test_fragment( + '{{#if words}}{{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}{{/if}}', + // -- output -- + '{{#if words}}{{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}{{/if}}'); + test_fragment( + '{{#if words}}{{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}{{/if}}', + // -- output -- + '{{#if words}}{{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
\n' + + '
\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
\n' + + '
\n' + + '{{/if}}', + // -- output -- + '{{#if 1}}\n' + + '
\n' + + '
\n' + + '{{/if}}'); + test_fragment( + '
\n' + + ' {{#if 1}}\n' + + ' {{/if}}\n' + + '
'); + test_fragment( + '
\n' + + '{{#if 1}}\n' + + '{{/if}}\n' + + '
', + // -- output -- + '
\n' + + ' {{#if 1}}\n' + + ' {{/if}}\n' + + '
'); + test_fragment( + '{{#if}}\n' + + '{{#each}}\n' + + '{{#if}}\n' + + '{{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}\n' + + '{{/if}}\n' + + '{{#if}}\n' + + '{{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}\n' + + '{{/if}}\n' + + '{{/each}}\n' + + '{{/if}}', + // -- output -- + '{{#if}}\n' + + ' {{#each}}\n' + + ' {{#if}}\n' + + ' {{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}\n' + + ' {{/if}}\n' + + ' {{#if}}\n' + + ' {{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}\n' + + ' {{/if}}\n' + + ' {{/each}}\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
\n' + + '
\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + ' {{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}\n' + + ' {{else}}\n' + + ' {{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}\n' + + '{{/if}}', + // -- output -- + '{{#if 1}}\n' + + ' {{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}\n' + + '{{else}}\n' + + ' {{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + ' {{else}}\n' + + ' {{/if}}', + // -- output -- + '{{#if 1}}\n' + + '{{else}}\n' + + '{{/if}}'); + test_fragment( + '{{#if thing}}\n' + + '{{#if otherthing}}\n' + + ' {{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}\n' + + ' {{else}}\n' + + '{{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}\n' + + ' {{/if}}\n' + + ' {{else}}\n' + + '{{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}\n' + + '{{/if}}', + // -- output -- + '{{#if thing}}\n' + + ' {{#if otherthing}}\n' + + ' {{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}\n' + + ' {{else}}\n' + + ' {{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}\n' + + ' {{/if}}\n' + + '{{else}}\n' + + ' {{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}\n' + + '{{/if}}'); + test_fragment( + '', + // -- output -- + '
'); + test_fragment( + '{{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}', + // -- output -- + '
{{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}
'); + test_fragment( + '{{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}', + // -- output -- + '
{{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}
'); + test_fragment( + '{{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}', + // -- output -- + '{{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}'); + test_fragment( + '
{{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}
'); + test_fragment( + '
{{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}
'); + test_fragment( + '
'); + test_fragment( + '
'); + test_fragment( + '
'); + test_fragment( + '
'); + test_fragment('{{condition < 0 ? "result1" : "result2"}}'); + test_fragment('{{condition1 && condition2 && condition3 && condition4 < 0 ? "resForTrue" : "resForFalse"}}'); + + // Handlebars Indenting On - (content = "{{!-- \n mult-line\ncomment \n with spacing\n--}}") + reset_options(); + opts.indent_handlebars = true; + test_fragment('{{page-title}}'); + test_fragment('{{#if 0}}{{/if}}'); + test_fragment( + '{{#if 0}}{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}{{/if}}'); + test_fragment( + '{{#if 0}}\n' + + '{{/if}}'); + test_fragment( + '{{#if words}}{{/if}}', + // -- output -- + '{{#if words}}{{/if}}'); + test_fragment( + '{{#if words}}{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}{{/if}}', + // -- output -- + '{{#if words}}{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}{{/if}}'); + test_fragment( + '{{#if words}}{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}{{/if}}', + // -- output -- + '{{#if words}}{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
\n' + + '
\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
\n' + + '
\n' + + '{{/if}}', + // -- output -- + '{{#if 1}}\n' + + '
\n' + + '
\n' + + '{{/if}}'); + test_fragment( + '
\n' + + ' {{#if 1}}\n' + + ' {{/if}}\n' + + '
'); + test_fragment( + '
\n' + + '{{#if 1}}\n' + + '{{/if}}\n' + + '
', + // -- output -- + '
\n' + + ' {{#if 1}}\n' + + ' {{/if}}\n' + + '
'); + test_fragment( + '{{#if}}\n' + + '{{#each}}\n' + + '{{#if}}\n' + + '{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}\n' + + '{{/if}}\n' + + '{{#if}}\n' + + '{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}\n' + + '{{/if}}\n' + + '{{/each}}\n' + + '{{/if}}', + // -- output -- + '{{#if}}\n' + + ' {{#each}}\n' + + ' {{#if}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}\n' + + ' {{/if}}\n' + + ' {{#if}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}\n' + + ' {{/if}}\n' + + ' {{/each}}\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
\n' + + '
\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}\n' + + ' {{else}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}\n' + + '{{/if}}', + // -- output -- + '{{#if 1}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}\n' + + '{{else}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + ' {{else}}\n' + + ' {{/if}}', + // -- output -- + '{{#if 1}}\n' + + '{{else}}\n' + + '{{/if}}'); + test_fragment( + '{{#if thing}}\n' + + '{{#if otherthing}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}\n' + + ' {{else}}\n' + + '{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}\n' + + ' {{/if}}\n' + + ' {{else}}\n' + + '{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}\n' + + '{{/if}}', + // -- output -- + '{{#if thing}}\n' + + ' {{#if otherthing}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}\n' + + ' {{else}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}\n' + + ' {{/if}}\n' + + '{{else}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}\n' + + '{{/if}}'); + test_fragment( + '', + // -- output -- + '
'); + test_fragment( + '{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}', + // -- output -- + '
{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}
'); + test_fragment( + '{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}', + // -- output -- + '
{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}
'); + test_fragment( + '{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}', + // -- output -- + '{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}'); + test_fragment( + '
{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}
'); + test_fragment( + '
{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}
'); + test_fragment( + '
'); + test_fragment( + '
'); + test_fragment( + '
'); + test_fragment( + '
'); + test_fragment('{{condition < 0 ? "result1" : "result2"}}'); + test_fragment('{{condition1 && condition2 && condition3 && condition4 < 0 ? "resForTrue" : "resForFalse"}}'); + + // Handlebars Indenting On - (content = "{{!-- \n mult-line\ncomment \n{{#> component}}\n mult-line\ncomment \n with spacing\n {{/ component}}--}}") + reset_options(); + opts.indent_handlebars = true; + test_fragment('{{page-title}}'); + test_fragment('{{#if 0}}{{/if}}'); + test_fragment( + '{{#if 0}}{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}{{/if}}'); + test_fragment( + '{{#if 0}}\n' + + '{{/if}}'); + test_fragment( + '{{#if words}}{{/if}}', + // -- output -- + '{{#if words}}{{/if}}'); + test_fragment( + '{{#if words}}{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}{{/if}}', + // -- output -- + '{{#if words}}{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}{{/if}}'); + test_fragment( + '{{#if words}}{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}{{/if}}', + // -- output -- + '{{#if words}}{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
\n' + + '
\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
\n' + + '
\n' + + '{{/if}}', + // -- output -- + '{{#if 1}}\n' + + '
\n' + + '
\n' + + '{{/if}}'); + test_fragment( + '
\n' + + ' {{#if 1}}\n' + + ' {{/if}}\n' + + '
'); + test_fragment( + '
\n' + + '{{#if 1}}\n' + + '{{/if}}\n' + + '
', + // -- output -- + '
\n' + + ' {{#if 1}}\n' + + ' {{/if}}\n' + + '
'); + test_fragment( + '{{#if}}\n' + + '{{#each}}\n' + + '{{#if}}\n' + + '{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}\n' + + '{{/if}}\n' + + '{{#if}}\n' + + '{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}\n' + + '{{/if}}\n' + + '{{/each}}\n' + + '{{/if}}', + // -- output -- + '{{#if}}\n' + + ' {{#each}}\n' + + ' {{#if}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}\n' + + ' {{/if}}\n' + + ' {{#if}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}\n' + + ' {{/if}}\n' + + ' {{/each}}\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
\n' + + '
\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}\n' + + ' {{else}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}\n' + + '{{/if}}', + // -- output -- + '{{#if 1}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}\n' + + '{{else}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + ' {{else}}\n' + + ' {{/if}}', + // -- output -- + '{{#if 1}}\n' + + '{{else}}\n' + + '{{/if}}'); + test_fragment( + '{{#if thing}}\n' + + '{{#if otherthing}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}\n' + + ' {{else}}\n' + + '{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}\n' + + ' {{/if}}\n' + + ' {{else}}\n' + + '{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}\n' + + '{{/if}}', + // -- output -- + '{{#if thing}}\n' + + ' {{#if otherthing}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}\n' + + ' {{else}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}\n' + + ' {{/if}}\n' + + '{{else}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}\n' + + '{{/if}}'); + test_fragment( + '', + // -- output -- + '
'); + test_fragment( + '{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}', + // -- output -- + '
{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}
'); + test_fragment( + '{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}', + // -- output -- + '
{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}
'); + test_fragment( + '{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}', + // -- output -- + '{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}'); + test_fragment( + '
{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}
'); + test_fragment( + '
{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}
'); + test_fragment( + '
component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}{{/if}}">
'); + test_fragment( + '
'); + test_fragment( + '
component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}{{/if}}\'>
'); + test_fragment( + '
component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}{{/if}}\'>
'); + test_fragment('{{condition < 0 ? "result1" : "result2"}}'); + test_fragment('{{condition1 && condition2 && condition3 && condition4 < 0 ? "resForTrue" : "resForFalse"}}'); + + // Handlebars Indenting On - (content = "content") + reset_options(); + opts.indent_handlebars = true; + opts.wrap_line_length = 80; + test_fragment('{{page-title}}'); + test_fragment('{{#if 0}}{{/if}}'); + test_fragment('{{#if 0}}content{{/if}}'); + test_fragment( + '{{#if 0}}\n' + + '{{/if}}'); + test_fragment( + '{{#if words}}{{/if}}', + // -- output -- + '{{#if words}}{{/if}}'); + test_fragment( + '{{#if words}}content{{/if}}', + // -- output -- + '{{#if words}}content{{/if}}'); + test_fragment( + '{{#if words}}content{{/if}}', + // -- output -- + '{{#if words}}content{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
\n' + + '
\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
\n' + + '
\n' + + '{{/if}}', + // -- output -- + '{{#if 1}}\n' + + '
\n' + + '
\n' + + '{{/if}}'); + test_fragment( + '
\n' + + ' {{#if 1}}\n' + + ' {{/if}}\n' + + '
'); + test_fragment( + '
\n' + + '{{#if 1}}\n' + + '{{/if}}\n' + + '
', + // -- output -- + '
\n' + + ' {{#if 1}}\n' + + ' {{/if}}\n' + + '
'); + test_fragment( + '{{#if}}\n' + + '{{#each}}\n' + + '{{#if}}\n' + + 'content\n' + + '{{/if}}\n' + + '{{#if}}\n' + + 'content\n' + + '{{/if}}\n' + + '{{/each}}\n' + + '{{/if}}', + // -- output -- + '{{#if}}\n' + + ' {{#each}}\n' + + ' {{#if}}\n' + + ' content\n' + + ' {{/if}}\n' + + ' {{#if}}\n' + + ' content\n' + + ' {{/if}}\n' + + ' {{/each}}\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
\n' + + '
\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + ' content\n' + + ' {{else}}\n' + + ' content\n' + + '{{/if}}', + // -- output -- + '{{#if 1}}\n' + + ' content\n' + + '{{else}}\n' + + ' content\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + ' {{else}}\n' + + ' {{/if}}', + // -- output -- + '{{#if 1}}\n' + + '{{else}}\n' + + '{{/if}}'); + test_fragment( + '{{#if thing}}\n' + + '{{#if otherthing}}\n' + + ' content\n' + + ' {{else}}\n' + + 'content\n' + + ' {{/if}}\n' + + ' {{else}}\n' + + 'content\n' + + '{{/if}}', + // -- output -- + '{{#if thing}}\n' + + ' {{#if otherthing}}\n' + + ' content\n' + + ' {{else}}\n' + + ' content\n' + + ' {{/if}}\n' + + '{{else}}\n' + + ' content\n' + + '{{/if}}'); + test_fragment( + '', + // -- output -- + '
'); + test_fragment( + 'content', + // -- output -- + '
content
'); + test_fragment( + 'content', + // -- output -- + '
content
'); + test_fragment( + 'content', + // -- output -- + 'content'); + test_fragment('
content
'); + test_fragment('
content
'); + test_fragment('
'); + test_fragment('
'); + test_fragment('
'); + test_fragment('
'); + test_fragment('{{condition < 0 ? "result1" : "result2"}}'); + test_fragment('{{condition1 && condition2 && condition3 && condition4 < 0 ? "resForTrue" : "resForFalse"}}'); + + + //============================================================ + // Handlebars Else tag indenting + reset_options(); + opts.indent_handlebars = true; + test_fragment( + '{{#if test}}
{{else}}
{{/if}}', + // -- output -- + '{{#if test}}\n' + + '
\n' + + '{{else}}\n' + + '
\n' + + '{{/if}}'); + test_fragment('{{#if test}}{{else}}{{/if}}'); + + + //============================================================ + // Unclosed html elements + reset_options(); + test_fragment( + '\n' + + ''); + test_fragment( + '
\n' + + '
'); + test_fragment( + '\n' + + ''); + test_fragment( + '\n' + + ''); + test_fragment( + '\n' + + ''); + test_fragment( + '\n' + + ' \n' + + ' \n' + + ''); + + + //============================================================ + // Unformatted tags + reset_options(); + test_fragment( + '
    \n' + + '
  1. b
    c
  2. \n' + + '
', + // -- output -- + '
    \n' + + '
  1. b\n' + + '
    c
    \n' + + '
  2. \n' + + '
'); + test_fragment( + '
    \n' + + '
  1. bc
  2. \n' + + '
'); + test_fragment( + '
    \n' + + '
  • \n' + + ' \n' + + ' Kontakt\n' + + '
  • \n' + + '
'); + test_fragment('
'); + test_fragment('
'); + + + //============================================================ + // File starting with comment + reset_options(); + test_fragment( + '\n' + + '\n' + + '\n' + + '\n' + + ' a span\n' + + '\n' + + '\n' + + ''); + + + //============================================================ + // Php formatting + reset_options(); + test_fragment( + '

', + // -- output -- + '

\n' + + ' \n' + + '

'); + test_fragment( + '");\n' + + '}\n' + + '?>'); + test_fragment( + '\n' + + '\n' + + '\n' + + '\n' + + '\n' + + '\n' + + '\n' + + '\n' + + '\n' + + ''); + + + //============================================================ + // Support simple language specific option inheritance/overriding - (h = " ", c = " ", j = " ") + reset_options(); + opts.js = { 'indent_size': 3 }; + opts.css = { 'indent_size': 5 }; + test_fragment( + '\n' + + ' \n' + + ' \n' + + ''); + + // Support simple language specific option inheritance/overriding - (h = " ", c = " ", j = " ") + reset_options(); + opts.html = { 'js': { 'indent_size': 3 }, 'css': { 'indent_size': 5 } }; + test_fragment( + '\n' + + ' \n' + + ' \n' + + ''); + + // Support simple language specific option inheritance/overriding - (h = " ", c = " ", j = " ") + reset_options(); + opts.indent_size = 9; + opts.html = { 'js': { 'indent_size': 3 }, 'css': { 'indent_size': 5 }, 'indent_size': 2}; + opts.js = { 'indent_size': 5 }; + opts.css = { 'indent_size': 3 }; + test_fragment( + '\n' + + ' \n' + + ' \n' + + ''); + + + //============================================================ + // underscore.js formatting + reset_options(); + test_fragment( + '
\n' + + ' \n' + + '
'); + + + //============================================================ + // Indent with tabs + reset_options(); + opts.indent_with_tabs = true; + test_fragment( + '
\n' + + '
\n' + + '
\n' + + '
', + // -- output -- + '
\n' + + '\t
\n' + + '\t
\n' + + '
'); + + + //============================================================ + // Indent without tabs + reset_options(); + opts.indent_with_tabs = false; + test_fragment( + '
\n' + + '
\n' + + '
\n' + + '
', + // -- output -- + '
\n' + + '
\n' + + '
\n' + + '
'); + + + //============================================================ + // Indent body inner html by default + reset_options(); + test_fragment( + '\n' + + '\n' + + '
\n' + + '\n' + + '\n' + + '', + // -- output -- + '\n' + + '\n' + + '
\n' + + '\n' + + '\n' + + ''); + + + //============================================================ + // indent_body_inner_html set to false prevents indent of body inner html + reset_options(); + opts.indent_body_inner_html = false; + test_fragment( + '\n' + + '\n' + + '
\n' + + '\n' + + '\n' + + ''); + + + //============================================================ + // Indent head inner html by default + reset_options(); + test_fragment( + '\n' + + '\n' + + '\n' + + '\n' + + '\n' + + '\n' + + '', + // -- output -- + '\n' + + '\n' + + '\n' + + ' \n' + + '\n' + + '\n' + + ''); + + + //============================================================ + // indent_head_inner_html set to false prevents indent of head inner html + reset_options(); + opts.indent_head_inner_html = false; + test_fragment( + '\n' + + '\n' + + '\n' + + '\n' + + '\n' + + '\n' + + ''); + + + //============================================================ + // content_unformatted to prevent formatting content + reset_options(); + opts.content_unformatted = ['script', 'style', 'p', 'span', 'br']; + test_fragment( + '

A

', + // -- output -- + '\n' + + '\n' + + '

A

\n' + + ' \n' + + ' \n' + + '\n' + + '\n' + + ''); + test_fragment( + '

Beautify me

But not me

', + // -- output -- + '
\n' + + '

Beautify me

\n' + + '
\n' + + '

But not me

'); + test_fragment( + '
Beautify me

But not me

', + // -- output -- + '
\n' + + '

Beautify me

\n' + + '
\n' + + '

But not me

'); + test_fragment('
blabla
something here
'); + test_fragment('

'); + test_fragment( + '
var a=1;\n' +
+            'var b=a;
', + // -- output -- + '
\n' + + '
var a=1; var b=a;
\n' + + '
'); + test_fragment( + '
\n' +
+            'var a=1;\n' +
+            'var b=a;\n' +
+            '
', + // -- output -- + '
\n' + + '
\n' +
+            '        var a=1; var b=a;\n' +
+            '    
\n' + + '
'); + + + //============================================================ + // default content_unformatted + reset_options(); + test_fragment( + '

A

', + // -- output -- + '\n' + + '\n' + + '

A

\n' + + ' \n' + + ' \n' + + '\n' + + '\n' + + ''); + test_fragment( + '

Beautify me

But not me

', + // -- output -- + '
\n' + + '

Beautify me

\n' + + '
\n' + + '

\n' + + '

But not me

\n' + + '

'); + test_fragment( + '
Beautify me

But not me

', + // -- output -- + '
\n' + + '

Beautify me

\n' + + '
\n' + + '

\n' + + '

But not me

\n' + + '

'); + test_fragment('
blabla
something here
'); + test_fragment('

'); + test_fragment( + '
var a=1;\n' +
+            'var b=a;
', + // -- output -- + '
\n' + + '
var a=1;\n' +
+            'var b=a;
\n' + + '
'); + test_fragment( + '
\n' +
+            'var a=1;\n' +
+            'var b=a;\n' +
+            '
', + // -- output -- + '
\n' + + '
\n' +
+            'var a=1;\n' +
+            'var b=a;\n' +
+            '
\n' + + '
'); + + + //============================================================ + // New Test Suite + reset_options(); + + + } + + function beautifier_unconverted_tests() + { + sanitytest = test_obj; + + reset_options(); + //============================================================ + opts.end_with_newline = true; + test_fragment('', '\n'); + test_fragment('
\n'); + test_fragment('
\n\n\n', '
\n'); + test_fragment('\n' + + ' \n' + + '\n'); + + + opts.end_with_newline = false; + // error cases need love too + bth('Evil'); + bth(" + + test_fragment( + '\n' + + ' \n' + + ''); + + test_fragment('
\n', '
'); + bth('
'); + bth('
content
'); + bth('
', + '
\n' + + '
\n' + + '
'); + bth('
content
', + '
\n' + + '
content
\n' + + '
'); + bth('
\n' + + ' content\n' + + '
'); + bth('
\n' + + '
'); + bth('
\n' + + ' content\n' + + '
'); + bth('
\n' + + '
', + '
\n' + + '
'); + bth('
\n' + + '
', + '
\n' + + '
'); + bth('
\n' + + '
\n' + + '
\n' + + '
', + '
\n' + + '
\n' + + '
\n' + + '
'); + bth('
\n' + + '
', + '
\n' + + '
'); + bth('
content
', + '
content
'); + bth('
', + '
'); + bth('content\n' + + '
\n' + + '
\n' + + 'content', + 'content\n' + + '
\n' + + '
\n' + + 'content'); + bth('
  • \n' + + '
    \n' + + '
    \n' + + '
  • '); + bth('
  • \n' + + '
    \n' + + '
    \n' + + '
  • ', + '
  • \n' + + '
    \n' + + '
    \n' + + '
  • '); + bth('
  • \n' + + ' content\n' + + '
  • \n' + + '
  • \n' + + ' content\n' + + '
  • '); + + bth('content'); + bth(' content'); + bth(' content', ' content'); + + bth('content'); + bth(' content'); + bth(' content', ' content'); + + bth('content'); + bth(' content'); + bth(' content', ' content'); + + bth('
    contentcontent
    '); + bth('
    content content
    '); + bth('
    content content
    ', + '
    content content
    '); + bth('Text Link Text'); + + var unformatted = opts.unformatted; + opts.unformatted = ['script', 'style']; + bth(''); + bth(''); + opts.unformatted = unformatted; + + unformatted = opts.unformatted; + opts.unformatted = ['custom-element']; + test_fragment('
    should not' + + ' insert newlines
    ', + '
    should not' + + ' insert newlines
    '); + opts.unformatted = unformatted; + + // Tests that don't pass, but probably should. + // bth('
    content
    '); + + // Handlebars tests + // Without the indent option on, handlebars are treated as content. + + opts.wrap_line_length = 0; + //...---------1---------2---------3---------4---------5---------6---------7 + //...1234567890123456789012345678901234567890123456789012345678901234567890 + bth('
    Some text that should not wrap at all.
    ', + /* expected */ + '
    Some text that should not wrap at all.
    '); + + // A value of 0 means no max line length, and should not wrap. + //...---------1---------2---------3---------4---------5---------6---------7---------8---------9--------10--------11--------12--------13--------14--------15--------16--------17--------18--------19--------20--------21--------22--------23--------24--------25--------26--------27--------28--------29 + //...12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + bth('
    Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all.
    ', + /* expected */ + '
    Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all.
    '); + + opts.wrap_line_length = "0"; + //...---------1---------2---------3---------4---------5---------6---------7 + //...1234567890123456789012345678901234567890123456789012345678901234567890 + bth('
    Some text that should not wrap at all.
    ', + /* expected */ + '
    Some text that should not wrap at all.
    '); + + // A value of "0" means no max line length, and should not wrap + //...---------1---------2---------3---------4---------5---------6---------7---------8---------9--------10--------11--------12--------13--------14--------15--------16--------17--------18--------19--------20--------21--------22--------23--------24--------25--------26--------27--------28--------29 + //...12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + bth('
    Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all.
    ', + /* expected */ + '
    Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all.
    '); + + //BUGBUG: This should wrap before 40 not after. + opts.wrap_line_length = 40; + //...---------1---------2---------3---------4---------5---------6---------7 + //...1234567890123456789012345678901234567890123456789012345678901234567890 + bth('
    Some test text that should wrap_inside_this section here.
    ', + /* expected */ + '
    Some test text that should wrap_inside_this\n' + + ' section here.
    '); + + opts.wrap_line_length = "40"; + //...---------1---------2---------3---------4---------5---------6---------7 + //...1234567890123456789012345678901234567890123456789012345678901234567890 + bth('
    Some test text that should wrap_inside_this section here.
    ', + /* expected */ + '
    Some test text that should wrap_inside_this\n' + + ' section here.
    '); + + opts.indent_size = 1; + opts.indent_char = '\t'; + opts.preserve_newlines = false; + bth('
    \n\tfoo\n
    ', '
    foo
    '); + + opts.preserve_newlines = true; + bth('
    \n\tfoo\n
    '); + + + + // test preserve_newlines and max_preserve_newlines + opts.preserve_newlines = false; + bth('
    Should not
    \n\n\n' + + '
    preserve newlines
    ', + '
    Should not
    \n' + + '
    preserve newlines
    '); + + opts.preserve_newlines = true; + opts.max_preserve_newlines = 0; + bth('
    Should
    \n\n\n' + + '
    preserve zero newlines
    ', + '
    Should
    \n' + + '
    preserve zero newlines
    '); + + opts.max_preserve_newlines = 1; + bth('
    Should
    \n\n\n' + + '
    preserve one newline
    ', + '
    Should
    \n\n' + + '
    preserve one newline
    '); + + opts.max_preserve_newlines = null; + bth('
    Should
    \n\n\n' + + '
    preserve one newline
    ', + '
    Should
    \n\n\n' + + '
    preserve one newline
    '); + } + + beautifier_tests(); + beautifier_unconverted_tests(); +} + +if (typeof exports !== "undefined") { + exports.run_html_tests = run_html_tests; +} diff --git a/node_modules/js-beautify/js/test/generated/beautify-javascript-tests.js b/node_modules/js-beautify/js/test/generated/beautify-javascript-tests.js new file mode 100644 index 0000000..dc1d18a --- /dev/null +++ b/node_modules/js-beautify/js/test/generated/beautify-javascript-tests.js @@ -0,0 +1,5825 @@ +/* + AUTO-GENERATED. DO NOT MODIFY. + Script: test/generate-tests.js + Template: test/data/javascript/node.mustache + Data: test/data/javascript/tests.js + + The MIT License (MIT) + + Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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. +*/ +/*jshint unused:false */ + +function run_javascript_tests(test_obj, Urlencoded, js_beautify, html_beautify, css_beautify) +{ + + var default_opts = { + indent_size: 4, + indent_char: ' ', + preserve_newlines: true, + jslint_happy: false, + keep_array_indentation: false, + brace_style: 'collapse', + space_before_conditional: true, + break_chained_methods: false, + selector_separator: '\n', + end_with_newline: false + }; + var opts; + + default_opts.indent_size = 4; + default_opts.indent_char = ' '; + default_opts.preserve_newlines = true; + default_opts.jslint_happy = false; + default_opts.keep_array_indentation = false; + default_opts.brace_style = 'collapse'; + default_opts.operator_position = 'before-newline'; + + function reset_options() + { + opts = JSON.parse(JSON.stringify(default_opts)); + } + + function test_js_beautifier(input) + { + return js_beautify(input, opts); + } + + var sanitytest; + + // test the input on beautifier with the current flag settings + // does not check the indentation / surroundings as bt() does + function test_fragment(input, expected) + { + expected = expected || expected === '' ? expected : input; + sanitytest.expect(input, expected); + // if the expected is different from input, run it again + // expected output should be unchanged when run twice. + if (expected !== input) { + sanitytest.expect(expected, expected); + } + + // Everywhere we do newlines, they should be replaced with opts.eol + opts.eol = '\r\\n'; + expected = expected.replace(/[\n]/g, '\r\n'); + sanitytest.expect(input, expected); + if (input.indexOf('\n') !== -1) { + input = input.replace(/[\n]/g, '\r\n'); + sanitytest.expect(input, expected); + // Ensure support for auto eol detection + opts.eol = 'auto'; + sanitytest.expect(input, expected); + } + opts.eol = '\n'; + } + + + + // test the input on beautifier with the current flag settings + // test both the input as well as { input } wrapping + function bt(input, expectation) + { + var wrapped_input, wrapped_expectation; + + expectation = expectation || expectation === '' ? expectation : input; + sanitytest.test_function(test_js_beautifier, 'js_beautify'); + test_fragment(input, expectation); + + // If we set raw, input should be unchanged + opts.test_output_raw = true; + if (!opts.end_with_newline) { + test_fragment(input, input); + } + opts.test_output_raw = false; + + // test also the returned indentation + // e.g if input = "asdf();" + // then test that this remains properly formatted as well: + // { + // asdf(); + // indent; + // } + + var current_indent_size = opts.js ? opts.js.indent_size : null; + current_indent_size = current_indent_size ? current_indent_size : opts.indent_size; + if (current_indent_size === 4 && input) { + wrapped_input = '{\n' + input.replace(/^(.+)$/mg, ' $1') + '\n foo = bar;\n}'; + wrapped_expectation = '{\n' + expectation.replace(/^(.+)$/mg, ' $1') + '\n foo = bar;\n}'; + test_fragment(wrapped_input, wrapped_expectation); + + // If we set raw, input should be unchanged + opts.test_output_raw = true; + if (!opts.end_with_newline) { + test_fragment(wrapped_input, wrapped_input); + } + opts.test_output_raw = false; + } + + } + + // run all tests for the given brace style ("collapse", "expand", "end-expand", or "none"). + // uses various whitespace combinations before and after opening and closing braces, + // respectively, for most of the tests' inputs. + function beautify_brace_tests(brace_style) { + + var indent_on_wrap_str = ' '; // could use Array(opts.indent_size + 1).join(' '); if we wanted to replace _all_ of the hardcoded 4-space in the test and expectation strings + + function permute_brace_tests(expect_open_white, expect_close_white) { + + // run the tests that need permutation against a specific combination of + // pre-opening-brace and pre-closing-brace whitespace + function run_brace_permutation(test_open_white, test_close_white) { + var to = test_open_white, + tc = test_close_white, + eo = expect_open_white ? expect_open_white : to === '' ? ' ' : to, + ec = expect_close_white ? expect_close_white : tc === '' ? ' ' : tc, + i = eo === '\n' ? indent_on_wrap_str: ''; + + bt( '//case 1\nif (a == 1)' + to + '{}\n//case 2\nelse if (a == 2)' + to + '{}', + '//case 1\nif (a == 1)' + eo + '{}\n//case 2\nelse if (a == 2)' + eo + '{}'); + bt( 'if(1)' + to + '{2}' + tc + 'else' + to + '{3}', + 'if (1)' + eo + '{\n 2\n}' + ec + 'else' + eo + '{\n 3\n}'); + bt( 'try' + to + '{a();}' + tc + + 'catch(b)' + to + '{c();}' + tc + + 'catch(d)' + to + '{}' + tc + + 'finally' + to + '{e();}', + // expected + 'try' + eo + '{\n a();\n}' + ec + + 'catch (b)' + eo + '{\n c();\n}' + ec + + 'catch (d)' + eo + '{}' + ec + + 'finally' + eo + '{\n e();\n}'); + bt( 'if(a)' + to + '{b();}' + tc + 'else if(c) foo();', + 'if (a)' + eo + '{\n b();\n}' + ec + 'else if (c) foo();'); + // if/else statement with empty body + bt( 'if (a)' + to + '{\n// comment\n}' + tc + 'else' + to + '{\n// comment\n}', + 'if (a)' + eo + '{\n // comment\n}' + ec + 'else' + eo + '{\n // comment\n}'); + bt( 'if (x)' + to + '{y}' + tc + 'else' + to + '{ if (x)' + to + '{y}}', + 'if (x)' + eo + '{\n y\n}' + ec + 'else' + eo + '{\n if (x)' + eo + i + '{\n y\n }\n}'); + bt( 'if (a)' + to + '{\nb;\n}' + tc + 'else' + to + '{\nc;\n}', + 'if (a)' + eo + '{\n b;\n}' + ec + 'else' + eo + '{\n c;\n}'); + test_fragment(' /*\n* xx\n*/\n// xx\nif (foo)' + to + '{\n bar();\n}', + ' /*\n * xx\n */\n // xx\n if (foo)' + eo + i + '{\n bar();\n }'); + bt( 'if (foo)' + to + '{}' + tc + 'else /regex/.test();', + 'if (foo)' + eo + '{}' + ec + 'else /regex/.test();'); + test_fragment('if (foo)' + to + '{', 'if (foo)' + eo + '{'); + test_fragment('foo' + to + '{', 'foo' + eo + '{'); + test_fragment('return;' + to + '{', 'return;' + eo + '{'); + bt( 'function x()' + to + '{\n foo();\n}zzz', 'function x()' + eo +'{\n foo();\n}\nzzz'); + bt( 'var a = new function a()' + to + '{};', 'var a = new function a()' + eo + '{};'); + bt( 'var a = new function a()' + to + ' {},\n b = new function b()' + to + ' {};', + 'var a = new function a()' + eo + i + '{},\n b = new function b()' + eo + i + '{};'); + bt("foo(" + to + "{\n 'a': 1\n},\n10);", + "foo(" + (eo === ' ' ? '' : eo) + i + "{\n 'a': 1\n },\n 10);"); // "foo( {..." is a weird case + bt('(["foo","bar"]).each(function(i)' + to + '{return i;});', + '(["foo", "bar"]).each(function(i)' + eo + '{\n return i;\n});'); + bt('(function(i)' + to + '{return i;})();', '(function(i)' + eo + '{\n return i;\n})();'); + + bt( "test( /*Argument 1*/" + to + "{\n" + + " 'Value1': '1'\n" + + "}, /*Argument 2\n" + + " */ {\n" + + " 'Value2': '2'\n" + + "});", + // expected + "test( /*Argument 1*/" + eo + i + "{\n" + + " 'Value1': '1'\n" + + " },\n" + + " /*Argument 2\n" + + " */\n" + + " {\n" + + " 'Value2': '2'\n" + + " });"); + + bt( "test( /*Argument 1*/" + to + "{\n" + + " 'Value1': '1'\n" + + "}, /*Argument 2\n" + + " */\n" + + "{\n" + + " 'Value2': '2'\n" + + "});", + // expected + "test( /*Argument 1*/" + eo + i + "{\n" + + " 'Value1': '1'\n" + + " },\n" + + " /*Argument 2\n" + + " */\n" + + " {\n" + + " 'Value2': '2'\n" + + " });"); + } + + run_brace_permutation('\n', '\n'); + run_brace_permutation('\n', ' '); + run_brace_permutation(' ', ' '); + run_brace_permutation(' ', '\n'); + run_brace_permutation('',''); + + // brace tests that don't make sense to permutate + test_fragment('return {'); // return needs the brace. + test_fragment('return /* inline */ {'); + bt('throw {}'); + bt('throw {\n foo;\n}'); + bt( 'var foo = {}'); + test_fragment('a: do {} while (); xxx', 'a: do {} while ();\nxxx'); + bt( '{a: do {} while (); xxx}', '{\n a: do {} while ();xxx\n}'); + bt( 'var a = new function() {};'); + bt( 'var a = new function()\n{};', 'var a = new function() {};'); + bt( "test(\n" + + "/*Argument 1*/ {\n" + + " 'Value1': '1'\n" + + "},\n" + + "/*Argument 2\n" + + " */ {\n" + + " 'Value2': '2'\n" + + "});", + // expected + "test(\n" + + " /*Argument 1*/\n" + + " {\n" + + " 'Value1': '1'\n" + + " },\n" + + " /*Argument 2\n" + + " */\n" + + " {\n" + + " 'Value2': '2'\n" + + " });"); + } + + reset_options(); + opts.brace_style = brace_style; + + switch(opts.brace_style) { + case 'collapse': + permute_brace_tests(' ', ' '); + break; + case 'expand': + permute_brace_tests('\n', '\n'); + break; + case 'end-expand': + permute_brace_tests(' ', '\n'); + break; + case 'none': + permute_brace_tests(); + break; + } + } + + function unicode_char(value) { + return String.fromCharCode(value); + } + + function beautifier_tests() + { + sanitytest = test_obj; + + + //============================================================ + // Unicode Support + reset_options(); + bt('var ' + unicode_char(3232) + '_' + unicode_char(3232) + ' = "hi";'); + bt( + 'var ' + unicode_char(228) + 'x = {\n' + + ' ' + unicode_char(228) + 'rgerlich: true\n' + + '};'); + + + //============================================================ + // Test template and continuation strings + reset_options(); + bt('`This is a ${template} string.`'); + bt( + '`This\n' + + ' is\n' + + ' a\n' + + ' ${template}\n' + + ' string.`'); + bt( + 'a = `This is a continuation\\\n' + + 'string.`'); + bt( + 'a = "This is a continuation\\\n' + + 'string."'); + bt( + '`SELECT\n' + + ' nextval(\'${this.options.schema ? `${this.options.schema}.` : \'\'}"${this.tableName}_${this.autoIncrementField}_seq"\'::regclass\n' + + ' ) nextval;`'); + + // Tests for #1030 + bt( + 'const composeUrl = (host) => {\n' + + ' return `${host `test`}`;\n' + + '};'); + bt( + 'const composeUrl = (host, api, key, data) => {\n' + + ' switch (api) {\n' + + ' case "Init":\n' + + ' return `${host}/vwapi/Init?VWID=${key}&DATA=${encodeURIComponent(\n' + + ' Object.keys(data).map((k) => `${k}=${ data[k]}` ).join(";")\n' + + ' )}`;\n' + + ' case "Pay":\n' + + ' return `${host}/vwapi/Pay?SessionId=${par}`;\n' + + ' };\n' + + '};'); + + + //============================================================ + // ES7 Decorators + reset_options(); + bt('@foo'); + bt('@foo(bar)'); + bt( + '@foo(function(k, v) {\n' + + ' implementation();\n' + + '})'); + + + //============================================================ + // ES7 exponential + reset_options(); + bt('x ** 2'); + bt('x ** -2'); + + + //============================================================ + // Spread operator + reset_options(); + opts.brace_style = "collapse,preserve-inline"; + bt('const m = { ...item, c: 3 };'); + bt( + 'const m = {\n' + + ' ...item,\n' + + ' c: 3\n' + + '};'); + bt('const m = { c: 3, ...item };'); + bt('const m = [...item, 3];'); + bt('const m = [3, ...item];'); + + + //============================================================ + // Object literal shorthand functions + reset_options(); + bt( + 'return {\n' + + ' foo() {\n' + + ' return 42;\n' + + ' }\n' + + '}'); + bt( + 'var foo = {\n' + + ' * bar() {\n' + + ' yield 42;\n' + + ' }\n' + + '};'); + bt( + 'var foo = {bar(){return 42;},*barGen(){yield 42;}};', + // -- output -- + 'var foo = {\n' + + ' bar() {\n' + + ' return 42;\n' + + ' },\n' + + ' * barGen() {\n' + + ' yield 42;\n' + + ' }\n' + + '};'); + + // also handle generator shorthand in class - #1013 + bt( + 'class A {\n' + + ' fn() {\n' + + ' return true;\n' + + ' }\n' + + '\n' + + ' * gen() {\n' + + ' return true;\n' + + ' }\n' + + '}'); + bt( + 'class A {\n' + + ' * gen() {\n' + + ' return true;\n' + + ' }\n' + + '\n' + + ' fn() {\n' + + ' return true;\n' + + ' }\n' + + '}'); + + + //============================================================ + // End With Newline - (eof = "\n") + reset_options(); + opts.end_with_newline = true; + test_fragment('', '\n'); + test_fragment(' return .5', ' return .5\n'); + test_fragment( + ' \n' + + '\n' + + 'return .5\n' + + '\n' + + '\n' + + '\n', + // -- output -- + ' return .5\n'); + test_fragment('\n'); + + // End With Newline - (eof = "") + reset_options(); + opts.end_with_newline = false; + test_fragment(''); + test_fragment(' return .5'); + test_fragment( + ' \n' + + '\n' + + 'return .5\n' + + '\n' + + '\n' + + '\n', + // -- output -- + ' return .5'); + test_fragment('\n', ''); + + + //============================================================ + // Support simple language specific option inheritance/overriding - (j = " ") + reset_options(); + opts.js = { 'indent_size': 3 }; + opts.css = { 'indent_size': 5 }; + bt( + 'if (a == b) {\n' + + ' test();\n' + + '}'); + + // Support simple language specific option inheritance/overriding - (j = " ") + reset_options(); + opts.html = { 'js': { 'indent_size': 3 }, 'css': { 'indent_size': 5 } }; + bt( + 'if (a == b) {\n' + + ' test();\n' + + '}'); + + // Support simple language specific option inheritance/overriding - (j = " ") + reset_options(); + opts.indent_size = 9; + opts.html = { 'js': { 'indent_size': 3 }, 'css': { 'indent_size': 5 }, 'indent_size': 2}; + opts.js = { 'indent_size': 4 }; + opts.css = { 'indent_size': 3 }; + bt( + 'if (a == b) {\n' + + ' test();\n' + + '}'); + + + //============================================================ + // Brace style permutations - (ibo = "", iao = "", ibc = "", iac = "", obo = " ", oao = " ", obc = " ", oac = " ") + reset_options(); + opts.brace_style = 'collapse,preserve-inline'; + bt( + 'var a ={a: 2};\n' + + 'var a ={a: 2};', + // -- output -- + 'var a = { a: 2 };\n' + + 'var a = { a: 2 };'); + bt( + '//case 1\n' + + 'if (a == 1){}\n' + + '//case 2\n' + + 'else if (a == 2){}', + // -- output -- + '//case 1\n' + + 'if (a == 1) {}\n' + + '//case 2\n' + + 'else if (a == 2) {}'); + bt('if(1){2}else{3}', 'if (1) { 2 } else { 3 }'); + bt('try{a();}catch(b){c();}catch(d){}finally{e();}', 'try { a(); } catch (b) { c(); } catch (d) {} finally { e(); }'); + + // Brace style permutations - (ibo = "\n", iao = "\n", ibc = "\n", iac = "\n", obo = " ", oao = "\n ", obc = "\n", oac = " ") + reset_options(); + opts.brace_style = 'collapse,preserve-inline'; + bt( + 'var a =\n' + + '{\n' + + 'a: 2\n' + + '}\n' + + ';\n' + + 'var a =\n' + + '{\n' + + 'a: 2\n' + + '}\n' + + ';', + // -- output -- + 'var a = {\n' + + ' a: 2\n' + + '};\n' + + 'var a = {\n' + + ' a: 2\n' + + '};'); + bt( + '//case 1\n' + + 'if (a == 1)\n' + + '{}\n' + + '//case 2\n' + + 'else if (a == 2)\n' + + '{}', + // -- output -- + '//case 1\n' + + 'if (a == 1) {}\n' + + '//case 2\n' + + 'else if (a == 2) {}'); + bt( + 'if(1)\n' + + '{\n' + + '2\n' + + '}\n' + + 'else\n' + + '{\n' + + '3\n' + + '}', + // -- output -- + 'if (1) {\n' + + ' 2\n' + + '} else {\n' + + ' 3\n' + + '}'); + bt( + 'try\n' + + '{\n' + + 'a();\n' + + '}\n' + + 'catch(b)\n' + + '{\n' + + 'c();\n' + + '}\n' + + 'catch(d)\n' + + '{}\n' + + 'finally\n' + + '{\n' + + 'e();\n' + + '}', + // -- output -- + 'try {\n' + + ' a();\n' + + '} catch (b) {\n' + + ' c();\n' + + '} catch (d) {} finally {\n' + + ' e();\n' + + '}'); + + // Brace style permutations - (ibo = "", iao = "", ibc = "", iac = "", obo = " ", oao = "\n ", obc = "\n", oac = " ") + reset_options(); + opts.brace_style = 'collapse'; + bt( + 'var a ={a: 2};\n' + + 'var a ={a: 2};', + // -- output -- + 'var a = {\n' + + ' a: 2\n' + + '};\n' + + 'var a = {\n' + + ' a: 2\n' + + '};'); + bt( + '//case 1\n' + + 'if (a == 1){}\n' + + '//case 2\n' + + 'else if (a == 2){}', + // -- output -- + '//case 1\n' + + 'if (a == 1) {}\n' + + '//case 2\n' + + 'else if (a == 2) {}'); + bt( + 'if(1){2}else{3}', + // -- output -- + 'if (1) {\n' + + ' 2\n' + + '} else {\n' + + ' 3\n' + + '}'); + bt( + 'try{a();}catch(b){c();}catch(d){}finally{e();}', + // -- output -- + 'try {\n' + + ' a();\n' + + '} catch (b) {\n' + + ' c();\n' + + '} catch (d) {} finally {\n' + + ' e();\n' + + '}'); + + // Brace style permutations - (ibo = "\n", iao = "\n", ibc = "\n", iac = "\n", obo = " ", oao = "\n ", obc = "\n", oac = " ") + reset_options(); + opts.brace_style = 'collapse'; + bt( + 'var a =\n' + + '{\n' + + 'a: 2\n' + + '}\n' + + ';\n' + + 'var a =\n' + + '{\n' + + 'a: 2\n' + + '}\n' + + ';', + // -- output -- + 'var a = {\n' + + ' a: 2\n' + + '};\n' + + 'var a = {\n' + + ' a: 2\n' + + '};'); + bt( + '//case 1\n' + + 'if (a == 1)\n' + + '{}\n' + + '//case 2\n' + + 'else if (a == 2)\n' + + '{}', + // -- output -- + '//case 1\n' + + 'if (a == 1) {}\n' + + '//case 2\n' + + 'else if (a == 2) {}'); + bt( + 'if(1)\n' + + '{\n' + + '2\n' + + '}\n' + + 'else\n' + + '{\n' + + '3\n' + + '}', + // -- output -- + 'if (1) {\n' + + ' 2\n' + + '} else {\n' + + ' 3\n' + + '}'); + bt( + 'try\n' + + '{\n' + + 'a();\n' + + '}\n' + + 'catch(b)\n' + + '{\n' + + 'c();\n' + + '}\n' + + 'catch(d)\n' + + '{}\n' + + 'finally\n' + + '{\n' + + 'e();\n' + + '}', + // -- output -- + 'try {\n' + + ' a();\n' + + '} catch (b) {\n' + + ' c();\n' + + '} catch (d) {} finally {\n' + + ' e();\n' + + '}'); + + + //============================================================ + // Comma-first option - (c0 = ",\n", c1 = ",\n ", c2 = ",\n ", c3 = ",\n ", f1 = " ,\n ") + reset_options(); + opts.comma_first = false; + bt( + '{a:1, b:2}', + // -- output -- + '{\n' + + ' a: 1,\n' + + ' b: 2\n' + + '}'); + bt( + 'var a=1, b=c[d], e=6;', + // -- output -- + 'var a = 1,\n' + + ' b = c[d],\n' + + ' e = 6;'); + bt( + 'for(var a=1,b=2,c=3;d<3;d++)\n' + + 'e', + // -- output -- + 'for (var a = 1, b = 2, c = 3; d < 3; d++)\n' + + ' e'); + bt( + 'for(var a=1,b=2,\n' + + 'c=3;d<3;d++)\n' + + 'e', + // -- output -- + 'for (var a = 1, b = 2,\n' + + ' c = 3; d < 3; d++)\n' + + ' e'); + bt( + 'function foo() {\n' + + ' return [\n' + + ' "one",\n' + + ' "two"\n' + + ' ];\n' + + '}'); + bt( + 'a=[[1,2],[4,5],[7,8]]', + // -- output -- + 'a = [\n' + + ' [1, 2],\n' + + ' [4, 5],\n' + + ' [7, 8]\n' + + ']'); + bt( + 'a=[[1,2],[4,5],[7,8],]', + // -- output -- + 'a = [\n' + + ' [1, 2],\n' + + ' [4, 5],\n' + + ' [7, 8],\n' + + ']'); + bt( + 'a=[[1,2],[4,5],function(){},[7,8]]', + // -- output -- + 'a = [\n' + + ' [1, 2],\n' + + ' [4, 5],\n' + + ' function() {},\n' + + ' [7, 8]\n' + + ']'); + bt( + 'a=[[1,2],[4,5],function(){},function(){},[7,8]]', + // -- output -- + 'a = [\n' + + ' [1, 2],\n' + + ' [4, 5],\n' + + ' function() {},\n' + + ' function() {},\n' + + ' [7, 8]\n' + + ']'); + bt( + 'a=[[1,2],[4,5],function(){},[7,8]]', + // -- output -- + 'a = [\n' + + ' [1, 2],\n' + + ' [4, 5],\n' + + ' function() {},\n' + + ' [7, 8]\n' + + ']'); + bt('a=[b,c,function(){},function(){},d]', 'a = [b, c, function() {}, function() {}, d]'); + bt( + 'a=[b,c,\n' + + 'function(){},function(){},d]', + // -- output -- + 'a = [b, c,\n' + + ' function() {},\n' + + ' function() {},\n' + + ' d\n' + + ']'); + bt('a=[a[1],b[4],c[d[7]]]', 'a = [a[1], b[4], c[d[7]]]'); + bt('[1,2,[3,4,[5,6],7],8]', '[1, 2, [3, 4, [5, 6], 7], 8]'); + bt( + '[[["1","2"],["3","4"]],[["5","6","7"],["8","9","0"]],[["1","2","3"],["4","5","6","7"],["8","9","0"]]]', + // -- output -- + '[\n' + + ' [\n' + + ' ["1", "2"],\n' + + ' ["3", "4"]\n' + + ' ],\n' + + ' [\n' + + ' ["5", "6", "7"],\n' + + ' ["8", "9", "0"]\n' + + ' ],\n' + + ' [\n' + + ' ["1", "2", "3"],\n' + + ' ["4", "5", "6", "7"],\n' + + ' ["8", "9", "0"]\n' + + ' ]\n' + + ']'); + bt( + 'changeCollection.add({\n' + + ' name: "Jonathan" // New line inserted after this line on every save\n' + + ' , age: 25\n' + + '});', + // -- output -- + 'changeCollection.add({\n' + + ' name: "Jonathan" // New line inserted after this line on every save\n' + + ' ,\n' + + ' age: 25\n' + + '});'); + bt( + 'changeCollection.add(\n' + + ' function() {\n' + + ' return true;\n' + + ' },\n' + + ' function() {\n' + + ' return true;\n' + + ' }\n' + + ');'); + + // Comma-first option - (c0 = "\n, ", c1 = "\n , ", c2 = "\n , ", c3 = "\n , ", f1 = ", ") + reset_options(); + opts.comma_first = true; + bt( + '{a:1, b:2}', + // -- output -- + '{\n' + + ' a: 1\n' + + ' , b: 2\n' + + '}'); + bt( + 'var a=1, b=c[d], e=6;', + // -- output -- + 'var a = 1\n' + + ' , b = c[d]\n' + + ' , e = 6;'); + bt( + 'for(var a=1,b=2,c=3;d<3;d++)\n' + + 'e', + // -- output -- + 'for (var a = 1, b = 2, c = 3; d < 3; d++)\n' + + ' e'); + bt( + 'for(var a=1,b=2,\n' + + 'c=3;d<3;d++)\n' + + 'e', + // -- output -- + 'for (var a = 1, b = 2\n' + + ' , c = 3; d < 3; d++)\n' + + ' e'); + bt( + 'function foo() {\n' + + ' return [\n' + + ' "one"\n' + + ' , "two"\n' + + ' ];\n' + + '}'); + bt( + 'a=[[1,2],[4,5],[7,8]]', + // -- output -- + 'a = [\n' + + ' [1, 2]\n' + + ' , [4, 5]\n' + + ' , [7, 8]\n' + + ']'); + bt( + 'a=[[1,2],[4,5],[7,8],]', + // -- output -- + 'a = [\n' + + ' [1, 2]\n' + + ' , [4, 5]\n' + + ' , [7, 8]\n' + + ', ]'); + bt( + 'a=[[1,2],[4,5],function(){},[7,8]]', + // -- output -- + 'a = [\n' + + ' [1, 2]\n' + + ' , [4, 5]\n' + + ' , function() {}\n' + + ' , [7, 8]\n' + + ']'); + bt( + 'a=[[1,2],[4,5],function(){},function(){},[7,8]]', + // -- output -- + 'a = [\n' + + ' [1, 2]\n' + + ' , [4, 5]\n' + + ' , function() {}\n' + + ' , function() {}\n' + + ' , [7, 8]\n' + + ']'); + bt( + 'a=[[1,2],[4,5],function(){},[7,8]]', + // -- output -- + 'a = [\n' + + ' [1, 2]\n' + + ' , [4, 5]\n' + + ' , function() {}\n' + + ' , [7, 8]\n' + + ']'); + bt('a=[b,c,function(){},function(){},d]', 'a = [b, c, function() {}, function() {}, d]'); + bt( + 'a=[b,c,\n' + + 'function(){},function(){},d]', + // -- output -- + 'a = [b, c\n' + + ' , function() {}\n' + + ' , function() {}\n' + + ' , d\n' + + ']'); + bt('a=[a[1],b[4],c[d[7]]]', 'a = [a[1], b[4], c[d[7]]]'); + bt('[1,2,[3,4,[5,6],7],8]', '[1, 2, [3, 4, [5, 6], 7], 8]'); + bt( + '[[["1","2"],["3","4"]],[["5","6","7"],["8","9","0"]],[["1","2","3"],["4","5","6","7"],["8","9","0"]]]', + // -- output -- + '[\n' + + ' [\n' + + ' ["1", "2"]\n' + + ' , ["3", "4"]\n' + + ' ]\n' + + ' , [\n' + + ' ["5", "6", "7"]\n' + + ' , ["8", "9", "0"]\n' + + ' ]\n' + + ' , [\n' + + ' ["1", "2", "3"]\n' + + ' , ["4", "5", "6", "7"]\n' + + ' , ["8", "9", "0"]\n' + + ' ]\n' + + ']'); + bt( + 'changeCollection.add({\n' + + ' name: "Jonathan" // New line inserted after this line on every save\n' + + ' , age: 25\n' + + '});'); + bt( + 'changeCollection.add(\n' + + ' function() {\n' + + ' return true;\n' + + ' },\n' + + ' function() {\n' + + ' return true;\n' + + ' }\n' + + ');', + // -- output -- + 'changeCollection.add(\n' + + ' function() {\n' + + ' return true;\n' + + ' }\n' + + ' , function() {\n' + + ' return true;\n' + + ' }\n' + + ');'); + + + //============================================================ + // Space in parens tests - (s = "", e = "") + reset_options(); + opts.space_in_paren = false; + opts.space_in_empty_paren = false; + bt('if(p) foo(a,b);', 'if (p) foo(a, b);'); + bt( + 'try{while(true){willThrow()}}catch(result)switch(result){case 1:++result }', + // -- output -- + 'try {\n' + + ' while (true) {\n' + + ' willThrow()\n' + + ' }\n' + + '} catch (result) switch (result) {\n' + + ' case 1:\n' + + ' ++result\n' + + '}'); + bt('((e/((a+(b)*c)-d))^2)*5;', '((e / ((a + (b) * c) - d)) ^ 2) * 5;'); + bt( + 'function f(a,b) {if(a) b()}function g(a,b) {if(!a) b()}', + // -- output -- + 'function f(a, b) {\n' + + ' if (a) b()\n' + + '}\n' + + '\n' + + 'function g(a, b) {\n' + + ' if (!a) b()\n' + + '}'); + bt('a=[];', 'a = [];'); + bt('a=[b,c,d];', 'a = [b, c, d];'); + bt('a= f[b];', 'a = f[b];'); + bt( + '{\n' + + ' files: [ {\n' + + ' expand: true,\n' + + ' cwd: "www/gui/",\n' + + ' src: [ "im/design_standards/*.*" ],\n' + + ' dest: "www/gui/build"\n' + + ' } ]\n' + + '}', + // -- output -- + '{\n' + + ' files: [{\n' + + ' expand: true,\n' + + ' cwd: "www/gui/",\n' + + ' src: ["im/design_standards/*.*"],\n' + + ' dest: "www/gui/build"\n' + + ' }]\n' + + '}'); + + // Space in parens tests - (s = "", e = "") + reset_options(); + opts.space_in_paren = false; + opts.space_in_empty_paren = true; + bt('if(p) foo(a,b);', 'if (p) foo(a, b);'); + bt( + 'try{while(true){willThrow()}}catch(result)switch(result){case 1:++result }', + // -- output -- + 'try {\n' + + ' while (true) {\n' + + ' willThrow()\n' + + ' }\n' + + '} catch (result) switch (result) {\n' + + ' case 1:\n' + + ' ++result\n' + + '}'); + bt('((e/((a+(b)*c)-d))^2)*5;', '((e / ((a + (b) * c) - d)) ^ 2) * 5;'); + bt( + 'function f(a,b) {if(a) b()}function g(a,b) {if(!a) b()}', + // -- output -- + 'function f(a, b) {\n' + + ' if (a) b()\n' + + '}\n' + + '\n' + + 'function g(a, b) {\n' + + ' if (!a) b()\n' + + '}'); + bt('a=[];', 'a = [];'); + bt('a=[b,c,d];', 'a = [b, c, d];'); + bt('a= f[b];', 'a = f[b];'); + bt( + '{\n' + + ' files: [ {\n' + + ' expand: true,\n' + + ' cwd: "www/gui/",\n' + + ' src: [ "im/design_standards/*.*" ],\n' + + ' dest: "www/gui/build"\n' + + ' } ]\n' + + '}', + // -- output -- + '{\n' + + ' files: [{\n' + + ' expand: true,\n' + + ' cwd: "www/gui/",\n' + + ' src: ["im/design_standards/*.*"],\n' + + ' dest: "www/gui/build"\n' + + ' }]\n' + + '}'); + + // Space in parens tests - (s = " ", e = "") + reset_options(); + opts.space_in_paren = true; + opts.space_in_empty_paren = false; + bt('if(p) foo(a,b);', 'if ( p ) foo( a, b );'); + bt( + 'try{while(true){willThrow()}}catch(result)switch(result){case 1:++result }', + // -- output -- + 'try {\n' + + ' while ( true ) {\n' + + ' willThrow()\n' + + ' }\n' + + '} catch ( result ) switch ( result ) {\n' + + ' case 1:\n' + + ' ++result\n' + + '}'); + bt('((e/((a+(b)*c)-d))^2)*5;', '( ( e / ( ( a + ( b ) * c ) - d ) ) ^ 2 ) * 5;'); + bt( + 'function f(a,b) {if(a) b()}function g(a,b) {if(!a) b()}', + // -- output -- + 'function f( a, b ) {\n' + + ' if ( a ) b()\n' + + '}\n' + + '\n' + + 'function g( a, b ) {\n' + + ' if ( !a ) b()\n' + + '}'); + bt('a=[];', 'a = [];'); + bt('a=[b,c,d];', 'a = [ b, c, d ];'); + bt('a= f[b];', 'a = f[ b ];'); + bt( + '{\n' + + ' files: [ {\n' + + ' expand: true,\n' + + ' cwd: "www/gui/",\n' + + ' src: [ "im/design_standards/*.*" ],\n' + + ' dest: "www/gui/build"\n' + + ' } ]\n' + + '}'); + + // Space in parens tests - (s = " ", e = " ") + reset_options(); + opts.space_in_paren = true; + opts.space_in_empty_paren = true; + bt('if(p) foo(a,b);', 'if ( p ) foo( a, b );'); + bt( + 'try{while(true){willThrow()}}catch(result)switch(result){case 1:++result }', + // -- output -- + 'try {\n' + + ' while ( true ) {\n' + + ' willThrow( )\n' + + ' }\n' + + '} catch ( result ) switch ( result ) {\n' + + ' case 1:\n' + + ' ++result\n' + + '}'); + bt('((e/((a+(b)*c)-d))^2)*5;', '( ( e / ( ( a + ( b ) * c ) - d ) ) ^ 2 ) * 5;'); + bt( + 'function f(a,b) {if(a) b()}function g(a,b) {if(!a) b()}', + // -- output -- + 'function f( a, b ) {\n' + + ' if ( a ) b( )\n' + + '}\n' + + '\n' + + 'function g( a, b ) {\n' + + ' if ( !a ) b( )\n' + + '}'); + bt('a=[];', 'a = [ ];'); + bt('a=[b,c,d];', 'a = [ b, c, d ];'); + bt('a= f[b];', 'a = f[ b ];'); + bt( + '{\n' + + ' files: [ {\n' + + ' expand: true,\n' + + ' cwd: "www/gui/",\n' + + ' src: [ "im/design_standards/*.*" ],\n' + + ' dest: "www/gui/build"\n' + + ' } ]\n' + + '}'); + + + //============================================================ + // operator_position option - ensure no neswlines if preserve_newlines is false - () + reset_options(); + opts.operator_position = 'before-newline'; + opts.preserve_newlines = false; + bt( + 'var res = a + b - c / d * e % f;\n' + + 'var res = g & h | i ^ j;\n' + + 'var res = (k && l || m) ? n : o;\n' + + 'var res = p >> q << r >>> s;\n' + + 'var res = t === u !== v != w == x >= y <= z > aa < ab;\n' + + 'ac + -ad'); + bt( + 'var res = a + b\n' + + '- c /\n' + + 'd * e\n' + + '%\n' + + 'f;\n' + + ' var res = g & h\n' + + '| i ^\n' + + 'j;\n' + + 'var res = (k &&\n' + + 'l\n' + + '|| m) ?\n' + + 'n\n' + + ': o\n' + + ';\n' + + 'var res = p\n' + + '>> q <<\n' + + 'r\n' + + '>>> s;\n' + + 'var res\n' + + ' = t\n' + + '\n' + + ' === u !== v\n' + + ' !=\n' + + 'w\n' + + '== x >=\n' + + 'y <= z > aa <\n' + + 'ab;\n' + + 'ac +\n' + + '-ad', + // -- output -- + 'var res = a + b - c / d * e % f;\n' + + 'var res = g & h | i ^ j;\n' + + 'var res = (k && l || m) ? n : o;\n' + + 'var res = p >> q << r >>> s;\n' + + 'var res = t === u !== v != w == x >= y <= z > aa < ab;\n' + + 'ac + -ad'); + + // operator_position option - ensure no neswlines if preserve_newlines is false - () + reset_options(); + opts.operator_position = 'after-newline'; + opts.preserve_newlines = false; + bt( + 'var res = a + b - c / d * e % f;\n' + + 'var res = g & h | i ^ j;\n' + + 'var res = (k && l || m) ? n : o;\n' + + 'var res = p >> q << r >>> s;\n' + + 'var res = t === u !== v != w == x >= y <= z > aa < ab;\n' + + 'ac + -ad'); + bt( + 'var res = a + b\n' + + '- c /\n' + + 'd * e\n' + + '%\n' + + 'f;\n' + + ' var res = g & h\n' + + '| i ^\n' + + 'j;\n' + + 'var res = (k &&\n' + + 'l\n' + + '|| m) ?\n' + + 'n\n' + + ': o\n' + + ';\n' + + 'var res = p\n' + + '>> q <<\n' + + 'r\n' + + '>>> s;\n' + + 'var res\n' + + ' = t\n' + + '\n' + + ' === u !== v\n' + + ' !=\n' + + 'w\n' + + '== x >=\n' + + 'y <= z > aa <\n' + + 'ab;\n' + + 'ac +\n' + + '-ad', + // -- output -- + 'var res = a + b - c / d * e % f;\n' + + 'var res = g & h | i ^ j;\n' + + 'var res = (k && l || m) ? n : o;\n' + + 'var res = p >> q << r >>> s;\n' + + 'var res = t === u !== v != w == x >= y <= z > aa < ab;\n' + + 'ac + -ad'); + + // operator_position option - ensure no neswlines if preserve_newlines is false - () + reset_options(); + opts.operator_position = 'preserve-newline'; + opts.preserve_newlines = false; + bt( + 'var res = a + b - c / d * e % f;\n' + + 'var res = g & h | i ^ j;\n' + + 'var res = (k && l || m) ? n : o;\n' + + 'var res = p >> q << r >>> s;\n' + + 'var res = t === u !== v != w == x >= y <= z > aa < ab;\n' + + 'ac + -ad'); + bt( + 'var res = a + b\n' + + '- c /\n' + + 'd * e\n' + + '%\n' + + 'f;\n' + + ' var res = g & h\n' + + '| i ^\n' + + 'j;\n' + + 'var res = (k &&\n' + + 'l\n' + + '|| m) ?\n' + + 'n\n' + + ': o\n' + + ';\n' + + 'var res = p\n' + + '>> q <<\n' + + 'r\n' + + '>>> s;\n' + + 'var res\n' + + ' = t\n' + + '\n' + + ' === u !== v\n' + + ' !=\n' + + 'w\n' + + '== x >=\n' + + 'y <= z > aa <\n' + + 'ab;\n' + + 'ac +\n' + + '-ad', + // -- output -- + 'var res = a + b - c / d * e % f;\n' + + 'var res = g & h | i ^ j;\n' + + 'var res = (k && l || m) ? n : o;\n' + + 'var res = p >> q << r >>> s;\n' + + 'var res = t === u !== v != w == x >= y <= z > aa < ab;\n' + + 'ac + -ad'); + + + //============================================================ + // operator_position option - set to 'before-newline' (default value) + reset_options(); + + // comprehensive, various newlines + bt( + 'var res = a + b\n' + + '- c /\n' + + 'd * e\n' + + '%\n' + + 'f;\n' + + ' var res = g & h\n' + + '| i ^\n' + + 'j;\n' + + 'var res = (k &&\n' + + 'l\n' + + '|| m) ?\n' + + 'n\n' + + ': o\n' + + ';\n' + + 'var res = p\n' + + '>> q <<\n' + + 'r\n' + + '>>> s;\n' + + 'var res\n' + + ' = t\n' + + '\n' + + ' === u !== v\n' + + ' !=\n' + + 'w\n' + + '== x >=\n' + + 'y <= z > aa <\n' + + 'ab;\n' + + 'ac +\n' + + '-ad', + // -- output -- + 'var res = a + b -\n' + + ' c /\n' + + ' d * e %\n' + + ' f;\n' + + 'var res = g & h |\n' + + ' i ^\n' + + ' j;\n' + + 'var res = (k &&\n' + + ' l ||\n' + + ' m) ?\n' + + ' n :\n' + + ' o;\n' + + 'var res = p >>\n' + + ' q <<\n' + + ' r >>>\n' + + ' s;\n' + + 'var res = t\n' + + '\n' + + ' ===\n' + + ' u !== v !=\n' + + ' w ==\n' + + ' x >=\n' + + ' y <= z > aa <\n' + + ' ab;\n' + + 'ac +\n' + + ' -ad'); + + // colon special case + bt( + 'var a = {\n' + + ' b\n' + + ': bval,\n' + + ' c:\n' + + 'cval\n' + + ' ,d: dval\n' + + '};\n' + + 'var e = f ? g\n' + + ': h;\n' + + 'var i = j ? k :\n' + + 'l;', + // -- output -- + 'var a = {\n' + + ' b: bval,\n' + + ' c: cval,\n' + + ' d: dval\n' + + '};\n' + + 'var e = f ? g :\n' + + ' h;\n' + + 'var i = j ? k :\n' + + ' l;'); + + // catch-all, includes brackets and other various code + bt( + 'var d = 1;\n' + + 'if (a === b\n' + + ' && c) {\n' + + ' d = (c * everything\n' + + ' / something_else) %\n' + + ' b;\n' + + ' e\n' + + ' += d;\n' + + '\n' + + '} else if (!(complex && simple) ||\n' + + ' (emotion && emotion.name === "happy")) {\n' + + ' cryTearsOfJoy(many ||\n' + + ' anOcean\n' + + ' || aRiver);\n' + + '}', + // -- output -- + 'var d = 1;\n' + + 'if (a === b &&\n' + + ' c) {\n' + + ' d = (c * everything /\n' + + ' something_else) %\n' + + ' b;\n' + + ' e\n' + + ' += d;\n' + + '\n' + + '} else if (!(complex && simple) ||\n' + + ' (emotion && emotion.name === "happy")) {\n' + + ' cryTearsOfJoy(many ||\n' + + ' anOcean ||\n' + + ' aRiver);\n' + + '}'); + + + //============================================================ + // operator_position option - set to 'after_newline' + reset_options(); + opts.operator_position = 'after-newline'; + + // comprehensive, various newlines + bt( + 'var res = a + b\n' + + '- c /\n' + + 'd * e\n' + + '%\n' + + 'f;\n' + + ' var res = g & h\n' + + '| i ^\n' + + 'j;\n' + + 'var res = (k &&\n' + + 'l\n' + + '|| m) ?\n' + + 'n\n' + + ': o\n' + + ';\n' + + 'var res = p\n' + + '>> q <<\n' + + 'r\n' + + '>>> s;\n' + + 'var res\n' + + ' = t\n' + + '\n' + + ' === u !== v\n' + + ' !=\n' + + 'w\n' + + '== x >=\n' + + 'y <= z > aa <\n' + + 'ab;\n' + + 'ac +\n' + + '-ad', + // -- output -- + 'var res = a + b\n' + + ' - c\n' + + ' / d * e\n' + + ' % f;\n' + + 'var res = g & h\n' + + ' | i\n' + + ' ^ j;\n' + + 'var res = (k\n' + + ' && l\n' + + ' || m)\n' + + ' ? n\n' + + ' : o;\n' + + 'var res = p\n' + + ' >> q\n' + + ' << r\n' + + ' >>> s;\n' + + 'var res = t\n' + + '\n' + + ' === u !== v\n' + + ' != w\n' + + ' == x\n' + + ' >= y <= z > aa\n' + + ' < ab;\n' + + 'ac\n' + + ' + -ad'); + + // colon special case + bt( + 'var a = {\n' + + ' b\n' + + ': bval,\n' + + ' c:\n' + + 'cval\n' + + ' ,d: dval\n' + + '};\n' + + 'var e = f ? g\n' + + ': h;\n' + + 'var i = j ? k :\n' + + 'l;', + // -- output -- + 'var a = {\n' + + ' b: bval,\n' + + ' c: cval,\n' + + ' d: dval\n' + + '};\n' + + 'var e = f ? g\n' + + ' : h;\n' + + 'var i = j ? k\n' + + ' : l;'); + + // catch-all, includes brackets and other various code + bt( + 'var d = 1;\n' + + 'if (a === b\n' + + ' && c) {\n' + + ' d = (c * everything\n' + + ' / something_else) %\n' + + ' b;\n' + + ' e\n' + + ' += d;\n' + + '\n' + + '} else if (!(complex && simple) ||\n' + + ' (emotion && emotion.name === "happy")) {\n' + + ' cryTearsOfJoy(many ||\n' + + ' anOcean\n' + + ' || aRiver);\n' + + '}', + // -- output -- + 'var d = 1;\n' + + 'if (a === b\n' + + ' && c) {\n' + + ' d = (c * everything\n' + + ' / something_else)\n' + + ' % b;\n' + + ' e\n' + + ' += d;\n' + + '\n' + + '} else if (!(complex && simple)\n' + + ' || (emotion && emotion.name === "happy")) {\n' + + ' cryTearsOfJoy(many\n' + + ' || anOcean\n' + + ' || aRiver);\n' + + '}'); + + + //============================================================ + // operator_position option - set to 'preserve-newline' + reset_options(); + opts.operator_position = 'preserve-newline'; + + // comprehensive, various newlines + bt( + 'var res = a + b\n' + + '- c /\n' + + 'd * e\n' + + '%\n' + + 'f;\n' + + ' var res = g & h\n' + + '| i ^\n' + + 'j;\n' + + 'var res = (k &&\n' + + 'l\n' + + '|| m) ?\n' + + 'n\n' + + ': o\n' + + ';\n' + + 'var res = p\n' + + '>> q <<\n' + + 'r\n' + + '>>> s;\n' + + 'var res\n' + + ' = t\n' + + '\n' + + ' === u !== v\n' + + ' !=\n' + + 'w\n' + + '== x >=\n' + + 'y <= z > aa <\n' + + 'ab;\n' + + 'ac +\n' + + '-ad', + // -- output -- + 'var res = a + b\n' + + ' - c /\n' + + ' d * e\n' + + ' %\n' + + ' f;\n' + + 'var res = g & h\n' + + ' | i ^\n' + + ' j;\n' + + 'var res = (k &&\n' + + ' l\n' + + ' || m) ?\n' + + ' n\n' + + ' : o;\n' + + 'var res = p\n' + + ' >> q <<\n' + + ' r\n' + + ' >>> s;\n' + + 'var res = t\n' + + '\n' + + ' === u !== v\n' + + ' !=\n' + + ' w\n' + + ' == x >=\n' + + ' y <= z > aa <\n' + + ' ab;\n' + + 'ac +\n' + + ' -ad'); + + // colon special case + bt( + 'var a = {\n' + + ' b\n' + + ': bval,\n' + + ' c:\n' + + 'cval\n' + + ' ,d: dval\n' + + '};\n' + + 'var e = f ? g\n' + + ': h;\n' + + 'var i = j ? k :\n' + + 'l;', + // -- output -- + 'var a = {\n' + + ' b: bval,\n' + + ' c: cval,\n' + + ' d: dval\n' + + '};\n' + + 'var e = f ? g\n' + + ' : h;\n' + + 'var i = j ? k :\n' + + ' l;'); + + // catch-all, includes brackets and other various code + bt( + 'var d = 1;\n' + + 'if (a === b\n' + + ' && c) {\n' + + ' d = (c * everything\n' + + ' / something_else) %\n' + + ' b;\n' + + ' e\n' + + ' += d;\n' + + '\n' + + '} else if (!(complex && simple) ||\n' + + ' (emotion && emotion.name === "happy")) {\n' + + ' cryTearsOfJoy(many ||\n' + + ' anOcean\n' + + ' || aRiver);\n' + + '}'); + + + //============================================================ + // Yield tests + reset_options(); + bt('yield /foo\\//;'); + bt('result = yield pgClient.query_(queryString);'); + bt('yield [1, 2]'); + bt('yield* bar();'); + + // yield should have no space between yield and star + bt('yield * bar();', 'yield* bar();'); + + // yield should have space between star and generator + bt('yield *bar();', 'yield* bar();'); + + + //============================================================ + // Async / await tests + reset_options(); + bt('async function foo() {}'); + bt('let w = async function foo() {}'); + bt( + 'async function foo() {}\n' + + 'var x = await foo();'); + + // async function as an input to another function + bt('wrapper(async function foo() {})'); + + // await on inline anonymous function. should have a space after await + bt( + 'async function() {\n' + + ' var w = await(async function() {\n' + + ' return await foo();\n' + + ' })();\n' + + '}', + // -- output -- + 'async function() {\n' + + ' var w = await (async function() {\n' + + ' return await foo();\n' + + ' })();\n' + + '}'); + + // ensure that this doesn't break anyone with the async library + bt('async.map(function(t) {})'); + + + //============================================================ + // e4x - Test that e4x literals passed through when e4x-option is enabled + reset_options(); + opts.e4x = true; + bt( + 'xml=\n' + + ' foox;', + // -- output -- + 'xml = \n' + + ' foox;'); + bt(''); + bt(''); + bt(''); + bt(''); + bt(''); + + // Handles inline expressions + bt( + 'xml=<{a} b="c">\n' + + ' foox;', + // -- output -- + 'xml = <{a} b="c">\n' + + ' foox;'); + bt( + 'xml=<{a} b="c">\n' + + ' \n' + + ' foox;', + // -- output -- + 'xml = <{a} b="c">\n' + + ' \n' + + ' foox;'); + + // xml literals with special characters in elem names - see http://www.w3.org/TR/REC-xml/#NT-NameChar + bt('xml = <_:.valid.xml- _:.valid.xml-="123"/>;'); + + // xml literals with attributes without equal sign + bt('xml = ;'); + + // Handles CDATA + bt( + 'xml=\n' + + ' foox/]]>;', + // -- output -- + 'xml = \n' + + ' foox/]]>;'); + bt('xml=;', 'xml = ;'); + bt('xml=;', 'xml = ;'); + + // JSX - working jsx from http://prettydiff.com/unit_tests/beautification_javascript_jsx.txt + bt( + 'var ListItem = React.createClass({\n' + + ' render: function() {\n' + + ' return (\n' + + '
  • \n' + + ' \n' + + ' this.props.item.name\n' + + ' \n' + + '
  • \n' + + ' );\n' + + ' }\n' + + '});'); + bt( + 'var List = React.createClass({\n' + + ' renderList: function() {\n' + + ' return this.props.items.map(function(item) {\n' + + ' return ;\n' + + ' });\n' + + ' },\n' + + '\n' + + ' render: function() {\n' + + ' return
      \n' + + ' this.renderList()\n' + + '
    \n' + + ' }\n' + + '});'); + bt( + 'var Mist = React.createClass({\n' + + ' renderList: function() {\n' + + ' return this.props.items.map(function(item) {\n' + + ' return {item}} key={item.id} />;\n' + + ' });\n' + + ' }\n' + + '});'); + bt( + '// JSX\n' + + 'var box = \n' + + ' {shouldShowAnswer(user) ?\n' + + ' no : \n' + + ' Text Content\n' + + ' }\n' + + ' ;\n' + + 'var a = function() {\n' + + ' return asdf;\n' + + '};\n' + + '\n' + + 'var HelloMessage = React.createClass({\n' + + ' render: function() {\n' + + ' return
    Hello {this.props.name}
    ;\n' + + ' }\n' + + '});\n' + + 'React.render(, mountNode);'); + bt( + 'var Timer = React.createClass({\n' + + ' getInitialState: function() {\n' + + ' return {\n' + + ' secondsElapsed: 0\n' + + ' };\n' + + ' },\n' + + ' tick: function() {\n' + + ' this.setState({\n' + + ' secondsElapsed: this.state.secondsElapsed + 1\n' + + ' });\n' + + ' },\n' + + ' componentDidMount: function() {\n' + + ' this.interval = setInterval(this.tick, 1000);\n' + + ' },\n' + + ' componentWillUnmount: function() {\n' + + ' clearInterval(this.interval);\n' + + ' },\n' + + ' render: function() {\n' + + ' return (\n' + + '
    Seconds Elapsed: {this.state.secondsElapsed}
    \n' + + ' );\n' + + ' }\n' + + '});\n' + + 'React.render(, mountNode);'); + bt( + 'var TodoList = React.createClass({\n' + + ' render: function() {\n' + + ' var createItem = function(itemText) {\n' + + ' return
  • {itemText}
  • ;\n' + + ' };\n' + + ' return
      {this.props.items.map(createItem)}
    ;\n' + + ' }\n' + + '});'); + bt( + 'var TodoApp = React.createClass({\n' + + ' getInitialState: function() {\n' + + ' return {\n' + + ' items: [],\n' + + ' text: \'\'\n' + + ' };\n' + + ' },\n' + + ' onChange: function(e) {\n' + + ' this.setState({\n' + + ' text: e.target.value\n' + + ' });\n' + + ' },\n' + + ' handleSubmit: function(e) {\n' + + ' e.preventDefault();\n' + + ' var nextItems = this.state.items.concat([this.state.text]);\n' + + ' var nextText = \'\';\n' + + ' this.setState({\n' + + ' items: nextItems,\n' + + ' text: nextText\n' + + ' });\n' + + ' },\n' + + ' render: function() {\n' + + ' return (\n' + + '
    \n' + + '

    TODO

    \n' + + ' \n' + + '
    \n' + + ' \n' + + ' \n' + + '
    \n' + + '
    \n' + + ' );\n' + + ' }\n' + + '});\n' + + 'React.render(, mountNode);'); + bt( + 'var converter = new Showdown.converter();\n' + + 'var MarkdownEditor = React.createClass({\n' + + ' getInitialState: function() {\n' + + ' return {value: \'Type some *markdown* here!\'};\n' + + ' },\n' + + ' handleChange: function() {\n' + + ' this.setState({value: this.refs.textarea.getDOMNode().value});\n' + + ' },\n' + + ' render: function() {\n' + + ' return (\n' + + '
    \n' + + '

    Input

    \n' + + ' \n' + + '

    Output

    \n' + + ' \n' + + '
    \n' + + ' );\n' + + ' }\n' + + '});\n' + + 'React.render(, mountNode);', + // -- output -- + 'var converter = new Showdown.converter();\n' + + 'var MarkdownEditor = React.createClass({\n' + + ' getInitialState: function() {\n' + + ' return {\n' + + ' value: \'Type some *markdown* here!\'\n' + + ' };\n' + + ' },\n' + + ' handleChange: function() {\n' + + ' this.setState({\n' + + ' value: this.refs.textarea.getDOMNode().value\n' + + ' });\n' + + ' },\n' + + ' render: function() {\n' + + ' return (\n' + + '
    \n' + + '

    Input

    \n' + + ' \n' + + '

    Output

    \n' + + ' \n' + + '
    \n' + + ' );\n' + + ' }\n' + + '});\n' + + 'React.render(, mountNode);'); + + // JSX - Not quite correct jsx formatting that still works + bt( + 'var content = (\n' + + ' \n' + + ' );\n' + + 'var qwer = A dropdown list Do Something Do Something Fun! Do Something Else ;\n' + + 'render(dropdown);', + // -- output -- + 'var content = (\n' + + ' \n' + + ');\n' + + 'var qwer = A dropdown list Do Something Do Something Fun! Do Something Else ;\n' + + 'render(dropdown);'); + + // Handles messed up tags, as long as it isn't the same name + // as the root tag. Also handles tags of same name as root tag + // as long as nesting matches. + bt( + 'xml=;', + // -- output -- + 'xml = ;'); + + // If xml is not terminated, the remainder of the file is treated + // as part of the xml-literal (passed through unaltered) + test_fragment( + 'xml=\n' + + 'c\n' + + 'c\n' + + ' c\n' + + '

    \n' + + ' );\n' + + ' }\n' + + '});'); + bt( + 'let a = React.createClass({\n' + + ' render() {\n' + + ' return (\n' + + '

    \n' + + ' c\n' + + '

    \n' + + ' );\n' + + ' }\n' + + '});'); + bt( + 'let a = React.createClass({\n' + + ' render() {\n' + + ' return (\n' + + '

    \n' + + ' c\n' + + '

    \n' + + ' );\n' + + ' }\n' + + '});'); + bt( + 'let a = React.createClass({\n' + + ' render() {\n' + + ' return (\n' + + ' <{e} className = {d}>\n' + + ' c\n' + + ' \n' + + ' );\n' + + ' }\n' + + '});'); + + // Issue #914 - Multiline attribute in root tag + bt( + 'return (\n' + + '
    {\n' + + ' e.preventDefault()\n' + + ' onClick()\n' + + ' }}>\n' + + ' {children}\n' + + ' \n' + + ');'); + bt( + 'return (\n' + + ' <{\n' + + ' a + b\n' + + ' } href="#"\n' + + ' onClick={e => {\n' + + ' e.preventDefault()\n' + + ' onClick()\n' + + ' }}>\n' + + ' {children}\n' + + ' \n' + + ');'); + bt( + 'return (\n' + + ' <{\n' + + ' a + b\n' + + ' } href="#"\n' + + ' onClick={e => {\n' + + ' e.preventDefault()\n' + + ' onClick()\n' + + ' }}>\n' + + ' {children}\n' + + ' \n' + + ' );', + // -- output -- + 'return (\n' + + ' <{\n' + + ' a + b\n' + + ' } href="#"\n' + + ' onClick={e => {\n' + + ' e.preventDefault()\n' + + ' onClick()\n' + + ' }}>\n' + + ' {children}\n' + + ' \n' + + ');'); + + + //============================================================ + // e4x disabled + reset_options(); + opts.e4x = false; + bt( + 'xml=\n' + + ' foox;', + // -- output -- + 'xml = < a b = "c" > < d / > < e >\n' + + ' foo < /e>x ;'); + + + //============================================================ + // Multiple braces + reset_options(); + bt( + '{{}/z/}', + // -- output -- + '{\n' + + ' {}\n' + + ' /z/\n' + + '}'); + + + //============================================================ + // Beautify preserve formatting + reset_options(); + bt( + '/* beautify preserve:start */\n' + + '/* beautify preserve:end */'); + bt( + '/* beautify preserve:start */\n' + + ' var a = 1;\n' + + '/* beautify preserve:end */'); + bt( + 'var a = 1;\n' + + '/* beautify preserve:start */\n' + + ' var a = 1;\n' + + '/* beautify preserve:end */'); + bt('/* beautify preserve:start */ {asdklgh;y;;{}dd2d}/* beautify preserve:end */'); + bt( + 'var a = 1;\n' + + '/* beautify preserve:start */\n' + + ' var a = 1;\n' + + '/* beautify preserve:end */', + // -- output -- + 'var a = 1;\n' + + '/* beautify preserve:start */\n' + + ' var a = 1;\n' + + '/* beautify preserve:end */'); + bt( + 'var a = 1;\n' + + ' /* beautify preserve:start */\n' + + ' var a = 1;\n' + + '/* beautify preserve:end */', + // -- output -- + 'var a = 1;\n' + + '/* beautify preserve:start */\n' + + ' var a = 1;\n' + + '/* beautify preserve:end */'); + bt( + 'var a = {\n' + + ' /* beautify preserve:start */\n' + + ' one : 1\n' + + ' two : 2,\n' + + ' three : 3,\n' + + ' ten : 10\n' + + ' /* beautify preserve:end */\n' + + '};'); + bt( + 'var a = {\n' + + '/* beautify preserve:start */\n' + + ' one : 1,\n' + + ' two : 2,\n' + + ' three : 3,\n' + + ' ten : 10\n' + + '/* beautify preserve:end */\n' + + '};', + // -- output -- + 'var a = {\n' + + ' /* beautify preserve:start */\n' + + ' one : 1,\n' + + ' two : 2,\n' + + ' three : 3,\n' + + ' ten : 10\n' + + '/* beautify preserve:end */\n' + + '};'); + + // one space before and after required, only single spaces inside. + bt( + 'var a = {\n' + + '/* beautify preserve:start */\n' + + ' one : 1,\n' + + ' two : 2,\n' + + ' three : 3,\n' + + ' ten : 10\n' + + '};', + // -- output -- + 'var a = {\n' + + ' /* beautify preserve:start */\n' + + ' one: 1,\n' + + ' two: 2,\n' + + ' three: 3,\n' + + ' ten: 10\n' + + '};'); + bt( + 'var a = {\n' + + '/*beautify preserve:start*/\n' + + ' one : 1,\n' + + ' two : 2,\n' + + ' three : 3,\n' + + ' ten : 10\n' + + '};', + // -- output -- + 'var a = {\n' + + ' /*beautify preserve:start*/\n' + + ' one: 1,\n' + + ' two: 2,\n' + + ' three: 3,\n' + + ' ten: 10\n' + + '};'); + bt( + 'var a = {\n' + + '/*beautify preserve:start*/\n' + + ' one : 1,\n' + + ' two : 2,\n' + + ' three : 3,\n' + + ' ten : 10\n' + + '};', + // -- output -- + 'var a = {\n' + + ' /*beautify preserve:start*/\n' + + ' one: 1,\n' + + ' two: 2,\n' + + ' three: 3,\n' + + ' ten: 10\n' + + '};'); + + // Directive: ignore + bt( + '/* beautify ignore:start */\n' + + '/* beautify ignore:end */'); + bt( + '/* beautify ignore:start */\n' + + ' var a,,,{ 1;\n' + + '/* beautify ignore:end */'); + bt( + 'var a = 1;\n' + + '/* beautify ignore:start */\n' + + ' var a = 1;\n' + + '/* beautify ignore:end */'); + bt('/* beautify ignore:start */ {asdklgh;y;+++;dd2d}/* beautify ignore:end */'); + bt( + 'var a = 1;\n' + + '/* beautify ignore:start */\n' + + ' var a,,,{ 1;\n' + + '/* beautify ignore:end */', + // -- output -- + 'var a = 1;\n' + + '/* beautify ignore:start */\n' + + ' var a,,,{ 1;\n' + + '/* beautify ignore:end */'); + bt( + 'var a = 1;\n' + + ' /* beautify ignore:start */\n' + + ' var a,,,{ 1;\n' + + '/* beautify ignore:end */', + // -- output -- + 'var a = 1;\n' + + '/* beautify ignore:start */\n' + + ' var a,,,{ 1;\n' + + '/* beautify ignore:end */'); + bt( + 'var a = {\n' + + ' /* beautify ignore:start */\n' + + ' one : 1\n' + + ' two : 2,\n' + + ' three : {\n' + + ' ten : 10\n' + + ' /* beautify ignore:end */\n' + + '};'); + bt( + 'var a = {\n' + + '/* beautify ignore:start */\n' + + ' one : 1\n' + + ' two : 2,\n' + + ' three : {\n' + + ' ten : 10\n' + + '/* beautify ignore:end */\n' + + '};', + // -- output -- + 'var a = {\n' + + ' /* beautify ignore:start */\n' + + ' one : 1\n' + + ' two : 2,\n' + + ' three : {\n' + + ' ten : 10\n' + + '/* beautify ignore:end */\n' + + '};'); + + // Directives - multiple and interacting + bt( + 'var a = {\n' + + '/* beautify preserve:start */\n' + + '/* beautify preserve:start */\n' + + ' one : 1,\n' + + ' /* beautify preserve:end */\n' + + ' two : 2,\n' + + ' three : 3,\n' + + '/* beautify preserve:start */\n' + + ' ten : 10\n' + + '/* beautify preserve:end */\n' + + '};', + // -- output -- + 'var a = {\n' + + ' /* beautify preserve:start */\n' + + '/* beautify preserve:start */\n' + + ' one : 1,\n' + + ' /* beautify preserve:end */\n' + + ' two: 2,\n' + + ' three: 3,\n' + + ' /* beautify preserve:start */\n' + + ' ten : 10\n' + + '/* beautify preserve:end */\n' + + '};'); + bt( + 'var a = {\n' + + '/* beautify ignore:start */\n' + + ' one : 1\n' + + ' /* beautify ignore:end */\n' + + ' two : 2,\n' + + '/* beautify ignore:start */\n' + + ' three : {\n' + + ' ten : 10\n' + + '/* beautify ignore:end */\n' + + '};', + // -- output -- + 'var a = {\n' + + ' /* beautify ignore:start */\n' + + ' one : 1\n' + + ' /* beautify ignore:end */\n' + + ' two: 2,\n' + + ' /* beautify ignore:start */\n' + + ' three : {\n' + + ' ten : 10\n' + + '/* beautify ignore:end */\n' + + '};'); + + // Starts can occur together, ignore:end must occur alone. + bt( + 'var a = {\n' + + '/* beautify ignore:start */\n' + + ' one : 1\n' + + ' NOTE: ignore end block does not support starting other directives\n' + + ' This does not match the ending the ignore...\n' + + ' /* beautify ignore:end preserve:start */\n' + + ' two : 2,\n' + + '/* beautify ignore:start */\n' + + ' three : {\n' + + ' ten : 10\n' + + ' ==The next comment ends the starting ignore==\n' + + '/* beautify ignore:end */\n' + + '};', + // -- output -- + 'var a = {\n' + + ' /* beautify ignore:start */\n' + + ' one : 1\n' + + ' NOTE: ignore end block does not support starting other directives\n' + + ' This does not match the ending the ignore...\n' + + ' /* beautify ignore:end preserve:start */\n' + + ' two : 2,\n' + + '/* beautify ignore:start */\n' + + ' three : {\n' + + ' ten : 10\n' + + ' ==The next comment ends the starting ignore==\n' + + '/* beautify ignore:end */\n' + + '};'); + bt( + 'var a = {\n' + + '/* beautify ignore:start preserve:start */\n' + + ' one : {\n' + + ' /* beautify ignore:end */\n' + + ' two : 2,\n' + + ' /* beautify ignore:start */\n' + + ' three : {\n' + + '/* beautify ignore:end */\n' + + ' ten : 10\n' + + ' // This is all preserved\n' + + '};', + // -- output -- + 'var a = {\n' + + ' /* beautify ignore:start preserve:start */\n' + + ' one : {\n' + + ' /* beautify ignore:end */\n' + + ' two : 2,\n' + + ' /* beautify ignore:start */\n' + + ' three : {\n' + + '/* beautify ignore:end */\n' + + ' ten : 10\n' + + ' // This is all preserved\n' + + '};'); + bt( + 'var a = {\n' + + '/* beautify ignore:start preserve:start */\n' + + ' one : {\n' + + ' /* beautify ignore:end */\n' + + ' two : 2,\n' + + ' /* beautify ignore:start */\n' + + ' three : {\n' + + '/* beautify ignore:end */\n' + + ' ten : 10,\n' + + '/* beautify preserve:end */\n' + + ' eleven: 11\n' + + '};', + // -- output -- + 'var a = {\n' + + ' /* beautify ignore:start preserve:start */\n' + + ' one : {\n' + + ' /* beautify ignore:end */\n' + + ' two : 2,\n' + + ' /* beautify ignore:start */\n' + + ' three : {\n' + + '/* beautify ignore:end */\n' + + ' ten : 10,\n' + + '/* beautify preserve:end */\n' + + ' eleven: 11\n' + + '};'); + + + //============================================================ + // Comments and tests + reset_options(); + + // #913 + bt( + 'class test {\n' + + ' method1() {\n' + + ' let resp = null;\n' + + ' }\n' + + ' /**\n' + + ' * @param {String} id\n' + + ' */\n' + + ' method2(id) {\n' + + ' let resp2 = null;\n' + + ' }\n' + + '}'); + + // #1090 + bt( + 'for (var i = 0; i < 20; ++i) // loop\n' + + ' if (i % 3) {\n' + + ' console.log(i);\n' + + ' }\n' + + 'console.log("done");'); + + // #1043 + bt( + 'var o = {\n' + + ' k: 0\n' + + '}\n' + + '// ...\n' + + 'foo(o)'); + + // #713 and #964 + bt( + 'Meteor.call("foo", bar, function(err, result) {\n' + + ' Session.set("baz", result.lorem)\n' + + '})\n' + + '//blah blah'); + + // #815 + bt( + 'foo()\n' + + '// this is a comment\n' + + 'bar()\n' + + '\n' + + 'const foo = 5\n' + + '// comment\n' + + 'bar()'); + + // This shows current behavior. Note #1069 is not addressed yet. + bt( + 'if (modulus === 2) {\n' + + ' // i might be odd here\n' + + ' i += (i & 1);\n' + + ' // now i is guaranteed to be even\n' + + ' // this block is obviously about the statement above\n' + + '\n' + + ' // #1069 This should attach to the block below\n' + + ' // this comment is about the block after it.\n' + + '} else {\n' + + ' // rounding up using integer arithmetic only\n' + + ' if (i % modulus)\n' + + ' i += modulus - (i % modulus);\n' + + ' // now i is divisible by modulus\n' + + ' // behavior of comments should be different for single statements vs block statements/expressions\n' + + '}\n' + + '\n' + + 'if (modulus === 2)\n' + + ' // i might be odd here\n' + + ' i += (i & 1);\n' + + '// now i is guaranteed to be even\n' + + '// non-braced comments unindent immediately\n' + + '\n' + + '// this comment is about the block after it.\n' + + 'else\n' + + ' // rounding up using integer arithmetic only\n' + + ' if (i % modulus)\n' + + ' i += modulus - (i % modulus);\n' + + '// behavior of comments should be different for single statements vs block statements/expressions'); + + + //============================================================ + // Template Formatting + reset_options(); + bt(''); + bt('a = ;'); + bt( + '");\n' + + '}\n' + + '?>'); + bt('a = <%= external() %>;'); + + + //============================================================ + // jslint and space after anon function - (f = " ", c = "") + reset_options(); + opts.jslint_happy = true; + opts.space_after_anon_function = true; + bt( + 'a=typeof(x)', + // -- output -- + 'a = typeof (x)'); + bt( + 'x();\n' + + '\n' + + 'function(){}', + // -- output -- + 'x();\n' + + '\n' + + 'function () {}'); + bt( + 'x();\n' + + '\n' + + 'var x = {\n' + + 'x: function(){}\n' + + '}', + // -- output -- + 'x();\n' + + '\n' + + 'var x = {\n' + + ' x: function () {}\n' + + '}'); + bt( + 'function () {\n' + + ' var a, b, c, d, e = [],\n' + + ' f;\n' + + '}'); + bt( + 'switch(x) {case 0: case 1: a(); break; default: break}', + // -- output -- + 'switch (x) {\n' + + 'case 0:\n' + + 'case 1:\n' + + ' a();\n' + + ' break;\n' + + 'default:\n' + + ' break\n' + + '}'); + bt( + 'switch(x){case -1:break;case !y:break;}', + // -- output -- + 'switch (x) {\n' + + 'case -1:\n' + + ' break;\n' + + 'case !y:\n' + + ' break;\n' + + '}'); + + // typical greasemonkey start + test_fragment( + '// comment 2\n' + + '(function ()'); + bt( + 'var a2, b2, c2, d2 = 0, c = function() {}, d = \'\';', + // -- output -- + 'var a2, b2, c2, d2 = 0,\n' + + ' c = function () {},\n' + + ' d = \'\';'); + bt( + 'var a2, b2, c2, d2 = 0, c = function() {},\n' + + 'd = \'\';', + // -- output -- + 'var a2, b2, c2, d2 = 0,\n' + + ' c = function () {},\n' + + ' d = \'\';'); + bt( + 'var o2=$.extend(a);function(){alert(x);}', + // -- output -- + 'var o2 = $.extend(a);\n' + + '\n' + + 'function () {\n' + + ' alert(x);\n' + + '}'); + bt( + 'function*() {\n' + + ' yield 1;\n' + + '}', + // -- output -- + 'function* () {\n' + + ' yield 1;\n' + + '}'); + bt( + 'function* x() {\n' + + ' yield 1;\n' + + '}'); + + // jslint and space after anon function - (f = " ", c = "") + reset_options(); + opts.jslint_happy = true; + opts.space_after_anon_function = false; + bt( + 'a=typeof(x)', + // -- output -- + 'a = typeof (x)'); + bt( + 'x();\n' + + '\n' + + 'function(){}', + // -- output -- + 'x();\n' + + '\n' + + 'function () {}'); + bt( + 'x();\n' + + '\n' + + 'var x = {\n' + + 'x: function(){}\n' + + '}', + // -- output -- + 'x();\n' + + '\n' + + 'var x = {\n' + + ' x: function () {}\n' + + '}'); + bt( + 'function () {\n' + + ' var a, b, c, d, e = [],\n' + + ' f;\n' + + '}'); + bt( + 'switch(x) {case 0: case 1: a(); break; default: break}', + // -- output -- + 'switch (x) {\n' + + 'case 0:\n' + + 'case 1:\n' + + ' a();\n' + + ' break;\n' + + 'default:\n' + + ' break\n' + + '}'); + bt( + 'switch(x){case -1:break;case !y:break;}', + // -- output -- + 'switch (x) {\n' + + 'case -1:\n' + + ' break;\n' + + 'case !y:\n' + + ' break;\n' + + '}'); + + // typical greasemonkey start + test_fragment( + '// comment 2\n' + + '(function ()'); + bt( + 'var a2, b2, c2, d2 = 0, c = function() {}, d = \'\';', + // -- output -- + 'var a2, b2, c2, d2 = 0,\n' + + ' c = function () {},\n' + + ' d = \'\';'); + bt( + 'var a2, b2, c2, d2 = 0, c = function() {},\n' + + 'd = \'\';', + // -- output -- + 'var a2, b2, c2, d2 = 0,\n' + + ' c = function () {},\n' + + ' d = \'\';'); + bt( + 'var o2=$.extend(a);function(){alert(x);}', + // -- output -- + 'var o2 = $.extend(a);\n' + + '\n' + + 'function () {\n' + + ' alert(x);\n' + + '}'); + bt( + 'function*() {\n' + + ' yield 1;\n' + + '}', + // -- output -- + 'function* () {\n' + + ' yield 1;\n' + + '}'); + bt( + 'function* x() {\n' + + ' yield 1;\n' + + '}'); + + // jslint and space after anon function - (f = " ", c = " ") + reset_options(); + opts.jslint_happy = false; + opts.space_after_anon_function = true; + bt( + 'a=typeof(x)', + // -- output -- + 'a = typeof (x)'); + bt( + 'x();\n' + + '\n' + + 'function(){}', + // -- output -- + 'x();\n' + + '\n' + + 'function () {}'); + bt( + 'x();\n' + + '\n' + + 'var x = {\n' + + 'x: function(){}\n' + + '}', + // -- output -- + 'x();\n' + + '\n' + + 'var x = {\n' + + ' x: function () {}\n' + + '}'); + bt( + 'function () {\n' + + ' var a, b, c, d, e = [],\n' + + ' f;\n' + + '}'); + bt( + 'switch(x) {case 0: case 1: a(); break; default: break}', + // -- output -- + 'switch (x) {\n' + + ' case 0:\n' + + ' case 1:\n' + + ' a();\n' + + ' break;\n' + + ' default:\n' + + ' break\n' + + '}'); + bt( + 'switch(x){case -1:break;case !y:break;}', + // -- output -- + 'switch (x) {\n' + + ' case -1:\n' + + ' break;\n' + + ' case !y:\n' + + ' break;\n' + + '}'); + + // typical greasemonkey start + test_fragment( + '// comment 2\n' + + '(function ()'); + bt( + 'var a2, b2, c2, d2 = 0, c = function() {}, d = \'\';', + // -- output -- + 'var a2, b2, c2, d2 = 0,\n' + + ' c = function () {},\n' + + ' d = \'\';'); + bt( + 'var a2, b2, c2, d2 = 0, c = function() {},\n' + + 'd = \'\';', + // -- output -- + 'var a2, b2, c2, d2 = 0,\n' + + ' c = function () {},\n' + + ' d = \'\';'); + bt( + 'var o2=$.extend(a);function(){alert(x);}', + // -- output -- + 'var o2 = $.extend(a);\n' + + '\n' + + 'function () {\n' + + ' alert(x);\n' + + '}'); + bt( + 'function*() {\n' + + ' yield 1;\n' + + '}', + // -- output -- + 'function* () {\n' + + ' yield 1;\n' + + '}'); + bt( + 'function* x() {\n' + + ' yield 1;\n' + + '}'); + + // jslint and space after anon function - (f = "", c = " ") + reset_options(); + opts.jslint_happy = false; + opts.space_after_anon_function = false; + bt( + 'a=typeof(x)', + // -- output -- + 'a = typeof(x)'); + bt( + 'x();\n' + + '\n' + + 'function(){}', + // -- output -- + 'x();\n' + + '\n' + + 'function() {}'); + bt( + 'x();\n' + + '\n' + + 'var x = {\n' + + 'x: function(){}\n' + + '}', + // -- output -- + 'x();\n' + + '\n' + + 'var x = {\n' + + ' x: function() {}\n' + + '}'); + bt( + 'function () {\n' + + ' var a, b, c, d, e = [],\n' + + ' f;\n' + + '}', + // -- output -- + 'function() {\n' + + ' var a, b, c, d, e = [],\n' + + ' f;\n' + + '}'); + bt( + 'switch(x) {case 0: case 1: a(); break; default: break}', + // -- output -- + 'switch (x) {\n' + + ' case 0:\n' + + ' case 1:\n' + + ' a();\n' + + ' break;\n' + + ' default:\n' + + ' break\n' + + '}'); + bt( + 'switch(x){case -1:break;case !y:break;}', + // -- output -- + 'switch (x) {\n' + + ' case -1:\n' + + ' break;\n' + + ' case !y:\n' + + ' break;\n' + + '}'); + + // typical greasemonkey start + test_fragment( + '// comment 2\n' + + '(function()'); + bt( + 'var a2, b2, c2, d2 = 0, c = function() {}, d = \'\';', + // -- output -- + 'var a2, b2, c2, d2 = 0,\n' + + ' c = function() {},\n' + + ' d = \'\';'); + bt( + 'var a2, b2, c2, d2 = 0, c = function() {},\n' + + 'd = \'\';', + // -- output -- + 'var a2, b2, c2, d2 = 0,\n' + + ' c = function() {},\n' + + ' d = \'\';'); + bt( + 'var o2=$.extend(a);function(){alert(x);}', + // -- output -- + 'var o2 = $.extend(a);\n' + + '\n' + + 'function() {\n' + + ' alert(x);\n' + + '}'); + bt( + 'function*() {\n' + + ' yield 1;\n' + + '}'); + bt( + 'function* x() {\n' + + ' yield 1;\n' + + '}'); + + + //============================================================ + // Regression tests + reset_options(); + + // Issue 241 + bt( + 'obj\n' + + ' .last({\n' + + ' foo: 1,\n' + + ' bar: 2\n' + + ' });\n' + + 'var test = 1;'); + bt( + 'obj\n' + + ' .last(a, function() {\n' + + ' var test;\n' + + ' });\n' + + 'var test = 1;'); + bt( + 'obj.first()\n' + + ' .second()\n' + + ' .last(function(err, response) {\n' + + ' console.log(err);\n' + + ' });'); + + // Issue 268 and 275 + bt( + 'obj.last(a, function() {\n' + + ' var test;\n' + + '});\n' + + 'var test = 1;'); + bt( + 'obj.last(a,\n' + + ' function() {\n' + + ' var test;\n' + + ' });\n' + + 'var test = 1;'); + bt( + '(function() {if (!window.FOO) window.FOO || (window.FOO = function() {var b = {bar: "zort"};});})();', + // -- output -- + '(function() {\n' + + ' if (!window.FOO) window.FOO || (window.FOO = function() {\n' + + ' var b = {\n' + + ' bar: "zort"\n' + + ' };\n' + + ' });\n' + + '})();'); + + // Issue 281 + bt( + 'define(["dojo/_base/declare", "my/Employee", "dijit/form/Button",\n' + + ' "dojo/_base/lang", "dojo/Deferred"\n' + + '], function(declare, Employee, Button, lang, Deferred) {\n' + + ' return declare(Employee, {\n' + + ' constructor: function() {\n' + + ' new Button({\n' + + ' onClick: lang.hitch(this, function() {\n' + + ' new Deferred().then(lang.hitch(this, function() {\n' + + ' this.salary * 0.25;\n' + + ' }));\n' + + ' })\n' + + ' });\n' + + ' }\n' + + ' });\n' + + '});'); + bt( + 'define(["dojo/_base/declare", "my/Employee", "dijit/form/Button",\n' + + ' "dojo/_base/lang", "dojo/Deferred"\n' + + ' ],\n' + + ' function(declare, Employee, Button, lang, Deferred) {\n' + + ' return declare(Employee, {\n' + + ' constructor: function() {\n' + + ' new Button({\n' + + ' onClick: lang.hitch(this, function() {\n' + + ' new Deferred().then(lang.hitch(this, function() {\n' + + ' this.salary * 0.25;\n' + + ' }));\n' + + ' })\n' + + ' });\n' + + ' }\n' + + ' });\n' + + ' });'); + + // Issue 459 + bt( + '(function() {\n' + + ' return {\n' + + ' foo: function() {\n' + + ' return "bar";\n' + + ' },\n' + + ' bar: ["bar"]\n' + + ' };\n' + + '}());'); + + // Issue 505 - strings should end at newline unless continued by backslash + bt( + 'var name = "a;\n' + + 'name = "b";'); + bt( + 'var name = "a;\\\n' + + ' name = b";'); + + // Issue 514 - some operators require spaces to distinguish them + bt('var c = "_ACTION_TO_NATIVEAPI_" + ++g++ + +new Date;'); + bt('var c = "_ACTION_TO_NATIVEAPI_" - --g-- - -new Date;'); + + // Issue 440 - reserved words can be used as object property names + bt( + 'a = {\n' + + ' function: {},\n' + + ' "function": {},\n' + + ' throw: {},\n' + + ' "throw": {},\n' + + ' var: {},\n' + + ' "var": {},\n' + + ' set: {},\n' + + ' "set": {},\n' + + ' get: {},\n' + + ' "get": {},\n' + + ' if: {},\n' + + ' "if": {},\n' + + ' then: {},\n' + + ' "then": {},\n' + + ' else: {},\n' + + ' "else": {},\n' + + ' yay: {}\n' + + '};'); + + // Issue 331 - if-else with braces edge case + bt( + 'if(x){a();}else{b();}if(y){c();}', + // -- output -- + 'if (x) {\n' + + ' a();\n' + + '} else {\n' + + ' b();\n' + + '}\n' + + 'if (y) {\n' + + ' c();\n' + + '}'); + + // Issue 485 - ensure function declarations behave the same in arrays as elsewhere + bt( + 'var v = ["a",\n' + + ' function() {\n' + + ' return;\n' + + ' }, {\n' + + ' id: 1\n' + + ' }\n' + + '];'); + bt( + 'var v = ["a", function() {\n' + + ' return;\n' + + '}, {\n' + + ' id: 1\n' + + '}];'); + + // Issue 382 - initial totally cursory support for es6 module export + bt( + 'module "Even" {\n' + + ' import odd from "Odd";\n' + + ' export function sum(x, y) {\n' + + ' return x + y;\n' + + ' }\n' + + ' export var pi = 3.141593;\n' + + ' export default moduleName;\n' + + '}'); + bt( + 'module "Even" {\n' + + ' export default function div(x, y) {}\n' + + '}'); + + // Issue 889 - export default { ... } + bt( + 'export default {\n' + + ' func1() {},\n' + + ' func2() {}\n' + + ' func3() {}\n' + + '}'); + bt( + 'export default {\n' + + ' a() {\n' + + ' return 1;\n' + + ' },\n' + + ' b() {\n' + + ' return 2;\n' + + ' },\n' + + ' c() {\n' + + ' return 3;\n' + + ' }\n' + + '}'); + + // Issue 508 + bt('set["name"]'); + bt('get["name"]'); + bt( + 'a = {\n' + + ' set b(x) {},\n' + + ' c: 1,\n' + + ' d: function() {}\n' + + '};'); + bt( + 'a = {\n' + + ' get b() {\n' + + ' retun 0;\n' + + ' },\n' + + ' c: 1,\n' + + ' d: function() {}\n' + + '};'); + + // Issue 298 - do not under indent if/while/for condtionals experesions + bt( + '\'use strict\';\n' + + 'if ([].some(function() {\n' + + ' return false;\n' + + ' })) {\n' + + ' console.log("hello");\n' + + '}'); + + // Issue 298 - do not under indent if/while/for condtionals experesions + bt( + '\'use strict\';\n' + + 'if ([].some(function() {\n' + + ' return false;\n' + + ' })) {\n' + + ' console.log("hello");\n' + + '}'); + + // Issue 552 - Typescript? Okay... we didn't break it before, so try not to break it now. + bt( + 'class Test {\n' + + ' blah: string[];\n' + + ' foo(): number {\n' + + ' return 0;\n' + + ' }\n' + + ' bar(): number {\n' + + ' return 0;\n' + + ' }\n' + + '}'); + bt( + 'interface Test {\n' + + ' blah: string[];\n' + + ' foo(): number {\n' + + ' return 0;\n' + + ' }\n' + + ' bar(): number {\n' + + ' return 0;\n' + + ' }\n' + + '}'); + + // Issue 583 - Functions with comments after them should still indent correctly. + bt( + 'function exit(code) {\n' + + ' setTimeout(function() {\n' + + ' phantom.exit(code);\n' + + ' }, 0);\n' + + ' phantom.onError = function() {};\n' + + '}\n' + + '// Comment'); + + // Issue 806 - newline arrow functions + bt( + 'a.b("c",\n' + + ' () => d.e\n' + + ')'); + + // Issue 810 - es6 object literal detection + bt( + 'function badFormatting() {\n' + + ' return {\n' + + ' a,\n' + + ' b: c,\n' + + ' d: e,\n' + + ' f: g,\n' + + ' h,\n' + + ' i,\n' + + ' j: k\n' + + ' }\n' + + '}\n' + + '\n' + + 'function goodFormatting() {\n' + + ' return {\n' + + ' a: b,\n' + + ' c,\n' + + ' d: e,\n' + + ' f: g,\n' + + ' h,\n' + + ' i,\n' + + ' j: k\n' + + ' }\n' + + '}'); + + // Issue 602 - ES6 object literal shorthand functions + bt( + 'return {\n' + + ' fn1() {},\n' + + ' fn2() {}\n' + + '}'); + bt( + 'throw {\n' + + ' fn1() {},\n' + + ' fn2() {}\n' + + '}'); + bt( + 'foo({\n' + + ' fn1(a) {}\n' + + ' fn2(a) {}\n' + + '})'); + bt( + 'foo("text", {\n' + + ' fn1(a) {}\n' + + ' fn2(a) {}\n' + + '})'); + bt( + 'oneArg = {\n' + + ' fn1(a) {\n' + + ' do();\n' + + ' },\n' + + ' fn2() {}\n' + + '}'); + bt( + 'multiArg = {\n' + + ' fn1(a, b, c) {\n' + + ' do();\n' + + ' },\n' + + ' fn2() {}\n' + + '}'); + bt( + 'noArgs = {\n' + + ' fn1() {\n' + + ' do();\n' + + ' },\n' + + ' fn2() {}\n' + + '}'); + bt( + 'emptyFn = {\n' + + ' fn1() {},\n' + + ' fn2() {}\n' + + '}'); + bt( + 'nested = {\n' + + ' fns: {\n' + + ' fn1() {},\n' + + ' fn2() {}\n' + + ' }\n' + + '}'); + bt( + 'array = [{\n' + + ' fn1() {},\n' + + ' prop: val,\n' + + ' fn2() {}\n' + + '}]'); + bt( + 'expr = expr ? expr : {\n' + + ' fn1() {},\n' + + ' fn2() {}\n' + + '}'); + bt( + 'strange = valid + {\n' + + ' fn1() {},\n' + + ' fn2() {\n' + + ' return 1;\n' + + ' }\n' + + '}.fn2()'); + + // Issue 854 - Arrow function with statement block + bt( + 'test(() => {\n' + + ' var a = {}\n' + + '\n' + + ' a.what = () => true ? 1 : 2\n' + + '\n' + + ' a.thing = () => {\n' + + ' b();\n' + + ' }\n' + + '})'); + + // Issue 406 - Multiline array + bt( + 'var tempName = [\n' + + ' "temp",\n' + + ' process.pid,\n' + + ' (Math.random() * 0x1000000000).toString(36),\n' + + ' new Date().getTime()\n' + + '].join("-");'); + + // Issue #996 - Input ends with backslash throws exception + test_fragment( + 'sd = 1;\n' + + '/'); + + // Issue #1079 - unbraced if with comments should still look right + bt( + 'if (console.log)\n' + + ' for (var i = 0; i < 20; ++i)\n' + + ' if (i % 3)\n' + + ' console.log(i);\n' + + '// all done\n' + + 'console.log("done");'); + + // Issue #1085 - function should not have blank line in a number of cases + bt( + 'var transformer =\n' + + ' options.transformer ||\n' + + ' globalSettings.transformer ||\n' + + ' function(x) {\n' + + ' return x;\n' + + ' };'); + + // Issue #569 - function should not have blank line in a number of cases + bt( + '(function(global) {\n' + + ' "use strict";\n' + + '\n' + + ' /* jshint ignore:start */\n' + + ' include "somefile.js"\n' + + ' /* jshint ignore:end */\n' + + '}(this));'); + bt( + 'function bindAuthEvent(eventName) {\n' + + ' self.auth.on(eventName, function(event, meta) {\n' + + ' self.emit(eventName, event, meta);\n' + + ' });\n' + + '}\n' + + '["logged_in", "logged_out", "signed_up", "updated_user"].forEach(bindAuthEvent);\n' + + '\n' + + 'function bindBrowserEvent(eventName) {\n' + + ' browser.on(eventName, function(event, meta) {\n' + + ' self.emit(eventName, event, meta);\n' + + ' });\n' + + '}\n' + + '["navigating"].forEach(bindBrowserEvent);'); + + // Issue #892 - new line between chained methods + bt( + 'foo\n' + + ' .who()\n' + + '\n' + + ' .knows()\n' + + ' // comment\n' + + ' .nothing() // comment\n' + + '\n' + + ' .more()'); + + + //============================================================ + // Test non-positionable-ops + reset_options(); + bt('a += 2;'); + bt('a -= 2;'); + bt('a *= 2;'); + bt('a /= 2;'); + bt('a %= 2;'); + bt('a &= 2;'); + bt('a ^= 2;'); + bt('a |= 2;'); + bt('a **= 2;'); + bt('a <<= 2;'); + bt('a >>= 2;'); + + + //============================================================ + // brace_style ,preserve-inline tests - (obo = " ", obot = "", oao = "\n", oaot = " ", obc = "\n", oac = " ", oact = "") + reset_options(); + opts.brace_style = 'collapse,preserve-inline'; + bt('import { asdf } from "asdf";'); + bt('import { get } from "asdf";'); + bt('function inLine() { console.log("oh em gee"); }'); + bt('if (cancer) { console.log("Im sorry but you only have so long to live..."); }'); + bt('if (ding) { console.log("dong"); } else { console.log("dang"); }'); + bt( + 'function kindaComplex() {\n' + + ' var a = 2;\n' + + ' var obj = {};\n' + + ' var obj2 = { a: "a", b: "b" };\n' + + ' var obj3 = {\n' + + ' c: "c",\n' + + ' d: "d",\n' + + ' e: "e"\n' + + ' };\n' + + '}'); + bt( + 'function complex() {\n' + + ' console.log("wowe");\n' + + ' (function() { var a = 2; var b = 3; })();\n' + + ' $.each(arr, function(el, idx) { return el; });\n' + + ' var obj = {\n' + + ' a: function() { console.log("test"); },\n' + + ' b() {\n' + + ' console.log("test2");\n' + + ' }\n' + + ' };\n' + + '}', + // -- output -- + 'function complex() {\n' + + ' console.log("wowe");\n' + + ' (function() { var a = 2; var b = 3; })();\n' + + ' $.each(arr, function(el, idx) { return el; });\n' + + ' var obj = {\n' + + ' a: function() { console.log("test"); },\n' + + ' b() {\n' + + ' console.log("test2");\n' + + ' }\n' + + ' };\n' + + '}'); + + // brace_style ,preserve-inline tests - (obo = "\n", obot = " ", oao = "\n", oaot = " ", obc = "\n", oac = "\n", oact = " ") + reset_options(); + opts.brace_style = 'expand,preserve-inline'; + bt('import { asdf } from "asdf";'); + bt('import { get } from "asdf";'); + bt('function inLine() { console.log("oh em gee"); }'); + bt('if (cancer) { console.log("Im sorry but you only have so long to live..."); }'); + bt( + 'if (ding) { console.log("dong"); } else { console.log("dang"); }', + // -- output -- + 'if (ding) { console.log("dong"); }\n' + + 'else { console.log("dang"); }'); + bt( + 'function kindaComplex() {\n' + + ' var a = 2;\n' + + ' var obj = {};\n' + + ' var obj2 = { a: "a", b: "b" };\n' + + ' var obj3 = {\n' + + ' c: "c",\n' + + ' d: "d",\n' + + ' e: "e"\n' + + ' };\n' + + '}', + // -- output -- + 'function kindaComplex()\n' + + '{\n' + + ' var a = 2;\n' + + ' var obj = {};\n' + + ' var obj2 = { a: "a", b: "b" };\n' + + ' var obj3 = {\n' + + ' c: "c",\n' + + ' d: "d",\n' + + ' e: "e"\n' + + ' };\n' + + '}'); + bt( + 'function complex() {\n' + + ' console.log("wowe");\n' + + ' (function() { var a = 2; var b = 3; })();\n' + + ' $.each(arr, function(el, idx) { return el; });\n' + + ' var obj = {\n' + + ' a: function() { console.log("test"); },\n' + + ' b() {\n' + + ' console.log("test2");\n' + + ' }\n' + + ' };\n' + + '}', + // -- output -- + 'function complex()\n' + + '{\n' + + ' console.log("wowe");\n' + + ' (function() { var a = 2; var b = 3; })();\n' + + ' $.each(arr, function(el, idx) { return el; });\n' + + ' var obj = {\n' + + ' a: function() { console.log("test"); },\n' + + ' b()\n' + + ' {\n' + + ' console.log("test2");\n' + + ' }\n' + + ' };\n' + + '}'); + + // brace_style ,preserve-inline tests - (obo = " ", obot = "", oao = "\n", oaot = " ", obc = "\n", oac = "\n", oact = " ") + reset_options(); + opts.brace_style = 'end-expand,preserve-inline'; + bt('import { asdf } from "asdf";'); + bt('import { get } from "asdf";'); + bt('function inLine() { console.log("oh em gee"); }'); + bt('if (cancer) { console.log("Im sorry but you only have so long to live..."); }'); + bt( + 'if (ding) { console.log("dong"); } else { console.log("dang"); }', + // -- output -- + 'if (ding) { console.log("dong"); }\n' + + 'else { console.log("dang"); }'); + bt( + 'function kindaComplex() {\n' + + ' var a = 2;\n' + + ' var obj = {};\n' + + ' var obj2 = { a: "a", b: "b" };\n' + + ' var obj3 = {\n' + + ' c: "c",\n' + + ' d: "d",\n' + + ' e: "e"\n' + + ' };\n' + + '}'); + bt( + 'function complex() {\n' + + ' console.log("wowe");\n' + + ' (function() { var a = 2; var b = 3; })();\n' + + ' $.each(arr, function(el, idx) { return el; });\n' + + ' var obj = {\n' + + ' a: function() { console.log("test"); },\n' + + ' b() {\n' + + ' console.log("test2");\n' + + ' }\n' + + ' };\n' + + '}', + // -- output -- + 'function complex() {\n' + + ' console.log("wowe");\n' + + ' (function() { var a = 2; var b = 3; })();\n' + + ' $.each(arr, function(el, idx) { return el; });\n' + + ' var obj = {\n' + + ' a: function() { console.log("test"); },\n' + + ' b() {\n' + + ' console.log("test2");\n' + + ' }\n' + + ' };\n' + + '}'); + + // brace_style ,preserve-inline tests - (obo = " ", obot = "", oao = "\n", oaot = " ", obc = "\n", oac = " ", oact = "") + reset_options(); + opts.brace_style = 'none,preserve-inline'; + bt('import { asdf } from "asdf";'); + bt('import { get } from "asdf";'); + bt('function inLine() { console.log("oh em gee"); }'); + bt('if (cancer) { console.log("Im sorry but you only have so long to live..."); }'); + bt('if (ding) { console.log("dong"); } else { console.log("dang"); }'); + bt( + 'function kindaComplex() {\n' + + ' var a = 2;\n' + + ' var obj = {};\n' + + ' var obj2 = { a: "a", b: "b" };\n' + + ' var obj3 = {\n' + + ' c: "c",\n' + + ' d: "d",\n' + + ' e: "e"\n' + + ' };\n' + + '}'); + bt( + 'function complex() {\n' + + ' console.log("wowe");\n' + + ' (function() { var a = 2; var b = 3; })();\n' + + ' $.each(arr, function(el, idx) { return el; });\n' + + ' var obj = {\n' + + ' a: function() { console.log("test"); },\n' + + ' b() {\n' + + ' console.log("test2");\n' + + ' }\n' + + ' };\n' + + '}', + // -- output -- + 'function complex() {\n' + + ' console.log("wowe");\n' + + ' (function() { var a = 2; var b = 3; })();\n' + + ' $.each(arr, function(el, idx) { return el; });\n' + + ' var obj = {\n' + + ' a: function() { console.log("test"); },\n' + + ' b() {\n' + + ' console.log("test2");\n' + + ' }\n' + + ' };\n' + + '}'); + + // brace_style ,preserve-inline tests - (obo = " ", obot = "", oao = "\n", oaot = " ", obc = "\n", oac = " ", oact = "") + reset_options(); + opts.brace_style = 'collapse-preserve-inline'; + bt('import { asdf } from "asdf";'); + bt('import { get } from "asdf";'); + bt('function inLine() { console.log("oh em gee"); }'); + bt('if (cancer) { console.log("Im sorry but you only have so long to live..."); }'); + bt('if (ding) { console.log("dong"); } else { console.log("dang"); }'); + bt( + 'function kindaComplex() {\n' + + ' var a = 2;\n' + + ' var obj = {};\n' + + ' var obj2 = { a: "a", b: "b" };\n' + + ' var obj3 = {\n' + + ' c: "c",\n' + + ' d: "d",\n' + + ' e: "e"\n' + + ' };\n' + + '}'); + bt( + 'function complex() {\n' + + ' console.log("wowe");\n' + + ' (function() { var a = 2; var b = 3; })();\n' + + ' $.each(arr, function(el, idx) { return el; });\n' + + ' var obj = {\n' + + ' a: function() { console.log("test"); },\n' + + ' b() {\n' + + ' console.log("test2");\n' + + ' }\n' + + ' };\n' + + '}', + // -- output -- + 'function complex() {\n' + + ' console.log("wowe");\n' + + ' (function() { var a = 2; var b = 3; })();\n' + + ' $.each(arr, function(el, idx) { return el; });\n' + + ' var obj = {\n' + + ' a: function() { console.log("test"); },\n' + + ' b() {\n' + + ' console.log("test2");\n' + + ' }\n' + + ' };\n' + + '}'); + + + //============================================================ + // Destructured and related + reset_options(); + opts.brace_style = 'collapse,preserve-inline'; + + // Issue 382 - import destructured + bt( + 'module "Even" {\n' + + ' import { odd, oddly } from "Odd";\n' + + '}'); + bt( + 'import defaultMember from "module-name";\n' + + 'import * as name from "module-name";\n' + + 'import { member } from "module-name";\n' + + 'import { member as alias } from "module-name";\n' + + 'import { member1, member2 } from "module-name";\n' + + 'import { member1, member2 as alias2 } from "module-name";\n' + + 'import defaultMember, { member, member2 } from "module-name";\n' + + 'import defaultMember, * as name from "module-name";\n' + + 'import "module-name";'); + + // Issue 858 - from is a keyword only after import + bt( + 'if (from < to) {\n' + + ' from++;\n' + + '} else {\n' + + ' from--;\n' + + '}'); + + // Issue 511 - destrutured + bt( + 'var { b, c } = require("../stores");\n' + + 'var { ProjectStore } = require("../stores");\n' + + '\n' + + 'function takeThing({ prop }) {\n' + + ' console.log("inner prop", prop)\n' + + '}'); + + // Issue 315 - Short objects + bt('var a = { b: { c: { d: e } } };'); + bt( + 'var a = {\n' + + ' b: {\n' + + ' c: { d: e }\n' + + ' c3: { d: e }\n' + + ' },\n' + + ' b2: { c: { d: e } }\n' + + '};'); + + // Issue 370 - Short objects in array + bt( + 'var methods = [\n' + + ' { name: "to" },\n' + + ' { name: "step" },\n' + + ' { name: "move" },\n' + + ' { name: "min" },\n' + + ' { name: "max" }\n' + + '];'); + + // Issue 838 - Short objects in array + bt( + 'function(url, callback) {\n' + + ' var script = document.createElement("script")\n' + + ' if (true) script.onreadystatechange = function() {\n' + + ' foo();\n' + + ' }\n' + + ' else script.onload = callback;\n' + + '}'); + + // Issue 578 - Odd indenting after function + bt( + 'function bindAuthEvent(eventName) {\n' + + ' self.auth.on(eventName, function(event, meta) {\n' + + ' self.emit(eventName, event, meta);\n' + + ' });\n' + + '}\n' + + '["logged_in", "logged_out", "signed_up", "updated_user"].forEach(bindAuthEvent);'); + + // Issue #487 - some short expressions examples + bt( + 'if (a == 1) { a++; }\n' + + 'a = { a: a };\n' + + 'UserDB.findOne({ username: "xyz" }, function(err, user) {});\n' + + 'import { fs } from "fs";'); + + // Issue #982 - Fixed return expression collapse-preserve-inline + bt( + 'function foo(arg) {\n' + + ' if (!arg) { a(); }\n' + + ' if (!arg) { return false; }\n' + + ' if (!arg) { throw "inline"; }\n' + + ' return true;\n' + + '}'); + + // Issue #338 - Short expressions + bt( + 'if (someCondition) { return something; }\n' + + 'if (someCondition) {\n' + + ' return something;\n' + + '}\n' + + 'if (someCondition) { break; }\n' + + 'if (someCondition) {\n' + + ' return something;\n' + + '}'); + + + //============================================================ + // Old tests + reset_options(); + bt(''); + test_fragment(' return .5'); + test_fragment( + ' return .5;\n' + + ' a();'); + test_fragment( + ' return .5;\n' + + ' a();'); + test_fragment( + ' return .5;\n' + + ' a();'); + test_fragment(' < div'); + bt('a = 1', 'a = 1'); + bt('a=1', 'a = 1'); + bt('(3) / 2'); + bt('["a", "b"].join("")'); + bt( + 'a();\n' + + '\n' + + 'b();'); + bt( + 'var a = 1 var b = 2', + // -- output -- + 'var a = 1\n' + + 'var b = 2'); + bt( + 'var a=1, b=c[d], e=6;', + // -- output -- + 'var a = 1,\n' + + ' b = c[d],\n' + + ' e = 6;'); + bt( + 'var a,\n' + + ' b,\n' + + ' c;'); + bt( + 'let a = 1 let b = 2', + // -- output -- + 'let a = 1\n' + + 'let b = 2'); + bt( + 'let a=1, b=c[d], e=6;', + // -- output -- + 'let a = 1,\n' + + ' b = c[d],\n' + + ' e = 6;'); + bt( + 'let a,\n' + + ' b,\n' + + ' c;'); + bt( + 'const a = 1 const b = 2', + // -- output -- + 'const a = 1\n' + + 'const b = 2'); + bt( + 'const a=1, b=c[d], e=6;', + // -- output -- + 'const a = 1,\n' + + ' b = c[d],\n' + + ' e = 6;'); + bt( + 'const a,\n' + + ' b,\n' + + ' c;'); + bt('a = " 12345 "'); + bt('a = \' 12345 \''); + bt('if (a == 1) b = 2;'); + bt( + 'if(1){2}else{3}', + // -- output -- + 'if (1) {\n' + + ' 2\n' + + '} else {\n' + + ' 3\n' + + '}'); + bt('if(1||2);', 'if (1 || 2);'); + bt('(a==1)||(b==2)', '(a == 1) || (b == 2)'); + bt( + 'var a = 1 if (2) 3;', + // -- output -- + 'var a = 1\n' + + 'if (2) 3;'); + bt('a = a + 1'); + bt('a = a == 1'); + bt('/12345[^678]*9+/.match(a)'); + bt('a /= 5'); + bt('a = 0.5 * 3'); + bt('a *= 10.55'); + bt('a < .5'); + bt('a <= .5'); + bt('a<.5', 'a < .5'); + bt('a<=.5', 'a <= .5'); + + // exponent literals + bt('a = 1e10'); + bt('a = 1.3e10'); + bt('a = 1.3e-10'); + bt('a = -12345.3e-10'); + bt('a = .12345e-10'); + bt('a = 06789e-10'); + bt('a = e - 10'); + bt('a = 1.3e+10'); + bt('a = 1.e-7'); + bt('a = -12345.3e+10'); + bt('a = .12345e+10'); + bt('a = 06789e+10'); + bt('a = e + 10'); + bt('a=0e-12345.3e-10', 'a = 0e-12345 .3e-10'); + bt('a=0.e-12345.3e-10', 'a = 0.e-12345 .3e-10'); + bt('a=0x.e-12345.3e-10', 'a = 0x.e - 12345.3e-10'); + bt('a=0x0.e-12345.3e-10', 'a = 0x0.e - 12345.3e-10'); + bt('a=0x0.0e-12345.3e-10', 'a = 0x0 .0e-12345 .3e-10'); + bt('a=0g-12345.3e-10', 'a = 0 g - 12345.3e-10'); + bt('a=0.g-12345.3e-10', 'a = 0. g - 12345.3e-10'); + bt('a=0x.g-12345.3e-10', 'a = 0x.g - 12345.3e-10'); + bt('a=0x0.g-12345.3e-10', 'a = 0x0.g - 12345.3e-10'); + bt('a=0x0.0g-12345.3e-10', 'a = 0x0 .0 g - 12345.3e-10'); + + // Decimal literals + bt('a = 0123456789;'); + bt('a = 9876543210;'); + bt('a = 5647308291;'); + bt('a=030e-5', 'a = 030e-5'); + bt('a=00+4', 'a = 00 + 4'); + bt('a=32+4', 'a = 32 + 4'); + bt('a=0.6g+4', 'a = 0.6 g + 4'); + bt('a=01.10', 'a = 01.10'); + bt('a=a.10', 'a = a .10'); + bt('a=00B0x0', 'a = 00 B0x0'); + bt('a=00B0xb0', 'a = 00 B0xb0'); + bt('a=00B0x0b0', 'a = 00 B0x0b0'); + bt('a=0090x0', 'a = 0090 x0'); + bt('a=0g0b0o0', 'a = 0 g0b0o0'); + + // Hexadecimal literals + bt('a = 0x0123456789abcdef;'); + bt('a = 0X0123456789ABCDEF;'); + bt('a = 0xFeDcBa9876543210;'); + bt('a=0x30e-5', 'a = 0x30e - 5'); + bt('a=0xF0+4', 'a = 0xF0 + 4'); + bt('a=0Xff+4', 'a = 0Xff + 4'); + bt('a=0Xffg+4', 'a = 0Xff g + 4'); + bt('a=0x01.10', 'a = 0x01 .10'); + bt('a = 0xb0ce;'); + bt('a = 0x0b0;'); + bt('a=0x0B0x0', 'a = 0x0B0 x0'); + bt('a=0x0B0xb0', 'a = 0x0B0 xb0'); + bt('a=0x0B0x0b0', 'a = 0x0B0 x0b0'); + bt('a=0X090x0', 'a = 0X090 x0'); + bt('a=0Xg0b0o0', 'a = 0X g0b0o0'); + + // Octal literals + bt('a = 0o01234567;'); + bt('a = 0O01234567;'); + bt('a = 0o34120675;'); + bt('a=0o30e-5', 'a = 0o30 e - 5'); + bt('a=0o70+4', 'a = 0o70 + 4'); + bt('a=0O77+4', 'a = 0O77 + 4'); + bt('a=0O778+4', 'a = 0O77 8 + 4'); + bt('a=0O77a+4', 'a = 0O77 a + 4'); + bt('a=0o01.10', 'a = 0o01 .10'); + bt('a=0o0B0x0', 'a = 0o0 B0x0'); + bt('a=0o0B0xb0', 'a = 0o0 B0xb0'); + bt('a=0o0B0x0b0', 'a = 0o0 B0x0b0'); + bt('a=0O090x0', 'a = 0O0 90 x0'); + bt('a=0Og0b0o0', 'a = 0O g0b0o0'); + + // Binary literals + bt('a = 0b010011;'); + bt('a = 0B010011;'); + bt('a = 0b01001100001111;'); + bt('a=0b10e-5', 'a = 0b10 e - 5'); + bt('a=0b10+4', 'a = 0b10 + 4'); + bt('a=0B11+4', 'a = 0B11 + 4'); + bt('a=0B112+4', 'a = 0B11 2 + 4'); + bt('a=0B11a+4', 'a = 0B11 a + 4'); + bt('a=0b01.10', 'a = 0b01 .10'); + bt('a=0b0B0x0', 'a = 0b0 B0x0'); + bt('a=0b0B0xb0', 'a = 0b0 B0xb0'); + bt('a=0b0B0x0b0', 'a = 0b0 B0x0b0'); + bt('a=0B090x0', 'a = 0B0 90 x0'); + bt('a=0Bg0b0o0', 'a = 0B g0b0o0'); + bt('a = [1, 2, 3, 4]'); + bt('F*(g/=f)*g+b', 'F * (g /= f) * g + b'); + bt( + 'a.b({c:d})', + // -- output -- + 'a.b({\n' + + ' c: d\n' + + '})'); + bt( + 'a.b\n' + + '(\n' + + '{\n' + + 'c:\n' + + 'd\n' + + '}\n' + + ')', + // -- output -- + 'a.b({\n' + + ' c: d\n' + + '})'); + bt( + 'a.b({c:"d"})', + // -- output -- + 'a.b({\n' + + ' c: "d"\n' + + '})'); + bt( + 'a.b\n' + + '(\n' + + '{\n' + + 'c:\n' + + '"d"\n' + + '}\n' + + ')', + // -- output -- + 'a.b({\n' + + ' c: "d"\n' + + '})'); + bt('a=!b', 'a = !b'); + bt('a=!!b', 'a = !!b'); + bt('a?b:c', 'a ? b : c'); + bt('a?1:2', 'a ? 1 : 2'); + bt('a?(b):c', 'a ? (b) : c'); + bt( + 'x={a:1,b:w=="foo"?x:y,c:z}', + // -- output -- + 'x = {\n' + + ' a: 1,\n' + + ' b: w == "foo" ? x : y,\n' + + ' c: z\n' + + '}'); + bt('x=a?b?c?d:e:f:g;', 'x = a ? b ? c ? d : e : f : g;'); + bt( + 'x=a?b?c?d:{e1:1,e2:2}:f:g;', + // -- output -- + 'x = a ? b ? c ? d : {\n' + + ' e1: 1,\n' + + ' e2: 2\n' + + '} : f : g;'); + bt('function void(void) {}'); + bt('if(!a)foo();', 'if (!a) foo();'); + bt('a=~a', 'a = ~a'); + bt( + 'a;/*comment*/b;', + // -- output -- + 'a; /*comment*/\n' + + 'b;'); + bt( + 'a;/* comment */b;', + // -- output -- + 'a; /* comment */\n' + + 'b;'); + + // simple comments don't get touched at all + test_fragment( + 'a;/*\n' + + 'comment\n' + + '*/b;', + // -- output -- + 'a;\n' + + '/*\n' + + 'comment\n' + + '*/\n' + + 'b;'); + bt( + 'a;/**\n' + + '* javadoc\n' + + '*/b;', + // -- output -- + 'a;\n' + + '/**\n' + + ' * javadoc\n' + + ' */\n' + + 'b;'); + test_fragment( + 'a;/**\n' + + '\n' + + 'no javadoc\n' + + '*/b;', + // -- output -- + 'a;\n' + + '/**\n' + + '\n' + + 'no javadoc\n' + + '*/\n' + + 'b;'); + + // comment blocks detected and reindented even w/o javadoc starter + bt( + 'a;/*\n' + + '* javadoc\n' + + '*/b;', + // -- output -- + 'a;\n' + + '/*\n' + + ' * javadoc\n' + + ' */\n' + + 'b;'); + bt('if(a)break;', 'if (a) break;'); + bt( + 'if(a){break}', + // -- output -- + 'if (a) {\n' + + ' break\n' + + '}'); + bt('if((a))foo();', 'if ((a)) foo();'); + bt('for(var i=0;;) a', 'for (var i = 0;;) a'); + bt( + 'for(var i=0;;)\n' + + 'a', + // -- output -- + 'for (var i = 0;;)\n' + + ' a'); + bt('a++;'); + bt('for(;;i++)a()', 'for (;; i++) a()'); + bt( + 'for(;;i++)\n' + + 'a()', + // -- output -- + 'for (;; i++)\n' + + ' a()'); + bt('for(;;++i)a', 'for (;; ++i) a'); + bt('return(1)', 'return (1)'); + bt( + 'try{a();}catch(b){c();}finally{d();}', + // -- output -- + 'try {\n' + + ' a();\n' + + '} catch (b) {\n' + + ' c();\n' + + '} finally {\n' + + ' d();\n' + + '}'); + + // magic function call + bt('(xx)()'); + + // another magic function call + bt('a[1]()'); + bt( + 'if(a){b();}else if(c) foo();', + // -- output -- + 'if (a) {\n' + + ' b();\n' + + '} else if (c) foo();'); + bt( + 'switch(x) {case 0: case 1: a(); break; default: break}', + // -- output -- + 'switch (x) {\n' + + ' case 0:\n' + + ' case 1:\n' + + ' a();\n' + + ' break;\n' + + ' default:\n' + + ' break\n' + + '}'); + bt( + 'switch(x){case -1:break;case !y:break;}', + // -- output -- + 'switch (x) {\n' + + ' case -1:\n' + + ' break;\n' + + ' case !y:\n' + + ' break;\n' + + '}'); + bt('a !== b'); + bt( + 'if (a) b(); else c();', + // -- output -- + 'if (a) b();\n' + + 'else c();'); + + // typical greasemonkey start + bt( + '// comment\n' + + '(function something() {})'); + + // duplicating newlines + bt( + '{\n' + + '\n' + + ' x();\n' + + '\n' + + '}'); + bt('if (a in b) foo();'); + bt('if (a of b) foo();'); + bt('if (a of [1, 2, 3]) foo();'); + bt( + 'if(X)if(Y)a();else b();else c();', + // -- output -- + 'if (X)\n' + + ' if (Y) a();\n' + + ' else b();\n' + + 'else c();'); + bt( + 'if (foo) bar();\n' + + 'else break'); + bt('var a, b;'); + bt('var a = new function();'); + test_fragment('new function'); + bt('var a, b'); + bt( + '{a:1, b:2}', + // -- output -- + '{\n' + + ' a: 1,\n' + + ' b: 2\n' + + '}'); + bt( + 'a={1:[-1],2:[+1]}', + // -- output -- + 'a = {\n' + + ' 1: [-1],\n' + + ' 2: [+1]\n' + + '}'); + bt( + 'var l = {\'a\':\'1\', \'b\':\'2\'}', + // -- output -- + 'var l = {\n' + + ' \'a\': \'1\',\n' + + ' \'b\': \'2\'\n' + + '}'); + bt('if (template.user[n] in bk) foo();'); + bt('return 45'); + bt( + 'return this.prevObject ||\n' + + '\n' + + ' this.constructor(null);'); + bt('If[1]'); + bt('Then[1]'); + bt('a = 1;// comment', 'a = 1; // comment'); + bt('a = 1; // comment'); + bt( + 'a = 1;\n' + + ' // comment', + // -- output -- + 'a = 1;\n' + + '// comment'); + bt('a = [-1, -1, -1]'); + bt( + '// a\n' + + '// b\n' + + '\n' + + '\n' + + '\n' + + '// c\n' + + '// d'); + bt( + '// func-comment\n' + + '\n' + + 'function foo() {}\n' + + '\n' + + '// end-func-comment'); + + // The exact formatting these should have is open for discussion, but they are at least reasonable + bt( + 'a = [ // comment\n' + + ' -1, -1, -1\n' + + ']'); + bt( + 'var a = [ // comment\n' + + ' -1, -1, -1\n' + + ']'); + bt( + 'a = [ // comment\n' + + ' -1, // comment\n' + + ' -1, -1\n' + + ']'); + bt( + 'var a = [ // comment\n' + + ' -1, // comment\n' + + ' -1, -1\n' + + ']'); + bt( + 'o = [{a:b},{c:d}]', + // -- output -- + 'o = [{\n' + + ' a: b\n' + + '}, {\n' + + ' c: d\n' + + '}]'); + + // was: extra space appended + bt( + 'if (a) {\n' + + ' do();\n' + + '}'); + + // if/else statement with empty body + bt( + 'if (a) {\n' + + '// comment\n' + + '}else{\n' + + '// comment\n' + + '}', + // -- output -- + 'if (a) {\n' + + ' // comment\n' + + '} else {\n' + + ' // comment\n' + + '}'); + + // multiple comments indentation + bt( + 'if (a) {\n' + + '// comment\n' + + '// comment\n' + + '}', + // -- output -- + 'if (a) {\n' + + ' // comment\n' + + ' // comment\n' + + '}'); + bt( + 'if (a) b() else c();', + // -- output -- + 'if (a) b()\n' + + 'else c();'); + bt( + 'if (a) b() else if c() d();', + // -- output -- + 'if (a) b()\n' + + 'else if c() d();'); + bt('{}'); + bt( + '{\n' + + '\n' + + '}'); + bt( + 'do { a(); } while ( 1 );', + // -- output -- + 'do {\n' + + ' a();\n' + + '} while (1);'); + bt('do {} while (1);'); + bt( + 'do {\n' + + '} while (1);', + // -- output -- + 'do {} while (1);'); + bt( + 'do {\n' + + '\n' + + '} while (1);'); + bt('var a = x(a, b, c)'); + bt( + 'delete x if (a) b();', + // -- output -- + 'delete x\n' + + 'if (a) b();'); + bt( + 'delete x[x] if (a) b();', + // -- output -- + 'delete x[x]\n' + + 'if (a) b();'); + bt('for(var a=1,b=2)d', 'for (var a = 1, b = 2) d'); + bt('for(var a=1,b=2,c=3) d', 'for (var a = 1, b = 2, c = 3) d'); + bt( + 'for(var a=1,b=2,c=3;d<3;d++)\n' + + 'e', + // -- output -- + 'for (var a = 1, b = 2, c = 3; d < 3; d++)\n' + + ' e'); + bt( + 'function x(){(a||b).c()}', + // -- output -- + 'function x() {\n' + + ' (a || b).c()\n' + + '}'); + bt( + 'function x(){return - 1}', + // -- output -- + 'function x() {\n' + + ' return -1\n' + + '}'); + bt( + 'function x(){return ! a}', + // -- output -- + 'function x() {\n' + + ' return !a\n' + + '}'); + bt('x => x'); + bt('(x) => x'); + bt( + 'x => { x }', + // -- output -- + 'x => {\n' + + ' x\n' + + '}'); + bt( + '(x) => { x }', + // -- output -- + '(x) => {\n' + + ' x\n' + + '}'); + + // a common snippet in jQuery plugins + bt( + 'settings = $.extend({},defaults,settings);', + // -- output -- + 'settings = $.extend({}, defaults, settings);'); + bt('$http().then().finally().default()'); + bt( + '$http()\n' + + '.then()\n' + + '.finally()\n' + + '.default()', + // -- output -- + '$http()\n' + + ' .then()\n' + + ' .finally()\n' + + ' .default()'); + bt('$http().when.in.new.catch().throw()'); + bt( + '$http()\n' + + '.when\n' + + '.in\n' + + '.new\n' + + '.catch()\n' + + '.throw()', + // -- output -- + '$http()\n' + + ' .when\n' + + ' .in\n' + + ' .new\n' + + ' .catch()\n' + + ' .throw()'); + bt( + '{xxx;}()', + // -- output -- + '{\n' + + ' xxx;\n' + + '}()'); + bt( + 'a = \'a\'\n' + + 'b = \'b\''); + bt('a = /reg/exp'); + bt('a = /reg/'); + bt('/abc/.test()'); + bt('/abc/i.test()'); + bt( + '{/abc/i.test()}', + // -- output -- + '{\n' + + ' /abc/i.test()\n' + + '}'); + bt('var x=(a)/a;', 'var x = (a) / a;'); + bt('x != -1'); + bt('for (; s-->0;)t', 'for (; s-- > 0;) t'); + bt('for (; s++>0;)u', 'for (; s++ > 0;) u'); + bt('a = s++>s--;', 'a = s++ > s--;'); + bt('a = s++>--s;', 'a = s++ > --s;'); + bt( + '{x=#1=[]}', + // -- output -- + '{\n' + + ' x = #1=[]\n' + + '}'); + bt( + '{a:#1={}}', + // -- output -- + '{\n' + + ' a: #1={}\n' + + '}'); + bt( + '{a:#1#}', + // -- output -- + '{\n' + + ' a: #1#\n' + + '}'); + test_fragment('"incomplete-string'); + test_fragment('\'incomplete-string'); + test_fragment('/incomplete-regex'); + test_fragment('`incomplete-template-string'); + test_fragment( + '{a:1},{a:2}', + // -- output -- + '{\n' + + ' a: 1\n' + + '}, {\n' + + ' a: 2\n' + + '}'); + test_fragment( + 'var ary=[{a:1}, {a:2}];', + // -- output -- + 'var ary = [{\n' + + ' a: 1\n' + + '}, {\n' + + ' a: 2\n' + + '}];'); + + // incomplete + test_fragment( + '{a:#1', + // -- output -- + '{\n' + + ' a: #1'); + + // incomplete + test_fragment( + '{a:#', + // -- output -- + '{\n' + + ' a: #'); + + // incomplete + test_fragment( + '}}}', + // -- output -- + '}\n' + + '}\n' + + '}'); + test_fragment( + ''); + + // incomplete regexp + test_fragment('a=/regexp', 'a = /regexp'); + bt( + '{a:#1=[],b:#1#,c:#999999#}', + // -- output -- + '{\n' + + ' a: #1=[],\n' + + ' b: #1#,\n' + + ' c: #999999#\n' + + '}'); + bt( + 'do{x()}while(a>1)', + // -- output -- + 'do {\n' + + ' x()\n' + + '} while (a > 1)'); + bt( + 'x(); /reg/exp.match(something)', + // -- output -- + 'x();\n' + + '/reg/exp.match(something)'); + test_fragment( + 'something();(', + // -- output -- + 'something();\n' + + '('); + test_fragment( + '#!she/bangs, she bangs\n' + + 'f=1', + // -- output -- + '#!she/bangs, she bangs\n' + + '\n' + + 'f = 1'); + test_fragment( + '#!she/bangs, she bangs\n' + + '\n' + + 'f=1', + // -- output -- + '#!she/bangs, she bangs\n' + + '\n' + + 'f = 1'); + test_fragment( + '#!she/bangs, she bangs\n' + + '\n' + + '/* comment */'); + test_fragment( + '#!she/bangs, she bangs\n' + + '\n' + + '\n' + + '/* comment */'); + test_fragment('#'); + test_fragment('#!'); + bt('function namespace::something()'); + test_fragment( + ''); + test_fragment( + '', + // -- output -- + ''); + bt( + '{foo();--bar;}', + // -- output -- + '{\n' + + ' foo();\n' + + ' --bar;\n' + + '}'); + bt( + '{foo();++bar;}', + // -- output -- + '{\n' + + ' foo();\n' + + ' ++bar;\n' + + '}'); + bt( + '{--bar;}', + // -- output -- + '{\n' + + ' --bar;\n' + + '}'); + bt( + '{++bar;}', + // -- output -- + '{\n' + + ' ++bar;\n' + + '}'); + bt('if(true)++a;', 'if (true) ++a;'); + bt( + 'if(true)\n' + + '++a;', + // -- output -- + 'if (true)\n' + + ' ++a;'); + bt('if(true)--a;', 'if (true) --a;'); + bt( + 'if(true)\n' + + '--a;', + // -- output -- + 'if (true)\n' + + ' --a;'); + bt('elem[array]++;'); + bt('elem++ * elem[array]++;'); + bt('elem-- * -elem[array]++;'); + bt('elem-- + elem[array]++;'); + bt('elem-- - elem[array]++;'); + bt('elem-- - -elem[array]++;'); + bt('elem-- - +elem[array]++;'); + + // Handling of newlines around unary ++ and -- operators + bt( + '{foo\n' + + '++bar;}', + // -- output -- + '{\n' + + ' foo\n' + + ' ++bar;\n' + + '}'); + bt( + '{foo++\n' + + 'bar;}', + // -- output -- + '{\n' + + ' foo++\n' + + ' bar;\n' + + '}'); + + // This is invalid, but harder to guard against. Issue #203. + bt( + '{foo\n' + + '++\n' + + 'bar;}', + // -- output -- + '{\n' + + ' foo\n' + + ' ++\n' + + ' bar;\n' + + '}'); + + // regexps + bt( + 'a(/abc\\/\\/def/);b()', + // -- output -- + 'a(/abc\\/\\/def/);\n' + + 'b()'); + bt( + 'a(/a[b\\[\\]c]d/);b()', + // -- output -- + 'a(/a[b\\[\\]c]d/);\n' + + 'b()'); + + // incomplete char class + test_fragment('a(/a[b\\['); + + // allow unescaped / in char classes + bt( + 'a(/[a/b]/);b()', + // -- output -- + 'a(/[a/b]/);\n' + + 'b()'); + bt('typeof /foo\\//;'); + bt('throw /foo\\//;'); + bt('do /foo\\//;'); + bt('return /foo\\//;'); + bt( + 'switch (a) {\n' + + ' case /foo\\//:\n' + + ' b\n' + + '}'); + bt( + 'if (a) /foo\\//\n' + + 'else /foo\\//;'); + bt('if (foo) /regex/.test();'); + bt('for (index in [1, 2, 3]) /^test$/i.test(s)'); + bt( + 'function foo() {\n' + + ' return [\n' + + ' "one",\n' + + ' "two"\n' + + ' ];\n' + + '}'); + bt( + 'a=[[1,2],[4,5],[7,8]]', + // -- output -- + 'a = [\n' + + ' [1, 2],\n' + + ' [4, 5],\n' + + ' [7, 8]\n' + + ']'); + bt( + 'a=[[1,2],[4,5],function(){},[7,8]]', + // -- output -- + 'a = [\n' + + ' [1, 2],\n' + + ' [4, 5],\n' + + ' function() {},\n' + + ' [7, 8]\n' + + ']'); + bt( + 'a=[[1,2],[4,5],function(){},function(){},[7,8]]', + // -- output -- + 'a = [\n' + + ' [1, 2],\n' + + ' [4, 5],\n' + + ' function() {},\n' + + ' function() {},\n' + + ' [7, 8]\n' + + ']'); + bt( + 'a=[[1,2],[4,5],function(){},[7,8]]', + // -- output -- + 'a = [\n' + + ' [1, 2],\n' + + ' [4, 5],\n' + + ' function() {},\n' + + ' [7, 8]\n' + + ']'); + bt('a=[b,c,function(){},function(){},d]', 'a = [b, c, function() {}, function() {}, d]'); + bt( + 'a=[b,c,\n' + + 'function(){},function(){},d]', + // -- output -- + 'a = [b, c,\n' + + ' function() {},\n' + + ' function() {},\n' + + ' d\n' + + ']'); + bt('a=[a[1],b[4],c[d[7]]]', 'a = [a[1], b[4], c[d[7]]]'); + bt('[1,2,[3,4,[5,6],7],8]', '[1, 2, [3, 4, [5, 6], 7], 8]'); + bt( + '[[["1","2"],["3","4"]],[["5","6","7"],["8","9","0"]],[["1","2","3"],["4","5","6","7"],["8","9","0"]]]', + // -- output -- + '[\n' + + ' [\n' + + ' ["1", "2"],\n' + + ' ["3", "4"]\n' + + ' ],\n' + + ' [\n' + + ' ["5", "6", "7"],\n' + + ' ["8", "9", "0"]\n' + + ' ],\n' + + ' [\n' + + ' ["1", "2", "3"],\n' + + ' ["4", "5", "6", "7"],\n' + + ' ["8", "9", "0"]\n' + + ' ]\n' + + ']'); + bt( + '{[x()[0]];indent;}', + // -- output -- + '{\n' + + ' [x()[0]];\n' + + ' indent;\n' + + '}'); + bt( + '/*\n' + + ' foo trailing space \n' + + ' * bar trailing space \n' + + '**/'); + bt( + '{\n' + + ' /*\n' + + ' foo \n' + + ' * bar \n' + + ' */\n' + + '}'); + bt('return ++i'); + bt('return !!x'); + bt('return !x'); + bt('return [1,2]', 'return [1, 2]'); + bt('return;'); + bt( + 'return\n' + + 'func'); + bt('catch(e)', 'catch (e)'); + bt( + 'var a=1,b={foo:2,bar:3},{baz:4,wham:5},c=4;', + // -- output -- + 'var a = 1,\n' + + ' b = {\n' + + ' foo: 2,\n' + + ' bar: 3\n' + + ' },\n' + + ' {\n' + + ' baz: 4,\n' + + ' wham: 5\n' + + ' }, c = 4;'); + bt( + 'var a=1,b={foo:2,bar:3},{baz:4,wham:5},\n' + + 'c=4;', + // -- output -- + 'var a = 1,\n' + + ' b = {\n' + + ' foo: 2,\n' + + ' bar: 3\n' + + ' },\n' + + ' {\n' + + ' baz: 4,\n' + + ' wham: 5\n' + + ' },\n' + + ' c = 4;'); + + // inline comment + bt( + 'function x(/*int*/ start, /*string*/ foo)', + // -- output -- + 'function x( /*int*/ start, /*string*/ foo)'); + + // javadoc comment + bt( + '/**\n' + + '* foo\n' + + '*/', + // -- output -- + '/**\n' + + ' * foo\n' + + ' */'); + bt( + '{\n' + + '/**\n' + + '* foo\n' + + '*/\n' + + '}', + // -- output -- + '{\n' + + ' /**\n' + + ' * foo\n' + + ' */\n' + + '}'); + + // starless block comment + bt( + '/**\n' + + 'foo\n' + + '*/'); + bt( + '/**\n' + + 'foo\n' + + '**/'); + bt( + '/**\n' + + 'foo\n' + + 'bar\n' + + '**/'); + bt( + '/**\n' + + 'foo\n' + + '\n' + + 'bar\n' + + '**/'); + bt( + '/**\n' + + 'foo\n' + + ' bar\n' + + '**/'); + bt( + '{\n' + + '/**\n' + + 'foo\n' + + '*/\n' + + '}', + // -- output -- + '{\n' + + ' /**\n' + + ' foo\n' + + ' */\n' + + '}'); + bt( + '{\n' + + '/**\n' + + 'foo\n' + + '**/\n' + + '}', + // -- output -- + '{\n' + + ' /**\n' + + ' foo\n' + + ' **/\n' + + '}'); + bt( + '{\n' + + '/**\n' + + 'foo\n' + + 'bar\n' + + '**/\n' + + '}', + // -- output -- + '{\n' + + ' /**\n' + + ' foo\n' + + ' bar\n' + + ' **/\n' + + '}'); + bt( + '{\n' + + '/**\n' + + 'foo\n' + + '\n' + + 'bar\n' + + '**/\n' + + '}', + // -- output -- + '{\n' + + ' /**\n' + + ' foo\n' + + '\n' + + ' bar\n' + + ' **/\n' + + '}'); + bt( + '{\n' + + '/**\n' + + 'foo\n' + + ' bar\n' + + '**/\n' + + '}', + // -- output -- + '{\n' + + ' /**\n' + + ' foo\n' + + ' bar\n' + + ' **/\n' + + '}'); + bt( + '{\n' + + ' /**\n' + + ' foo\n' + + 'bar\n' + + ' **/\n' + + '}'); + bt( + 'var a,b,c=1,d,e,f=2;', + // -- output -- + 'var a, b, c = 1,\n' + + ' d, e, f = 2;'); + bt( + 'var a,b,c=[],d,e,f=2;', + // -- output -- + 'var a, b, c = [],\n' + + ' d, e, f = 2;'); + bt( + 'function() {\n' + + ' var a, b, c, d, e = [],\n' + + ' f;\n' + + '}'); + bt( + 'do/regexp/;\n' + + 'while(1);', + // -- output -- + 'do /regexp/;\n' + + 'while (1);'); + bt( + 'var a = a,\n' + + 'a;\n' + + 'b = {\n' + + 'b\n' + + '}', + // -- output -- + 'var a = a,\n' + + ' a;\n' + + 'b = {\n' + + ' b\n' + + '}'); + bt( + 'var a = a,\n' + + ' /* c */\n' + + ' b;'); + bt( + 'var a = a,\n' + + ' // c\n' + + ' b;'); + + // weird element referencing + bt('foo.("bar");'); + bt( + 'if (a) a()\n' + + 'else b()\n' + + 'newline()'); + bt( + 'if (a) a()\n' + + 'newline()'); + bt('a=typeof(x)', 'a = typeof(x)'); + bt( + 'var a = function() {\n' + + ' return null;\n' + + ' },\n' + + ' b = false;'); + bt( + 'var a = function() {\n' + + ' func1()\n' + + '}'); + bt( + 'var a = function() {\n' + + ' func1()\n' + + '}\n' + + 'var b = function() {\n' + + ' func2()\n' + + '}'); + + // code with and without semicolons + bt( + 'var whatever = require("whatever");\n' + + 'function() {\n' + + ' a = 6;\n' + + '}', + // -- output -- + 'var whatever = require("whatever");\n' + + '\n' + + 'function() {\n' + + ' a = 6;\n' + + '}'); + bt( + 'var whatever = require("whatever")\n' + + 'function() {\n' + + ' a = 6\n' + + '}', + // -- output -- + 'var whatever = require("whatever")\n' + + '\n' + + 'function() {\n' + + ' a = 6\n' + + '}'); + bt( + '{"x":[{"a":1,"b":3},\n' + + '7,8,8,8,8,{"b":99},{"a":11}]}', + // -- output -- + '{\n' + + ' "x": [{\n' + + ' "a": 1,\n' + + ' "b": 3\n' + + ' },\n' + + ' 7, 8, 8, 8, 8, {\n' + + ' "b": 99\n' + + ' }, {\n' + + ' "a": 11\n' + + ' }\n' + + ' ]\n' + + '}'); + bt( + '{"x":[{"a":1,"b":3},7,8,8,8,8,{"b":99},{"a":11}]}', + // -- output -- + '{\n' + + ' "x": [{\n' + + ' "a": 1,\n' + + ' "b": 3\n' + + ' }, 7, 8, 8, 8, 8, {\n' + + ' "b": 99\n' + + ' }, {\n' + + ' "a": 11\n' + + ' }]\n' + + '}'); + bt( + '{"1":{"1a":"1b"},"2"}', + // -- output -- + '{\n' + + ' "1": {\n' + + ' "1a": "1b"\n' + + ' },\n' + + ' "2"\n' + + '}'); + bt( + '{a:{a:b},c}', + // -- output -- + '{\n' + + ' a: {\n' + + ' a: b\n' + + ' },\n' + + ' c\n' + + '}'); + bt( + '{[y[a]];keep_indent;}', + // -- output -- + '{\n' + + ' [y[a]];\n' + + ' keep_indent;\n' + + '}'); + bt( + 'if (x) {y} else { if (x) {y}}', + // -- output -- + 'if (x) {\n' + + ' y\n' + + '} else {\n' + + ' if (x) {\n' + + ' y\n' + + ' }\n' + + '}'); + bt( + 'if (foo) one()\n' + + 'two()\n' + + 'three()'); + bt( + 'if (1 + foo() && bar(baz()) / 2) one()\n' + + 'two()\n' + + 'three()'); + bt( + 'if (1 + foo() && bar(baz()) / 2) one();\n' + + 'two();\n' + + 'three();'); + bt( + 'var a=1,b={bang:2},c=3;', + // -- output -- + 'var a = 1,\n' + + ' b = {\n' + + ' bang: 2\n' + + ' },\n' + + ' c = 3;'); + bt( + 'var a={bing:1},b=2,c=3;', + // -- output -- + 'var a = {\n' + + ' bing: 1\n' + + ' },\n' + + ' b = 2,\n' + + ' c = 3;'); + + + } + + function beautifier_unconverted_tests() + { + sanitytest = test_obj; + + reset_options(); + //============================================================ + opts.indent_size = 1; + opts.indent_char = ' '; + bt('{ one_char() }', "{\n one_char()\n}"); + + bt('var a,b=1,c=2', 'var a, b = 1,\n c = 2'); + + opts.indent_size = 4; + opts.indent_char = ' '; + bt('{ one_char() }', "{\n one_char()\n}"); + + opts.indent_size = 1; + opts.indent_char = "\t"; + bt('{ one_char() }', "{\n\tone_char()\n}"); + bt('x = a ? b : c; x;', 'x = a ? b : c;\nx;'); + + //set to something else than it should change to, but with tabs on, should override + opts.indent_size = 5; + opts.indent_char = ' '; + opts.indent_with_tabs = true; + + bt('{ one_char() }', "{\n\tone_char()\n}"); + bt('x = a ? b : c; x;', 'x = a ? b : c;\nx;'); + + opts.indent_size = 4; + opts.indent_char = ' '; + opts.indent_with_tabs = false; + + reset_options(); + //============================================================ + opts.preserve_newlines = false; + + bt('var\na=dont_preserve_newlines;', 'var a = dont_preserve_newlines;'); + + // make sure the blank line between function definitions stays + // even when preserve_newlines = false + bt('function foo() {\n return 1;\n}\n\nfunction foo() {\n return 1;\n}'); + bt('function foo() {\n return 1;\n}\nfunction foo() {\n return 1;\n}', + 'function foo() {\n return 1;\n}\n\nfunction foo() {\n return 1;\n}' + ); + bt('function foo() {\n return 1;\n}\n\n\nfunction foo() {\n return 1;\n}', + 'function foo() {\n return 1;\n}\n\nfunction foo() {\n return 1;\n}' + ); + + opts.preserve_newlines = true; + bt('var\na=do_preserve_newlines;', 'var\n a = do_preserve_newlines;'); + bt('if (foo) // comment\n{\n bar();\n}'); + + + reset_options(); + //============================================================ + opts.keep_array_indentation = false; + bt("a = ['a', 'b', 'c',\n 'd', 'e', 'f']", + "a = ['a', 'b', 'c',\n 'd', 'e', 'f'\n]"); + bt("a = ['a', 'b', 'c',\n 'd', 'e', 'f',\n 'g', 'h', 'i']", + "a = ['a', 'b', 'c',\n 'd', 'e', 'f',\n 'g', 'h', 'i'\n]"); + bt("a = ['a', 'b', 'c',\n 'd', 'e', 'f',\n 'g', 'h', 'i']", + "a = ['a', 'b', 'c',\n 'd', 'e', 'f',\n 'g', 'h', 'i'\n]"); + bt('var x = [{}\n]', 'var x = [{}]'); + bt('var x = [{foo:bar}\n]', 'var x = [{\n foo: bar\n}]'); + bt("a = ['something',\n 'completely',\n 'different'];\nif (x);", + "a = ['something',\n 'completely',\n 'different'\n];\nif (x);"); + bt("a = ['a','b','c']", "a = ['a', 'b', 'c']"); + + bt("a = ['a', 'b','c']", "a = ['a', 'b', 'c']"); + bt("x = [{'a':0}]", + "x = [{\n 'a': 0\n}]"); + bt('{a([[a1]], {b;});}', + '{\n a([\n [a1]\n ], {\n b;\n });\n}'); + bt("a();\n [\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ].toString();", + "a();\n[\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n].toString();"); + bt("a();\na = [\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ].toString();", + "a();\na = [\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n].toString();"); + bt("function() {\n Foo([\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ]);\n}", + "function() {\n Foo([\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ]);\n}"); + bt('function foo() {\n return [\n "one",\n "two"\n ];\n}'); + // 4 spaces per indent input, processed with 4-spaces per indent + bt( "function foo() {\n" + + " return [\n" + + " {\n" + + " one: 'x',\n" + + " two: [\n" + + " {\n" + + " id: 'a',\n" + + " name: 'apple'\n" + + " }, {\n" + + " id: 'b',\n" + + " name: 'banana'\n" + + " }\n" + + " ]\n" + + " }\n" + + " ];\n" + + "}", + "function foo() {\n" + + " return [{\n" + + " one: 'x',\n" + + " two: [{\n" + + " id: 'a',\n" + + " name: 'apple'\n" + + " }, {\n" + + " id: 'b',\n" + + " name: 'banana'\n" + + " }]\n" + + " }];\n" + + "}"); + // 3 spaces per indent input, processed with 4-spaces per indent + bt( "function foo() {\n" + + " return [\n" + + " {\n" + + " one: 'x',\n" + + " two: [\n" + + " {\n" + + " id: 'a',\n" + + " name: 'apple'\n" + + " }, {\n" + + " id: 'b',\n" + + " name: 'banana'\n" + + " }\n" + + " ]\n" + + " }\n" + + " ];\n" + + "}", + "function foo() {\n" + + " return [{\n" + + " one: 'x',\n" + + " two: [{\n" + + " id: 'a',\n" + + " name: 'apple'\n" + + " }, {\n" + + " id: 'b',\n" + + " name: 'banana'\n" + + " }]\n" + + " }];\n" + + "}"); + + opts.keep_array_indentation = true; + bt("a = ['a', 'b', 'c',\n 'd', 'e', 'f']"); + bt("a = ['a', 'b', 'c',\n 'd', 'e', 'f',\n 'g', 'h', 'i']"); + bt("a = ['a', 'b', 'c',\n 'd', 'e', 'f',\n 'g', 'h', 'i']"); + bt('var x = [{}\n]', 'var x = [{}\n]'); + bt('var x = [{foo:bar}\n]', 'var x = [{\n foo: bar\n }\n]'); + bt("a = ['something',\n 'completely',\n 'different'];\nif (x);"); + bt("a = ['a','b','c']", "a = ['a', 'b', 'c']"); + bt("a = ['a', 'b','c']", "a = ['a', 'b', 'c']"); + bt("x = [{'a':0}]", + "x = [{\n 'a': 0\n}]"); + bt('{a([[a1]], {b;});}', + '{\n a([[a1]], {\n b;\n });\n}'); + bt("a();\n [\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ].toString();", + "a();\n [\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ].toString();"); + bt("a();\na = [\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ].toString();", + "a();\na = [\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ].toString();"); + bt("function() {\n Foo([\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ]);\n}", + "function() {\n Foo([\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ]);\n}"); + bt('function foo() {\n return [\n "one",\n "two"\n ];\n}'); + // 4 spaces per indent input, processed with 4-spaces per indent + bt( "function foo() {\n" + + " return [\n" + + " {\n" + + " one: 'x',\n" + + " two: [\n" + + " {\n" + + " id: 'a',\n" + + " name: 'apple'\n" + + " }, {\n" + + " id: 'b',\n" + + " name: 'banana'\n" + + " }\n" + + " ]\n" + + " }\n" + + " ];\n" + + "}"); + // 3 spaces per indent input, processed with 4-spaces per indent + // Should be unchanged, but is not - #445 +// bt( "function foo() {\n" + +// " return [\n" + +// " {\n" + +// " one: 'x',\n" + +// " two: [\n" + +// " {\n" + +// " id: 'a',\n" + +// " name: 'apple'\n" + +// " }, {\n" + +// " id: 'b',\n" + +// " name: 'banana'\n" + +// " }\n" + +// " ]\n" + +// " }\n" + +// " ];\n" + +// "}"); + + + reset_options(); + //============================================================ + bt('a = //comment\n /regex/;'); + + bt('if (a)\n{\nb;\n}\nelse\n{\nc;\n}', 'if (a) {\n b;\n} else {\n c;\n}'); + + // tests for brace positioning + beautify_brace_tests('expand'); + beautify_brace_tests('collapse'); + beautify_brace_tests('end-expand'); + beautify_brace_tests('none'); + + test_fragment('roo = {\n /*\n ****\n FOO\n ****\n */\n BAR: 0\n};'); + + bt('"foo""bar""baz"', '"foo"\n"bar"\n"baz"'); + bt("'foo''bar''baz'", "'foo'\n'bar'\n'baz'"); + + + test_fragment("if (zz) {\n // ....\n}\n(function"); + + bt("{\n get foo() {}\n}"); + bt("{\n var a = get\n foo();\n}"); + bt("{\n set foo() {}\n}"); + bt("{\n var a = set\n foo();\n}"); + bt("var x = {\n get function()\n}"); + bt("var x = {\n set function()\n}"); + + // According to my current research get/set have no special meaning outside of an object literal + bt("var x = set\n\na() {}", "var x = set\n\na() {}"); + bt("var x = set\n\nfunction() {}", "var x = set\n\nfunction() {}"); + + bt(''); + bt(' + bt('for () /abc/.test()'); + bt('if (k) /aaa/m.test(v) && l();'); + bt('switch (true) {\n case /swf/i.test(foo):\n bar();\n}'); + bt('createdAt = {\n type: Date,\n default: Date.now\n}'); + bt('switch (createdAt) {\n case a:\n Date,\n default:\n Date.now\n}'); + + reset_options(); + //============================================================ + opts.space_before_conditional = false; + bt('if(a) b()'); + + + reset_options(); + //============================================================ + opts.preserve_newlines = true; + bt('var a = 42; // foo\n\nvar b;'); + bt('var a = 42; // foo\n\n\nvar b;'); + bt("var a = 'foo' +\n 'bar';"); + bt("var a = \"foo\" +\n \"bar\";"); + bt('this.oa = new OAuth(\n' + + ' _requestToken,\n' + + ' _accessToken,\n' + + ' consumer_key\n' + + ');'); + + + reset_options(); + //============================================================ + opts.unescape_strings = false; + bt('"\\\\s"'); // == "\\s" in the js source + bt("'\\\\s'"); // == '\\s' in the js source + bt("'\\\\\\s'"); // == '\\\s' in the js source + bt("'\\s'"); // == '\s' in the js source + bt('"•"'); + bt('"—"'); + bt('"\\x41\\x42\\x43\\x01"', '"\\x41\\x42\\x43\\x01"'); + bt('"\\u2022"', '"\\u2022"'); + bt('a = /\s+/'); + // bt('a = /\\x41/','a = /A/'); + bt('"\\u2022";a = /\s+/;"\\x41\\x42\\x43\\x01".match(/\\x41/);','"\\u2022";\na = /\s+/;\n"\\x41\\x42\\x43\\x01".match(/\\x41/);'); + test_fragment('"\\x22\\x27",\'\\x22\\x27\',"\\x5c",\'\\x5c\',"\\xff and \\xzz","unicode \\u0000 \\u0022 \\u0027 \\u005c \\uffff \\uzzzz"', '"\\x22\\x27", \'\\x22\\x27\', "\\x5c", \'\\x5c\', "\\xff and \\xzz", "unicode \\u0000 \\u0022 \\u0027 \\u005c \\uffff \\uzzzz"'); + + opts.unescape_strings = true; + test_fragment('"\\x20\\x40\\x4a"', '" @J"'); + test_fragment('"\\xff\\x40\\x4a"'); + test_fragment('"\\u0072\\u016B\\u0137\\u012B\\u0074\\u0069\\u0073"', '"\u0072\u016B\u0137\u012B\u0074\u0069\u0073"'); + test_fragment('"Google Chrome est\\u00E1 actualizado."', '"Google Chrome está actualizado."'); + test_fragment('"\\x22\\x27",\'\\x22\\x27\',"\\x5c",\'\\x5c\',"\\xff and \\xzz","unicode \\u0000 \\u0022 \\u0027 \\u005c \\uffff"', + '"\\"\\\'", \'\\"\\\'\', "\\\\", \'\\\\\', "\\xff and \\xzz", "unicode \\u0000 \\" \\\' \\\\ ' + unicode_char(0xffff) + '"'); + + // For error case, return the string unchanged + test_fragment('"\\x22\\x27",\'\\x22\\x27\',"\\x5c",\'\\x5c\',"\\xff and \\xzz","unicode \\u0000 \\u0022 \\u0027 \\u005c \\uffff \\uzzzz"', + '"\\"\\\'", \'\\"\\\'\', "\\\\", \'\\\\\', "\\xff and \\xzz", "unicode \\u0000 \\u0022 \\u0027 \\u005c \\uffff \\uzzzz"'); + + reset_options(); + //============================================================ + bt('return function();'); + bt('var a = function();'); + bt('var a = 5 + function();'); + + bt('import foo.*;', 'import foo.*;'); // actionscript's import + test_fragment('function f(a: a, b: b)'); // actionscript + + bt('{\n foo // something\n ,\n bar // something\n baz\n}'); + bt('function a(a) {} function b(b) {} function c(c) {}', 'function a(a) {}\n\nfunction b(b) {}\n\nfunction c(c) {}'); + bt('foo(a, function() {})'); + + bt('foo(a, /regex/)'); + + bt('/* foo */\n"x"'); + + reset_options(); + //============================================================ + opts.break_chained_methods = false; + opts.preserve_newlines = false; + bt('foo\n.bar()\n.baz().cucumber(fat)', 'foo.bar().baz().cucumber(fat)'); + bt('foo\n.bar()\n.baz().cucumber(fat); foo.bar().baz().cucumber(fat)', 'foo.bar().baz().cucumber(fat);\nfoo.bar().baz().cucumber(fat)'); + bt('foo\n.bar()\n.baz().cucumber(fat)\n foo.bar().baz().cucumber(fat)', 'foo.bar().baz().cucumber(fat)\nfoo.bar().baz().cucumber(fat)'); + bt('this\n.something = foo.bar()\n.baz().cucumber(fat)', 'this.something = foo.bar().baz().cucumber(fat)'); + bt('this.something.xxx = foo.moo.bar()'); + bt('this\n.something\n.xxx = foo.moo\n.bar()', 'this.something.xxx = foo.moo.bar()'); + + opts.break_chained_methods = false; + opts.preserve_newlines = true; + bt('foo\n.bar()\n.baz().cucumber(fat)', 'foo\n .bar()\n .baz().cucumber(fat)'); + bt('foo\n.bar()\n.baz().cucumber(fat); foo.bar().baz().cucumber(fat)', 'foo\n .bar()\n .baz().cucumber(fat);\nfoo.bar().baz().cucumber(fat)'); + bt('foo\n.bar()\n.baz().cucumber(fat)\n foo.bar().baz().cucumber(fat)', 'foo\n .bar()\n .baz().cucumber(fat)\nfoo.bar().baz().cucumber(fat)'); + bt('this\n.something = foo.bar()\n.baz().cucumber(fat)', 'this\n .something = foo.bar()\n .baz().cucumber(fat)'); + bt('this.something.xxx = foo.moo.bar()'); + bt('this\n.something\n.xxx = foo.moo\n.bar()', 'this\n .something\n .xxx = foo.moo\n .bar()'); + + opts.break_chained_methods = true; + opts.preserve_newlines = false; + bt('foo\n.bar()\n.baz().cucumber(fat)', 'foo.bar()\n .baz()\n .cucumber(fat)'); + bt('foo\n.bar()\n.baz().cucumber(fat); foo.bar().baz().cucumber(fat)', 'foo.bar()\n .baz()\n .cucumber(fat);\nfoo.bar()\n .baz()\n .cucumber(fat)'); + bt('foo\n.bar()\n.baz().cucumber(fat)\n foo.bar().baz().cucumber(fat)', 'foo.bar()\n .baz()\n .cucumber(fat)\nfoo.bar()\n .baz()\n .cucumber(fat)'); + bt('this\n.something = foo.bar()\n.baz().cucumber(fat)', 'this.something = foo.bar()\n .baz()\n .cucumber(fat)'); + bt('this.something.xxx = foo.moo.bar()'); + bt('this\n.something\n.xxx = foo.moo\n.bar()', 'this.something.xxx = foo.moo.bar()'); + + opts.break_chained_methods = true; + opts.preserve_newlines = true; + bt('foo\n.bar()\n.baz().cucumber(fat)', 'foo\n .bar()\n .baz()\n .cucumber(fat)'); + bt('foo\n.bar()\n.baz().cucumber(fat); foo.bar().baz().cucumber(fat)', 'foo\n .bar()\n .baz()\n .cucumber(fat);\nfoo.bar()\n .baz()\n .cucumber(fat)'); + bt('foo\n.bar()\n.baz().cucumber(fat)\n foo.bar().baz().cucumber(fat)', 'foo\n .bar()\n .baz()\n .cucumber(fat)\nfoo.bar()\n .baz()\n .cucumber(fat)'); + bt('this\n.something = foo.bar()\n.baz().cucumber(fat)', 'this\n .something = foo.bar()\n .baz()\n .cucumber(fat)'); + bt('this.something.xxx = foo.moo.bar()'); + bt('this\n.something\n.xxx = foo.moo\n.bar()', 'this\n .something\n .xxx = foo.moo\n .bar()'); + + reset_options(); + //============================================================ + // Line wrap test intputs + //.............---------1---------2---------3---------4---------5---------6---------7 + //.............1234567890123456789012345678901234567890123456789012345678901234567890 + wrap_input_1=('foo.bar().baz().cucumber((fat && "sassy") || (leans && mean));\n' + + 'Test_very_long_variable_name_this_should_never_wrap\n.but_this_can\n' + + 'return between_return_and_expression_should_never_wrap.but_this_can\n' + + 'throw between_throw_and_expression_should_never_wrap.but_this_can\n' + + 'if (wraps_can_occur && inside_an_if_block) that_is_\n.okay();\n' + + 'object_literal = {\n' + + ' propertx: first_token + 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap + but_this_can,\n' + + ' propertz: first_token_should_never_wrap + !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" + "but_this_can"\n' + + '}'); + + //.............---------1---------2---------3---------4---------5---------6---------7 + //.............1234567890123456789012345678901234567890123456789012345678901234567890 + wrap_input_2=('{\n' + + ' foo.bar().baz().cucumber((fat && "sassy") || (leans && mean));\n' + + ' Test_very_long_variable_name_this_should_never_wrap\n.but_this_can\n' + + ' return between_return_and_expression_should_never_wrap.but_this_can\n' + + ' throw between_throw_and_expression_should_never_wrap.but_this_can\n' + + ' if (wraps_can_occur && inside_an_if_block) that_is_\n.okay();\n' + + ' object_literal = {\n' + + ' propertx: first_token + 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap + but_this_can,\n' + + ' propertz: first_token_should_never_wrap + !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" + "but_this_can"\n' + + ' }' + + '}'); + + opts.preserve_newlines = false; + opts.wrap_line_length = 0; + //.............---------1---------2---------3---------4---------5---------6---------7 + //.............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_1, + /* expected */ + 'foo.bar().baz().cucumber((fat && "sassy") || (leans && mean));\n' + + 'Test_very_long_variable_name_this_should_never_wrap.but_this_can\n' + + 'return between_return_and_expression_should_never_wrap.but_this_can\n' + + 'throw between_throw_and_expression_should_never_wrap.but_this_can\n' + + 'if (wraps_can_occur && inside_an_if_block) that_is_.okay();\n' + + 'object_literal = {\n' + + ' propertx: first_token + 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap + but_this_can,\n' + + ' propertz: first_token_should_never_wrap + !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" + "but_this_can"\n' + + '}'); + + opts.wrap_line_length = 70; + //.............---------1---------2---------3---------4---------5---------6---------7 + //.............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_1, + /* expected */ + 'foo.bar().baz().cucumber((fat && "sassy") || (leans && mean));\n' + + 'Test_very_long_variable_name_this_should_never_wrap.but_this_can\n' + + 'return between_return_and_expression_should_never_wrap.but_this_can\n' + + 'throw between_throw_and_expression_should_never_wrap.but_this_can\n' + + 'if (wraps_can_occur && inside_an_if_block) that_is_.okay();\n' + + 'object_literal = {\n' + + ' propertx: first_token + 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap + but_this_can,\n' + + ' propertz: first_token_should_never_wrap + !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" + "but_this_can"\n' + + '}'); + + opts.wrap_line_length = 40; + //.............---------1---------2---------3---------4---------5---------6---------7 + //.............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_1, + /* expected */ + 'foo.bar().baz().cucumber((fat &&\n' + + ' "sassy") || (leans && mean));\n' + + 'Test_very_long_variable_name_this_should_never_wrap\n' + + ' .but_this_can\n' + + 'return between_return_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + 'throw between_throw_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + 'if (wraps_can_occur &&\n' + + ' inside_an_if_block) that_is_.okay();\n' + + 'object_literal = {\n' + + ' propertx: first_token +\n' + + ' 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap +\n' + + ' but_this_can,\n' + + ' propertz: first_token_should_never_wrap +\n' + + ' !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" +\n' + + ' "but_this_can"\n' + + '}'); + + opts.wrap_line_length = 41; + // NOTE: wrap is only best effort - line continues until next wrap point is found. + //.............---------1---------2---------3---------4---------5---------6---------7 + //.............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_1, + /* expected */ + 'foo.bar().baz().cucumber((fat && "sassy") ||\n' + + ' (leans && mean));\n' + + 'Test_very_long_variable_name_this_should_never_wrap\n' + + ' .but_this_can\n' + + 'return between_return_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + 'throw between_throw_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + 'if (wraps_can_occur &&\n' + + ' inside_an_if_block) that_is_.okay();\n' + + 'object_literal = {\n' + + ' propertx: first_token +\n' + + ' 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap +\n' + + ' but_this_can,\n' + + ' propertz: first_token_should_never_wrap +\n' + + ' !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" +\n' + + ' "but_this_can"\n' + + '}'); + + opts.wrap_line_length = 45; + // NOTE: wrap is only best effort - line continues until next wrap point is found. + //.............---------1---------2---------3---------4---------5---------6---------7 + //.............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_2, + /* expected */ + '{\n' + + ' foo.bar().baz().cucumber((fat && "sassy") ||\n' + + ' (leans && mean));\n' + + ' Test_very_long_variable_name_this_should_never_wrap\n' + + ' .but_this_can\n' + + ' return between_return_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + ' throw between_throw_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + ' if (wraps_can_occur &&\n' + + ' inside_an_if_block) that_is_.okay();\n' + + ' object_literal = {\n' + + ' propertx: first_token +\n' + + ' 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap +\n' + + ' but_this_can,\n' + + ' propertz: first_token_should_never_wrap +\n' + + ' !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" +\n' + + ' "but_this_can"\n' + + ' }\n'+ + '}'); + + opts.preserve_newlines = true; + opts.wrap_line_length = 0; + //.............---------1---------2---------3---------4---------5---------6---------7 + //.............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_1, + /* expected */ + 'foo.bar().baz().cucumber((fat && "sassy") || (leans && mean));\n' + + 'Test_very_long_variable_name_this_should_never_wrap\n' + + ' .but_this_can\n' + + 'return between_return_and_expression_should_never_wrap.but_this_can\n' + + 'throw between_throw_and_expression_should_never_wrap.but_this_can\n' + + 'if (wraps_can_occur && inside_an_if_block) that_is_\n' + + ' .okay();\n' + + 'object_literal = {\n' + + ' propertx: first_token + 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap + but_this_can,\n' + + ' propertz: first_token_should_never_wrap + !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" + "but_this_can"\n' + + '}'); + + opts.wrap_line_length = 70; + //.............---------1---------2---------3---------4---------5---------6---------7 + //.............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_1, + /* expected */ + 'foo.bar().baz().cucumber((fat && "sassy") || (leans && mean));\n' + + 'Test_very_long_variable_name_this_should_never_wrap\n' + + ' .but_this_can\n' + + 'return between_return_and_expression_should_never_wrap.but_this_can\n' + + 'throw between_throw_and_expression_should_never_wrap.but_this_can\n' + + 'if (wraps_can_occur && inside_an_if_block) that_is_\n' + + ' .okay();\n' + + 'object_literal = {\n' + + ' propertx: first_token + 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap + but_this_can,\n' + + ' propertz: first_token_should_never_wrap + !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" + "but_this_can"\n' + + '}'); + + + opts.wrap_line_length = 40; + //.............---------1---------2---------3---------4---------5---------6---------7 + //.............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_1, + /* expected */ + 'foo.bar().baz().cucumber((fat &&\n' + + ' "sassy") || (leans && mean));\n' + + 'Test_very_long_variable_name_this_should_never_wrap\n' + + ' .but_this_can\n' + + 'return between_return_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + 'throw between_throw_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + 'if (wraps_can_occur &&\n' + + ' inside_an_if_block) that_is_\n' + + ' .okay();\n' + + 'object_literal = {\n' + + ' propertx: first_token +\n' + + ' 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap +\n' + + ' but_this_can,\n' + + ' propertz: first_token_should_never_wrap +\n' + + ' !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" +\n' + + ' "but_this_can"\n' + + '}'); + + opts.wrap_line_length = 41; + // NOTE: wrap is only best effort - line continues until next wrap point is found. + //.............---------1---------2---------3---------4---------5---------6---------7 + //.............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_1, + /* expected */ + 'foo.bar().baz().cucumber((fat && "sassy") ||\n' + + ' (leans && mean));\n' + + 'Test_very_long_variable_name_this_should_never_wrap\n' + + ' .but_this_can\n' + + 'return between_return_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + 'throw between_throw_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + 'if (wraps_can_occur &&\n' + + ' inside_an_if_block) that_is_\n' + + ' .okay();\n' + + 'object_literal = {\n' + + ' propertx: first_token +\n' + + ' 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap +\n' + + ' but_this_can,\n' + + ' propertz: first_token_should_never_wrap +\n' + + ' !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" +\n' + + ' "but_this_can"\n' + + '}'); + + opts.wrap_line_length = 45; + // NOTE: wrap is only best effort - line continues until next wrap point is found. + //.............---------1---------2---------3---------4---------5---------6---------7 + //.............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_2, + /* expected */ + '{\n' + + ' foo.bar().baz().cucumber((fat && "sassy") ||\n' + + ' (leans && mean));\n' + + ' Test_very_long_variable_name_this_should_never_wrap\n' + + ' .but_this_can\n' + + ' return between_return_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + ' throw between_throw_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + ' if (wraps_can_occur &&\n' + + ' inside_an_if_block) that_is_\n' + + ' .okay();\n' + + ' object_literal = {\n' + + ' propertx: first_token +\n' + + ' 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap +\n' + + ' but_this_can,\n' + + ' propertz: first_token_should_never_wrap +\n' + + ' !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" +\n' + + ' "but_this_can"\n' + + ' }\n'+ + '}'); + + reset_options(); + //============================================================ + opts.preserve_newlines = false; + bt('if (foo) // comment\n bar();'); + bt('if (foo) // comment\n (bar());'); + bt('if (foo) // comment\n (bar());'); + bt('if (foo) // comment\n /asdf/;'); + bt('this.oa = new OAuth(\n' + + ' _requestToken,\n' + + ' _accessToken,\n' + + ' consumer_key\n' + + ');', + 'this.oa = new OAuth(_requestToken, _accessToken, consumer_key);'); + bt('foo = {\n x: y, // #44\n w: z // #44\n}'); + bt('switch (x) {\n case "a":\n // comment on newline\n break;\n case "b": // comment on same line\n break;\n}'); + bt('this.type =\n this.options =\n // comment\n this.enabled null;', + 'this.type = this.options =\n // comment\n this.enabled null;'); + bt('someObj\n .someFunc1()\n // This comment should not break the indent\n .someFunc2();', + 'someObj.someFunc1()\n // This comment should not break the indent\n .someFunc2();'); + + bt('if (true ||\n!true) return;', 'if (true || !true) return;'); + + // these aren't ready yet. + //bt('if (foo) // comment\n bar() /*i*/ + baz() /*j\n*/ + asdf();'); + bt('if\n(foo)\nif\n(bar)\nif\n(baz)\nwhee();\na();', + 'if (foo)\n if (bar)\n if (baz) whee();\na();'); + bt('if\n(foo)\nif\n(bar)\nif\n(baz)\nwhee();\nelse\na();', + 'if (foo)\n if (bar)\n if (baz) whee();\n else a();'); + bt('if (foo)\nbar();\nelse\ncar();', + 'if (foo) bar();\nelse car();'); + + bt('if (foo) if (bar) if (baz);\na();', + 'if (foo)\n if (bar)\n if (baz);\na();'); + bt('if (foo) if (bar) if (baz) whee();\na();', + 'if (foo)\n if (bar)\n if (baz) whee();\na();'); + bt('if (foo) a()\nif (bar) if (baz) whee();\na();', + 'if (foo) a()\nif (bar)\n if (baz) whee();\na();'); + bt('if (foo);\nif (bar) if (baz) whee();\na();', + 'if (foo);\nif (bar)\n if (baz) whee();\na();'); + bt('if (options)\n' + + ' for (var p in options)\n' + + ' this[p] = options[p];', + 'if (options)\n'+ + ' for (var p in options) this[p] = options[p];'); + bt('if (options) for (var p in options) this[p] = options[p];', + 'if (options)\n for (var p in options) this[p] = options[p];'); + + bt('if (options) do q(); while (b());', + 'if (options)\n do q(); while (b());'); + bt('if (options) while (b()) q();', + 'if (options)\n while (b()) q();'); + bt('if (options) do while (b()) q(); while (a());', + 'if (options)\n do\n while (b()) q(); while (a());'); + + bt('function f(a, b, c,\nd, e) {}', + 'function f(a, b, c, d, e) {}'); + + bt('function f(a,b) {if(a) b()}function g(a,b) {if(!a) b()}', + 'function f(a, b) {\n if (a) b()\n}\n\nfunction g(a, b) {\n if (!a) b()\n}'); + bt('function f(a,b) {if(a) b()}\n\n\n\nfunction g(a,b) {if(!a) b()}', + 'function f(a, b) {\n if (a) b()\n}\n\nfunction g(a, b) {\n if (!a) b()\n}'); + + // This is not valid syntax, but still want to behave reasonably and not side-effect + bt('(if(a) b())(if(a) b())', + '(\n if (a) b())(\n if (a) b())'); + bt('(if(a) b())\n\n\n(if(a) b())', + '(\n if (a) b())\n(\n if (a) b())'); + + + + bt("if\n(a)\nb();", "if (a) b();"); + bt('var a =\nfoo', 'var a = foo'); + bt('var a = {\n"a":1,\n"b":2}', "var a = {\n \"a\": 1,\n \"b\": 2\n}"); + bt("var a = {\n'a':1,\n'b':2}", "var a = {\n 'a': 1,\n 'b': 2\n}"); + bt('var a = /*i*/ "b";'); + bt('var a = /*i*/\n"b";', 'var a = /*i*/ "b";'); + bt('var a = /*i*/\nb;', 'var a = /*i*/ b;'); + bt('{\n\n\n"x"\n}', '{\n "x"\n}'); + bt('if(a &&\nb\n||\nc\n||d\n&&\ne) e = f', 'if (a && b || c || d && e) e = f'); + bt('if(a &&\n(b\n||\nc\n||d)\n&&\ne) e = f', 'if (a && (b || c || d) && e) e = f'); + test_fragment('\n\n"x"', '"x"'); + bt('a = 1;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nb = 2;', + 'a = 1;\nb = 2;'); + + opts.preserve_newlines = true; + bt('if (foo) // comment\n bar();'); + bt('if (foo) // comment\n (bar());'); + bt('if (foo) // comment\n (bar());'); + bt('if (foo) // comment\n /asdf/;'); + bt('foo = {\n x: y, // #44\n w: z // #44\n}'); + bt('switch (x) {\n case "a":\n // comment on newline\n break;\n case "b": // comment on same line\n break;\n}'); + bt('this.type =\n this.options =\n // comment\n this.enabled null;'); + bt('someObj\n .someFunc1()\n // This comment should not break the indent\n .someFunc2();'); + + bt('if (true ||\n!true) return;', 'if (true ||\n !true) return;'); + + // these aren't ready yet. + // bt('if (foo) // comment\n bar() /*i*/ + baz() /*j\n*/ + asdf();'); + bt('if\n(foo)\nif\n(bar)\nif\n(baz)\nwhee();\na();', + 'if (foo)\n if (bar)\n if (baz)\n whee();\na();'); + bt('if\n(foo)\nif\n(bar)\nif\n(baz)\nwhee();\nelse\na();', + 'if (foo)\n if (bar)\n if (baz)\n whee();\n else\n a();'); + bt('if (foo)\nbar();\nelse\ncar();', + 'if (foo)\n bar();\nelse\n car();'); + bt('if (foo) bar();\nelse\ncar();', + 'if (foo) bar();\nelse\n car();'); + + bt('if (foo) if (bar) if (baz);\na();', + 'if (foo)\n if (bar)\n if (baz);\na();'); + bt('if (foo) if (bar) if (baz) whee();\na();', + 'if (foo)\n if (bar)\n if (baz) whee();\na();'); + bt('if (foo) a()\nif (bar) if (baz) whee();\na();', + 'if (foo) a()\nif (bar)\n if (baz) whee();\na();'); + bt('if (foo);\nif (bar) if (baz) whee();\na();', + 'if (foo);\nif (bar)\n if (baz) whee();\na();'); + bt('if (options)\n' + + ' for (var p in options)\n' + + ' this[p] = options[p];'); + bt('if (options) for (var p in options) this[p] = options[p];', + 'if (options)\n for (var p in options) this[p] = options[p];'); + + bt('if (options) do q(); while (b());', + 'if (options)\n do q(); while (b());'); + bt('if (options) do; while (b());', + 'if (options)\n do; while (b());'); + bt('if (options) while (b()) q();', + 'if (options)\n while (b()) q();'); + bt('if (options) do while (b()) q(); while (a());', + 'if (options)\n do\n while (b()) q(); while (a());'); + + bt('function f(a, b, c,\nd, e) {}', + 'function f(a, b, c,\n d, e) {}'); + + bt('function f(a,b) {if(a) b()}function g(a,b) {if(!a) b()}', + 'function f(a, b) {\n if (a) b()\n}\n\nfunction g(a, b) {\n if (!a) b()\n}'); + bt('function f(a,b) {if(a) b()}\n\n\n\nfunction g(a,b) {if(!a) b()}', + 'function f(a, b) {\n if (a) b()\n}\n\n\n\nfunction g(a, b) {\n if (!a) b()\n}'); + // This is not valid syntax, but still want to behave reasonably and not side-effect + bt('(if(a) b())(if(a) b())', + '(\n if (a) b())(\n if (a) b())'); + bt('(if(a) b())\n\n\n(if(a) b())', + '(\n if (a) b())\n\n\n(\n if (a) b())'); + + // space between functions + bt('/*\n * foo\n */\nfunction foo() {}'); + bt('// a nice function\nfunction foo() {}'); + bt('function foo() {}\nfunction foo() {}', + 'function foo() {}\n\nfunction foo() {}' + ); + + bt('[\n function() {}\n]'); + + + + bt("if\n(a)\nb();", "if (a)\n b();"); + bt('var a =\nfoo', 'var a =\n foo'); + bt('var a = {\n"a":1,\n"b":2}', "var a = {\n \"a\": 1,\n \"b\": 2\n}"); + bt("var a = {\n'a':1,\n'b':2}", "var a = {\n 'a': 1,\n 'b': 2\n}"); + bt('var a = /*i*/ "b";'); + bt('var a = /*i*/\n"b";', 'var a = /*i*/\n "b";'); + bt('var a = /*i*/\nb;', 'var a = /*i*/\n b;'); + bt('{\n\n\n"x"\n}', '{\n\n\n "x"\n}'); + bt('if(a &&\nb\n||\nc\n||d\n&&\ne) e = f', 'if (a &&\n b ||\n c ||\n d &&\n e) e = f'); + bt('if(a &&\n(b\n||\nc\n||d)\n&&\ne) e = f', 'if (a &&\n (b ||\n c ||\n d) &&\n e) e = f'); + test_fragment('\n\n"x"', '"x"'); + + // this beavior differs between js and python, defaults to unlimited in js, 10 in python + bt('a = 1;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nb = 2;', + 'a = 1;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nb = 2;'); + opts.max_preserve_newlines = 8; + bt('a = 1;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nb = 2;', + 'a = 1;\n\n\n\n\n\n\n\nb = 2;'); + + reset_options(); + //============================================================ + + + Urlencoded.run_tests(sanitytest); + } + + beautifier_tests(); + beautifier_unconverted_tests(); +} + +if (typeof exports !== "undefined") { + exports.run_javascript_tests = run_javascript_tests; +} diff --git a/node_modules/js-beautify/js/test/node-beautify-html-perf-tests.js b/node_modules/js-beautify/js/test/node-beautify-html-perf-tests.js new file mode 100644 index 0000000..bd0e849 --- /dev/null +++ b/node_modules/js-beautify/js/test/node-beautify-html-perf-tests.js @@ -0,0 +1,51 @@ +/*global js_beautify: true */ +/*jshint node:true */ +/*jshint unused:false */ + + +var fs = require('fs'), + SanityTest = require('./sanitytest'), + Benchmark = require('benchmark'), + Urlencoded = require('../lib/unpackers/urlencode_unpacker'), + js_beautify = require('../index').js_beautify, + css_beautify = require('../index').css_beautify, + html_beautify = require('../index').html_beautify; + +function node_beautifier_html_tests() { + console.log('Testing performance...'); + var index_html = fs.readFileSync(__dirname + '/../../index.html', 'utf8'); + var data_attr = fs.readFileSync(__dirname + '/../../test/resources/html-with-base64image.html', 'utf8'); + var options = { + wrap_line_length: 80 + }; + + //warm-up + html_beautify(index_html, options); + html_beautify(data_attr, options); + + var suite = new Benchmark.Suite(); + + suite.add("html-beautify (index.html)", function() { + html_beautify(index_html, options); + }) + .add("html-beautify (base64 image)", function() { + html_beautify(data_attr, options); + }) + // add listeners + .on('cycle', function(event) { + console.log(String(event.target)); + }) + .on('error', function(event) { + return 1; + }) + .on('complete', function(event) {}) + .run(); + return 0; +} + + + + +if (require.main === module) { + process.exit(node_beautifier_html_tests()); +} \ No newline at end of file diff --git a/node_modules/js-beautify/js/test/node-beautify-perf-tests.js b/node_modules/js-beautify/js/test/node-beautify-perf-tests.js new file mode 100644 index 0000000..d62a7a5 --- /dev/null +++ b/node_modules/js-beautify/js/test/node-beautify-perf-tests.js @@ -0,0 +1,50 @@ +/*global js_beautify: true */ +/*jshint node:true */ +/*jshint unused:false */ + +var fs = require('fs'), + SanityTest = require('./sanitytest'), + Benchmark = require('benchmark'), + Urlencoded = require('../lib/unpackers/urlencode_unpacker'), + js_beautify = require('../index').js_beautify, + css_beautify = require('../index').css_beautify, + html_beautify = require('../index').html_beautify; + +function node_beautifier_tests() { + console.log('Testing performance...'); + var data = fs.readFileSync(__dirname + '/../../test/resources/underscore.js', 'utf8'); + var data_min = fs.readFileSync(__dirname + '/../../test/resources/underscore-min.js', 'utf8'); + var options = { + wrap_line_length: 80 + }; + + //warm-up + js_beautify(data, options); + js_beautify(data_min, options); + + var suite = new Benchmark.Suite(); + + suite.add("js-beautify (underscore)", function() { + js_beautify(data, options); + }) + .add("js-beautify (underscore-min)", function() { + js_beautify(data_min, options); + }) + // add listeners + .on('cycle', function(event) { + console.log(String(event.target)); + }) + .on('error', function(event) { + return 1; + }) + .on('complete', function(event) {}) + .run(); + return 0; +} + + + + +if (require.main === module) { + process.exit(node_beautifier_tests()); +} \ No newline at end of file diff --git a/node_modules/js-beautify/js/test/node-beautify-tests.js b/node_modules/js-beautify/js/test/node-beautify-tests.js new file mode 100755 index 0000000..55c4828 --- /dev/null +++ b/node_modules/js-beautify/js/test/node-beautify-tests.js @@ -0,0 +1,45 @@ +/*jshint node:true */ + +var SanityTest = require('./sanitytest'), + Urlencoded = require('../lib/unpackers/urlencode_unpacker'), + run_javascript_tests = require('./generated/beautify-javascript-tests').run_javascript_tests, + run_css_tests = require('./generated/beautify-css-tests').run_css_tests, + run_html_tests = require('./generated/beautify-html-tests').run_html_tests; + +function test_legacy_names() { + var beautify = require('../index'); + var results = new SanityTest(); + + console.log('First ensure that legacy import names equal the new ones'); + results.expect(beautify.js, beautify.js_beautify); + results.expect(beautify.css, beautify.css_beautify); + results.expect(beautify.html, beautify.html_beautify); + + console.log(results.results_raw()); + return results; +} + +function node_beautifier_tests(name, test_runner) { + console.log('Testing ' + name + ' with node.js CommonJS...'); + var beautify = require('../index'); + + var results = new SanityTest(); + test_runner( + results, + Urlencoded, + beautify.js, + beautify.html, + beautify.css); + + console.log(results.results_raw()); + return results; +} + +if (require.main === module) { + process.exit( + test_legacy_names() + + node_beautifier_tests('js-beautifier', run_javascript_tests).get_exitcode() + + node_beautifier_tests('css-beautifier', run_css_tests).get_exitcode() + + node_beautifier_tests('html-beautifier', run_html_tests).get_exitcode() + ); +} \ No newline at end of file diff --git a/node_modules/js-beautify/js/test/requirejs-html-beautify.html b/node_modules/js-beautify/js/test/requirejs-html-beautify.html new file mode 100644 index 0000000..a1088c0 --- /dev/null +++ b/node_modules/js-beautify/js/test/requirejs-html-beautify.html @@ -0,0 +1,58 @@ + + + + + + + + + + + + + +

    RequireJS test

    + +

    + This example loads the html-beautifier by using a relative path in the require call to the beautify-html.js file. + (also works works with absolute paths) +

    + +
    +require(["../lib/beautify-html"],function(html_beautify){
    +	var input = document.getElementById("input").value;
    +	var output = html_beautify.html_beautify(input);
    +	document.getElementById("output").innerHTML = output;
    +});
    +
    + +

    Input

    + + +

    Output

    + + + + \ No newline at end of file diff --git a/node_modules/js-beautify/js/test/resources/configerror/.jsbeautifyrc b/node_modules/js-beautify/js/test/resources/configerror/.jsbeautifyrc new file mode 100644 index 0000000..be15894 --- /dev/null +++ b/node_modules/js-beautify/js/test/resources/configerror/.jsbeautifyrc @@ -0,0 +1,6 @@ +{ + "indent_size": 11, + "indent_char": " " + "indent_level": 0, + "indent_with_tabs": false +} diff --git a/node_modules/js-beautify/js/test/resources/configerror/subDir1/subDir2/empty.txt b/node_modules/js-beautify/js/test/resources/configerror/subDir1/subDir2/empty.txt new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/js-beautify/js/test/resources/editorconfig/.editorconfig b/node_modules/js-beautify/js/test/resources/editorconfig/.editorconfig new file mode 100644 index 0000000..3fc2389 --- /dev/null +++ b/node_modules/js-beautify/js/test/resources/editorconfig/.editorconfig @@ -0,0 +1,6 @@ +root = true + +[*.js] +indent_style = space +indent_size = 2 +insert_final_newline = false diff --git a/node_modules/js-beautify/js/test/resources/editorconfig/cr/.editorconfig b/node_modules/js-beautify/js/test/resources/editorconfig/cr/.editorconfig new file mode 100644 index 0000000..1f43b7d --- /dev/null +++ b/node_modules/js-beautify/js/test/resources/editorconfig/cr/.editorconfig @@ -0,0 +1,3 @@ + +[*.js] +end_of_line = cr diff --git a/node_modules/js-beautify/js/test/resources/editorconfig/crlf/.editorconfig b/node_modules/js-beautify/js/test/resources/editorconfig/crlf/.editorconfig new file mode 100644 index 0000000..28160b9 --- /dev/null +++ b/node_modules/js-beautify/js/test/resources/editorconfig/crlf/.editorconfig @@ -0,0 +1,3 @@ + +[*.js] +end_of_line = crlf diff --git a/node_modules/js-beautify/js/test/resources/editorconfig/error/.editorconfig b/node_modules/js-beautify/js/test/resources/editorconfig/error/.editorconfig new file mode 100644 index 0000000..031c811 --- /dev/null +++ b/node_modules/js-beautify/js/test/resources/editorconfig/error/.editorconfig @@ -0,0 +1 @@ +Random stuff in here to cause parse error diff --git a/node_modules/js-beautify/js/test/resources/editorconfig/example-base.js b/node_modules/js-beautify/js/test/resources/editorconfig/example-base.js new file mode 100644 index 0000000..fbcdbd7 --- /dev/null +++ b/node_modules/js-beautify/js/test/resources/editorconfig/example-base.js @@ -0,0 +1,3 @@ +function indentMe() { + "no, me!"; // indent_size 4, will be beautified to 2 with editorconfig +} diff --git a/node_modules/js-beautify/js/test/resources/example1.js b/node_modules/js-beautify/js/test/resources/example1.js new file mode 100644 index 0000000..279108f --- /dev/null +++ b/node_modules/js-beautify/js/test/resources/example1.js @@ -0,0 +1,3 @@ +function indentMe() { +"no, me!"; +} diff --git a/node_modules/js-beautify/js/test/resources/indent11chars/.jsbeautifyrc b/node_modules/js-beautify/js/test/resources/indent11chars/.jsbeautifyrc new file mode 100644 index 0000000..73c8003 --- /dev/null +++ b/node_modules/js-beautify/js/test/resources/indent11chars/.jsbeautifyrc @@ -0,0 +1,6 @@ +{ + "indent_size": 11, + "indent_char": " ", + "indent_level": 0, + "indent_with_tabs": false +} diff --git a/node_modules/js-beautify/js/test/resources/indent11chars/subDir1/subDir2/empty.txt b/node_modules/js-beautify/js/test/resources/indent11chars/subDir1/subDir2/empty.txt new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/js-beautify/js/test/run-tests b/node_modules/js-beautify/js/test/run-tests new file mode 100755 index 0000000..86b14dc --- /dev/null +++ b/node_modules/js-beautify/js/test/run-tests @@ -0,0 +1,17 @@ +#!/usr/bin/spidermonkey-1.7 -s + +//#!/usr/bin/js + +// a little helper for testing from command line +// just run it, it will output the test results + +load('js/lib/beautify.js'); +load('js/test/sanitytest.js') +load('js/test/beautify-tests.js') +load('js/lib/unpackers/urlencode_unpacker.js') + +print(run_beautifier_tests(new SanityTest(), Urlencoded, js_beautify).results_raw()) + + +// for nodejs use this from the command line from the main directory: +// node test/beautify-tests.js diff --git a/node_modules/js-beautify/js/test/sanitytest.js b/node_modules/js-beautify/js/test/sanitytest.js new file mode 100644 index 0000000..445b68e --- /dev/null +++ b/node_modules/js-beautify/js/test/sanitytest.js @@ -0,0 +1,144 @@ +// +// simple testing interface +// written by Einar Lielmanis, einar@jsbeautifier.org +// +// usage: +// +// var t = new SanityTest(function (x) { return x; }, 'my function'); +// t.expect('input', 'output'); +// t.expect('a', 'a'); +// output_somewhere(t.results()); // good for
    , html safe-ish
    +// alert(t.results_raw());        // html unescaped
    +
    +
    +function SanityTest(func, name_of_test) {
    +
    +    var test_func = func || function(x) {
    +        return x;
    +    };
    +
    +    var test_name = name_of_test || '';
    +
    +    var n_failed = 0;
    +    var n_succeeded = 0;
    +
    +    var failures = [];
    +
    +    this.test_function = function(func, name) {
    +        test_func = func;
    +        test_name = name || '';
    +    };
    +
    +    this.get_exitcode = function() {
    +        return n_succeeded === 0 || n_failed !== 0 ? 1 : 0;
    +    };
    +
    +    this.expect = function(parameters, expected_value) {
    +        // multi-parameter calls not supported (I don't need them now).
    +        var result = test_func(parameters);
    +        // proper array checking is a pain. i'll maybe do it later, compare strings representations instead
    +        if ((result === expected_value) || (expected_value instanceof Array && result.join(', ') === expected_value.join(', '))) {
    +            n_succeeded += 1;
    +        } else {
    +            n_failed += 1;
    +            failures.push([test_name, parameters, expected_value, result]);
    +        }
    +    };
    +
    +
    +    this.results_raw = function() {
    +        var results = '';
    +        if (n_failed === 0) {
    +            if (n_succeeded === 0) {
    +                results = 'No tests run.';
    +            } else {
    +                results = 'All ' + n_succeeded + ' tests passed.';
    +            }
    +        } else {
    +            for (var i = 0; i < failures.length; i++) {
    +                var f = failures[i];
    +                if (f[0]) {
    +                    f[0] = f[0] + ' ';
    +                }
    +                results += '==== ' + f[0] + '============================================================\n';
    +                results += '---- input -------\n' + this.prettyprint(f[1]) + '\n';
    +                results += '---- expected ----\n' + this.prettyprint(f[2]) + '\n';
    +                results += '---- output ------\n' + this.prettyprint(f[3]) + '\n';
    +                results += '---- expected-ws ------\n' + this.prettyprint_whitespace(f[2]) + '\n';
    +                results += '---- output-ws ------\n' + this.prettyprint_whitespace(f[3]) + '\n';
    +                results += '================================================================\n\n';
    +            }
    +            results += n_failed + ' tests failed.\n';
    +        }
    +        return results;
    +    };
    +
    +
    +    this.results = function() {
    +        return this.lazy_escape(this.results_raw());
    +    };
    +
    +    this.prettyprint_whitespace = function(something, quote_strings) {
    +        return (this.prettyprint(something, quote_strings)
    +            .replace(/\r\n/g, '\\r\n')
    +            .replace(/\n/g, '\\n\n')
    +            .replace(/\r/g, '\\r\n')
    +            .replace(/ /g, '_')
    +            .replace(/\t/g, '===|'));
    +    };
    +
    +    this.prettyprint = function(something, quote_strings) {
    +        var type = typeof something;
    +        switch (type.toLowerCase()) {
    +            case 'string':
    +                if (quote_strings) {
    +                    return "'" + something.replace("'", "\\'") + "'";
    +                }
    +                return something;
    +            case 'number':
    +                return '' + something;
    +            case 'boolean':
    +                return something ? 'true' : 'false';
    +            case 'undefined':
    +                return 'undefined';
    +            case 'object':
    +                if (something instanceof Array) {
    +                    var x = [];
    +                    var expected_index = 0;
    +                    for (var k in something) {
    +                        if (k === expected_index) {
    +                            x.push(this.prettyprint(something[k], true));
    +                            expected_index += 1;
    +                        } else {
    +                            x.push('\n' + k + ': ' + this.prettyprint(something[k], true));
    +                        }
    +                    }
    +                    return '[' + x.join(', ') + ']';
    +                }
    +                return 'object: ' + something;
    +            default:
    +                return type + ': ' + something;
    +        }
    +    };
    +
    +
    +    this.lazy_escape = function(str) {
    +        return str.replace(//g, '>').replace(/\n/g, '
    '); + }; + + + this.log = function() { + if (window.console) { + if (console.firebug) { + console.log.apply(console, Array.prototype.slice.call(arguments)); + } else { + console.log.call(console, Array.prototype.slice.call(arguments)); + } + } + }; + +} + +if (typeof module !== 'undefined' && module.exports) { + module.exports = SanityTest; +} \ No newline at end of file diff --git a/node_modules/js-beautify/js/test/shell-smoke-test.sh b/node_modules/js-beautify/js/test/shell-smoke-test.sh new file mode 100755 index 0000000..c32266d --- /dev/null +++ b/node_modules/js-beautify/js/test/shell-smoke-test.sh @@ -0,0 +1,383 @@ +#!/usr/bin/env bash + +REL_SCRIPT_DIR="`dirname \"$0\"`" +SCRIPT_DIR="`( cd \"$REL_SCRIPT_DIR\" && pwd )`" + + +test_cli_common() +{ + echo ---------------------------------------- + echo Testing common cli behavior... + CLI_SCRIPT_NAME=${1:?missing_param}.js + CLI_SCRIPT=$SCRIPT_DIR/../bin/$CLI_SCRIPT_NAME + echo Script: $CLI_SCRIPT + + # should find the minimal help output + $CLI_SCRIPT 2>&1 | grep -q "Must pipe input or define at least one file\." || { + $CLI_SCRIPT 2>&1 + echo "[$CLI_SCRIPT_NAME] Output should be help message." + exit 1 + } + + $CLI_SCRIPT 2> /dev/null && { + echo "[$CLI_SCRIPT_NAME (with no parameters)] Return code should be error." + exit 1 + } + + $CLI_SCRIPT -Z 2> /dev/null && { + echo "[$CLI_SCRIPT_NAME -Z] Return code for invalid parameter should be error." + exit 1 + } + + $CLI_SCRIPT -h > /dev/null || { + echo "[$CLI_SCRIPT_NAME -h] Return code should be success." + exit 1 + } + + $CLI_SCRIPT -v > /dev/null || { + echo "[$CLI_SCRIPT_NAME -v] Return code should be success." + exit 1 + } + + MISSING_FILE="$SCRIPT_DIR/../../../js/bin/missing_file" + MISSING_FILE_MESSAGE="Unable to open path" + $CLI_SCRIPT $MISSING_FILE 2> /dev/null && { + echo "[$CLI_SCRIPT_NAME $MISSING_FILE] Return code should be error." + exit 1 + } + + $CLI_SCRIPT $MISSING_FILE 2>&1 | grep -q "$MISSING_FILE_MESSAGE" || { + echo "[$CLI_SCRIPT_NAME $MISSING_FILE] Stderr should have useful message." + exit 1 + } + + if [ "`$CLI_SCRIPT $MISSING_FILE 2> /dev/null`" != "" ]; then + echo "[$CLI_SCRIPT_NAME $MISSING_FILE] Stdout should have no text." + exit 1 + fi + +} + +setup_temp() +{ + mkdir -p target + TEST_TEMP=$PWD/`mktemp -d target/test_temp_XXXX` + echo Created $TEST_TEMP... +} + +cleanup() +{ + rm -rf $TEST_TEMP && echo Removed $TEST_TEMP... + test -z $1 || exit $1 +} + + +test_cli_js_beautify() +{ + echo ---------------------------------------- + echo Testing js-beautify cli behavior... + CLI_SCRIPT=$SCRIPT_DIR/../bin/js-beautify.js + + $CLI_SCRIPT $SCRIPT_DIR/../bin/js-beautify.js > /dev/null || { + echo "js-beautify output for $SCRIPT_DIR/../bin/js-beautify.js was expected succeed." + exit 1 + } + + $CLI_SCRIPT $SCRIPT_DIR/../bin/css-beautify.js > /dev/null || { + echo "js-beautify output for $SCRIPT_DIR/../bin/css-beautify.js was expected succeed." + exit 1 + } + + $CLI_SCRIPT $SCRIPT_DIR/../bin/js-beautify.js | diff $SCRIPT_DIR/../bin/js-beautify.js - || { + echo "js-beautify output for $SCRIPT_DIR/../bin/js-beautify.js was expected to be unchanged." + exit 1 + } + + node $SCRIPT_DIR/../lib/cli.js $SCRIPT_DIR/../bin/js-beautify.js | diff $SCRIPT_DIR/../bin/js-beautify.js - || { + echo "js-beautify output for $SCRIPT_DIR/../bin/js-beautify.js was expected to be unchanged." + exit 1 + } + + cat $SCRIPT_DIR/../bin/js-beautify.js | $CLI_SCRIPT | diff $SCRIPT_DIR/../bin/js-beautify.js - || { + echo "js-beautify output for $SCRIPT_DIR/../bin/js-beautify.js was expected to be unchanged." + exit 1 + } + + cat $SCRIPT_DIR/../bin/js-beautify.js | $CLI_SCRIPT - | diff $SCRIPT_DIR/../bin/js-beautify.js - || { + echo "js-beautify output for $SCRIPT_DIR/../bin/js-beautify.js was expected to be unchanged." + exit 1 + } + + setup_temp + cat $SCRIPT_DIR/../bin/js-beautify.js | $CLI_SCRIPT -o $TEST_TEMP/js-beautify-pipe.js - && diff $TEST_TEMP/js-beautify-pipe.js $SCRIPT_DIR/../bin/js-beautify.js || { + echo "js-beautify output for $SCRIPT_DIR/../bin/js-beautify.js should have been created in $TEST_TEMP/js-beautify-pipe.js." + cleanup 1 + } + + $CLI_SCRIPT -o $TEST_TEMP/js-beautify.js $SCRIPT_DIR/../bin/js-beautify.js && diff $SCRIPT_DIR/../bin/js-beautify.js $TEST_TEMP/js-beautify.js || { + echo "js-beautify output for $SCRIPT_DIR/../bin/js-beautify.js should have been created in $TEST_TEMP/js-beautify.js." + cleanup 1 + } + + # ensure new line settings work + $CLI_SCRIPT -o $TEST_TEMP/js-beautify-n.js -e '\n' $SCRIPT_DIR/../bin/js-beautify.js + $CLI_SCRIPT -o $TEST_TEMP/js-beautify-rn.js -e '\r\n' $TEST_TEMP/js-beautify-n.js + + # ensure eol processed correctly + $CLI_SCRIPT -o $TEST_TEMP/js-beautify-n-dash.js --indent-size 2 --eol '\n' $TEST_TEMP/js-beautify-n.js + $CLI_SCRIPT -o $TEST_TEMP/js-beautify-rn-dash.js --indent-size 2 --eol '\r\n' $TEST_TEMP/js-beautify-n.js + diff -q $TEST_TEMP/js-beautify-n-dash.js $TEST_TEMP/js-beautify-rn-dash.js && { + diff $TEST_TEMP/js-beautify-n-dash.js $TEST_TEMP/js-beautify-rn-dash.js | cat -t -e + echo "js-beautify output for $TEST_TEMP/js-beautify-n-dash.js and $TEST_TEMP/js-beautify-rn-dash.js was expected to be different." + cleanup 1 + } + + diff -q $TEST_TEMP/js-beautify-n.js $TEST_TEMP/js-beautify-rn.js && { + diff $TEST_TEMP/js-beautify-n.js $TEST_TEMP/js-beautify-rn.js | cat -t -e + echo "js-beautify output for $TEST_TEMP/js-beautify-n.js and $TEST_TEMP/js-beautify-rn.js was expected to be different." + cleanup 1 + } + + $CLI_SCRIPT $TEST_TEMP/js-beautify-n.js | diff -q $TEST_TEMP/js-beautify-n.js - || { + echo "js-beautify output for $TEST_TEMP/js-beautify-n.js was expected to be unchanged." + cleanup 1 + } + + $CLI_SCRIPT -e 'auto' $TEST_TEMP/js-beautify-rn.js | diff -q $TEST_TEMP/js-beautify-rn.js - || { + echo "js-beautify output for $TEST_TEMP/js-beautify-rn.js was expected to be unchanged." + cleanup 1 + } + + # EditorConfig related tests + cp -r js/test/resources/editorconfig $TEST_TEMP/ + $CLI_SCRIPT -o $TEST_TEMP/editorconfig/example.js --end-with-newline --indent-size 4 -e '\n' $TEST_TEMP/editorconfig/example-base.js + $CLI_SCRIPT -o $TEST_TEMP/editorconfig/example-ec.js --indent-size 2 -e '\n' $TEST_TEMP/editorconfig/example-base.js + + $CLI_SCRIPT -o $TEST_TEMP/editorconfig/cr/example.js --end-with-newline --indent-size 4 -e '\n' $TEST_TEMP/editorconfig/example-base.js + $CLI_SCRIPT -o $TEST_TEMP/editorconfig/cr/example-ec.js --indent-size 2 -e '\r' $TEST_TEMP/editorconfig/example-base.js + + $CLI_SCRIPT -o $TEST_TEMP/editorconfig/crlf/example.js --end-with-newline --indent-size 4 -e '\n' $TEST_TEMP/editorconfig/example-base.js + $CLI_SCRIPT -o $TEST_TEMP/editorconfig/crlf/example-ec.js --indent-size 2 -e '\r\n' $TEST_TEMP/editorconfig/example-base.js + + $CLI_SCRIPT -o $TEST_TEMP/editorconfig/error/example.js --end-with-newline --indent-size 4 -e '\n' $TEST_TEMP/editorconfig/example-base.js + + pushd $TEST_TEMP/editorconfig + + cd $TEST_TEMP/editorconfig/error + $CLI_SCRIPT --editorconfig $TEST_TEMP/js-beautify-n.js \ + > /dev/null || { + echo "Invalid editorconfig file should not report error (consistent with the EditorConfig)." + cleanup 1 + } + + $CLI_SCRIPT --editorconfig example.js \ + > /dev/null || { + echo "Invalid editorconfig file should not report error (consistent with the EditorConfig)." + cleanup 1 + } + + # TODO: EditorConfig setting should NOT overide cli setting, but that is + # the current by-design behavior, due to code limitations. + + # file input scenario + SCENARIO=a + cd $TEST_TEMP/editorconfig || exit 1 + $CLI_SCRIPT --end-with-newline --indent-size 6 --editorconfig -o example-${SCENARIO}.js example.js \ + && diff -q example-${SCENARIO}.js example-ec.js || { + echo "EditorConfig setting should overide cli setting." + diff example-${SCENARIO}.js example-ec.js | cat -t -e + cleanup 1 + } + + cd $TEST_TEMP/editorconfig/crlf || exit 1 + $CLI_SCRIPT --end-with-newline --indent-size 6 --editorconfig -o example-${SCENARIO}.js example.js \ + && diff -q example-${SCENARIO}.js example-ec.js || { + echo "EditorConfig setting should overide cli setting." + diff example-${SCENARIO}.js example-ec.js | cat -t -e + cleanup 1 + } + + cd $TEST_TEMP/editorconfig/cr || exit 1 + $CLI_SCRIPT --end-with-newline --indent-size 6 --editorconfig -o example-${SCENARIO}.js example.js \ + && diff -q example-${SCENARIO}.js example-ec.js || { + echo "EditorConfig setting should overide cli setting." + diff example-${SCENARIO}.js example-ec.js | cat -t -e + cleanup 1 + } + + # stdin input to stdout scenario + SCENARIO=b + cd $TEST_TEMP/editorconfig || exit 1 + echo "cat example.js | $CLI_SCRIPT --end-with-newline --indent-size 6 --editorconfig > example-${SCENARIO}.js" + cat example.js | $CLI_SCRIPT --end-with-newline --indent-size 6 --editorconfig > example-${SCENARIO}.js \ + && diff -q example-${SCENARIO}.js example-ec.js || { + echo "EditorConfig setting should overide cli setting." + diff example-${SCENARIO}.js example-ec.js | cat -t -e + cleanup 1 + } + + cd $TEST_TEMP/editorconfig/crlf || exit 1 + echo "cat example.js | $CLI_SCRIPT --end-with-newline --indent-size 6 --editorconfig > example-${SCENARIO}.js" + cat example.js | $CLI_SCRIPT --end-with-newline --indent-size 6 --editorconfig > example-${SCENARIO}.js \ + && diff -q example-${SCENARIO}.js example-ec.js || { + echo "EditorConfig setting should overide cli setting." + diff example-${SCENARIO}.js example-ec.js | cat -t -e + cleanup 1 + } + + cd $TEST_TEMP/editorconfig/cr || exit 1 + echo "cat example.js | $CLI_SCRIPT --end-with-newline --indent-size 6 --editorconfig > example-${SCENARIO}.js" + cat example.js | $CLI_SCRIPT --end-with-newline --indent-size 6 --editorconfig > example-${SCENARIO}.js \ + && diff -q example-${SCENARIO}.js example-ec.js || { + echo "EditorConfig setting should overide cli setting." + diff example-${SCENARIO}.js example-ec.js | cat -t -e + cleanup 1 + } + + + # stdin input to file scenario + SCENARIO=c + cd $TEST_TEMP/editorconfig || exit 1 + echo "cat example.js | $CLI_SCRIPT --end-with-newline --indent-size 6 --editorconfig -o example-${SCENARIO}.js" + cat example.js | $CLI_SCRIPT --end-with-newline --indent-size 6 --editorconfig -o example-${SCENARIO}.js - \ + && diff -q example-${SCENARIO}.js example-ec.js || { + echo "EditorConfig setting should overide cli setting." + diff example-${SCENARIO}.js example-ec.js | cat -t -e + cleanup 1 + } + + cd $TEST_TEMP/editorconfig/crlf || exit 1 + cat example.js | $CLI_SCRIPT --end-with-newline --indent-size 6 --editorconfig -o example-${SCENARIO}.js - \ + && diff -q example-${SCENARIO}.js example-ec.js || { + echo "EditorConfig setting should overide cli setting." + diff example-${SCENARIO}.js example-ec.js | cat -t -e + cleanup 1 + } + + cd $TEST_TEMP/editorconfig/cr || exit 1 + cat example.js | $CLI_SCRIPT --end-with-newline --indent-size 6 --editorconfig -o example-${SCENARIO}.js - \ + && diff -q example-${SCENARIO}.js example-ec.js || { + echo "EditorConfig setting should overide cli setting." + diff example-${SCENARIO}.js example-ec.js | cat -t -e + cleanup 1 + } + + popd + # End EditorConfig + + # ensure unchanged files are not overwritten + $CLI_SCRIPT -o $TEST_TEMP/js-beautify.js $SCRIPT_DIR/../bin/js-beautify.js + cp -p $TEST_TEMP/js-beautify.js $TEST_TEMP/js-beautify-old.js + touch $TEST_TEMP/js-beautify.js + sleep 2 + touch $TEST_TEMP/js-beautify-old.js + $CLI_SCRIPT -r $TEST_TEMP/js-beautify.js && test $TEST_TEMP/js-beautify.js -nt $TEST_TEMP/js-beautify-old.js && { + echo "js-beautify should not replace unchanged file $TEST_TEMP/js-beautify.js when using -r" + cleanup 1 + } + + $CLI_SCRIPT -o $TEST_TEMP/js-beautify.js $TEST_TEMP/js-beautify.js && test $TEST_TEMP/js-beautify.js -nt $TEST_TEMP/js-beautify-old.js && { + echo "js-beautify should not replace unchanged file $TEST_TEMP/js-beautify.js when using -o and same file name" + cleanup 1 + } + + $CLI_SCRIPT -o $TEST_TEMP/js-beautify.js $TEST_TEMP/js-beautify-old.js && test $TEST_TEMP/js-beautify.js -nt $TEST_TEMP/js-beautify-old.js && { + echo "js-beautify should not replace unchanged file $TEST_TEMP/js-beautify.js when using -o and different file name" + cleanup 1 + } + + $CLI_SCRIPT $SCRIPT_DIR/../bin/css-beautify.js | diff -q $SCRIPT_DIR/../bin/css-beautify.js - && { + echo "js-beautify output for $SCRIPT_DIR/../bin/css-beautify.js was expected to be different." + cleanup 1 + } + + unset HOME + unset USERPROFILE + $CLI_SCRIPT -o $TEST_TEMP/example1-default.js $SCRIPT_DIR/resources/example1.js || exit 1 + + $CLI_SCRIPT -o $TEST_TEMP/example1-sanity.js $TEST_TEMP/example1-default.js || exit 1 + diff -q $TEST_TEMP/example1-default.js $TEST_TEMP/example1-sanity.js || { + echo "js-beautify output for $TEST_TEMP/example1-default.js was expected to be identical after no change in settings." + cleanup 1 + } + + cd $SCRIPT_DIR/resources/configerror + $CLI_SCRIPT $TEST_TEMP/example1-default.js 2>&1 | grep -q "Error while loading beautifier configuration\." || { + echo "js-beautify output for $TEST_TEMP/example1-default.js was expected to be configration load error message." + cleanup 1 + } + + cd $SCRIPT_DIR/resources/indent11chars + $CLI_SCRIPT $TEST_TEMP/example1-default.js | diff -q $TEST_TEMP/example1-default.js - && { + echo "js-beautify output for $TEST_TEMP/example1-default.js was expected to be different based on CWD settings." + cleanup 1 + } + + cd $SCRIPT_DIR/resources/indent11chars/subDir1/subDir2 + $CLI_SCRIPT $TEST_TEMP/example1-default.js | diff -q $TEST_TEMP/example1-default.js - && { + echo "js-beautify output for $TEST_TEMP/example1-default.js was expected to be different based on CWD parent folder settings." + cleanup 1 + } + cd $SCRIPT_DIR + + export HOME=$SCRIPT_DIR/resources/indent11chars + $CLI_SCRIPT $TEST_TEMP/example1-default.js | diff -q $TEST_TEMP/example1-default.js - && { + echo "js-beautify output for $TEST_TEMP/example1-default.js was expected to be different based on HOME settings." + cleanup 1 + } + + $CLI_SCRIPT -o $TEST_TEMP/example1-indent11chars.js $TEST_TEMP/example1-default.js + + unset HOME + export USERPROFILE=$SCRIPT_DIR/resources/indent11chars + # node -p 'process.env["USERPROFILE"] || process.env["HOME"] || "unset"' + $CLI_SCRIPT $TEST_TEMP/example1-default.js | diff -q $TEST_TEMP/example1-indent11chars.js - || { + echo "js-beautify output for $TEST_TEMP/example1-default.js was expected to be identical for same HOME and USERPROFILE settings." + cleanup 1 + } + + $CLI_SCRIPT $TEST_TEMP/example1-default.js | diff -q $TEST_TEMP/example1-default.js - && { + echo "js-beautify output for $TEST_TEMP/example1-default.js was expected to be different based on USERPROFILE settings." + cleanup 1 + } + + cleanup +} + +test_smoke_js_beautify() +{ + echo ---------------------------------------- + echo Testing js-beautify functionality... + node $SCRIPT_DIR/node-beautify-tests.js || exit 1 + node $SCRIPT_DIR/amd-beautify-tests.js || exit 1 +} + + +test_performance_js_beautify() +{ + echo ---------------------------------------- + echo Testing js-beautify performance... + node $SCRIPT_DIR/node-beautify-perf-tests.js || exit 1 + echo ---------------------------------------- +} + +test_performance_html_beautify() +{ + echo ---------------------------------------- + echo Testing html-beautify performance... + node $SCRIPT_DIR/node-beautify-html-perf-tests.js || exit 1 + echo ---------------------------------------- +} + +test_cli_common css-beautify +test_cli_common html-beautify +test_cli_common js-beautify + +test_cli_js_beautify +test_smoke_js_beautify +test_performance_js_beautify +test_performance_html_beautify + +echo ---------------------------------------- +echo $0 - PASSED. +echo ---------------------------------------- diff --git a/node_modules/js-beautify/jsbeautifyrc b/node_modules/js-beautify/jsbeautifyrc new file mode 100644 index 0000000..eb55c23 --- /dev/null +++ b/node_modules/js-beautify/jsbeautifyrc @@ -0,0 +1,18 @@ +{ + "indent_size": 4, + "indent_char": " ", + "indent_level": 0, + "indent_with_tabs": false, + "preserve_newlines": true, + "max_preserve_newlines": 10, + "jslint_happy": false, + "space_after_anon_function": false, + "brace_style": "collapse,preserve-inline", + "keep_array_indentation": false, + "keep_function_indentation": false, + "space_before_conditional": true, + "break_chained_methods": false, + "eval_code": false, + "unescape_strings": false, + "wrap_line_length": 0 +} diff --git a/node_modules/js-beautify/package.json b/node_modules/js-beautify/package.json new file mode 100644 index 0000000..85c9be4 --- /dev/null +++ b/node_modules/js-beautify/package.json @@ -0,0 +1,148 @@ +{ + "_args": [ + [ + { + "raw": "js-beautify@^1.6.11", + "scope": null, + "escapedName": "js-beautify", + "name": "js-beautify", + "rawSpec": "^1.6.11", + "spec": ">=1.6.11 <2.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/sequelize-cli" + ] + ], + "_from": "js-beautify@>=1.6.11 <2.0.0", + "_id": "js-beautify@1.6.12", + "_inCache": true, + "_location": "/js-beautify", + "_nodeVersion": "7.2.1", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/js-beautify-1.6.12.tgz_1489984823357_0.011489433469250798" + }, + "_npmUser": { + "name": "bitwiseman", + "email": "bitwiseman@gmail.com" + }, + "_npmVersion": "4.0.5", + "_phantomChildren": {}, + "_requested": { + "raw": "js-beautify@^1.6.11", + "scope": null, + "escapedName": "js-beautify", + "name": "js-beautify", + "rawSpec": "^1.6.11", + "spec": ">=1.6.11 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/sequelize-cli" + ], + "_resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.6.12.tgz", + "_shasum": "78b75933505d376da6e5a28e9b7887e0094db8b5", + "_shrinkwrap": null, + "_spec": "js-beautify@^1.6.11", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/sequelize-cli", + "author": { + "name": "Einar Lielmanis", + "email": "einar@jsbeautifier.org" + }, + "bin": { + "css-beautify": "./js/bin/css-beautify.js", + "html-beautify": "./js/bin/html-beautify.js", + "js-beautify": "./js/bin/js-beautify.js" + }, + "bugs": { + "url": "https://github.com/beautify-web/js-beautify/issues" + }, + "contributors": [ + { + "name": "Vital Batmanov", + "email": "vital76@gmail.com" + }, + { + "name": "Chris J. Shull", + "email": "chrisjshull@gmail.com" + }, + { + "name": "Gian Marco Gherardi", + "email": "gianmarco.gherardi@gmail.com" + }, + { + "name": "Stan", + "email": "stasson@orc.ru" + }, + { + "name": "Vittorio Gambaletta", + "email": "VittGam@vittgam.net" + }, + { + "name": "Daniel Stockman", + "email": "daniel.stockman@gmail.com" + }, + { + "name": "Harutyun Amirjanyan", + "email": "amirjanyan@gmail.com" + }, + { + "name": "Nochum Sossonko", + "email": "nsossonko@hotmail.com" + }, + { + "name": "Liam Newman", + "email": "bitwiseman@gmail.com" + } + ], + "dependencies": { + "config-chain": "~1.1.5", + "editorconfig": "^0.13.2", + "mkdirp": "~0.5.0", + "nopt": "~3.0.1" + }, + "description": "jsbeautifier.org for node", + "devDependencies": { + "benchmark": "2.1.0", + "jshint": "~2.9.1", + "mustache": "~2.2.1", + "node-static": "~0.7.1", + "requirejs": "2.1.x" + }, + "directories": { + "lib": "js/lib", + "test": "js/test" + }, + "dist": { + "shasum": "78b75933505d376da6e5a28e9b7887e0094db8b5", + "tarball": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.6.12.tgz" + }, + "gitHead": "4a4bb0d03a6dc9a1e4ade5e220e3dd81a320242e", + "homepage": "http://jsbeautifier.org/", + "keywords": [ + "beautify", + "beautifier", + "code-quality" + ], + "license": "MIT", + "main": "js/index.js", + "maintainers": [ + { + "name": "evocateur", + "email": "daniel.stockman@gmail.com" + }, + { + "name": "bitwiseman", + "email": "bitwiseman@gmail.com" + } + ], + "name": "js-beautify", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/beautify-web/js-beautify.git" + }, + "scripts": {}, + "version": "1.6.12" +} diff --git a/node_modules/js-beautify/test/data/css/node.mustache b/node_modules/js-beautify/test/data/css/node.mustache new file mode 100644 index 0000000..612e2f2 --- /dev/null +++ b/node_modules/js-beautify/test/data/css/node.mustache @@ -0,0 +1,269 @@ +/* +{{&header_text}} + + The MIT License (MIT) + + Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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. +*/ +/*jshint unused:false */ + +function run_css_tests(test_obj, Urlencoded, js_beautify, html_beautify, css_beautify) +{ + + var default_opts = { + indent_size: 4, + indent_char: ' ', + preserve_newlines: true, + jslint_happy: false, + keep_array_indentation: false, + brace_style: 'collapse', + space_before_conditional: true, + break_chained_methods: false, + selector_separator: '\n', + end_with_newline: false + }; + var opts; + +{{#default_options}} default_opts.{{name}} = {{&value}}; +{{/default_options}} + + function reset_options() + { + opts = JSON.parse(JSON.stringify(default_opts)); + } + + function test_css_beautifier(input) + { + return css_beautify(input, opts); + } + + var sanitytest; + + // test the input on beautifier with the current flag settings + // does not check the indentation / surroundings as bt() does + function test_fragment(input, expected) + { + expected = expected || expected === '' ? expected : input; + sanitytest.expect(input, expected); + // if the expected is different from input, run it again + // expected output should be unchanged when run twice. + if (expected !== input) { + sanitytest.expect(expected, expected); + } + + // Everywhere we do newlines, they should be replaced with opts.eol + opts.eol = '\r\\n'; + expected = expected.replace(/[\n]/g, '\r\n'); + sanitytest.expect(input, expected); + if (input.indexOf('\n') !== -1) { + input = input.replace(/[\n]/g, '\r\n'); + sanitytest.expect(input, expected); + // Ensure support for auto eol detection + opts.eol = 'auto'; + sanitytest.expect(input, expected); + } + opts.eol = '\n'; + } + + // test css + function t(input, expectation) + { + var wrapped_input, wrapped_expectation; + + expectation = expectation || expectation === '' ? expectation : input; + sanitytest.test_function(test_css_beautifier, 'css_beautify'); + test_fragment(input, expectation); + } + + function unicode_char(value) { + return String.fromCharCode(value); + } + + function beautifier_tests() + { + sanitytest = test_obj; + + reset_options(); + //============================================================ + t(".tabs {}"); + +{{#groups}}{{#set_mustache_tags}}.{{/set_mustache_tags}} + //============================================================ + {{^matrix}} + // {{&name}} + reset_options(); + {{#options}} + opts.{{name}} = {{&value}}; + {{/options}} + {{#tests}} + {{#test_line}}.{{/test_line}}; + {{/tests}} + + {{/matrix}} + {{#matrix}} + // {{&name}} - ({{#matrix_context_string}}.{{/matrix_context_string}}) + reset_options(); + {{#options}} + opts.{{name}} = {{&value}}; + {{/options}} + {{#tests}} + {{#test_line}}.{{/test_line}}; + {{/tests}} + + {{/matrix}} +{{#unset_mustache_tags}}.{{/unset_mustache_tags}}{{/groups}} + } + + function beautifier_unconverted_tests() + { + sanitytest = test_obj; + + reset_options(); + //============================================================ + // test basic css beautifier + t(".tabs {}"); + t(".tabs{color:red;}", ".tabs {\n\tcolor: red;\n}"); + t(".tabs{color:rgb(255, 255, 0)}", ".tabs {\n\tcolor: rgb(255, 255, 0)\n}"); + t(".tabs{background:url('back.jpg')}", ".tabs {\n\tbackground: url('back.jpg')\n}"); + t("#bla, #foo{color:red}", "#bla,\n#foo {\n\tcolor: red\n}"); + t("@media print {.tab{}}", "@media print {\n\t.tab {}\n}"); + t("@media print {.tab{background-image:url(foo@2x.png)}}", "@media print {\n\t.tab {\n\t\tbackground-image: url(foo@2x.png)\n\t}\n}"); + + t("a:before {\n" + + "\tcontent: 'a{color:black;}\"\"\\'\\'\"\\n\\n\\na{color:black}\';\n" + + "}"); + + //lead-in whitespace determines base-indent. + // lead-in newlines are stripped. + t("\n\na, img {padding: 0.2px}", "a,\nimg {\n\tpadding: 0.2px\n}"); + t(" a, img {padding: 0.2px}", " a,\n img {\n \tpadding: 0.2px\n }"); + t(" \t \na, img {padding: 0.2px}", " \t a,\n \t img {\n \t \tpadding: 0.2px\n \t }"); + t("\n\n a, img {padding: 0.2px}", "a,\nimg {\n\tpadding: 0.2px\n}"); + + // separate selectors + t("#bla, #foo{color:red}", "#bla,\n#foo {\n\tcolor: red\n}"); + t("a, img {padding: 0.2px}", "a,\nimg {\n\tpadding: 0.2px\n}"); + + // block nesting + t("#foo {\n\tbackground-image: url(foo@2x.png);\n\t@font-face {\n\t\tfont-family: 'Bitstream Vera Serif Bold';\n\t\tsrc: url('http://developer.mozilla.org/@api/deki/files/2934/=VeraSeBd.ttf');\n\t}\n}"); + t("@media screen {\n\t#foo:hover {\n\t\tbackground-image: url(foo@2x.png);\n\t}\n\t@font-face {\n\t\tfont-family: 'Bitstream Vera Serif Bold';\n\t\tsrc: url('http://developer.mozilla.org/@api/deki/files/2934/=VeraSeBd.ttf');\n\t}\n}"); +/* +@font-face { + font-family: 'Bitstream Vera Serif Bold'; + src: url('http://developer.mozilla.org/@api/deki/files/2934/=VeraSeBd.ttf'); +} +@media screen { + #foo:hover { + background-image: url(foo.png); + } + @media screen and (min-device-pixel-ratio: 2) { + @font-face { + font-family: 'Helvetica Neue' + } + #foo:hover { + background-image: url(foo@2x.png); + } + } +} +*/ + t("@font-face {\n\tfont-family: 'Bitstream Vera Serif Bold';\n\tsrc: url('http://developer.mozilla.org/@api/deki/files/2934/=VeraSeBd.ttf');\n}\n@media screen {\n\t#foo:hover {\n\t\tbackground-image: url(foo.png);\n\t}\n\t@media screen and (min-device-pixel-ratio: 2) {\n\t\t@font-face {\n\t\t\tfont-family: 'Helvetica Neue'\n\t\t}\n\t\t#foo:hover {\n\t\t\tbackground-image: url(foo@2x.png);\n\t\t}\n\t}\n}"); + + // less-css cases + t('.well{@well-bg:@bg-color;@well-fg:@fg-color;}','.well {\n\t@well-bg: @bg-color;\n\t@well-fg: @fg-color;\n}'); + t('.well {&.active {\nbox-shadow: 0 1px 1px @border-color, 1px 0 1px @border-color;}}', + '.well {\n' + + '\t&.active {\n' + + '\t\tbox-shadow: 0 1px 1px @border-color, 1px 0 1px @border-color;\n' + + '\t}\n' + + '}'); + t('a {\n' + + '\tcolor: blue;\n' + + '\t&:hover {\n' + + '\t\tcolor: green;\n' + + '\t}\n' + + '\t& & &&&.active {\n' + + '\t\tcolor: green;\n' + + '\t}\n' + + '}'); + + // Not sure if this is sensible + // but I believe it is correct to not remove the space in "&: hover". + t('a {\n' + + '\t&: hover {\n' + + '\t\tcolor: green;\n' + + '\t}\n' + + '}'); + + // import + t('@import "test";'); + + // don't break nested pseudo-classes + t("a:first-child{color:red;div:first-child{color:black;}}", + "a:first-child {\n\tcolor: red;\n\tdiv:first-child {\n\t\tcolor: black;\n\t}\n}"); + + // handle SASS/LESS parent reference + t("div{&:first-letter {text-transform: uppercase;}}", + "div {\n\t&:first-letter {\n\t\ttext-transform: uppercase;\n\t}\n}"); + + //nested modifiers (&:hover etc) + t(".tabs{&:hover{width:10px;}}", ".tabs {\n\t&:hover {\n\t\twidth: 10px;\n\t}\n}"); + t(".tabs{&.big{width:10px;}}", ".tabs {\n\t&.big {\n\t\twidth: 10px;\n\t}\n}"); + t(".tabs{&>big{width:10px;}}", ".tabs {\n\t&>big {\n\t\twidth: 10px;\n\t}\n}"); + t(".tabs{&+.big{width:10px;}}", ".tabs {\n\t&+.big {\n\t\twidth: 10px;\n\t}\n}"); + + //nested rules + t(".tabs{.child{width:10px;}}", ".tabs {\n\t.child {\n\t\twidth: 10px;\n\t}\n}"); + + //variables + t("@myvar:10px;.tabs{width:10px;}", "@myvar: 10px;\n.tabs {\n\twidth: 10px;\n}"); + t("@myvar:10px; .tabs{width:10px;}", "@myvar: 10px;\n.tabs {\n\twidth: 10px;\n}"); + + // test options + opts.indent_size = 2; + opts.indent_char = ' '; + opts.selector_separator_newline = false; + + // pseudo-classes and pseudo-elements + t("#foo:hover {\n background-image: url(foo@2x.png)\n}"); + t("#foo *:hover {\n color: purple\n}"); + t("::selection {\n color: #ff0000;\n}"); + + // TODO: don't break nested pseduo-classes + t("@media screen {.tab,.bat:hover {color:red}}", "@media screen {\n .tab, .bat:hover {\n color: red\n }\n}"); + + // particular edge case with braces and semicolons inside tags that allows custom text + t("a:not(\"foobar\\\";{}omg\"){\ncontent: 'example\\';{} text';\ncontent: \"example\\\";{} text\";}", + "a:not(\"foobar\\\";{}omg\") {\n content: 'example\\';{} text';\n content: \"example\\\";{} text\";\n}"); + + // may not eat the space before "[" + t('html.js [data-custom="123"] {\n opacity: 1.00;\n}'); + t('html.js *[data-custom="123"] {\n opacity: 1.00;\n}'); + } + + beautifier_tests(); + beautifier_unconverted_tests(); +} + +if (typeof exports !== "undefined") { + exports.run_css_tests = run_css_tests; +} diff --git a/node_modules/js-beautify/test/data/css/python.mustache b/node_modules/js-beautify/test/data/css/python.mustache new file mode 100644 index 0000000..8811661 --- /dev/null +++ b/node_modules/js-beautify/test/data/css/python.mustache @@ -0,0 +1,270 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +''' +{{&header_text}} + + The MIT License (MIT) + + Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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. +''' + +import unittest +import cssbeautifier +import copy + +class CSSBeautifierTest(unittest.TestCase): + + options = None + + @classmethod + def setUpClass(cls): + false = False + true = True + + default_options = cssbeautifier.default_options() + default_options.indent_size = 1 + default_options.indent_char = '\t' + default_options.selector_separator_newline = true + default_options.end_with_newline = false + default_options.newline_between_rules = false + +{{#default_options}} default_options.{{name}} = {{&value}} +{{/default_options}} + + cls.default_options = default_options + + def reset_options(self): + self.options = copy.copy(self.default_options) + + def testGenerated(self): + self.reset_options() + test_fragment = self.decodesto + t = self.decodesto + + false = False + true = True + +{{#groups}}{{#set_mustache_tags}}.{{/set_mustache_tags}} + #============================================================ + {{^matrix}} + # {{&name}} + self.reset_options(); + {{#options}} + self.options.{{name}} = {{&value}} + {{/options}} + {{#tests}} + {{#test_line}}.{{/test_line}} + {{/tests}} + + {{/matrix}} + {{#matrix}} + # {{&name}} - ({{#matrix_context_string}}.{{/matrix_context_string}}) + self.reset_options(); + {{#options}} + self.options.{{name}} = {{&value}} + {{/options}} + {{#tests}} + {{#test_line}}.{{/test_line}} + {{/tests}} + + {{/matrix}} +{{#unset_mustache_tags}}.{{/unset_mustache_tags}}{{/groups}} + + def testNewline(self): + self.reset_options() + t = self.decodesto + + self.options.end_with_newline = True + t("", "\n") + t("\n", "\n") + t(".tabs{}\n", ".tabs {}\n") + t(".tabs{}", ".tabs {}\n") + + def testBasics(self): + self.reset_options() + t = self.decodesto + + t("", "") + t("\n", "") + t(".tabs{}\n", ".tabs {}") + t(".tabs{}", ".tabs {}") + t(".tabs{color:red}", ".tabs {\n\tcolor: red\n}") + t(".tabs{color:rgb(255, 255, 0)}", ".tabs {\n\tcolor: rgb(255, 255, 0)\n}") + t(".tabs{background:url('back.jpg')}", ".tabs {\n\tbackground: url('back.jpg')\n}") + t("#bla, #foo{color:red}", "#bla,\n#foo {\n\tcolor: red\n}") + t("@media print {.tab{}}", "@media print {\n\t.tab {}\n}") + t("@media print {.tab{background-image:url(foo@2x.png)}}", "@media print {\n\t.tab {\n\t\tbackground-image: url(foo@2x.png)\n\t}\n}") + + t("a:before {\n" + + "\tcontent: 'a{color:black;}\"\"\\'\\'\"\\n\\n\\na{color:black}\';\n" + + "}"); + + # may not eat the space before "[" + t('html.js [data-custom="123"] {\n\topacity: 1.00;\n}') + t('html.js *[data-custom="123"] {\n\topacity: 1.00;\n}') + + # lead-in whitespace determines base-indent. + # lead-in newlines are stripped. + t("\n\na, img {padding: 0.2px}", "a,\nimg {\n\tpadding: 0.2px\n}") + t(" a, img {padding: 0.2px}", " a,\n img {\n \tpadding: 0.2px\n }") + t(" \t \na, img {padding: 0.2px}", " \t a,\n \t img {\n \t \tpadding: 0.2px\n \t }") + t("\n\n a, img {padding: 0.2px}", "a,\nimg {\n\tpadding: 0.2px\n}") + + def testSeperateSelectors(self): + self.reset_options() + t = self.decodesto + + t("#bla, #foo{color:red}", "#bla,\n#foo {\n\tcolor: red\n}") + t("a, img {padding: 0.2px}", "a,\nimg {\n\tpadding: 0.2px\n}") + + + def testBlockNesting(self): + self.reset_options() + t = self.decodesto + + t("#foo {\n\tbackground-image: url(foo@2x.png);\n\t@font-face {\n\t\tfont-family: 'Bitstream Vera Serif Bold';\n\t\tsrc: url('http://developer.mozilla.org/@api/deki/files/2934/=VeraSeBd.ttf');\n\t}\n}") + t("@media screen {\n\t#foo:hover {\n\t\tbackground-image: url(foo@2x.png);\n\t}\n\t@font-face {\n\t\tfont-family: 'Bitstream Vera Serif Bold';\n\t\tsrc: url('http://developer.mozilla.org/@api/deki/files/2934/=VeraSeBd.ttf');\n\t}\n}") + +# @font-face { +# font-family: 'Bitstream Vera Serif Bold'; +# src: url('http://developer.mozilla.org/@api/deki/files/2934/=VeraSeBd.ttf'); +# } +# @media screen { +# #foo:hover { +# background-image: url(foo.png); +# } +# @media screen and (min-device-pixel-ratio: 2) { +# @font-face { +# font-family: 'Helvetica Neue' +# } +# #foo:hover { +# background-image: url(foo@2x.png); +# } +# } +# } + t("@font-face {\n\tfont-family: 'Bitstream Vera Serif Bold';\n\tsrc: url('http://developer.mozilla.org/@api/deki/files/2934/=VeraSeBd.ttf');\n}\n@media screen {\n\t#foo:hover {\n\t\tbackground-image: url(foo.png);\n\t}\n\t@media screen and (min-device-pixel-ratio: 2) {\n\t\t@font-face {\n\t\t\tfont-family: 'Helvetica Neue'\n\t\t}\n\t\t#foo:hover {\n\t\t\tbackground-image: url(foo@2x.png);\n\t\t}\n\t}\n}") + + + def testOptions(self): + self.reset_options() + self.options.indent_size = 2 + self.options.indent_char = ' ' + self.options.selector_separator_newline = False + t = self.decodesto + + # pseudo-classes and pseudo-elements + t("#foo:hover {\n background-image: url(foo@2x.png)\n}") + t("#foo *:hover {\n color: purple\n}") + t("::selection {\n color: #ff0000;\n}") + + # TODO: don't break nested pseduo-classes + t("@media screen {.tab,.bat:hover {color:red}}", "@media screen {\n .tab, .bat:hover {\n color: red\n }\n}") + + # particular edge case with braces and semicolons inside tags that allows custom text + t( "a:not(\"foobar\\\";{}omg\"){\ncontent: 'example\\';{} text';\ncontent: \"example\\\";{} text\";}", + "a:not(\"foobar\\\";{}omg\") {\n content: 'example\\';{} text';\n content: \"example\\\";{} text\";\n}") + + def testLessCss(self): + self.reset_options() + t = self.decodesto + + t('.well{ \n @well-bg:@bg-color;@well-fg:@fg-color;}','.well {\n\t@well-bg: @bg-color;\n\t@well-fg: @fg-color;\n}') + t('.well {&.active {\nbox-shadow: 0 1px 1px @border-color, 1px 0 1px @border-color;}}', + '.well {\n' + + '\t&.active {\n' + + '\t\tbox-shadow: 0 1px 1px @border-color, 1px 0 1px @border-color;\n' + + '\t}\n' + + '}') + t('a {\n' + + '\tcolor: blue;\n' + + '\t&:hover {\n' + + '\t\tcolor: green;\n' + + '\t}\n' + + '\t& & &&&.active {\n' + + '\t\tcolor: green;\n' + + '\t}\n' + + '}') + + # Not sure if this is sensible + # but I believe it is correct to not remove the space in "&: hover". + t('a {\n' + + '\t&: hover {\n' + + '\t\tcolor: green;\n' + + '\t}\n' + + '}'); + + # import + t('@import "test";'); + + # don't break nested pseudo-classes + t("a:first-child{color:red;div:first-child{color:black;}}", + "a:first-child {\n\tcolor: red;\n\tdiv:first-child {\n\t\tcolor: black;\n\t}\n}"); + + # handle SASS/LESS parent reference + t("div{&:first-letter {text-transform: uppercase;}}", + "div {\n\t&:first-letter {\n\t\ttext-transform: uppercase;\n\t}\n}"); + + # nested modifiers (&:hover etc) + t(".tabs{&:hover{width:10px;}}", ".tabs {\n\t&:hover {\n\t\twidth: 10px;\n\t}\n}") + t(".tabs{&.big{width:10px;}}", ".tabs {\n\t&.big {\n\t\twidth: 10px;\n\t}\n}") + t(".tabs{&>big{width:10px;}}", ".tabs {\n\t&>big {\n\t\twidth: 10px;\n\t}\n}") + t(".tabs{&+.big{width:10px;}}", ".tabs {\n\t&+.big {\n\t\twidth: 10px;\n\t}\n}") + + # nested rules + t(".tabs{.child{width:10px;}}", ".tabs {\n\t.child {\n\t\twidth: 10px;\n\t}\n}") + + # variables + t("@myvar:10px;.tabs{width:10px;}", "@myvar: 10px;\n.tabs {\n\twidth: 10px;\n}") + t("@myvar:10px; .tabs{width:10px;}", "@myvar: 10px;\n.tabs {\n\twidth: 10px;\n}") + + def decodesto(self, input, expectation=None): + if expectation == None: + expectation = input + + self.assertMultiLineEqual( + cssbeautifier.beautify(input, self.options), expectation) + + # if the expected is different from input, run it again + # expected output should be unchanged when run twice. + if not expectation != input: + self.assertMultiLineEqual( + cssbeautifier.beautify(expectation, self.options), expectation) + + # Everywhere we do newlines, they should be replaced with opts.eol + self.options.eol = '\r\\n'; + expectation = expectation.replace('\n', '\r\n') + self.assertMultiLineEqual( + cssbeautifier.beautify(input, self.options), expectation) + if input.find('\n') != -1: + input = input.replace('\n', '\r\n') + self.assertMultiLineEqual( + cssbeautifier.beautify(input, self.options), expectation) + # Ensure support for auto eol detection + self.options.eol = 'auto' + self.assertMultiLineEqual( + cssbeautifier.beautify(input, self.options), expectation) + self.options.eol = '\n' + +if __name__ == '__main__': + unittest.main() diff --git a/node_modules/js-beautify/test/data/css/tests.js b/node_modules/js-beautify/test/data/css/tests.js new file mode 100644 index 0000000..43ca23a --- /dev/null +++ b/node_modules/js-beautify/test/data/css/tests.js @@ -0,0 +1,445 @@ +/* + The MIT License (MIT) + + Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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. +*/ + +exports.test_data = { + default_options: [ + { name: "indent_size", value: "1" }, + { name: "indent_char", value: "'\\t'" }, + { name: "selector_separator_newline", value: "true" }, + { name: "end_with_newline", value: "false" }, + { name: "newline_between_rules", value: "false" }, + { name: "space_around_combinator", value: "false" }, + { name: "preserve_newlines", value: "false" }, + // deprecated + { name: "space_around_selector_separator", value: "false" } + ], + groups: [{ + name: "End With Newline", + description: "", + matrix: [{ + options: [ + { name: "end_with_newline", value: "true" } + ], + eof: '\\n' + }, { + options: [ + { name: "end_with_newline", value: "false" } + ], + eof: '' + }], + tests: [ + { fragment: true, input: '', output: '{{eof}}' }, + { fragment: true, input: ' .tabs{}', output: ' .tabs {}{{eof}}' }, + { fragment: true, input: ' \n\n.tabs{}\n\n\n\n', output: ' .tabs {}{{eof}}' }, + { fragment: true, input: '\n', output: '{{eof}}' } + ], + }, { + name: "Empty braces", + description: "", + tests: [ + { input: '.tabs{}', output: '.tabs {}' }, + { input: '.tabs { }', output: '.tabs {}' }, + { input: '.tabs { }', output: '.tabs {}' }, + // When we support preserving newlines this will need to change + { input: '.tabs \n{\n \n }', output: '.tabs {}' } + ], + }, { + name: "", + description: "", + tests: [{ + input: '#cboxOverlay {\n\tbackground: url(images/overlay.png) repeat 0 0;\n\topacity: 0.9;\n\tfilter: alpha(opacity = 90);\n}', + output: '#cboxOverlay {\n\tbackground: url(images/overlay.png) repeat 0 0;\n\topacity: 0.9;\n\tfilter: alpha(opacity=90);\n}' + }, ], + }, { + name: "Support simple language specific option inheritance/overriding", + description: "Support simple language specific option inheritance/overriding", + matrix: [{ + options: [ + { name: "indent_char", value: "' '" }, + { name: "indent_size", value: "4" }, + { name: "js", value: "{ 'indent_size': 3 }" }, + { name: "css", value: "{ 'indent_size': 5 }" } + ], + c: ' ', + }, + { + options: [ + { name: "indent_char", value: "' '" }, + { name: "indent_size", value: "4" }, + { name: "html", value: "{ 'js': { 'indent_size': 3 }, 'css': { 'indent_size': 5 } }" } + ], + c: ' ' + }, + { + options: [ + { name: "indent_char", value: "' '" }, + { name: "indent_size", value: "9" }, + { name: "html", value: "{ 'js': { 'indent_size': 3 }, 'css': { 'indent_size': 8 }, 'indent_size': 2}" }, + { name: "js", value: "{ 'indent_size': 5 }" }, + { name: "css", value: "{ 'indent_size': 3 }" } + ], + c: ' ' + } + ], + tests: [{ + unchanged: [ + '.selector {', + '{{c}}font-size: 12px;', + '}' + ] + }] + }, { + name: "Space Around Combinator", + description: "", + matrix: [{ + options: [{ name: "space_around_combinator", value: "true" }], + space: ' ' + }, { + options: [{ name: "space_around_combinator", value: "false" }], + space: '' + }, { + // space_around_selector_separator is deprecated, but needs to keep working for now. + options: [{ name: "space_around_selector_separator", value: "true" }], + space: ' ' + }], + tests: [ + { input: 'a>b{}', output: 'a{{space}}>{{space}}b {}' }, + { input: 'a~b{}', output: 'a{{space}}~{{space}}b {}' }, + { input: 'a+b{}', output: 'a{{space}}+{{space}}b {}' }, + { input: 'a+b>c{}', output: 'a{{space}}+{{space}}b{{space}}>{{space}}c {}' }, + { input: 'a > b{}', output: 'a{{space}}>{{space}}b {}' }, + { input: 'a ~ b{}', output: 'a{{space}}~{{space}}b {}' }, + { input: 'a + b{}', output: 'a{{space}}+{{space}}b {}' }, + { input: 'a + b > c{}', output: 'a{{space}}+{{space}}b{{space}}>{{space}}c {}' }, + { + input: 'a > b{width: calc(100% + 45px);}', + output: [ + 'a{{space}}>{{space}}b {', + '\twidth: calc(100% + 45px);', + '}' + ] + }, + { + input: 'a ~ b{width: calc(100% + 45px);}', + output: [ + 'a{{space}}~{{space}}b {', + '\twidth: calc(100% + 45px);', + '}' + ] + }, + { + input: 'a + b{width: calc(100% + 45px);}', + output: [ + 'a{{space}}+{{space}}b {', + '\twidth: calc(100% + 45px);', + '}' + ] + }, + { + input: 'a + b > c{width: calc(100% + 45px);}', + output: [ + 'a{{space}}+{{space}}b{{space}}>{{space}}c {', + '\twidth: calc(100% + 45px);', + '}' + ] + } + ] + }, { + name: 'Selector Separator', + description: '', + matrix: [{ + options: [ + { name: 'selector_separator_newline', value: 'false' }, + { name: 'selector_separator', value: '" "' } + ], + separator: ' ', + separator1: ' ' + }, { + options: [ + { name: 'selector_separator_newline', value: 'false' }, + { name: 'selector_separator', value: '" "' } + ], + // BUG: #713 + separator: ' ', + separator1: ' ' + }, { + options: [ + { name: 'selector_separator_newline', value: 'true' }, + { name: 'selector_separator', value: '" "' } + ], + separator: '\\n', + separator1: '\\n\\t' + }, { + options: [ + { name: 'selector_separator_newline', value: 'true' }, + { name: 'selector_separator', value: '" "' } + ], + separator: '\\n', + separator1: '\\n\\t' + }], + tests: [ + { input: '#bla, #foo{color:green}', output: '#bla,{{separator}}#foo {\n\tcolor: green\n}' }, + { input: '@media print {.tab{}}', output: '@media print {\n\t.tab {}\n}' }, + { input: '@media print {.tab,.bat{}}', output: '@media print {\n\t.tab,{{separator1}}.bat {}\n}' }, + { input: '#bla, #foo{color:black}', output: '#bla,{{separator}}#foo {\n\tcolor: black\n}' }, { + input: 'a:first-child,a:first-child{color:red;div:first-child,div:hover{color:black;}}', + output: 'a:first-child,{{separator}}a:first-child {\n\tcolor: red;\n\tdiv:first-child,{{separator1}}div:hover {\n\t\tcolor: black;\n\t}\n}' + } + ] + }, { + name: "Preserve Newlines", + description: "", + matrix: [{ + options: [ + { name: "preserve_newlines", value: "true" } + ], + separator_input: '\\n\\n', + separator_output: '\\n\\n', + }, { + options: [ + { name: "preserve_newlines", value: "false" } + ], + separator_input: '\\n\\n', + separator_output: '\\n', + }], + tests: [ + { input: '.div {}{{separator_input}}.span {}', output: '.div {}{{separator_output}}.span {}' }, + { input: '#bla, #foo{\n\tcolor:black;{{separator_input}}\tfont-size: 12px;\n}', output: '#bla,\n#foo {\n\tcolor: black;{{separator_output}}\tfont-size: 12px;\n}' } + ], + }, + { + name: "Preserve Newlines and newline_between_rules", + description: "", + options: [ + { name: "preserve_newlines", value: "true" }, + { name: "newline_between_rules", value: "true" } + ], + tests: [ + { input: '.div {}.span {}', output: '.div {}\n\n.span {}' }, + { input: '#bla, #foo{\n\tcolor:black;\n\tfont-size: 12px;\n}', output: '#bla,\n#foo {\n\tcolor: black;\n\tfont-size: 12px;\n}' }, + { input: '#bla, #foo{\n\tcolor:black;\n\n\n\tfont-size: 12px;\n}', output: '#bla,\n#foo {\n\tcolor: black;\n\n\n\tfont-size: 12px;\n}' }, + { unchanged: '#bla,\n\n#foo {\n\tcolor: black;\n\tfont-size: 12px;\n}' }, + { unchanged: 'a {\n\tb: c;\n\n\n\td: {\n\t\te: f;\n\t}\n}' }, + { unchanged: '.div {}\n\n.span {}' }, + { unchanged: '.div {\n\ta: 1;\n\n\n\tb: 2;\n}\n\n\n\n.span {\n\ta: 1;\n}' }, + { unchanged: '.div {\n\n\n\ta: 1;\n\n\n\tb: 2;\n}\n\n\n\n.span {\n\ta: 1;\n}' }, + { unchanged: '@media screen {\n\t.div {\n\t\ta: 1;\n\n\n\t\tb: 2;\n\t}\n\n\n\n\t.span {\n\t\ta: 1;\n\t}\n}\n\n.div {}\n\n.span {}' }, + ], + }, { + name: "Preserve Newlines and add tabs", + options: [{ name: "preserve_newlines", value: "true" }], + description: "", + tests: [{ + input: '.tool-tip {\n\tposition: relative;\n\n\t\t\n\t.tool-tip-content {\n\t\t&>* {\n\t\t\tmargin-top: 0;\n\t\t}\n\t\t\n\n\t\t.mixin-box-shadow(.2rem .2rem .5rem rgba(0, 0, 0, .15));\n\t\tpadding: 1rem;\n\t\tposition: absolute;\n\t\tz-index: 10;\n\t}\n}', + output: '.tool-tip {\n\tposition: relative;\n\n\n\t.tool-tip-content {\n\t\t&>* {\n\t\t\tmargin-top: 0;\n\t\t}\n\\n\\n\t\t.mixin-box-shadow(.2rem .2rem .5rem rgba(0, 0, 0, .15));\n\t\tpadding: 1rem;\n\t\tposition: absolute;\n\t\tz-index: 10;\n\t}\n}' + }], + }, { + name: "Newline Between Rules", + description: "", + matrix: [{ + options: [ + { name: "newline_between_rules", value: "true" } + ], + separator: '\\n' + }, { + options: [ + { name: "newline_between_rules", value: "false" } + ], + separator: '' + }], + tests: [ + { input: '.div {}\n.span {}', output: '.div {}\n{{separator}}.span {}' }, + { input: '.div{}\n \n.span{}', output: '.div {}\n{{separator}}.span {}' }, + { input: '.div {} \n \n.span { } \n', output: '.div {}\n{{separator}}.span {}' }, + { input: '.div {\n \n} \n .span {\n } ', output: '.div {}\n{{separator}}.span {}' }, + { input: '.selector1 {\n\tmargin: 0; /* This is a comment including an url http://domain.com/path/to/file.ext */\n}\n.div{height:15px;}', output: '.selector1 {\n\tmargin: 0;\n\t/* This is a comment including an url http://domain.com/path/to/file.ext */\n}\n{{separator}}.div {\n\theight: 15px;\n}' }, + { input: '.tabs{width:10px;//end of line comment\nheight:10px;//another\n}\n.div{height:15px;}', output: '.tabs {\n\twidth: 10px; //end of line comment\n\theight: 10px; //another\n}\n{{separator}}.div {\n\theight: 15px;\n}' }, + { input: '#foo {\n\tbackground-image: url(foo@2x.png);\n\t@font-face {\n\t\tfont-family: "Bitstream Vera Serif Bold";\n\t\tsrc: url("http://developer.mozilla.org/@api/deki/files/2934/=VeraSeBd.ttf");\n\t}\n}\n.div{height:15px;}', output: '#foo {\n\tbackground-image: url(foo@2x.png);\n\t@font-face {\n\t\tfont-family: "Bitstream Vera Serif Bold";\n\t\tsrc: url("http://developer.mozilla.org/@api/deki/files/2934/=VeraSeBd.ttf");\n\t}\n}\n{{separator}}.div {\n\theight: 15px;\n}' }, + { input: '@media screen {\n\t#foo:hover {\n\t\tbackground-image: url(foo@2x.png);\n\t}\n\t@font-face {\n\t\tfont-family: "Bitstream Vera Serif Bold";\n\t\tsrc: url("http://developer.mozilla.org/@api/deki/files/2934/=VeraSeBd.ttf");\n\t}\n}\n.div{height:15px;}', output: '@media screen {\n\t#foo:hover {\n\t\tbackground-image: url(foo@2x.png);\n\t}\n\t@font-face {\n\t\tfont-family: "Bitstream Vera Serif Bold";\n\t\tsrc: url("http://developer.mozilla.org/@api/deki/files/2934/=VeraSeBd.ttf");\n\t}\n}\n{{separator}}.div {\n\theight: 15px;\n}' }, + { input: '@font-face {\n\tfont-family: "Bitstream Vera Serif Bold";\n\tsrc: url("http://developer.mozilla.org/@api/deki/files/2934/=VeraSeBd.ttf");\n}\n@media screen {\n\t#foo:hover {\n\t\tbackground-image: url(foo.png);\n\t}\n\t@media screen and (min-device-pixel-ratio: 2) {\n\t\t@font-face {\n\t\t\tfont-family: "Helvetica Neue"\n\t\t}\n\t\t#foo:hover {\n\t\t\tbackground-image: url(foo@2x.png);\n\t\t}\n\t}\n}', output: '@font-face {\n\tfont-family: "Bitstream Vera Serif Bold";\n\tsrc: url("http://developer.mozilla.org/@api/deki/files/2934/=VeraSeBd.ttf");\n}\n{{separator}}@media screen {\n\t#foo:hover {\n\t\tbackground-image: url(foo.png);\n\t}\n\t@media screen and (min-device-pixel-ratio: 2) {\n\t\t@font-face {\n\t\t\tfont-family: "Helvetica Neue"\n\t\t}\n\t\t#foo:hover {\n\t\t\tbackground-image: url(foo@2x.png);\n\t\t}\n\t}\n}' }, + { input: 'a:first-child{color:red;div:first-child{color:black;}}\n.div{height:15px;}', output: 'a:first-child {\n\tcolor: red;\n\tdiv:first-child {\n\t\tcolor: black;\n\t}\n}\n{{separator}}.div {\n\theight: 15px;\n}' }, + { input: 'a:first-child{color:red;div:not(.peq){color:black;}}\n.div{height:15px;}', output: 'a:first-child {\n\tcolor: red;\n\tdiv:not(.peq) {\n\t\tcolor: black;\n\t}\n}\n{{separator}}.div {\n\theight: 15px;\n}' }, + ], + }, { + name: "Functions braces", + description: "", + tests: [ + { input: '.tabs(){}', output: '.tabs() {}' }, + { input: '.tabs (){}', output: '.tabs () {}' }, + { input: '.tabs (pa, pa(1,2)), .cols { }', output: '.tabs (pa, pa(1, 2)),\n.cols {}' }, + { input: '.tabs(pa, pa(1,2)), .cols { }', output: '.tabs(pa, pa(1, 2)),\n.cols {}' }, + { input: '.tabs ( ) { }', output: '.tabs () {}' }, + { input: '.tabs( ) { }', output: '.tabs() {}' }, + { input: '.tabs (t, t2) \n{\n key: val(p1 ,p2); \n }', output: '.tabs (t, t2) {\n\tkey: val(p1, p2);\n}' }, + { unchanged: '.box-shadow(@shadow: 0 1px 3px rgba(0, 0, 0, .25)) {\n\t-webkit-box-shadow: @shadow;\n\t-moz-box-shadow: @shadow;\n\tbox-shadow: @shadow;\n}' } + ], + }, { + name: "Comments", + description: "", + tests: [ + { unchanged: '/* test */' }, + { input: '.tabs{/* test */}', output: '.tabs {\n\t/* test */\n}' }, + { input: '.tabs{/* test */}', output: '.tabs {\n\t/* test */\n}' }, + { input: '/* header */.tabs {}', output: '/* header */\n\n.tabs {}' }, + { input: '.tabs {\n/* non-header */\nwidth:10px;}', output: '.tabs {\n\t/* non-header */\n\twidth: 10px;\n}' }, + { unchanged: '/* header' }, + { unchanged: '// comment' }, { + input: '.selector1 {\n\tmargin: 0; /* This is a comment including an url http://domain.com/path/to/file.ext */\n}', + output: '.selector1 {\n\tmargin: 0;\n\t/* This is a comment including an url http://domain.com/path/to/file.ext */\n}' + }, + + { + comment: "single line comment support (less/sass)", + input: '.tabs{\n// comment\nwidth:10px;\n}', + output: '.tabs {\n\t// comment\n\twidth: 10px;\n}' + }, + { input: '.tabs{// comment\nwidth:10px;\n}', output: '.tabs {\n\t// comment\n\twidth: 10px;\n}' }, + { input: '//comment\n.tabs{width:10px;}', output: '//comment\n.tabs {\n\twidth: 10px;\n}' }, + { input: '.tabs{//comment\n//2nd single line comment\nwidth:10px;}', output: '.tabs {\n\t//comment\n\t//2nd single line comment\n\twidth: 10px;\n}' }, + { input: '.tabs{width:10px;//end of line comment\n}', output: '.tabs {\n\twidth: 10px; //end of line comment\n}' }, + { input: '.tabs{width:10px;//end of line comment\nheight:10px;}', output: '.tabs {\n\twidth: 10px; //end of line comment\n\theight: 10px;\n}' }, + { input: '.tabs{width:10px;//end of line comment\nheight:10px;//another\n}', output: '.tabs {\n\twidth: 10px; //end of line comment\n\theight: 10px; //another\n}' } + ], + }, { + name: "Handle LESS property name interpolation", + description: "", + tests: [ + { unchanged: 'tag {\n\t@{prop}: none;\n}' }, + { input: 'tag{@{prop}:none;}', output: 'tag {\n\t@{prop}: none;\n}' }, + { input: 'tag{ @{prop}: none;}', output: 'tag {\n\t@{prop}: none;\n}' }, + { + comment: "can also be part of property name", + unchanged: 'tag {\n\tdynamic-@{prop}: none;\n}' + }, + { input: 'tag{dynamic-@{prop}:none;}', output: 'tag {\n\tdynamic-@{prop}: none;\n}' }, + { input: 'tag{ dynamic-@{prop}: none;}', output: 'tag {\n\tdynamic-@{prop}: none;\n}' }, + ], + }, { + name: "Handle LESS property name interpolation, test #631", + description: "", + tests: [ + { unchanged: '.generate-columns(@n, @i: 1) when (@i =< @n) {\n\t.column-@{i} {\n\t\twidth: (@i * 100% / @n);\n\t}\n\t.generate-columns(@n, (@i + 1));\n}' }, + { + input: '.generate-columns(@n,@i:1) when (@i =< @n){.column-@{i}{width:(@i * 100% / @n);}.generate-columns(@n,(@i + 1));}', + output: '.generate-columns(@n, @i: 1) when (@i =< @n) {\n\t.column-@{i} {\n\t\twidth: (@i * 100% / @n);\n\t}\n\t.generate-columns(@n, (@i + 1));\n}' + } + ], + }, { + name: "Psuedo-classes vs Variables", + description: "", + tests: [ + { unchanged: '@page :first {}' }, { + comment: "Assume the colon goes with the @name. If we're in LESS, this is required regardless of the at-string.", + input: '@page:first {}', + output: '@page: first {}' + }, + { unchanged: '@page: first {}' } + ], + }, { + name: "SASS/SCSS", + description: "", + tests: [{ + comment: "Basic Interpolation", + unchanged: 'p {\n\t$font-size: 12px;\n\t$line-height: 30px;\n\tfont: #{$font-size}/#{$line-height};\n}' + }, + { unchanged: 'p.#{$name} {}' }, { + unchanged: [ + '@mixin itemPropertiesCoverItem($items, $margin) {', + '\twidth: calc((100% - ((#{$items} - 1) * #{$margin}rem)) / #{$items});', + '\tmargin: 1.6rem #{$margin}rem 1.6rem 0;', + '}' + ] + }, + { + comment: "Multiple filed issues in LESS due to not(:blah)", + unchanged: '&:first-of-type:not(:last-child) {}' + }, + { + unchanged: [ + 'div {', + '\t&:not(:first-of-type) {', + '\t\tbackground: red;', + '\t}', + '}', + ] + } + + ], + }, { + name: "Proper handling of colon in selectors", + description: "Space before a colon in a selector must be preserved, as it means pseudoclass/pseudoelement on any child", + options: [{ name: "selector_separator_newline", value: "false" }], + tests: [ + { unchanged: 'a :b {}' }, + { unchanged: 'a ::b {}' }, + { unchanged: 'a:b {}' }, + { unchanged: 'a::b {}' }, + { + input: 'a {}, a::b {}, a ::b {}, a:b {}, a :b {}', + output: 'a {}\n, a::b {}\n, a ::b {}\n, a:b {}\n, a :b {}' + }, + { + unchanged: [ + '.card-blue ::-webkit-input-placeholder {', + '\tcolor: #87D1FF;', + '}' + ] + }, + { + unchanged: [ + 'div [attr] :not(.class) {', + '\tcolor: red;', + '}' + ] + } + ] + }, { + name: "Regresssion Tests", + description: "General Regression tests for known issues", + options: [{ name: "selector_separator_newline", value: "false" }], + tests: [{ + unchanged: [ + '@media(min-width:768px) {', + '\t.selector::after {', + '\t\t/* property: value */', + '\t}', + '\t.other-selector {', + '\t\t/* property: value */', + '\t}', + '}' + ] + }, { + unchanged: [ + '.fa-rotate-270 {', + '\tfilter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);', + '}' + ] + }] + }, { + + } + ] +}; \ No newline at end of file diff --git a/node_modules/js-beautify/test/data/html/node.mustache b/node_modules/js-beautify/test/data/html/node.mustache new file mode 100644 index 0000000..68d2769 --- /dev/null +++ b/node_modules/js-beautify/test/data/html/node.mustache @@ -0,0 +1,378 @@ +/* +{{&header_text}} + + The MIT License (MIT) + + Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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. +*/ +/*jshint unused:false */ + +function run_html_tests(test_obj, Urlencoded, js_beautify, html_beautify, css_beautify) +{ + + var default_opts = { + indent_size: 4, + indent_char: ' ', + preserve_newlines: true, + jslint_happy: false, + keep_array_indentation: false, + brace_style: 'collapse', + space_before_conditional: true, + break_chained_methods: false, + selector_separator: '\n', + end_with_newline: false + }; + var opts; + +{{#default_options}} default_opts.{{name}} = {{&value}}; +{{/default_options}} + + function reset_options() + { + opts = JSON.parse(JSON.stringify(default_opts)); + } + + function test_html_beautifier(input) + { + return html_beautify(input, opts); + } + + var sanitytest; + + // test the input on beautifier with the current flag settings + // does not check the indentation / surroundings as bt() does + function test_fragment(input, expected) + { + expected = expected || expected === '' ? expected : input; + sanitytest.expect(input, expected); + // if the expected is different from input, run it again + // expected output should be unchanged when run twice. + if (expected !== input) { + sanitytest.expect(expected, expected); + } + + // Everywhere we do newlines, they should be replaced with opts.eol + opts.eol = '\r\n'; + expected = expected.replace(/[\n]/g, '\r\n'); + sanitytest.expect(input, expected); + if (input.indexOf('\n') !== -1) { + input = input.replace(/[\n]/g, '\r\n'); + sanitytest.expect(input, expected); + // Ensure support for auto eol detection + opts.eol = 'auto'; + sanitytest.expect(input, expected); + } + opts.eol = '\n'; + } + + // test html + function bth(input, expectation) + { + var wrapped_input, wrapped_expectation, field_input, field_expectation; + + expectation = expectation || expectation === '' ? expectation : input; + sanitytest.test_function(test_html_beautifier, 'html_beautify'); + test_fragment(input, expectation); + + if (opts.indent_size === 4 && input) { + wrapped_input = '
    \n' + input.replace(/^(.+)$/mg, ' $1') + '\n inline\n
    '; + wrapped_expectation = '
    \n' + expectation.replace(/^(.+)$/mg, ' $1') + '\n inline\n
    '; + test_fragment(wrapped_input, wrapped_expectation); + } + } + + function unicode_char(value) { + return String.fromCharCode(value); + } + + function beautifier_tests() + { + sanitytest = test_obj; + + reset_options(); + //============================================================ + bth(''); + +{{#groups}}{{#set_mustache_tags}}.{{/set_mustache_tags}} + //============================================================ + {{^matrix}} + // {{&name}} + reset_options(); + {{#options}} + opts.{{name}} = {{&value}}; + {{/options}} + {{#tests}} + {{#test_line}}.{{/test_line}}; + {{/tests}} + + {{/matrix}} + {{#matrix}} + // {{&name}} - ({{#matrix_context_string}}.{{/matrix_context_string}}) + reset_options(); + {{#options}} + opts.{{name}} = {{&value}}; + {{/options}} + {{#tests}} + {{#test_line}}.{{/test_line}}; + {{/tests}} + + {{/matrix}} +{{#unset_mustache_tags}}.{{/unset_mustache_tags}}{{/groups}} + } + + function beautifier_unconverted_tests() + { + sanitytest = test_obj; + + reset_options(); + //============================================================ + opts.end_with_newline = true; + test_fragment('', '\n'); + test_fragment('
    \n'); + test_fragment('
    \n\n\n', '
    \n'); + test_fragment('\n' + + ' \n' + + '\n'); + + + opts.end_with_newline = false; + // error cases need love too + bth('Evil'); + bth(" + + test_fragment( + '\n' + + ' \n' + + ''); + + test_fragment('
    \n', '
    '); + bth('
    '); + bth('
    content
    '); + bth('
    ', + '
    \n' + + '
    \n' + + '
    '); + bth('
    content
    ', + '
    \n' + + '
    content
    \n' + + '
    '); + bth('
    \n' + + ' content\n' + + '
    '); + bth('
    \n' + + '
    '); + bth('
    \n' + + ' content\n' + + '
    '); + bth('
    \n' + + '
    ', + '
    \n' + + '
    '); + bth('
    \n' + + '
    ', + '
    \n' + + '
    '); + bth('
    \n' + + '
    \n' + + '
    \n' + + '
    ', + '
    \n' + + '
    \n' + + '
    \n' + + '
    '); + bth('
    \n' + + '
    ', + '
    \n' + + '
    '); + bth('
    content
    ', + '
    content
    '); + bth('
    ', + '
    '); + bth('content\n' + + '
    \n' + + '
    \n' + + 'content', + 'content\n' + + '
    \n' + + '
    \n' + + 'content'); + bth('
  • \n' + + '
    \n' + + '
    \n' + + '
  • '); + bth('
  • \n' + + '
    \n' + + '
    \n' + + '
  • ', + '
  • \n' + + '
    \n' + + '
    \n' + + '
  • '); + bth('
  • \n' + + ' content\n' + + '
  • \n' + + '
  • \n' + + ' content\n' + + '
  • '); + + bth('content'); + bth(' content'); + bth(' content', ' content'); + + bth('content'); + bth(' content'); + bth(' content', ' content'); + + bth('content'); + bth(' content'); + bth(' content', ' content'); + + bth('
    contentcontent
    '); + bth('
    content content
    '); + bth('
    content content
    ', + '
    content content
    '); + bth('Text Link Text'); + + var unformatted = opts.unformatted; + opts.unformatted = ['script', 'style']; + bth(''); + bth(''); + opts.unformatted = unformatted; + + unformatted = opts.unformatted; + opts.unformatted = ['custom-element']; + test_fragment('
    should not' + + ' insert newlines
    ', + '
    should not' + + ' insert newlines
    '); + opts.unformatted = unformatted; + + // Tests that don't pass, but probably should. + // bth('
    content
    '); + + // Handlebars tests + // Without the indent option on, handlebars are treated as content. + + opts.wrap_line_length = 0; + //...---------1---------2---------3---------4---------5---------6---------7 + //...1234567890123456789012345678901234567890123456789012345678901234567890 + bth('
    Some text that should not wrap at all.
    ', + /* expected */ + '
    Some text that should not wrap at all.
    '); + + // A value of 0 means no max line length, and should not wrap. + //...---------1---------2---------3---------4---------5---------6---------7---------8---------9--------10--------11--------12--------13--------14--------15--------16--------17--------18--------19--------20--------21--------22--------23--------24--------25--------26--------27--------28--------29 + //...12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + bth('
    Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all.
    ', + /* expected */ + '
    Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all.
    '); + + opts.wrap_line_length = "0"; + //...---------1---------2---------3---------4---------5---------6---------7 + //...1234567890123456789012345678901234567890123456789012345678901234567890 + bth('
    Some text that should not wrap at all.
    ', + /* expected */ + '
    Some text that should not wrap at all.
    '); + + // A value of "0" means no max line length, and should not wrap + //...---------1---------2---------3---------4---------5---------6---------7---------8---------9--------10--------11--------12--------13--------14--------15--------16--------17--------18--------19--------20--------21--------22--------23--------24--------25--------26--------27--------28--------29 + //...12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + bth('
    Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all.
    ', + /* expected */ + '
    Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all.
    '); + + //BUGBUG: This should wrap before 40 not after. + opts.wrap_line_length = 40; + //...---------1---------2---------3---------4---------5---------6---------7 + //...1234567890123456789012345678901234567890123456789012345678901234567890 + bth('
    Some test text that should wrap_inside_this section here.
    ', + /* expected */ + '
    Some test text that should wrap_inside_this\n' + + ' section here.
    '); + + opts.wrap_line_length = "40"; + //...---------1---------2---------3---------4---------5---------6---------7 + //...1234567890123456789012345678901234567890123456789012345678901234567890 + bth('
    Some test text that should wrap_inside_this section here.
    ', + /* expected */ + '
    Some test text that should wrap_inside_this\n' + + ' section here.
    '); + + opts.indent_size = 1; + opts.indent_char = '\t'; + opts.preserve_newlines = false; + bth('
    \n\tfoo\n
    ', '
    foo
    '); + + opts.preserve_newlines = true; + bth('
    \n\tfoo\n
    '); + + + + // test preserve_newlines and max_preserve_newlines + opts.preserve_newlines = false; + bth('
    Should not
    \n\n\n' + + '
    preserve newlines
    ', + '
    Should not
    \n' + + '
    preserve newlines
    '); + + opts.preserve_newlines = true; + opts.max_preserve_newlines = 0; + bth('
    Should
    \n\n\n' + + '
    preserve zero newlines
    ', + '
    Should
    \n' + + '
    preserve zero newlines
    '); + + opts.max_preserve_newlines = 1; + bth('
    Should
    \n\n\n' + + '
    preserve one newline
    ', + '
    Should
    \n\n' + + '
    preserve one newline
    '); + + opts.max_preserve_newlines = null; + bth('
    Should
    \n\n\n' + + '
    preserve one newline
    ', + '
    Should
    \n\n\n' + + '
    preserve one newline
    '); + } + + beautifier_tests(); + beautifier_unconverted_tests(); +} + +if (typeof exports !== "undefined") { + exports.run_html_tests = run_html_tests; +} diff --git a/node_modules/js-beautify/test/data/html/tests.js b/node_modules/js-beautify/test/data/html/tests.js new file mode 100644 index 0000000..9597ecb --- /dev/null +++ b/node_modules/js-beautify/test/data/html/tests.js @@ -0,0 +1,1089 @@ +/* + The MIT License (MIT) + + Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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. +*/ + +exports.test_data = { + default_options: [ + { name: "indent_size", value: "4" }, + { name: "indent_char", value: "' '" }, + { name: "indent_with_tabs", value: "false" }, + { name: "preserve_newlines", value: "true" }, + { name: "jslint_happy", value: "false" }, + { name: "keep_array_indentation", value: "false" }, + { name: "brace_style", value: "'collapse'" }, + { name: "extra_liners", value: "['html', 'head', '/html']" } + ], + groups: [{ + name: "Handle inline and block elements differently", + description: "", + matrix: [{}], + tests: [{ + fragment: true, + input: '

    Block

    ', + output: [ + '', + '

    Block

    ', + '' + ] + }, { + fragment: true, + unchanged: 'Inline' + }] + }, { + name: "End With Newline", + description: "", + matrix: [{ + options: [ + { name: "end_with_newline", value: "true" } + ], + eof: '\n' + }, { + options: [ + { name: "end_with_newline", value: "false" } + ], + eof: '' + } + + ], + tests: [ + { fragment: true, input: '', output: '{{eof}}' }, + { fragment: true, input: '
    ', output: '
    {{eof}}' }, + // { fragment: true, input: ' \n\n
    \n\n\n\n', output: '
    {{eof}}' }, + { fragment: true, input: '\n', output: '{{eof}}' } + ], + }, { + name: "Custom Extra Liners (empty)", + description: "", + matrix: [{ + options: [ + { name: "extra_liners", value: "[]" } + ] + }, + + ], + tests: [{ + fragment: true, + input: '

    x

    ', + output: '\n\n \n\n\n
    \n

    x

    \n
    \n\n' + }], + }, { + name: "Custom Extra Liners (default)", + description: "", + matrix: [{ + options: [ + { name: "extra_liners", value: "null" } + ] + }, + + ], + tests: [{ + fragment: true, + input: '', + output: '\n\n\n\n\n\n' + }], + }, { + name: "Custom Extra Liners (p, string)", + description: "", + matrix: [{ + options: [ + { name: "extra_liners", value: "'p,/p'" } + ] + }, + + ], + tests: [{ + fragment: true, + input: '

    x

    ', + output: '\n\n \n\n\n
    \n\n

    x\n\n

    \n
    \n\n' + }], + }, { + name: "Custom Extra Liners (p)", + description: "", + matrix: [{ + options: [ + { name: "extra_liners", value: "['p', '/p']" } + ] + }, + + ], + tests: [{ + fragment: true, + input: '

    x

    ', + output: '\n\n \n\n\n
    \n\n

    x\n\n

    \n
    \n\n' + }], + }, { + name: "Tests for script and style types (issue 453, 821)", + description: "Only format recognized script types", + tests: [{ + input: '', + output: [ + '' + ] + }, { + input: '', + output: [ + '' + ] + }, { + input: '', + output: [ + '' + ] + }, { + input: '', + output: [ + '' + ] + }, { + input: '', + output: [ + '' + ] + }, { + input: '', + output: [ + '' + ] + }, { + input: '', + output: [ + '' + ] + }, { + input: '', + output: [ + '' + ] + }, { + input: '', + output: [ + '' + ] + }, { + input: '', + output: [ + '' + ] + }, { + input: '', + output: [ + '' + ] + }, { + input: '', + output: [ + '' + ] + }, { + input: '', + output: [ + '' + ] + }, { + input: '', + output: [ + '' + ] + }, { + input: '', + output: [ + '' + ] + }, { + input: '', + output: [ + '' + ] + }, { + input: '', + output: [ + '' + ] + }, { + input: '', + output: [ + '' + ] + }, { + input: '', + output: [ + '' + ] + }, + + ], + }, { + name: "Attribute Wrap alignment with spaces", + description: "Ensure attributes are internally aligned with spaces when the indent_character is set to tab", + matrix: [{ + options: [ + { name: "wrap_attributes", value: "'force-aligned'" }, + { name: "indent_with_tabs", value: "true" } + ] + }], + tests: [{ + fragment: true, + input: '
    test
    ', + output: '
    \n\t
    \n\t\t
    test
    \n\t
    \n
    ' + }] + }, { + name: "Attribute Wrap de-indent", + description: "Tags de-indent when attributes are wrapped", + matrix: [{ + options: [ + { name: "wrap_attributes", value: "'force-aligned'" }, + { name: "indent_with_tabs", value: "false" } + ] + }], + tests: [{ + fragement: true, + input: '
    test
    ', + output: '
    \n
    test
    \n
    ' + }] + }, { + name: "Attribute Wrap", + description: "Wraps attributes inside of html tags", + matrix: [{ + options: [ + { name: "wrap_attributes", value: "'force'" } + ], + indent_attr: '\n ', + indent_attr_first: ' ', + indent_end: '', + indent_end_selfclosing: ' ', + indent_over80: '\n ' + }, { + options: [ + { name: "wrap_attributes", value: "'force'" }, + { name: "wrap_line_length", value: "80" } + ], + indent_attr: '\n ', + indent_attr_first: ' ', + indent_end: '', + indent_end_selfclosing: ' ', + indent_over80: '\n ' + }, { + options: [ + { name: "wrap_attributes", value: "'force'" }, + { name: "wrap_attributes_indent_size", value: "8" } + ], + indent_attr: '\n ', + indent_attr_first: ' ', + indent_end: '', + indent_end_selfclosing: ' ', + indent_over80: '\n ' + }, { + options: [ + { name: "wrap_attributes", value: "'auto'" }, + { name: "wrap_line_length", value: "80" }, + { name: "wrap_attributes_indent_size", value: "0" } + ], + indent_attr: ' ', + indent_attr_first: ' ', + indent_end: '', + indent_end_selfclosing: ' ', + indent_over80: '\n' + }, { + options: [ + { name: "wrap_attributes", value: "'auto'" }, + { name: "wrap_line_length", value: "80" }, + { name: "wrap_attributes_indent_size", value: "4" } + ], + indent_attr: ' ', + indent_attr_first: ' ', + indent_end: '', + indent_end_selfclosing: ' ', + indent_over80: '\n ' + }, { + options: [ + { name: "wrap_attributes", value: "'auto'" }, + { name: "wrap_line_length", value: "0" } + ], + indent_attr: ' ', + indent_attr_first: ' ', + indent_end: '', + indent_end_selfclosing: ' ', + indent_over80: ' ' + }, { + options: [ + { name: "wrap_attributes", value: "'force-aligned'" } + ], + indent_attr: '\n ', + indent_attr_faligned: ' ', + indent_attr_first: ' ', + indent_end: '', + indent_end_selfclosing: ' ', + indent_over80: '\n ' + }, { + options: [ + { name: "wrap_attributes", value: "'force-aligned'" }, + { name: "wrap_line_length", value: "80" } + ], + indent_attr: '\n ', + indent_attr_faligned: ' ', + indent_attr_first: ' ', + indent_end: '', + indent_end_selfclosing: ' ', + indent_over80: '\n ' + }, { + options: [ + { name: "wrap_attributes", value: "'force-aligned'" }, + { name: "wrap_attributes_indent_size", value: "8" } + ], + indent_attr: '\n ', + indent_attr_faligned: ' ', + indent_attr_first: ' ', + indent_end: '', + indent_end_selfclosing: ' ', + indent_over80: '\n ' + }, { + options: [ + { name: "wrap_attributes", value: "'force-expand-multiline'" }, + { name: "wrap_attributes_indent_size", value: "4" } + ], + indent_attr: '\n ', + indent_attr_first: '\n ', + indent_end: '\n', + indent_end_selfclosing: '\n', + indent_over80: '\n ' + }, { + options: [ + { name: "wrap_attributes", value: "'force-expand-multiline'" }, + { name: "wrap_attributes_indent_size", value: "4" }, + { name: "wrap_line_length", value: "80" } + ], + indent_attr: '\n ', + indent_attr_first: '\n ', + indent_end: '\n', + indent_end_selfclosing: '\n', + indent_over80: '\n ' + }, { + options: [ + { name: "wrap_attributes", value: "'force-expand-multiline'" }, + { name: "wrap_attributes_indent_size", value: "8" } + ], + indent_attr: '\n ', + indent_attr_first: '\n ', + indent_end: '\n', + indent_end_selfclosing: '\n', + indent_over80: '\n ' + }], + tests: [{ + fragment: true, + input: '
    This is some text
    ', + output: '
    This is some text
    ' + }, { + fragment: true, + input: '
    This is some text
    ', + output: '
    This is some text
    ' + }, { + fragment: true, + input: '
    This is some text
    ', + output: 'This is some text' + }, { + fragment: true, + input: '
    This is some text
    ', + output: 'This is some text' + }, { + fragment: true, + input: '', + output: '' + }, { + fragment: true, + input: '', + output: '\n' + }, { + fragment: true, + input: '', + output: '' + }] + }, { + name: "Handlebars Indenting Off", + description: "Test handlebar behavior when indenting is off", + template: "^^^ $$$", + options: [ + { name: "indent_handlebars", value: "false" } + ], + tests: [{ + fragment: true, + input_: '{{#if 0}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}', + output: '{{#if 0}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}' + }, { + fragment: true, + input_: '
    \n' + + '{{#each thing}}\n' + + ' {{name}}\n' + + '{{/each}}\n' + + '
    ', + output: '
    \n' + + ' {{#each thing}} {{name}} {{/each}}\n' + + '
    ' + } + + ] + }, { + name: "Handlebars Indenting On", + description: "Test handlebar formatting", + template: "^^^ $$$", + matrix: [{ + options: [ + { name: "indent_handlebars", value: "true" } + ], + content: '{{field}}' + }, { + options: [ + { name: "indent_handlebars", value: "true" } + ], + content: '{{! comment}}' + }, { + options: [ + { name: "indent_handlebars", value: "true" } + ], + content: '{{!-- comment--}}' + }, { + options: [ + { name: "indent_handlebars", value: "true" } + ], + content: '{pre{{field1}} {{field2}} {{field3}}post' + }, { + options: [ + { name: "indent_handlebars", value: "true" } + ], + content: '{{! \n mult-line\ncomment \n with spacing\n}}' + }, { + options: [ + { name: "indent_handlebars", value: "true" } + ], + content: '{{!-- \n mult-line\ncomment \n with spacing\n--}}' + }, { + options: [ + { name: "indent_handlebars", value: "true" } + ], + content: '{{!-- \n mult-line\ncomment \n{{#> component}}\n mult-line\ncomment \n with spacing\n {{/ component}}--}}' + }, { + options: [ + { name: "indent_handlebars", value: "true" }, + { name: "wrap_line_length", value: "80" } + ], + content: 'content' + }], + tests: [ + { fragment: true, unchanged: '{{page-title}}' }, + { fragment: true, unchanged: '{{#if 0}}{{/if}}' }, + { fragment: true, unchanged: '{{#if 0}}^^^&content$$${{/if}}' }, + { fragment: true, unchanged: '{{#if 0}}\n{{/if}}' }, { + fragment: true, + input_: '{{#if words}}{{/if}}', + output: '{{#if words}}{{/if}}' + }, { + fragment: true, + input_: '{{#if words}}^^^&content$$${{/if}}', + output: '{{#if words}}^^^&content$$${{/if}}' + }, { + fragment: true, + input_: '{{#if words}}^^^&content$$${{/if}}', + output: '{{#if words}}^^^&content$$${{/if}}' + }, { + fragment: true, + unchanged: '{{#if 1}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}' + }, { + fragment: true, + input_: '{{#if 1}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}', + output: '{{#if 1}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}' + }, { + fragment: true, + unchanged: '
    \n' + + ' {{#if 1}}\n' + + ' {{/if}}\n' + + '
    ' + }, { + fragment: true, + input_: '
    \n' + + '{{#if 1}}\n' + + '{{/if}}\n' + + '
    ', + output: '
    \n' + + ' {{#if 1}}\n' + + ' {{/if}}\n' + + '
    ' + }, { + fragment: true, + input_: '{{#if}}\n' + + '{{#each}}\n' + + '{{#if}}\n' + + '^^^&content$$$\n' + + '{{/if}}\n' + + '{{#if}}\n' + + '^^^&content$$$\n' + + '{{/if}}\n' + + '{{/each}}\n' + + '{{/if}}', + output: '{{#if}}\n' + + ' {{#each}}\n' + + ' {{#if}}\n' + + ' ^^^&content$$$\n' + + ' {{/if}}\n' + + ' {{#if}}\n' + + ' ^^^&content$$$\n' + + ' {{/if}}\n' + + ' {{/each}}\n' + + '{{/if}}' + }, { + fragment: true, + unchanged: '{{#if 1}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}' + }, + + // Test {{else}} aligned with {{#if}} and {{/if}} + { + fragment: true, + input_: '{{#if 1}}\n' + + ' ^^^&content$$$\n' + + ' {{else}}\n' + + ' ^^^&content$$$\n' + + '{{/if}}', + output: '{{#if 1}}\n' + + ' ^^^&content$$$\n' + + '{{else}}\n' + + ' ^^^&content$$$\n' + + '{{/if}}' + }, { + fragment: true, + input_: '{{#if 1}}\n' + + ' {{else}}\n' + + ' {{/if}}', + output: '{{#if 1}}\n' + + '{{else}}\n' + + '{{/if}}' + }, { + fragment: true, + input_: '{{#if thing}}\n' + + '{{#if otherthing}}\n' + + ' ^^^&content$$$\n' + + ' {{else}}\n' + + '^^^&content$$$\n' + + ' {{/if}}\n' + + ' {{else}}\n' + + '^^^&content$$$\n' + + '{{/if}}', + output: '{{#if thing}}\n' + + ' {{#if otherthing}}\n' + + ' ^^^&content$$$\n' + + ' {{else}}\n' + + ' ^^^&content$$$\n' + + ' {{/if}}\n' + + '{{else}}\n' + + ' ^^^&content$$$\n' + + '{{/if}}' + }, + // Test {{}} inside of <> tags, which should be separated by spaces + // for readability, unless they are inside a string. + { + fragment: true, + input_: '', + output: '
    ' + }, { + fragment: true, + input_: '^^^&content$$$', + output: '
    ^^^&content$$$
    ' + }, { + fragment: true, + input_: '^^^&content$$$', + output: '
    ^^^&content$$$
    ' + }, { + fragment: true, + input_: '^^^&content$$$', + output: '^^^&content$$$' + }, { + fragment: true, + unchanged: '
    ^^^&content$$$
    ' + }, { + fragment: true, + unchanged: '
    ^^^&content$$$
    ' + }, + + // Quotes found inside of Handlebars expressions inside of quoted + // strings themselves should not be considered string delimiters. + { + fragment: true, + unchanged: '
    ' + }, { + fragment: true, + unchanged: '
    ' + }, { + fragment: true, + unchanged: '
    ' + }, { + fragment: true, + unchanged: '
    ' + }, { + fragment: true, + unchanged: '{{condition < 0 ? "result1" : "result2"}}' + }, { + fragment: true, + unchanged: '{{condition1 && condition2 && condition3 && condition4 < 0 ? "resForTrue" : "resForFalse"}}' + } + ], + }, { + name: "Handlebars Else tag indenting", + description: "Handlebar Else tags should be newlined after formatted tags", + template: "^^^ $$$", + options: [ + { name: "indent_handlebars", value: "true" } + ], + tests: [{ + fragment: true, + input_: '{{#if test}}
    {{else}}
    {{/if}}', + output: '{{#if test}}\n' + + '
    \n' + + '{{else}}\n' + + '
    \n' + + '{{/if}}' + }, { + fragment: true, + unchanged: '{{#if test}}{{else}}{{/if}}' + }] + }, { + name: "Unclosed html elements", + description: "Unclosed elements should not indent", + options: [], + tests: [ + { fragment: true, unchanged: '\n' }, + { fragment: true, unchanged: '
    \n
    ' }, + { fragment: true, unchanged: '\n' }, + { fragment: true, unchanged: '\n' }, + { fragment: true, unchanged: '\n' }, + { fragment: true, unchanged: '\n \n \n' } + ] + }, { + name: "Unformatted tags", + description: "Unformatted tag behavior", + options: [], + tests: [{ + fragment: true, + input: '
      \n
    1. b
      c
    2. \n
    ', + output: [ + '
      ', + '
    1. b', + '
      c
      ', + '
    2. ', + '
    ' + ] + }, + { fragment: true, unchanged: '
      \n
    1. bc
    2. \n
    ' }, + { fragment: true, unchanged: '' }, + { fragment: true, unchanged: '
    ' }, + { fragment: true, unchanged: '
    ' }, + ] + }, { + name: "File starting with comment", + description: "Unformatted tag behavior", + options: [], + tests: [{ + fragment: true, + unchanged: [ + '', + '', + '', + '', + ' a span', + '', + '', + '' + ] + }, ] + }, { + name: "Php formatting", + description: "Php () treated as comments.", + options: [], + tests: [{ + fragment: true, + input: '

    ', + output: '

    \n \n

    ', + }, { + fragment: true, + unchanged: [ + '");', + '}', + '?>' + ] + }, { + fragment: true, + unchanged: [ + '', + '', + '', + '', + '', + '', + '', + '', + '', + '' + ] + }] + }, { + name: "Support simple language specific option inheritance/overriding", + description: "Support simple language specific option inheritance/overriding", + matrix: [{ + options: [ + { name: "js", value: "{ 'indent_size': 3 }" }, + { name: "css", value: "{ 'indent_size': 5 }" } + ], + h: ' ', + c: ' ', + j: ' ' + }, + { + options: [ + { name: "html", value: "{ 'js': { 'indent_size': 3 }, 'css': { 'indent_size': 5 } }" } + ], + h: ' ', + c: ' ', + j: ' ' + }, + { + options: [ + { name: "indent_size", value: "9" }, + { name: "html", value: "{ 'js': { 'indent_size': 3 }, 'css': { 'indent_size': 5 }, 'indent_size': 2}" }, + { name: "js", value: "{ 'indent_size': 5 }" }, + { name: "css", value: "{ 'indent_size': 3 }" } + ], + h: ' ', + c: ' ', + j: ' ' + } + ], + tests: [{ + fragment: true, + unchanged: [ + '', + '{{h}}', + '{{h}}', + '', + ] + }, ] + }, { + name: "underscore.js formatting", + description: "underscore.js templates (<% ... %>) treated as comments.", + options: [], + tests: [{ + fragment: true, + unchanged: [ + '
    ', + ' ', + '
    ' + ] + }, ] + }, { + name: "Indent with tabs", + description: "Use one tab instead of several spaces for indentation", + template: "^^^ $$$", + options: [ + { name: "indent_with_tabs", value: "true" } + ], + tests: [{ + fragment: true, + input_: '
    \n' + + '
    \n' + + '
    \n' + + '
    ', + output: '
    \n' + + '\t
    \n' + + '\t
    \n' + + '
    ' + }] + }, { + name: "Indent without tabs", + description: "Use several spaces for indentation", + template: "^^^ $$$", + options: [ + { name: "indent_with_tabs", value: "false" } + ], + tests: [{ + fragment: true, + input_: '
    \n' + + '
    \n' + + '
    \n' + + '
    ', + output: '
    \n' + + '
    \n' + + '
    \n' + + '
    ' + }] + }, { + name: "Indent body inner html by default", + description: "", + tests: [{ + fragment: true, + input: '\n\n
    \n\n\n', + output: '\n\n
    \n\n\n' + }] + }, { + name: "indent_body_inner_html set to false prevents indent of body inner html", + description: "", + options: [ + { name: 'indent_body_inner_html', value: "false" } + ], + tests: [{ + fragment: true, + unchanged: '\n\n
    \n\n\n' + }] + }, { + name: "Indent head inner html by default", + description: "", + tests: [{ + fragment: true, + input: '\n\n\n\n\n\n', + output: '\n\n\n \n\n\n' + }] + }, { + name: "indent_head_inner_html set to false prevents indent of head inner html", + description: "", + options: [ + { name: 'indent_head_inner_html', value: "false" } + ], + tests: [{ + fragment: true, + unchanged: '\n\n\n\n\n\n' + }] + }, { + name: "content_unformatted to prevent formatting content", + description: "", + options: [ + { name: 'content_unformatted', value: "['script', 'style', 'p', 'span', 'br']" } + ], + tests: [{ + fragment: true, + input: '

    A

    ', + output: [ + '', + '', + '

    A

    ', + ' ', + ' ', + '', + '', + '' + ] + }, { + fragment: true, + input: '

    Beautify me

    But not me

    ', + output: [ + '
    ', + '

    Beautify me

    ', + '
    ', + '

    But not me

    ' + ] + }, { + fragment: true, + input: '
    Beautify me

    But not me

    ', + output: [ + '
    ', + '

    Beautify me

    ', + '
    ', + '

    But not me

    ' + ] + }, { + fragment: true, + unchanged: '
    blabla
    something here
    ' + }, { + fragment: true, + unchanged: '

    ' + }, { + fragment: true, + input: '
    var a=1;\nvar b=a;
    ', + output: [ + '
    ', + '
    var a=1; var b=a;
    ', + '
    ' + ] + }, { + fragment: true, + input: '
    \nvar a=1;\nvar b=a;\n
    ', + output: [ + '
    ', + '
    ',
    +                '        var a=1; var b=a;',
    +                '    
    ', + '
    ' + ] + }] + }, { + name: "default content_unformatted", + description: "", + options: [], + tests: [{ + fragment: true, + input: '

    A

    ', + output: [ + '', + '', + '

    A

    ', + ' ', + ' ', + '', + '', + '' + ] + }, { + fragment: true, + input: '

    Beautify me

    But not me

    ', + output: [ + '
    ', + '

    Beautify me

    ', + '
    ', + '

    ', + '

    But not me

    ', + '

    ', + ] + }, { + fragment: true, + input: '
    Beautify me

    But not me

    ', + output: [ + '
    ', + '

    Beautify me

    ', + '
    ', + '

    ', + '

    But not me

    ', + '

    ' + ] + }, { + fragment: true, + unchanged: '
    blabla
    something here
    ' + }, { + fragment: true, + unchanged: '

    ' + }, { + fragment: true, + input: '
    var a=1;\nvar b=a;
    ', + output: [ + '
    ', + '
    var a=1;',
    +                'var b=a;
    ', + '
    ' + ] + }, { + fragment: true, + input: '
    \nvar a=1;\nvar b=a;\n
    ', + output: [ + '
    ', + '
    ',
    +                'var a=1;',
    +                'var b=a;',
    +                '
    ', + '
    ' + ] + }] + }, { + name: "New Test Suite" + }], +}; \ No newline at end of file diff --git a/node_modules/js-beautify/test/data/javascript/inputlib.js b/node_modules/js-beautify/test/data/javascript/inputlib.js new file mode 100644 index 0000000..1017236 --- /dev/null +++ b/node_modules/js-beautify/test/data/javascript/inputlib.js @@ -0,0 +1,84 @@ +//--------// +// Inputs // +//--------// + +var operator_position = { + sanity: [ + 'var res = a + b - c / d * e % f;', + 'var res = g & h | i ^ j;', + 'var res = (k && l || m) ? n : o;', + 'var res = p >> q << r >>> s;', + 'var res = t === u !== v != w == x >= y <= z > aa < ab;', + 'ac + -ad' + ], + comprehensive: [ + 'var res = a + b', + '- c /', + 'd * e', + '%', + 'f;', + ' var res = g & h', + '| i ^', + 'j;', + 'var res = (k &&', + 'l', + '|| m) ?', + 'n', + ': o', + ';', + 'var res = p', + '>> q <<', + 'r', + '>>> s;', + 'var res', + ' = t', + '', + ' === u !== v', + ' !=', + 'w', + '== x >=', + 'y <= z > aa <', + 'ab;', + 'ac +', + '-ad' + ], + colon_special_case: [ + 'var a = {', + ' b', + ': bval,', + ' c:', + 'cval', + ' ,d: dval', + '};', + 'var e = f ? g', + ': h;', + 'var i = j ? k :', + 'l;' + ], + catch_all: [ + 'var d = 1;', + 'if (a === b', + ' && c) {', + ' d = (c * everything', + ' / something_else) %', + ' b;', + ' e', + ' += d;', + '', + '} else if (!(complex && simple) ||', + ' (emotion && emotion.name === "happy")) {', + ' cryTearsOfJoy(many ||', + ' anOcean', + ' || aRiver);', + '}' + ] +}; + + +//---------// +// Exports // +//---------// + +module.exports = { + operator_position: operator_position +}; \ No newline at end of file diff --git a/node_modules/js-beautify/test/data/javascript/node.mustache b/node_modules/js-beautify/test/data/javascript/node.mustache new file mode 100644 index 0000000..db6f120 --- /dev/null +++ b/node_modules/js-beautify/test/data/javascript/node.mustache @@ -0,0 +1,1114 @@ +/* +{{&header_text}} + + The MIT License (MIT) + + Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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. +*/ +/*jshint unused:false */ + +function run_javascript_tests(test_obj, Urlencoded, js_beautify, html_beautify, css_beautify) +{ + + var default_opts = { + indent_size: 4, + indent_char: ' ', + preserve_newlines: true, + jslint_happy: false, + keep_array_indentation: false, + brace_style: 'collapse', + space_before_conditional: true, + break_chained_methods: false, + selector_separator: '\n', + end_with_newline: false + }; + var opts; + +{{#default_options}} default_opts.{{name}} = {{&value}}; +{{/default_options}} + + function reset_options() + { + opts = JSON.parse(JSON.stringify(default_opts)); + } + + function test_js_beautifier(input) + { + return js_beautify(input, opts); + } + + var sanitytest; + + // test the input on beautifier with the current flag settings + // does not check the indentation / surroundings as bt() does + function test_fragment(input, expected) + { + expected = expected || expected === '' ? expected : input; + sanitytest.expect(input, expected); + // if the expected is different from input, run it again + // expected output should be unchanged when run twice. + if (expected !== input) { + sanitytest.expect(expected, expected); + } + + // Everywhere we do newlines, they should be replaced with opts.eol + opts.eol = '\r\\n'; + expected = expected.replace(/[\n]/g, '\r\n'); + sanitytest.expect(input, expected); + if (input.indexOf('\n') !== -1) { + input = input.replace(/[\n]/g, '\r\n'); + sanitytest.expect(input, expected); + // Ensure support for auto eol detection + opts.eol = 'auto'; + sanitytest.expect(input, expected); + } + opts.eol = '\n'; + } + + + + // test the input on beautifier with the current flag settings + // test both the input as well as { input } wrapping + function bt(input, expectation) + { + var wrapped_input, wrapped_expectation; + + expectation = expectation || expectation === '' ? expectation : input; + sanitytest.test_function(test_js_beautifier, 'js_beautify'); + test_fragment(input, expectation); + + // If we set raw, input should be unchanged + opts.test_output_raw = true; + if (!opts.end_with_newline) { + test_fragment(input, input); + } + opts.test_output_raw = false; + + // test also the returned indentation + // e.g if input = "asdf();" + // then test that this remains properly formatted as well: + // { + // asdf(); + // indent; + // } + + var current_indent_size = opts.js ? opts.js.indent_size : null; + current_indent_size = current_indent_size ? current_indent_size : opts.indent_size; + if (current_indent_size === 4 && input) { + wrapped_input = '{\n' + input.replace(/^(.+)$/mg, ' $1') + '\n foo = bar;\n}'; + wrapped_expectation = '{\n' + expectation.replace(/^(.+)$/mg, ' $1') + '\n foo = bar;\n}'; + test_fragment(wrapped_input, wrapped_expectation); + + // If we set raw, input should be unchanged + opts.test_output_raw = true; + if (!opts.end_with_newline) { + test_fragment(wrapped_input, wrapped_input); + } + opts.test_output_raw = false; + } + + } + + // run all tests for the given brace style ("collapse", "expand", "end-expand", or "none"). + // uses various whitespace combinations before and after opening and closing braces, + // respectively, for most of the tests' inputs. + function beautify_brace_tests(brace_style) { + + var indent_on_wrap_str = ' '; // could use Array(opts.indent_size + 1).join(' '); if we wanted to replace _all_ of the hardcoded 4-space in the test and expectation strings + + function permute_brace_tests(expect_open_white, expect_close_white) { + + // run the tests that need permutation against a specific combination of + // pre-opening-brace and pre-closing-brace whitespace + function run_brace_permutation(test_open_white, test_close_white) { + var to = test_open_white, + tc = test_close_white, + eo = expect_open_white ? expect_open_white : to === '' ? ' ' : to, + ec = expect_close_white ? expect_close_white : tc === '' ? ' ' : tc, + i = eo === '\n' ? indent_on_wrap_str: ''; + + bt( '//case 1\nif (a == 1)' + to + '{}\n//case 2\nelse if (a == 2)' + to + '{}', + '//case 1\nif (a == 1)' + eo + '{}\n//case 2\nelse if (a == 2)' + eo + '{}'); + bt( 'if(1)' + to + '{2}' + tc + 'else' + to + '{3}', + 'if (1)' + eo + '{\n 2\n}' + ec + 'else' + eo + '{\n 3\n}'); + bt( 'try' + to + '{a();}' + tc + + 'catch(b)' + to + '{c();}' + tc + + 'catch(d)' + to + '{}' + tc + + 'finally' + to + '{e();}', + // expected + 'try' + eo + '{\n a();\n}' + ec + + 'catch (b)' + eo + '{\n c();\n}' + ec + + 'catch (d)' + eo + '{}' + ec + + 'finally' + eo + '{\n e();\n}'); + bt( 'if(a)' + to + '{b();}' + tc + 'else if(c) foo();', + 'if (a)' + eo + '{\n b();\n}' + ec + 'else if (c) foo();'); + // if/else statement with empty body + bt( 'if (a)' + to + '{\n// comment\n}' + tc + 'else' + to + '{\n// comment\n}', + 'if (a)' + eo + '{\n // comment\n}' + ec + 'else' + eo + '{\n // comment\n}'); + bt( 'if (x)' + to + '{y}' + tc + 'else' + to + '{ if (x)' + to + '{y}}', + 'if (x)' + eo + '{\n y\n}' + ec + 'else' + eo + '{\n if (x)' + eo + i + '{\n y\n }\n}'); + bt( 'if (a)' + to + '{\nb;\n}' + tc + 'else' + to + '{\nc;\n}', + 'if (a)' + eo + '{\n b;\n}' + ec + 'else' + eo + '{\n c;\n}'); + test_fragment(' /*\n* xx\n*/\n// xx\nif (foo)' + to + '{\n bar();\n}', + ' /*\n * xx\n */\n // xx\n if (foo)' + eo + i + '{\n bar();\n }'); + bt( 'if (foo)' + to + '{}' + tc + 'else /regex/.test();', + 'if (foo)' + eo + '{}' + ec + 'else /regex/.test();'); + test_fragment('if (foo)' + to + '{', 'if (foo)' + eo + '{'); + test_fragment('foo' + to + '{', 'foo' + eo + '{'); + test_fragment('return;' + to + '{', 'return;' + eo + '{'); + bt( 'function x()' + to + '{\n foo();\n}zzz', 'function x()' + eo +'{\n foo();\n}\nzzz'); + bt( 'var a = new function a()' + to + '{};', 'var a = new function a()' + eo + '{};'); + bt( 'var a = new function a()' + to + ' {},\n b = new function b()' + to + ' {};', + 'var a = new function a()' + eo + i + '{},\n b = new function b()' + eo + i + '{};'); + bt("foo(" + to + "{\n 'a': 1\n},\n10);", + "foo(" + (eo === ' ' ? '' : eo) + i + "{\n 'a': 1\n },\n 10);"); // "foo( {..." is a weird case + bt('(["foo","bar"]).each(function(i)' + to + '{return i;});', + '(["foo", "bar"]).each(function(i)' + eo + '{\n return i;\n});'); + bt('(function(i)' + to + '{return i;})();', '(function(i)' + eo + '{\n return i;\n})();'); + + bt( "test( /*Argument 1*/" + to + "{\n" + + " 'Value1': '1'\n" + + "}, /*Argument 2\n" + + " */ {\n" + + " 'Value2': '2'\n" + + "});", + // expected + "test( /*Argument 1*/" + eo + i + "{\n" + + " 'Value1': '1'\n" + + " },\n" + + " /*Argument 2\n" + + " */\n" + + " {\n" + + " 'Value2': '2'\n" + + " });"); + + bt( "test( /*Argument 1*/" + to + "{\n" + + " 'Value1': '1'\n" + + "}, /*Argument 2\n" + + " */\n" + + "{\n" + + " 'Value2': '2'\n" + + "});", + // expected + "test( /*Argument 1*/" + eo + i + "{\n" + + " 'Value1': '1'\n" + + " },\n" + + " /*Argument 2\n" + + " */\n" + + " {\n" + + " 'Value2': '2'\n" + + " });"); + } + + run_brace_permutation('\n', '\n'); + run_brace_permutation('\n', ' '); + run_brace_permutation(' ', ' '); + run_brace_permutation(' ', '\n'); + run_brace_permutation('',''); + + // brace tests that don't make sense to permutate + test_fragment('return {'); // return needs the brace. + test_fragment('return /* inline */ {'); + bt('throw {}'); + bt('throw {\n foo;\n}'); + bt( 'var foo = {}'); + test_fragment('a: do {} while (); xxx', 'a: do {} while ();\nxxx'); + bt( '{a: do {} while (); xxx}', '{\n a: do {} while ();xxx\n}'); + bt( 'var a = new function() {};'); + bt( 'var a = new function()\n{};', 'var a = new function() {};'); + bt( "test(\n" + + "/*Argument 1*/ {\n" + + " 'Value1': '1'\n" + + "},\n" + + "/*Argument 2\n" + + " */ {\n" + + " 'Value2': '2'\n" + + "});", + // expected + "test(\n" + + " /*Argument 1*/\n" + + " {\n" + + " 'Value1': '1'\n" + + " },\n" + + " /*Argument 2\n" + + " */\n" + + " {\n" + + " 'Value2': '2'\n" + + " });"); + } + + reset_options(); + opts.brace_style = brace_style; + + switch(opts.brace_style) { + case 'collapse': + permute_brace_tests(' ', ' '); + break; + case 'expand': + permute_brace_tests('\n', '\n'); + break; + case 'end-expand': + permute_brace_tests(' ', '\n'); + break; + case 'none': + permute_brace_tests(); + break; + } + } + + function unicode_char(value) { + return String.fromCharCode(value); + } + + function beautifier_tests() + { + sanitytest = test_obj; + +{{#groups}}{{#set_mustache_tags}}.{{/set_mustache_tags}} + //============================================================ + {{^matrix}} + // {{&name}} + reset_options(); + {{#options}} + opts.{{name}} = {{&value}}; + {{/options}} + {{#tests}} + {{#test_line}}.{{/test_line}}; + {{/tests}} + + {{/matrix}} + {{#matrix}} + // {{&name}} - ({{#matrix_context_string}}.{{/matrix_context_string}}) + reset_options(); + {{#options}} + opts.{{name}} = {{&value}}; + {{/options}} + {{#tests}} + {{#test_line}}.{{/test_line}}; + {{/tests}} + + {{/matrix}} +{{#unset_mustache_tags}}.{{/unset_mustache_tags}}{{/groups}} + } + + function beautifier_unconverted_tests() + { + sanitytest = test_obj; + + reset_options(); + //============================================================ + opts.indent_size = 1; + opts.indent_char = ' '; + bt('{ one_char() }', "{\n one_char()\n}"); + + bt('var a,b=1,c=2', 'var a, b = 1,\n c = 2'); + + opts.indent_size = 4; + opts.indent_char = ' '; + bt('{ one_char() }', "{\n one_char()\n}"); + + opts.indent_size = 1; + opts.indent_char = "\t"; + bt('{ one_char() }', "{\n\tone_char()\n}"); + bt('x = a ? b : c; x;', 'x = a ? b : c;\nx;'); + + //set to something else than it should change to, but with tabs on, should override + opts.indent_size = 5; + opts.indent_char = ' '; + opts.indent_with_tabs = true; + + bt('{ one_char() }', "{\n\tone_char()\n}"); + bt('x = a ? b : c; x;', 'x = a ? b : c;\nx;'); + + opts.indent_size = 4; + opts.indent_char = ' '; + opts.indent_with_tabs = false; + + reset_options(); + //============================================================ + opts.preserve_newlines = false; + + bt('var\na=dont_preserve_newlines;', 'var a = dont_preserve_newlines;'); + + // make sure the blank line between function definitions stays + // even when preserve_newlines = false + bt('function foo() {\n return 1;\n}\n\nfunction foo() {\n return 1;\n}'); + bt('function foo() {\n return 1;\n}\nfunction foo() {\n return 1;\n}', + 'function foo() {\n return 1;\n}\n\nfunction foo() {\n return 1;\n}' + ); + bt('function foo() {\n return 1;\n}\n\n\nfunction foo() {\n return 1;\n}', + 'function foo() {\n return 1;\n}\n\nfunction foo() {\n return 1;\n}' + ); + + opts.preserve_newlines = true; + bt('var\na=do_preserve_newlines;', 'var\n a = do_preserve_newlines;'); + bt('if (foo) // comment\n{\n bar();\n}'); + + + reset_options(); + //============================================================ + opts.keep_array_indentation = false; + bt("a = ['a', 'b', 'c',\n 'd', 'e', 'f']", + "a = ['a', 'b', 'c',\n 'd', 'e', 'f'\n]"); + bt("a = ['a', 'b', 'c',\n 'd', 'e', 'f',\n 'g', 'h', 'i']", + "a = ['a', 'b', 'c',\n 'd', 'e', 'f',\n 'g', 'h', 'i'\n]"); + bt("a = ['a', 'b', 'c',\n 'd', 'e', 'f',\n 'g', 'h', 'i']", + "a = ['a', 'b', 'c',\n 'd', 'e', 'f',\n 'g', 'h', 'i'\n]"); + bt('var x = [{}\n]', 'var x = [{}]'); + bt('var x = [{foo:bar}\n]', 'var x = [{\n foo: bar\n}]'); + bt("a = ['something',\n 'completely',\n 'different'];\nif (x);", + "a = ['something',\n 'completely',\n 'different'\n];\nif (x);"); + bt("a = ['a','b','c']", "a = ['a', 'b', 'c']"); + + bt("a = ['a', 'b','c']", "a = ['a', 'b', 'c']"); + bt("x = [{'a':0}]", + "x = [{\n 'a': 0\n}]"); + bt('{a([[a1]], {b;});}', + '{\n a([\n [a1]\n ], {\n b;\n });\n}'); + bt("a();\n [\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ].toString();", + "a();\n[\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n].toString();"); + bt("a();\na = [\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ].toString();", + "a();\na = [\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n].toString();"); + bt("function() {\n Foo([\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ]);\n}", + "function() {\n Foo([\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ]);\n}"); + bt('function foo() {\n return [\n "one",\n "two"\n ];\n}'); + // 4 spaces per indent input, processed with 4-spaces per indent + bt( "function foo() {\n" + + " return [\n" + + " {\n" + + " one: 'x',\n" + + " two: [\n" + + " {\n" + + " id: 'a',\n" + + " name: 'apple'\n" + + " }, {\n" + + " id: 'b',\n" + + " name: 'banana'\n" + + " }\n" + + " ]\n" + + " }\n" + + " ];\n" + + "}", + "function foo() {\n" + + " return [{\n" + + " one: 'x',\n" + + " two: [{\n" + + " id: 'a',\n" + + " name: 'apple'\n" + + " }, {\n" + + " id: 'b',\n" + + " name: 'banana'\n" + + " }]\n" + + " }];\n" + + "}"); + // 3 spaces per indent input, processed with 4-spaces per indent + bt( "function foo() {\n" + + " return [\n" + + " {\n" + + " one: 'x',\n" + + " two: [\n" + + " {\n" + + " id: 'a',\n" + + " name: 'apple'\n" + + " }, {\n" + + " id: 'b',\n" + + " name: 'banana'\n" + + " }\n" + + " ]\n" + + " }\n" + + " ];\n" + + "}", + "function foo() {\n" + + " return [{\n" + + " one: 'x',\n" + + " two: [{\n" + + " id: 'a',\n" + + " name: 'apple'\n" + + " }, {\n" + + " id: 'b',\n" + + " name: 'banana'\n" + + " }]\n" + + " }];\n" + + "}"); + + opts.keep_array_indentation = true; + bt("a = ['a', 'b', 'c',\n 'd', 'e', 'f']"); + bt("a = ['a', 'b', 'c',\n 'd', 'e', 'f',\n 'g', 'h', 'i']"); + bt("a = ['a', 'b', 'c',\n 'd', 'e', 'f',\n 'g', 'h', 'i']"); + bt('var x = [{}\n]', 'var x = [{}\n]'); + bt('var x = [{foo:bar}\n]', 'var x = [{\n foo: bar\n }\n]'); + bt("a = ['something',\n 'completely',\n 'different'];\nif (x);"); + bt("a = ['a','b','c']", "a = ['a', 'b', 'c']"); + bt("a = ['a', 'b','c']", "a = ['a', 'b', 'c']"); + bt("x = [{'a':0}]", + "x = [{\n 'a': 0\n}]"); + bt('{a([[a1]], {b;});}', + '{\n a([[a1]], {\n b;\n });\n}'); + bt("a();\n [\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ].toString();", + "a();\n [\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ].toString();"); + bt("a();\na = [\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ].toString();", + "a();\na = [\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ].toString();"); + bt("function() {\n Foo([\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ]);\n}", + "function() {\n Foo([\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ]);\n}"); + bt('function foo() {\n return [\n "one",\n "two"\n ];\n}'); + // 4 spaces per indent input, processed with 4-spaces per indent + bt( "function foo() {\n" + + " return [\n" + + " {\n" + + " one: 'x',\n" + + " two: [\n" + + " {\n" + + " id: 'a',\n" + + " name: 'apple'\n" + + " }, {\n" + + " id: 'b',\n" + + " name: 'banana'\n" + + " }\n" + + " ]\n" + + " }\n" + + " ];\n" + + "}"); + // 3 spaces per indent input, processed with 4-spaces per indent + // Should be unchanged, but is not - #445 +// bt( "function foo() {\n" + +// " return [\n" + +// " {\n" + +// " one: 'x',\n" + +// " two: [\n" + +// " {\n" + +// " id: 'a',\n" + +// " name: 'apple'\n" + +// " }, {\n" + +// " id: 'b',\n" + +// " name: 'banana'\n" + +// " }\n" + +// " ]\n" + +// " }\n" + +// " ];\n" + +// "}"); + + + reset_options(); + //============================================================ + bt('a = //comment\n /regex/;'); + + bt('if (a)\n{\nb;\n}\nelse\n{\nc;\n}', 'if (a) {\n b;\n} else {\n c;\n}'); + + // tests for brace positioning + beautify_brace_tests('expand'); + beautify_brace_tests('collapse'); + beautify_brace_tests('end-expand'); + beautify_brace_tests('none'); + + test_fragment('roo = {\n /*\n ****\n FOO\n ****\n */\n BAR: 0\n};'); + + bt('"foo""bar""baz"', '"foo"\n"bar"\n"baz"'); + bt("'foo''bar''baz'", "'foo'\n'bar'\n'baz'"); + + + test_fragment("if (zz) {\n // ....\n}\n(function"); + + bt("{\n get foo() {}\n}"); + bt("{\n var a = get\n foo();\n}"); + bt("{\n set foo() {}\n}"); + bt("{\n var a = set\n foo();\n}"); + bt("var x = {\n get function()\n}"); + bt("var x = {\n set function()\n}"); + + // According to my current research get/set have no special meaning outside of an object literal + bt("var x = set\n\na() {}", "var x = set\n\na() {}"); + bt("var x = set\n\nfunction() {}", "var x = set\n\nfunction() {}"); + + bt(''); + bt(' + bt('for () /abc/.test()'); + bt('if (k) /aaa/m.test(v) && l();'); + bt('switch (true) {\n case /swf/i.test(foo):\n bar();\n}'); + bt('createdAt = {\n type: Date,\n default: Date.now\n}'); + bt('switch (createdAt) {\n case a:\n Date,\n default:\n Date.now\n}'); + + reset_options(); + //============================================================ + opts.space_before_conditional = false; + bt('if(a) b()'); + + + reset_options(); + //============================================================ + opts.preserve_newlines = true; + bt('var a = 42; // foo\n\nvar b;'); + bt('var a = 42; // foo\n\n\nvar b;'); + bt("var a = 'foo' +\n 'bar';"); + bt("var a = \"foo\" +\n \"bar\";"); + bt('this.oa = new OAuth(\n' + + ' _requestToken,\n' + + ' _accessToken,\n' + + ' consumer_key\n' + + ');'); + + + reset_options(); + //============================================================ + opts.unescape_strings = false; + bt('"\\\\s"'); // == "\\s" in the js source + bt("'\\\\s'"); // == '\\s' in the js source + bt("'\\\\\\s'"); // == '\\\s' in the js source + bt("'\\s'"); // == '\s' in the js source + bt('"•"'); + bt('"—"'); + bt('"\\x41\\x42\\x43\\x01"', '"\\x41\\x42\\x43\\x01"'); + bt('"\\u2022"', '"\\u2022"'); + bt('a = /\s+/'); + // bt('a = /\\x41/','a = /A/'); + bt('"\\u2022";a = /\s+/;"\\x41\\x42\\x43\\x01".match(/\\x41/);','"\\u2022";\na = /\s+/;\n"\\x41\\x42\\x43\\x01".match(/\\x41/);'); + test_fragment('"\\x22\\x27",\'\\x22\\x27\',"\\x5c",\'\\x5c\',"\\xff and \\xzz","unicode \\u0000 \\u0022 \\u0027 \\u005c \\uffff \\uzzzz"', '"\\x22\\x27", \'\\x22\\x27\', "\\x5c", \'\\x5c\', "\\xff and \\xzz", "unicode \\u0000 \\u0022 \\u0027 \\u005c \\uffff \\uzzzz"'); + + opts.unescape_strings = true; + test_fragment('"\\x20\\x40\\x4a"', '" @J"'); + test_fragment('"\\xff\\x40\\x4a"'); + test_fragment('"\\u0072\\u016B\\u0137\\u012B\\u0074\\u0069\\u0073"', '"\u0072\u016B\u0137\u012B\u0074\u0069\u0073"'); + test_fragment('"Google Chrome est\\u00E1 actualizado."', '"Google Chrome está actualizado."'); + test_fragment('"\\x22\\x27",\'\\x22\\x27\',"\\x5c",\'\\x5c\',"\\xff and \\xzz","unicode \\u0000 \\u0022 \\u0027 \\u005c \\uffff"', + '"\\"\\\'", \'\\"\\\'\', "\\\\", \'\\\\\', "\\xff and \\xzz", "unicode \\u0000 \\" \\\' \\\\ ' + unicode_char(0xffff) + '"'); + + // For error case, return the string unchanged + test_fragment('"\\x22\\x27",\'\\x22\\x27\',"\\x5c",\'\\x5c\',"\\xff and \\xzz","unicode \\u0000 \\u0022 \\u0027 \\u005c \\uffff \\uzzzz"', + '"\\"\\\'", \'\\"\\\'\', "\\\\", \'\\\\\', "\\xff and \\xzz", "unicode \\u0000 \\u0022 \\u0027 \\u005c \\uffff \\uzzzz"'); + + reset_options(); + //============================================================ + bt('return function();'); + bt('var a = function();'); + bt('var a = 5 + function();'); + + bt('import foo.*;', 'import foo.*;'); // actionscript's import + test_fragment('function f(a: a, b: b)'); // actionscript + + bt('{\n foo // something\n ,\n bar // something\n baz\n}'); + bt('function a(a) {} function b(b) {} function c(c) {}', 'function a(a) {}\n\nfunction b(b) {}\n\nfunction c(c) {}'); + bt('foo(a, function() {})'); + + bt('foo(a, /regex/)'); + + bt('/* foo */\n"x"'); + + reset_options(); + //============================================================ + opts.break_chained_methods = false; + opts.preserve_newlines = false; + bt('foo\n.bar()\n.baz().cucumber(fat)', 'foo.bar().baz().cucumber(fat)'); + bt('foo\n.bar()\n.baz().cucumber(fat); foo.bar().baz().cucumber(fat)', 'foo.bar().baz().cucumber(fat);\nfoo.bar().baz().cucumber(fat)'); + bt('foo\n.bar()\n.baz().cucumber(fat)\n foo.bar().baz().cucumber(fat)', 'foo.bar().baz().cucumber(fat)\nfoo.bar().baz().cucumber(fat)'); + bt('this\n.something = foo.bar()\n.baz().cucumber(fat)', 'this.something = foo.bar().baz().cucumber(fat)'); + bt('this.something.xxx = foo.moo.bar()'); + bt('this\n.something\n.xxx = foo.moo\n.bar()', 'this.something.xxx = foo.moo.bar()'); + + opts.break_chained_methods = false; + opts.preserve_newlines = true; + bt('foo\n.bar()\n.baz().cucumber(fat)', 'foo\n .bar()\n .baz().cucumber(fat)'); + bt('foo\n.bar()\n.baz().cucumber(fat); foo.bar().baz().cucumber(fat)', 'foo\n .bar()\n .baz().cucumber(fat);\nfoo.bar().baz().cucumber(fat)'); + bt('foo\n.bar()\n.baz().cucumber(fat)\n foo.bar().baz().cucumber(fat)', 'foo\n .bar()\n .baz().cucumber(fat)\nfoo.bar().baz().cucumber(fat)'); + bt('this\n.something = foo.bar()\n.baz().cucumber(fat)', 'this\n .something = foo.bar()\n .baz().cucumber(fat)'); + bt('this.something.xxx = foo.moo.bar()'); + bt('this\n.something\n.xxx = foo.moo\n.bar()', 'this\n .something\n .xxx = foo.moo\n .bar()'); + + opts.break_chained_methods = true; + opts.preserve_newlines = false; + bt('foo\n.bar()\n.baz().cucumber(fat)', 'foo.bar()\n .baz()\n .cucumber(fat)'); + bt('foo\n.bar()\n.baz().cucumber(fat); foo.bar().baz().cucumber(fat)', 'foo.bar()\n .baz()\n .cucumber(fat);\nfoo.bar()\n .baz()\n .cucumber(fat)'); + bt('foo\n.bar()\n.baz().cucumber(fat)\n foo.bar().baz().cucumber(fat)', 'foo.bar()\n .baz()\n .cucumber(fat)\nfoo.bar()\n .baz()\n .cucumber(fat)'); + bt('this\n.something = foo.bar()\n.baz().cucumber(fat)', 'this.something = foo.bar()\n .baz()\n .cucumber(fat)'); + bt('this.something.xxx = foo.moo.bar()'); + bt('this\n.something\n.xxx = foo.moo\n.bar()', 'this.something.xxx = foo.moo.bar()'); + + opts.break_chained_methods = true; + opts.preserve_newlines = true; + bt('foo\n.bar()\n.baz().cucumber(fat)', 'foo\n .bar()\n .baz()\n .cucumber(fat)'); + bt('foo\n.bar()\n.baz().cucumber(fat); foo.bar().baz().cucumber(fat)', 'foo\n .bar()\n .baz()\n .cucumber(fat);\nfoo.bar()\n .baz()\n .cucumber(fat)'); + bt('foo\n.bar()\n.baz().cucumber(fat)\n foo.bar().baz().cucumber(fat)', 'foo\n .bar()\n .baz()\n .cucumber(fat)\nfoo.bar()\n .baz()\n .cucumber(fat)'); + bt('this\n.something = foo.bar()\n.baz().cucumber(fat)', 'this\n .something = foo.bar()\n .baz()\n .cucumber(fat)'); + bt('this.something.xxx = foo.moo.bar()'); + bt('this\n.something\n.xxx = foo.moo\n.bar()', 'this\n .something\n .xxx = foo.moo\n .bar()'); + + reset_options(); + //============================================================ + // Line wrap test intputs + //.............---------1---------2---------3---------4---------5---------6---------7 + //.............1234567890123456789012345678901234567890123456789012345678901234567890 + wrap_input_1=('foo.bar().baz().cucumber((fat && "sassy") || (leans && mean));\n' + + 'Test_very_long_variable_name_this_should_never_wrap\n.but_this_can\n' + + 'return between_return_and_expression_should_never_wrap.but_this_can\n' + + 'throw between_throw_and_expression_should_never_wrap.but_this_can\n' + + 'if (wraps_can_occur && inside_an_if_block) that_is_\n.okay();\n' + + 'object_literal = {\n' + + ' propertx: first_token + 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap + but_this_can,\n' + + ' propertz: first_token_should_never_wrap + !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" + "but_this_can"\n' + + '}'); + + //.............---------1---------2---------3---------4---------5---------6---------7 + //.............1234567890123456789012345678901234567890123456789012345678901234567890 + wrap_input_2=('{\n' + + ' foo.bar().baz().cucumber((fat && "sassy") || (leans && mean));\n' + + ' Test_very_long_variable_name_this_should_never_wrap\n.but_this_can\n' + + ' return between_return_and_expression_should_never_wrap.but_this_can\n' + + ' throw between_throw_and_expression_should_never_wrap.but_this_can\n' + + ' if (wraps_can_occur && inside_an_if_block) that_is_\n.okay();\n' + + ' object_literal = {\n' + + ' propertx: first_token + 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap + but_this_can,\n' + + ' propertz: first_token_should_never_wrap + !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" + "but_this_can"\n' + + ' }' + + '}'); + + opts.preserve_newlines = false; + opts.wrap_line_length = 0; + //.............---------1---------2---------3---------4---------5---------6---------7 + //.............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_1, + /* expected */ + 'foo.bar().baz().cucumber((fat && "sassy") || (leans && mean));\n' + + 'Test_very_long_variable_name_this_should_never_wrap.but_this_can\n' + + 'return between_return_and_expression_should_never_wrap.but_this_can\n' + + 'throw between_throw_and_expression_should_never_wrap.but_this_can\n' + + 'if (wraps_can_occur && inside_an_if_block) that_is_.okay();\n' + + 'object_literal = {\n' + + ' propertx: first_token + 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap + but_this_can,\n' + + ' propertz: first_token_should_never_wrap + !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" + "but_this_can"\n' + + '}'); + + opts.wrap_line_length = 70; + //.............---------1---------2---------3---------4---------5---------6---------7 + //.............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_1, + /* expected */ + 'foo.bar().baz().cucumber((fat && "sassy") || (leans && mean));\n' + + 'Test_very_long_variable_name_this_should_never_wrap.but_this_can\n' + + 'return between_return_and_expression_should_never_wrap.but_this_can\n' + + 'throw between_throw_and_expression_should_never_wrap.but_this_can\n' + + 'if (wraps_can_occur && inside_an_if_block) that_is_.okay();\n' + + 'object_literal = {\n' + + ' propertx: first_token + 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap + but_this_can,\n' + + ' propertz: first_token_should_never_wrap + !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" + "but_this_can"\n' + + '}'); + + opts.wrap_line_length = 40; + //.............---------1---------2---------3---------4---------5---------6---------7 + //.............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_1, + /* expected */ + 'foo.bar().baz().cucumber((fat &&\n' + + ' "sassy") || (leans && mean));\n' + + 'Test_very_long_variable_name_this_should_never_wrap\n' + + ' .but_this_can\n' + + 'return between_return_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + 'throw between_throw_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + 'if (wraps_can_occur &&\n' + + ' inside_an_if_block) that_is_.okay();\n' + + 'object_literal = {\n' + + ' propertx: first_token +\n' + + ' 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap +\n' + + ' but_this_can,\n' + + ' propertz: first_token_should_never_wrap +\n' + + ' !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" +\n' + + ' "but_this_can"\n' + + '}'); + + opts.wrap_line_length = 41; + // NOTE: wrap is only best effort - line continues until next wrap point is found. + //.............---------1---------2---------3---------4---------5---------6---------7 + //.............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_1, + /* expected */ + 'foo.bar().baz().cucumber((fat && "sassy") ||\n' + + ' (leans && mean));\n' + + 'Test_very_long_variable_name_this_should_never_wrap\n' + + ' .but_this_can\n' + + 'return between_return_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + 'throw between_throw_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + 'if (wraps_can_occur &&\n' + + ' inside_an_if_block) that_is_.okay();\n' + + 'object_literal = {\n' + + ' propertx: first_token +\n' + + ' 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap +\n' + + ' but_this_can,\n' + + ' propertz: first_token_should_never_wrap +\n' + + ' !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" +\n' + + ' "but_this_can"\n' + + '}'); + + opts.wrap_line_length = 45; + // NOTE: wrap is only best effort - line continues until next wrap point is found. + //.............---------1---------2---------3---------4---------5---------6---------7 + //.............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_2, + /* expected */ + '{\n' + + ' foo.bar().baz().cucumber((fat && "sassy") ||\n' + + ' (leans && mean));\n' + + ' Test_very_long_variable_name_this_should_never_wrap\n' + + ' .but_this_can\n' + + ' return between_return_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + ' throw between_throw_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + ' if (wraps_can_occur &&\n' + + ' inside_an_if_block) that_is_.okay();\n' + + ' object_literal = {\n' + + ' propertx: first_token +\n' + + ' 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap +\n' + + ' but_this_can,\n' + + ' propertz: first_token_should_never_wrap +\n' + + ' !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" +\n' + + ' "but_this_can"\n' + + ' }\n'+ + '}'); + + opts.preserve_newlines = true; + opts.wrap_line_length = 0; + //.............---------1---------2---------3---------4---------5---------6---------7 + //.............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_1, + /* expected */ + 'foo.bar().baz().cucumber((fat && "sassy") || (leans && mean));\n' + + 'Test_very_long_variable_name_this_should_never_wrap\n' + + ' .but_this_can\n' + + 'return between_return_and_expression_should_never_wrap.but_this_can\n' + + 'throw between_throw_and_expression_should_never_wrap.but_this_can\n' + + 'if (wraps_can_occur && inside_an_if_block) that_is_\n' + + ' .okay();\n' + + 'object_literal = {\n' + + ' propertx: first_token + 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap + but_this_can,\n' + + ' propertz: first_token_should_never_wrap + !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" + "but_this_can"\n' + + '}'); + + opts.wrap_line_length = 70; + //.............---------1---------2---------3---------4---------5---------6---------7 + //.............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_1, + /* expected */ + 'foo.bar().baz().cucumber((fat && "sassy") || (leans && mean));\n' + + 'Test_very_long_variable_name_this_should_never_wrap\n' + + ' .but_this_can\n' + + 'return between_return_and_expression_should_never_wrap.but_this_can\n' + + 'throw between_throw_and_expression_should_never_wrap.but_this_can\n' + + 'if (wraps_can_occur && inside_an_if_block) that_is_\n' + + ' .okay();\n' + + 'object_literal = {\n' + + ' propertx: first_token + 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap + but_this_can,\n' + + ' propertz: first_token_should_never_wrap + !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" + "but_this_can"\n' + + '}'); + + + opts.wrap_line_length = 40; + //.............---------1---------2---------3---------4---------5---------6---------7 + //.............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_1, + /* expected */ + 'foo.bar().baz().cucumber((fat &&\n' + + ' "sassy") || (leans && mean));\n' + + 'Test_very_long_variable_name_this_should_never_wrap\n' + + ' .but_this_can\n' + + 'return between_return_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + 'throw between_throw_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + 'if (wraps_can_occur &&\n' + + ' inside_an_if_block) that_is_\n' + + ' .okay();\n' + + 'object_literal = {\n' + + ' propertx: first_token +\n' + + ' 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap +\n' + + ' but_this_can,\n' + + ' propertz: first_token_should_never_wrap +\n' + + ' !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" +\n' + + ' "but_this_can"\n' + + '}'); + + opts.wrap_line_length = 41; + // NOTE: wrap is only best effort - line continues until next wrap point is found. + //.............---------1---------2---------3---------4---------5---------6---------7 + //.............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_1, + /* expected */ + 'foo.bar().baz().cucumber((fat && "sassy") ||\n' + + ' (leans && mean));\n' + + 'Test_very_long_variable_name_this_should_never_wrap\n' + + ' .but_this_can\n' + + 'return between_return_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + 'throw between_throw_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + 'if (wraps_can_occur &&\n' + + ' inside_an_if_block) that_is_\n' + + ' .okay();\n' + + 'object_literal = {\n' + + ' propertx: first_token +\n' + + ' 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap +\n' + + ' but_this_can,\n' + + ' propertz: first_token_should_never_wrap +\n' + + ' !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" +\n' + + ' "but_this_can"\n' + + '}'); + + opts.wrap_line_length = 45; + // NOTE: wrap is only best effort - line continues until next wrap point is found. + //.............---------1---------2---------3---------4---------5---------6---------7 + //.............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_2, + /* expected */ + '{\n' + + ' foo.bar().baz().cucumber((fat && "sassy") ||\n' + + ' (leans && mean));\n' + + ' Test_very_long_variable_name_this_should_never_wrap\n' + + ' .but_this_can\n' + + ' return between_return_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + ' throw between_throw_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + ' if (wraps_can_occur &&\n' + + ' inside_an_if_block) that_is_\n' + + ' .okay();\n' + + ' object_literal = {\n' + + ' propertx: first_token +\n' + + ' 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap +\n' + + ' but_this_can,\n' + + ' propertz: first_token_should_never_wrap +\n' + + ' !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" +\n' + + ' "but_this_can"\n' + + ' }\n'+ + '}'); + + reset_options(); + //============================================================ + opts.preserve_newlines = false; + bt('if (foo) // comment\n bar();'); + bt('if (foo) // comment\n (bar());'); + bt('if (foo) // comment\n (bar());'); + bt('if (foo) // comment\n /asdf/;'); + bt('this.oa = new OAuth(\n' + + ' _requestToken,\n' + + ' _accessToken,\n' + + ' consumer_key\n' + + ');', + 'this.oa = new OAuth(_requestToken, _accessToken, consumer_key);'); + bt('foo = {\n x: y, // #44\n w: z // #44\n}'); + bt('switch (x) {\n case "a":\n // comment on newline\n break;\n case "b": // comment on same line\n break;\n}'); + bt('this.type =\n this.options =\n // comment\n this.enabled null;', + 'this.type = this.options =\n // comment\n this.enabled null;'); + bt('someObj\n .someFunc1()\n // This comment should not break the indent\n .someFunc2();', + 'someObj.someFunc1()\n // This comment should not break the indent\n .someFunc2();'); + + bt('if (true ||\n!true) return;', 'if (true || !true) return;'); + + // these aren't ready yet. + //bt('if (foo) // comment\n bar() /*i*/ + baz() /*j\n*/ + asdf();'); + bt('if\n(foo)\nif\n(bar)\nif\n(baz)\nwhee();\na();', + 'if (foo)\n if (bar)\n if (baz) whee();\na();'); + bt('if\n(foo)\nif\n(bar)\nif\n(baz)\nwhee();\nelse\na();', + 'if (foo)\n if (bar)\n if (baz) whee();\n else a();'); + bt('if (foo)\nbar();\nelse\ncar();', + 'if (foo) bar();\nelse car();'); + + bt('if (foo) if (bar) if (baz);\na();', + 'if (foo)\n if (bar)\n if (baz);\na();'); + bt('if (foo) if (bar) if (baz) whee();\na();', + 'if (foo)\n if (bar)\n if (baz) whee();\na();'); + bt('if (foo) a()\nif (bar) if (baz) whee();\na();', + 'if (foo) a()\nif (bar)\n if (baz) whee();\na();'); + bt('if (foo);\nif (bar) if (baz) whee();\na();', + 'if (foo);\nif (bar)\n if (baz) whee();\na();'); + bt('if (options)\n' + + ' for (var p in options)\n' + + ' this[p] = options[p];', + 'if (options)\n'+ + ' for (var p in options) this[p] = options[p];'); + bt('if (options) for (var p in options) this[p] = options[p];', + 'if (options)\n for (var p in options) this[p] = options[p];'); + + bt('if (options) do q(); while (b());', + 'if (options)\n do q(); while (b());'); + bt('if (options) while (b()) q();', + 'if (options)\n while (b()) q();'); + bt('if (options) do while (b()) q(); while (a());', + 'if (options)\n do\n while (b()) q(); while (a());'); + + bt('function f(a, b, c,\nd, e) {}', + 'function f(a, b, c, d, e) {}'); + + bt('function f(a,b) {if(a) b()}function g(a,b) {if(!a) b()}', + 'function f(a, b) {\n if (a) b()\n}\n\nfunction g(a, b) {\n if (!a) b()\n}'); + bt('function f(a,b) {if(a) b()}\n\n\n\nfunction g(a,b) {if(!a) b()}', + 'function f(a, b) {\n if (a) b()\n}\n\nfunction g(a, b) {\n if (!a) b()\n}'); + + // This is not valid syntax, but still want to behave reasonably and not side-effect + bt('(if(a) b())(if(a) b())', + '(\n if (a) b())(\n if (a) b())'); + bt('(if(a) b())\n\n\n(if(a) b())', + '(\n if (a) b())\n(\n if (a) b())'); + + + + bt("if\n(a)\nb();", "if (a) b();"); + bt('var a =\nfoo', 'var a = foo'); + bt('var a = {\n"a":1,\n"b":2}', "var a = {\n \"a\": 1,\n \"b\": 2\n}"); + bt("var a = {\n'a':1,\n'b':2}", "var a = {\n 'a': 1,\n 'b': 2\n}"); + bt('var a = /*i*/ "b";'); + bt('var a = /*i*/\n"b";', 'var a = /*i*/ "b";'); + bt('var a = /*i*/\nb;', 'var a = /*i*/ b;'); + bt('{\n\n\n"x"\n}', '{\n "x"\n}'); + bt('if(a &&\nb\n||\nc\n||d\n&&\ne) e = f', 'if (a && b || c || d && e) e = f'); + bt('if(a &&\n(b\n||\nc\n||d)\n&&\ne) e = f', 'if (a && (b || c || d) && e) e = f'); + test_fragment('\n\n"x"', '"x"'); + bt('a = 1;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nb = 2;', + 'a = 1;\nb = 2;'); + + opts.preserve_newlines = true; + bt('if (foo) // comment\n bar();'); + bt('if (foo) // comment\n (bar());'); + bt('if (foo) // comment\n (bar());'); + bt('if (foo) // comment\n /asdf/;'); + bt('foo = {\n x: y, // #44\n w: z // #44\n}'); + bt('switch (x) {\n case "a":\n // comment on newline\n break;\n case "b": // comment on same line\n break;\n}'); + bt('this.type =\n this.options =\n // comment\n this.enabled null;'); + bt('someObj\n .someFunc1()\n // This comment should not break the indent\n .someFunc2();'); + + bt('if (true ||\n!true) return;', 'if (true ||\n !true) return;'); + + // these aren't ready yet. + // bt('if (foo) // comment\n bar() /*i*/ + baz() /*j\n*/ + asdf();'); + bt('if\n(foo)\nif\n(bar)\nif\n(baz)\nwhee();\na();', + 'if (foo)\n if (bar)\n if (baz)\n whee();\na();'); + bt('if\n(foo)\nif\n(bar)\nif\n(baz)\nwhee();\nelse\na();', + 'if (foo)\n if (bar)\n if (baz)\n whee();\n else\n a();'); + bt('if (foo)\nbar();\nelse\ncar();', + 'if (foo)\n bar();\nelse\n car();'); + bt('if (foo) bar();\nelse\ncar();', + 'if (foo) bar();\nelse\n car();'); + + bt('if (foo) if (bar) if (baz);\na();', + 'if (foo)\n if (bar)\n if (baz);\na();'); + bt('if (foo) if (bar) if (baz) whee();\na();', + 'if (foo)\n if (bar)\n if (baz) whee();\na();'); + bt('if (foo) a()\nif (bar) if (baz) whee();\na();', + 'if (foo) a()\nif (bar)\n if (baz) whee();\na();'); + bt('if (foo);\nif (bar) if (baz) whee();\na();', + 'if (foo);\nif (bar)\n if (baz) whee();\na();'); + bt('if (options)\n' + + ' for (var p in options)\n' + + ' this[p] = options[p];'); + bt('if (options) for (var p in options) this[p] = options[p];', + 'if (options)\n for (var p in options) this[p] = options[p];'); + + bt('if (options) do q(); while (b());', + 'if (options)\n do q(); while (b());'); + bt('if (options) do; while (b());', + 'if (options)\n do; while (b());'); + bt('if (options) while (b()) q();', + 'if (options)\n while (b()) q();'); + bt('if (options) do while (b()) q(); while (a());', + 'if (options)\n do\n while (b()) q(); while (a());'); + + bt('function f(a, b, c,\nd, e) {}', + 'function f(a, b, c,\n d, e) {}'); + + bt('function f(a,b) {if(a) b()}function g(a,b) {if(!a) b()}', + 'function f(a, b) {\n if (a) b()\n}\n\nfunction g(a, b) {\n if (!a) b()\n}'); + bt('function f(a,b) {if(a) b()}\n\n\n\nfunction g(a,b) {if(!a) b()}', + 'function f(a, b) {\n if (a) b()\n}\n\n\n\nfunction g(a, b) {\n if (!a) b()\n}'); + // This is not valid syntax, but still want to behave reasonably and not side-effect + bt('(if(a) b())(if(a) b())', + '(\n if (a) b())(\n if (a) b())'); + bt('(if(a) b())\n\n\n(if(a) b())', + '(\n if (a) b())\n\n\n(\n if (a) b())'); + + // space between functions + bt('/*\n * foo\n */\nfunction foo() {}'); + bt('// a nice function\nfunction foo() {}'); + bt('function foo() {}\nfunction foo() {}', + 'function foo() {}\n\nfunction foo() {}' + ); + + bt('[\n function() {}\n]'); + + + + bt("if\n(a)\nb();", "if (a)\n b();"); + bt('var a =\nfoo', 'var a =\n foo'); + bt('var a = {\n"a":1,\n"b":2}', "var a = {\n \"a\": 1,\n \"b\": 2\n}"); + bt("var a = {\n'a':1,\n'b':2}", "var a = {\n 'a': 1,\n 'b': 2\n}"); + bt('var a = /*i*/ "b";'); + bt('var a = /*i*/\n"b";', 'var a = /*i*/\n "b";'); + bt('var a = /*i*/\nb;', 'var a = /*i*/\n b;'); + bt('{\n\n\n"x"\n}', '{\n\n\n "x"\n}'); + bt('if(a &&\nb\n||\nc\n||d\n&&\ne) e = f', 'if (a &&\n b ||\n c ||\n d &&\n e) e = f'); + bt('if(a &&\n(b\n||\nc\n||d)\n&&\ne) e = f', 'if (a &&\n (b ||\n c ||\n d) &&\n e) e = f'); + test_fragment('\n\n"x"', '"x"'); + + // this beavior differs between js and python, defaults to unlimited in js, 10 in python + bt('a = 1;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nb = 2;', + 'a = 1;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nb = 2;'); + opts.max_preserve_newlines = 8; + bt('a = 1;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nb = 2;', + 'a = 1;\n\n\n\n\n\n\n\nb = 2;'); + + reset_options(); + //============================================================ + + + Urlencoded.run_tests(sanitytest); + } + + beautifier_tests(); + beautifier_unconverted_tests(); +} + +if (typeof exports !== "undefined") { + exports.run_javascript_tests = run_javascript_tests; +} diff --git a/node_modules/js-beautify/test/data/javascript/python.mustache b/node_modules/js-beautify/test/data/javascript/python.mustache new file mode 100644 index 0000000..4cdde4d --- /dev/null +++ b/node_modules/js-beautify/test/data/javascript/python.mustache @@ -0,0 +1,1322 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +''' +{{&header_text}} + + The MIT License (MIT) + + Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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. +''' + +import re +import unittest +import jsbeautifier +import six +import copy + +class TestJSBeautifier(unittest.TestCase): + options = None + + @classmethod + def setUpClass(cls): + true = True + false = False + + default_options = jsbeautifier.default_options() + default_options.indent_size = 4 + default_options.indent_char = ' ' + default_options.preserve_newlines = True + default_options.jslint_happy = False + default_options.keep_array_indentation = False + default_options.brace_style = 'collapse' + default_options.indent_level = 0 + default_options.break_chained_methods = False + default_options.eol = '\n' + +{{#default_options}} default_options.{{name}} = {{&value}} +{{/default_options}} + + cls.default_options = default_options + cls.wrapregex = re.compile('^(.+)$', re.MULTILINE) + + def reset_options(self): + self.options = copy.copy(self.default_options) + + def test_unescape(self): + # Test cases contributed by + test_fragment = self.decodesto + self.reset_options() + bt = self.bt + + def unicode_char(value): + return six.unichr(value) + + bt('"\\\\s"') # == "\\s" in the js source + bt("'\\\\s'") # == '\\s' in the js source + bt("'\\\\\\s'") # == '\\\s' in the js source + bt("'\\s'") # == '\s' in the js source + bt('"•"') + bt('"—"') + bt('"\\x41\\x42\\x43\\x01"', '"\\x41\\x42\\x43\\x01"') + bt('"\\u2022"', '"\\u2022"') + bt('a = /\s+/') + #bt('a = /\\x41/','a = /A/') + bt('"\\u2022";a = /\s+/;"\\x41\\x42\\x43\\x01".match(/\\x41/);','"\\u2022";\na = /\s+/;\n"\\x41\\x42\\x43\\x01".match(/\\x41/);') + test_fragment('"\\x22\\x27",\'\\x22\\x27\',"\\x5c",\'\\x5c\',"\\xff and \\xzz","unicode \\u0000 \\u0022 \\u0027 \\u005c \\uffff \\uzzzz"', '"\\x22\\x27", \'\\x22\\x27\', "\\x5c", \'\\x5c\', "\\xff and \\xzz", "unicode \\u0000 \\u0022 \\u0027 \\u005c \\uffff \\uzzzz"') + + self.options.unescape_strings = True + + bt('"\\x41\\x42\\x43\\x01"', '"ABC\\x01"') + test_fragment('"\\x20\\x40\\x4a"', '" @J"'); + test_fragment('"\\xff\\x40\\x4a"'); + test_fragment('"\\u0072\\u016B\\u0137\\u012B\\u0074\\u0069\\u0073"', six.u('"\u0072\u016B\u0137\u012B\u0074\u0069\u0073"')); + + bt('a = /\s+/') + test_fragment('"\\x22\\x27",\'\\x22\\x27\',"\\x5c",\'\\x5c\',"\\xff","unicode \\u0000 \\u0022 \\u0027 \\u005c \\uffff"', + '"\\"\\\'", \'\\"\\\'\', "\\\\", \'\\\\\', "\\xff", "unicode \\u0000 \\" \\\' \\\\ ' + unicode_char(0xffff) + '"'); + + # For error case, return the string unchanged + test_fragment('"\\x22\\x27",\'\\x22\\x27\',"\\x5c",\'\\x5c\',"\\xff and \\xzz","unicode \\u0000 \\u0022 \\u0027 \\u005c \\uffff \\uzzzz"', + '"\\"\\\'", \'\\"\\\'\', "\\\\", \'\\\\\', "\\xff and \\xzz", "unicode \\u0000 \\u0022 \\u0027 \\u005c \\uffff \\uzzzz"'); + + self.options.unescape_strings = False + + def test_beautifier(self): + test_fragment = self.decodesto + bt = self.bt + + true = True + false = False + + def unicode_char(value): + return six.unichr(value) + +{{#groups}}{{#set_mustache_tags}}.{{/set_mustache_tags}} + #============================================================ + {{^matrix}} + # {{&name}} + self.reset_options(); + {{#options}} + self.options.{{name}} = {{&value}} + {{/options}} + {{#tests}} + {{#test_line}}.{{/test_line}} + {{/tests}} + + {{/matrix}} + {{#matrix}} + # {{&name}} - ({{#matrix_context_string}}.{{/matrix_context_string}}) + self.reset_options(); + {{#options}} + self.options.{{name}} = {{&value}} + {{/options}} + {{#tests}} + {{#test_line}}.{{/test_line}} + {{/tests}} + + {{/matrix}} +{{#unset_mustache_tags}}.{{/unset_mustache_tags}}{{/groups}} + + def test_beautifier_unconverted(self): + test_fragment = self.decodesto + bt = self.bt + + self.reset_options(); + #============================================================ + self.options.indent_size = 1; + self.options.indent_char = ' '; + bt('{ one_char() }', "{\n one_char()\n}") + + bt('var a,b=1,c=2', 'var a, b = 1,\n c = 2') + + self.options.indent_size = 4; + self.options.indent_char = ' '; + bt('{ one_char() }', "{\n one_char()\n}") + + self.options.indent_size = 1; + self.options.indent_char = "\t"; + bt('{ one_char() }', "{\n\tone_char()\n}") + bt('x = a ? b : c; x;', 'x = a ? b : c;\nx;') + + #set to something else than it should change to, but with tabs on, should override + self.options.indent_size = 5; + self.options.indent_char = ' '; + self.options.indent_with_tabs = True; + + bt('{ one_char() }', "{\n\tone_char()\n}") + bt('x = a ? b : c; x;', 'x = a ? b : c;\nx;') + + + self.reset_options(); + #============================================================ + self.options.preserve_newlines = False; + bt('var\na=dont_preserve_newlines;', 'var a = dont_preserve_newlines;') + + # make sure the blank line between function definitions stays + # even when preserve_newlines = False + bt('function foo() {\n return 1;\n}\n\nfunction foo() {\n return 1;\n}') + bt('function foo() {\n return 1;\n}\nfunction foo() {\n return 1;\n}', + 'function foo() {\n return 1;\n}\n\nfunction foo() {\n return 1;\n}' + ) + bt('function foo() {\n return 1;\n}\n\n\nfunction foo() {\n return 1;\n}', + 'function foo() {\n return 1;\n}\n\nfunction foo() {\n return 1;\n}' + ) + + + self.options.preserve_newlines = True; + bt('var\na=do_preserve_newlines;', 'var\n a = do_preserve_newlines;') + bt('if (foo) // comment\n{\n bar();\n}') + + + self.reset_options(); + #============================================================ + self.options.keep_array_indentation = False; + bt("a = ['a', 'b', 'c',\n 'd', 'e', 'f']", + "a = ['a', 'b', 'c',\n 'd', 'e', 'f'\n]") + bt("a = ['a', 'b', 'c',\n 'd', 'e', 'f',\n 'g', 'h', 'i']", + "a = ['a', 'b', 'c',\n 'd', 'e', 'f',\n 'g', 'h', 'i'\n]") + bt("a = ['a', 'b', 'c',\n 'd', 'e', 'f',\n 'g', 'h', 'i']", + "a = ['a', 'b', 'c',\n 'd', 'e', 'f',\n 'g', 'h', 'i'\n]") + bt('var x = [{}\n]', 'var x = [{}]') + bt('var x = [{foo:bar}\n]', 'var x = [{\n foo: bar\n}]') + bt("a = ['something',\n 'completely',\n 'different'];\nif (x);", + "a = ['something',\n 'completely',\n 'different'\n];\nif (x);") + bt("a = ['a','b','c']", "a = ['a', 'b', 'c']") + bt("a = ['a', 'b','c']", "a = ['a', 'b', 'c']") + bt("x = [{'a':0}]", + "x = [{\n 'a': 0\n}]") + bt('{a([[a1]], {b;});}', + '{\n a([\n [a1]\n ], {\n b;\n });\n}') + bt("a();\n [\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ].toString();", + "a();\n[\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n].toString();") + bt("a();\na = [\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ].toString();", + "a();\na = [\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n].toString();") + bt("function() {\n Foo([\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ]);\n}", + "function() {\n Foo([\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ]);\n}") + bt('function foo() {\n return [\n "one",\n "two"\n ];\n}') + # 4 spaces per indent input, processed with 4-spaces per indent + bt( "function foo() {\n" + + " return [\n" + + " {\n" + + " one: 'x',\n" + + " two: [\n" + + " {\n" + + " id: 'a',\n" + + " name: 'apple'\n" + + " }, {\n" + + " id: 'b',\n" + + " name: 'banana'\n" + + " }\n" + + " ]\n" + + " }\n" + + " ];\n" + + "}", + "function foo() {\n" + + " return [{\n" + + " one: 'x',\n" + + " two: [{\n" + + " id: 'a',\n" + + " name: 'apple'\n" + + " }, {\n" + + " id: 'b',\n" + + " name: 'banana'\n" + + " }]\n" + + " }];\n" + + "}") + # 3 spaces per indent input, processed with 4-spaces per indent + bt( "function foo() {\n" + + " return [\n" + + " {\n" + + " one: 'x',\n" + + " two: [\n" + + " {\n" + + " id: 'a',\n" + + " name: 'apple'\n" + + " }, {\n" + + " id: 'b',\n" + + " name: 'banana'\n" + + " }\n" + + " ]\n" + + " }\n" + + " ];\n" + + "}", + "function foo() {\n" + + " return [{\n" + + " one: 'x',\n" + + " two: [{\n" + + " id: 'a',\n" + + " name: 'apple'\n" + + " }, {\n" + + " id: 'b',\n" + + " name: 'banana'\n" + + " }]\n" + + " }];\n" + + "}") + + self.options.keep_array_indentation = True; + bt("a = ['a', 'b', 'c',\n 'd', 'e', 'f']") + bt("a = ['a', 'b', 'c',\n 'd', 'e', 'f',\n 'g', 'h', 'i']") + bt("a = ['a', 'b', 'c',\n 'd', 'e', 'f',\n 'g', 'h', 'i']") + bt('var x = [{}\n]', 'var x = [{}\n]') + bt('var x = [{foo:bar}\n]', 'var x = [{\n foo: bar\n }\n]') + bt("a = ['something',\n 'completely',\n 'different'];\nif (x);") + bt("a = ['a','b','c']", "a = ['a', 'b', 'c']") + bt("a = ['a', 'b','c']", "a = ['a', 'b', 'c']") + bt("x = [{'a':0}]", + "x = [{\n 'a': 0\n}]") + bt('{a([[a1]], {b;});}', + '{\n a([[a1]], {\n b;\n });\n}') + bt("a();\n [\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ].toString();", + "a();\n [\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ].toString();") + bt("a();\na = [\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ].toString();", + "a();\na = [\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ].toString();") + bt("function() {\n Foo([\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ]);\n}", + "function() {\n Foo([\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ]);\n}") + bt('function foo() {\n return [\n "one",\n "two"\n ];\n}') + # 4 spaces per indent input, processed with 4-spaces per indent + bt( "function foo() {\n" + + " return [\n" + + " {\n" + + " one: 'x',\n" + + " two: [\n" + + " {\n" + + " id: 'a',\n" + + " name: 'apple'\n" + + " }, {\n" + + " id: 'b',\n" + + " name: 'banana'\n" + + " }\n" + + " ]\n" + + " }\n" + + " ];\n" + + "}") + # 3 spaces per indent input, processed with 4-spaces per indent + # Should be unchanged, but is not - #445 +# bt( "function foo() {\n" + +# " return [\n" + +# " {\n" + +# " one: 'x',\n" + +# " two: [\n" + +# " {\n" + +# " id: 'a',\n" + +# " name: 'apple'\n" + +# " }, {\n" + +# " id: 'b',\n" + +# " name: 'banana'\n" + +# " }\n" + +# " ]\n" + +# " }\n" + +# " ];\n" + +# "}") + + self.reset_options(); + #============================================================ + bt('a = //comment\n /regex/;') + + bt('if (a)\n{\nb;\n}\nelse\n{\nc;\n}', 'if (a) {\n b;\n} else {\n c;\n}') + + bt('var a = new function();') + test_fragment('new function') + + self.reset_options(); + #============================================================ + # START tests for brace positioning + + # If this is ever supported, update tests for each brace style. + # test_fragment('return\n{', 'return\n{') # can't support this?, but that's an improbable and extreme case anyway. + + self.options.brace_style = 'expand'; + + bt('//case 1\nif (a == 1)\n{}\n//case 2\nelse if (a == 2)\n{}') + bt('if(1){2}else{3}', "if (1)\n{\n 2\n}\nelse\n{\n 3\n}") + bt('try{a();}catch(b){c();}catch(d){}finally{e();}', + "try\n{\n a();\n}\ncatch (b)\n{\n c();\n}\ncatch (d)\n{}\nfinally\n{\n e();\n}") + bt('if(a){b();}else if(c) foo();', + "if (a)\n{\n b();\n}\nelse if (c) foo();") + bt("if (a) {\n// comment\n}else{\n// comment\n}", + "if (a)\n{\n // comment\n}\nelse\n{\n // comment\n}") # if/else statement with empty body + bt('if (x) {y} else { if (x) {y}}', + 'if (x)\n{\n y\n}\nelse\n{\n if (x)\n {\n y\n }\n}') + bt('if (a)\n{\nb;\n}\nelse\n{\nc;\n}', + 'if (a)\n{\n b;\n}\nelse\n{\n c;\n}') + test_fragment(' /*\n* xx\n*/\n// xx\nif (foo) {\n bar();\n}', + ' /*\n * xx\n */\n // xx\n if (foo)\n {\n bar();\n }') + bt('if (foo)\n{}\nelse /regex/.test();') + test_fragment('if (foo) {', 'if (foo)\n{') + test_fragment('foo {', 'foo\n{') + test_fragment('return {', 'return {') # return needs the brace. + test_fragment('return /* inline */ {', 'return /* inline */ {') + test_fragment('return;\n{', 'return;\n{') + bt("throw {}") + bt("throw {\n foo;\n}") + bt('var foo = {}') + bt('function x() {\n foo();\n}zzz', 'function x()\n{\n foo();\n}\nzzz') + test_fragment('a: do {} while (); xxx', 'a: do {} while ();\nxxx') + bt('{a: do {} while (); xxx}', '{\n a: do {} while ();xxx\n}') + bt('var a = new function() {};') + bt('var a = new function a() {};', 'var a = new function a()\n{};') + bt('var a = new function()\n{};', 'var a = new function() {};') + bt('var a = new function a()\n{};') + bt('var a = new function a()\n {},\n b = new function b()\n {};') + bt("foo({\n 'a': 1\n},\n10);", + "foo(\n {\n 'a': 1\n },\n 10);") + bt('(["foo","bar"]).each(function(i) {return i;});', + '(["foo", "bar"]).each(function(i)\n{\n return i;\n});') + bt('(function(i) {return i;})();', + '(function(i)\n{\n return i;\n})();') + bt( "test( /*Argument 1*/ {\n" + + " 'Value1': '1'\n" + + "}, /*Argument 2\n" + + " */ {\n" + + " 'Value2': '2'\n" + + "});", + # expected + "test( /*Argument 1*/\n" + + " {\n" + + " 'Value1': '1'\n" + + " },\n" + + " /*Argument 2\n" + + " */\n" + + " {\n" + + " 'Value2': '2'\n" + + " });") + bt( "test(\n" + + "/*Argument 1*/ {\n" + + " 'Value1': '1'\n" + + "},\n" + + "/*Argument 2\n" + + " */ {\n" + + " 'Value2': '2'\n" + + "});", + # expected + "test(\n" + + " /*Argument 1*/\n" + + " {\n" + + " 'Value1': '1'\n" + + " },\n" + + " /*Argument 2\n" + + " */\n" + + " {\n" + + " 'Value2': '2'\n" + + " });") + bt( "test( /*Argument 1*/\n" + + "{\n" + + " 'Value1': '1'\n" + + "}, /*Argument 2\n" + + " */\n" + + "{\n" + + " 'Value2': '2'\n" + + "});", + # expected + "test( /*Argument 1*/\n" + + " {\n" + + " 'Value1': '1'\n" + + " },\n" + + " /*Argument 2\n" + + " */\n" + + " {\n" + + " 'Value2': '2'\n" + + " });") + + self.options.brace_style = 'collapse'; + + bt('//case 1\nif (a == 1) {}\n//case 2\nelse if (a == 2) {}') + bt('if(1){2}else{3}', "if (1) {\n 2\n} else {\n 3\n}") + bt('try{a();}catch(b){c();}catch(d){}finally{e();}', + "try {\n a();\n} catch (b) {\n c();\n} catch (d) {} finally {\n e();\n}") + bt('if(a){b();}else if(c) foo();', + "if (a) {\n b();\n} else if (c) foo();") + bt("if (a) {\n// comment\n}else{\n// comment\n}", + "if (a) {\n // comment\n} else {\n // comment\n}") # if/else statement with empty body + bt('if (x) {y} else { if (x) {y}}', + 'if (x) {\n y\n} else {\n if (x) {\n y\n }\n}') + bt('if (a)\n{\nb;\n}\nelse\n{\nc;\n}', + 'if (a) {\n b;\n} else {\n c;\n}') + test_fragment(' /*\n* xx\n*/\n// xx\nif (foo) {\n bar();\n}', + ' /*\n * xx\n */\n // xx\n if (foo) {\n bar();\n }') + bt('if (foo) {} else /regex/.test();') + test_fragment('if (foo) {', 'if (foo) {') + test_fragment('foo {', 'foo {') + test_fragment('return {', 'return {') # return needs the brace. + test_fragment('return /* inline */ {', 'return /* inline */ {') + test_fragment('return;\n{', 'return; {') + bt("throw {}") + bt("throw {\n foo;\n}") + bt('var foo = {}') + bt('function x() {\n foo();\n}zzz', 'function x() {\n foo();\n}\nzzz') + test_fragment('a: do {} while (); xxx', 'a: do {} while ();\nxxx') + bt('{a: do {} while (); xxx}', '{\n a: do {} while ();xxx\n}') + bt('var a = new function() {};') + bt('var a = new function a() {};') + bt('var a = new function()\n{};', 'var a = new function() {};') + bt('var a = new function a()\n{};', 'var a = new function a() {};') + bt('var a = new function a()\n {},\n b = new function b()\n {};', 'var a = new function a() {},\n b = new function b() {};') + bt("foo({\n 'a': 1\n},\n10);", + "foo({\n 'a': 1\n },\n 10);") + bt('(["foo","bar"]).each(function(i) {return i;});', + '(["foo", "bar"]).each(function(i) {\n return i;\n});') + bt('(function(i) {return i;})();', + '(function(i) {\n return i;\n})();') + bt( "test( /*Argument 1*/ {\n" + + " 'Value1': '1'\n" + + "}, /*Argument 2\n" + + " */ {\n" + + " 'Value2': '2'\n" + + "});", + # expected + "test( /*Argument 1*/ {\n" + + " 'Value1': '1'\n" + + " },\n" + + " /*Argument 2\n" + + " */\n" + + " {\n" + + " 'Value2': '2'\n" + + " });") + bt( "test(\n" + + "/*Argument 1*/ {\n" + + " 'Value1': '1'\n" + + "},\n" + + "/*Argument 2\n" + + " */ {\n" + + " 'Value2': '2'\n" + + "});", + # expected + "test(\n" + + " /*Argument 1*/\n" + + " {\n" + + " 'Value1': '1'\n" + + " },\n" + + " /*Argument 2\n" + + " */\n" + + " {\n" + + " 'Value2': '2'\n" + + " });") + bt( "test( /*Argument 1*/\n" + + "{\n" + + " 'Value1': '1'\n" + + "}, /*Argument 2\n" + + " */\n" + + "{\n" + + " 'Value2': '2'\n" + + "});", + # expected + "test( /*Argument 1*/ {\n" + + " 'Value1': '1'\n" + + " },\n" + + " /*Argument 2\n" + + " */\n" + + " {\n" + + " 'Value2': '2'\n" + + " });") + + self.options.brace_style = "end-expand"; + + bt('//case 1\nif (a == 1) {}\n//case 2\nelse if (a == 2) {}') + bt('if(1){2}else{3}', "if (1) {\n 2\n}\nelse {\n 3\n}") + bt('try{a();}catch(b){c();}catch(d){}finally{e();}', + "try {\n a();\n}\ncatch (b) {\n c();\n}\ncatch (d) {}\nfinally {\n e();\n}") + bt('if(a){b();}else if(c) foo();', + "if (a) {\n b();\n}\nelse if (c) foo();") + bt("if (a) {\n// comment\n}else{\n// comment\n}", + "if (a) {\n // comment\n}\nelse {\n // comment\n}") # if/else statement with empty body + bt('if (x) {y} else { if (x) {y}}', + 'if (x) {\n y\n}\nelse {\n if (x) {\n y\n }\n}') + bt('if (a)\n{\nb;\n}\nelse\n{\nc;\n}', + 'if (a) {\n b;\n}\nelse {\n c;\n}') + test_fragment(' /*\n* xx\n*/\n// xx\nif (foo) {\n bar();\n}', + ' /*\n * xx\n */\n // xx\n if (foo) {\n bar();\n }') + bt('if (foo) {}\nelse /regex/.test();') + test_fragment('if (foo) {', 'if (foo) {') + test_fragment('foo {', 'foo {') + test_fragment('return {', 'return {') # return needs the brace. + test_fragment('return /* inline */ {', 'return /* inline */ {') + test_fragment('return;\n{', 'return; {') + bt("throw {}") + bt("throw {\n foo;\n}") + bt('var foo = {}') + bt('function x() {\n foo();\n}zzz', 'function x() {\n foo();\n}\nzzz') + test_fragment('a: do {} while (); xxx', 'a: do {} while ();\nxxx') + bt('{a: do {} while (); xxx}', '{\n a: do {} while ();xxx\n}') + bt('var a = new function() {};') + bt('var a = new function a() {};') + bt('var a = new function()\n{};', 'var a = new function() {};') + bt('var a = new function a()\n{};', 'var a = new function a() {};') + bt('var a = new function a()\n {},\n b = new function b()\n {};', 'var a = new function a() {},\n b = new function b() {};') + bt("foo({\n 'a': 1\n},\n10);", + "foo({\n 'a': 1\n },\n 10);") + bt('(["foo","bar"]).each(function(i) {return i;});', + '(["foo", "bar"]).each(function(i) {\n return i;\n});') + bt('(function(i) {return i;})();', + '(function(i) {\n return i;\n})();') + bt( "test( /*Argument 1*/ {\n" + + " 'Value1': '1'\n" + + "}, /*Argument 2\n" + + " */ {\n" + + " 'Value2': '2'\n" + + "});", + # expected + "test( /*Argument 1*/ {\n" + + " 'Value1': '1'\n" + + " },\n" + + " /*Argument 2\n" + + " */\n" + + " {\n" + + " 'Value2': '2'\n" + + " });") + bt( "test(\n" + + "/*Argument 1*/ {\n" + + " 'Value1': '1'\n" + + "},\n" + + "/*Argument 2\n" + + " */ {\n" + + " 'Value2': '2'\n" + + "});", + # expected + "test(\n" + + " /*Argument 1*/\n" + + " {\n" + + " 'Value1': '1'\n" + + " },\n" + + " /*Argument 2\n" + + " */\n" + + " {\n" + + " 'Value2': '2'\n" + + " });") + bt( "test( /*Argument 1*/\n" + + "{\n" + + " 'Value1': '1'\n" + + "}, /*Argument 2\n" + + " */\n" + + "{\n" + + " 'Value2': '2'\n" + + "});", + # expected + "test( /*Argument 1*/ {\n" + + " 'Value1': '1'\n" + + " },\n" + + " /*Argument 2\n" + + " */\n" + + " {\n" + + " 'Value2': '2'\n" + + " });") + + self.options.brace_style = 'none'; + + bt('//case 1\nif (a == 1)\n{}\n//case 2\nelse if (a == 2)\n{}') + bt('if(1){2}else{3}', "if (1) {\n 2\n} else {\n 3\n}") + bt('try{a();}catch(b){c();}catch(d){}finally{e();}', + "try {\n a();\n} catch (b) {\n c();\n} catch (d) {} finally {\n e();\n}") + bt('if(a){b();}else if(c) foo();', + "if (a) {\n b();\n} else if (c) foo();") + bt("if (a) {\n// comment\n}else{\n// comment\n}", + "if (a) {\n // comment\n} else {\n // comment\n}") # if/else statement with empty body + bt('if (x) {y} else { if (x) {y}}', + 'if (x) {\n y\n} else {\n if (x) {\n y\n }\n}') + bt('if (a)\n{\nb;\n}\nelse\n{\nc;\n}', + 'if (a)\n{\n b;\n}\nelse\n{\n c;\n}') + test_fragment(' /*\n* xx\n*/\n// xx\nif (foo) {\n bar();\n}', + ' /*\n * xx\n */\n // xx\n if (foo) {\n bar();\n }') + bt('if (foo)\n{}\nelse /regex/.test();') + test_fragment('if (foo) {') + test_fragment('foo {') + test_fragment('return {') # return needs the brace. + test_fragment('return /* inline */ {') + test_fragment('return;\n{') + bt("throw {}") + bt("throw {\n foo;\n}") + bt('var foo = {}') + bt('function x() {\n foo();\n}zzz', 'function x() {\n foo();\n}\nzzz') + test_fragment('a: do {} while (); xxx', 'a: do {} while ();\nxxx') + bt('{a: do {} while (); xxx}', '{\n a: do {} while ();xxx\n}') + bt('var a = new function() {};') + bt('var a = new function a() {};') + bt('var a = new function()\n{};', 'var a = new function() {};') + bt('var a = new function a()\n{};') + bt('var a = new function a()\n {},\n b = new function b()\n {};') + bt("foo({\n 'a': 1\n},\n10);", + "foo({\n 'a': 1\n },\n 10);") + bt('(["foo","bar"]).each(function(i) {return i;});', + '(["foo", "bar"]).each(function(i) {\n return i;\n});') + bt('(function(i) {return i;})();', + '(function(i) {\n return i;\n})();') + bt( "test( /*Argument 1*/ {\n" + + " 'Value1': '1'\n" + + "}, /*Argument 2\n" + + " */ {\n" + + " 'Value2': '2'\n" + + "});", + # expected + "test( /*Argument 1*/ {\n" + + " 'Value1': '1'\n" + + " },\n" + + " /*Argument 2\n" + + " */\n" + + " {\n" + + " 'Value2': '2'\n" + + " });") + bt( "test(\n" + + "/*Argument 1*/ {\n" + + " 'Value1': '1'\n" + + "},\n" + + "/*Argument 2\n" + + " */ {\n" + + " 'Value2': '2'\n" + + "});", + # expected + "test(\n" + + " /*Argument 1*/\n" + + " {\n" + + " 'Value1': '1'\n" + + " },\n" + + " /*Argument 2\n" + + " */\n" + + " {\n" + + " 'Value2': '2'\n" + + " });") + bt( "test( /*Argument 1*/\n" + + "{\n" + + " 'Value1': '1'\n" + + "}, /*Argument 2\n" + + " */\n" + + "{\n" + + " 'Value2': '2'\n" + + "});", + # expected + "test( /*Argument 1*/\n" + + " {\n" + + " 'Value1': '1'\n" + + " },\n" + + " /*Argument 2\n" + + " */\n" + + " {\n" + + " 'Value2': '2'\n" + + " });") + # END tests for brace position + + self.reset_options(); + #============================================================ + test_fragment('roo = {\n /*\n ****\n FOO\n ****\n */\n BAR: 0\n};') + test_fragment("if (zz) {\n // ....\n}\n(function") + + self.reset_options(); + #============================================================ + self.options.preserve_newlines = True; + bt('var a = 42; // foo\n\nvar b;') + bt('var a = 42; // foo\n\n\nvar b;') + bt("var a = 'foo' +\n 'bar';") + bt("var a = \"foo\" +\n \"bar\";") + + bt('"foo""bar""baz"', '"foo"\n"bar"\n"baz"') + bt("'foo''bar''baz'", "'foo'\n'bar'\n'baz'") + bt("{\n get foo() {}\n}") + bt("{\n var a = get\n foo();\n}") + bt("{\n set foo() {}\n}") + bt("{\n var a = set\n foo();\n}") + bt("var x = {\n get function()\n}") + bt("var x = {\n set function()\n}") + + # According to my current research get/set have no special meaning outside of an object literal + bt("var x = set\n\na() {}", "var x = set\n\na() {}") + bt("var x = set\n\nfunction() {}", "var x = set\n\nfunction() {}") + + bt('') + bt(' + bt('for () /abc/.test()') + bt('if (k) /aaa/m.test(v) && l();') + bt('switch (true) {\n case /swf/i.test(foo):\n bar();\n}') + bt('createdAt = {\n type: Date,\n default: Date.now\n}') + bt('switch (createdAt) {\n case a:\n Date,\n default:\n Date.now\n}') + + bt('return function();') + bt('var a = function();') + bt('var a = 5 + function();') + + bt('{\n foo // something\n ,\n bar // something\n baz\n}') + bt('function a(a) {} function b(b) {} function c(c) {}', 'function a(a) {}\n\nfunction b(b) {}\n\nfunction c(c) {}') + + + bt('import foo.*;', 'import foo.*;') # actionscript's import + test_fragment('function f(a: a, b: b)') # actionscript + bt('foo(a, function() {})') + bt('foo(a, /regex/)') + + bt('/* foo */\n"x"') + + self.reset_options(); + #============================================================ + self.options.break_chained_methods = False + self.options.preserve_newlines = False + bt('foo\n.bar()\n.baz().cucumber(fat)', 'foo.bar().baz().cucumber(fat)') + bt('foo\n.bar()\n.baz().cucumber(fat); foo.bar().baz().cucumber(fat)', 'foo.bar().baz().cucumber(fat);\nfoo.bar().baz().cucumber(fat)') + bt('foo\n.bar()\n.baz().cucumber(fat)\n foo.bar().baz().cucumber(fat)', 'foo.bar().baz().cucumber(fat)\nfoo.bar().baz().cucumber(fat)') + bt('this\n.something = foo.bar()\n.baz().cucumber(fat)', 'this.something = foo.bar().baz().cucumber(fat)') + bt('this.something.xxx = foo.moo.bar()') + bt('this\n.something\n.xxx = foo.moo\n.bar()', 'this.something.xxx = foo.moo.bar()') + + self.options.break_chained_methods = False + self.options.preserve_newlines = True + bt('foo\n.bar()\n.baz().cucumber(fat)', 'foo\n .bar()\n .baz().cucumber(fat)') + bt('foo\n.bar()\n.baz().cucumber(fat); foo.bar().baz().cucumber(fat)', 'foo\n .bar()\n .baz().cucumber(fat);\nfoo.bar().baz().cucumber(fat)') + bt('foo\n.bar()\n.baz().cucumber(fat)\n foo.bar().baz().cucumber(fat)', 'foo\n .bar()\n .baz().cucumber(fat)\nfoo.bar().baz().cucumber(fat)') + bt('this\n.something = foo.bar()\n.baz().cucumber(fat)', 'this\n .something = foo.bar()\n .baz().cucumber(fat)') + bt('this.something.xxx = foo.moo.bar()') + bt('this\n.something\n.xxx = foo.moo\n.bar()', 'this\n .something\n .xxx = foo.moo\n .bar()') + + self.options.break_chained_methods = True + self.options.preserve_newlines = False + bt('foo\n.bar()\n.baz().cucumber(fat)', 'foo.bar()\n .baz()\n .cucumber(fat)') + bt('foo\n.bar()\n.baz().cucumber(fat); foo.bar().baz().cucumber(fat)', 'foo.bar()\n .baz()\n .cucumber(fat);\nfoo.bar()\n .baz()\n .cucumber(fat)') + bt('foo\n.bar()\n.baz().cucumber(fat)\n foo.bar().baz().cucumber(fat)', 'foo.bar()\n .baz()\n .cucumber(fat)\nfoo.bar()\n .baz()\n .cucumber(fat)') + bt('this\n.something = foo.bar()\n.baz().cucumber(fat)', 'this.something = foo.bar()\n .baz()\n .cucumber(fat)') + bt('this.something.xxx = foo.moo.bar()') + bt('this\n.something\n.xxx = foo.moo\n.bar()', 'this.something.xxx = foo.moo.bar()') + + self.options.break_chained_methods = True + self.options.preserve_newlines = True + bt('foo\n.bar()\n.baz().cucumber(fat)', 'foo\n .bar()\n .baz()\n .cucumber(fat)') + bt('foo\n.bar()\n.baz().cucumber(fat); foo.bar().baz().cucumber(fat)', 'foo\n .bar()\n .baz()\n .cucumber(fat);\nfoo.bar()\n .baz()\n .cucumber(fat)') + bt('foo\n.bar()\n.baz().cucumber(fat)\n foo.bar().baz().cucumber(fat)', 'foo\n .bar()\n .baz()\n .cucumber(fat)\nfoo.bar()\n .baz()\n .cucumber(fat)') + bt('this\n.something = foo.bar()\n.baz().cucumber(fat)', 'this\n .something = foo.bar()\n .baz()\n .cucumber(fat)') + bt('this.something.xxx = foo.moo.bar()') + bt('this\n.something\n.xxx = foo.moo\n.bar()', 'this\n .something\n .xxx = foo.moo\n .bar()') + + self.reset_options(); + #============================================================ + # Line wrap test intputs + #..............---------1---------2---------3---------4---------5---------6---------7 + #..............1234567890123456789012345678901234567890123456789012345678901234567890 + wrap_input_1=('foo.bar().baz().cucumber((fat && "sassy") || (leans && mean));\n' + + 'Test_very_long_variable_name_this_should_never_wrap\n.but_this_can\n' + + 'return between_return_and_expression_should_never_wrap.but_this_can\n' + + 'throw between_throw_and_expression_should_never_wrap.but_this_can\n' + + 'if (wraps_can_occur && inside_an_if_block) that_is_\n.okay();\n' + + 'object_literal = {\n' + + ' propertx: first_token + 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap + but_this_can,\n' + + ' propertz: first_token_should_never_wrap + !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" + "but_this_can"\n' + + '}') + + #..............---------1---------2---------3---------4---------5---------6---------7 + #..............1234567890123456789012345678901234567890123456789012345678901234567890 + wrap_input_2=('{\n' + + ' foo.bar().baz().cucumber((fat && "sassy") || (leans && mean));\n' + + ' Test_very_long_variable_name_this_should_never_wrap\n.but_this_can\n' + + ' return between_return_and_expression_should_never_wrap.but_this_can\n' + + ' throw between_throw_and_expression_should_never_wrap.but_this_can\n' + + ' if (wraps_can_occur && inside_an_if_block) that_is_\n.okay();\n' + + ' object_literal = {\n' + + ' propertx: first_token + 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap + but_this_can,\n' + + ' propertz: first_token_should_never_wrap + !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" + "but_this_can"\n' + + ' }' + + '}') + + self.options.preserve_newlines = False + self.options.wrap_line_length = 0 + #..............---------1---------2---------3---------4---------5---------6---------7 + #..............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_1, + # expected # + 'foo.bar().baz().cucumber((fat && "sassy") || (leans && mean));\n' + + 'Test_very_long_variable_name_this_should_never_wrap.but_this_can\n' + + 'return between_return_and_expression_should_never_wrap.but_this_can\n' + + 'throw between_throw_and_expression_should_never_wrap.but_this_can\n' + + 'if (wraps_can_occur && inside_an_if_block) that_is_.okay();\n' + + 'object_literal = {\n' + + ' propertx: first_token + 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap + but_this_can,\n' + + ' propertz: first_token_should_never_wrap + !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" + "but_this_can"\n' + + '}') + + self.options.wrap_line_length = 70 + #..............---------1---------2---------3---------4---------5---------6---------7 + #..............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_1, + # expected # + 'foo.bar().baz().cucumber((fat && "sassy") || (leans && mean));\n' + + 'Test_very_long_variable_name_this_should_never_wrap.but_this_can\n' + + 'return between_return_and_expression_should_never_wrap.but_this_can\n' + + 'throw between_throw_and_expression_should_never_wrap.but_this_can\n' + + 'if (wraps_can_occur && inside_an_if_block) that_is_.okay();\n' + + 'object_literal = {\n' + + ' propertx: first_token + 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap + but_this_can,\n' + + ' propertz: first_token_should_never_wrap + !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" + "but_this_can"\n' + + '}') + + self.options.wrap_line_length = 40 + #..............---------1---------2---------3---------4---------5---------6---------7 + #..............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_1, + # expected # + 'foo.bar().baz().cucumber((fat &&\n' + + ' "sassy") || (leans && mean));\n' + + 'Test_very_long_variable_name_this_should_never_wrap\n' + + ' .but_this_can\n' + + 'return between_return_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + 'throw between_throw_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + 'if (wraps_can_occur &&\n' + + ' inside_an_if_block) that_is_.okay();\n' + + 'object_literal = {\n' + + ' propertx: first_token +\n' + + ' 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap +\n' + + ' but_this_can,\n' + + ' propertz: first_token_should_never_wrap +\n' + + ' !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" +\n' + + ' "but_this_can"\n' + + '}') + + self.options.wrap_line_length = 41 + # NOTE: wrap is only best effort - line continues until next wrap point is found. + #..............---------1---------2---------3---------4---------5---------6---------7 + #..............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_1, + # expected # + 'foo.bar().baz().cucumber((fat && "sassy") ||\n' + + ' (leans && mean));\n' + + 'Test_very_long_variable_name_this_should_never_wrap\n' + + ' .but_this_can\n' + + 'return between_return_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + 'throw between_throw_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + 'if (wraps_can_occur &&\n' + + ' inside_an_if_block) that_is_.okay();\n' + + 'object_literal = {\n' + + ' propertx: first_token +\n' + + ' 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap +\n' + + ' but_this_can,\n' + + ' propertz: first_token_should_never_wrap +\n' + + ' !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" +\n' + + ' "but_this_can"\n' + + '}') + + + self.options.wrap_line_length = 45 + # NOTE: wrap is only best effort - line continues until next wrap point is found. + #..............---------1---------2---------3---------4---------5---------6---------7 + #..............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_2, + # expected # + '{\n' + + ' foo.bar().baz().cucumber((fat && "sassy") ||\n' + + ' (leans && mean));\n' + + ' Test_very_long_variable_name_this_should_never_wrap\n' + + ' .but_this_can\n' + + ' return between_return_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + ' throw between_throw_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + ' if (wraps_can_occur &&\n' + + ' inside_an_if_block) that_is_.okay();\n' + + ' object_literal = {\n' + + ' propertx: first_token +\n' + + ' 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap +\n' + + ' but_this_can,\n' + + ' propertz: first_token_should_never_wrap +\n' + + ' !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" +\n' + + ' "but_this_can"\n' + + ' }\n'+ + '}') + + self.options.preserve_newlines = True + self.options.wrap_line_length = 0 + #..............---------1---------2---------3---------4---------5---------6---------7 + #..............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_1, + # expected # + 'foo.bar().baz().cucumber((fat && "sassy") || (leans && mean));\n' + + 'Test_very_long_variable_name_this_should_never_wrap\n' + + ' .but_this_can\n' + + 'return between_return_and_expression_should_never_wrap.but_this_can\n' + + 'throw between_throw_and_expression_should_never_wrap.but_this_can\n' + + 'if (wraps_can_occur && inside_an_if_block) that_is_\n' + + ' .okay();\n' + + 'object_literal = {\n' + + ' propertx: first_token + 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap + but_this_can,\n' + + ' propertz: first_token_should_never_wrap + !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" + "but_this_can"\n' + + '}') + + + self.options.wrap_line_length = 70 + #..............---------1---------2---------3---------4---------5---------6---------7 + #..............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_1, + # expected # + 'foo.bar().baz().cucumber((fat && "sassy") || (leans && mean));\n' + + 'Test_very_long_variable_name_this_should_never_wrap\n' + + ' .but_this_can\n' + + 'return between_return_and_expression_should_never_wrap.but_this_can\n' + + 'throw between_throw_and_expression_should_never_wrap.but_this_can\n' + + 'if (wraps_can_occur && inside_an_if_block) that_is_\n' + + ' .okay();\n' + + 'object_literal = {\n' + + ' propertx: first_token + 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap + but_this_can,\n' + + ' propertz: first_token_should_never_wrap + !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" + "but_this_can"\n' + + '}') + + + self.options.wrap_line_length = 40 + #..............---------1---------2---------3---------4---------5---------6---------7 + #..............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_1, + # expected # + 'foo.bar().baz().cucumber((fat &&\n' + + ' "sassy") || (leans && mean));\n' + + 'Test_very_long_variable_name_this_should_never_wrap\n' + + ' .but_this_can\n' + + 'return between_return_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + 'throw between_throw_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + 'if (wraps_can_occur &&\n' + + ' inside_an_if_block) that_is_\n' + + ' .okay();\n' + + 'object_literal = {\n' + + ' propertx: first_token +\n' + + ' 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap +\n' + + ' but_this_can,\n' + + ' propertz: first_token_should_never_wrap +\n' + + ' !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" +\n' + + ' "but_this_can"\n' + + '}') + + self.options.wrap_line_length = 41 + # NOTE: wrap is only best effort - line continues until next wrap point is found. + #..............---------1---------2---------3---------4---------5---------6---------7 + #..............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_1, + # expected # + 'foo.bar().baz().cucumber((fat && "sassy") ||\n' + + ' (leans && mean));\n' + + 'Test_very_long_variable_name_this_should_never_wrap\n' + + ' .but_this_can\n' + + 'return between_return_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + 'throw between_throw_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + 'if (wraps_can_occur &&\n' + + ' inside_an_if_block) that_is_\n' + + ' .okay();\n' + + 'object_literal = {\n' + + ' propertx: first_token +\n' + + ' 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap +\n' + + ' but_this_can,\n' + + ' propertz: first_token_should_never_wrap +\n' + + ' !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" +\n' + + ' "but_this_can"\n' + + '}') + + self.options.wrap_line_length = 45 + # NOTE: wrap is only best effort - line continues until next wrap point is found. + #..............---------1---------2---------3---------4---------5---------6---------7 + #..............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_2, + # expected # + '{\n' + + ' foo.bar().baz().cucumber((fat && "sassy") ||\n' + + ' (leans && mean));\n' + + ' Test_very_long_variable_name_this_should_never_wrap\n' + + ' .but_this_can\n' + + ' return between_return_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + ' throw between_throw_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + ' if (wraps_can_occur &&\n' + + ' inside_an_if_block) that_is_\n' + + ' .okay();\n' + + ' object_literal = {\n' + + ' propertx: first_token +\n' + + ' 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap +\n' + + ' but_this_can,\n' + + ' propertz: first_token_should_never_wrap +\n' + + ' !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" +\n' + + ' "but_this_can"\n' + + ' }\n'+ + '}') + + self.reset_options(); + #============================================================ + self.options.preserve_newlines = False + bt('if (foo) // comment\n bar();') + bt('if (foo) // comment\n (bar());') + bt('if (foo) // comment\n (bar());') + bt('if (foo) // comment\n /asdf/;') + bt('this.oa = new OAuth(\n' + + ' _requestToken,\n' + + ' _accessToken,\n' + + ' consumer_key\n' + + ');', + 'this.oa = new OAuth(_requestToken, _accessToken, consumer_key);') + bt('foo = {\n x: y, // #44\n w: z // #44\n}') + bt('switch (x) {\n case "a":\n // comment on newline\n break;\n case "b": // comment on same line\n break;\n}') + bt('this.type =\n this.options =\n // comment\n this.enabled null;', + 'this.type = this.options =\n // comment\n this.enabled null;') + bt('someObj\n .someFunc1()\n // This comment should not break the indent\n .someFunc2();', + 'someObj.someFunc1()\n // This comment should not break the indent\n .someFunc2();') + + bt('if (true ||\n!true) return;', 'if (true || !true) return;') + + # these aren't ready yet. + #bt('if (foo) // comment\n bar() /*i*/ + baz() /*j\n*/ + asdf();') + bt('if\n(foo)\nif\n(bar)\nif\n(baz)\nwhee();\na();', + 'if (foo)\n if (bar)\n if (baz) whee();\na();') + bt('if\n(foo)\nif\n(bar)\nif\n(baz)\nwhee();\nelse\na();', + 'if (foo)\n if (bar)\n if (baz) whee();\n else a();') + bt('if (foo)\nbar();\nelse\ncar();', + 'if (foo) bar();\nelse car();') + + bt('if (foo) if (bar) if (baz);\na();', + 'if (foo)\n if (bar)\n if (baz);\na();') + bt('if (foo) if (bar) if (baz) whee();\na();', + 'if (foo)\n if (bar)\n if (baz) whee();\na();') + bt('if (foo) a()\nif (bar) if (baz) whee();\na();', + 'if (foo) a()\nif (bar)\n if (baz) whee();\na();') + bt('if (foo);\nif (bar) if (baz) whee();\na();', + 'if (foo);\nif (bar)\n if (baz) whee();\na();') + bt('if (options)\n' + + ' for (var p in options)\n' + + ' this[p] = options[p];', + 'if (options)\n'+ + ' for (var p in options) this[p] = options[p];') + bt('if (options) for (var p in options) this[p] = options[p];', + 'if (options)\n for (var p in options) this[p] = options[p];') + + bt('if (options) do q(); while (b());', + 'if (options)\n do q(); while (b());') + bt('if (options) while (b()) q();', + 'if (options)\n while (b()) q();') + bt('if (options) do while (b()) q(); while (a());', + 'if (options)\n do\n while (b()) q(); while (a());') + + bt('function f(a, b, c,\nd, e) {}', + 'function f(a, b, c, d, e) {}') + + bt('function f(a,b) {if(a) b()}function g(a,b) {if(!a) b()}', + 'function f(a, b) {\n if (a) b()\n}\n\nfunction g(a, b) {\n if (!a) b()\n}') + bt('function f(a,b) {if(a) b()}\n\n\n\nfunction g(a,b) {if(!a) b()}', + 'function f(a, b) {\n if (a) b()\n}\n\nfunction g(a, b) {\n if (!a) b()\n}') + # This is not valid syntax, but still want to behave reasonably and not side-effect + bt('(if(a) b())(if(a) b())', + '(\n if (a) b())(\n if (a) b())') + bt('(if(a) b())\n\n\n(if(a) b())', + '(\n if (a) b())\n(\n if (a) b())') + + # space between functions + bt('/*\n * foo\n */\nfunction foo() {}') + bt('// a nice function\nfunction foo() {}') + bt('function foo() {}\nfunction foo() {}', + 'function foo() {}\n\nfunction foo() {}' + ) + + bt('[\n function() {}\n]') + + + bt("if\n(a)\nb();", "if (a) b();") + bt('var a =\nfoo', 'var a = foo') + bt('var a = {\n"a":1,\n"b":2}', "var a = {\n \"a\": 1,\n \"b\": 2\n}") + bt("var a = {\n'a':1,\n'b':2}", "var a = {\n 'a': 1,\n 'b': 2\n}") + bt('var a = /*i*/ "b";') + bt('var a = /*i*/\n"b";', 'var a = /*i*/ "b";') + bt('var a = /*i*/\nb;', 'var a = /*i*/ b;') + bt('{\n\n\n"x"\n}', '{\n "x"\n}') + bt('if(a &&\nb\n||\nc\n||d\n&&\ne) e = f', 'if (a && b || c || d && e) e = f') + bt('if(a &&\n(b\n||\nc\n||d)\n&&\ne) e = f', 'if (a && (b || c || d) && e) e = f') + test_fragment('\n\n"x"', '"x"') + bt('a = 1;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nb = 2;', + 'a = 1;\nb = 2;') + + + self.options.preserve_newlines = True + bt('if (foo) // comment\n bar();') + bt('if (foo) // comment\n (bar());') + bt('if (foo) // comment\n (bar());') + bt('if (foo) // comment\n /asdf/;') + bt('this.oa = new OAuth(\n' + + ' _requestToken,\n' + + ' _accessToken,\n' + + ' consumer_key\n' + + ');') + bt('foo = {\n x: y, // #44\n w: z // #44\n}') + bt('switch (x) {\n case "a":\n // comment on newline\n break;\n case "b": // comment on same line\n break;\n}') + bt('this.type =\n this.options =\n // comment\n this.enabled null;') + bt('someObj\n .someFunc1()\n // This comment should not break the indent\n .someFunc2();') + + bt('if (true ||\n!true) return;', 'if (true ||\n !true) return;') + + # these aren't ready yet. + # bt('if (foo) // comment\n bar() /*i*/ + baz() /*j\n*/ + asdf();') + bt('if\n(foo)\nif\n(bar)\nif\n(baz)\nwhee();\na();', + 'if (foo)\n if (bar)\n if (baz)\n whee();\na();') + bt('if\n(foo)\nif\n(bar)\nif\n(baz)\nwhee();\nelse\na();', + 'if (foo)\n if (bar)\n if (baz)\n whee();\n else\n a();') + bt('if (foo)\nbar();\nelse\ncar();', + 'if (foo)\n bar();\nelse\n car();') + bt('if (foo) bar();\nelse\ncar();', + 'if (foo) bar();\nelse\n car();') + + bt('if (foo) if (bar) if (baz);\na();', + 'if (foo)\n if (bar)\n if (baz);\na();') + bt('if (foo) if (bar) if (baz) whee();\na();', + 'if (foo)\n if (bar)\n if (baz) whee();\na();') + bt('if (foo) a()\nif (bar) if (baz) whee();\na();', + 'if (foo) a()\nif (bar)\n if (baz) whee();\na();') + bt('if (foo);\nif (bar) if (baz) whee();\na();', + 'if (foo);\nif (bar)\n if (baz) whee();\na();') + bt('if (options)\n' + + ' for (var p in options)\n' + + ' this[p] = options[p];') + bt('if (options) for (var p in options) this[p] = options[p];', + 'if (options)\n for (var p in options) this[p] = options[p];') + + bt('if (options) do q(); while (b());', + 'if (options)\n do q(); while (b());') + bt('if (options) do; while (b());', + 'if (options)\n do; while (b());') + bt('if (options) while (b()) q();', + 'if (options)\n while (b()) q();') + bt('if (options) do while (b()) q(); while (a());', + 'if (options)\n do\n while (b()) q(); while (a());') + + bt('function f(a, b, c,\nd, e) {}', + 'function f(a, b, c,\n d, e) {}') + + bt('function f(a,b) {if(a) b()}function g(a,b) {if(!a) b()}', + 'function f(a, b) {\n if (a) b()\n}\n\nfunction g(a, b) {\n if (!a) b()\n}') + bt('function f(a,b) {if(a) b()}\n\n\n\nfunction g(a,b) {if(!a) b()}', + 'function f(a, b) {\n if (a) b()\n}\n\n\n\nfunction g(a, b) {\n if (!a) b()\n}') + # This is not valid syntax, but still want to behave reasonably and not side-effect + bt('(if(a) b())(if(a) b())', + '(\n if (a) b())(\n if (a) b())') + bt('(if(a) b())\n\n\n(if(a) b())', + '(\n if (a) b())\n\n\n(\n if (a) b())') + + + bt("if\n(a)\nb();", "if (a)\n b();") + bt('var a =\nfoo', 'var a =\n foo') + bt('var a = {\n"a":1,\n"b":2}', "var a = {\n \"a\": 1,\n \"b\": 2\n}") + bt("var a = {\n'a':1,\n'b':2}", "var a = {\n 'a': 1,\n 'b': 2\n}") + bt('var a = /*i*/ "b";') + bt('var a = /*i*/\n"b";', 'var a = /*i*/\n "b";') + bt('var a = /*i*/\nb;', 'var a = /*i*/\n b;') + bt('{\n\n\n"x"\n}', '{\n\n\n "x"\n}') + bt('if(a &&\nb\n||\nc\n||d\n&&\ne) e = f', 'if (a &&\n b ||\n c ||\n d &&\n e) e = f') + bt('if(a &&\n(b\n||\nc\n||d)\n&&\ne) e = f', 'if (a &&\n (b ||\n c ||\n d) &&\n e) e = f') + test_fragment('\n\n"x"', '"x"') + # this beavior differs between js and python, defaults to unlimited in js, 10 in python + bt('a = 1;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nb = 2;', + 'a = 1;\n\n\n\n\n\n\n\n\n\nb = 2;') + self.options.max_preserve_newlines = 8; + bt('a = 1;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nb = 2;', + 'a = 1;\n\n\n\n\n\n\n\nb = 2;') + + self.reset_options(); + #============================================================ + + + def decodesto(self, input, expectation=None): + if expectation == None: + expectation = input + + self.assertMultiLineEqual( + jsbeautifier.beautify(input, self.options), expectation) + + # if the expected is different from input, run it again + # expected output should be unchanged when run twice. + if not expectation == None: + self.assertMultiLineEqual( + jsbeautifier.beautify(expectation, self.options), expectation) + + # Everywhere we do newlines, they should be replaced with opts.eol + self.options.eol = '\r\\n'; + expectation = expectation.replace('\n', '\r\n') + self.assertMultiLineEqual( + jsbeautifier.beautify(input, self.options), expectation) + if input.find('\n') != -1: + input = input.replace('\n', '\r\n') + self.assertMultiLineEqual( + jsbeautifier.beautify(input, self.options), expectation) + # Ensure support for auto eol detection + self.options.eol = 'auto' + self.assertMultiLineEqual( + jsbeautifier.beautify(input, self.options), expectation) + self.options.eol = '\n' + + def wrap(self, text): + return self.wrapregex.sub(' \\1', text) + + def bt(self, input, expectation=None): + if expectation == None: + expectation = input + + self.decodesto(input, expectation) + # If we set raw, input should be unchanged + self.options.test_output_raw = True + if self.options.end_with_newline: + elf.decodesto(input, input) + self.options.test_output_raw = False + + current_indent_size = None + if self.options.js and self.options.js['indent_size']: + current_indent_size = self.options.js['indent_size'] + + if not current_indent_size: + current_indent_size = self.options.indent_size + + if current_indent_size == 4 and input: + wrapped_input = '{\n%s\n foo = bar;\n}' % self.wrap(input) + wrapped_expect = '{\n%s\n foo = bar;\n}' % self.wrap(expectation) + self.decodesto(wrapped_input, wrapped_expect) + + # If we set raw, input should be unchanged + self.options.test_output_raw = True + if self.options.end_with_newline: + elf.decodesto(wrapped_input, wrapped_input) + self.options.test_output_raw = False + + +if __name__ == '__main__': + unittest.main() diff --git a/node_modules/js-beautify/test/data/javascript/tests.js b/node_modules/js-beautify/test/data/javascript/tests.js new file mode 100644 index 0000000..bb78f75 --- /dev/null +++ b/node_modules/js-beautify/test/data/javascript/tests.js @@ -0,0 +1,3083 @@ +/* + The MIT License (MIT) + + Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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. +*/ + +var inputlib = require('./inputlib'); + +exports.test_data = { + default_options: [ + { name: "indent_size", value: "4" }, + { name: "indent_char", value: "' '" }, + { name: "preserve_newlines", value: "true" }, + { name: "jslint_happy", value: "false" }, + { name: "keep_array_indentation", value: "false" }, + { name: "brace_style", value: "'collapse'" }, + { name: "operator_position", value: "'before-newline'" } + ], + groups: [{ + name: "Unicode Support", + description: "", + tests: [{ + unchanged: "var ' + unicode_char(3232) + '_' + unicode_char(3232) + ' = \"hi\";" + }, { + unchanged: [ + "var ' + unicode_char(228) + 'x = {", + " ' + unicode_char(228) + 'rgerlich: true", + "};" + ] + }] + }, { + name: "Test template and continuation strings", + description: "", + tests: [ + { unchanged: '`This is a ${template} string.`' }, + { unchanged: '`This\n is\n a\n ${template}\n string.`' }, + { unchanged: 'a = `This is a continuation\\\\\nstring.`' }, + { unchanged: 'a = "This is a continuation\\\\\nstring."' }, + { unchanged: '`SELECT\n nextval(\\\'${this.options.schema ? `${this.options.schema}.` : \\\'\\\'}"${this.tableName}_${this.autoIncrementField}_seq"\\\'::regclass\n ) nextval;`' }, + { + comment: 'Tests for #1030', + unchanged: [ + 'const composeUrl = (host) => {', + ' return `${host `test`}`;', + '};' + ] + }, { + unchanged: [ + 'const composeUrl = (host, api, key, data) => {', + ' switch (api) {', + ' case "Init":', + ' return `${host}/vwapi/Init?VWID=${key}&DATA=${encodeURIComponent(', + ' Object.keys(data).map((k) => `${k}=${ data[k]}` ).join(";")', + ' )}`;', + ' case "Pay":', + ' return `${host}/vwapi/Pay?SessionId=${par}`;', + ' };', + '};' + ] + } + ] + }, { + name: "ES7 Decorators", + description: "Permit ES7 decorators, which are invoked with a leading \"@\".", + tests: [ + { unchanged: '@foo' }, + { unchanged: '@foo(bar)' }, + { + unchanged: [ + '@foo(function(k, v) {', + ' implementation();', + '})' + ] + } + ] + }, { + name: "ES7 exponential", + description: "ES7 exponential", + tests: [ + { unchanged: 'x ** 2' }, + { unchanged: 'x ** -2' } + ] + }, { + name: "Spread operator", + description: "Spread operator", + options: [ + { name: 'brace_style', value: '"collapse,preserve-inline"' } + ], + tests: [ + { unchanged: 'const m = { ...item, c: 3 };' }, + { unchanged: 'const m = {\n ...item,\n c: 3\n};' }, + { unchanged: 'const m = { c: 3, ...item };' }, + { unchanged: 'const m = [...item, 3];' }, + { unchanged: 'const m = [3, ...item];' } + ] + }, { + name: "Object literal shorthand functions", + description: "Object literal shorthand functions", + tests: [ + { unchanged: 'return {\n foo() {\n return 42;\n }\n}' }, + { + unchanged: [ + 'var foo = {', + ' * bar() {', + ' yield 42;', + ' }', + '};' + ] + }, + { + input: 'var foo = {bar(){return 42;},*barGen(){yield 42;}};', + output: ['var foo = {', + ' bar() {', + ' return 42;', + ' },', + ' * barGen() {', + ' yield 42;', + ' }', + '};' + ] + }, { + comment: 'also handle generator shorthand in class - #1013', + unchanged: [ + 'class A {', + ' fn() {', + ' return true;', + ' }', + '', + ' * gen() {', + ' return true;', + ' }', + '}' + ] + }, { + unchanged: [ + 'class A {', + ' * gen() {', + ' return true;', + ' }', + '', + ' fn() {', + ' return true;', + ' }', + '}' + ] + } + ] + }, { + name: "End With Newline", + description: "", + matrix: [{ + options: [ + { name: "end_with_newline", value: "true" } + ], + eof: '\n' + }, { + options: [ + { name: "end_with_newline", value: "false" } + ], + eof: '' + } + + ], + tests: [ + { fragment: true, input: '', output: '{{eof}}' }, + { fragment: true, input: ' return .5', output: ' return .5{{eof}}' }, + { fragment: true, input: ' \n\nreturn .5\n\n\n\n', output: ' return .5{{eof}}' }, + { fragment: true, input: '\n', output: '{{eof}}' } + ], + }, { + name: "Support simple language specific option inheritance/overriding", + description: "Support simple language specific option inheritance/overriding", + matrix: [{ + options: [ + { name: "js", value: "{ 'indent_size': 3 }" }, + { name: "css", value: "{ 'indent_size': 5 }" } + ], + j: ' ' + }, + { + options: [ + { name: "html", value: "{ 'js': { 'indent_size': 3 }, 'css': { 'indent_size': 5 } }" } + ], + j: ' ' + }, + { + options: [ + { name: "indent_size", value: "9" }, + { name: "html", value: "{ 'js': { 'indent_size': 3 }, 'css': { 'indent_size': 5 }, 'indent_size': 2}" }, + { name: "js", value: "{ 'indent_size': 4 }" }, + { name: "css", value: "{ 'indent_size': 3 }" } + ], + j: ' ' + } + ], + tests: [{ + unchanged: [ + 'if (a == b) {', + '{{j}}test();', + '}' + ] + }, ] + }, { + name: "Brace style permutations", + description: "", + template: "< >", + matrix: [ + // brace_style collapse,preserve-inline - Should preserve if no newlines + { + options: [ + { name: "brace_style", value: "'collapse,preserve-inline'" } + ], + ibo: '', + iao: '', + ibc: '', + iac: '', + obo: ' ', + oao: ' ', + obc: ' ', + oac: ' ' + }, + { + options: [ + { name: "brace_style", value: "'collapse,preserve-inline'" } + ], + ibo: '\n', + iao: '\n', + ibc: '\n', + iac: '\n', + obo: ' ', + oao: '\n ', + obc: '\n', + oac: ' ' + }, + + // brace_style collapse - Shouldn't preserve if no newlines (uses collapse styling) + { + options: [ + { name: "brace_style", value: "'collapse'" } + ], + ibo: '', + iao: '', + ibc: '', + iac: '', + obo: ' ', + oao: '\n ', + obc: '\n', + oac: ' ' + }, + { + options: [ + { name: "brace_style", value: "'collapse'" } + ], + ibo: '\n', + iao: '\n', + ibc: '\n', + iac: '\n', + obo: ' ', + oao: '\n ', + obc: '\n', + oac: ' ' + }, + ], + tests: [{ + input: 'var a ={a: 2};\nvar a ={a: 2};', + output: 'var a ={a: 2};\nvar a ={a: 2};' + }, + // { + // input: 'var a ={a:{a:{a:2}}};\nvar a ={a:{a:{a:2}}};', + // output: 'var a ={a:{a:{a: 2}}};\nvar a ={a:{a:{a: 2}}};' + // }, + { + input: '//case 1\nif (a == 1){}\n//case 2\nelse if (a == 2){}', + output: '//case 1\nif (a == 1){}\n//case 2\nelse if (a == 2){}' + }, + { + input: 'if(1){2}else{3}', + output: 'if (1){2}else{3}' + }, + { + input: 'try{a();}' + + 'catch(b){c();}' + + 'catch(d){}' + + 'finally{e();}', + output: + // expected + 'try{a();}' + + 'catch (b){c();}' + + 'catch (d){}' + + 'finally{e();}' + } + ], + }, { + name: "Comma-first option", + description: "Put commas at the start of lines instead of the end", + matrix: [{ + options: [ + { name: "comma_first", value: "false" } + ], + c0: ',\n', + c1: ',\n ', + c2: ',\n ', + c3: ',\n ', + // edge cases where engine bails + f1: ' ,\n ' + }, { + options: [ + { name: "comma_first", value: "true" } + ], + c0: '\n, ', + c1: '\n , ', + c2: '\n , ', + c3: '\n , ', + // edge cases where engine bails + f1: ', ' + }], + tests: [ + { input: '{a:1, b:2}', output: "{\n a: 1{{c1}}b: 2\n}" }, + { input: 'var a=1, b=c[d], e=6;', output: 'var a = 1{{c1}}b = c[d]{{c1}}e = 6;' }, + { input: "for(var a=1,b=2,c=3;d<3;d++)\ne", output: "for (var a = 1, b = 2, c = 3; d < 3; d++)\n e" }, + { input: "for(var a=1,b=2,\nc=3;d<3;d++)\ne", output: "for (var a = 1, b = 2{{c2}}c = 3; d < 3; d++)\n e" }, + { unchanged: 'function foo() {\n return [\n "one"{{c2}}"two"\n ];\n}' }, + { input: 'a=[[1,2],[4,5],[7,8]]', output: "a = [\n [1, 2]{{c1}}[4, 5]{{c1}}[7, 8]\n]" }, + { input: 'a=[[1,2],[4,5],[7,8],]', output: "a = [\n [1, 2]{{c1}}[4, 5]{{c1}}[7, 8]{{c0}}]" }, + { + input: 'a=[[1,2],[4,5],function(){},[7,8]]', + output: "a = [\n [1, 2]{{c1}}[4, 5]{{c1}}function() {}{{c1}}[7, 8]\n]" + }, + { + input: 'a=[[1,2],[4,5],function(){},function(){},[7,8]]', + output: "a = [\n [1, 2]{{c1}}[4, 5]{{c1}}function() {}{{c1}}function() {}{{c1}}[7, 8]\n]" + }, + { + input: 'a=[[1,2],[4,5],function(){},[7,8]]', + output: "a = [\n [1, 2]{{c1}}[4, 5]{{c1}}function() {}{{c1}}[7, 8]\n]" + }, + { + input: 'a=[b,c,function(){},function(){},d]', + output: "a = [b, c, function() {}, function() {}, d]" + }, + { + input: 'a=[b,c,\nfunction(){},function(){},d]', + output: "a = [b, c{{c1}}function() {}{{c1}}function() {}{{c1}}d\n]" + }, + { input: 'a=[a[1],b[4],c[d[7]]]', output: "a = [a[1], b[4], c[d[7]]]" }, + { input: '[1,2,[3,4,[5,6],7],8]', output: "[1, 2, [3, 4, [5, 6], 7], 8]" }, + + { + input: '[[["1","2"],["3","4"]],[["5","6","7"],["8","9","0"]],[["1","2","3"],["4","5","6","7"],["8","9","0"]]]', + output: '[\n [\n ["1", "2"]{{c2}}["3", "4"]\n ]{{c1}}[\n ["5", "6", "7"]{{c2}}["8", "9", "0"]\n ]{{c1}}[\n ["1", "2", "3"]{{c2}}["4", "5", "6", "7"]{{c2}}["8", "9", "0"]\n ]\n]' + }, + { + input: [ + 'changeCollection.add({', + ' name: "Jonathan" // New line inserted after this line on every save', + ' , age: 25', + '});' + ], + output: [ + 'changeCollection.add({', + ' name: "Jonathan" // New line inserted after this line on every save', + ' {{f1}}age: 25', + '});' + ] + }, + { + input: [ + 'changeCollection.add(', + ' function() {', + ' return true;', + ' },', + ' function() {', + ' return true;', + ' }', + ');' + ], + output: [ + 'changeCollection.add(', + ' function() {', + ' return true;', + ' }{{c1}}function() {', + ' return true;', + ' }', + ');' + ] + }, + ], + }, { + name: "Space in parens tests", + description: "put space inside parens", + matrix: [{ + options: [ + { name: "space_in_paren", value: "false" }, + { name: "space_in_empty_paren", value: "false" }, + ], + s: '', + e: '', + }, { + options: [ + { name: "space_in_paren", value: "false" }, + { name: "space_in_empty_paren", value: "true" }, + ], + s: '', + e: '', + }, { + options: [ + { name: "space_in_paren", value: "true" }, + { name: "space_in_empty_paren", value: "false" }, + ], + s: ' ', + e: '', + }, { + options: [ + { name: "space_in_paren", value: "true" }, + { name: "space_in_empty_paren", value: "true" }, + ], + s: ' ', + e: ' ', + }], + tests: [{ + input: 'if(p) foo(a,b);', + output: 'if ({{s}}p{{s}}) foo({{s}}a, b{{s}});' + }, + { + input: 'try{while(true){willThrow()}}catch(result)switch(result){case 1:++result }', + output: 'try {\n while ({{s}}true{{s}}) {\n willThrow({{e}})\n }\n} catch ({{s}}result{{s}}) switch ({{s}}result{{s}}) {\n case 1:\n ++result\n}' + }, + { + input: '((e/((a+(b)*c)-d))^2)*5;', + output: '({{s}}({{s}}e / ({{s}}({{s}}a + ({{s}}b{{s}}) * c{{s}}) - d{{s}}){{s}}) ^ 2{{s}}) * 5;' + }, + { + input: 'function f(a,b) {if(a) b()}function g(a,b) {if(!a) b()}', + output: 'function f({{s}}a, b{{s}}) {\n if ({{s}}a{{s}}) b({{e}})\n}\n\nfunction g({{s}}a, b{{s}}) {\n if ({{s}}!a{{s}}) b({{e}})\n}' + }, + { + input: 'a=[];', + output: 'a = [{{e}}];' + }, + { + input: 'a=[b,c,d];', + output: 'a = [{{s}}b, c, d{{s}}];' + }, + { + input: 'a= f[b];', + output: 'a = f[{{s}}b{{s}}];' + }, + { + input: [ + '{', + ' files: [ {', + ' expand: true,', + ' cwd: "www/gui/",', + ' src: [ "im/design_standards/*.*" ],', + ' dest: "www/gui/build"', + ' } ]', + '}' + ], + output: [ + '{', + ' files: [{{s}}{', + ' expand: true,', + ' cwd: "www/gui/",', + ' src: [{{s}}"im/design_standards/*.*"{{s}}],', + ' dest: "www/gui/build"', + ' }{{s}}]', + '}' + ], + }, + ], + }, { + name: "operator_position option - ensure no neswlines if preserve_newlines is false", + matrix: [{ + options: [ + { name: "operator_position", value: "'before-newline'" }, + { name: "preserve_newlines", value: "false" } + ] + }, { + options: [ + { name: "operator_position", value: "'after-newline'" }, + { name: "preserve_newlines", value: "false" } + ] + }, { + options: [ + { name: "operator_position", value: "'preserve-newline'" }, + { name: "preserve_newlines", value: "false" } + ] + }], + tests: [{ + unchanged: inputlib.operator_position.sanity + }, { + input: inputlib.operator_position.comprehensive, + output: inputlib.operator_position.sanity, + }] + }, { + name: "operator_position option - set to 'before-newline' (default value)", + tests: [{ + comment: 'comprehensive, various newlines', + input: inputlib.operator_position.comprehensive, + output: [ + 'var res = a + b -', + ' c /', + ' d * e %', + ' f;', + 'var res = g & h |', + ' i ^', + ' j;', + 'var res = (k &&', + ' l ||', + ' m) ?', + ' n :', + ' o;', + 'var res = p >>', + ' q <<', + ' r >>>', + ' s;', + 'var res = t', + '', + ' ===', + ' u !== v !=', + ' w ==', + ' x >=', + ' y <= z > aa <', + ' ab;', + 'ac +', + ' -ad' + ] + }, { + comment: 'colon special case', + input: inputlib.operator_position.colon_special_case, + output: [ + 'var a = {', + ' b: bval,', + ' c: cval,', + ' d: dval', + '};', + 'var e = f ? g :', + ' h;', + 'var i = j ? k :', + ' l;' + ] + }, { + comment: 'catch-all, includes brackets and other various code', + input: inputlib.operator_position.catch_all, + output: [ + 'var d = 1;', + 'if (a === b &&', + ' c) {', + ' d = (c * everything /', + ' something_else) %', + ' b;', + ' e', + ' += d;', + '', + '} else if (!(complex && simple) ||', + ' (emotion && emotion.name === "happy")) {', + ' cryTearsOfJoy(many ||', + ' anOcean ||', + ' aRiver);', + '}' + ] + }] + }, { + name: "operator_position option - set to 'after_newline'", + options: [{ + name: "operator_position", + value: "'after-newline'" + }], + tests: [{ + comment: 'comprehensive, various newlines', + input: inputlib.operator_position.comprehensive, + output: [ + 'var res = a + b', + ' - c', + ' / d * e', + ' % f;', + 'var res = g & h', + ' | i', + ' ^ j;', + 'var res = (k', + ' && l', + ' || m)', + ' ? n', + ' : o;', + 'var res = p', + ' >> q', + ' << r', + ' >>> s;', + 'var res = t', + '', + ' === u !== v', + ' != w', + ' == x', + ' >= y <= z > aa', + ' < ab;', + 'ac', + ' + -ad' + ] + }, { + comment: 'colon special case', + input: inputlib.operator_position.colon_special_case, + output: [ + 'var a = {', + ' b: bval,', + ' c: cval,', + ' d: dval', + '};', + 'var e = f ? g', + ' : h;', + 'var i = j ? k', + ' : l;' + ] + }, { + comment: 'catch-all, includes brackets and other various code', + input: inputlib.operator_position.catch_all, + output: [ + 'var d = 1;', + 'if (a === b', + ' && c) {', + ' d = (c * everything', + ' / something_else)', + ' % b;', + ' e', + ' += d;', + '', + '} else if (!(complex && simple)', + ' || (emotion && emotion.name === "happy")) {', + ' cryTearsOfJoy(many', + ' || anOcean', + ' || aRiver);', + '}' + ] + }] + }, { + name: "operator_position option - set to 'preserve-newline'", + options: [{ + name: "operator_position", + value: "'preserve-newline'" + }], + tests: [{ + comment: 'comprehensive, various newlines', + input: inputlib.operator_position.comprehensive, + output: [ + 'var res = a + b', + ' - c /', + ' d * e', + ' %', + ' f;', + 'var res = g & h', + ' | i ^', + ' j;', + 'var res = (k &&', + ' l', + ' || m) ?', + ' n', + ' : o;', + 'var res = p', + ' >> q <<', + ' r', + ' >>> s;', + 'var res = t', + '', + ' === u !== v', + ' !=', + ' w', + ' == x >=', + ' y <= z > aa <', + ' ab;', + 'ac +', + ' -ad' + ] + }, { + comment: 'colon special case', + input: inputlib.operator_position.colon_special_case, + output: [ + 'var a = {', + ' b: bval,', + ' c: cval,', + ' d: dval', + '};', + 'var e = f ? g', + ' : h;', + 'var i = j ? k :', + ' l;' + ] + }, { + comment: 'catch-all, includes brackets and other various code', + unchanged: inputlib.operator_position.catch_all + }] + }, { + name: "Yield tests", + description: "ES6 yield tests", + tests: [ + { unchanged: 'yield /foo\\\\//;' }, + { unchanged: 'result = yield pgClient.query_(queryString);' }, + { unchanged: 'yield [1, 2]' }, + { unchanged: "yield* bar();" }, + { + comment: "yield should have no space between yield and star", + input: "yield * bar();", + output: "yield* bar();" + }, + { + comment: "yield should have space between star and generator", + input: "yield *bar();", + output: "yield* bar();" + } + ] + }, { + name: "Async / await tests", + description: "ES7 async / await tests", + tests: [ + { unchanged: "async function foo() {}" }, + { unchanged: "let w = async function foo() {}" }, + { unchanged: "async function foo() {}\nvar x = await foo();" }, + { + comment: "async function as an input to another function", + unchanged: "wrapper(async function foo() {})" + }, + { + comment: "await on inline anonymous function. should have a space after await", + input_: "async function() {\n var w = await(async function() {\n return await foo();\n })();\n}", + output: "async function() {\n var w = await (async function() {\n return await foo();\n })();\n}" + }, + { + comment: "ensure that this doesn't break anyone with the async library", + unchanged: "async.map(function(t) {})" + } + ] + }, { + name: "e4x - Test that e4x literals passed through when e4x-option is enabled", + description: "", + options: [ + { name: 'e4x', value: true } + ], + tests: [ + { input: 'xml=\n foox;', output: 'xml = \n foox;' }, + { unchanged: '' }, + { unchanged: '' }, + { unchanged: '' }, + { unchanged: '' }, + { unchanged: '' }, + + { + comment: 'Handles inline expressions', + input: 'xml=<{a} b="c">\n foox;', + output: 'xml = <{a} b="c">\n foox;' + }, + { + input: 'xml=<{a} b="c">\n \n foox;', + output: 'xml = <{a} b="c">\n \n foox;' + }, + { + comment: 'xml literals with special characters in elem names - see http://www.w3.org/TR/REC-xml/#NT-NameChar', + unchanged: 'xml = <_:.valid.xml- _:.valid.xml-="123"/>;' + }, + { + comment: 'xml literals with attributes without equal sign', + unchanged: 'xml = ;' + }, + + { + comment: 'Handles CDATA', + input: 'xml=\n foox/]]>;', + output: 'xml = \n foox/]]>;' + }, + { input: 'xml=;', output: 'xml = ;' }, + { input: 'xml=;', output: 'xml = ;' }, + + { + comment: 'JSX - working jsx from http://prettydiff.com/unit_tests/beautification_javascript_jsx.txt', + unchanged: [ + 'var ListItem = React.createClass({', + ' render: function() {', + ' return (', + '
  • ', + ' ', + ' this.props.item.name', + ' ', + '
  • ', + ' );', + ' }', + '});' + ] + }, + { + unchanged: [ + 'var List = React.createClass({', + ' renderList: function() {', + ' return this.props.items.map(function(item) {', + ' return ;', + ' });', + ' },', + '', + ' render: function() {', + ' return
      ', + ' this.renderList()', + '
    ', + ' }', + '});' + ] + }, + { + unchanged: [ + 'var Mist = React.createClass({', + ' renderList: function() {', + ' return this.props.items.map(function(item) {', + ' return {item}} key={item.id} />;', + ' });', + ' }', + '});', + ] + }, + { + unchanged: [ + '// JSX', + 'var box = ', + ' {shouldShowAnswer(user) ?', + ' no : ', + ' Text Content', + ' }', + ' ;', + 'var a = function() {', + ' return asdf;', + '};', + '', + 'var HelloMessage = React.createClass({', + ' render: function() {', + ' return
    Hello {this.props.name}
    ;', + ' }', + '});', + 'React.render(, mountNode);', + ] + }, + { + unchanged: [ + 'var Timer = React.createClass({', + ' getInitialState: function() {', + ' return {', + ' secondsElapsed: 0', + ' };', + ' },', + ' tick: function() {', + ' this.setState({', + ' secondsElapsed: this.state.secondsElapsed + 1', + ' });', + ' },', + ' componentDidMount: function() {', + ' this.interval = setInterval(this.tick, 1000);', + ' },', + ' componentWillUnmount: function() {', + ' clearInterval(this.interval);', + ' },', + ' render: function() {', + ' return (', + '
    Seconds Elapsed: {this.state.secondsElapsed}
    ', + ' );', + ' }', + '});', + 'React.render(, mountNode);' + ] + }, + { + unchanged: [ + 'var TodoList = React.createClass({', + ' render: function() {', + ' var createItem = function(itemText) {', + ' return
  • {itemText}
  • ;', + ' };', + ' return
      {this.props.items.map(createItem)}
    ;', + ' }', + '});' + ] + }, + { + unchanged: [ + 'var TodoApp = React.createClass({', + ' getInitialState: function() {', + ' return {', + ' items: [],', + ' text: \\\'\\\'', + ' };', + ' },', + ' onChange: function(e) {', + ' this.setState({', + ' text: e.target.value', + ' });', + ' },', + ' handleSubmit: function(e) {', + ' e.preventDefault();', + ' var nextItems = this.state.items.concat([this.state.text]);', + ' var nextText = \\\'\\\';', + ' this.setState({', + ' items: nextItems,', + ' text: nextText', + ' });', + ' },', + ' render: function() {', + ' return (', + '
    ', + '

    TODO

    ', + ' ', + '
    ', + ' ', + ' ', + '
    ', + '
    ', + ' );', + ' }', + '});', + 'React.render(, mountNode);' + ] + }, + { + input: [ + 'var converter = new Showdown.converter();', + 'var MarkdownEditor = React.createClass({', + ' getInitialState: function() {', + ' return {value: \\\'Type some *markdown* here!\\\'};', + ' },', + ' handleChange: function() {', + ' this.setState({value: this.refs.textarea.getDOMNode().value});', + ' },', + ' render: function() {', + ' return (', + '
    ', + '

    Input

    ', + ' ', + '

    Output

    ', + ' ', + '
    ', + ' );', + ' }', + '});', + 'React.render(, mountNode);' + + ], + output: [ + 'var converter = new Showdown.converter();', + 'var MarkdownEditor = React.createClass({', + ' getInitialState: function() {', + ' return {', + ' value: \\\'Type some *markdown* here!\\\'', + ' };', + ' },', + ' handleChange: function() {', + ' this.setState({', + ' value: this.refs.textarea.getDOMNode().value', + ' });', + ' },', + ' render: function() {', + ' return (', + '
    ', + '

    Input

    ', + ' ', + '

    Output

    ', + ' ', + '
    ', + ' );', + ' }', + '});', + 'React.render(, mountNode);' + ] + }, + { + comment: 'JSX - Not quite correct jsx formatting that still works', + input: [ + 'var content = (', + ' ', + ' );', + 'var qwer = A dropdown list Do Something Do Something Fun! Do Something Else ;', + 'render(dropdown);', + ], + output: [ + 'var content = (', + ' ', + ');', + 'var qwer = A dropdown list Do Something Do Something Fun! Do Something Else ;', + 'render(dropdown);', + ] + }, + { + comment: [ + "Handles messed up tags, as long as it isn't the same name", + "as the root tag. Also handles tags of same name as root tag", + "as long as nesting matches." + ], + input_: 'xml=;', + output: 'xml = ;' + }, + + { + comment: [ + "If xml is not terminated, the remainder of the file is treated", + "as part of the xml-literal (passed through unaltered)" + ], + fragment: true, + input_: 'xml=\nc\nc', + ' c', + '

    ', + ' );', + ' }', + '});' + ] + }, + { + unchanged: [ + 'let a = React.createClass({', + ' render() {', + ' return (', + '

    ', + ' c', + '

    ', + ' );', + ' }', + '});' + ] + }, + { + unchanged: [ + 'let a = React.createClass({', + ' render() {', + ' return (', + '

    ', + ' c', + '

    ', + ' );', + ' }', + '});' + ] + }, + { + unchanged: [ + 'let a = React.createClass({', + ' render() {', + ' return (', + ' <{e} className = {d}>', + ' c', + ' ', + ' );', + ' }', + '});' + ] + }, + { + comment: 'Issue #914 - Multiline attribute in root tag', + unchanged: [ + 'return (', + '
    {', + ' e.preventDefault()', + ' onClick()', + ' }}>', + ' {children}', + ' ', + ');' + ] + }, + { + unchanged: [ + 'return (', + ' <{', + ' a + b', + ' } href="#"', + ' onClick={e => {', + ' e.preventDefault()', + ' onClick()', + ' }}>', + ' {children}', + ' ', + ');' + ] + }, + { + input: [ + 'return (', + ' <{', + ' a + b', + ' } href="#"', + ' onClick={e => {', + ' e.preventDefault()', + ' onClick()', + ' }}>', + ' {children}', + ' ', + ' );' + ], + output: [ + 'return (', + ' <{', + ' a + b', + ' } href="#"', + ' onClick={e => {', + ' e.preventDefault()', + ' onClick()', + ' }}>', + ' {children}', + ' ', + ');' + ] + } + ] + }, { + name: "e4x disabled", + description: "", + options: [ + { name: 'e4x', value: false } + ], + tests: [{ + input_: 'xml=\n foox;', + output: 'xml = < a b = "c" > < d / > < e >\n foo < /e>x ;' + }] + }, { + name: "Multiple braces", + description: "", + template: "^^^ $$$", + options: [], + tests: [ + { input: '{{}/z/}', output: '{\n {}\n /z/\n}' } + ] + }, { + name: "Beautify preserve formatting", + description: "Allow beautifier to preserve sections", + tests: [ + { unchanged: "/* beautify preserve:start */\n/* beautify preserve:end */" }, + { unchanged: "/* beautify preserve:start */\n var a = 1;\n/* beautify preserve:end */" }, + { unchanged: "var a = 1;\n/* beautify preserve:start */\n var a = 1;\n/* beautify preserve:end */" }, + { unchanged: "/* beautify preserve:start */ {asdklgh;y;;{}dd2d}/* beautify preserve:end */" }, + { + input_: "var a = 1;\n/* beautify preserve:start */\n var a = 1;\n/* beautify preserve:end */", + output: "var a = 1;\n/* beautify preserve:start */\n var a = 1;\n/* beautify preserve:end */" + }, + { + input_: "var a = 1;\n /* beautify preserve:start */\n var a = 1;\n/* beautify preserve:end */", + output: "var a = 1;\n/* beautify preserve:start */\n var a = 1;\n/* beautify preserve:end */" + }, + { + unchanged: [ + 'var a = {', + ' /* beautify preserve:start */', + ' one : 1', + ' two : 2,', + ' three : 3,', + ' ten : 10', + ' /* beautify preserve:end */', + '};' + ] + }, + { + input: [ + 'var a = {', + '/* beautify preserve:start */', + ' one : 1,', + ' two : 2,', + ' three : 3,', + ' ten : 10', + '/* beautify preserve:end */', + '};' + ], + output: [ + 'var a = {', + ' /* beautify preserve:start */', + ' one : 1,', + ' two : 2,', + ' three : 3,', + ' ten : 10', + '/* beautify preserve:end */', + '};' + ] + }, + { + comment: 'one space before and after required, only single spaces inside.', + input: [ + 'var a = {', + '/* beautify preserve:start */', + ' one : 1,', + ' two : 2,', + ' three : 3,', + ' ten : 10', + '};' + ], + output: [ + 'var a = {', + ' /* beautify preserve:start */', + ' one: 1,', + ' two: 2,', + ' three: 3,', + ' ten: 10', + '};' + ] + }, + { + input: [ + 'var a = {', + '/*beautify preserve:start*/', + ' one : 1,', + ' two : 2,', + ' three : 3,', + ' ten : 10', + '};' + ], + output: [ + 'var a = {', + ' /*beautify preserve:start*/', + ' one: 1,', + ' two: 2,', + ' three: 3,', + ' ten: 10', + '};' + ] + }, + { + input: [ + 'var a = {', + '/*beautify preserve:start*/', + ' one : 1,', + ' two : 2,', + ' three : 3,', + ' ten : 10', + '};' + ], + output: [ + 'var a = {', + ' /*beautify preserve:start*/', + ' one: 1,', + ' two: 2,', + ' three: 3,', + ' ten: 10', + '};' + ] + }, + + { + comment: 'Directive: ignore', + unchanged: "/* beautify ignore:start */\n/* beautify ignore:end */" + }, + { unchanged: "/* beautify ignore:start */\n var a,,,{ 1;\n/* beautify ignore:end */" }, + { unchanged: "var a = 1;\n/* beautify ignore:start */\n var a = 1;\n/* beautify ignore:end */" }, + { unchanged: "/* beautify ignore:start */ {asdklgh;y;+++;dd2d}/* beautify ignore:end */" }, + { + input_: "var a = 1;\n/* beautify ignore:start */\n var a,,,{ 1;\n/* beautify ignore:end */", + output: "var a = 1;\n/* beautify ignore:start */\n var a,,,{ 1;\n/* beautify ignore:end */" + }, + { + input_: "var a = 1;\n /* beautify ignore:start */\n var a,,,{ 1;\n/* beautify ignore:end */", + output: "var a = 1;\n/* beautify ignore:start */\n var a,,,{ 1;\n/* beautify ignore:end */" + }, + { + unchanged: [ + 'var a = {', + ' /* beautify ignore:start */', + ' one : 1', + ' two : 2,', + ' three : {', + ' ten : 10', + ' /* beautify ignore:end */', + '};' + ] + }, + { + input: [ + 'var a = {', + '/* beautify ignore:start */', + ' one : 1', + ' two : 2,', + ' three : {', + ' ten : 10', + '/* beautify ignore:end */', + '};' + ], + output: [ + 'var a = {', + ' /* beautify ignore:start */', + ' one : 1', + ' two : 2,', + ' three : {', + ' ten : 10', + '/* beautify ignore:end */', + '};' + ] + }, + { + comment: 'Directives - multiple and interacting', + input: [ + 'var a = {', + '/* beautify preserve:start */', + '/* beautify preserve:start */', + ' one : 1,', + ' /* beautify preserve:end */', + ' two : 2,', + ' three : 3,', + '/* beautify preserve:start */', + ' ten : 10', + '/* beautify preserve:end */', + '};' + ], + output: [ + 'var a = {', + ' /* beautify preserve:start */', + '/* beautify preserve:start */', + ' one : 1,', + ' /* beautify preserve:end */', + ' two: 2,', + ' three: 3,', + ' /* beautify preserve:start */', + ' ten : 10', + '/* beautify preserve:end */', + '};' + ] + }, + { + input: [ + 'var a = {', + '/* beautify ignore:start */', + ' one : 1', + ' /* beautify ignore:end */', + ' two : 2,', + '/* beautify ignore:start */', + ' three : {', + ' ten : 10', + '/* beautify ignore:end */', + '};' + ], + output: [ + 'var a = {', + ' /* beautify ignore:start */', + ' one : 1', + ' /* beautify ignore:end */', + ' two: 2,', + ' /* beautify ignore:start */', + ' three : {', + ' ten : 10', + '/* beautify ignore:end */', + '};' + ] + }, + { + comment: 'Starts can occur together, ignore:end must occur alone.', + input: [ + 'var a = {', + '/* beautify ignore:start */', + ' one : 1', + ' NOTE: ignore end block does not support starting other directives', + ' This does not match the ending the ignore...', + ' /* beautify ignore:end preserve:start */', + ' two : 2,', + '/* beautify ignore:start */', + ' three : {', + ' ten : 10', + ' ==The next comment ends the starting ignore==', + '/* beautify ignore:end */', + '};' + ], + output: [ + 'var a = {', + ' /* beautify ignore:start */', + ' one : 1', + ' NOTE: ignore end block does not support starting other directives', + ' This does not match the ending the ignore...', + ' /* beautify ignore:end preserve:start */', + ' two : 2,', + '/* beautify ignore:start */', + ' three : {', + ' ten : 10', + ' ==The next comment ends the starting ignore==', + '/* beautify ignore:end */', + '};' + ] + }, + { + input: [ + 'var a = {', + '/* beautify ignore:start preserve:start */', + ' one : {', + ' /* beautify ignore:end */', + ' two : 2,', + ' /* beautify ignore:start */', + ' three : {', + '/* beautify ignore:end */', + ' ten : 10', + ' // This is all preserved', + '};' + ], + output: [ + 'var a = {', + ' /* beautify ignore:start preserve:start */', + ' one : {', + ' /* beautify ignore:end */', + ' two : 2,', + ' /* beautify ignore:start */', + ' three : {', + '/* beautify ignore:end */', + ' ten : 10', + ' // This is all preserved', + '};' + ] + }, + { + input: [ + 'var a = {', + '/* beautify ignore:start preserve:start */', + ' one : {', + ' /* beautify ignore:end */', + ' two : 2,', + ' /* beautify ignore:start */', + ' three : {', + '/* beautify ignore:end */', + ' ten : 10,', + '/* beautify preserve:end */', + ' eleven: 11', + '};' + ], + output: [ + 'var a = {', + ' /* beautify ignore:start preserve:start */', + ' one : {', + ' /* beautify ignore:end */', + ' two : 2,', + ' /* beautify ignore:start */', + ' three : {', + '/* beautify ignore:end */', + ' ten : 10,', + '/* beautify preserve:end */', + ' eleven: 11', + '};' + ] + }, + ] + }, { + name: "Comments and tests", + description: "Comments should be in the right indent and not side-ffect.", + options: [], + tests: [{ + comment: '#913', + + unchanged: [ + 'class test {', + ' method1() {', + ' let resp = null;', + ' }', + ' /**', + ' * @param {String} id', + ' */', + ' method2(id) {', + ' let resp2 = null;', + ' }', + '}' + ] + }, + { + comment: '#1090', + unchanged: [ + 'for (var i = 0; i < 20; ++i) // loop', + ' if (i % 3) {', + ' console.log(i);', + ' }', + 'console.log("done");', + ] + }, + { + comment: '#1043', + unchanged: [ + 'var o = {', + ' k: 0', + '}', + '// ...', + 'foo(o)', + ] + }, + { + comment: '#713 and #964', + unchanged: [ + 'Meteor.call("foo", bar, function(err, result) {', + ' Session.set("baz", result.lorem)', + '})', + '//blah blah', + ] + }, + { + comment: '#815', + unchanged: [ + 'foo()', + '// this is a comment', + 'bar()', + '', + 'const foo = 5', + '// comment', + 'bar()', + ] + }, + { + comment: 'This shows current behavior. Note #1069 is not addressed yet.', + unchanged: [ + 'if (modulus === 2) {', + ' // i might be odd here', + ' i += (i & 1);', + ' // now i is guaranteed to be even', + ' // this block is obviously about the statement above', + '', + ' // #1069 This should attach to the block below', + ' // this comment is about the block after it.', + '} else {', + ' // rounding up using integer arithmetic only', + ' if (i % modulus)', + ' i += modulus - (i % modulus);', + ' // now i is divisible by modulus', + ' // behavior of comments should be different for single statements vs block statements/expressions', + '}', + '', + 'if (modulus === 2)', + ' // i might be odd here', + ' i += (i & 1);', + '// now i is guaranteed to be even', + '// non-braced comments unindent immediately', + '', + '// this comment is about the block after it.', + 'else', + ' // rounding up using integer arithmetic only', + ' if (i % modulus)', + ' i += modulus - (i % modulus);', + '// behavior of comments should be different for single statements vs block statements/expressions', + ] + }, + + ] + }, { + name: "Template Formatting", + description: "Php () and underscore.js templating treated as strings.", + options: [], + tests: [ + { unchanged: '' }, + { unchanged: 'a = ;' }, + { + unchanged: [ + '");', + '}', + '?>' + ] + }, + { unchanged: 'a = <%= external() %>;' } + ] + }, { + name: "jslint and space after anon function", + description: "jslint_happy and space_after_anon_function tests", + matrix: [{ + options: [ + { name: "jslint_happy", value: "true" }, + { name: "space_after_anon_function", value: "true" } + ], + f: ' ', + c: '' + }, { + options: [ + { name: "jslint_happy", value: "true" }, + { name: "space_after_anon_function", value: "false" } + ], + f: ' ', + c: '' + }, { + options: [ + { name: "jslint_happy", value: "false" }, + { name: "space_after_anon_function", value: "true" } + ], + f: ' ', + c: ' ' + }, { + options: [ + { name: "jslint_happy", value: "false" }, + { name: "space_after_anon_function", value: "false" } + ], + f: '', + c: ' ' + } + + + ], + tests: [{ + input_: 'a=typeof(x)', + output: 'a = typeof{{f}}(x)' + }, + { + input_: 'x();\n\nfunction(){}', + output: 'x();\n\nfunction{{f}}() {}' + }, + { + input_: 'x();\n\nvar x = {\nx: function(){}\n}', + output: 'x();\n\nvar x = {\n x: function{{f}}() {}\n}' + }, + { + input_: 'function () {\n var a, b, c, d, e = [],\n f;\n}', + output: 'function{{f}}() {\n var a, b, c, d, e = [],\n f;\n}' + }, + + { + input_: 'switch(x) {case 0: case 1: a(); break; default: break}', + output: 'switch (x) {\n{{c}}case 0:\n{{c}}case 1:\n{{c}} a();\n{{c}} break;\n{{c}}default:\n{{c}} break\n}' + }, + { + input: 'switch(x){case -1:break;case !y:break;}', + output: 'switch (x) {\n{{c}}case -1:\n{{c}} break;\n{{c}}case !y:\n{{c}} break;\n}' + }, + { + comment: 'typical greasemonkey start', + fragment: true, + unchanged: '// comment 2\n(function{{f}}()' + }, + + { + input_: 'var a2, b2, c2, d2 = 0, c = function() {}, d = \\\'\\\';', + output: 'var a2, b2, c2, d2 = 0,\n c = function{{f}}() {},\n d = \\\'\\\';' + }, + { + input_: 'var a2, b2, c2, d2 = 0, c = function() {},\nd = \\\'\\\';', + output: 'var a2, b2, c2, d2 = 0,\n c = function{{f}}() {},\n d = \\\'\\\';' + }, + { + input_: 'var o2=$.extend(a);function(){alert(x);}', + output: 'var o2 = $.extend(a);\n\nfunction{{f}}() {\n alert(x);\n}' + }, + { input: 'function*() {\n yield 1;\n}', output: 'function*{{f}}() {\n yield 1;\n}' }, + { unchanged: 'function* x() {\n yield 1;\n}' }, + ] + }, { + name: "Regression tests", + description: "Ensure specific bugs do not recur", + options: [], + tests: [{ + comment: "Issue 241", + unchanged: [ + 'obj', + ' .last({', + ' foo: 1,', + ' bar: 2', + ' });', + 'var test = 1;' + ] + }, + { + unchanged: [ + 'obj', + ' .last(a, function() {', + ' var test;', + ' });', + 'var test = 1;' + ] + }, + { + unchanged: [ + 'obj.first()', + ' .second()', + ' .last(function(err, response) {', + ' console.log(err);', + ' });' + ] + }, + { + comment: "Issue 268 and 275", + unchanged: [ + 'obj.last(a, function() {', + ' var test;', + '});', + 'var test = 1;' + ] + }, + { + unchanged: [ + 'obj.last(a,', + ' function() {', + ' var test;', + ' });', + 'var test = 1;' + ] + }, + { + input: '(function() {if (!window.FOO) window.FOO || (window.FOO = function() {var b = {bar: "zort"};});})();', + output: [ + '(function() {', + ' if (!window.FOO) window.FOO || (window.FOO = function() {', + ' var b = {', + ' bar: "zort"', + ' };', + ' });', + '})();' + ] + }, + { + comment: "Issue 281", + unchanged: [ + 'define(["dojo/_base/declare", "my/Employee", "dijit/form/Button",', + ' "dojo/_base/lang", "dojo/Deferred"', + '], function(declare, Employee, Button, lang, Deferred) {', + ' return declare(Employee, {', + ' constructor: function() {', + ' new Button({', + ' onClick: lang.hitch(this, function() {', + ' new Deferred().then(lang.hitch(this, function() {', + ' this.salary * 0.25;', + ' }));', + ' })', + ' });', + ' }', + ' });', + '});' + ] + }, + { + unchanged: [ + 'define(["dojo/_base/declare", "my/Employee", "dijit/form/Button",', + ' "dojo/_base/lang", "dojo/Deferred"', + ' ],', + ' function(declare, Employee, Button, lang, Deferred) {', + ' return declare(Employee, {', + ' constructor: function() {', + ' new Button({', + ' onClick: lang.hitch(this, function() {', + ' new Deferred().then(lang.hitch(this, function() {', + ' this.salary * 0.25;', + ' }));', + ' })', + ' });', + ' }', + ' });', + ' });' + ] + }, + { + comment: "Issue 459", + unchanged: [ + '(function() {', + ' return {', + ' foo: function() {', + ' return "bar";', + ' },', + ' bar: ["bar"]', + ' };', + '}());' + ] + }, + { + comment: "Issue 505 - strings should end at newline unless continued by backslash", + unchanged: [ + 'var name = "a;', + 'name = "b";' + ] + }, + { + unchanged: [ + 'var name = "a;\\\\', + ' name = b";' + ] + }, + { + comment: "Issue 514 - some operators require spaces to distinguish them", + unchanged: 'var c = "_ACTION_TO_NATIVEAPI_" + ++g++ + +new Date;' + }, + { + unchanged: 'var c = "_ACTION_TO_NATIVEAPI_" - --g-- - -new Date;' + }, + { + comment: "Issue 440 - reserved words can be used as object property names", + unchanged: [ + 'a = {', + ' function: {},', + ' "function": {},', + ' throw: {},', + ' "throw": {},', + ' var: {},', + ' "var": {},', + ' set: {},', + ' "set": {},', + ' get: {},', + ' "get": {},', + ' if: {},', + ' "if": {},', + ' then: {},', + ' "then": {},', + ' else: {},', + ' "else": {},', + ' yay: {}', + '};' + ] + }, + { + comment: "Issue 331 - if-else with braces edge case", + input: 'if(x){a();}else{b();}if(y){c();}', + output: [ + 'if (x) {', + ' a();', + '} else {', + ' b();', + '}', + 'if (y) {', + ' c();', + '}' + ] + }, + { + comment: "Issue 485 - ensure function declarations behave the same in arrays as elsewhere", + unchanged: [ + 'var v = ["a",', + ' function() {', + ' return;', + ' }, {', + ' id: 1', + ' }', + '];' + ] + }, + { + unchanged: [ + 'var v = ["a", function() {', + ' return;', + '}, {', + ' id: 1', + '}];' + ] + }, + { + comment: "Issue 382 - initial totally cursory support for es6 module export", + unchanged: [ + 'module "Even" {', + ' import odd from "Odd";', + ' export function sum(x, y) {', + ' return x + y;', + ' }', + ' export var pi = 3.141593;', + ' export default moduleName;', + '}' + ] + }, + { + unchanged: [ + 'module "Even" {', + ' export default function div(x, y) {}', + '}' + ] + }, + { + comment: 'Issue 889 - export default { ... }', + unchanged: [ + 'export default {', + ' func1() {},', + ' func2() {}', + ' func3() {}', + '}' + ] + }, + { + unchanged: [ + 'export default {', + ' a() {', + ' return 1;', + ' },', + ' b() {', + ' return 2;', + ' },', + ' c() {', + ' return 3;', + ' }', + '}' + ] + }, + { + comment: "Issue 508", + unchanged: 'set["name"]' + }, + { + unchanged: 'get["name"]' + }, + { + fragmeent: true, + unchanged: [ + 'a = {', + ' set b(x) {},', + ' c: 1,', + ' d: function() {}', + '};' + ] + }, + { + fragmeent: true, + unchanged: [ + 'a = {', + ' get b() {', + ' retun 0;', + ' },', + ' c: 1,', + ' d: function() {}', + '};' + ] + }, + { + comment: "Issue 298 - do not under indent if/while/for condtionals experesions", + unchanged: [ + '\\\'use strict\\\';', + 'if ([].some(function() {', + ' return false;', + ' })) {', + ' console.log("hello");', + '}' + ] + }, + { + comment: "Issue 298 - do not under indent if/while/for condtionals experesions", + unchanged: [ + '\\\'use strict\\\';', + 'if ([].some(function() {', + ' return false;', + ' })) {', + ' console.log("hello");', + '}' + ] + }, + { + comment: "Issue 552 - Typescript? Okay... we didn't break it before, so try not to break it now.", + unchanged: [ + 'class Test {', + ' blah: string[];', + ' foo(): number {', + ' return 0;', + ' }', + ' bar(): number {', + ' return 0;', + ' }', + '}' + ] + }, + { + unchanged: [ + 'interface Test {', + ' blah: string[];', + ' foo(): number {', + ' return 0;', + ' }', + ' bar(): number {', + ' return 0;', + ' }', + '}' + ] + }, + { + comment: "Issue 583 - Functions with comments after them should still indent correctly.", + unchanged: [ + 'function exit(code) {', + ' setTimeout(function() {', + ' phantom.exit(code);', + ' }, 0);', + ' phantom.onError = function() {};', + '}', + '// Comment' + ] + }, + { + comment: "Issue 806 - newline arrow functions", + unchanged: [ + 'a.b("c",', + ' () => d.e', + ')' + ] + }, + { + comment: "Issue 810 - es6 object literal detection", + unchanged: [ + 'function badFormatting() {', + ' return {', + ' a,', + ' b: c,', + ' d: e,', + ' f: g,', + ' h,', + ' i,', + ' j: k', + ' }', + '}', + '', + 'function goodFormatting() {', + ' return {', + ' a: b,', + ' c,', + ' d: e,', + ' f: g,', + ' h,', + ' i,', + ' j: k', + ' }', + '}' + ] + }, + { + comment: "Issue 602 - ES6 object literal shorthand functions", + unchanged: [ + 'return {', + ' fn1() {},', + ' fn2() {}', + '}' + ] + }, { + unchanged: [ + 'throw {', + ' fn1() {},', + ' fn2() {}', + '}' + ] + }, { + unchanged: [ + 'foo({', + ' fn1(a) {}', + ' fn2(a) {}', + '})' + ] + }, { + unchanged: [ + 'foo("text", {', + ' fn1(a) {}', + ' fn2(a) {}', + '})' + ] + }, { + unchanged: [ + 'oneArg = {', + ' fn1(a) {', + ' do();', + ' },', + ' fn2() {}', + '}' + ] + }, { + unchanged: [ + 'multiArg = {', + ' fn1(a, b, c) {', + ' do();', + ' },', + ' fn2() {}', + '}' + ] + }, { + unchanged: [ + 'noArgs = {', + ' fn1() {', + ' do();', + ' },', + ' fn2() {}', + '}' + ] + }, { + unchanged: [ + 'emptyFn = {', + ' fn1() {},', + ' fn2() {}', + '}' + ] + }, { + unchanged: [ + 'nested = {', + ' fns: {', + ' fn1() {},', + ' fn2() {}', + ' }', + '}' + ] + }, { + unchanged: [ + 'array = [{', + ' fn1() {},', + ' prop: val,', + ' fn2() {}', + '}]' + ] + }, { + unchanged: [ + 'expr = expr ? expr : {', + ' fn1() {},', + ' fn2() {}', + '}' + ] + }, { + unchanged: [ + 'strange = valid + {', + ' fn1() {},', + ' fn2() {', + ' return 1;', + ' }', + '}.fn2()' + ] + }, + { + comment: "Issue 854 - Arrow function with statement block", + unchanged: [ + 'test(() => {', + ' var a = {}', + '', + ' a.what = () => true ? 1 : 2', + '', + ' a.thing = () => {', + ' b();', + ' }', + '})' + ] + }, + { + comment: "Issue 406 - Multiline array", + unchanged: [ + 'var tempName = [', + ' "temp",', + ' process.pid,', + ' (Math.random() * 0x1000000000).toString(36),', + ' new Date().getTime()', + '].join("-");' + ] + }, + { + comment: "Issue #996 - Input ends with backslash throws exception", + fragment: true, + unchanged: [ + 'sd = 1;', + '/' + ] + }, + { + comment: "Issue #1079 - unbraced if with comments should still look right", + unchanged: [ + 'if (console.log)', + ' for (var i = 0; i < 20; ++i)', + ' if (i % 3)', + ' console.log(i);', + '// all done', + 'console.log("done");' + ] + }, + { + comment: "Issue #1085 - function should not have blank line in a number of cases", + unchanged: [ + 'var transformer =', + ' options.transformer ||', + ' globalSettings.transformer ||', + ' function(x) {', + ' return x;', + ' };' + ] + }, + { + comment: "Issue #569 - function should not have blank line in a number of cases", + unchanged: [ + '(function(global) {', + ' "use strict";', + '', + ' /* jshint ignore:start */', + ' include "somefile.js"', + ' /* jshint ignore:end */', + '}(this));' + ] + }, + { + unchanged: [ + 'function bindAuthEvent(eventName) {', + ' self.auth.on(eventName, function(event, meta) {', + ' self.emit(eventName, event, meta);', + ' });', + '}', + '["logged_in", "logged_out", "signed_up", "updated_user"].forEach(bindAuthEvent);', + '', + 'function bindBrowserEvent(eventName) {', + ' browser.on(eventName, function(event, meta) {', + ' self.emit(eventName, event, meta);', + ' });', + '}', + '["navigating"].forEach(bindBrowserEvent);' + ] + }, + { + comment: "Issue #892 - new line between chained methods ", + unchanged: [ + 'foo', + ' .who()', + '', + ' .knows()', + ' // comment', + ' .nothing() // comment', + '', + ' .more()' + ] + } + ] + }, { + name: "Test non-positionable-ops", + description: "Ensure specific bugs do not recur", + tests: [ + { unchanged: 'a += 2;' }, + { unchanged: 'a -= 2;' }, + { unchanged: 'a *= 2;' }, + { unchanged: 'a /= 2;' }, + { unchanged: 'a %= 2;' }, + { unchanged: 'a &= 2;' }, + { unchanged: 'a ^= 2;' }, + { unchanged: 'a |= 2;' }, + { unchanged: 'a **= 2;' }, + { unchanged: 'a <<= 2;' }, + { unchanged: 'a >>= 2;' }, + ] + }, { + //Relies on the tab being four spaces as default for the tests + name: "brace_style ,preserve-inline tests", + description: "brace_style *,preserve-inline varying different brace_styles", + template: "< >", + matrix: [ + //test for all options of brace_style + { + options: [ + { name: "brace_style", value: "'collapse,preserve-inline'" } + ], + obo: ' ', + obot: '', //Output Before Open curlybrace & Tab character + oao: '\n', + oaot: ' ', //Output After Open curlybrace & corresponding Tab + obc: '\n', //Output Before Close curlybrace + oac: ' ', + oact: '' //Output After Close curlybrace & corresponding Tab character + }, + { + options: [ + { name: "brace_style", value: "'expand,preserve-inline'" } + ], + obo: '\n', + obot: ' ', + oao: '\n', + oaot: ' ', + obc: '\n', + oac: '\n', + oact: ' ' + }, + { + options: [ + { name: "brace_style", value: "'end-expand,preserve-inline'" } + ], + obo: ' ', + obot: '', + oao: '\n', + oaot: ' ', + obc: '\n', + oac: '\n', + oact: ' ' + }, + { + //None tries not to touch brace style so all the tests in this + //matrix were formatted as if they were collapse + options: [ + { name: "brace_style", value: "'none,preserve-inline'" } + ], + obo: ' ', + obot: '', + oao: '\n', + oaot: ' ', + obc: '\n', + oac: ' ', + oact: '' + }, + //Test for backward compatibility + { + options: [ + { name: "brace_style", value: "'collapse-preserve-inline'" } + ], + //Equivalent to the output of the first test + obo: ' ', + obot: '', + oao: '\n', + oaot: ' ', + obc: '\n', + oac: ' ', + oact: '' + } + ], + tests: [ + //Test single inline blocks + { + unchanged: 'import { asdf } from "asdf";' + }, + { + unchanged: 'import { get } from "asdf";' + }, + { + unchanged: 'function inLine() { console.log("oh em gee"); }' + }, + { + unchanged: 'if (cancer) { console.log("Im sorry but you only have so long to live..."); }' + }, + //Test more complex inliners + { + input: 'if (ding) { console.log("dong"); } else { console.log("dang"); }', + output: 'if (ding) { console.log("dong"); }else { console.log("dang"); }' + }, + //Test complex mixes of the two + { + //The outer function and the third object (obj3) should not + //be preserved. All other objects should be + input: [ + 'function kindaComplex() {', + ' var a = 2;', + ' var obj = {};', + ' var obj2 = { a: "a", b: "b" };', + ' var obj3 = {', + ' c: "c",', + ' d: "d",', + ' e: "e"', + ' };', + '}' + ], + output: [ + 'function kindaComplex(){' + //NL in templates + 'var a = 2;', + ' var obj = {};', + ' var obj2 = { a: "a", b: "b" };', + ' var obj3 = {' + //NL in templates, Expand doesnt affect js objects + 'c: "c",', + ' d: "d",', + ' e: "e"' + //NL in templates + ' };' + //NL in templates + '}' + ] + }, + { + //All inlines should be preserved, all non-inlines (specifically + //complex(), obj, and obj.b should not be preserved (and hence + //have the template spacing defined in output) + input: [ + 'function complex() {', + ' console.log("wowe");', + ' (function() { var a = 2; var b = 3; })();', + ' $.each(arr, function(el, idx) { return el; });', + ' var obj = {', + ' a: function() { console.log("test"); },', + ' b() {', + ' console.log("test2");', + ' }', + ' };', + '}' + + ], + output: [ + 'function complex(){' + //NL in templates + 'console.log("wowe");', + ' (function() { var a = 2; var b = 3; })();', + ' $.each(arr, function(el, idx) { return el; });', + ' var obj = {' + //NL in templates + 'a: function() { console.log("test"); },', + ' b(){' + //NL in templates + 'console.log("test2");' + + ' }' + //NL in templates + ' };' + //NL in templates + '}' + ] + } + ] + }, { + name: "Destructured and related", + description: "Ensure specific bugs do not recur", + options: [ + { name: "brace_style", value: "'collapse,preserve-inline'" } + ], //Issue 1052, now collapse,preserve-inline instead of collapse-preserve-inline + tests: [{ + comment: "Issue 382 - import destructured ", + unchanged: [ + 'module "Even" {', + ' import { odd, oddly } from "Odd";', + '}' + ] + }, + { + unchanged: [ + 'import defaultMember from "module-name";', + 'import * as name from "module-name";', + 'import { member } from "module-name";', + 'import { member as alias } from "module-name";', + 'import { member1, member2 } from "module-name";', + 'import { member1, member2 as alias2 } from "module-name";', + 'import defaultMember, { member, member2 } from "module-name";', + 'import defaultMember, * as name from "module-name";', + 'import "module-name";' + ] + }, + { + comment: "Issue 858 - from is a keyword only after import", + unchanged: [ + 'if (from < to) {', + ' from++;', + '} else {', + ' from--;', + '}' + ] + }, + { + comment: "Issue 511 - destrutured", + unchanged: [ + 'var { b, c } = require("../stores");', + 'var { ProjectStore } = require("../stores");', + '', + 'function takeThing({ prop }) {', + ' console.log("inner prop", prop)', + '}' + ] + }, + { + comment: "Issue 315 - Short objects", + unchanged: [ + 'var a = { b: { c: { d: e } } };' + ] + }, + { + unchanged: [ + 'var a = {', + ' b: {', + ' c: { d: e }', + ' c3: { d: e }', + ' },', + ' b2: { c: { d: e } }', + '};' + ] + }, + { + comment: "Issue 370 - Short objects in array", + unchanged: [ + 'var methods = [', + ' { name: "to" },', + ' { name: "step" },', + ' { name: "move" },', + ' { name: "min" },', + ' { name: "max" }', + '];' + ] + }, + { + comment: "Issue 838 - Short objects in array", + unchanged: [ + 'function(url, callback) {', + ' var script = document.createElement("script")', + ' if (true) script.onreadystatechange = function() {', + ' foo();', + ' }', + ' else script.onload = callback;', + '}' + ] + }, + { + comment: "Issue 578 - Odd indenting after function", + unchanged: [ + 'function bindAuthEvent(eventName) {', + ' self.auth.on(eventName, function(event, meta) {', + ' self.emit(eventName, event, meta);', + ' });', + '}', + '["logged_in", "logged_out", "signed_up", "updated_user"].forEach(bindAuthEvent);', + ] + }, + { + comment: "Issue #487 - some short expressions examples", + unchanged: [ + 'if (a == 1) { a++; }', + 'a = { a: a };', + 'UserDB.findOne({ username: "xyz" }, function(err, user) {});', + 'import { fs } from "fs";' + ] + }, + { + comment: "Issue #982 - Fixed return expression collapse-preserve-inline", + unchanged: [ + 'function foo(arg) {', + ' if (!arg) { a(); }', + ' if (!arg) { return false; }', + ' if (!arg) { throw "inline"; }', + ' return true;', + '}' + ] + }, + { + comment: "Issue #338 - Short expressions ", + unchanged: [ + 'if (someCondition) { return something; }', + 'if (someCondition) {', + ' return something;', + '}', + 'if (someCondition) { break; }', + 'if (someCondition) {', + ' return something;', + '}' + ] + } + ] + }, { + // ======================================================= + // New tests groups should be added above this line. + // Everything below is a work in progress - converting + // old test to generated form. + // ======================================================= + name: "Old tests", + description: "Largely unorganized pile of tests", + options: [], + tests: [ + { unchanged: '' }, + { fragment: true, unchanged: ' return .5' }, + { fragment: true, unchanged: ' return .5;\n a();' }, + { fragment: true, unchanged: ' return .5;\n a();' }, + { fragment: true, unchanged: ' return .5;\n a();' }, + { fragment: true, unchanged: ' < div' }, + { input: 'a = 1', output: 'a = 1' }, + { input: 'a=1', output: 'a = 1' }, + { unchanged: '(3) / 2' }, + { unchanged: '["a", "b"].join("")' }, + { unchanged: 'a();\n\nb();' }, + { input: 'var a = 1 var b = 2', output: 'var a = 1\nvar b = 2' }, + { input: 'var a=1, b=c[d], e=6;', output: 'var a = 1,\n b = c[d],\n e = 6;' }, + { unchanged: 'var a,\n b,\n c;' }, + { input: 'let a = 1 let b = 2', output: 'let a = 1\nlet b = 2' }, + { input: 'let a=1, b=c[d], e=6;', output: 'let a = 1,\n b = c[d],\n e = 6;' }, + { unchanged: 'let a,\n b,\n c;' }, + { input: 'const a = 1 const b = 2', output: 'const a = 1\nconst b = 2' }, + { input: 'const a=1, b=c[d], e=6;', output: 'const a = 1,\n b = c[d],\n e = 6;' }, + { unchanged: 'const a,\n b,\n c;' }, + { unchanged: 'a = " 12345 "' }, + { unchanged: "a = \\' 12345 \\'" }, + { unchanged: 'if (a == 1) b = 2;' }, + { input: 'if(1){2}else{3}', output: 'if (1) {\n 2\n} else {\n 3\n}' }, + { input: 'if(1||2);', output: 'if (1 || 2);' }, + { input: '(a==1)||(b==2)', output: '(a == 1) || (b == 2)' }, + { input: 'var a = 1 if (2) 3;', output: 'var a = 1\nif (2) 3;' }, + { unchanged: 'a = a + 1' }, + { unchanged: 'a = a == 1' }, + { unchanged: '/12345[^678]*9+/.match(a)' }, + { unchanged: 'a /= 5' }, + { unchanged: 'a = 0.5 * 3' }, + { unchanged: 'a *= 10.55' }, + { unchanged: 'a < .5' }, + { unchanged: 'a <= .5' }, + { input: 'a<.5', output: 'a < .5' }, + { input: 'a<=.5', output: 'a <= .5' }, + + { + comment: 'exponent literals', + unchanged: 'a = 1e10' + }, + { unchanged: 'a = 1.3e10' }, + { unchanged: 'a = 1.3e-10' }, + { unchanged: 'a = -12345.3e-10' }, + { unchanged: 'a = .12345e-10' }, + { unchanged: 'a = 06789e-10' }, + { unchanged: 'a = e - 10' }, + { unchanged: 'a = 1.3e+10' }, + { unchanged: 'a = 1.e-7' }, + { unchanged: 'a = -12345.3e+10' }, + { unchanged: 'a = .12345e+10' }, + { unchanged: 'a = 06789e+10' }, + { unchanged: 'a = e + 10' }, + { input: 'a=0e-12345.3e-10', output: 'a = 0e-12345 .3e-10' }, + { input: 'a=0.e-12345.3e-10', output: 'a = 0.e-12345 .3e-10' }, + { input: 'a=0x.e-12345.3e-10', output: 'a = 0x.e - 12345.3e-10' }, + { input: 'a=0x0.e-12345.3e-10', output: 'a = 0x0.e - 12345.3e-10' }, + { input: 'a=0x0.0e-12345.3e-10', output: 'a = 0x0 .0e-12345 .3e-10' }, + { input: 'a=0g-12345.3e-10', output: 'a = 0 g - 12345.3e-10' }, + { input: 'a=0.g-12345.3e-10', output: 'a = 0. g - 12345.3e-10' }, + { input: 'a=0x.g-12345.3e-10', output: 'a = 0x.g - 12345.3e-10' }, + { input: 'a=0x0.g-12345.3e-10', output: 'a = 0x0.g - 12345.3e-10' }, + { input: 'a=0x0.0g-12345.3e-10', output: 'a = 0x0 .0 g - 12345.3e-10' }, + + { + comment: 'Decimal literals', + unchanged: 'a = 0123456789;' + }, + { unchanged: 'a = 9876543210;' }, + { unchanged: 'a = 5647308291;' }, + { input: 'a=030e-5', output: 'a = 030e-5' }, + { input: 'a=00+4', output: 'a = 00 + 4' }, + { input: 'a=32+4', output: 'a = 32 + 4' }, + { input: 'a=0.6g+4', output: 'a = 0.6 g + 4' }, + { input: 'a=01.10', output: 'a = 01.10' }, + { input: 'a=a.10', output: 'a = a .10' }, + { input: 'a=00B0x0', output: 'a = 00 B0x0' }, + { input: 'a=00B0xb0', output: 'a = 00 B0xb0' }, + { input: 'a=00B0x0b0', output: 'a = 00 B0x0b0' }, + { input: 'a=0090x0', output: 'a = 0090 x0' }, + { input: 'a=0g0b0o0', output: 'a = 0 g0b0o0' }, + + { + comment: 'Hexadecimal literals', + unchanged: 'a = 0x0123456789abcdef;' + }, + { unchanged: 'a = 0X0123456789ABCDEF;' }, + { unchanged: 'a = 0xFeDcBa9876543210;' }, + { input: 'a=0x30e-5', output: 'a = 0x30e - 5' }, + { input: 'a=0xF0+4', output: 'a = 0xF0 + 4' }, + { input: 'a=0Xff+4', output: 'a = 0Xff + 4' }, + { input: 'a=0Xffg+4', output: 'a = 0Xff g + 4' }, + { input: 'a=0x01.10', output: 'a = 0x01 .10' }, + { unchanged: 'a = 0xb0ce;' }, + { unchanged: 'a = 0x0b0;' }, + { input: 'a=0x0B0x0', output: 'a = 0x0B0 x0' }, + { input: 'a=0x0B0xb0', output: 'a = 0x0B0 xb0' }, + { input: 'a=0x0B0x0b0', output: 'a = 0x0B0 x0b0' }, + { input: 'a=0X090x0', output: 'a = 0X090 x0' }, + { input: 'a=0Xg0b0o0', output: 'a = 0X g0b0o0' }, + + { + comment: 'Octal literals', + unchanged: 'a = 0o01234567;' + }, + { unchanged: 'a = 0O01234567;' }, + { unchanged: 'a = 0o34120675;' }, + { input: 'a=0o30e-5', output: 'a = 0o30 e - 5' }, + { input: 'a=0o70+4', output: 'a = 0o70 + 4' }, + { input: 'a=0O77+4', output: 'a = 0O77 + 4' }, + { input: 'a=0O778+4', output: 'a = 0O77 8 + 4' }, + { input: 'a=0O77a+4', output: 'a = 0O77 a + 4' }, + { input: 'a=0o01.10', output: 'a = 0o01 .10' }, + { input: 'a=0o0B0x0', output: 'a = 0o0 B0x0' }, + { input: 'a=0o0B0xb0', output: 'a = 0o0 B0xb0' }, + { input: 'a=0o0B0x0b0', output: 'a = 0o0 B0x0b0' }, + { input: 'a=0O090x0', output: 'a = 0O0 90 x0' }, + { input: 'a=0Og0b0o0', output: 'a = 0O g0b0o0' }, + + { + comment: 'Binary literals', + unchanged: 'a = 0b010011;' + }, + { unchanged: 'a = 0B010011;' }, + { unchanged: 'a = 0b01001100001111;' }, + { input: 'a=0b10e-5', output: 'a = 0b10 e - 5' }, + { input: 'a=0b10+4', output: 'a = 0b10 + 4' }, + { input: 'a=0B11+4', output: 'a = 0B11 + 4' }, + { input: 'a=0B112+4', output: 'a = 0B11 2 + 4' }, + { input: 'a=0B11a+4', output: 'a = 0B11 a + 4' }, + { input: 'a=0b01.10', output: 'a = 0b01 .10' }, + { input: 'a=0b0B0x0', output: 'a = 0b0 B0x0' }, + { input: 'a=0b0B0xb0', output: 'a = 0b0 B0xb0' }, + { input: 'a=0b0B0x0b0', output: 'a = 0b0 B0x0b0' }, + { input: 'a=0B090x0', output: 'a = 0B0 90 x0' }, + { input: 'a=0Bg0b0o0', output: 'a = 0B g0b0o0' }, + { unchanged: 'a = [1, 2, 3, 4]' }, + { input: 'F*(g/=f)*g+b', output: 'F * (g /= f) * g + b' }, + { input: 'a.b({c:d})', output: 'a.b({\n c: d\n})' }, + { input: 'a.b\n(\n{\nc:\nd\n}\n)', output: 'a.b({\n c: d\n})' }, + { input: 'a.b({c:"d"})', output: 'a.b({\n c: "d"\n})' }, + { input: 'a.b\n(\n{\nc:\n"d"\n}\n)', output: 'a.b({\n c: "d"\n})' }, + { input: 'a=!b', output: 'a = !b' }, + { input: 'a=!!b', output: 'a = !!b' }, + { input: 'a?b:c', output: 'a ? b : c' }, + { input: 'a?1:2', output: 'a ? 1 : 2' }, + { input: 'a?(b):c', output: 'a ? (b) : c' }, + { input: 'x={a:1,b:w=="foo"?x:y,c:z}', output: 'x = {\n a: 1,\n b: w == "foo" ? x : y,\n c: z\n}' }, + { input: 'x=a?b?c?d:e:f:g;', output: 'x = a ? b ? c ? d : e : f : g;' }, + { input: 'x=a?b?c?d:{e1:1,e2:2}:f:g;', output: 'x = a ? b ? c ? d : {\n e1: 1,\n e2: 2\n} : f : g;' }, + { unchanged: 'function void(void) {}' }, + { input: 'if(!a)foo();', output: 'if (!a) foo();' }, + { input: 'a=~a', output: 'a = ~a' }, + { input: 'a;/*comment*/b;', output: "a; /*comment*/\nb;" }, + { input: 'a;/* comment */b;', output: "a; /* comment */\nb;" }, + { fragment: true, input: 'a;/*\ncomment\n*/b;', output: "a;\n/*\ncomment\n*/\nb;", comment: "simple comments don't get touched at all" }, + { input: 'a;/**\n* javadoc\n*/b;', output: "a;\n/**\n * javadoc\n */\nb;" }, + { fragment: true, input: 'a;/**\n\nno javadoc\n*/b;', output: "a;\n/**\n\nno javadoc\n*/\nb;" }, + { input: 'a;/*\n* javadoc\n*/b;', output: "a;\n/*\n * javadoc\n */\nb;", comment: 'comment blocks detected and reindented even w/o javadoc starter' }, + { input: 'if(a)break;', output: "if (a) break;" }, + { input: 'if(a){break}', output: "if (a) {\n break\n}" }, + { input: 'if((a))foo();', output: 'if ((a)) foo();' }, + { input: 'for(var i=0;;) a', output: 'for (var i = 0;;) a' }, + { input: 'for(var i=0;;)\na', output: 'for (var i = 0;;)\n a' }, + { unchanged: 'a++;' }, + { input: 'for(;;i++)a()', output: 'for (;; i++) a()' }, + { input: 'for(;;i++)\na()', output: 'for (;; i++)\n a()' }, + { input: 'for(;;++i)a', output: 'for (;; ++i) a' }, + { input: 'return(1)', output: 'return (1)' }, + { input: 'try{a();}catch(b){c();}finally{d();}', output: "try {\n a();\n} catch (b) {\n c();\n} finally {\n d();\n}" }, + { unchanged: '(xx)()', comment: ' magic function call' }, + { unchanged: 'a[1]()', comment: 'another magic function call' }, + { input: 'if(a){b();}else if(c) foo();', output: "if (a) {\n b();\n} else if (c) foo();" }, + { input: 'switch(x) {case 0: case 1: a(); break; default: break}', output: "switch (x) {\n case 0:\n case 1:\n a();\n break;\n default:\n break\n}" }, + { input: 'switch(x){case -1:break;case !y:break;}', output: 'switch (x) {\n case -1:\n break;\n case !y:\n break;\n}' }, + { unchanged: 'a !== b' }, + { input: 'if (a) b(); else c();', output: "if (a) b();\nelse c();" }, + { unchanged: "// comment\n(function something() {})", comment: 'typical greasemonkey start' }, + { unchanged: "{\n\n x();\n\n}", comment: 'duplicating newlines' }, + { unchanged: 'if (a in b) foo();' }, + { unchanged: 'if (a of b) foo();' }, + { unchanged: 'if (a of [1, 2, 3]) foo();' }, + { + input: 'if(X)if(Y)a();else b();else c();', + output: "if (X)\n if (Y) a();\n else b();\nelse c();" + }, + { unchanged: 'if (foo) bar();\nelse break' }, + { unchanged: 'var a, b;' }, + { unchanged: 'var a = new function();' }, + { fragment: true, unchanged: 'new function' }, + { unchanged: 'var a, b' }, + { input: '{a:1, b:2}', output: "{\n a: 1,\n b: 2\n}" }, + { input: 'a={1:[-1],2:[+1]}', output: 'a = {\n 1: [-1],\n 2: [+1]\n}' }, + { input: "var l = {\\'a\\':\\'1\\', \\'b\\':\\'2\\'}", output: "var l = {\n \\'a\\': \\'1\\',\n \\'b\\': \\'2\\'\n}" }, + { unchanged: 'if (template.user[n] in bk) foo();' }, + { unchanged: 'return 45' }, + { unchanged: 'return this.prevObject ||\n\n this.constructor(null);' }, + { unchanged: 'If[1]' }, + { unchanged: 'Then[1]' }, + { input: "a = 1;// comment", output: "a = 1; // comment" }, + { unchanged: "a = 1; // comment" }, + { input: "a = 1;\n // comment", output: "a = 1;\n// comment" }, + { unchanged: 'a = [-1, -1, -1]' }, + + // These must work as non-fragments. + { unchanged: ['// a', '// b', '', '', '', '// c', '// d'] }, + { unchanged: ['// func-comment', '', 'function foo() {}', '', '// end-func-comment'] }, + + { + comment: 'The exact formatting these should have is open for discussion, but they are at least reasonable', + unchanged: 'a = [ // comment\n -1, -1, -1\n]' + }, + { unchanged: 'var a = [ // comment\n -1, -1, -1\n]' }, + { unchanged: 'a = [ // comment\n -1, // comment\n -1, -1\n]' }, + { unchanged: 'var a = [ // comment\n -1, // comment\n -1, -1\n]' }, + + { input: 'o = [{a:b},{c:d}]', output: 'o = [{\n a: b\n}, {\n c: d\n}]' }, + + { + comment: 'was: extra space appended', + unchanged: "if (a) {\n do();\n}" + }, + + { + comment: 'if/else statement with empty body', + input: "if (a) {\n// comment\n}else{\n// comment\n}", + output: "if (a) {\n // comment\n} else {\n // comment\n}" + }, + { comment: 'multiple comments indentation', input: "if (a) {\n// comment\n// comment\n}", output: "if (a) {\n // comment\n // comment\n}" }, + { input: "if (a) b() else c();", output: "if (a) b()\nelse c();" }, + { input: "if (a) b() else if c() d();", output: "if (a) b()\nelse if c() d();" }, + + { unchanged: "{}" }, + { unchanged: "{\n\n}" }, + { input: "do { a(); } while ( 1 );", output: "do {\n a();\n} while (1);" }, + { unchanged: "do {} while (1);" }, + { input: "do {\n} while (1);", output: "do {} while (1);" }, + { unchanged: "do {\n\n} while (1);" }, + { unchanged: "var a = x(a, b, c)" }, + { input: "delete x if (a) b();", output: "delete x\nif (a) b();" }, + { input: "delete x[x] if (a) b();", output: "delete x[x]\nif (a) b();" }, + { input: "for(var a=1,b=2)d", output: "for (var a = 1, b = 2) d" }, + { input: "for(var a=1,b=2,c=3) d", output: "for (var a = 1, b = 2, c = 3) d" }, + { input: "for(var a=1,b=2,c=3;d<3;d++)\ne", output: "for (var a = 1, b = 2, c = 3; d < 3; d++)\n e" }, + { input: "function x(){(a||b).c()}", output: "function x() {\n (a || b).c()\n}" }, + { input: "function x(){return - 1}", output: "function x() {\n return -1\n}" }, + { input: "function x(){return ! a}", output: "function x() {\n return !a\n}" }, + { unchanged: "x => x" }, + { unchanged: "(x) => x" }, + { input: "x => { x }", output: "x => {\n x\n}" }, + { input: "(x) => { x }", output: "(x) => {\n x\n}" }, + + { + comment: 'a common snippet in jQuery plugins', + input_: "settings = $.extend({},defaults,settings);", + output: "settings = $.extend({}, defaults, settings);" + }, + + // reserved words used as property names + { unchanged: "$http().then().finally().default()" }, + { input: "$http()\n.then()\n.finally()\n.default()", output: "$http()\n .then()\n .finally()\n .default()" }, + { unchanged: "$http().when.in.new.catch().throw()" }, + { input: "$http()\n.when\n.in\n.new\n.catch()\n.throw()", output: "$http()\n .when\n .in\n .new\n .catch()\n .throw()" }, + + { input: '{xxx;}()', output: '{\n xxx;\n}()' }, + + { unchanged: "a = \\'a\\'\nb = \\'b\\'" }, + { unchanged: "a = /reg/exp" }, + { unchanged: "a = /reg/" }, + { unchanged: '/abc/.test()' }, + { unchanged: '/abc/i.test()' }, + { input: "{/abc/i.test()}", output: "{\n /abc/i.test()\n}" }, + { input: 'var x=(a)/a;', output: 'var x = (a) / a;' }, + + { unchanged: 'x != -1' }, + + { input: 'for (; s-->0;)t', output: 'for (; s-- > 0;) t' }, + { input: 'for (; s++>0;)u', output: 'for (; s++ > 0;) u' }, + { input: 'a = s++>s--;', output: 'a = s++ > s--;' }, + { input: 'a = s++>--s;', output: 'a = s++ > --s;' }, + + { input: '{x=#1=[]}', output: '{\n x = #1=[]\n}' }, + { input: '{a:#1={}}', output: '{\n a: #1={}\n}' }, + { input: '{a:#1#}', output: '{\n a: #1#\n}' }, + + { fragment: true, unchanged: '"incomplete-string' }, + { fragment: true, unchanged: "\\'incomplete-string" }, + { fragment: true, unchanged: '/incomplete-regex' }, + { fragment: true, unchanged: '`incomplete-template-string' }, + + { fragment: true, input: '{a:1},{a:2}', output: '{\n a: 1\n}, {\n a: 2\n}' }, + { fragment: true, input: 'var ary=[{a:1}, {a:2}];', output: 'var ary = [{\n a: 1\n}, {\n a: 2\n}];' }, + + { comment: 'incomplete', fragment: true, input: '{a:#1', output: '{\n a: #1' }, + { comment: 'incomplete', fragment: true, input: '{a:#', output: '{\n a: #' }, + + { comment: 'incomplete', fragment: true, input: '}}}', output: '}\n}\n}' }, + + { fragment: true, unchanged: '' }, + + { comment: 'incomplete regexp', fragment: true, input: 'a=/regexp', output: 'a = /regexp' }, + + { input: '{a:#1=[],b:#1#,c:#999999#}', output: '{\n a: #1=[],\n b: #1#,\n c: #999999#\n}' }, + + { input: "do{x()}while(a>1)", output: "do {\n x()\n} while (a > 1)" }, + + { input: "x(); /reg/exp.match(something)", output: "x();\n/reg/exp.match(something)" }, + + { fragment: true, input: "something();(", output: "something();\n(" }, + { fragment: true, input: "#!she/bangs, she bangs\nf=1", output: "#!she/bangs, she bangs\n\nf = 1" }, + { fragment: true, input: "#!she/bangs, she bangs\n\nf=1", output: "#!she/bangs, she bangs\n\nf = 1" }, + { fragment: true, unchanged: "#!she/bangs, she bangs\n\n/* comment */" }, + { fragment: true, unchanged: "#!she/bangs, she bangs\n\n\n/* comment */" }, + { fragment: true, unchanged: "#" }, + { fragment: true, unchanged: "#!" }, + + { unchanged: "function namespace::something()" }, + + { fragment: true, unchanged: "" }, + { fragment: true, input: "", output: "" }, + + { input: '{foo();--bar;}', output: '{\n foo();\n --bar;\n}' }, + { input: '{foo();++bar;}', output: '{\n foo();\n ++bar;\n}' }, + { input: '{--bar;}', output: '{\n --bar;\n}' }, + { input: '{++bar;}', output: '{\n ++bar;\n}' }, + { input: 'if(true)++a;', output: 'if (true) ++a;' }, + { input: 'if(true)\n++a;', output: 'if (true)\n ++a;' }, + { input: 'if(true)--a;', output: 'if (true) --a;' }, + { input: 'if(true)\n--a;', output: 'if (true)\n --a;' }, + { unchanged: 'elem[array]++;' }, + { unchanged: 'elem++ * elem[array]++;' }, + { unchanged: 'elem-- * -elem[array]++;' }, + { unchanged: 'elem-- + elem[array]++;' }, + { unchanged: 'elem-- - elem[array]++;' }, + { unchanged: 'elem-- - -elem[array]++;' }, + { unchanged: 'elem-- - +elem[array]++;' }, + + + { + comment: 'Handling of newlines around unary ++ and -- operators', + input: '{foo\n++bar;}', + output: '{\n foo\n ++bar;\n}' + }, + { input: '{foo++\nbar;}', output: '{\n foo++\n bar;\n}' }, + + { + comment: 'This is invalid, but harder to guard against. Issue #203.', + input: '{foo\n++\nbar;}', + output: '{\n foo\n ++\n bar;\n}' + }, + + { + comment: 'regexps', + input: 'a(/abc\\\\/\\\\/def/);b()', + output: "a(/abc\\\\/\\\\/def/);\nb()" + }, + { input: 'a(/a[b\\\\[\\\\]c]d/);b()', output: "a(/a[b\\\\[\\\\]c]d/);\nb()" }, + { comment: 'incomplete char class', fragment: true, unchanged: 'a(/a[b\\\\[' }, + + { + comment: 'allow unescaped / in char classes', + input: 'a(/[a/b]/);b()', + output: "a(/[a/b]/);\nb()" + }, + { unchanged: 'typeof /foo\\\\//;' }, + { unchanged: 'throw /foo\\\\//;' }, + { unchanged: 'do /foo\\\\//;' }, + { unchanged: 'return /foo\\\\//;' }, + { unchanged: 'switch (a) {\n case /foo\\\\//:\n b\n}' }, + { unchanged: 'if (a) /foo\\\\//\nelse /foo\\\\//;' }, + + { unchanged: 'if (foo) /regex/.test();' }, + { unchanged: "for (index in [1, 2, 3]) /^test$/i.test(s)" }, + + { unchanged: 'function foo() {\n return [\n "one",\n "two"\n ];\n}' }, + { input: 'a=[[1,2],[4,5],[7,8]]', output: "a = [\n [1, 2],\n [4, 5],\n [7, 8]\n]" }, + { + input: 'a=[[1,2],[4,5],function(){},[7,8]]', + output: "a = [\n [1, 2],\n [4, 5],\n function() {},\n [7, 8]\n]" + }, + { + input: 'a=[[1,2],[4,5],function(){},function(){},[7,8]]', + output: "a = [\n [1, 2],\n [4, 5],\n function() {},\n function() {},\n [7, 8]\n]" + }, + { + input: 'a=[[1,2],[4,5],function(){},[7,8]]', + output: "a = [\n [1, 2],\n [4, 5],\n function() {},\n [7, 8]\n]" + }, + { + input: 'a=[b,c,function(){},function(){},d]', + output: "a = [b, c, function() {}, function() {}, d]" + }, + { + input: 'a=[b,c,\nfunction(){},function(){},d]', + output: "a = [b, c,\n function() {},\n function() {},\n d\n]" + }, + { input: 'a=[a[1],b[4],c[d[7]]]', output: "a = [a[1], b[4], c[d[7]]]" }, + { input: '[1,2,[3,4,[5,6],7],8]', output: "[1, 2, [3, 4, [5, 6], 7], 8]" }, + + { + input: '[[["1","2"],["3","4"]],[["5","6","7"],["8","9","0"]],[["1","2","3"],["4","5","6","7"],["8","9","0"]]]', + output: '[\n [\n ["1", "2"],\n ["3", "4"]\n ],\n [\n ["5", "6", "7"],\n ["8", "9", "0"]\n ],\n [\n ["1", "2", "3"],\n ["4", "5", "6", "7"],\n ["8", "9", "0"]\n ]\n]' + }, + + { input: '{[x()[0]];indent;}', output: '{\n [x()[0]];\n indent;\n}' }, + { unchanged: '/*\n foo trailing space \n * bar trailing space \n**/' }, + { unchanged: '{\n /*\n foo \n * bar \n */\n}' }, + + { unchanged: 'return ++i' }, + { unchanged: 'return !!x' }, + { unchanged: 'return !x' }, + { input: 'return [1,2]', output: 'return [1, 2]' }, + { unchanged: 'return;' }, + { unchanged: 'return\nfunc' }, + { input: 'catch(e)', output: 'catch (e)' }, + + { + input: 'var a=1,b={foo:2,bar:3},{baz:4,wham:5},c=4;', + output: 'var a = 1,\n b = {\n foo: 2,\n bar: 3\n },\n {\n baz: 4,\n wham: 5\n }, c = 4;' + }, + { + input: 'var a=1,b={foo:2,bar:3},{baz:4,wham:5},\nc=4;', + output: 'var a = 1,\n b = {\n foo: 2,\n bar: 3\n },\n {\n baz: 4,\n wham: 5\n },\n c = 4;' + }, + + { + comment: 'inline comment', + input_: 'function x(/*int*/ start, /*string*/ foo)', + output: 'function x( /*int*/ start, /*string*/ foo)' + }, + + { + comment: 'javadoc comment', + input: '/**\n* foo\n*/', + output: '/**\n * foo\n */' + }, + { input: '{\n/**\n* foo\n*/\n}', output: '{\n /**\n * foo\n */\n}' }, + + { + comment: 'starless block comment', + unchanged: '/**\nfoo\n*/' + }, + { unchanged: '/**\nfoo\n**/' }, + { unchanged: '/**\nfoo\nbar\n**/' }, + { unchanged: '/**\nfoo\n\nbar\n**/' }, + { unchanged: '/**\nfoo\n bar\n**/' }, + { input: '{\n/**\nfoo\n*/\n}', output: '{\n /**\n foo\n */\n}' }, + { input: '{\n/**\nfoo\n**/\n}', output: '{\n /**\n foo\n **/\n}' }, + { input: '{\n/**\nfoo\nbar\n**/\n}', output: '{\n /**\n foo\n bar\n **/\n}' }, + { input: '{\n/**\nfoo\n\nbar\n**/\n}', output: '{\n /**\n foo\n\n bar\n **/\n}' }, + { input: '{\n/**\nfoo\n bar\n**/\n}', output: '{\n /**\n foo\n bar\n **/\n}' }, + { unchanged: '{\n /**\n foo\nbar\n **/\n}' }, + + { input: 'var a,b,c=1,d,e,f=2;', output: 'var a, b, c = 1,\n d, e, f = 2;' }, + { input: 'var a,b,c=[],d,e,f=2;', output: 'var a, b, c = [],\n d, e, f = 2;' }, + { unchanged: 'function() {\n var a, b, c, d, e = [],\n f;\n}' }, + + { input: 'do/regexp/;\nwhile(1);', output: 'do /regexp/;\nwhile (1);' }, + { input: 'var a = a,\na;\nb = {\nb\n}', output: 'var a = a,\n a;\nb = {\n b\n}' }, + + { unchanged: 'var a = a,\n /* c */\n b;' }, + { unchanged: 'var a = a,\n // c\n b;' }, + + { + comment: 'weird element referencing', + unchanged: 'foo.("bar");' + }, + + + { unchanged: 'if (a) a()\nelse b()\nnewline()' }, + { unchanged: 'if (a) a()\nnewline()' }, + { input: 'a=typeof(x)', output: 'a = typeof(x)' }, + + { unchanged: 'var a = function() {\n return null;\n },\n b = false;' }, + + { unchanged: 'var a = function() {\n func1()\n}' }, + { unchanged: 'var a = function() {\n func1()\n}\nvar b = function() {\n func2()\n}' }, + + { + comment: 'code with and without semicolons', + input_: 'var whatever = require("whatever");\nfunction() {\n a = 6;\n}', + output: 'var whatever = require("whatever");\n\nfunction() {\n a = 6;\n}' + }, + { + input: 'var whatever = require("whatever")\nfunction() {\n a = 6\n}', + output: 'var whatever = require("whatever")\n\nfunction() {\n a = 6\n}' + }, + + { input: '{"x":[{"a":1,"b":3},\n7,8,8,8,8,{"b":99},{"a":11}]}', output: '{\n "x": [{\n "a": 1,\n "b": 3\n },\n 7, 8, 8, 8, 8, {\n "b": 99\n }, {\n "a": 11\n }\n ]\n}' }, + { input: '{"x":[{"a":1,"b":3},7,8,8,8,8,{"b":99},{"a":11}]}', output: '{\n "x": [{\n "a": 1,\n "b": 3\n }, 7, 8, 8, 8, 8, {\n "b": 99\n }, {\n "a": 11\n }]\n}' }, + + { input: '{"1":{"1a":"1b"},"2"}', output: '{\n "1": {\n "1a": "1b"\n },\n "2"\n}' }, + { input: '{a:{a:b},c}', output: '{\n a: {\n a: b\n },\n c\n}' }, + + { input: '{[y[a]];keep_indent;}', output: '{\n [y[a]];\n keep_indent;\n}' }, + + { input: 'if (x) {y} else { if (x) {y}}', output: 'if (x) {\n y\n} else {\n if (x) {\n y\n }\n}' }, + + { unchanged: 'if (foo) one()\ntwo()\nthree()' }, + { unchanged: 'if (1 + foo() && bar(baz()) / 2) one()\ntwo()\nthree()' }, + { unchanged: 'if (1 + foo() && bar(baz()) / 2) one();\ntwo();\nthree();' }, + + { input: 'var a=1,b={bang:2},c=3;', output: 'var a = 1,\n b = {\n bang: 2\n },\n c = 3;' }, + { input: 'var a={bing:1},b=2,c=3;', output: 'var a = {\n bing: 1\n },\n b = 2,\n c = 3;' }, + + ], + }], + examples: [{ + // Example + group_name: "one", + description: "", + options: [], + values: [{ + source: "", //string or array of lines + output: "" //string or array of lines + }] + }] +}; \ No newline at end of file diff --git a/node_modules/js-beautify/test/generate-tests.js b/node_modules/js-beautify/test/generate-tests.js new file mode 100644 index 0000000..2d00162 --- /dev/null +++ b/node_modules/js-beautify/test/generate-tests.js @@ -0,0 +1,216 @@ +#!/usr/bin/env node + +/* + The MIT License (MIT) + + Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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. +*/ + +var fs = require('fs'); +var mustache = require('mustache'); +var path = require('path'); + +function generate_tests() { + // javascript + generate_test_files('javascript', 'bt', 'js/test/generated/beautify-javascript-tests.js', 'python/jsbeautifier/tests/generated/tests.py'); + + // css + generate_test_files('css', 't', 'js/test/generated/beautify-css-tests.js', 'python/cssbeautifier/tests/generated/tests.py'); + + // html + // no python html beautifier, so no tests + generate_test_files('html', 'bth', 'js/test/generated/beautify-html-tests.js'); +} + +function generate_test_files(data_folder, test_method, node_output, python_output) { + var data_file_path, input_path, template_file_path; + var test_data, template; + + input_path = path.resolve(__dirname, 'data', data_folder); + data_file_path = path.resolve(input_path, 'tests.js'); + test_data = require(data_file_path).test_data; + + template_file_path = path.resolve(input_path, 'node.mustache'); + template = fs.readFileSync(template_file_path, { encoding: 'utf-8' }); + set_formatters(test_data, test_method, '// '); + set_generated_header(test_data, data_file_path, template_file_path); + fs.writeFileSync(path.resolve(__dirname, '..', node_output), + mustache.render(template, test_data), { encoding: 'utf-8' }); + + if (python_output) { + template_file_path = path.resolve(input_path, 'python.mustache'); + template = fs.readFileSync(template_file_path, { encoding: 'utf-8' }); + set_formatters(test_data, test_method, '# '); + set_generated_header(test_data, data_file_path, template_file_path); + fs.writeFileSync(path.resolve(__dirname, '..', python_output), + mustache.render(template, test_data), { encoding: 'utf-8' }); + } +} + +function set_generated_header(data, data_file_path, template_file_path) { + var relative_script_path = path.relative(process.cwd(), __filename).split(path.sep).join('/'); + var relative_data_file_path = path.relative(process.cwd(), data_file_path).split(path.sep).join('/'); + var relative_template_file_path = path.relative(process.cwd(), template_file_path).split(path.sep).join('/'); + + data.header_text = + ' AUTO-GENERATED. DO NOT MODIFY.\n' + + ' Script: ' + relative_script_path + '\n' + + ' Template: ' + relative_template_file_path + '\n' + + ' Data: ' + relative_data_file_path; + +} + +function isStringOrArray(val) { + return typeof val === 'string' || val instanceof Array; +} + +function getTestString(val) { + val = val.split('\n'); + + var result = "'" + val.join("\\n' +\n '").replace(/\t/g, '\\t') + "'"; + result = result.replace(/' \+\n ''$/, "'"); + return result; +} + +function set_formatters(data, test_method, comment_mark) { + + // utility mustache functions + data.matrix_context_string = function() { + var context = this; + return function(text, render) { + var outputs = []; + // text is ignored for this + for (var name in context) { + if (name === 'options') { + continue; + } + + if (context.hasOwnProperty(name)) { + outputs.push(name + ' = "' + context[name].replace(/\n/g, '\\n').replace(/\t/g, '\\t') + '"'); + } + } + return render(outputs.join(', ')); + }; + }; + + data.test_line = function() { + return function(text, render) { + var method_text = this.fragment ? 'test_fragment' : test_method; + var comment = ''; + var before_input = method_text + '('; + var input = null; + var before_output = ', '; + var output = null; + + // text is ignored for this. + if (typeof this.comment === 'string') { + this.comment = this.comment.split('\n'); + } + + if (this.comment instanceof Array) { + comment = '\n ' + comment_mark + this.comment.join('\n ' + comment_mark) + '\n '; + } + + // input: the default field + // input_: allow underscore for formatting alignment with "output" + // unchanged: use "unchanged" instead of "input" if there is no output + input = this.input || this.input_ || this.unchanged; + if (input instanceof Array) { + input = input.join('\n'); + } + + if (isStringOrArray(this.output)) { + output = this.output; + if (output instanceof Array) { + output = output.join('\n'); + } + } + + // Do all most error checking + if (!(this.input !== null || this.input_ !== null || this.unchanged !== null)) { + throw "Missing test input field (input, input_, or unchanged)."; + } else if ((this.input !== null && (this.input_ !== null || this.unchanged !== null)) && + (this.input_ === null || this.unchanged === null)) { + throw "Only one test input field allowed (input, input_, or unchanged): " + input; + } else if (output && isStringOrArray(this.unchanged)) { + throw "Cannot specify 'output' with 'unchanged' test input: " + input; + } else if (!output && !isStringOrArray(this.unchanged)) { + throw "Neither 'output' nor 'unchanged' specified for test input: " + input; + } else if (input === output) { + // Raw input and output can be the same, just omit output. + throw "Test strings are identical. Omit 'output' and use 'unchanged': " + input; + } + + if (output && output.indexOf('<%') !== -1) { + mustache.tags = ['<%', '%>']; + } + + input = getTestString(render(input)); + + if (output) { + output = getTestString(render(output)); + } else { + output = ''; + } + + if (output && output.indexOf('<%') !== -1) { + mustache.tags = ['{{', '}}']; + } + + if (this.input_ || input.indexOf('\n') !== -1 || output.indexOf('\n') !== -1) { + before_input = method_text + '(\n '; + before_output = ',\n ' + comment_mark + ' -- output --\n '; + } + if (output === '') { + before_output = ''; + } + + // Rendered input and output can be the same, just omit output. + if (output === input) { + before_output = ''; + output = ''; + } + return comment + before_input + input + before_output + output + ')'; + }; + }; + + data.set_mustache_tags = function() { + return function( /* text, render */ ) { + if (this.template) { + mustache.tags = this.template.split(' '); + } + return ''; + }; + }; + + data.unset_mustache_tags = function() { + return function( /* text , render */ ) { + if (this.template) { + mustache.tags = ['{{', '}}']; + } + return ''; + }; + }; +} + +generate_tests(); \ No newline at end of file diff --git a/node_modules/js-beautify/test/resources/html-with-base64image.html b/node_modules/js-beautify/test/resources/html-with-base64image.html new file mode 100644 index 0000000..c32bbc8 --- /dev/null +++ b/node_modules/js-beautify/test/resources/html-with-base64image.html @@ -0,0 +1 @@ +


    \ No newline at end of file diff --git a/node_modules/js-beautify/test/resources/underscore-min.js b/node_modules/js-beautify/test/resources/underscore-min.js new file mode 100644 index 0000000..11f1d96 --- /dev/null +++ b/node_modules/js-beautify/test/resources/underscore-min.js @@ -0,0 +1,6 @@ +// Underscore.js 1.7.0 +// http://underscorejs.org +// (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors +// Underscore may be freely distributed under the MIT license. +(function(){var n=this,t=n._,r=Array.prototype,e=Object.prototype,u=Function.prototype,i=r.push,a=r.slice,o=r.concat,l=e.toString,c=e.hasOwnProperty,f=Array.isArray,s=Object.keys,p=u.bind,h=function(n){return n instanceof h?n:this instanceof h?void(this._wrapped=n):new h(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=h),exports._=h):n._=h,h.VERSION="1.7.0";var g=function(n,t,r){if(t===void 0)return n;switch(null==r?3:r){case 1:return function(r){return n.call(t,r)};case 2:return function(r,e){return n.call(t,r,e)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,i){return n.call(t,r,e,u,i)}}return function(){return n.apply(t,arguments)}};h.iteratee=function(n,t,r){return null==n?h.identity:h.isFunction(n)?g(n,t,r):h.isObject(n)?h.matches(n):h.property(n)},h.each=h.forEach=function(n,t,r){if(null==n)return n;t=g(t,r);var e,u=n.length;if(u===+u)for(e=0;u>e;e++)t(n[e],e,n);else{var i=h.keys(n);for(e=0,u=i.length;u>e;e++)t(n[i[e]],i[e],n)}return n},h.map=h.collect=function(n,t,r){if(null==n)return[];t=h.iteratee(t,r);for(var e,u=n.length!==+n.length&&h.keys(n),i=(u||n).length,a=Array(i),o=0;i>o;o++)e=u?u[o]:o,a[o]=t(n[e],e,n);return a};var v="Reduce of empty array with no initial value";h.reduce=h.foldl=h.inject=function(n,t,r,e){null==n&&(n=[]),t=g(t,e,4);var u,i=n.length!==+n.length&&h.keys(n),a=(i||n).length,o=0;if(arguments.length<3){if(!a)throw new TypeError(v);r=n[i?i[o++]:o++]}for(;a>o;o++)u=i?i[o]:o,r=t(r,n[u],u,n);return r},h.reduceRight=h.foldr=function(n,t,r,e){null==n&&(n=[]),t=g(t,e,4);var u,i=n.length!==+n.length&&h.keys(n),a=(i||n).length;if(arguments.length<3){if(!a)throw new TypeError(v);r=n[i?i[--a]:--a]}for(;a--;)u=i?i[a]:a,r=t(r,n[u],u,n);return r},h.find=h.detect=function(n,t,r){var e;return t=h.iteratee(t,r),h.some(n,function(n,r,u){return t(n,r,u)?(e=n,!0):void 0}),e},h.filter=h.select=function(n,t,r){var e=[];return null==n?e:(t=h.iteratee(t,r),h.each(n,function(n,r,u){t(n,r,u)&&e.push(n)}),e)},h.reject=function(n,t,r){return h.filter(n,h.negate(h.iteratee(t)),r)},h.every=h.all=function(n,t,r){if(null==n)return!0;t=h.iteratee(t,r);var e,u,i=n.length!==+n.length&&h.keys(n),a=(i||n).length;for(e=0;a>e;e++)if(u=i?i[e]:e,!t(n[u],u,n))return!1;return!0},h.some=h.any=function(n,t,r){if(null==n)return!1;t=h.iteratee(t,r);var e,u,i=n.length!==+n.length&&h.keys(n),a=(i||n).length;for(e=0;a>e;e++)if(u=i?i[e]:e,t(n[u],u,n))return!0;return!1},h.contains=h.include=function(n,t){return null==n?!1:(n.length!==+n.length&&(n=h.values(n)),h.indexOf(n,t)>=0)},h.invoke=function(n,t){var r=a.call(arguments,2),e=h.isFunction(t);return h.map(n,function(n){return(e?t:n[t]).apply(n,r)})},h.pluck=function(n,t){return h.map(n,h.property(t))},h.where=function(n,t){return h.filter(n,h.matches(t))},h.findWhere=function(n,t){return h.find(n,h.matches(t))},h.max=function(n,t,r){var e,u,i=-1/0,a=-1/0;if(null==t&&null!=n){n=n.length===+n.length?n:h.values(n);for(var o=0,l=n.length;l>o;o++)e=n[o],e>i&&(i=e)}else t=h.iteratee(t,r),h.each(n,function(n,r,e){u=t(n,r,e),(u>a||u===-1/0&&i===-1/0)&&(i=n,a=u)});return i},h.min=function(n,t,r){var e,u,i=1/0,a=1/0;if(null==t&&null!=n){n=n.length===+n.length?n:h.values(n);for(var o=0,l=n.length;l>o;o++)e=n[o],i>e&&(i=e)}else t=h.iteratee(t,r),h.each(n,function(n,r,e){u=t(n,r,e),(a>u||1/0===u&&1/0===i)&&(i=n,a=u)});return i},h.shuffle=function(n){for(var t,r=n&&n.length===+n.length?n:h.values(n),e=r.length,u=Array(e),i=0;e>i;i++)t=h.random(0,i),t!==i&&(u[i]=u[t]),u[t]=r[i];return u},h.sample=function(n,t,r){return null==t||r?(n.length!==+n.length&&(n=h.values(n)),n[h.random(n.length-1)]):h.shuffle(n).slice(0,Math.max(0,t))},h.sortBy=function(n,t,r){return t=h.iteratee(t,r),h.pluck(h.map(n,function(n,r,e){return{value:n,index:r,criteria:t(n,r,e)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.index-t.index}),"value")};var m=function(n){return function(t,r,e){var u={};return r=h.iteratee(r,e),h.each(t,function(e,i){var a=r(e,i,t);n(u,e,a)}),u}};h.groupBy=m(function(n,t,r){h.has(n,r)?n[r].push(t):n[r]=[t]}),h.indexBy=m(function(n,t,r){n[r]=t}),h.countBy=m(function(n,t,r){h.has(n,r)?n[r]++:n[r]=1}),h.sortedIndex=function(n,t,r,e){r=h.iteratee(r,e,1);for(var u=r(t),i=0,a=n.length;a>i;){var o=i+a>>>1;r(n[o])t?[]:a.call(n,0,t)},h.initial=function(n,t,r){return a.call(n,0,Math.max(0,n.length-(null==t||r?1:t)))},h.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:a.call(n,Math.max(n.length-t,0))},h.rest=h.tail=h.drop=function(n,t,r){return a.call(n,null==t||r?1:t)},h.compact=function(n){return h.filter(n,h.identity)};var y=function(n,t,r,e){if(t&&h.every(n,h.isArray))return o.apply(e,n);for(var u=0,a=n.length;a>u;u++){var l=n[u];h.isArray(l)||h.isArguments(l)?t?i.apply(e,l):y(l,t,r,e):r||e.push(l)}return e};h.flatten=function(n,t){return y(n,t,!1,[])},h.without=function(n){return h.difference(n,a.call(arguments,1))},h.uniq=h.unique=function(n,t,r,e){if(null==n)return[];h.isBoolean(t)||(e=r,r=t,t=!1),null!=r&&(r=h.iteratee(r,e));for(var u=[],i=[],a=0,o=n.length;o>a;a++){var l=n[a];if(t)a&&i===l||u.push(l),i=l;else if(r){var c=r(l,a,n);h.indexOf(i,c)<0&&(i.push(c),u.push(l))}else h.indexOf(u,l)<0&&u.push(l)}return u},h.union=function(){return h.uniq(y(arguments,!0,!0,[]))},h.intersection=function(n){if(null==n)return[];for(var t=[],r=arguments.length,e=0,u=n.length;u>e;e++){var i=n[e];if(!h.contains(t,i)){for(var a=1;r>a&&h.contains(arguments[a],i);a++);a===r&&t.push(i)}}return t},h.difference=function(n){var t=y(a.call(arguments,1),!0,!0,[]);return h.filter(n,function(n){return!h.contains(t,n)})},h.zip=function(n){if(null==n)return[];for(var t=h.max(arguments,"length").length,r=Array(t),e=0;t>e;e++)r[e]=h.pluck(arguments,e);return r},h.object=function(n,t){if(null==n)return{};for(var r={},e=0,u=n.length;u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},h.indexOf=function(n,t,r){if(null==n)return-1;var e=0,u=n.length;if(r){if("number"!=typeof r)return e=h.sortedIndex(n,t),n[e]===t?e:-1;e=0>r?Math.max(0,u+r):r}for(;u>e;e++)if(n[e]===t)return e;return-1},h.lastIndexOf=function(n,t,r){if(null==n)return-1;var e=n.length;for("number"==typeof r&&(e=0>r?e+r+1:Math.min(e,r+1));--e>=0;)if(n[e]===t)return e;return-1},h.range=function(n,t,r){arguments.length<=1&&(t=n||0,n=0),r=r||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=Array(e),i=0;e>i;i++,n+=r)u[i]=n;return u};var d=function(){};h.bind=function(n,t){var r,e;if(p&&n.bind===p)return p.apply(n,a.call(arguments,1));if(!h.isFunction(n))throw new TypeError("Bind must be called on a function");return r=a.call(arguments,2),e=function(){if(!(this instanceof e))return n.apply(t,r.concat(a.call(arguments)));d.prototype=n.prototype;var u=new d;d.prototype=null;var i=n.apply(u,r.concat(a.call(arguments)));return h.isObject(i)?i:u}},h.partial=function(n){var t=a.call(arguments,1);return function(){for(var r=0,e=t.slice(),u=0,i=e.length;i>u;u++)e[u]===h&&(e[u]=arguments[r++]);for(;r=e)throw new Error("bindAll must be passed function names");for(t=1;e>t;t++)r=arguments[t],n[r]=h.bind(n[r],n);return n},h.memoize=function(n,t){var r=function(e){var u=r.cache,i=t?t.apply(this,arguments):e;return h.has(u,i)||(u[i]=n.apply(this,arguments)),u[i]};return r.cache={},r},h.delay=function(n,t){var r=a.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},h.defer=function(n){return h.delay.apply(h,[n,1].concat(a.call(arguments,1)))},h.throttle=function(n,t,r){var e,u,i,a=null,o=0;r||(r={});var l=function(){o=r.leading===!1?0:h.now(),a=null,i=n.apply(e,u),a||(e=u=null)};return function(){var c=h.now();o||r.leading!==!1||(o=c);var f=t-(c-o);return e=this,u=arguments,0>=f||f>t?(clearTimeout(a),a=null,o=c,i=n.apply(e,u),a||(e=u=null)):a||r.trailing===!1||(a=setTimeout(l,f)),i}},h.debounce=function(n,t,r){var e,u,i,a,o,l=function(){var c=h.now()-a;t>c&&c>0?e=setTimeout(l,t-c):(e=null,r||(o=n.apply(i,u),e||(i=u=null)))};return function(){i=this,u=arguments,a=h.now();var c=r&&!e;return e||(e=setTimeout(l,t)),c&&(o=n.apply(i,u),i=u=null),o}},h.wrap=function(n,t){return h.partial(t,n)},h.negate=function(n){return function(){return!n.apply(this,arguments)}},h.compose=function(){var n=arguments,t=n.length-1;return function(){for(var r=t,e=n[t].apply(this,arguments);r--;)e=n[r].call(this,e);return e}},h.after=function(n,t){return function(){return--n<1?t.apply(this,arguments):void 0}},h.before=function(n,t){var r;return function(){return--n>0?r=t.apply(this,arguments):t=null,r}},h.once=h.partial(h.before,2),h.keys=function(n){if(!h.isObject(n))return[];if(s)return s(n);var t=[];for(var r in n)h.has(n,r)&&t.push(r);return t},h.values=function(n){for(var t=h.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=n[t[u]];return e},h.pairs=function(n){for(var t=h.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=[t[u],n[t[u]]];return e},h.invert=function(n){for(var t={},r=h.keys(n),e=0,u=r.length;u>e;e++)t[n[r[e]]]=r[e];return t},h.functions=h.methods=function(n){var t=[];for(var r in n)h.isFunction(n[r])&&t.push(r);return t.sort()},h.extend=function(n){if(!h.isObject(n))return n;for(var t,r,e=1,u=arguments.length;u>e;e++){t=arguments[e];for(r in t)c.call(t,r)&&(n[r]=t[r])}return n},h.pick=function(n,t,r){var e,u={};if(null==n)return u;if(h.isFunction(t)){t=g(t,r);for(e in n){var i=n[e];t(i,e,n)&&(u[e]=i)}}else{var l=o.apply([],a.call(arguments,1));n=new Object(n);for(var c=0,f=l.length;f>c;c++)e=l[c],e in n&&(u[e]=n[e])}return u},h.omit=function(n,t,r){if(h.isFunction(t))t=h.negate(t);else{var e=h.map(o.apply([],a.call(arguments,1)),String);t=function(n,t){return!h.contains(e,t)}}return h.pick(n,t,r)},h.defaults=function(n){if(!h.isObject(n))return n;for(var t=1,r=arguments.length;r>t;t++){var e=arguments[t];for(var u in e)n[u]===void 0&&(n[u]=e[u])}return n},h.clone=function(n){return h.isObject(n)?h.isArray(n)?n.slice():h.extend({},n):n},h.tap=function(n,t){return t(n),n};var b=function(n,t,r,e){if(n===t)return 0!==n||1/n===1/t;if(null==n||null==t)return n===t;n instanceof h&&(n=n._wrapped),t instanceof h&&(t=t._wrapped);var u=l.call(n);if(u!==l.call(t))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+n==""+t;case"[object Number]":return+n!==+n?+t!==+t:0===+n?1/+n===1/t:+n===+t;case"[object Date]":case"[object Boolean]":return+n===+t}if("object"!=typeof n||"object"!=typeof t)return!1;for(var i=r.length;i--;)if(r[i]===n)return e[i]===t;var a=n.constructor,o=t.constructor;if(a!==o&&"constructor"in n&&"constructor"in t&&!(h.isFunction(a)&&a instanceof a&&h.isFunction(o)&&o instanceof o))return!1;r.push(n),e.push(t);var c,f;if("[object Array]"===u){if(c=n.length,f=c===t.length)for(;c--&&(f=b(n[c],t[c],r,e)););}else{var s,p=h.keys(n);if(c=p.length,f=h.keys(t).length===c)for(;c--&&(s=p[c],f=h.has(t,s)&&b(n[s],t[s],r,e)););}return r.pop(),e.pop(),f};h.isEqual=function(n,t){return b(n,t,[],[])},h.isEmpty=function(n){if(null==n)return!0;if(h.isArray(n)||h.isString(n)||h.isArguments(n))return 0===n.length;for(var t in n)if(h.has(n,t))return!1;return!0},h.isElement=function(n){return!(!n||1!==n.nodeType)},h.isArray=f||function(n){return"[object Array]"===l.call(n)},h.isObject=function(n){var t=typeof n;return"function"===t||"object"===t&&!!n},h.each(["Arguments","Function","String","Number","Date","RegExp"],function(n){h["is"+n]=function(t){return l.call(t)==="[object "+n+"]"}}),h.isArguments(arguments)||(h.isArguments=function(n){return h.has(n,"callee")}),"function"!=typeof/./&&(h.isFunction=function(n){return"function"==typeof n||!1}),h.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},h.isNaN=function(n){return h.isNumber(n)&&n!==+n},h.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"===l.call(n)},h.isNull=function(n){return null===n},h.isUndefined=function(n){return n===void 0},h.has=function(n,t){return null!=n&&c.call(n,t)},h.noConflict=function(){return n._=t,this},h.identity=function(n){return n},h.constant=function(n){return function(){return n}},h.noop=function(){},h.property=function(n){return function(t){return t[n]}},h.matches=function(n){var t=h.pairs(n),r=t.length;return function(n){if(null==n)return!r;n=new Object(n);for(var e=0;r>e;e++){var u=t[e],i=u[0];if(u[1]!==n[i]||!(i in n))return!1}return!0}},h.times=function(n,t,r){var e=Array(Math.max(0,n));t=g(t,r,1);for(var u=0;n>u;u++)e[u]=t(u);return e},h.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))},h.now=Date.now||function(){return(new Date).getTime()};var _={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},w=h.invert(_),j=function(n){var t=function(t){return n[t]},r="(?:"+h.keys(n).join("|")+")",e=RegExp(r),u=RegExp(r,"g");return function(n){return n=null==n?"":""+n,e.test(n)?n.replace(u,t):n}};h.escape=j(_),h.unescape=j(w),h.result=function(n,t){if(null==n)return void 0;var r=n[t];return h.isFunction(r)?n[t]():r};var x=0;h.uniqueId=function(n){var t=++x+"";return n?n+t:t},h.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var A=/(.)^/,k={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},O=/\\|'|\r|\n|\u2028|\u2029/g,F=function(n){return"\\"+k[n]};h.template=function(n,t,r){!t&&r&&(t=r),t=h.defaults({},t,h.templateSettings);var e=RegExp([(t.escape||A).source,(t.interpolate||A).source,(t.evaluate||A).source].join("|")+"|$","g"),u=0,i="__p+='";n.replace(e,function(t,r,e,a,o){return i+=n.slice(u,o).replace(O,F),u=o+t.length,r?i+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":e?i+="'+\n((__t=("+e+"))==null?'':__t)+\n'":a&&(i+="';\n"+a+"\n__p+='"),t}),i+="';\n",t.variable||(i="with(obj||{}){\n"+i+"}\n"),i="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+i+"return __p;\n";try{var a=new Function(t.variable||"obj","_",i)}catch(o){throw o.source=i,o}var l=function(n){return a.call(this,n,h)},c=t.variable||"obj";return l.source="function("+c+"){\n"+i+"}",l},h.chain=function(n){var t=h(n);return t._chain=!0,t};var E=function(n){return this._chain?h(n).chain():n};h.mixin=function(n){h.each(h.functions(n),function(t){var r=h[t]=n[t];h.prototype[t]=function(){var n=[this._wrapped];return i.apply(n,arguments),E.call(this,r.apply(h,n))}})},h.mixin(h),h.each(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=r[n];h.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!==n&&"splice"!==n||0!==r.length||delete r[0],E.call(this,r)}}),h.each(["concat","join","slice"],function(n){var t=r[n];h.prototype[n]=function(){return E.call(this,t.apply(this._wrapped,arguments))}}),h.prototype.value=function(){return this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return h})}).call(this); +//# sourceMappingURL=underscore-min.map \ No newline at end of file diff --git a/node_modules/js-beautify/test/resources/underscore.js b/node_modules/js-beautify/test/resources/underscore.js new file mode 100644 index 0000000..a253446 --- /dev/null +++ b/node_modules/js-beautify/test/resources/underscore.js @@ -0,0 +1,1439 @@ +// Underscore.js 1.7.0 +// http://underscorejs.org +// (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors +// Underscore may be freely distributed under the MIT license. + +(function() { + + // Baseline setup + // -------------- + + // Establish the root object, `window` in the browser, or `exports` on the server. + var root = this; + + // Save the previous value of the `_` variable. + var previousUnderscore = root._; + + // Save bytes in the minified (but not gzipped) version: + var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype; + + // Create quick reference variables for speed access to core prototypes. + var + push = ArrayProto.push, + slice = ArrayProto.slice, + toString = ObjProto.toString, + hasOwnProperty = ObjProto.hasOwnProperty; + + // All **ECMAScript 5** native function implementations that we hope to use + // are declared here. + var + nativeIsArray = Array.isArray, + nativeKeys = Object.keys, + nativeBind = FuncProto.bind; + + // Create a safe reference to the Underscore object for use below. + var _ = function(obj) { + if (obj instanceof _) return obj; + if (!(this instanceof _)) return new _(obj); + this._wrapped = obj; + }; + + // Export the Underscore object for **Node.js**, with + // backwards-compatibility for the old `require()` API. If we're in + // the browser, add `_` as a global object. + if (typeof exports !== 'undefined') { + if (typeof module !== 'undefined' && module.exports) { + exports = module.exports = _; + } + exports._ = _; + } else { + root._ = _; + } + + // Current version. + _.VERSION = '1.7.0'; + + // Internal function that returns an efficient (for current engines) version + // of the passed-in callback, to be repeatedly applied in other Underscore + // functions. + var optimizeCb = function(func, context, argCount) { + if (context === void 0) return func; + switch (argCount == null ? 3 : argCount) { + case 1: return function(value) { + return func.call(context, value); + }; + case 2: return function(value, other) { + return func.call(context, value, other); + }; + case 3: return function(value, index, collection) { + return func.call(context, value, index, collection); + }; + case 4: return function(accumulator, value, index, collection) { + return func.call(context, accumulator, value, index, collection); + }; + } + return function() { + return func.apply(context, arguments); + }; + }; + + // A mostly-internal function to generate callbacks that can be applied + // to each element in a collection, returning the desired result — either + // identity, an arbitrary callback, a property matcher, or a property accessor. + var cb = function(value, context, argCount) { + if (value == null) return _.identity; + if (_.isFunction(value)) return optimizeCb(value, context, argCount); + if (_.isObject(value)) return _.matches(value); + return _.property(value); + }; + _.iteratee = function(value, context) { + return cb(value, context); + }; + + // Collection Functions + // -------------------- + + // The cornerstone, an `each` implementation, aka `forEach`. + // Handles raw objects in addition to array-likes. Treats all + // sparse array-likes as if they were dense. + _.each = _.forEach = function(obj, iteratee, context) { + if (obj == null) return obj; + iteratee = optimizeCb(iteratee, context); + var i, length = obj.length; + if (length === +length) { + for (i = 0; i < length; i++) { + iteratee(obj[i], i, obj); + } + } else { + var keys = _.keys(obj); + for (i = 0, length = keys.length; i < length; i++) { + iteratee(obj[keys[i]], keys[i], obj); + } + } + return obj; + }; + + // Return the results of applying the iteratee to each element. + _.map = _.collect = function(obj, iteratee, context) { + if (obj == null) return []; + iteratee = cb(iteratee, context); + var keys = obj.length !== +obj.length && _.keys(obj), + length = (keys || obj).length, + results = Array(length), + currentKey; + for (var index = 0; index < length; index++) { + currentKey = keys ? keys[index] : index; + results[index] = iteratee(obj[currentKey], currentKey, obj); + } + return results; + }; + + var reduceError = 'Reduce of empty array with no initial value'; + + // **Reduce** builds up a single result from a list of values, aka `inject`, + // or `foldl`. + _.reduce = _.foldl = _.inject = function(obj, iteratee, memo, context) { + if (obj == null) obj = []; + iteratee = optimizeCb(iteratee, context, 4); + var keys = obj.length !== +obj.length && _.keys(obj), + length = (keys || obj).length, + index = 0, currentKey; + if (arguments.length < 3) { + if (!length) throw new TypeError(reduceError); + memo = obj[keys ? keys[index++] : index++]; + } + for (; index < length; index++) { + currentKey = keys ? keys[index] : index; + memo = iteratee(memo, obj[currentKey], currentKey, obj); + } + return memo; + }; + + // The right-associative version of reduce, also known as `foldr`. + _.reduceRight = _.foldr = function(obj, iteratee, memo, context) { + if (obj == null) obj = []; + iteratee = optimizeCb(iteratee, context, 4); + var keys = obj.length !== + obj.length && _.keys(obj), + index = (keys || obj).length, + currentKey; + if (arguments.length < 3) { + if (!index) throw new TypeError(reduceError); + memo = obj[keys ? keys[--index] : --index]; + } + while (index--) { + currentKey = keys ? keys[index] : index; + memo = iteratee(memo, obj[currentKey], currentKey, obj); + } + return memo; + }; + + // Return the first value which passes a truth test. Aliased as `detect`. + _.find = _.detect = function(obj, predicate, context) { + var result; + predicate = cb(predicate, context); + _.some(obj, function(value, index, list) { + if (predicate(value, index, list)) { + result = value; + return true; + } + }); + return result; + }; + + // Return all the elements that pass a truth test. + // Aliased as `select`. + _.filter = _.select = function(obj, predicate, context) { + var results = []; + if (obj == null) return results; + predicate = cb(predicate, context); + _.each(obj, function(value, index, list) { + if (predicate(value, index, list)) results.push(value); + }); + return results; + }; + + // Return all the elements for which a truth test fails. + _.reject = function(obj, predicate, context) { + return _.filter(obj, _.negate(cb(predicate)), context); + }; + + // Determine whether all of the elements match a truth test. + // Aliased as `all`. + _.every = _.all = function(obj, predicate, context) { + if (obj == null) return true; + predicate = cb(predicate, context); + var keys = obj.length !== +obj.length && _.keys(obj), + length = (keys || obj).length, + index, currentKey; + for (index = 0; index < length; index++) { + currentKey = keys ? keys[index] : index; + if (!predicate(obj[currentKey], currentKey, obj)) return false; + } + return true; + }; + + // Determine if at least one element in the object matches a truth test. + // Aliased as `any`. + _.some = _.any = function(obj, predicate, context) { + if (obj == null) return false; + predicate = cb(predicate, context); + var keys = obj.length !== +obj.length && _.keys(obj), + length = (keys || obj).length, + index, currentKey; + for (index = 0; index < length; index++) { + currentKey = keys ? keys[index] : index; + if (predicate(obj[currentKey], currentKey, obj)) return true; + } + return false; + }; + + // Determine if the array or object contains a given value (using `===`). + // Aliased as `include`. + _.contains = _.include = function(obj, target) { + if (obj == null) return false; + if (obj.length !== +obj.length) obj = _.values(obj); + return _.indexOf(obj, target) >= 0; + }; + + // Invoke a method (with arguments) on every item in a collection. + _.invoke = function(obj, method) { + var args = slice.call(arguments, 2); + var isFunc = _.isFunction(method); + return _.map(obj, function(value) { + return (isFunc ? method : value[method]).apply(value, args); + }); + }; + + // Convenience version of a common use case of `map`: fetching a property. + _.pluck = function(obj, key) { + return _.map(obj, _.property(key)); + }; + + // Convenience version of a common use case of `filter`: selecting only objects + // containing specific `key:value` pairs. + _.where = function(obj, attrs) { + return _.filter(obj, _.matches(attrs)); + }; + + // Convenience version of a common use case of `find`: getting the first object + // containing specific `key:value` pairs. + _.findWhere = function(obj, attrs) { + return _.find(obj, _.matches(attrs)); + }; + + // Return the maximum element (or element-based computation). + _.max = function(obj, iteratee, context) { + var result = -Infinity, lastComputed = -Infinity, + value, computed; + if (iteratee == null && obj != null) { + obj = obj.length === +obj.length ? obj : _.values(obj); + for (var i = 0, length = obj.length; i < length; i++) { + value = obj[i]; + if (value > result) { + result = value; + } + } + } else { + iteratee = cb(iteratee, context); + _.each(obj, function(value, index, list) { + computed = iteratee(value, index, list); + if (computed > lastComputed || computed === -Infinity && result === -Infinity) { + result = value; + lastComputed = computed; + } + }); + } + return result; + }; + + // Return the minimum element (or element-based computation). + _.min = function(obj, iteratee, context) { + var result = Infinity, lastComputed = Infinity, + value, computed; + if (iteratee == null && obj != null) { + obj = obj.length === +obj.length ? obj : _.values(obj); + for (var i = 0, length = obj.length; i < length; i++) { + value = obj[i]; + if (value < result) { + result = value; + } + } + } else { + iteratee = cb(iteratee, context); + _.each(obj, function(value, index, list) { + computed = iteratee(value, index, list); + if (computed < lastComputed || computed === Infinity && result === Infinity) { + result = value; + lastComputed = computed; + } + }); + } + return result; + }; + + // Shuffle a collection, using the modern version of the + // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle). + _.shuffle = function(obj) { + var set = obj && obj.length === +obj.length ? obj : _.values(obj); + var length = set.length; + var shuffled = Array(length); + for (var index = 0, rand; index < length; index++) { + rand = _.random(0, index); + if (rand !== index) shuffled[index] = shuffled[rand]; + shuffled[rand] = set[index]; + } + return shuffled; + }; + + // Sample **n** random values from a collection. + // If **n** is not specified, returns a single random element. + // The internal `guard` argument allows it to work with `map`. + _.sample = function(obj, n, guard) { + if (n == null || guard) { + if (obj.length !== +obj.length) obj = _.values(obj); + return obj[_.random(obj.length - 1)]; + } + return _.shuffle(obj).slice(0, Math.max(0, n)); + }; + + // Sort the object's values by a criterion produced by an iteratee. + _.sortBy = function(obj, iteratee, context) { + iteratee = cb(iteratee, context); + return _.pluck(_.map(obj, function(value, index, list) { + return { + value: value, + index: index, + criteria: iteratee(value, index, list) + }; + }).sort(function(left, right) { + var a = left.criteria; + var b = right.criteria; + if (a !== b) { + if (a > b || a === void 0) return 1; + if (a < b || b === void 0) return -1; + } + return left.index - right.index; + }), 'value'); + }; + + // An internal function used for aggregate "group by" operations. + var group = function(behavior) { + return function(obj, iteratee, context) { + var result = {}; + iteratee = cb(iteratee, context); + _.each(obj, function(value, index) { + var key = iteratee(value, index, obj); + behavior(result, value, key); + }); + return result; + }; + }; + + // Groups the object's values by a criterion. Pass either a string attribute + // to group by, or a function that returns the criterion. + _.groupBy = group(function(result, value, key) { + if (_.has(result, key)) result[key].push(value); else result[key] = [value]; + }); + + // Indexes the object's values by a criterion, similar to `groupBy`, but for + // when you know that your index values will be unique. + _.indexBy = group(function(result, value, key) { + result[key] = value; + }); + + // Counts instances of an object that group by a certain criterion. Pass + // either a string attribute to count by, or a function that returns the + // criterion. + _.countBy = group(function(result, value, key) { + if (_.has(result, key)) result[key]++; else result[key] = 1; + }); + + // Use a comparator function to figure out the smallest index at which + // an object should be inserted so as to maintain order. Uses binary search. + _.sortedIndex = function(array, obj, iteratee, context) { + iteratee = cb(iteratee, context, 1); + var value = iteratee(obj); + var low = 0, high = array.length; + while (low < high) { + var mid = low + high >>> 1; + if (iteratee(array[mid]) < value) low = mid + 1; else high = mid; + } + return low; + }; + + // Safely create a real, live array from anything iterable. + _.toArray = function(obj) { + if (!obj) return []; + if (_.isArray(obj)) return slice.call(obj); + if (obj.length === +obj.length) return _.map(obj, _.identity); + return _.values(obj); + }; + + // Return the number of elements in an object. + _.size = function(obj) { + if (obj == null) return 0; + return obj.length === +obj.length ? obj.length : _.keys(obj).length; + }; + + // Split a collection into two arrays: one whose elements all satisfy the given + // predicate, and one whose elements all do not satisfy the predicate. + _.partition = function(obj, predicate, context) { + predicate = cb(predicate, context); + var pass = [], fail = []; + _.each(obj, function(value, key, obj) { + (predicate(value, key, obj) ? pass : fail).push(value); + }); + return [pass, fail]; + }; + + // Array Functions + // --------------- + + // Get the first element of an array. Passing **n** will return the first N + // values in the array. Aliased as `head` and `take`. The **guard** check + // allows it to work with `_.map`. + _.first = _.head = _.take = function(array, n, guard) { + if (array == null) return void 0; + if (n == null || guard) return array[0]; + return _.initial(array, array.length - n); + }; + + // Returns everything but the last entry of the array. Especially useful on + // the arguments object. Passing **n** will return all the values in + // the array, excluding the last N. The **guard** check allows it to work with + // `_.map`. + _.initial = function(array, n, guard) { + return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n))); + }; + + // Get the last element of an array. Passing **n** will return the last N + // values in the array. The **guard** check allows it to work with `_.map`. + _.last = function(array, n, guard) { + if (array == null) return void 0; + if (n == null || guard) return array[array.length - 1]; + return _.rest(array, Math.max(0, array.length - n)); + }; + + // Returns everything but the first entry of the array. Aliased as `tail` and `drop`. + // Especially useful on the arguments object. Passing an **n** will return + // the rest N values in the array. The **guard** + // check allows it to work with `_.map`. + _.rest = _.tail = _.drop = function(array, n, guard) { + return slice.call(array, n == null || guard ? 1 : n); + }; + + // Trim out all falsy values from an array. + _.compact = function(array) { + return _.filter(array, _.identity); + }; + + // Internal implementation of a recursive `flatten` function. + var flatten = function(input, shallow, strict, startIndex) { + var output = [], idx = 0, value; + for (var i = startIndex || 0, length = input && input.length; i < length; i++) { + value = input[i]; + if (value && value.length >= 0 && (_.isArray(value) || _.isArguments(value))) { + //flatten current level of array or arguments object + if (!shallow) value = flatten(value, shallow, strict); + var j = 0, len = value.length; + output.length += len; + while (j < len) { + output[idx++] = value[j++]; + } + } else if (!strict) { + output[idx++] = value; + } + } + return output; + }; + + // Flatten out an array, either recursively (by default), or just one level. + _.flatten = function(array, shallow) { + return flatten(array, shallow, false); + }; + + // Return a version of the array that does not contain the specified value(s). + _.without = function(array) { + return _.difference(array, slice.call(arguments, 1)); + }; + + // Produce a duplicate-free version of the array. If the array has already + // been sorted, you have the option of using a faster algorithm. + // Aliased as `unique`. + _.uniq = _.unique = function(array, isSorted, iteratee, context) { + if (array == null) return []; + if (!_.isBoolean(isSorted)) { + context = iteratee; + iteratee = isSorted; + isSorted = false; + } + if (iteratee != null) iteratee = cb(iteratee, context); + var result = []; + var seen = []; + for (var i = 0, length = array.length; i < length; i++) { + var value = array[i], + computed = iteratee ? iteratee(value, i, array) : value; + if (isSorted) { + if (!i || seen !== computed) result.push(value); + seen = computed; + } else if (iteratee) { + if (!_.contains(seen, computed)) { + seen.push(computed); + result.push(value); + } + } else if (!_.contains(result, value)) { + result.push(value); + } + } + return result; + }; + + // Produce an array that contains the union: each distinct element from all of + // the passed-in arrays. + _.union = function() { + return _.uniq(flatten(arguments, true, true)); + }; + + // Produce an array that contains every item shared between all the + // passed-in arrays. + _.intersection = function(array) { + if (array == null) return []; + var result = []; + var argsLength = arguments.length; + for (var i = 0, length = array.length; i < length; i++) { + var item = array[i]; + if (_.contains(result, item)) continue; + for (var j = 1; j < argsLength; j++) { + if (!_.contains(arguments[j], item)) break; + } + if (j === argsLength) result.push(item); + } + return result; + }; + + // Take the difference between one array and a number of other arrays. + // Only the elements present in just the first array will remain. + _.difference = function(array) { + var rest = flatten(arguments, true, true, 1); + return _.filter(array, function(value){ + return !_.contains(rest, value); + }); + }; + + // Zip together multiple lists into a single array -- elements that share + // an index go together. + _.zip = function(array) { + if (array == null) return []; + var length = _.max(arguments, 'length').length; + var results = Array(length); + while (length-- > 0) { + results[length] = _.pluck(arguments, length); + } + return results; + }; + + // Complement of _.zip. Unzip accepts an array of arrays and groups + // each array's elements on shared indices + _.unzip = function(array) { + return _.zip.apply(null, array); + }; + + // Converts lists into objects. Pass either a single array of `[key, value]` + // pairs, or two parallel arrays of the same length -- one of keys, and one of + // the corresponding values. + _.object = function(list, values) { + if (list == null) return {}; + var result = {}; + for (var i = 0, length = list.length; i < length; i++) { + if (values) { + result[list[i]] = values[i]; + } else { + result[list[i][0]] = list[i][1]; + } + } + return result; + }; + + // Return the position of the first occurrence of an item in an array, + // or -1 if the item is not included in the array. + // If the array is large and already in sort order, pass `true` + // for **isSorted** to use binary search. + _.indexOf = function(array, item, isSorted) { + var i = 0, length = array && array.length; + if (typeof isSorted == 'number') { + i = isSorted < 0 ? Math.max(0, length + isSorted) : isSorted; + } else if (isSorted) { + i = _.sortedIndex(array, item); + return array[i] === item ? i : -1; + } + for (; i < length; i++) if (array[i] === item) return i; + return -1; + }; + + _.lastIndexOf = function(array, item, from) { + var idx = array ? array.length : 0; + if (typeof from == 'number') { + idx = from < 0 ? idx + from + 1 : Math.min(idx, from + 1); + } + while (--idx >= 0) if (array[idx] === item) return idx; + return -1; + }; + + // Generate an integer Array containing an arithmetic progression. A port of + // the native Python `range()` function. See + // [the Python documentation](http://docs.python.org/library/functions.html#range). + _.range = function(start, stop, step) { + if (arguments.length <= 1) { + stop = start || 0; + start = 0; + } + step = step || 1; + + var length = Math.max(Math.ceil((stop - start) / step), 0); + var range = Array(length); + + for (var idx = 0; idx < length; idx++, start += step) { + range[idx] = start; + } + + return range; + }; + + // Function (ahem) Functions + // ------------------ + + // Reusable constructor function for prototype setting. + var Ctor = function(){}; + + // Create a function bound to a given object (assigning `this`, and arguments, + // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if + // available. + _.bind = function(func, context) { + var args, bound; + if (nativeBind && func.bind === nativeBind) return nativeBind.apply(func, slice.call(arguments, 1)); + if (!_.isFunction(func)) throw new TypeError('Bind must be called on a function'); + args = slice.call(arguments, 2); + bound = function() { + if (!(this instanceof bound)) return func.apply(context, args.concat(slice.call(arguments))); + Ctor.prototype = func.prototype; + var self = new Ctor; + Ctor.prototype = null; + var result = func.apply(self, args.concat(slice.call(arguments))); + if (_.isObject(result)) return result; + return self; + }; + return bound; + }; + + // Partially apply a function by creating a version that has had some of its + // arguments pre-filled, without changing its dynamic `this` context. _ acts + // as a placeholder, allowing any combination of arguments to be pre-filled. + _.partial = function(func) { + var boundArgs = slice.call(arguments, 1); + return function() { + var position = 0; + var args = boundArgs.slice(); + for (var i = 0, length = args.length; i < length; i++) { + if (args[i] === _) args[i] = arguments[position++]; + } + while (position < arguments.length) args.push(arguments[position++]); + return func.apply(this, args); + }; + }; + + // Bind a number of an object's methods to that object. Remaining arguments + // are the method names to be bound. Useful for ensuring that all callbacks + // defined on an object belong to it. + _.bindAll = function(obj) { + var i, length = arguments.length, key; + if (length <= 1) throw new Error('bindAll must be passed function names'); + for (i = 1; i < length; i++) { + key = arguments[i]; + obj[key] = _.bind(obj[key], obj); + } + return obj; + }; + + // Memoize an expensive function by storing its results. + _.memoize = function(func, hasher) { + var memoize = function(key) { + var cache = memoize.cache; + var address = '' + (hasher ? hasher.apply(this, arguments) : key); + if (!_.has(cache, address)) cache[address] = func.apply(this, arguments); + return cache[address]; + }; + memoize.cache = {}; + return memoize; + }; + + // Delays a function for the given number of milliseconds, and then calls + // it with the arguments supplied. + _.delay = function(func, wait) { + var args = slice.call(arguments, 2); + return setTimeout(function(){ + return func.apply(null, args); + }, wait); + }; + + // Defers a function, scheduling it to run after the current call stack has + // cleared. + _.defer = function(func) { + return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1))); + }; + + // Returns a function, that, when invoked, will only be triggered at most once + // during a given window of time. Normally, the throttled function will run + // as much as it can, without ever going more than once per `wait` duration; + // but if you'd like to disable the execution on the leading edge, pass + // `{leading: false}`. To disable execution on the trailing edge, ditto. + _.throttle = function(func, wait, options) { + var context, args, result; + var timeout = null; + var previous = 0; + if (!options) options = {}; + var later = function() { + previous = options.leading === false ? 0 : _.now(); + timeout = null; + result = func.apply(context, args); + if (!timeout) context = args = null; + }; + return function() { + var now = _.now(); + if (!previous && options.leading === false) previous = now; + var remaining = wait - (now - previous); + context = this; + args = arguments; + if (remaining <= 0 || remaining > wait) { + if (timeout) { + clearTimeout(timeout); + timeout = null; + } + previous = now; + result = func.apply(context, args); + if (!timeout) context = args = null; + } else if (!timeout && options.trailing !== false) { + timeout = setTimeout(later, remaining); + } + return result; + }; + }; + + // Returns a function, that, as long as it continues to be invoked, will not + // be triggered. The function will be called after it stops being called for + // N milliseconds. If `immediate` is passed, trigger the function on the + // leading edge, instead of the trailing. + _.debounce = function(func, wait, immediate) { + var timeout, args, context, timestamp, result; + + var later = function() { + var last = _.now() - timestamp; + + if (last < wait && last >= 0) { + timeout = setTimeout(later, wait - last); + } else { + timeout = null; + if (!immediate) { + result = func.apply(context, args); + if (!timeout) context = args = null; + } + } + }; + + return function() { + context = this; + args = arguments; + timestamp = _.now(); + var callNow = immediate && !timeout; + if (!timeout) timeout = setTimeout(later, wait); + if (callNow) { + result = func.apply(context, args); + context = args = null; + } + + return result; + }; + }; + + // Returns the first function passed as an argument to the second, + // allowing you to adjust arguments, run code before and after, and + // conditionally execute the original function. + _.wrap = function(func, wrapper) { + return _.partial(wrapper, func); + }; + + // Returns a negated version of the passed-in predicate. + _.negate = function(predicate) { + return function() { + return !predicate.apply(this, arguments); + }; + }; + + // Returns a function that is the composition of a list of functions, each + // consuming the return value of the function that follows. + _.compose = function() { + var args = arguments; + var start = args.length - 1; + return function() { + var i = start; + var result = args[start].apply(this, arguments); + while (i--) result = args[i].call(this, result); + return result; + }; + }; + + // Returns a function that will only be executed after being called N times. + _.after = function(times, func) { + return function() { + if (--times < 1) { + return func.apply(this, arguments); + } + }; + }; + + // Returns a function that will only be executed before being called N times. + _.before = function(times, func) { + var memo; + return function() { + if (--times > 0) { + memo = func.apply(this, arguments); + } else { + func = null; + } + return memo; + }; + }; + + // Returns a function that will be executed at most one time, no matter how + // often you call it. Useful for lazy initialization. + _.once = _.partial(_.before, 2); + + // Object Functions + // ---------------- + + // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed. + var hasEnumBug = !({toString: null}).propertyIsEnumerable('toString'); + var nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString', + 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; + + // Retrieve the names of an object's properties. + // Delegates to **ECMAScript 5**'s native `Object.keys` + _.keys = function(obj) { + if (!_.isObject(obj)) return []; + if (nativeKeys) return nativeKeys(obj); + var keys = []; + for (var key in obj) if (_.has(obj, key)) keys.push(key); + + // Ahem, IE < 9. + if (hasEnumBug) { + var nonEnumIdx = nonEnumerableProps.length; + while (nonEnumIdx--) { + var prop = nonEnumerableProps[nonEnumIdx]; + if (_.has(obj, prop) && !_.contains(keys, prop)) keys.push(prop); + } + } + return keys; + }; + + // Retrieve the values of an object's properties. + _.values = function(obj) { + var keys = _.keys(obj); + var length = keys.length; + var values = Array(length); + for (var i = 0; i < length; i++) { + values[i] = obj[keys[i]]; + } + return values; + }; + + // Convert an object into a list of `[key, value]` pairs. + _.pairs = function(obj) { + var keys = _.keys(obj); + var length = keys.length; + var pairs = Array(length); + for (var i = 0; i < length; i++) { + pairs[i] = [keys[i], obj[keys[i]]]; + } + return pairs; + }; + + // Invert the keys and values of an object. The values must be serializable. + _.invert = function(obj) { + var result = {}; + var keys = _.keys(obj); + for (var i = 0, length = keys.length; i < length; i++) { + result[obj[keys[i]]] = keys[i]; + } + return result; + }; + + // Return a sorted list of the function names available on the object. + // Aliased as `methods` + _.functions = _.methods = function(obj) { + var names = []; + for (var key in obj) { + if (_.isFunction(obj[key])) names.push(key); + } + return names.sort(); + }; + + // Extend a given object with all the properties in passed-in object(s). + _.extend = function(obj) { + if (!_.isObject(obj)) return obj; + var source, prop; + for (var i = 1, length = arguments.length; i < length; i++) { + source = arguments[i]; + for (prop in source) { + obj[prop] = source[prop]; + } + } + return obj; + }; + + // Return a copy of the object only containing the whitelisted properties. + _.pick = function(obj, iteratee, context) { + var result = {}, key; + if (obj == null) return result; + if (_.isFunction(iteratee)) { + iteratee = optimizeCb(iteratee, context); + for (key in obj) { + var value = obj[key]; + if (iteratee(value, key, obj)) result[key] = value; + } + } else { + var keys = flatten(arguments, false, false, 1); + obj = new Object(obj); + for (var i = 0, length = keys.length; i < length; i++) { + key = keys[i]; + if (key in obj) result[key] = obj[key]; + } + } + return result; + }; + + // Return a copy of the object without the blacklisted properties. + _.omit = function(obj, iteratee, context) { + if (_.isFunction(iteratee)) { + iteratee = _.negate(iteratee); + } else { + var keys = _.map(flatten(arguments, false, false, 1), String); + iteratee = function(value, key) { + return !_.contains(keys, key); + }; + } + return _.pick(obj, iteratee, context); + }; + + // Fill in a given object with default properties. + _.defaults = function(obj) { + if (!_.isObject(obj)) return obj; + for (var i = 1, length = arguments.length; i < length; i++) { + var source = arguments[i]; + for (var prop in source) { + if (obj[prop] === void 0) obj[prop] = source[prop]; + } + } + return obj; + }; + + // Create a (shallow-cloned) duplicate of an object. + _.clone = function(obj) { + if (!_.isObject(obj)) return obj; + return _.isArray(obj) ? obj.slice() : _.extend({}, obj); + }; + + // Invokes interceptor with the obj, and then returns obj. + // The primary purpose of this method is to "tap into" a method chain, in + // order to perform operations on intermediate results within the chain. + _.tap = function(obj, interceptor) { + interceptor(obj); + return obj; + }; + + // Internal recursive comparison function for `isEqual`. + var eq = function(a, b, aStack, bStack) { + // Identical objects are equal. `0 === -0`, but they aren't identical. + // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). + if (a === b) return a !== 0 || 1 / a === 1 / b; + // A strict comparison is necessary because `null == undefined`. + if (a == null || b == null) return a === b; + // Unwrap any wrapped objects. + if (a instanceof _) a = a._wrapped; + if (b instanceof _) b = b._wrapped; + // Compare `[[Class]]` names. + var className = toString.call(a); + if (className !== toString.call(b)) return false; + switch (className) { + // Strings, numbers, regular expressions, dates, and booleans are compared by value. + case '[object RegExp]': + // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i') + case '[object String]': + // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is + // equivalent to `new String("5")`. + return '' + a === '' + b; + case '[object Number]': + // `NaN`s are equivalent, but non-reflexive. + // Object(NaN) is equivalent to NaN + if (+a !== +a) return +b !== +b; + // An `egal` comparison is performed for other numeric values. + return +a === 0 ? 1 / +a === 1 / b : +a === +b; + case '[object Date]': + case '[object Boolean]': + // Coerce dates and booleans to numeric primitive values. Dates are compared by their + // millisecond representations. Note that invalid dates with millisecond representations + // of `NaN` are not equivalent. + return +a === +b; + } + + var areArrays = className === '[object Array]'; + if (!areArrays) { + if (typeof a != 'object' || typeof b != 'object') return false; + + // Objects with different constructors are not equivalent, but `Object`s or `Array`s + // from different frames are. + var aCtor = a.constructor, bCtor = b.constructor; + if (aCtor !== bCtor && !(_.isFunction(aCtor) && aCtor instanceof aCtor && + _.isFunction(bCtor) && bCtor instanceof bCtor) + && ('constructor' in a && 'constructor' in b)) { + return false; + } + } + // Assume equality for cyclic structures. The algorithm for detecting cyclic + // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`. + var length = aStack.length; + while (length--) { + // Linear search. Performance is inversely proportional to the number of + // unique nested structures. + if (aStack[length] === a) return bStack[length] === b; + } + + // Add the first object to the stack of traversed objects. + aStack.push(a); + bStack.push(b); + var size, result; + // Recursively compare objects and arrays. + if (areArrays) { + // Compare array lengths to determine if a deep comparison is necessary. + size = a.length; + result = size === b.length; + if (result) { + // Deep compare the contents, ignoring non-numeric properties. + while (size--) { + if (!(result = eq(a[size], b[size], aStack, bStack))) break; + } + } + } else { + // Deep compare objects. + var keys = _.keys(a), key; + size = keys.length; + // Ensure that both objects contain the same number of properties before comparing deep equality. + result = _.keys(b).length === size; + if (result) { + while (size--) { + // Deep compare each member + key = keys[size]; + if (!(result = _.has(b, key) && eq(a[key], b[key], aStack, bStack))) break; + } + } + } + // Remove the first object from the stack of traversed objects. + aStack.pop(); + bStack.pop(); + return result; + }; + + // Perform a deep comparison to check if two objects are equal. + _.isEqual = function(a, b) { + return eq(a, b, [], []); + }; + + // Is a given array, string, or object empty? + // An "empty" object has no enumerable own-properties. + _.isEmpty = function(obj) { + if (obj == null) return true; + if (_.isArray(obj) || _.isString(obj) || _.isArguments(obj)) return obj.length === 0; + for (var key in obj) if (_.has(obj, key)) return false; + return true; + }; + + // Is a given value a DOM element? + _.isElement = function(obj) { + return !!(obj && obj.nodeType === 1); + }; + + // Is a given value an array? + // Delegates to ECMA5's native Array.isArray + _.isArray = nativeIsArray || function(obj) { + return toString.call(obj) === '[object Array]'; + }; + + // Is a given variable an object? + _.isObject = function(obj) { + var type = typeof obj; + return type === 'function' || type === 'object' && !!obj; + }; + + // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError. + _.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Error'], function(name) { + _['is' + name] = function(obj) { + return toString.call(obj) === '[object ' + name + ']'; + }; + }); + + // Define a fallback version of the method in browsers (ahem, IE < 9), where + // there isn't any inspectable "Arguments" type. + if (!_.isArguments(arguments)) { + _.isArguments = function(obj) { + return _.has(obj, 'callee'); + }; + } + + // Optimize `isFunction` if appropriate. Work around an IE 11 bug. + if (typeof /./ !== 'function') { + _.isFunction = function(obj) { + return typeof obj == 'function' || false; + }; + } + + // Is a given object a finite number? + _.isFinite = function(obj) { + return isFinite(obj) && !isNaN(parseFloat(obj)); + }; + + // Is the given value `NaN`? (NaN is the only number which does not equal itself). + _.isNaN = function(obj) { + return _.isNumber(obj) && obj !== +obj; + }; + + // Is a given value a boolean? + _.isBoolean = function(obj) { + return obj === true || obj === false || toString.call(obj) === '[object Boolean]'; + }; + + // Is a given value equal to null? + _.isNull = function(obj) { + return obj === null; + }; + + // Is a given variable undefined? + _.isUndefined = function(obj) { + return obj === void 0; + }; + + // Shortcut function for checking if an object has a given property directly + // on itself (in other words, not on a prototype). + _.has = function(obj, key) { + return obj != null && hasOwnProperty.call(obj, key); + }; + + // Utility Functions + // ----------------- + + // Run Underscore.js in *noConflict* mode, returning the `_` variable to its + // previous owner. Returns a reference to the Underscore object. + _.noConflict = function() { + root._ = previousUnderscore; + return this; + }; + + // Keep the identity function around for default iteratees. + _.identity = function(value) { + return value; + }; + + // Predicate-generating functions. Often useful outside of Underscore. + _.constant = function(value) { + return function() { + return value; + }; + }; + + _.noop = function(){}; + + _.property = function(key) { + return function(obj) { + return obj == null ? void 0 : obj[key]; + }; + }; + + // Returns a predicate for checking whether an object has a given set of `key:value` pairs. + _.matches = function(attrs) { + var pairs = _.pairs(attrs), length = pairs.length; + return function(obj) { + if (obj == null) return !length; + obj = new Object(obj); + for (var i = 0; i < length; i++) { + var pair = pairs[i], key = pair[0]; + if (pair[1] !== obj[key] || !(key in obj)) return false; + } + return true; + }; + }; + + // Run a function **n** times. + _.times = function(n, iteratee, context) { + var accum = Array(Math.max(0, n)); + iteratee = optimizeCb(iteratee, context, 1); + for (var i = 0; i < n; i++) accum[i] = iteratee(i); + return accum; + }; + + // Return a random integer between min and max (inclusive). + _.random = function(min, max) { + if (max == null) { + max = min; + min = 0; + } + return min + Math.floor(Math.random() * (max - min + 1)); + }; + + // A (possibly faster) way to get the current timestamp as an integer. + _.now = Date.now || function() { + return new Date().getTime(); + }; + + // List of HTML entities for escaping. + var escapeMap = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + '`': '`' + }; + var unescapeMap = _.invert(escapeMap); + + // Functions for escaping and unescaping strings to/from HTML interpolation. + var createEscaper = function(map) { + var escaper = function(match) { + return map[match]; + }; + // Regexes for identifying a key that needs to be escaped + var source = '(?:' + _.keys(map).join('|') + ')'; + var testRegexp = RegExp(source); + var replaceRegexp = RegExp(source, 'g'); + return function(string) { + string = string == null ? '' : '' + string; + return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string; + }; + }; + _.escape = createEscaper(escapeMap); + _.unescape = createEscaper(unescapeMap); + + // If the value of the named `property` is a function then invoke it with the + // `object` as context; otherwise, return it. + _.result = function(object, property, fallback) { + var value = object == null ? void 0 : object[property]; + if (value === void 0) { + return fallback; + } + return _.isFunction(value) ? object[property]() : value; + }; + + // Generate a unique integer id (unique within the entire client session). + // Useful for temporary DOM ids. + var idCounter = 0; + _.uniqueId = function(prefix) { + var id = ++idCounter + ''; + return prefix ? prefix + id : id; + }; + + // By default, Underscore uses ERB-style template delimiters, change the + // following template settings to use alternative delimiters. + _.templateSettings = { + evaluate : /<%([\s\S]+?)%>/g, + interpolate : /<%=([\s\S]+?)%>/g, + escape : /<%-([\s\S]+?)%>/g + }; + + // When customizing `templateSettings`, if you don't want to define an + // interpolation, evaluation or escaping regex, we need one that is + // guaranteed not to match. + var noMatch = /(.)^/; + + // Certain characters need to be escaped so that they can be put into a + // string literal. + var escapes = { + "'": "'", + '\\': '\\', + '\r': 'r', + '\n': 'n', + '\u2028': 'u2028', + '\u2029': 'u2029' + }; + + var escaper = /\\|'|\r|\n|\u2028|\u2029/g; + + var escapeChar = function(match) { + return '\\' + escapes[match]; + }; + + // JavaScript micro-templating, similar to John Resig's implementation. + // Underscore templating handles arbitrary delimiters, preserves whitespace, + // and correctly escapes quotes within interpolated code. + // NB: `oldSettings` only exists for backwards compatibility. + _.template = function(text, settings, oldSettings) { + if (!settings && oldSettings) settings = oldSettings; + settings = _.defaults({}, settings, _.templateSettings); + + // Combine delimiters into one regular expression via alternation. + var matcher = RegExp([ + (settings.escape || noMatch).source, + (settings.interpolate || noMatch).source, + (settings.evaluate || noMatch).source + ].join('|') + '|$', 'g'); + + // Compile the template source, escaping string literals appropriately. + var index = 0; + var source = "__p+='"; + text.replace(matcher, function(match, escape, interpolate, evaluate, offset) { + source += text.slice(index, offset).replace(escaper, escapeChar); + index = offset + match.length; + + if (escape) { + source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; + } else if (interpolate) { + source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; + } else if (evaluate) { + source += "';\n" + evaluate + "\n__p+='"; + } + + // Adobe VMs need the match returned to produce the correct offest. + return match; + }); + source += "';\n"; + + // If a variable is not specified, place data values in local scope. + if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n'; + + source = "var __t,__p='',__j=Array.prototype.join," + + "print=function(){__p+=__j.call(arguments,'');};\n" + + source + 'return __p;\n'; + + try { + var render = new Function(settings.variable || 'obj', '_', source); + } catch (e) { + e.source = source; + throw e; + } + + var template = function(data) { + return render.call(this, data, _); + }; + + // Provide the compiled source as a convenience for precompilation. + var argument = settings.variable || 'obj'; + template.source = 'function(' + argument + '){\n' + source + '}'; + + return template; + }; + + // Add a "chain" function. Start chaining a wrapped Underscore object. + _.chain = function(obj) { + var instance = _(obj); + instance._chain = true; + return instance; + }; + + // OOP + // --------------- + // If Underscore is called as a function, it returns a wrapped object that + // can be used OO-style. This wrapper holds altered versions of all the + // underscore functions. Wrapped objects may be chained. + + // Helper function to continue chaining intermediate results. + var result = function(instance, obj) { + return instance._chain ? _(obj).chain() : obj; + }; + + // Add your own custom functions to the Underscore object. + _.mixin = function(obj) { + _.each(_.functions(obj), function(name) { + var func = _[name] = obj[name]; + _.prototype[name] = function() { + var args = [this._wrapped]; + push.apply(args, arguments); + return result(this, func.apply(_, args)); + }; + }); + }; + + // Add all of the Underscore functions to the wrapper object. + _.mixin(_); + + // Add all mutator Array functions to the wrapper. + _.each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) { + var method = ArrayProto[name]; + _.prototype[name] = function() { + var obj = this._wrapped; + method.apply(obj, arguments); + if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0]; + return result(this, obj); + }; + }); + + // Add all accessor Array functions to the wrapper. + _.each(['concat', 'join', 'slice'], function(name) { + var method = ArrayProto[name]; + _.prototype[name] = function() { + return result(this, method.apply(this._wrapped, arguments)); + }; + }); + + // Extracts the result from a wrapped and chained object. + _.prototype.value = function() { + return this._wrapped; + }; + + // AMD registration happens at the end for compatibility with AMD loaders + // that may not enforce next-turn semantics on modules. Even though general + // practice for AMD registration is to be anonymous, underscore registers + // as a named module because, like jQuery, it is a base library that is + // popular enough to be bundled in a third party lib, but not be part of + // an AMD load request. Those cases could generate an error when an + // anonymous define() is called outside of a loader request. + if (typeof define === 'function' && define.amd) { + define('underscore', [], function() { + return _; + }); + } +}.call(this)); diff --git a/node_modules/js-beautify/tools/build.sh b/node_modules/js-beautify/tools/build.sh new file mode 100755 index 0000000..523eabe --- /dev/null +++ b/node_modules/js-beautify/tools/build.sh @@ -0,0 +1,140 @@ +#!/usr/bin/env bash + +REL_SCRIPT_DIR="`dirname \"$0\"`" +SCRIPT_DIR="`( cd \"$REL_SCRIPT_DIR\" && pwd )`" +PROJECT_DIR="`( cd \"$SCRIPT_DIR/..\" && pwd )`" + +build_help() +{ + echo "build.sh " + echo " full - build and test of all implementations" + echo " all - build of both implementations" + echo " js - build of javascript" + echo " py - build of python" + echo " alltest - test both implementations, js and python" + echo " pytest - test python implementation" + echo " jstest - test javascript implementation" +} + +build_ci() +{ + build_full + build_git_status +} + +build_full() +{ + build_all + build_alltest +} + +build_all() +{ + build_py + build_js +} + +build_py() +{ + echo Building python module... + pip install -e ./python || exit 1 +} + +build_js() +{ + echo Building javascript... + npm install || exit 1 + generate_tests + # jshint + $PROJECT_DIR/node_modules/.bin/jshint 'js' 'test' || exit 1 + + # beautify test and data + $PROJECT_DIR/js/bin/js-beautify.js --config $PROJECT_DIR/jsbeautifyrc -r $PROJECT_DIR/js/test/amd-beautify-tests.js || exit 1 + $PROJECT_DIR/js/bin/js-beautify.js --config $PROJECT_DIR/jsbeautifyrc -r $PROJECT_DIR/js/test/node-beautify-html-perf-tests.js || exit 1 + $PROJECT_DIR/js/bin/js-beautify.js --config $PROJECT_DIR/jsbeautifyrc -r $PROJECT_DIR/js/test/node-beautify-perf-tests.js || exit 1 + $PROJECT_DIR/js/bin/js-beautify.js --config $PROJECT_DIR/jsbeautifyrc -r $PROJECT_DIR/js/test/node-beautify-tests.js || exit 1 + $PROJECT_DIR/js/bin/js-beautify.js --config $PROJECT_DIR/jsbeautifyrc -r $PROJECT_DIR/js/test/sanitytest.js || exit 1 + $PROJECT_DIR/js/bin/js-beautify.js --config $PROJECT_DIR/jsbeautifyrc -r $PROJECT_DIR/test/data/css/tests.js || exit 1 + $PROJECT_DIR/js/bin/js-beautify.js --config $PROJECT_DIR/jsbeautifyrc -r $PROJECT_DIR/test/data/html/tests.js || exit 1 + $PROJECT_DIR/js/bin/js-beautify.js --config $PROJECT_DIR/jsbeautifyrc -r $PROJECT_DIR/test/data/javascript/inputlib.js || exit 1 + $PROJECT_DIR/js/bin/js-beautify.js --config $PROJECT_DIR/jsbeautifyrc -r $PROJECT_DIR/test/data/javascript/tests.js || exit 1 + $PROJECT_DIR/js/bin/js-beautify.js --config $PROJECT_DIR/jsbeautifyrc -r $PROJECT_DIR/test/generate-tests.js || exit 1 + + # beautify product code + $PROJECT_DIR/js/bin/js-beautify.js --config $PROJECT_DIR/jsbeautifyrc -r $PROJECT_DIR/js/lib/unpackers/javascriptobfuscator_unpacker.js || exit 1 + $PROJECT_DIR/js/bin/js-beautify.js --config $PROJECT_DIR/jsbeautifyrc -r $PROJECT_DIR/js/lib/unpackers/myobfuscate_unpacker.js || exit 1 + $PROJECT_DIR/js/bin/js-beautify.js --config $PROJECT_DIR/jsbeautifyrc -r $PROJECT_DIR/js/lib/unpackers/p_a_c_k_e_r_unpacker.js || exit 1 + $PROJECT_DIR/js/bin/js-beautify.js --config $PROJECT_DIR/jsbeautifyrc -r $PROJECT_DIR/js/lib/unpackers/urlencode_unpacker.js || exit 1 + $PROJECT_DIR/js/bin/js-beautify.js --config $PROJECT_DIR/jsbeautifyrc -r $PROJECT_DIR/js/lib/beautify-css.js || exit 1 + $PROJECT_DIR/js/bin/js-beautify.js --config $PROJECT_DIR/jsbeautifyrc -r $PROJECT_DIR/js/lib/beautify-html.js || exit 1 + $PROJECT_DIR/js/bin/js-beautify.js --config $PROJECT_DIR/jsbeautifyrc -r $PROJECT_DIR/js/lib/beautify.js || exit 1 + $PROJECT_DIR/js/bin/js-beautify.js --config $PROJECT_DIR/jsbeautifyrc -r $PROJECT_DIR/js/lib/cli.js || exit 1 + $PROJECT_DIR/js/bin/js-beautify.js --config $PROJECT_DIR/jsbeautifyrc -r $PROJECT_DIR/js/index.js || exit 1 + + + # html not ready yet + # $PROJECT_DIR/js/bin/html-beautify.js --config $PROJECT_DIR/jsbeautifyrc -r index.html + + # jshint again to make sure things haven't changed + $PROJECT_DIR/node_modules/.bin/jshint 'js' 'test' || exit 1 +} + +generate_tests() +{ + node test/generate-tests.js || exit 1 +} + +build_alltest() +{ + build_jstest + build_pytest +} + +build_pytest() +{ + echo Testing python implementation... + generate_tests + cd python + python --version + ./jsbeautifier/tests/shell-smoke-test.sh || exit 1 +} + +build_jstest() +{ + echo Testing javascript implementation... + generate_tests + node --version + ./js/test/shell-smoke-test.sh || exit 1 +} + +build_git_status() +{ + $SCRIPT_DIR/git-status-clear.sh || exit 1 +} + +build_update-codemirror() +{ + rm -rf node_modules/codemirror + npm install codemirror + rm -rf ./web/third-party/codemirror/* + cp ./node_modules/codemirror/LICENSE ./web/third-party/codemirror/ + cp ./node_modules/codemirror/README.md ./web/third-party/codemirror/ + cp -r ./node_modules/codemirror/lib ./web/third-party/codemirror/ + mkdir -p ./web/third-party/codemirror/mode + cp -r ./node_modules/codemirror/mode/javascript ./web/third-party/codemirror/mode/ + git add -Av ./web/third-party/codemirror +} + +main() { + cd $PROJECT_DIR + local ACTION + ACTION=build_${1:-full} + if [ -n "$(type -t $ACTION)" ] && [ "$(type -t $ACTION)" = "function" ]; then + $ACTION + else + build_help + fi + +} + +(main $*) diff --git a/node_modules/js-beautify/tools/generate-changelog.sh b/node_modules/js-beautify/tools/generate-changelog.sh new file mode 100755 index 0000000..bf1ca19 --- /dev/null +++ b/node_modules/js-beautify/tools/generate-changelog.sh @@ -0,0 +1,40 @@ +#!/usr/bin/env bash + +REL_SCRIPT_DIR="`dirname \"$0\"`" +SCRIPT_DIR="`( cd \"$REL_SCRIPT_DIR\" && pwd )`" + +# based on https://gist.github.com/joelittlejohn/5937573 +# + +main() +{ + cd $SCRIPT_DIR/.. + + if [ "$#" -ne 1 ]; then + echo "Usage: ./generate-changelog.sh user/repo" + exit 1 + fi + + IFS=$'\n' + echo "# Changelog" > CHANGELOG.md + + for m in $(curl -s "https://api.github.com/repos/$1/milestones?state=closed" | jq -c '.[] | [.title, .number, .description]' | gsort -r -V); do + mid=$(echo $m | sed 's/\[".*",\(.*\),".*"\]/\1/') + title=$(echo $m | sed 's/\["\(.*\)",.*,".*"\]/\1/') + + echo "Processing milestone: $title..." + echo $m | sed 's/\["\(.*\)",.*\]/## \1/' >> CHANGELOG.md + echo "" >> CHANGELOG.md + echo '### Description' >> CHANGELOG.md + echo $m | sed 's/\[".*",.*,"\(.*\)"\]/\1/' | sed -e 's/\\"/"/g' | sed -e 's/\\r\\n/\\n/g' | sed -e 's/\\n/\'$'\n/g' >> CHANGELOG.md + echo "" >> CHANGELOG.md + echo '### Closed Issues' >> CHANGELOG.md + for i in $(curl -s "https://api.github.com/repos/$1/issues?milestone=$mid&state=closed" | jq -c '.[] | [.html_url, .number, .title]'); do + echo $i | sed 's/\["\(.*\)",\(.*\),\"\(.*\)\"\]/* \3 ([#\2](\1))/' | sed 's/\\"/"/g' >> CHANGELOG.md + done + echo "" >> CHANGELOG.md + echo "" >> CHANGELOG.md + done +} + +(main $*) diff --git a/node_modules/js-beautify/tools/git-status-clear.sh b/node_modules/js-beautify/tools/git-status-clear.sh new file mode 100755 index 0000000..e231a95 --- /dev/null +++ b/node_modules/js-beautify/tools/git-status-clear.sh @@ -0,0 +1,18 @@ +echo "Post-build git status check..." +echo "Ensuring no changes visible to git have been made to '$*' ..." + +git status $* | egrep -q 'nothing to commit.*working (directory|tree) clean' || { + # we should find nothing to commit. If we don't, build has failed. + echo "ERROR: Post-build git status check - FAILED." + echo "Git status reported changes to non-git-ignore'd files." + echo "TO REPRO: Run 'git status $*'. The use git gui or git diff to see what was changed during the build." + echo "TO FIX: Amend your commit and rebuild. Repeat until git status reports no changes both before and after the build." + echo "OUTPUT FOR 'git status $*':" + git status $* + echo "." + echo "OUTPUT FOR 'git diff $*':" + git diff $* | cat -t -e + exit 1 +} +echo "Post-build git status check - Succeeded." +exit 0 diff --git a/node_modules/js-beautify/tools/release-all.sh b/node_modules/js-beautify/tools/release-all.sh new file mode 100755 index 0000000..dd255cc --- /dev/null +++ b/node_modules/js-beautify/tools/release-all.sh @@ -0,0 +1,86 @@ +#!/usr/bin/env bash + +REL_SCRIPT_DIR="`dirname \"$0\"`" +SCRIPT_DIR="`( cd \"$REL_SCRIPT_DIR\" && pwd )`" + +case "$OSTYPE" in + darwin*) PLATFORM="OSX" ;; + linux*) PLATFORM="LINUX" ;; + bsd*) PLATFORM="BSD" ;; + *) PLATFORM="UNKNOWN" ;; +esac + +generate_changelog() +{ + $SCRIPT_DIR/generate-changelog.sh beautify-web/js-beautify || exit 1 + git commit -am "Update Changelog for $NEW_VERSION" +} + +release_python() +{ + git clean -xfd || exit 1 + echo "__version__ = '$NEW_VERSION'" > python/jsbeautifier/__version__.py + git commit -am "Python $NEW_VERSION" + cd python + python setup.py register -r pypi + python setup.py sdist upload -r pypi + git push +} + +release_node() +{ + git clean -xfd || exit 1 + npm version $NEW_VERSION + npm publish . + git push + git push --tags +} + +release_web() +{ + local ORIGINAL_BRANCH + ORIGINAL_BRANCH=$(git branch | grep '[*] .*' | awk '{print $2}') + git clean -xfd || exit 1 + git fetch || exit 1 + git checkout -B gh-pages origin/gh-pages || exit 1 + git merge origin/master && git push || exit 1 + git checkout $ORIGINAL_BRANCH +} + +sedi() { + if [[ "$PLATFORM" == "OSX" || "$PLATFORM" == "BSD" ]]; then + sed -i "" $@ + elif [ "$PLATFORM" == "LINUX" ]; then + sed -i $@ + else + exit 1 + fi +} + +update_readme_versions() +{ + git clean -xfd || exit 1 + sedi -E 's@(cdn.rawgit.+beautify/v)[^/]+@\1'$NEW_VERSION'@' README.md + sedi -E 's@(cdnjs.cloudflare.+beautify/)[^/]+@\1'$NEW_VERSION'@' README.md + sedi -E 's/\((README\.md:.js-beautify@).+\)/(\1'$NEW_VERSION')/' README.md + git add README.md + git commit -m "Bump version numbers in README.md" +} + +main() +{ + cd $SCRIPT_DIR/.. + + local NEW_VERSION=$1 + NEW_VERSION=$1 + + git checkout master + + generate_changelog + update_readme_versions + (release_python) + release_node + release_web +} + +(main $*) diff --git a/node_modules/jsonfile/.npmignore b/node_modules/jsonfile/.npmignore new file mode 100644 index 0000000..cefaa67 --- /dev/null +++ b/node_modules/jsonfile/.npmignore @@ -0,0 +1,2 @@ +test/ +.travis.yml \ No newline at end of file diff --git a/node_modules/jsonfile/CHANGELOG.md b/node_modules/jsonfile/CHANGELOG.md new file mode 100644 index 0000000..66fcbb4 --- /dev/null +++ b/node_modules/jsonfile/CHANGELOG.md @@ -0,0 +1,126 @@ +2.4.0 / 2016-09-15 +------------------ +### Changed +- added optional support for `graceful-fs` [#62] + +2.3.1 / 2016-05-13 +------------------ +- fix to support BOM. [#45][#45] + +2.3.0 / 2016-04-16 +------------------ +- add `throws` to `readFile()`. See [#39][#39] +- add support for any arbitrary `fs` module. Useful with [mock-fs](https://www.npmjs.com/package/mock-fs) + +2.2.3 / 2015-10-14 +------------------ +- include file name in parse error. See: https://github.com/jprichardson/node-jsonfile/pull/34 + +2.2.2 / 2015-09-16 +------------------ +- split out tests into separate files +- fixed `throws` when set to `true` in `readFileSync()`. See: https://github.com/jprichardson/node-jsonfile/pull/33 + +2.2.1 / 2015-06-25 +------------------ +- fixed regression when passing in string as encoding for options in `writeFile()` and `writeFileSync()`. See: https://github.com/jprichardson/node-jsonfile/issues/28 + +2.2.0 / 2015-06-25 +------------------ +- added `options.spaces` to `writeFile()` and `writeFileSync()` + +2.1.2 / 2015-06-22 +------------------ +- fixed if passed `readFileSync(file, 'utf8')`. See: https://github.com/jprichardson/node-jsonfile/issues/25 + +2.1.1 / 2015-06-19 +------------------ +- fixed regressions if `null` is passed for options. See: https://github.com/jprichardson/node-jsonfile/issues/24 + +2.1.0 / 2015-06-19 +------------------ +- cleanup: JavaScript Standard Style, rename files, dropped terst for assert +- methods now support JSON revivers/replacers + +2.0.1 / 2015-05-24 +------------------ +- update license attribute https://github.com/jprichardson/node-jsonfile/pull/21 + +2.0.0 / 2014-07-28 +------------------ +* added `\n` to end of file on write. [#14](https://github.com/jprichardson/node-jsonfile/pull/14) +* added `options.throws` to `readFileSync()` +* dropped support for Node v0.8 + +1.2.0 / 2014-06-29 +------------------ +* removed semicolons +* bugfix: passed `options` to `fs.readFile` and `fs.readFileSync`. This technically changes behavior, but +changes it according to docs. [#12][#12] + +1.1.1 / 2013-11-11 +------------------ +* fixed catching of callback bug (ffissore / #5) + +1.1.0 / 2013-10-11 +------------------ +* added `options` param to methods, (seanodell / #4) + +1.0.1 / 2013-09-05 +------------------ +* removed `homepage` field from package.json to remove NPM warning + +1.0.0 / 2013-06-28 +------------------ +* added `.npmignore`, #1 +* changed spacing default from `4` to `2` to follow Node conventions + +0.0.1 / 2012-09-10 +------------------ +* Initial release. + +[#45]: https://github.com/jprichardson/node-jsonfile/issues/45 "Reading of UTF8-encoded (w/ BOM) files fails" +[#44]: https://github.com/jprichardson/node-jsonfile/issues/44 "Extra characters in written file" +[#43]: https://github.com/jprichardson/node-jsonfile/issues/43 "Prettyfy json when written to file" +[#42]: https://github.com/jprichardson/node-jsonfile/pull/42 "Moved fs.readFileSync within the try/catch" +[#41]: https://github.com/jprichardson/node-jsonfile/issues/41 "Linux: Hidden file not working" +[#40]: https://github.com/jprichardson/node-jsonfile/issues/40 "autocreate folder doesnt work from Path-value" +[#39]: https://github.com/jprichardson/node-jsonfile/pull/39 "Add `throws` option for readFile (async)" +[#38]: https://github.com/jprichardson/node-jsonfile/pull/38 "Update README.md writeFile[Sync] signature" +[#37]: https://github.com/jprichardson/node-jsonfile/pull/37 "support append file" +[#36]: https://github.com/jprichardson/node-jsonfile/pull/36 "Add typescript definition file." +[#35]: https://github.com/jprichardson/node-jsonfile/pull/35 "Add typescript definition file." +[#34]: https://github.com/jprichardson/node-jsonfile/pull/34 "readFile JSON parse error includes filename" +[#33]: https://github.com/jprichardson/node-jsonfile/pull/33 "fix throw->throws typo in readFileSync()" +[#32]: https://github.com/jprichardson/node-jsonfile/issues/32 "readFile & readFileSync can possible have strip-comments as an option?" +[#31]: https://github.com/jprichardson/node-jsonfile/pull/31 "[Modify] Support string include is unicode escape string" +[#30]: https://github.com/jprichardson/node-jsonfile/issues/30 "How to use Jsonfile package in Meteor.js App?" +[#29]: https://github.com/jprichardson/node-jsonfile/issues/29 "writefile callback if no error?" +[#28]: https://github.com/jprichardson/node-jsonfile/issues/28 "writeFile options argument broken " +[#27]: https://github.com/jprichardson/node-jsonfile/pull/27 "Use svg instead of png to get better image quality" +[#26]: https://github.com/jprichardson/node-jsonfile/issues/26 "Breaking change to fs-extra" +[#25]: https://github.com/jprichardson/node-jsonfile/issues/25 "support string encoding param for read methods" +[#24]: https://github.com/jprichardson/node-jsonfile/issues/24 "readFile: Passing in null options with a callback throws an error" +[#23]: https://github.com/jprichardson/node-jsonfile/pull/23 "Add appendFile and appendFileSync" +[#22]: https://github.com/jprichardson/node-jsonfile/issues/22 "Default value for spaces in readme.md is outdated" +[#21]: https://github.com/jprichardson/node-jsonfile/pull/21 "Update license attribute" +[#20]: https://github.com/jprichardson/node-jsonfile/issues/20 "Add simple caching functionallity" +[#19]: https://github.com/jprichardson/node-jsonfile/pull/19 "Add appendFileSync method" +[#18]: https://github.com/jprichardson/node-jsonfile/issues/18 "Add updateFile and updateFileSync methods" +[#17]: https://github.com/jprichardson/node-jsonfile/issues/17 "seem read & write sync has sequentially problem" +[#16]: https://github.com/jprichardson/node-jsonfile/pull/16 "export spaces defaulted to null" +[#15]: https://github.com/jprichardson/node-jsonfile/issues/15 "`jsonfile.spaces` should default to `null`" +[#14]: https://github.com/jprichardson/node-jsonfile/pull/14 "Add EOL at EOF" +[#13]: https://github.com/jprichardson/node-jsonfile/issues/13 "Add a final newline" +[#12]: https://github.com/jprichardson/node-jsonfile/issues/12 "readFile doesn't accept options" +[#11]: https://github.com/jprichardson/node-jsonfile/pull/11 "Added try,catch to readFileSync" +[#10]: https://github.com/jprichardson/node-jsonfile/issues/10 "No output or error from writeFile" +[#9]: https://github.com/jprichardson/node-jsonfile/pull/9 "Change 'js' to 'jf' in example." +[#8]: https://github.com/jprichardson/node-jsonfile/pull/8 "Updated forgotten module.exports to me." +[#7]: https://github.com/jprichardson/node-jsonfile/pull/7 "Add file name in error message" +[#6]: https://github.com/jprichardson/node-jsonfile/pull/6 "Use graceful-fs when possible" +[#5]: https://github.com/jprichardson/node-jsonfile/pull/5 "Jsonfile doesn't behave nicely when used inside a test suite." +[#4]: https://github.com/jprichardson/node-jsonfile/pull/4 "Added options parameter to writeFile and writeFileSync" +[#3]: https://github.com/jprichardson/node-jsonfile/issues/3 "test2" +[#2]: https://github.com/jprichardson/node-jsonfile/issues/2 "homepage field must be a string url. Deleted." +[#1]: https://github.com/jprichardson/node-jsonfile/pull/1 "adding an `.npmignore` file" diff --git a/node_modules/jsonfile/LICENSE b/node_modules/jsonfile/LICENSE new file mode 100644 index 0000000..cb7e807 --- /dev/null +++ b/node_modules/jsonfile/LICENSE @@ -0,0 +1,15 @@ +(The MIT License) + +Copyright (c) 2012-2015, JP Richardson + +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. diff --git a/node_modules/jsonfile/README.md b/node_modules/jsonfile/README.md new file mode 100644 index 0000000..54bca05 --- /dev/null +++ b/node_modules/jsonfile/README.md @@ -0,0 +1,162 @@ +Node.js - jsonfile +================ + +Easily read/write JSON files. + +[![npm Package](https://img.shields.io/npm/v/jsonfile.svg?style=flat-square)](https://www.npmjs.org/package/jsonfile) +[![build status](https://secure.travis-ci.org/jprichardson/node-jsonfile.svg)](http://travis-ci.org/jprichardson/node-jsonfile) +[![windows Build status](https://img.shields.io/appveyor/ci/jprichardson/node-jsonfile/master.svg?label=windows%20build)](https://ci.appveyor.com/project/jprichardson/node-jsonfile/branch/master) + +Standard JavaScript + +Why? +---- + +Writing `JSON.stringify()` and then `fs.writeFile()` and `JSON.parse()` with `fs.readFile()` enclosed in `try/catch` blocks became annoying. + + + +Installation +------------ + + npm install --save jsonfile + + + +API +--- + +### readFile(filename, [options], callback) + +`options` (`object`, default `undefined`): Pass in any `fs.readFile` options or set `reviver` for a [JSON reviver](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse). + - `throws` (`boolean`, default: `true`). If `JSON.parse` throws an error, pass this error to the callback. + If `false`, returns `null` for the object. + + +```js +var jsonfile = require('jsonfile') +var file = '/tmp/data.json' +jsonfile.readFile(file, function(err, obj) { + console.dir(obj) +}) +``` + + +### readFileSync(filename, [options]) + +`options` (`object`, default `undefined`): Pass in any `fs.readFileSync` options or set `reviver` for a [JSON reviver](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse). +- `throws` (`boolean`, default: `true`). If `JSON.parse` throws an error, throw the error. +If `false`, returns `null` for the object. + +```js +var jsonfile = require('jsonfile') +var file = '/tmp/data.json' + +console.dir(jsonfile.readFileSync(file)) +``` + + +### writeFile(filename, obj, [options], callback) + +`options`: Pass in any `fs.writeFile` options or set `replacer` for a [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify). Can also pass in `spaces`. + + +```js +var jsonfile = require('jsonfile') + +var file = '/tmp/data.json' +var obj = {name: 'JP'} + +jsonfile.writeFile(file, obj, function (err) { + console.error(err) +}) +``` + +**formatting with spaces:** + +```js +var jsonfile = require('jsonfile') + +var file = '/tmp/data.json' +var obj = {name: 'JP'} + +jsonfile.writeFile(file, obj, {spaces: 2}, function(err) { + console.error(err) +}) +``` + + +### writeFileSync(filename, obj, [options]) + +`options`: Pass in any `fs.writeFileSync` options or set `replacer` for a [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify). Can also pass in `spaces`. + +```js +var jsonfile = require('jsonfile') + +var file = '/tmp/data.json' +var obj = {name: 'JP'} + +jsonfile.writeFileSync(file, obj) +``` + +**formatting with spaces:** + +```js +var jsonfile = require('jsonfile') + +var file = '/tmp/data.json' +var obj = {name: 'JP'} + +jsonfile.writeFileSync(file, obj, {spaces: 2}) +``` + + + +### spaces + +Global configuration to set spaces to indent JSON files. + +**default:** `null` + +```js +var jsonfile = require('jsonfile') + +jsonfile.spaces = 4 + +var file = '/tmp/data.json' +var obj = {name: 'JP'} + +// json file has four space indenting now +jsonfile.writeFile(file, obj, function (err) { + console.error(err) +}) +``` + +Note, it's bound to `this.spaces`. So, if you do this: + +```js +var myObj = {} +myObj.writeJsonSync = jsonfile.writeFileSync +// => this.spaces = null +``` + +Could do the following: + +```js +var jsonfile = require('jsonfile') +jsonfile.spaces = 4 +jsonfile.writeFileSync(file, obj) // will have 4 spaces indentation + +var myCrazyObj = {spaces: 32} +myCrazyObj.writeJsonSync = jsonfile.writeFileSync +myCrazyObj.writeJsonSync(file, obj) // will have 32 space indentation +myCrazyObj.writeJsonSync(file, obj, {spaces: 2}) // will have only 2 +``` + + +License +------- + +(MIT License) + +Copyright 2012-2016, JP Richardson diff --git a/node_modules/jsonfile/appveyor.yml b/node_modules/jsonfile/appveyor.yml new file mode 100644 index 0000000..872af18 --- /dev/null +++ b/node_modules/jsonfile/appveyor.yml @@ -0,0 +1,28 @@ +# Test against this version of Node.js +environment: + matrix: + # node.js + - nodejs_version: "0.10" + - nodejs_version: "0.12" + - nodejs_version: "4" + - nodejs_version: "5" + - nodejs_version: "6" + +# Install scripts. (runs after repo cloning) +install: + # Get the latest stable version of Node.js or io.js + - ps: Install-Product node $env:nodejs_version + # install modules + - npm config set loglevel warn + - npm install --silent + +# Post-install test scripts. +test_script: + # Output useful info for debugging. + - node --version + - npm --version + # run tests + - npm test + +# Don't actually build. +build: off diff --git a/node_modules/jsonfile/index.js b/node_modules/jsonfile/index.js new file mode 100644 index 0000000..7111e15 --- /dev/null +++ b/node_modules/jsonfile/index.js @@ -0,0 +1,133 @@ +var _fs +try { + _fs = require('graceful-fs') +} catch (_) { + _fs = require('fs') +} + +function readFile (file, options, callback) { + if (callback == null) { + callback = options + options = {} + } + + if (typeof options === 'string') { + options = {encoding: options} + } + + options = options || {} + var fs = options.fs || _fs + + var shouldThrow = true + // DO NOT USE 'passParsingErrors' THE NAME WILL CHANGE!!!, use 'throws' instead + if ('passParsingErrors' in options) { + shouldThrow = options.passParsingErrors + } else if ('throws' in options) { + shouldThrow = options.throws + } + + fs.readFile(file, options, function (err, data) { + if (err) return callback(err) + + data = stripBom(data) + + var obj + try { + obj = JSON.parse(data, options ? options.reviver : null) + } catch (err2) { + if (shouldThrow) { + err2.message = file + ': ' + err2.message + return callback(err2) + } else { + return callback(null, null) + } + } + + callback(null, obj) + }) +} + +function readFileSync (file, options) { + options = options || {} + if (typeof options === 'string') { + options = {encoding: options} + } + + var fs = options.fs || _fs + + var shouldThrow = true + // DO NOT USE 'passParsingErrors' THE NAME WILL CHANGE!!!, use 'throws' instead + if ('passParsingErrors' in options) { + shouldThrow = options.passParsingErrors + } else if ('throws' in options) { + shouldThrow = options.throws + } + + var content = fs.readFileSync(file, options) + content = stripBom(content) + + try { + return JSON.parse(content, options.reviver) + } catch (err) { + if (shouldThrow) { + err.message = file + ': ' + err.message + throw err + } else { + return null + } + } +} + +function writeFile (file, obj, options, callback) { + if (callback == null) { + callback = options + options = {} + } + options = options || {} + var fs = options.fs || _fs + + var spaces = typeof options === 'object' && options !== null + ? 'spaces' in options + ? options.spaces : this.spaces + : this.spaces + + var str = '' + try { + str = JSON.stringify(obj, options ? options.replacer : null, spaces) + '\n' + } catch (err) { + if (callback) return callback(err, null) + } + + fs.writeFile(file, str, options, callback) +} + +function writeFileSync (file, obj, options) { + options = options || {} + var fs = options.fs || _fs + + var spaces = typeof options === 'object' && options !== null + ? 'spaces' in options + ? options.spaces : this.spaces + : this.spaces + + var str = JSON.stringify(obj, options.replacer, spaces) + '\n' + // not sure if fs.writeFileSync returns anything, but just in case + return fs.writeFileSync(file, str, options) +} + +function stripBom (content) { + // we do this because JSON.parse would convert it to a utf8 string if encoding wasn't specified + if (Buffer.isBuffer(content)) content = content.toString('utf8') + content = content.replace(/^\uFEFF/, '') + return content +} + +var jsonfile = { + spaces: null, + readFile: readFile, + readFileSync: readFileSync, + writeFile: writeFile, + writeFileSync: writeFileSync +} + +module.exports = jsonfile diff --git a/node_modules/jsonfile/package.json b/node_modules/jsonfile/package.json new file mode 100644 index 0000000..e3b70ce --- /dev/null +++ b/node_modules/jsonfile/package.json @@ -0,0 +1,103 @@ +{ + "_args": [ + [ + { + "raw": "jsonfile@^2.1.0", + "scope": null, + "escapedName": "jsonfile", + "name": "jsonfile", + "rawSpec": "^2.1.0", + "spec": ">=2.1.0 <3.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/fs-extra" + ] + ], + "_from": "jsonfile@>=2.1.0 <3.0.0", + "_id": "jsonfile@2.4.0", + "_inCache": true, + "_location": "/jsonfile", + "_nodeVersion": "6.1.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/jsonfile-2.4.0.tgz_1473989978270_0.6271681792568415" + }, + "_npmUser": { + "name": "jprichardson", + "email": "jprichardson@gmail.com" + }, + "_npmVersion": "3.8.6", + "_phantomChildren": {}, + "_requested": { + "raw": "jsonfile@^2.1.0", + "scope": null, + "escapedName": "jsonfile", + "name": "jsonfile", + "rawSpec": "^2.1.0", + "spec": ">=2.1.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fs-extra" + ], + "_resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "_shasum": "3736a2b428b87bbda0cc83b53fa3d633a35c2ae8", + "_shrinkwrap": null, + "_spec": "jsonfile@^2.1.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/fs-extra", + "author": { + "name": "JP Richardson", + "email": "jprichardson@gmail.com" + }, + "bugs": { + "url": "https://github.com/jprichardson/node-jsonfile/issues" + }, + "dependencies": { + "graceful-fs": "^4.1.6" + }, + "description": "Easily read/write JSON files.", + "devDependencies": { + "mocha": "2.x", + "mock-fs": "^3.8.0", + "rimraf": "^2.4.0", + "standard": "^6.0.8" + }, + "directories": {}, + "dist": { + "shasum": "3736a2b428b87bbda0cc83b53fa3d633a35c2ae8", + "tarball": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz" + }, + "gitHead": "00b3983ac4aade79c64c7a8c2ced257078625c6d", + "homepage": "https://github.com/jprichardson/node-jsonfile#readme", + "keywords": [ + "read", + "write", + "file", + "json", + "fs", + "fs-extra" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "jprichardson", + "email": "jprichardson@gmail.com" + } + ], + "name": "jsonfile", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + }, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/jprichardson/node-jsonfile.git" + }, + "scripts": { + "lint": "standard", + "test": "npm run lint && npm run unit", + "unit": "mocha" + }, + "version": "2.4.0" +} diff --git a/node_modules/jstransformer/LICENSE b/node_modules/jstransformer/LICENSE new file mode 100644 index 0000000..27cc9f3 --- /dev/null +++ b/node_modules/jstransformer/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2014 Forbes Lindesay + +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. \ No newline at end of file diff --git a/node_modules/jstransformer/README.md b/node_modules/jstransformer/README.md new file mode 100644 index 0000000..f294e79 --- /dev/null +++ b/node_modules/jstransformer/README.md @@ -0,0 +1,103 @@ +

    +

    JSTransformer

    +

    Normalize the API of any jstransformer

    + +

    Build Status +Dependency Status +Coverage Status +NPM version

    + +## Installation + + npm install jstransformer + +## Usage + +```js +var transformer = require('jstransformer'); +var marked = transformer(require('jstransformer-marked')); + +var options = {}; +var res = marked.render('Some **markdown**', options); +// => {body: 'Some markdown', dependencies: []} +``` + +This gives the same API regardless of the jstransformer passed in. + +## API + +A transformer, once normalised using this module, will implement the following methods. Note that if the underlying transformer cannot be used to implement the functionality, it may ultimately just throw an error. + +### Returned object from `.render*` + +```js +{body: String, dependencies: Array.} +``` + + - `body` represents the result as a string + - `dependencies` is an array of files that were read in as part of the render process (or an empty array if there were no dependencies) + +### `.render` + +```js +transformer.render(str, options, locals); +=> {body: String, dependencies: Array.} +``` + +_requires the underlying transform to implement `.render` or `.compile`_ + +Transform a string and return an object. + +### `.renderAsync` + +```js +transformer.renderAsync(str[, options], locals, callback); +``` + +```js +transformer.renderAsync(str[, options], locals); +=> Promise({body: String, dependencies: Array.}) +``` + +_requires the underlying transform to implement `.renderAsync` or `.render`_ + +Transform a string asynchronously. If a callback is provided, it is called as `callback(err, data)`, otherwise a Promise is returned. + +### `.renderFile` + +```js +transformer.renderFile(filename, options, locals) +=> {body: String, dependencies: Array.} +``` + +_requires the underlying transform to implement `.renderFile`, `.render`, `.compileFile`, or `.compile`_ + +Transform a file and return an object. + +### `.renderFileAsync` + +```js +transformer.renderFileAsync(filename[, options], locals, callback); +``` + +```js +transformer.renderFileAsync(filename[, options], locals); +=> Promise({body: String, dependencies: Array.}) +``` + +_requires the underlying transform to implement `.renderFileAsync`, `.renderFile`, `.renderAsync`, `.render`, `.compileFileAsync`, `.compileFile`, `.compileAsync`, or `.compileFile`_ + +Transform a file asynchronously. If a callback is provided, it is called as `callback(err, data)`, otherwise a Promise is returned. + +### `.inputFormats` + +```js +var formats = transformer.inputFormats; +=> ['md', 'markdown'] +``` + +Returns an array of strings representing potential input formats for the transform. If not provided directly by the transform, results in an array containing the name of the transform. + +## License + +MIT diff --git a/node_modules/jstransformer/index.js b/node_modules/jstransformer/index.js new file mode 100644 index 0000000..ba00b9c --- /dev/null +++ b/node_modules/jstransformer/index.js @@ -0,0 +1,328 @@ +'use strict'; + +var fs = require('fs'); +var assert = require('assert'); +var Promise = require('promise'); +var isPromise = require('is-promise'); + +var tr = (module.exports = function (transformer) { + return new Transformer(transformer); +}); +tr.Transformer = Transformer; +tr.normalizeFn = normalizeFn; +tr.normalizeFnAsync = normalizeFnAsync; +tr.normalize = normalize; +tr.normalizeAsync = normalizeAsync; +tr.readFile = Promise.denodeify(fs.readFile); +tr.readFileSync = fs.readFileSync; + +function normalizeFn(result) { + if (typeof result === 'function') { + return {fn: result, dependencies: []}; + } else if (result && typeof result === 'object' && typeof result.fn === 'function') { + if ('dependencies' in result) { + if (!Array.isArray(result.dependencies)) { + throw new Error('Result should have a dependencies property that is an array'); + } + } else { + result.dependencies = []; + } + return result; + } else { + throw new Error('Invalid result object from transform.'); + } +} +function normalizeFnAsync(result, cb) { + return Promise.resolve(result).then(function (result) { + if (result && isPromise(result.fn)) { + return result.fn.then(function (fn) { + result.fn = fn; + return result; + }); + } + return result; + }).then(tr.normalizeFn).nodeify(cb); +} +function normalize(result) { + if (typeof result === 'string') { + return {body: result, dependencies: []}; + } else if (result && typeof result === 'object' && typeof result.body === 'string') { + if ('dependencies' in result) { + if (!Array.isArray(result.dependencies)) { + throw new Error('Result should have a dependencies property that is an array'); + } + } else { + result.dependencies = []; + } + return result; + } else { + throw new Error('Invalid result object from transform.'); + } +} +function normalizeAsync(result, cb) { + return Promise.resolve(result).then(function (result) { + if (result && isPromise(result.body)) { + return result.body.then(function (body) { + result.body = body; + return result; + }); + } + return result; + }).then(tr.normalize).nodeify(cb); +} + +function Transformer(tr) { + assert(tr, 'Transformer must be an object'); + assert(typeof tr.name === 'string', 'Transformer must have a name'); + assert(typeof tr.outputFormat === 'string', 'Transformer must have an output format'); + assert([ + 'compile', + 'compileAsync', + 'compileFile', + 'compileFileAsync', + 'compileClient', + 'compileClientAsync', + 'compileFileClient', + 'compileFileClientAsync', + 'render', + 'renderAsync', + 'renderFile', + 'renderFileAsync' + ].some(function (method) { + return typeof tr[method] === 'function'; + }), 'Transformer must implement at least one of the potential methods.'); + this._tr = tr; + this.name = this._tr.name; + this.outputFormat = this._tr.outputFormat; + this.inputFormats = this._tr.inputFormats || [this.name]; +} + +var fallbacks = { + compile: ['compile'], + compileAsync: ['compileAsync', 'compile'], + compileFile: ['compileFile', 'compile'], + compileFileAsync: ['compileFileAsync', 'compileFile', 'compileAsync', 'compile'], + compileClient: ['compileClient'], + compileClientAsync: ['compileClientAsync', 'compileClient'], + compileFileClient: ['compileFileClient', 'compileClient'], + compileFileClientAsync: [ + 'compileFileClientAsync', 'compileFileClient', 'compileClientAsync', 'compileClient' + ], + render: ['render', 'compile'], + renderAsync: ['renderAsync', 'render', 'compileAsync', 'compile'], + renderFile: ['renderFile', 'render', 'compileFile', 'compile'], + renderFileAsync: [ + 'renderFileAsync', 'renderFile', 'renderAsync', 'render', + 'compileFileAsync', 'compileFile', 'compileAsync', 'compile' + ] +}; + +Transformer.prototype._hasMethod = function (method) { + return typeof this._tr[method] === 'function'; +}; +Transformer.prototype.can = function (method) { + return fallbacks[method].some(function (method) { + return this._hasMethod(method); + }.bind(this)); +}; + +/* COMPILE */ + +Transformer.prototype.compile = function (str, options) { + if (!this.can('compile')) { + if (this.can('compileAsync')) { + throw new Error('The Transform "' + this.name + '" does not support synchronous compilation'); + } else if (this.can('compileFileAsync')) { + throw new Error('The Transform "' + this.name + '" does not support compiling plain strings'); + } else { + throw new Error('The Transform "' + this.name + '" does not support compilation'); + } + } + return tr.normalizeFn(this._tr.compile(str, options)); +}; +Transformer.prototype.compileAsync = function (str, options, cb) { + if (!this.can('compileAsync')) { + if (this.can('compileFileAsync')) { + return Promise.reject(new Error('The Transform "' + this.name + '" does not support compiling plain strings')).nodeify(cb); + } else { + return Promise.reject(new Error('The Transform "' + this.name + '" does not support compilation')).nodeify(cb); + } + } + if (this._hasMethod('compileAsync')) { + return tr.normalizeFnAsync(this._tr.compileAsync(str, options), cb); + } else { + return tr.normalizeFnAsync(this._tr.compile(str, options), cb); + } +}; +Transformer.prototype.compileFile = function (filename, options) { + if (!this.can('compileFile')) { + if (this.can('compileFileAsync')) { + throw new Error('The Transform "' + this.name + '" does not support synchronous compilation'); + } else { + throw new Error('The Transform "' + this.name + '" does not support compilation'); + } + } + if (this._hasMethod('compileFile')) { + return tr.normalizeFn(this._tr.compileFile(filename, options)); + } else { + return tr.normalizeFn(this._tr.compile(tr.readFileSync(filename, 'utf8'), options)); + } +}; +Transformer.prototype.compileFileAsync = function (filename, options, cb) { + if (!this.can('compileFileAsync')) { + return Promise.reject(new Error('The Transform "' + this.name + '" does not support compilation')); + } + if (this._hasMethod('compileFileAsync')) { + return tr.normalizeFnAsync(this._tr.compileFileAsync(filename, options), cb); + } else if (this._hasMethod('compileFile')) { + return tr.normalizeFnAsync(this._tr.compileFile(filename, options), cb); + } else { + return tr.normalizeFnAsync(tr.readFile(filename, 'utf8').then(function (str) { + if (this._hasMethod('compileAsync')) { + return this._tr.compileAsync(str, options); + } else { + return this._tr.compile(str, options); + } + }.bind(this)), cb); + } +}; + +/* COMPILE CLIENT */ + + +Transformer.prototype.compileClient = function (str, options) { + if (!this.can('compileClient')) { + if (this.can('compileClientAsync')) { + throw new Error('The Transform "' + this.name + '" does not support compiling for the client synchronously.'); + } else if (this.can('compileFileClientAsync')) { + throw new Error('The Transform "' + this.name + '" does not support compiling for the client from a string.'); + } else { + throw new Error('The Transform "' + this.name + '" does not support compiling for the client'); + } + } + return tr.normalize(this._tr.compileClient(str, options)); +}; +Transformer.prototype.compileClientAsync = function (str, options, cb) { + if (!this.can('compileClientAsync')) { + if (this.can('compileFileClientAsync')) { + return Promise.reject(new Error('The Transform "' + this.name + '" does not support compiling for the client from a string.')).nodeify(cb); + } else { + return Promise.reject(new Error('The Transform "' + this.name + '" does not support compiling for the client')).nodeify(cb); + } + } + if (this._hasMethod('compileClientAsync')) { + return tr.normalizeAsync(this._tr.compileClientAsync(str, options), cb); + } else { + return tr.normalizeAsync(this._tr.compileClient(str, options), cb); + } +}; +Transformer.prototype.compileFileClient = function (filename, options) { + if (!this.can('compileFileClient')) { + if (this.can('compileFileClientAsync')) { + throw new Error('The Transform "' + this.name + '" does not support compiling for the client synchronously.'); + } else { + throw new Error('The Transform "' + this.name + '" does not support compiling for the client'); + } + } + if (this._hasMethod('compileFileClient')) { + return tr.normalize(this._tr.compileFileClient(filename, options)); + } else { + return tr.normalize(this._tr.compileClient(tr.readFileSync(filename, 'utf8'), options)); + } +}; +Transformer.prototype.compileFileClientAsync = function (filename, options, cb) { + if (!this.can('compileFileClientAsync')) { + return Promise.reject(new Error('The Transform "' + this.name + '" does not support compiling for the client')).nodeify(cb) + } + if (this._hasMethod('compileFileClientAsync')) { + return tr.normalizeAsync(this._tr.compileFileClientAsync(filename, options), cb); + } else if (this._hasMethod('compileFileClient')) { + return tr.normalizeAsync(this._tr.compileFileClient(filename, options), cb); + } else { + return tr.normalizeAsync(tr.readFile(filename, 'utf8').then(function (str) { + if (this._hasMethod('compileClientAsync')) { + return this._tr.compileClientAsync(str, options); + } else { + return this._tr.compileClient(str, options); + } + }.bind(this)), cb); + } +}; + +/* RENDER */ + +Transformer.prototype.render = function (str, options, locals) { + if (!this.can('render')) { + if (this.can('renderAsync')) { + throw new Error('The Transform "' + this.name + '" does not support rendering synchronously.'); + } else if (this.can('renderFileAsync')) { + throw new Error('The Transform "' + this.name + '" does not support rendering from a string.'); + } else { + throw new Error('The Transform "' + this.name + '" does not support rendering'); + } + } + if (this._hasMethod('render')) { + return tr.normalize(this._tr.render(str, options, locals)); + } else { + var compiled = tr.normalizeFn(this._tr.compile(str, options)); + var body = compiled.fn(options || locals); + if (typeof body !== 'string') { + throw new Error('The Transform "' + this.name + '" does not support rendering synchronously.'); + } + return tr.normalize({body: body, dependencies: compiled.dependencies}); + } +}; +Transformer.prototype.renderAsync = function (str, options, locals, cb) { + if (typeof locals === 'function') { + cb = locals; + locals = options; + } + if (!this.can('renderAsync')) { + if (this.can('renderFileAsync')) { + return Promise.reject(new Error('The Transform "' + this.name + '" does not support rendering from a string.')).nodeify(cb); + } else { + return Promise.reject(new Error('The Transform "' + this.name + '" does not support rendering')).nodeify(cb); + } + } + if (this._hasMethod('renderAsync')) { + return tr.normalizeAsync(this._tr.renderAsync(str, options, locals), cb); + } else if (this._hasMethod('render')) { + return tr.normalizeAsync(this._tr.render(str, options, locals), cb); + } else { + return tr.normalizeAsync(this.compileAsync(str, options).then(function (compiled) { + return {body: compiled.fn(options || locals), dependencies: compiled.dependencies}; + }), cb); + } +}; +Transformer.prototype.renderFile = function (filename, options, locals) { + if (typeof this._tr.renderFile === 'function') { + return tr.normalize(this._tr.renderFile(filename, options, locals)); + } else if (typeof this._tr.render === 'function') { + return tr.normalize(this._tr.render(tr.readFileSync(filename, 'utf8'), options, locals)); + } else if (this._hasMethod('compile') || this._hasMethod('compileFile')) { + var compiled = this.compileFile(filename, options); + return tr.normalize({body: compiled.fn(options || locals), dependencies: compiled.dependencies}); + } else { + return Promise.reject(new Error('This transform does not support synchronous rendering')); + } +}; +Transformer.prototype.renderFileAsync = function (filename, options, locals, cb) { + if (typeof locals === 'function') { + cb = locals; + locals = options; + } + if (typeof this._tr.renderFileAsync === 'function') { + return tr.normalizeAsync(this._tr.renderFileAsync(filename, options, locals), cb); + } else if (typeof this._tr.renderFile === 'function') { + return tr.normalizeAsync(this._tr.renderFile(filename, options, locals), cb); + } else if (this._hasMethod('compile') || this._hasMethod('compileAsync') + || this._hasMethod('compileFile') || this._hasMethod('compileFileAsync')) { + return tr.normalizeAsync(this.compileFileAsync(filename, options).then(function (compiled) { + return {body: compiled.fn(options || locals), dependencies: compiled.dependencies}; + }), cb); + } else { + return tr.normalizeAsync(tr.readFile(filename, 'utf8').then(function (str) { + return this.renderAsync(str, options, locals); + }.bind(this)), cb); + } +}; diff --git a/node_modules/jstransformer/package.json b/node_modules/jstransformer/package.json new file mode 100644 index 0000000..c627c30 --- /dev/null +++ b/node_modules/jstransformer/package.json @@ -0,0 +1,94 @@ +{ + "_args": [ + [ + { + "raw": "jstransformer@0.0.2", + "scope": null, + "escapedName": "jstransformer", + "name": "jstransformer", + "rawSpec": "0.0.2", + "spec": "0.0.2", + "type": "version" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/jade" + ] + ], + "_from": "jstransformer@0.0.2", + "_id": "jstransformer@0.0.2", + "_inCache": true, + "_location": "/jstransformer", + "_nodeVersion": "1.6.2", + "_npmUser": { + "name": "forbeslindesay", + "email": "forbes@lindesay.co.uk" + }, + "_npmVersion": "2.7.1", + "_phantomChildren": {}, + "_requested": { + "raw": "jstransformer@0.0.2", + "scope": null, + "escapedName": "jstransformer", + "name": "jstransformer", + "rawSpec": "0.0.2", + "spec": "0.0.2", + "type": "version" + }, + "_requiredBy": [ + "/jade" + ], + "_resolved": "https://registry.npmjs.org/jstransformer/-/jstransformer-0.0.2.tgz", + "_shasum": "7aae29a903d196cfa0973d885d3e47947ecd76ab", + "_shrinkwrap": null, + "_spec": "jstransformer@0.0.2", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/jade", + "author": { + "name": "ForbesLindesay" + }, + "bugs": { + "url": "https://github.com/jstransformers/jstransformer/issues" + }, + "dependencies": { + "is-promise": "^2.0.0", + "promise": "^6.0.1" + }, + "description": "Normalize the API of any jstransformer", + "devDependencies": { + "coveralls": "^2.11.2", + "istanbul": "^0.3.5", + "testit": "^1.2.0" + }, + "directories": {}, + "dist": { + "shasum": "7aae29a903d196cfa0973d885d3e47947ecd76ab", + "tarball": "https://registry.npmjs.org/jstransformer/-/jstransformer-0.0.2.tgz" + }, + "files": [ + "index.js", + "LICENSE" + ], + "gitHead": "99b40c1aa9fa984585aa50f4618d97a0287495c1", + "homepage": "https://github.com/jstransformers/jstransformer", + "keywords": [ + "jstransformer" + ], + "license": "MIT", + "maintainers": [ + { + "name": "forbeslindesay", + "email": "forbes@lindesay.co.uk" + } + ], + "name": "jstransformer", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jstransformers/jstransformer.git" + }, + "scripts": { + "coverage": "istanbul cover test", + "coveralls": "npm run coverage && cat ./coverage/lcov.info | coveralls", + "test": "node test" + }, + "version": "0.0.2" +} diff --git a/node_modules/kind-of/LICENSE b/node_modules/kind-of/LICENSE new file mode 100644 index 0000000..39245ac --- /dev/null +++ b/node_modules/kind-of/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2016, Jon Schlinkert. + +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. diff --git a/node_modules/kind-of/README.md b/node_modules/kind-of/README.md new file mode 100644 index 0000000..193d328 --- /dev/null +++ b/node_modules/kind-of/README.md @@ -0,0 +1,258 @@ +# kind-of [![NPM version](https://img.shields.io/npm/v/kind-of.svg?style=flat)](https://www.npmjs.com/package/kind-of) [![NPM monthly downloads](https://img.shields.io/npm/dm/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![NPM total downloads](https://img.shields.io/npm/dt/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/kind-of.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/kind-of) + +> Get the native type of a value. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save kind-of +``` + +## Install + +Install with [bower](http://bower.io/) + +```sh +$ bower install kind-of --save +``` + +## Usage + +> es5, browser and es6 ready + +```js +var kindOf = require('kind-of'); + +kindOf(undefined); +//=> 'undefined' + +kindOf(null); +//=> 'null' + +kindOf(true); +//=> 'boolean' + +kindOf(false); +//=> 'boolean' + +kindOf(new Boolean(true)); +//=> 'boolean' + +kindOf(new Buffer('')); +//=> 'buffer' + +kindOf(42); +//=> 'number' + +kindOf(new Number(42)); +//=> 'number' + +kindOf('str'); +//=> 'string' + +kindOf(new String('str')); +//=> 'string' + +kindOf(arguments); +//=> 'arguments' + +kindOf({}); +//=> 'object' + +kindOf(Object.create(null)); +//=> 'object' + +kindOf(new Test()); +//=> 'object' + +kindOf(new Date()); +//=> 'date' + +kindOf([]); +//=> 'array' + +kindOf([1, 2, 3]); +//=> 'array' + +kindOf(new Array()); +//=> 'array' + +kindOf(/foo/); +//=> 'regexp' + +kindOf(new RegExp('foo')); +//=> 'regexp' + +kindOf(function () {}); +//=> 'function' + +kindOf(function * () {}); +//=> 'function' + +kindOf(new Function()); +//=> 'function' + +kindOf(new Map()); +//=> 'map' + +kindOf(new WeakMap()); +//=> 'weakmap' + +kindOf(new Set()); +//=> 'set' + +kindOf(new WeakSet()); +//=> 'weakset' + +kindOf(Symbol('str')); +//=> 'symbol' + +kindOf(new Int8Array()); +//=> 'int8array' + +kindOf(new Uint8Array()); +//=> 'uint8array' + +kindOf(new Uint8ClampedArray()); +//=> 'uint8clampedarray' + +kindOf(new Int16Array()); +//=> 'int16array' + +kindOf(new Uint16Array()); +//=> 'uint16array' + +kindOf(new Int32Array()); +//=> 'int32array' + +kindOf(new Uint32Array()); +//=> 'uint32array' + +kindOf(new Float32Array()); +//=> 'float32array' + +kindOf(new Float64Array()); +//=> 'float64array' +``` + +## Benchmarks + +Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of). +Note that performaces is slower for es6 features `Map`, `WeakMap`, `Set` and `WeakSet`. + +```bash +#1: array + current x 23,329,397 ops/sec ±0.82% (94 runs sampled) + lib-type-of x 4,170,273 ops/sec ±0.55% (94 runs sampled) + lib-typeof x 9,686,935 ops/sec ±0.59% (98 runs sampled) + +#2: boolean + current x 27,197,115 ops/sec ±0.85% (94 runs sampled) + lib-type-of x 3,145,791 ops/sec ±0.73% (97 runs sampled) + lib-typeof x 9,199,562 ops/sec ±0.44% (99 runs sampled) + +#3: date + current x 20,190,117 ops/sec ±0.86% (92 runs sampled) + lib-type-of x 5,166,970 ops/sec ±0.74% (94 runs sampled) + lib-typeof x 9,610,821 ops/sec ±0.50% (96 runs sampled) + +#4: function + current x 23,855,460 ops/sec ±0.60% (97 runs sampled) + lib-type-of x 5,667,740 ops/sec ±0.54% (100 runs sampled) + lib-typeof x 10,010,644 ops/sec ±0.44% (100 runs sampled) + +#5: null + current x 27,061,047 ops/sec ±0.97% (96 runs sampled) + lib-type-of x 13,965,573 ops/sec ±0.62% (97 runs sampled) + lib-typeof x 8,460,194 ops/sec ±0.61% (97 runs sampled) + +#6: number + current x 25,075,682 ops/sec ±0.53% (99 runs sampled) + lib-type-of x 2,266,405 ops/sec ±0.41% (98 runs sampled) + lib-typeof x 9,821,481 ops/sec ±0.45% (99 runs sampled) + +#7: object + current x 3,348,980 ops/sec ±0.49% (99 runs sampled) + lib-type-of x 3,245,138 ops/sec ±0.60% (94 runs sampled) + lib-typeof x 9,262,952 ops/sec ±0.59% (99 runs sampled) + +#8: regex + current x 21,284,827 ops/sec ±0.72% (96 runs sampled) + lib-type-of x 4,689,241 ops/sec ±0.43% (100 runs sampled) + lib-typeof x 8,957,593 ops/sec ±0.62% (98 runs sampled) + +#9: string + current x 25,379,234 ops/sec ±0.58% (96 runs sampled) + lib-type-of x 3,635,148 ops/sec ±0.76% (93 runs sampled) + lib-typeof x 9,494,134 ops/sec ±0.49% (98 runs sampled) + +#10: undef + current x 27,459,221 ops/sec ±1.01% (93 runs sampled) + lib-type-of x 14,360,433 ops/sec ±0.52% (99 runs sampled) + lib-typeof x 23,202,868 ops/sec ±0.59% (94 runs sampled) +``` + +## Optimizations + +In 7 out of 8 cases, this library is 2x-10x faster than other top libraries included in the benchmarks. There are a few things that lead to this performance advantage, none of them hard and fast rules, but all of them simple and repeatable in almost any code library: + +1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot. +2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it. +3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'` + +## About + +### Related projects + +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor**
    | +| --- | --- | +| 49 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [miguelmota](https://github.com/miguelmota) | +| 1 | [dtothefp](https://github.com/dtothefp) | +| 1 | [pdehaan](https://github.com/pdehaan) | + +### Building docs + +_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ + +To generate the readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install -g verb verb-generate-readme && verb +``` + +### Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +### License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/kind-of/blob/master/LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on December 07, 2016._ \ No newline at end of file diff --git a/node_modules/kind-of/index.js b/node_modules/kind-of/index.js new file mode 100644 index 0000000..8508386 --- /dev/null +++ b/node_modules/kind-of/index.js @@ -0,0 +1,116 @@ +var isBuffer = require('is-buffer'); +var toString = Object.prototype.toString; + +/** + * Get the native `typeof` a value. + * + * @param {*} `val` + * @return {*} Native javascript type + */ + +module.exports = function kindOf(val) { + // primitivies + if (typeof val === 'undefined') { + return 'undefined'; + } + if (val === null) { + return 'null'; + } + if (val === true || val === false || val instanceof Boolean) { + return 'boolean'; + } + if (typeof val === 'string' || val instanceof String) { + return 'string'; + } + if (typeof val === 'number' || val instanceof Number) { + return 'number'; + } + + // functions + if (typeof val === 'function' || val instanceof Function) { + return 'function'; + } + + // array + if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) { + return 'array'; + } + + // check for instances of RegExp and Date before calling `toString` + if (val instanceof RegExp) { + return 'regexp'; + } + if (val instanceof Date) { + return 'date'; + } + + // other objects + var type = toString.call(val); + + if (type === '[object RegExp]') { + return 'regexp'; + } + if (type === '[object Date]') { + return 'date'; + } + if (type === '[object Arguments]') { + return 'arguments'; + } + if (type === '[object Error]') { + return 'error'; + } + + // buffer + if (typeof Buffer !== 'undefined' && isBuffer(val)) { + return 'buffer'; + } + + // es6: Map, WeakMap, Set, WeakSet + if (type === '[object Set]') { + return 'set'; + } + if (type === '[object WeakSet]') { + return 'weakset'; + } + if (type === '[object Map]') { + return 'map'; + } + if (type === '[object WeakMap]') { + return 'weakmap'; + } + if (type === '[object Symbol]') { + return 'symbol'; + } + + // typed arrays + if (type === '[object Int8Array]') { + return 'int8array'; + } + if (type === '[object Uint8Array]') { + return 'uint8array'; + } + if (type === '[object Uint8ClampedArray]') { + return 'uint8clampedarray'; + } + if (type === '[object Int16Array]') { + return 'int16array'; + } + if (type === '[object Uint16Array]') { + return 'uint16array'; + } + if (type === '[object Int32Array]') { + return 'int32array'; + } + if (type === '[object Uint32Array]') { + return 'uint32array'; + } + if (type === '[object Float32Array]') { + return 'float32array'; + } + if (type === '[object Float64Array]') { + return 'float64array'; + } + + // must be a plain object + return 'object'; +}; diff --git a/node_modules/kind-of/package.json b/node_modules/kind-of/package.json new file mode 100644 index 0000000..73fabeb --- /dev/null +++ b/node_modules/kind-of/package.json @@ -0,0 +1,173 @@ +{ + "_args": [ + [ + { + "raw": "kind-of@^3.0.2", + "scope": null, + "escapedName": "kind-of", + "name": "kind-of", + "rawSpec": "^3.0.2", + "spec": ">=3.0.2 <4.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/align-text" + ] + ], + "_from": "kind-of@>=3.0.2 <4.0.0", + "_id": "kind-of@3.1.0", + "_inCache": true, + "_location": "/kind-of", + "_nodeVersion": "6.7.0", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/kind-of-3.1.0.tgz_1481093733086_0.6179714468307793" + }, + "_npmUser": { + "name": "jonschlinkert", + "email": "github@sellside.com" + }, + "_npmVersion": "3.10.3", + "_phantomChildren": {}, + "_requested": { + "raw": "kind-of@^3.0.2", + "scope": null, + "escapedName": "kind-of", + "name": "kind-of", + "rawSpec": "^3.0.2", + "spec": ">=3.0.2 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/align-text" + ], + "_resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.1.0.tgz", + "_shasum": "475d698a5e49ff5e53d14e3e732429dc8bf4cf47", + "_shrinkwrap": null, + "_spec": "kind-of@^3.0.2", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/align-text", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "contributors": [ + { + "name": "David Fox-Powell", + "email": "dtothefp@gmail.com", + "url": "https://dtothefp.github.io/me" + }, + { + "name": "Jon Schlinkert", + "email": "jon.schlinkert@sellside.com", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Miguel Mota", + "email": "miguel@mota.email", + "url": "https://miguelmota.com" + }, + { + "name": "Peter deHaan", + "url": "http://about.me/peterdehaan" + } + ], + "dependencies": { + "is-buffer": "^1.0.2" + }, + "description": "Get the native type of a value.", + "devDependencies": { + "ansi-bold": "^0.1.1", + "benchmarked": "^0.2.5", + "browserify": "^13.1.0", + "glob": "^7.0.5", + "gulp-format-md": "^0.1.9", + "mocha": "^2.5.3", + "type-of": "^2.0.1", + "typeof": "^1.0.0" + }, + "directories": {}, + "dist": { + "shasum": "475d698a5e49ff5e53d14e3e732429dc8bf4cf47", + "tarball": "https://registry.npmjs.org/kind-of/-/kind-of-3.1.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "eb57ad426b39f25902260f315a1f4ae50d2f760e", + "homepage": "https://github.com/jonschlinkert/kind-of", + "keywords": [ + "arguments", + "array", + "boolean", + "check", + "date", + "function", + "is", + "is-type", + "is-type-of", + "kind", + "kind-of", + "number", + "object", + "of", + "regexp", + "string", + "test", + "type", + "type-of", + "typeof", + "types" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "jonschlinkert", + "email": "github@sellside.com" + }, + { + "name": "doowb", + "email": "brian.woodward@gmail.com" + } + ], + "name": "kind-of", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/kind-of.git" + }, + "scripts": { + "prepublish": "browserify -o browser.js -e index.js -s index --bare", + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "is-glob", + "is-number", + "is-primitive" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb" + ] + }, + "version": "3.1.0" +} diff --git a/node_modules/lazy-cache/LICENSE b/node_modules/lazy-cache/LICENSE new file mode 100644 index 0000000..1e49edf --- /dev/null +++ b/node_modules/lazy-cache/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2016, Jon Schlinkert. + +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. diff --git a/node_modules/lazy-cache/README.md b/node_modules/lazy-cache/README.md new file mode 100644 index 0000000..33b5a4d --- /dev/null +++ b/node_modules/lazy-cache/README.md @@ -0,0 +1,147 @@ +# lazy-cache [![NPM version](https://img.shields.io/npm/v/lazy-cache.svg?style=flat)](https://www.npmjs.com/package/lazy-cache) [![NPM downloads](https://img.shields.io/npm/dm/lazy-cache.svg?style=flat)](https://npmjs.org/package/lazy-cache) [![Build Status](https://img.shields.io/travis/jonschlinkert/lazy-cache.svg?style=flat)](https://travis-ci.org/jonschlinkert/lazy-cache) + +> Cache requires to be lazy-loaded when needed. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install lazy-cache --save +``` + +If you use webpack and are experiencing issues, try using [unlazy-loader](https://github.com/doowb/unlazy-loader), a webpack loader that fixes the bug that prevents webpack from working with native javascript getters. + +## Usage + +```js +var utils = require('lazy-cache')(require); +``` + +**Use as a property on `lazy`** + +The module is also added as a property to the `lazy` function +so it can be called without having to call a function first. + +```js +var utils = require('lazy-cache')(require); + +// `npm install glob` +utils('glob'); + +// glob sync +console.log(utils.glob.sync('*.js')); + +// glob async +utils.glob('*.js', function (err, files) { + console.log(files); +}); +``` + +**Use as a function** + +```js +var utils = require('lazy-cache')(require); +var glob = utils('glob'); + +// `glob` is a now a function that may be called when needed +glob().sync('foo/*.js'); +``` + +## Aliases + +An alias may be passed as the second argument if you don't want to use the automatically camel-cased variable name. + +**Example** + +```js +var utils = require('lazy-cache')(require); + +// alias `ansi-yellow` as `yellow` +utils('ansi-yellow', 'yellow'); +console.log(utils.yellow('foo')); +``` + +## Browserify usage + +**Example** + +```js +var utils = require('lazy-cache')(require); +// temporarily re-assign `require` to trick browserify +var fn = require; +require = utils; +// list module dependencies (here, `require` is actually `lazy-cache`) +require('glob'); +require = fn; // restore the native `require` function + +/** + * Now you can use glob with the `utils.glob` variable + */ + +// sync +console.log(utils.glob.sync('*.js')); + +// async +utils.glob('*.js', function (err, files) { + console.log(files.join('\n')); +}); +``` + +## Kill switch + +In certain rare edge cases it may be necessary to unlazy all lazy-cached dependencies (5 reported cases after ~30 million downloads). + +To force lazy-cache to immediately invoke all dependencies, do: + +```js +process.env.UNLAZY = true; +``` + +## Related projects + +You might also be interested in these projects: + +[lint-deps](https://www.npmjs.com/package/lint-deps): CLI tool that tells you when dependencies are missing from package.json and offers you a… [more](https://www.npmjs.com/package/lint-deps) | [homepage](https://github.com/jonschlinkert/lint-deps) + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/lazy-cache/issues/new). + +## Building docs + +Generate readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install verb && npm run docs +``` + +Or, if [verb](https://github.com/verbose/verb) is installed globally: + +```sh +$ verb +``` + +## Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +## Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/lazy-cache/blob/master/LICENSE). + +*** + +_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on April 22, 2016._ \ No newline at end of file diff --git a/node_modules/lazy-cache/index.js b/node_modules/lazy-cache/index.js new file mode 100644 index 0000000..da7897d --- /dev/null +++ b/node_modules/lazy-cache/index.js @@ -0,0 +1,67 @@ +'use strict'; + +/** + * Cache results of the first function call to ensure only calling once. + * + * ```js + * var utils = require('lazy-cache')(require); + * // cache the call to `require('ansi-yellow')` + * utils('ansi-yellow', 'yellow'); + * // use `ansi-yellow` + * console.log(utils.yellow('this is yellow')); + * ``` + * + * @param {Function} `fn` Function that will be called only once. + * @return {Function} Function that can be called to get the cached function + * @api public + */ + +function lazyCache(fn) { + var cache = {}; + var proxy = function(mod, name) { + name = name || camelcase(mod); + + // check both boolean and string in case `process.env` cases to string + if (process.env.UNLAZY === 'true' || process.env.UNLAZY === true || process.env.TRAVIS) { + cache[name] = fn(mod); + } + + Object.defineProperty(proxy, name, { + enumerable: true, + configurable: true, + get: getter + }); + + function getter() { + if (cache.hasOwnProperty(name)) { + return cache[name]; + } + return (cache[name] = fn(mod)); + } + return getter; + }; + return proxy; +} + +/** + * Used to camelcase the name to be stored on the `lazy` object. + * + * @param {String} `str` String containing `_`, `.`, `-` or whitespace that will be camelcased. + * @return {String} camelcased string. + */ + +function camelcase(str) { + if (str.length === 1) { + return str.toLowerCase(); + } + str = str.replace(/^[\W_]+|[\W_]+$/g, '').toLowerCase(); + return str.replace(/[\W_]+(\w|$)/g, function(_, ch) { + return ch.toUpperCase(); + }); +} + +/** + * Expose `lazyCache` + */ + +module.exports = lazyCache; diff --git a/node_modules/lazy-cache/package.json b/node_modules/lazy-cache/package.json new file mode 100644 index 0000000..24c7ced --- /dev/null +++ b/node_modules/lazy-cache/package.json @@ -0,0 +1,129 @@ +{ + "_args": [ + [ + { + "raw": "lazy-cache@^1.0.3", + "scope": null, + "escapedName": "lazy-cache", + "name": "lazy-cache", + "rawSpec": "^1.0.3", + "spec": ">=1.0.3 <2.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/center-align" + ] + ], + "_from": "lazy-cache@>=1.0.3 <2.0.0", + "_id": "lazy-cache@1.0.4", + "_inCache": true, + "_location": "/lazy-cache", + "_nodeVersion": "5.5.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/lazy-cache-1.0.4.tgz_1461378859142_0.0996799839194864" + }, + "_npmUser": { + "name": "jonschlinkert", + "email": "github@sellside.com" + }, + "_npmVersion": "3.6.0", + "_phantomChildren": {}, + "_requested": { + "raw": "lazy-cache@^1.0.3", + "scope": null, + "escapedName": "lazy-cache", + "name": "lazy-cache", + "rawSpec": "^1.0.3", + "spec": ">=1.0.3 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/center-align" + ], + "_resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "_shasum": "a1d78fc3a50474cb80845d3b3b6e1da49a446e8e", + "_shrinkwrap": null, + "_spec": "lazy-cache@^1.0.3", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/center-align", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/lazy-cache/issues" + }, + "dependencies": {}, + "description": "Cache requires to be lazy-loaded when needed.", + "devDependencies": { + "ansi-yellow": "^0.1.1", + "glob": "^7.0.3", + "gulp-format-md": "^0.1.8", + "mocha": "^2.4.5" + }, + "directories": {}, + "dist": { + "shasum": "a1d78fc3a50474cb80845d3b3b6e1da49a446e8e", + "tarball": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "d081ffbda147391083a6856fafb1c5d82308f80c", + "homepage": "https://github.com/jonschlinkert/lazy-cache", + "keywords": [ + "cache", + "caching", + "dependencies", + "dependency", + "lazy", + "require", + "requires" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "jonschlinkert", + "email": "github@sellside.com" + }, + { + "name": "doowb", + "email": "brian.woodward@gmail.com" + } + ], + "name": "lazy-cache", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/lazy-cache.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "lint-deps" + ] + }, + "plugins": [ + "gulp-format-md" + ], + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb" + ] + }, + "version": "1.0.4" +} diff --git a/node_modules/lcid/index.js b/node_modules/lcid/index.js new file mode 100644 index 0000000..69bd3d2 --- /dev/null +++ b/node_modules/lcid/index.js @@ -0,0 +1,22 @@ +'use strict'; +var invertKv = require('invert-kv'); +var all = require('./lcid.json'); +var inverted = invertKv(all); + +exports.from = function (lcidCode) { + if (typeof lcidCode !== 'number') { + throw new TypeError('Expected a number'); + } + + return inverted[lcidCode]; +}; + +exports.to = function (localeId) { + if (typeof localeId !== 'string') { + throw new TypeError('Expected a string'); + } + + return all[localeId]; +}; + +exports.all = all; diff --git a/node_modules/lcid/lcid.json b/node_modules/lcid/lcid.json new file mode 100644 index 0000000..9c89f6a --- /dev/null +++ b/node_modules/lcid/lcid.json @@ -0,0 +1,203 @@ +{ + "af_ZA": 1078, + "am_ET": 1118, + "ar_AE": 14337, + "ar_BH": 15361, + "ar_DZ": 5121, + "ar_EG": 3073, + "ar_IQ": 2049, + "ar_JO": 11265, + "ar_KW": 13313, + "ar_LB": 12289, + "ar_LY": 4097, + "ar_MA": 6145, + "ar_OM": 8193, + "ar_QA": 16385, + "ar_SA": 1025, + "ar_SY": 10241, + "ar_TN": 7169, + "ar_YE": 9217, + "arn_CL": 1146, + "as_IN": 1101, + "az_AZ": 2092, + "ba_RU": 1133, + "be_BY": 1059, + "bg_BG": 1026, + "bn_IN": 1093, + "bo_BT": 2129, + "bo_CN": 1105, + "br_FR": 1150, + "bs_BA": 8218, + "ca_ES": 1027, + "co_FR": 1155, + "cs_CZ": 1029, + "cy_GB": 1106, + "da_DK": 1030, + "de_AT": 3079, + "de_CH": 2055, + "de_DE": 1031, + "de_LI": 5127, + "de_LU": 4103, + "div_MV": 1125, + "dsb_DE": 2094, + "el_GR": 1032, + "en_AU": 3081, + "en_BZ": 10249, + "en_CA": 4105, + "en_CB": 9225, + "en_GB": 2057, + "en_IE": 6153, + "en_IN": 18441, + "en_JA": 8201, + "en_MY": 17417, + "en_NZ": 5129, + "en_PH": 13321, + "en_TT": 11273, + "en_US": 1033, + "en_ZA": 7177, + "en_ZW": 12297, + "es_AR": 11274, + "es_BO": 16394, + "es_CL": 13322, + "es_CO": 9226, + "es_CR": 5130, + "es_DO": 7178, + "es_EC": 12298, + "es_ES": 3082, + "es_GT": 4106, + "es_HN": 18442, + "es_MX": 2058, + "es_NI": 19466, + "es_PA": 6154, + "es_PE": 10250, + "es_PR": 20490, + "es_PY": 15370, + "es_SV": 17418, + "es_UR": 14346, + "es_US": 21514, + "es_VE": 8202, + "et_EE": 1061, + "eu_ES": 1069, + "fa_IR": 1065, + "fi_FI": 1035, + "fil_PH": 1124, + "fo_FO": 1080, + "fr_BE": 2060, + "fr_CA": 3084, + "fr_CH": 4108, + "fr_FR": 1036, + "fr_LU": 5132, + "fr_MC": 6156, + "fy_NL": 1122, + "ga_IE": 2108, + "gbz_AF": 1164, + "gl_ES": 1110, + "gsw_FR": 1156, + "gu_IN": 1095, + "ha_NG": 1128, + "he_IL": 1037, + "hi_IN": 1081, + "hr_BA": 4122, + "hr_HR": 1050, + "hu_HU": 1038, + "hy_AM": 1067, + "id_ID": 1057, + "ii_CN": 1144, + "is_IS": 1039, + "it_CH": 2064, + "it_IT": 1040, + "iu_CA": 2141, + "ja_JP": 1041, + "ka_GE": 1079, + "kh_KH": 1107, + "kk_KZ": 1087, + "kl_GL": 1135, + "kn_IN": 1099, + "ko_KR": 1042, + "kok_IN": 1111, + "ky_KG": 1088, + "lb_LU": 1134, + "lo_LA": 1108, + "lt_LT": 1063, + "lv_LV": 1062, + "mi_NZ": 1153, + "mk_MK": 1071, + "ml_IN": 1100, + "mn_CN": 2128, + "mn_MN": 1104, + "moh_CA": 1148, + "mr_IN": 1102, + "ms_BN": 2110, + "ms_MY": 1086, + "mt_MT": 1082, + "my_MM": 1109, + "nb_NO": 1044, + "ne_NP": 1121, + "nl_BE": 2067, + "nl_NL": 1043, + "nn_NO": 2068, + "ns_ZA": 1132, + "oc_FR": 1154, + "or_IN": 1096, + "pa_IN": 1094, + "pl_PL": 1045, + "ps_AF": 1123, + "pt_BR": 1046, + "pt_PT": 2070, + "qut_GT": 1158, + "quz_BO": 1131, + "quz_EC": 2155, + "quz_PE": 3179, + "rm_CH": 1047, + "ro_RO": 1048, + "ru_RU": 1049, + "rw_RW": 1159, + "sa_IN": 1103, + "sah_RU": 1157, + "se_FI": 3131, + "se_NO": 1083, + "se_SE": 2107, + "si_LK": 1115, + "sk_SK": 1051, + "sl_SI": 1060, + "sma_NO": 6203, + "sma_SE": 7227, + "smj_NO": 4155, + "smj_SE": 5179, + "smn_FI": 9275, + "sms_FI": 8251, + "sq_AL": 1052, + "sr_BA": 7194, + "sr_SP": 3098, + "sv_FI": 2077, + "sv_SE": 1053, + "sw_KE": 1089, + "syr_SY": 1114, + "ta_IN": 1097, + "te_IN": 1098, + "tg_TJ": 1064, + "th_TH": 1054, + "tk_TM": 1090, + "tmz_DZ": 2143, + "tn_ZA": 1074, + "tr_TR": 1055, + "tt_RU": 1092, + "ug_CN": 1152, + "uk_UA": 1058, + "ur_IN": 2080, + "ur_PK": 1056, + "uz_UZ": 2115, + "vi_VN": 1066, + "wen_DE": 1070, + "wo_SN": 1160, + "xh_ZA": 1076, + "yo_NG": 1130, + "zh_CHS": 4, + "zh_CHT": 31748, + "zh_CN": 2052, + "zh_HK": 3076, + "zh_MO": 5124, + "zh_SG": 4100, + "zh_TW": 1028, + "zu_ZA": 1077 +} diff --git a/node_modules/lcid/license b/node_modules/lcid/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/lcid/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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. diff --git a/node_modules/lcid/package.json b/node_modules/lcid/package.json new file mode 100644 index 0000000..8443c35 --- /dev/null +++ b/node_modules/lcid/package.json @@ -0,0 +1,109 @@ +{ + "_args": [ + [ + { + "raw": "lcid@^1.0.0", + "scope": null, + "escapedName": "lcid", + "name": "lcid", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/os-locale" + ] + ], + "_from": "lcid@>=1.0.0 <2.0.0", + "_id": "lcid@1.0.0", + "_inCache": true, + "_location": "/lcid", + "_nodeVersion": "0.12.0", + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "2.5.1", + "_phantomChildren": {}, + "_requested": { + "raw": "lcid@^1.0.0", + "scope": null, + "escapedName": "lcid", + "name": "lcid", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/os-locale" + ], + "_resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "_shasum": "308accafa0bc483a3867b4b6f2b9506251d1b835", + "_shrinkwrap": null, + "_spec": "lcid@^1.0.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/os-locale", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/lcid/issues" + }, + "dependencies": { + "invert-kv": "^1.0.0" + }, + "description": "Mapping between standard locale identifiers and Windows locale identifiers (LCID)", + "devDependencies": { + "ava": "0.0.4" + }, + "directories": {}, + "dist": { + "shasum": "308accafa0bc483a3867b4b6f2b9506251d1b835", + "tarball": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js", + "lcid.json" + ], + "gitHead": "96bb3e617f77f5f8ceb78653c77de5a85abb3b1e", + "homepage": "https://github.com/sindresorhus/lcid", + "keywords": [ + "lcid", + "locale", + "string", + "str", + "id", + "identifier", + "windows", + "language", + "lang", + "map", + "mapping", + "convert", + "json", + "bcp47", + "ietf", + "tag" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "lcid", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/lcid.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.0.0" +} diff --git a/node_modules/lcid/readme.md b/node_modules/lcid/readme.md new file mode 100644 index 0000000..bee4a70 --- /dev/null +++ b/node_modules/lcid/readme.md @@ -0,0 +1,35 @@ +# lcid [![Build Status](https://travis-ci.org/sindresorhus/lcid.svg?branch=master)](https://travis-ci.org/sindresorhus/lcid) + +> Mapping between [standard locale identifiers](http://en.wikipedia.org/wiki/Locale) and [Windows locale identifiers (LCID)](http://en.wikipedia.org/wiki/Locale#Specifics_for_Microsoft_platforms) + +Based on the [mapping](https://github.com/python/cpython/blob/be2a1a76fa43bb1ea1b3577bb5bdd506a2e90e37/Lib/locale.py#L1395-L1604) used in the Python standard library. + +The mapping itself is just a [JSON file](lcid.json) and can be used wherever. + + +## Install + +``` +$ npm install --save lcid +``` + + +## Usage + +```js +var lcid = require('lcid'); + +lcid.from(1044); +//=> 'nb_NO' + +lcid.to('nb_NO'); +//=> 1044 + +lcid.all; +//=> {'af_ZA': 1078, ...} +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/liftoff/.jscsrc b/node_modules/liftoff/.jscsrc new file mode 100644 index 0000000..af3c78e --- /dev/null +++ b/node_modules/liftoff/.jscsrc @@ -0,0 +1,60 @@ +{ + "esnext": true, + "disallowMixedSpacesAndTabs": true, + "disallowSpaceAfterObjectKeys": true, + "disallowSpaceBeforeBinaryOperators": [ + "," + ], + "disallowSpacesInsideArrayBrackets": true, + "disallowSpacesInsideParentheses": true, + "disallowTrailingWhitespace": true, + "requireCommaBeforeLineBreak": true, + "requireLineFeedAtFileEnd": true, + "requireSpaceAfterBinaryOperators": [ + "=", + ",", + "+", + "-", + "/", + "*", + "==", + "===", + "!=", + "!==", + ":", + "&&", + "||" + ], + "requireSpaceAfterKeywords": [ + "if", + "else", + "for", + "while", + "do", + "switch", + "return", + "try", + "catch" + ], + "requireSpaceBeforeBinaryOperators": [ + "=", + "+", + "-", + "/", + "*", + "==", + "===", + "!=", + "!==", + "&&", + "||" + ], + "requireSpaceBeforeBlockStatements": true, + "requireSpacesInFunctionExpression": { + "beforeOpeningCurlyBrace": true + }, + "validateQuoteMarks": { + "escape": true, + "mark": "'" + } +} diff --git a/node_modules/liftoff/.jshintrc b/node_modules/liftoff/.jshintrc new file mode 100644 index 0000000..6871084 --- /dev/null +++ b/node_modules/liftoff/.jshintrc @@ -0,0 +1,11 @@ +{ + "undef": true, + "unused": true, + "node": true, + "esnext": true, + "expr": true, + "globals": { + "describe": true, + "it": true + } +} diff --git a/node_modules/liftoff/.npmignore b/node_modules/liftoff/.npmignore new file mode 100644 index 0000000..9c9c73b --- /dev/null +++ b/node_modules/liftoff/.npmignore @@ -0,0 +1,2 @@ +test +artwork diff --git a/node_modules/liftoff/.travis.yml b/node_modules/liftoff/.travis.yml new file mode 100644 index 0000000..61ec9ec --- /dev/null +++ b/node_modules/liftoff/.travis.yml @@ -0,0 +1,16 @@ +language: node_js +os: + - linux + - osx +node_js: + - "6" + - "5" + - "4" + - "0.12" + - "0.10" +before_install: + - npm update -g npm +matrix: + fast_finish: true + allow_failures: + - node_js: "0.10" diff --git a/node_modules/liftoff/CHANGELOG b/node_modules/liftoff/CHANGELOG new file mode 100644 index 0000000..ee5b84d --- /dev/null +++ b/node_modules/liftoff/CHANGELOG @@ -0,0 +1,127 @@ +v2.2.2: + date: 2016-05-20 + changes: + - Update dependencies. +v2.2.1: + date: 2016-03-23 + changes: + - Make sure that v8 flags are passed properly through the `respawn` event +v2.1.0: + date: 2015-05-20 + changes: + - Use rechoir to autoload modules. +v2.0.3: + date: 2015-03-31 + changes: + - Internal bugfix, don't wrap callback error in another error, idiot. +v2.0.2: + date: 2015-02-24 + changes: + - Support process.env.NODE_PATH when resolving module. +v2.0.1: + date: 2015-02-01 + changes: + - Find modulePath correctly when devving against yourself. +v2.0.0: + date: 2015-01-15 + changes: + - Rename `nodeFlags` to `v8Flags` and make it async. +v1.0.4: + date: 2015-01-04 + changes: + - Detect config extension using basename, not full path. +v1.0.0: + date: 2014-12-16 + changes: + - Update dependencies +v0.13.6: + date: 2014-11-07 + changes: + - Don't include artwork on npm. +v0.13.5: + date: 2014-10-10 + changes: + - Only attempt to resolve the real path of configFile if it is actually a symlink. +v0.13.4: + date: 2014-10-07 + changes: + - Set configBase to the directory of the symlink, not the directory of its real location. +v0.13.3: + date: 2014-10-06 + changes: + - Return the real location of symlinked config files. +v0.13.2: + date: 2014-09-12 + changes: + - Include flags in respawn event. I really miss `npm publish --force`. +v0.13.1: + date: 2014-09-12 + changes: + - Slight performance tweak. +v0.13.0: + date: 2014-09-12 + changes: + - Support passing flags to node with `nodeFlags` option. +v0.12.1: + date: 2014-06-27 + changes: + - Support preloading modules for compound extensions like `.coffee.md`. +v0.12.0: + date: 2014-06-27 + changes: + - Respect order of extensions when searching for config. + - Rename `configNameRegex` environment property to `configNameSearch`. +v0.11.3: + date: 2014-06-09 + changes: + - Make cwd match configBase if cwd isn't explictly provided +v0.11.2: + date: 2014-06-04 + changes: + - Regression fix: coerce preloads into array before attempting to push more +v0.11.1: + date: 2014-06-02 + changes: + - Update dependencies. +v0.11.0: + date: 2014-05-27 + changes: + - Refactor and remove options parsing. +v0.10.0: + date: 2014-05-06 + changes: + - Remove `addExtension` in favor of `extension` option. + - Support preloading modules based on extension. +v0.9.7: + date: 2014-04-28 + changes: + - Locate local module in cwd even if config isn't present. +v0.9.6: + date: 2014-04-02 + changes: + - Fix regression where external modules are not properly required. + - Ignore configPathFlag / cwdFlag if the value isn't a string +v0.9.3: + date: 2014-02-28 + changes: + - Fix regression where developing against self doesn't correctly set cwd. +v0.9.0: + date: 2014-02-28 + changes: + - Use liftoff instance as context (`this`) for launch callback. + - Support split --cwd and --configfile locations. + - Rename `configLocationFlag` to `configPathFlag` + - Support node 0.8+ +v0.8.7: + date: 2014-02-24 + changes: + - Pass environment as first argument to `launch`. +v0.8.5: + date: 2014-02-19 + changes: + - Implement `addExtensions` option. + - Default to `index.js` if `modulePackage` has no `main` property. +v0.8.4: + date: 2014-02-05 + changes: + - Initial public release. diff --git a/node_modules/liftoff/LICENSE b/node_modules/liftoff/LICENSE new file mode 100644 index 0000000..a55f5b7 --- /dev/null +++ b/node_modules/liftoff/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2014 Tyler Kellen + +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. diff --git a/node_modules/liftoff/README.md b/node_modules/liftoff/README.md new file mode 100644 index 0000000..9a5a0ae --- /dev/null +++ b/node_modules/liftoff/README.md @@ -0,0 +1,429 @@ +

    + + + +

    + +# liftoff [![Build Status](https://secure.travis-ci.org/js-cli/js-liftoff.svg)](http://travis-ci.org/js-cli/js-liftoff) [![Build status](https://ci.appveyor.com/api/projects/status/5a6w8xuq8ed1ilc4/branch/master?svg=true)](https://ci.appveyor.com/project/js-cli/js-liftoff/branch/master) + +> Launch your command line tool with ease. + +[![NPM](https://nodei.co/npm/liftoff.png)](https://nodei.co/npm/liftoff/) + +## What is it? +[See this blog post](http://weblog.bocoup.com/building-command-line-tools-in-node-with-liftoff/), [check out this proof of concept](https://github.com/js-cli/js-hacker), or read on. + +Say you're writing a CLI tool. Let's call it [hacker](https://github.com/js-cli/js-hacker). You want to configure it using a `Hackerfile`. This is node, so you install `hacker` locally for each project you use it in. But, in order to get the `hacker` command in your PATH, you also install it globally. + +Now, when you run `hacker`, you want to configure what it does using the `Hackerfile` in your current directory, and you want it to execute using the local installation of your tool. Also, it'd be nice if the `hacker` command was smart enough to traverse up your folders until it finds a `Hackerfile`—for those times when you're not in the root directory of your project. Heck, you might even want to launch `hacker` from a folder outside of your project by manually specifying a working directory. Liftoff manages this for you. + +So, everything is working great. Now you can find your local `hacker` and `Hackerfile` with ease. Unfortunately, it turns out you've authored your `Hackerfile` in coffee-script, or some other JS variant. In order to support *that*, you have to load the compiler for it, and then register the extension for it with node. Good news, Liftoff can do that, and a whole lot more, too. + +## API + +### constructor(opts) + +Create an instance of Liftoff to invoke your application. + +An example utilizing all options: +```js +const Hacker = new Liftoff({ + name: 'hacker', + processTitle: 'hacker', + moduleName: 'hacker', + configName: 'hackerfile', + extensions: { + '.js': null, + '.json': null, + '.coffee': 'coffee-script/register' + }, + v8flags: ['--harmony'] // or v8flags: require('v8flags') +}); +``` + +#### opts.name + +Sugar for setting `processTitle`, `moduleName`, `configName` automatically. + +Type: `String` +Default: `null` + +These are equivalent: +```js +const Hacker = Liftoff({ + processTitle: 'hacker', + moduleName: 'hacker', + configName: 'hackerfile' +}); +``` +```js +const Hacker = Liftoff({name:'hacker'}); +``` + +#### opts.moduleName + +Sets which module your application expects to find locally when being run. + +Type: `String` +Default: `null` + +#### opts.configName + +Sets the name of the configuration file Liftoff will attempt to find. Case-insensitive. + +Type: `String` +Default: `null` + +#### opts.extensions + +Set extensions to include when searching for a configuration file. If an external module is needed to load a given extension (e.g. `.coffee`), the module name should be specified as the value for the key. + +Type: `Object` +Default: `{".js":null,".json":null}` + +**Examples:** + +In this example Liftoff will look for `myappfile{.js,.json,.coffee}`. If a config with the extension `.coffee` is found, Liftoff will try to require `coffee-script/require` from the current working directory. +```js +const MyApp = new Liftoff({ + name: 'myapp', + extensions: { + '.js': null, + '.json': null, + '.coffee': 'coffee-script/register' + } +}); +``` + +In this example, Liftoff will look for `.myapp{rc}`. +```js +const MyApp = new Liftoff({ + name: 'myapp', + configName: '.myapp', + extensions: { + 'rc': null + } +}); +``` + +In this example, Liftoff will automatically attempt to load the correct module for any javascript variant supported by [node-interpret](https://github.com/tkellen/node-interpret) (as long as it does not require a register method). + +```js +const MyApp = new Liftoff({ + name: 'myapp', + extensions: require('interpret').jsVariants +}); +``` +#### opts.v8flags + +Any flag specified here will be applied to node, not your program. Useful for supporting invocations like `myapp --harmony command`, where `--harmony` should be passed to node, not your program. This functionality is implemented using [flagged-respawn](http://github.com/tkellen/node-flagged-respawn). To support all v8flags, see [node-v8flags](https://github.com/tkellen/node-v8flags). + +Type: `Array|Function` +Default: `null` + +If this method is a function, it should take a node-style callback that yields an array of flags. + +#### opts.processTitle + +Sets what the [process title](http://nodejs.org/api/process.html#process_process_title) will be. + +Type: `String` +Default: `null` + +#### opts.completions(type) + +A method to handle bash/zsh/whatever completions. + +Type: `Function` +Default: `null` + +#### opts.configFiles + +An object of configuration files to find. Each property is keyed by the default basename of the file being found, and the value is an object of [path arguments](#path-arguments) keyed by unique names. + +__Note:__ This option is useful if, for example, you want to support an `.apprc` file in addition to an `appfile.js`. If you only need a single configuration file, you probably don't need this. In addition to letting you find multiple files, this option allows more fine-grained control over how configuration files are located. + +Type: `Object` +Default: `null` + +#### Path arguments + +The [`fined`](https://github.com/js-cli/fined) module accepts a string representing the path to search or an object with the following keys: + +* `path` __(required)__ + + The path to search. Using only a string expands to this property. + + Type: `String` + Default: `null` + +* `name` + + The basename of the file to find. Extensions are appended during lookup. + + Type: `String` + Default: Top-level key in `configFiles` + +* `extensions` + + The extensions to append to `name` during lookup. See also: [`opts.extensions`](#optsextensions). + + Type: `String|Array|Object` + Default: The value of [`opts.extensions`](#optsextensions) + +* `cwd` + + The base directory of `path` (if relative). + + Type: `String` + Default: The value of [`opts.cwd`](#optscwd) + +* `findUp` + + Whether the `path` should be traversed up to find the file. + + Type: `Boolean` + Default: `false` + +**Examples:** + +In this example Liftoff will look for the `.hacker.js` file relative to the `cwd` as declared in `configFiles`. +```js +const MyApp = new Liftoff({ + name: 'hacker', + configFiles: { + '.hacker': { + cwd: '.' + } + } +}); +``` + +In this example, Liftoff will look for `.hackerrc` in the home directory. +```js +const MyApp = new Liftoff({ + name: 'hacker', + configFiles: { + '.hacker': { + home: { + path: '~', + extensions: { + 'rc': null + } + } + } + } +}); +``` + +In this example, Liftoff will look in the `cwd` and then lookup the tree for the `.hacker.js` file. +```js +const MyApp = new Liftoff({ + name: 'hacker', + configFiles: { + '.hacker': { + up: { + path: '.', + findUp: true + } + } + } +}); +``` + +In this example, the `name` is overridden and the key is ignored so Liftoff looks for `.override.js`. +```js +const MyApp = new Liftoff({ + name: 'hacker', + configFiles: { + hacker: { + override: { + path: '.', + name: '.override' + } + } + } +}); +``` + +In this example, Liftoff will use the home directory as the `cwd` and looks for `~/.hacker.js`. +```js +const MyApp = new Liftoff({ + name: 'hacker', + configFiles: { + '.hacker': { + home: { + path: '.', + cwd: '~' + } + } + } +}); +``` + +## launch(opts, callback(env)) +Launches your application with provided options, builds an environment, and invokes your callback, passing the calculated environment as the first argument. + +##### Example Configuration w/ Options Parsing: +```js +const Liftoff = require('liftoff'); +const MyApp = new Liftoff({name:'myapp'}); +const argv = require('minimist')(process.argv.slice(2)); +const invoke = function (env) { + console.log('my environment is:', env); + console.log('my cli options are:', argv); + console.log('my liftoff config is:', this); +}; +MyApp.launch({ + cwd: argv.cwd, + configPath: argv.myappfile, + require: argv.require, + completion: argv.completion +}, invoke); +``` + +#### opts.cwd + +Change the current working directory for this launch. Relative paths are calculated against `process.cwd()`. + +Type: `String` +Default: `process.cwd()` + +**Example Configuration:** +```js +const argv = require('minimist')(process.argv.slice(2)); +MyApp.launch({ + cwd: argv.cwd +}, invoke); +``` + +**Matching CLI Invocation:** +``` +myapp --cwd ../ +``` + +#### opts.configPath + +Don't search for a config, use the one provided. **Note:** Liftoff will assume the current working directory is the directory containing the config file unless an alternate location is explicitly specified using `cwd`. + +Type: `String` +Default: `null` + +**Example Configuration:** +```js +var argv = require('minimist')(process.argv.slice(2)); +MyApp.launch({ + configPath: argv.myappfile +}, invoke); +``` + +**Matching CLI Invocation:** +``` +myapp --myappfile /var/www/project/Myappfile.js +``` + +**Examples using `cwd` and `configPath` together:** + +These are functionally identical: +``` +myapp --myappfile /var/www/project/Myappfile.js +myapp --cwd /var/www/project +``` + +These can run myapp from a shared directory as though it were located in another project: +``` +myapp --myappfile /Users/name/Myappfile.js --cwd /var/www/project1 +myapp --myappfile /Users/name/Myappfile.js --cwd /var/www/project2 +``` + +#### opts.require + +A string or array of modules to attempt requiring from the local working directory before invoking the launch callback. + +Type: `String|Array` +Default: `null` + +**Example Configuration:** +```js +var argv = require('minimist')(process.argv.slice(2)); +MyApp.launch({ + require: argv.require +}, invoke); +``` + +**Matching CLI Invocation:** +```js +myapp --require coffee-script/register +``` + +#### callback(env) + +A function to start your application. When invoked, `this` will be your instance of Liftoff. The `env` param will contain the following keys: + +- `cwd`: the current working directory +- `require`: an array of modules that liftoff tried to pre-load +- `configNameSearch`: the config files searched for +- `configPath`: the full path to your configuration file (if found) +- `configBase`: the base directory of your configuration file (if found) +- `modulePath`: the full path to the local module your project relies on (if found) +- `modulePackage`: the contents of the local module's package.json (if found) +- `configFiles`: an object of filepaths for each found config file (filepath values will be null if not found) + +### events + +#### require(name, module) + +Emitted when a module is pre-loaded. + +```js +var Hacker = new Liftoff({name:'hacker'}); +Hacker.on('require', function (name, module) { + console.log('Requiring external module: '+name+'...'); + // automatically register coffee-script extensions + if (name === 'coffee-script') { + module.register(); + } +}); +``` + +#### requireFail(name, err) + +Emitted when a requested module cannot be preloaded. + +```js +var Hacker = new Liftoff({name:'hacker'}); +Hacker.on('requireFail', function (name, err) { + console.log('Unable to load:', name, err); +}); +``` + +#### respawn(flags, child) + +Emitted when Liftoff re-spawns your process (when a [`v8flags`](#optsv8flags) is detected). + +```js +var Hacker = new Liftoff({ + name: 'hacker', + v8flags: ['--harmony'] +}); +Hacker.on('respawn', function (flags, child) { + console.log('Detected node flags:', flags); + console.log('Respawned to PID:', child.pid); +}); +``` + +Event will be triggered for this command: +`hacker --harmony commmand` + +## Examples + +Check out how [gulp](https://github.com/gulpjs/gulp/blob/master/bin/gulp.js) uses Liftoff. + +For a bare-bones example, try [the hacker project](https://github.com/js-cli/js-hacker/blob/master/bin/hacker.js). + +To try the example, do the following: + +1. Install the sample project `hacker` with `npm install -g hacker`. +2. Make a `Hackerfile.js` with some arbitrary javascript it. +3. Install hacker next to it with `npm install hacker`. +3. Run `hacker` while in the same parent folder. diff --git a/node_modules/liftoff/UPGRADING.md b/node_modules/liftoff/UPGRADING.md new file mode 100644 index 0000000..7f95e3e --- /dev/null +++ b/node_modules/liftoff/UPGRADING.md @@ -0,0 +1,28 @@ +# 1.0.0 -> 2.0.0 +The option `nodeFlags` was renamed to `v8flags` for accuracy. It can now be a callback taking method that yields an array of flags, **or** an array literal. + +# 0.11 -> 0.12 +For the environment passed into the `launch` callback, `configNameRegex` has been renamed to `configNameSearch`. It now returns an array of valid config names instead of a regular expression. + +# 0.10 -> 0.11 +The method signature for `launch` was changed in this version of Liftoff. + +You must now provide your own options parser and pass your desired params directly into `launch` as the first argument. The second argument is now the invocation callback that starts your application. + +To replicate the default functionality of 0.10, use the following: +```js +const Liftoff = require('liftoff'); +const MyApp = new Liftoff({name:'myapp'}); +const argv = require('minimist')(process.argv.slice(2)); +const invoke = function (env) { + console.log('my environment is:', env); + console.log('my cli options are:', argv); + console.log('my liftoff config is:', this); +}; +MyApp.launch({ + cwd: argv.cwd, + configPath: argv.myappfile, + require: argv.require, + completion: argv.completion +}, invoke); +``` diff --git a/node_modules/liftoff/appveyor.yml b/node_modules/liftoff/appveyor.yml new file mode 100644 index 0000000..bcb6b74 --- /dev/null +++ b/node_modules/liftoff/appveyor.yml @@ -0,0 +1,29 @@ +# http://www.appveyor.com/docs/appveyor-yml +# http://www.appveyor.com/docs/lang/nodejs-iojs + +environment: + matrix: + # node.js + - nodejs_version: "0.10" + - nodejs_version: "0.12" + - nodejs_version: "4" + - nodejs_version: "5" + - nodejs_version: "6" + +install: + - IF %nodejs_version% EQU 0.10 npm -g install npm@2 + - IF %nodejs_version% EQU 0.10 set PATH=%APPDATA%\npm;%PATH% + - ps: Install-Product node $env:nodejs_version + - npm install + +test_script: + - node --version + - npm --version + # power shell + - ps: "npm test" + # standard command line + - cmd: npm test + +build: off + +version: "{build}" diff --git a/node_modules/liftoff/index.js b/node_modules/liftoff/index.js new file mode 100644 index 0000000..0c0a8d5 --- /dev/null +++ b/node_modules/liftoff/index.js @@ -0,0 +1,210 @@ +const fs = require('fs'); +const util = require('util'); +const path = require('path'); +const EE = require('events').EventEmitter; + +const extend = require('extend'); +const resolve = require('resolve'); +const flaggedRespawn = require('flagged-respawn'); +const isPlainObject = require('lodash.isplainobject'); +const mapValues = require('lodash.mapvalues'); +const fined = require('fined'); + +const findCwd = require('./lib/find_cwd'); +const findConfig = require('./lib/find_config'); +const fileSearch = require('./lib/file_search'); +const parseOptions = require('./lib/parse_options'); +const silentRequire = require('./lib/silent_require'); +const buildConfigName = require('./lib/build_config_name'); +const registerLoader = require('./lib/register_loader'); + + +function Liftoff (opts) { + EE.call(this); + extend(this, parseOptions(opts)); +} +util.inherits(Liftoff, EE); + +Liftoff.prototype.requireLocal = function (module, basedir) { + try { + var result = require(resolve.sync(module, {basedir: basedir})); + this.emit('require', module, result); + return result; + } catch (e) { + this.emit('requireFail', module, e); + } +}; + +Liftoff.prototype.buildEnvironment = function (opts) { + opts = opts || {}; + + // get modules we want to preload + var preload = opts.require || []; + + // ensure items to preload is an array + if (!Array.isArray(preload)) { + preload = [preload]; + } + + // make a copy of search paths that can be mutated for this run + var searchPaths = this.searchPaths.slice(); + + // calculate current cwd + var cwd = findCwd(opts); + + // if cwd was provided explicitly, only use it for searching config + if (opts.cwd) { + searchPaths = [cwd]; + } else { + // otherwise just search in cwd first + searchPaths.unshift(cwd); + } + + // calculate the regex to use for finding the config file + var configNameSearch = buildConfigName({ + configName: this.configName, + extensions: Object.keys(this.extensions) + }); + + // calculate configPath + var configPath = findConfig({ + configNameSearch: configNameSearch, + searchPaths: searchPaths, + configPath: opts.configPath + }); + + // if we have a config path, save the directory it resides in. + var configBase; + if (configPath) { + configBase = path.dirname(configPath); + // if cwd wasn't provided explicitly, it should match configBase + if (!opts.cwd) { + cwd = configBase; + } + // resolve symlink if needed + if (fs.lstatSync(configPath).isSymbolicLink()) { + configPath = fs.realpathSync(configPath); + } + } + + // TODO: break this out into lib/ + // locate local module and package next to config or explicitly provided cwd + var modulePath, modulePackage; + try { + var delim = (process.platform === 'win32' ? ';' : ':'), + paths = (process.env.NODE_PATH ? process.env.NODE_PATH.split(delim) : []); + modulePath = resolve.sync(this.moduleName, {basedir: configBase || cwd, paths: paths}); + modulePackage = silentRequire(fileSearch('package.json', [modulePath])); + } catch (e) {} + + // if we have a configuration but we failed to find a local module, maybe + // we are developing against ourselves? + if (!modulePath && configPath) { + // check the package.json sibling to our config to see if its `name` + // matches the module we're looking for + var modulePackagePath = fileSearch('package.json', [configBase]); + modulePackage = silentRequire(modulePackagePath); + if (modulePackage && modulePackage.name === this.moduleName) { + // if it does, our module path is `main` inside package.json + modulePath = path.join(path.dirname(modulePackagePath), modulePackage.main || 'index.js'); + cwd = configBase; + } else { + // clear if we just required a package for some other project + modulePackage = {}; + } + } + + // load any modules which were requested to be required + if (preload.length) { + // unique results first + preload.filter(function (value, index, self) { + return self.indexOf(value) === index; + }).forEach(function (dep) { + this.requireLocal(dep, findCwd(opts)); + }, this); + } + + var exts = this.extensions; + var eventEmitter = this; + registerLoader(eventEmitter, exts, configPath, cwd); + + var configFiles = {}; + if (isPlainObject(this.configFiles)) { + var notfound = { path: null }; + configFiles = mapValues(this.configFiles, function(prop, name) { + var defaultObj = { name: name, cwd: cwd, extensions: exts }; + return mapValues(prop, function(pathObj) { + var found = fined(pathObj, defaultObj) || notfound; + if (isPlainObject(found.extension)) { + registerLoader(eventEmitter, found.extension, found.path, cwd); + } + return found.path; + }); + }); + } + + return { + cwd: cwd, + require: preload, + configNameSearch: configNameSearch, + configPath: configPath, + configBase: configBase, + modulePath: modulePath, + modulePackage: modulePackage || {}, + configFiles: configFiles + }; +}; + +Liftoff.prototype.handleFlags = function (cb) { + if (typeof this.v8flags === 'function') { + this.v8flags(function (err, flags) { + if (err) { + cb(err); + } else { + cb(null, flags); + } + }); + } else { + process.nextTick(function () { + cb(null, this.v8flags); + }.bind(this)); + } +}; + +Liftoff.prototype.launch = function (opts, fn) { + if (typeof fn !== 'function') { + throw new Error('You must provide a callback function.'); + } + process.title = this.processTitle; + + var completion = opts.completion; + if (completion && this.completions) { + return this.completions(completion); + } + + this.handleFlags(function (err, flags) { + if (err) { + throw err; + } else { + if (flags) { + flaggedRespawn(flags, process.argv, function (ready, child) { + if (child !== process) { + this.emit('respawn', process.argv.filter(function (arg) { + var flag = arg.split('=')[0]; + return flags.indexOf(flag) !== -1; + }.bind(this)), child); + } + if (ready) { + fn.call(this, this.buildEnvironment(opts)); + } + }.bind(this)); + } else { + fn.call(this, this.buildEnvironment(opts)); + } + } + }.bind(this)); +}; + + + +module.exports = Liftoff; diff --git a/node_modules/liftoff/lib/build_config_name.js b/node_modules/liftoff/lib/build_config_name.js new file mode 100644 index 0000000..b83e185 --- /dev/null +++ b/node_modules/liftoff/lib/build_config_name.js @@ -0,0 +1,17 @@ +module.exports = function (opts) { + opts = opts || {}; + var configName = opts.configName; + var extensions = opts.extensions; + if (!configName) { + throw new Error('Please specify a configName.'); + } + if (configName instanceof RegExp) { + return [configName]; + } + if (!Array.isArray(extensions)) { + throw new Error('Please provide an array of valid extensions.'); + } + return extensions.map(function (ext) { + return configName + ext; + }); +}; diff --git a/node_modules/liftoff/lib/file_search.js b/node_modules/liftoff/lib/file_search.js new file mode 100644 index 0000000..76dadd6 --- /dev/null +++ b/node_modules/liftoff/lib/file_search.js @@ -0,0 +1,14 @@ +const findup = require('findup-sync'); + +module.exports = function (search, paths) { + var path; + var len = paths.length; + for (var i = 0; i < len; i++) { + if (path) { + break; + } else { + path = findup(search, {cwd: paths[i], nocase: true}); + } + } + return path; +}; diff --git a/node_modules/liftoff/lib/find_config.js b/node_modules/liftoff/lib/find_config.js new file mode 100644 index 0000000..71c3f07 --- /dev/null +++ b/node_modules/liftoff/lib/find_config.js @@ -0,0 +1,25 @@ +const fs = require('fs'); +const path = require('path'); +const fileSearch = require('./file_search'); + +module.exports = function (opts) { + opts = opts || {}; + var configNameSearch = opts.configNameSearch; + var configPath = opts.configPath; + var searchPaths = opts.searchPaths; + // only search for a config if a path to one wasn't explicitly provided + if (!configPath) { + if (!Array.isArray(searchPaths)) { + throw new Error('Please provide an array of paths to search for config in.'); + } + if (!configNameSearch) { + throw new Error('Please provide a configNameSearch.'); + } + configPath = fileSearch(configNameSearch, searchPaths); + } + // confirm the configPath exists and return an absolute path to it + if (fs.existsSync(configPath)) { + return path.resolve(configPath); + } + return null; +}; diff --git a/node_modules/liftoff/lib/find_cwd.js b/node_modules/liftoff/lib/find_cwd.js new file mode 100644 index 0000000..2a029b9 --- /dev/null +++ b/node_modules/liftoff/lib/find_cwd.js @@ -0,0 +1,18 @@ +const path = require('path'); + +module.exports = function (opts) { + if (!opts) { + opts = {}; + } + var cwd = opts.cwd; + var configPath = opts.configPath; + // if a path to the desired config was specified + // but no cwd was provided, use configPath dir + if (typeof configPath === 'string' && !cwd) { + cwd = path.dirname(path.resolve(configPath)); + } + if (typeof cwd === 'string') { + return path.resolve(cwd); + } + return process.cwd(); +}; diff --git a/node_modules/liftoff/lib/parse_options.js b/node_modules/liftoff/lib/parse_options.js new file mode 100644 index 0000000..ab416b5 --- /dev/null +++ b/node_modules/liftoff/lib/parse_options.js @@ -0,0 +1,35 @@ +const extend = require('extend'); + +module.exports = function (opts) { + var defaults = { + extensions: { + '.js': null, + '.json': null + }, + searchPaths: [] + }; + if (!opts) { + opts = {}; + } + if (opts.name) { + if (!opts.processTitle) { + opts.processTitle = opts.name; + } + if (!opts.configName) { + opts.configName = opts.name + 'file'; + } + if (!opts.moduleName) { + opts.moduleName = opts.name; + } + } + if (!opts.processTitle) { + throw new Error('You must specify a processTitle.'); + } + if (!opts.configName) { + throw new Error('You must specify a configName.'); + } + if (!opts.moduleName) { + throw new Error('You must specify a moduleName.'); + } + return extend(defaults, opts); +}; diff --git a/node_modules/liftoff/lib/register_loader.js b/node_modules/liftoff/lib/register_loader.js new file mode 100644 index 0000000..2b5f4cb --- /dev/null +++ b/node_modules/liftoff/lib/register_loader.js @@ -0,0 +1,25 @@ +const rechoir = require('rechoir'); +const isString = require('lodash.isstring'); + +module.exports = function(eventEmitter, extensions, configPath, cwd) { + extensions = extensions || {}; + + if (!isString(configPath)) { + return; + } + + var autoloads = rechoir.prepare(extensions, configPath, cwd, true); + if (autoloads instanceof Error) { + autoloads = autoloads.failures; + } + + if (Array.isArray(autoloads)) { + autoloads.forEach(function (attempt) { + if (attempt.error) { + eventEmitter.emit('requireFail', attempt.moduleName, attempt.error); + } else { + eventEmitter.emit('require', attempt.moduleName, attempt.module); + } + }); + } +}; diff --git a/node_modules/liftoff/lib/silent_require.js b/node_modules/liftoff/lib/silent_require.js new file mode 100644 index 0000000..7b4dfe4 --- /dev/null +++ b/node_modules/liftoff/lib/silent_require.js @@ -0,0 +1,5 @@ +module.exports = function (path) { + try { + return require(path); + } catch (e) {} +}; diff --git a/node_modules/liftoff/package.json b/node_modules/liftoff/package.json new file mode 100644 index 0000000..d4e44a5 --- /dev/null +++ b/node_modules/liftoff/package.json @@ -0,0 +1,120 @@ +{ + "_args": [ + [ + { + "raw": "liftoff@^2.1.0", + "scope": null, + "escapedName": "liftoff", + "name": "liftoff", + "rawSpec": "^2.1.0", + "spec": ">=2.1.0 <3.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/gulp" + ] + ], + "_from": "liftoff@>=2.1.0 <3.0.0", + "_id": "liftoff@2.3.0", + "_inCache": true, + "_location": "/liftoff", + "_nodeVersion": "0.10.41", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/liftoff-2.3.0.tgz_1469646196567_0.8871160212438554" + }, + "_npmUser": { + "name": "phated", + "email": "blaine.bublitz@gmail.com" + }, + "_npmVersion": "2.15.2", + "_phantomChildren": {}, + "_requested": { + "raw": "liftoff@^2.1.0", + "scope": null, + "escapedName": "liftoff", + "name": "liftoff", + "rawSpec": "^2.1.0", + "spec": ">=2.1.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/gulp" + ], + "_resolved": "https://registry.npmjs.org/liftoff/-/liftoff-2.3.0.tgz", + "_shasum": "a98f2ff67183d8ba7cfaca10548bd7ff0550b385", + "_shrinkwrap": null, + "_spec": "liftoff@^2.1.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/gulp", + "author": { + "name": "Tyler Kellen", + "url": "http://goingslowly.com/" + }, + "bugs": { + "url": "https://github.com/js-cli/js-liftoff/issues" + }, + "dependencies": { + "extend": "^3.0.0", + "findup-sync": "^0.4.2", + "fined": "^1.0.1", + "flagged-respawn": "^0.3.2", + "lodash.isplainobject": "^4.0.4", + "lodash.isstring": "^4.0.1", + "lodash.mapvalues": "^4.4.0", + "rechoir": "^0.6.2", + "resolve": "^1.1.7" + }, + "description": "Launch your command line tool with ease.", + "devDependencies": { + "chai": "^3.5.0", + "coffee-script": "^1.10.0", + "istanbul": "^0.4.3", + "jscs": "^2.11.0", + "jshint": "^2.9.2", + "mocha": "^2.4.5", + "sinon": "~1.17.4" + }, + "directories": {}, + "dist": { + "shasum": "a98f2ff67183d8ba7cfaca10548bd7ff0550b385", + "tarball": "https://registry.npmjs.org/liftoff/-/liftoff-2.3.0.tgz" + }, + "engines": { + "node": ">= 0.8" + }, + "gitHead": "be40ec3a3fa5854b4ab496a97f3d5877bf747b0b", + "homepage": "https://github.com/js-cli/js-liftoff", + "keywords": [ + "command line" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "jonschlinkert", + "email": "github@sellside.com" + }, + { + "name": "phated", + "email": "blaine.bublitz@gmail.com" + }, + { + "name": "tkellen", + "email": "tyler@sleekcode.net" + }, + { + "name": "tusbar", + "email": "bertrand.marron@gmail.com" + } + ], + "name": "liftoff", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/js-cli/js-liftoff.git" + }, + "scripts": { + "test": "jshint lib index.js && jscs lib index.js && mocha -t 5000 -b -R spec test/index" + }, + "version": "2.3.0" +} diff --git a/node_modules/load-json-file/index.js b/node_modules/load-json-file/index.js new file mode 100644 index 0000000..96d4d9f --- /dev/null +++ b/node_modules/load-json-file/index.js @@ -0,0 +1,21 @@ +'use strict'; +var path = require('path'); +var fs = require('graceful-fs'); +var stripBom = require('strip-bom'); +var parseJson = require('parse-json'); +var Promise = require('pinkie-promise'); +var pify = require('pify'); + +function parse(x, fp) { + return parseJson(stripBom(x), path.relative(process.cwd(), fp)); +} + +module.exports = function (fp) { + return pify(fs.readFile, Promise)(fp, 'utf8').then(function (data) { + return parse(data, fp); + }); +}; + +module.exports.sync = function (fp) { + return parse(fs.readFileSync(fp, 'utf8'), fp); +}; diff --git a/node_modules/load-json-file/license b/node_modules/load-json-file/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/load-json-file/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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. diff --git a/node_modules/load-json-file/node_modules/strip-bom/index.js b/node_modules/load-json-file/node_modules/strip-bom/index.js new file mode 100644 index 0000000..5695c5c --- /dev/null +++ b/node_modules/load-json-file/node_modules/strip-bom/index.js @@ -0,0 +1,17 @@ +'use strict'; +var isUtf8 = require('is-utf8'); + +module.exports = function (x) { + // Catches EFBBBF (UTF-8 BOM) because the buffer-to-string + // conversion translates it to FEFF (UTF-16 BOM) + if (typeof x === 'string' && x.charCodeAt(0) === 0xFEFF) { + return x.slice(1); + } + + if (Buffer.isBuffer(x) && isUtf8(x) && + x[0] === 0xEF && x[1] === 0xBB && x[2] === 0xBF) { + return x.slice(3); + } + + return x; +}; diff --git a/node_modules/load-json-file/node_modules/strip-bom/license b/node_modules/load-json-file/node_modules/strip-bom/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/load-json-file/node_modules/strip-bom/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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. diff --git a/node_modules/load-json-file/node_modules/strip-bom/package.json b/node_modules/load-json-file/node_modules/strip-bom/package.json new file mode 100644 index 0000000..d95d1c4 --- /dev/null +++ b/node_modules/load-json-file/node_modules/strip-bom/package.json @@ -0,0 +1,105 @@ +{ + "_args": [ + [ + { + "raw": "strip-bom@^2.0.0", + "scope": null, + "escapedName": "strip-bom", + "name": "strip-bom", + "rawSpec": "^2.0.0", + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/load-json-file" + ] + ], + "_from": "strip-bom@>=2.0.0 <3.0.0", + "_id": "strip-bom@2.0.0", + "_inCache": true, + "_location": "/load-json-file/strip-bom", + "_nodeVersion": "0.12.5", + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "2.11.2", + "_phantomChildren": {}, + "_requested": { + "raw": "strip-bom@^2.0.0", + "scope": null, + "escapedName": "strip-bom", + "name": "strip-bom", + "rawSpec": "^2.0.0", + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/load-json-file" + ], + "_resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "_shasum": "6219a85616520491f35788bdbf1447a99c7e6b0e", + "_shrinkwrap": null, + "_spec": "strip-bom@^2.0.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/load-json-file", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/strip-bom/issues" + }, + "dependencies": { + "is-utf8": "^0.2.0" + }, + "description": "Strip UTF-8 byte order mark (BOM) from a string/buffer", + "devDependencies": { + "mocha": "*" + }, + "directories": {}, + "dist": { + "shasum": "6219a85616520491f35788bdbf1447a99c7e6b0e", + "tarball": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "851b9c126dba9561cc14ef3dc2634dcc11df4d11", + "homepage": "https://github.com/sindresorhus/strip-bom", + "keywords": [ + "bom", + "strip", + "byte", + "mark", + "unicode", + "utf8", + "utf-8", + "remove", + "delete", + "trim", + "text", + "buffer", + "string" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "strip-bom", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/strip-bom.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "2.0.0" +} diff --git a/node_modules/load-json-file/node_modules/strip-bom/readme.md b/node_modules/load-json-file/node_modules/strip-bom/readme.md new file mode 100644 index 0000000..8ecf258 --- /dev/null +++ b/node_modules/load-json-file/node_modules/strip-bom/readme.md @@ -0,0 +1,39 @@ +# strip-bom [![Build Status](https://travis-ci.org/sindresorhus/strip-bom.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-bom) + +> Strip UTF-8 [byte order mark](http://en.wikipedia.org/wiki/Byte_order_mark#UTF-8) (BOM) from a string/buffer + +From Wikipedia: + +> The Unicode Standard permits the BOM in UTF-8, but does not require nor recommend its use. Byte order has no meaning in UTF-8. + + +## Install + +``` +$ npm install --save strip-bom +``` + + +## Usage + +```js +var fs = require('fs'); +var stripBom = require('strip-bom'); + +stripBom('\uFEFFunicorn'); +//=> 'unicorn' + +stripBom(fs.readFileSync('unicorn.txt')); +//=> 'unicorn' +``` + + +## Related + +- [strip-bom-cli](https://github.com/sindresorhus/strip-bom-cli) - CLI for this module +- [strip-bom-stream](https://github.com/sindresorhus/strip-bom-stream) - Stream version of this module + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/load-json-file/package.json b/node_modules/load-json-file/package.json new file mode 100644 index 0000000..0996bc8 --- /dev/null +++ b/node_modules/load-json-file/package.json @@ -0,0 +1,111 @@ +{ + "_args": [ + [ + { + "raw": "load-json-file@^1.0.0", + "scope": null, + "escapedName": "load-json-file", + "name": "load-json-file", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/read-pkg" + ] + ], + "_from": "load-json-file@>=1.0.0 <2.0.0", + "_id": "load-json-file@1.1.0", + "_inCache": true, + "_location": "/load-json-file", + "_nodeVersion": "4.2.1", + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "2.14.7", + "_phantomChildren": { + "is-utf8": "0.2.1" + }, + "_requested": { + "raw": "load-json-file@^1.0.0", + "scope": null, + "escapedName": "load-json-file", + "name": "load-json-file", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/read-pkg" + ], + "_resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "_shasum": "956905708d58b4bab4c2261b04f59f31c99374c0", + "_shrinkwrap": null, + "_spec": "load-json-file@^1.0.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/read-pkg", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/load-json-file/issues" + }, + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + }, + "description": "Read and parse a JSON file", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "956905708d58b4bab4c2261b04f59f31c99374c0", + "tarball": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "115157a417380d3160da418d4ff25bb33b0051eb", + "homepage": "https://github.com/sindresorhus/load-json-file", + "keywords": [ + "json", + "read", + "parse", + "file", + "fs", + "graceful", + "load" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "load-json-file", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/load-json-file.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.1.0", + "xo": { + "ignores": [ + "test.js" + ] + } +} diff --git a/node_modules/load-json-file/readme.md b/node_modules/load-json-file/readme.md new file mode 100644 index 0000000..fa982b5 --- /dev/null +++ b/node_modules/load-json-file/readme.md @@ -0,0 +1,45 @@ +# load-json-file [![Build Status](https://travis-ci.org/sindresorhus/load-json-file.svg?branch=master)](https://travis-ci.org/sindresorhus/load-json-file) + +> Read and parse a JSON file + +[Strips UTF-8 BOM](https://github.com/sindresorhus/strip-bom), uses [`graceful-fs`](https://github.com/isaacs/node-graceful-fs), and throws more [helpful JSON errors](https://github.com/sindresorhus/parse-json). + + +## Install + +``` +$ npm install --save load-json-file +``` + + +## Usage + +```js +const loadJsonFile = require('load-json-file'); + +loadJsonFile('foo.json').then(json => { + console.log(json); + //=> {foo: true} +}); +``` + + +## API + +### loadJsonFile(filepath) + +Returns a promise that resolves to the parsed JSON. + +### loadJsonFile.sync(filepath) + +Returns the parsed JSON. + + +## Related + +- [write-json-file](https://github.com/sindresorhus/write-json-file) - Stringify and write JSON to a file atomically + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/lodash._basecopy/LICENSE.txt b/node_modules/lodash._basecopy/LICENSE.txt new file mode 100644 index 0000000..9cd87e5 --- /dev/null +++ b/node_modules/lodash._basecopy/LICENSE.txt @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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. diff --git a/node_modules/lodash._basecopy/README.md b/node_modules/lodash._basecopy/README.md new file mode 100644 index 0000000..acdfa29 --- /dev/null +++ b/node_modules/lodash._basecopy/README.md @@ -0,0 +1,20 @@ +# lodash._basecopy v3.0.1 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseCopy` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._basecopy +``` + +In Node.js/io.js: + +```js +var baseCopy = require('lodash._basecopy'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash._basecopy) for more details. diff --git a/node_modules/lodash._basecopy/index.js b/node_modules/lodash._basecopy/index.js new file mode 100644 index 0000000..b586d31 --- /dev/null +++ b/node_modules/lodash._basecopy/index.js @@ -0,0 +1,32 @@ +/** + * lodash 3.0.1 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property names to copy. + * @param {Object} [object={}] The object to copy properties to. + * @returns {Object} Returns `object`. + */ +function baseCopy(source, props, object) { + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + object[key] = source[key]; + } + return object; +} + +module.exports = baseCopy; diff --git a/node_modules/lodash._basecopy/package.json b/node_modules/lodash._basecopy/package.json new file mode 100644 index 0000000..6e905ce --- /dev/null +++ b/node_modules/lodash._basecopy/package.json @@ -0,0 +1,123 @@ +{ + "_args": [ + [ + { + "raw": "lodash._basecopy@^3.0.0", + "scope": null, + "escapedName": "lodash._basecopy", + "name": "lodash._basecopy", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/lodash.template" + ] + ], + "_from": "lodash._basecopy@>=3.0.0 <4.0.0", + "_id": "lodash._basecopy@3.0.1", + "_inCache": true, + "_location": "/lodash._basecopy", + "_nodeVersion": "0.12.2", + "_npmUser": { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + "_npmVersion": "2.7.6", + "_phantomChildren": {}, + "_requested": { + "raw": "lodash._basecopy@^3.0.0", + "scope": null, + "escapedName": "lodash._basecopy", + "name": "lodash._basecopy", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/lodash.template" + ], + "_resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", + "_shasum": "8da0e6a876cf344c0ad8a54882111dd3c5c7ca36", + "_shrinkwrap": null, + "_spec": "lodash._basecopy@^3.0.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/lodash.template", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The modern build of lodash’s internal `baseCopy` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "8da0e6a876cf344c0ad8a54882111dd3c5c7ca36", + "tarball": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "d10", + "email": "demoneaux@gmail.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + } + ], + "name": "lodash._basecopy", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.0.1" +} diff --git a/node_modules/lodash._basetostring/LICENSE b/node_modules/lodash._basetostring/LICENSE new file mode 100644 index 0000000..9cd87e5 --- /dev/null +++ b/node_modules/lodash._basetostring/LICENSE @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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. diff --git a/node_modules/lodash._basetostring/README.md b/node_modules/lodash._basetostring/README.md new file mode 100644 index 0000000..f81145e --- /dev/null +++ b/node_modules/lodash._basetostring/README.md @@ -0,0 +1,20 @@ +# lodash._basetostring v3.0.1 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseToString` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._basetostring +``` + +In Node.js/io.js: + +```js +var baseToString = require('lodash._basetostring'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash._basetostring) for more details. diff --git a/node_modules/lodash._basetostring/index.js b/node_modules/lodash._basetostring/index.js new file mode 100644 index 0000000..db8ecc9 --- /dev/null +++ b/node_modules/lodash._basetostring/index.js @@ -0,0 +1,22 @@ +/** + * lodash 3.0.1 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * Converts `value` to a string if it's not one. An empty string is returned + * for `null` or `undefined` values. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + return value == null ? '' : (value + ''); +} + +module.exports = baseToString; diff --git a/node_modules/lodash._basetostring/package.json b/node_modules/lodash._basetostring/package.json new file mode 100644 index 0000000..7f85269 --- /dev/null +++ b/node_modules/lodash._basetostring/package.json @@ -0,0 +1,123 @@ +{ + "_args": [ + [ + { + "raw": "lodash._basetostring@^3.0.0", + "scope": null, + "escapedName": "lodash._basetostring", + "name": "lodash._basetostring", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/lodash.template" + ] + ], + "_from": "lodash._basetostring@>=3.0.0 <4.0.0", + "_id": "lodash._basetostring@3.0.1", + "_inCache": true, + "_location": "/lodash._basetostring", + "_nodeVersion": "0.12.5", + "_npmUser": { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + "_npmVersion": "2.12.0", + "_phantomChildren": {}, + "_requested": { + "raw": "lodash._basetostring@^3.0.0", + "scope": null, + "escapedName": "lodash._basetostring", + "name": "lodash._basetostring", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/lodash.template" + ], + "_resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz", + "_shasum": "d1861d877f824a52f669832dcaf3ee15566a07d5", + "_shrinkwrap": null, + "_spec": "lodash._basetostring@^3.0.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/lodash.template", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The modern build of lodash’s internal `baseToString` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "d1861d877f824a52f669832dcaf3ee15566a07d5", + "tarball": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "d10", + "email": "demoneaux@gmail.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + } + ], + "name": "lodash._basetostring", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.0.1" +} diff --git a/node_modules/lodash._basevalues/LICENSE.txt b/node_modules/lodash._basevalues/LICENSE.txt new file mode 100644 index 0000000..1776432 --- /dev/null +++ b/node_modules/lodash._basevalues/LICENSE.txt @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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. diff --git a/node_modules/lodash._basevalues/README.md b/node_modules/lodash._basevalues/README.md new file mode 100644 index 0000000..206ba71 --- /dev/null +++ b/node_modules/lodash._basevalues/README.md @@ -0,0 +1,20 @@ +# lodash._basevalues v3.0.0 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseValues` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._basevalues +``` + +In Node.js/io.js: + +```js +var baseValues = require('lodash._basevalues'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash._basevalues) for more details. diff --git a/node_modules/lodash._basevalues/index.js b/node_modules/lodash._basevalues/index.js new file mode 100644 index 0000000..28c8215 --- /dev/null +++ b/node_modules/lodash._basevalues/index.js @@ -0,0 +1,31 @@ +/** + * lodash 3.0.0 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.7.0 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * returned by `keysFunc`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ +function baseValues(object, props) { + var index = -1, + length = props.length, + result = Array(length); + + while (++index < length) { + result[index] = object[props[index]]; + } + return result; +} + +module.exports = baseValues; diff --git a/node_modules/lodash._basevalues/package.json b/node_modules/lodash._basevalues/package.json new file mode 100644 index 0000000..0140173 --- /dev/null +++ b/node_modules/lodash._basevalues/package.json @@ -0,0 +1,107 @@ +{ + "_args": [ + [ + { + "raw": "lodash._basevalues@^3.0.0", + "scope": null, + "escapedName": "lodash._basevalues", + "name": "lodash._basevalues", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/lodash.template" + ] + ], + "_from": "lodash._basevalues@>=3.0.0 <4.0.0", + "_id": "lodash._basevalues@3.0.0", + "_inCache": true, + "_location": "/lodash._basevalues", + "_nodeVersion": "0.10.35", + "_npmUser": { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + "_npmVersion": "2.3.0", + "_phantomChildren": {}, + "_requested": { + "raw": "lodash._basevalues@^3.0.0", + "scope": null, + "escapedName": "lodash._basevalues", + "name": "lodash._basevalues", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/lodash.template" + ], + "_resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz", + "_shasum": "5b775762802bde3d3297503e26300820fdf661b7", + "_shrinkwrap": null, + "_spec": "lodash._basevalues@^3.0.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/lodash.template", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The modern build of lodash’s internal `baseValues` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "5b775762802bde3d3297503e26300820fdf661b7", + "tarball": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + } + ], + "name": "lodash._basevalues", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.0.0" +} diff --git a/node_modules/lodash._getnative/LICENSE b/node_modules/lodash._getnative/LICENSE new file mode 100644 index 0000000..9cd87e5 --- /dev/null +++ b/node_modules/lodash._getnative/LICENSE @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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. diff --git a/node_modules/lodash._getnative/README.md b/node_modules/lodash._getnative/README.md new file mode 100644 index 0000000..7835cec --- /dev/null +++ b/node_modules/lodash._getnative/README.md @@ -0,0 +1,20 @@ +# lodash._getnative v3.9.1 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `getNative` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._getnative +``` + +In Node.js/io.js: + +```js +var getNative = require('lodash._getnative'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/3.9.1-npm-packages/lodash._getnative) for more details. diff --git a/node_modules/lodash._getnative/index.js b/node_modules/lodash._getnative/index.js new file mode 100644 index 0000000..a32063d --- /dev/null +++ b/node_modules/lodash._getnative/index.js @@ -0,0 +1,137 @@ +/** + * lodash 3.9.1 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** `Object#toString` result references. */ +var funcTag = '[object Function]'; + +/** Used to detect host constructors (Safari > 5). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var fnToString = Function.prototype.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = object == null ? undefined : object[key]; + return isNative(value) ? value : undefined; +} + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in older versions of Chrome and Safari which return 'function' for regexes + // and Safari 8 equivalents which return 'object' for typed array constructors. + return isObject(value) && objToString.call(value) == funcTag; +} + +/** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ +function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is a native function. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ +function isNative(value) { + if (value == null) { + return false; + } + if (isFunction(value)) { + return reIsNative.test(fnToString.call(value)); + } + return isObjectLike(value) && reIsHostCtor.test(value); +} + +module.exports = getNative; diff --git a/node_modules/lodash._getnative/package.json b/node_modules/lodash._getnative/package.json new file mode 100644 index 0000000..558736a --- /dev/null +++ b/node_modules/lodash._getnative/package.json @@ -0,0 +1,119 @@ +{ + "_args": [ + [ + { + "raw": "lodash._getnative@^3.0.0", + "scope": null, + "escapedName": "lodash._getnative", + "name": "lodash._getnative", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/lodash.keys" + ] + ], + "_from": "lodash._getnative@>=3.0.0 <4.0.0", + "_id": "lodash._getnative@3.9.1", + "_inCache": true, + "_location": "/lodash._getnative", + "_nodeVersion": "0.12.5", + "_npmUser": { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + "_npmVersion": "2.12.0", + "_phantomChildren": {}, + "_requested": { + "raw": "lodash._getnative@^3.0.0", + "scope": null, + "escapedName": "lodash._getnative", + "name": "lodash._getnative", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/lodash.keys" + ], + "_resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", + "_shasum": "570bc7dede46d61cdcde687d65d3eecbaa3aaff5", + "_shrinkwrap": null, + "_spec": "lodash._getnative@^3.0.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/lodash.keys", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The modern build of lodash’s internal `getNative` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "570bc7dede46d61cdcde687d65d3eecbaa3aaff5", + "tarball": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + } + ], + "name": "lodash._getnative", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.9.1" +} diff --git a/node_modules/lodash._isiterateecall/LICENSE.txt b/node_modules/lodash._isiterateecall/LICENSE.txt new file mode 100644 index 0000000..9cd87e5 --- /dev/null +++ b/node_modules/lodash._isiterateecall/LICENSE.txt @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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. diff --git a/node_modules/lodash._isiterateecall/README.md b/node_modules/lodash._isiterateecall/README.md new file mode 100644 index 0000000..0c5c701 --- /dev/null +++ b/node_modules/lodash._isiterateecall/README.md @@ -0,0 +1,20 @@ +# lodash._isiterateecall v3.0.9 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `isIterateeCall` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._isiterateecall +``` + +In Node.js/io.js: + +```js +var isIterateeCall = require('lodash._isiterateecall'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/3.0.9-npm-packages/lodash._isiterateecall) for more details. diff --git a/node_modules/lodash._isiterateecall/index.js b/node_modules/lodash._isiterateecall/index.js new file mode 100644 index 0000000..ea3761b --- /dev/null +++ b/node_modules/lodash._isiterateecall/index.js @@ -0,0 +1,132 @@ +/** + * lodash 3.0.9 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** Used to detect unsigned integer values. */ +var reIsUint = /^\d+$/; + +/** + * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) + * of an array-like value. + */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; +} + +/** + * Gets the "length" property value of `object`. + * + * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) + * that affects Safari on at least iOS 8.1-8.3 ARM64. + * + * @private + * @param {Object} object The object to query. + * @returns {*} Returns the "length" value. + */ +var getLength = baseProperty('length'); + +/** + * Checks if `value` is array-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + */ +function isArrayLike(value) { + return value != null && isLength(getLength(value)); +} + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; + length = length == null ? MAX_SAFE_INTEGER : length; + return value > -1 && value % 1 == 0 && value < length; +} + +/** + * Checks if the provided arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`. + */ +function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object)) { + var other = object[index]; + return value === value ? (value === other) : (other !== other); + } + return false; +} + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ +function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +/** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ +function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +module.exports = isIterateeCall; diff --git a/node_modules/lodash._isiterateecall/package.json b/node_modules/lodash._isiterateecall/package.json new file mode 100644 index 0000000..5a026a6 --- /dev/null +++ b/node_modules/lodash._isiterateecall/package.json @@ -0,0 +1,123 @@ +{ + "_args": [ + [ + { + "raw": "lodash._isiterateecall@^3.0.0", + "scope": null, + "escapedName": "lodash._isiterateecall", + "name": "lodash._isiterateecall", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/lodash.template" + ] + ], + "_from": "lodash._isiterateecall@>=3.0.0 <4.0.0", + "_id": "lodash._isiterateecall@3.0.9", + "_inCache": true, + "_location": "/lodash._isiterateecall", + "_nodeVersion": "2.0.2", + "_npmUser": { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + "_npmVersion": "2.10.1", + "_phantomChildren": {}, + "_requested": { + "raw": "lodash._isiterateecall@^3.0.0", + "scope": null, + "escapedName": "lodash._isiterateecall", + "name": "lodash._isiterateecall", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/lodash.template" + ], + "_resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", + "_shasum": "5203ad7ba425fae842460e696db9cf3e6aac057c", + "_shrinkwrap": null, + "_spec": "lodash._isiterateecall@^3.0.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/lodash.template", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The modern build of lodash’s internal `isIterateeCall` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "5203ad7ba425fae842460e696db9cf3e6aac057c", + "tarball": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "d10", + "email": "demoneaux@gmail.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + } + ], + "name": "lodash._isiterateecall", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.0.9" +} diff --git a/node_modules/lodash._reescape/LICENSE.txt b/node_modules/lodash._reescape/LICENSE.txt new file mode 100644 index 0000000..1776432 --- /dev/null +++ b/node_modules/lodash._reescape/LICENSE.txt @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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. diff --git a/node_modules/lodash._reescape/README.md b/node_modules/lodash._reescape/README.md new file mode 100644 index 0000000..c80ae07 --- /dev/null +++ b/node_modules/lodash._reescape/README.md @@ -0,0 +1,20 @@ +# lodash._reescape v3.0.0 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `reEscape` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._reescape +``` + +In Node.js/io.js: + +```js +var reEscape = require('lodash._reescape'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash._reescape) for more details. diff --git a/node_modules/lodash._reescape/index.js b/node_modules/lodash._reescape/index.js new file mode 100644 index 0000000..1a3b8cf --- /dev/null +++ b/node_modules/lodash._reescape/index.js @@ -0,0 +1,13 @@ +/** + * lodash 3.0.0 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.7.0 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** Used to match template delimiters. */ +var reEscape = /<%-([\s\S]+?)%>/g; + +module.exports = reEscape; diff --git a/node_modules/lodash._reescape/package.json b/node_modules/lodash._reescape/package.json new file mode 100644 index 0000000..9d58c34 --- /dev/null +++ b/node_modules/lodash._reescape/package.json @@ -0,0 +1,107 @@ +{ + "_args": [ + [ + { + "raw": "lodash._reescape@^3.0.0", + "scope": null, + "escapedName": "lodash._reescape", + "name": "lodash._reescape", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/gulp-util" + ] + ], + "_from": "lodash._reescape@>=3.0.0 <4.0.0", + "_id": "lodash._reescape@3.0.0", + "_inCache": true, + "_location": "/lodash._reescape", + "_nodeVersion": "0.10.35", + "_npmUser": { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + "_npmVersion": "2.3.0", + "_phantomChildren": {}, + "_requested": { + "raw": "lodash._reescape@^3.0.0", + "scope": null, + "escapedName": "lodash._reescape", + "name": "lodash._reescape", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/gulp-util" + ], + "_resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz", + "_shasum": "2b1d6f5dfe07c8a355753e5f27fac7f1cde1616a", + "_shrinkwrap": null, + "_spec": "lodash._reescape@^3.0.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/gulp-util", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The modern build of lodash’s internal `reEscape` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "2b1d6f5dfe07c8a355753e5f27fac7f1cde1616a", + "tarball": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + } + ], + "name": "lodash._reescape", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.0.0" +} diff --git a/node_modules/lodash._reevaluate/LICENSE.txt b/node_modules/lodash._reevaluate/LICENSE.txt new file mode 100644 index 0000000..1776432 --- /dev/null +++ b/node_modules/lodash._reevaluate/LICENSE.txt @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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. diff --git a/node_modules/lodash._reevaluate/README.md b/node_modules/lodash._reevaluate/README.md new file mode 100644 index 0000000..a69b8aa --- /dev/null +++ b/node_modules/lodash._reevaluate/README.md @@ -0,0 +1,20 @@ +# lodash._reevaluate v3.0.0 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `reEvaluate` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._reevaluate +``` + +In Node.js/io.js: + +```js +var reEvaluate = require('lodash._reevaluate'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash._reevaluate) for more details. diff --git a/node_modules/lodash._reevaluate/index.js b/node_modules/lodash._reevaluate/index.js new file mode 100644 index 0000000..16d7609 --- /dev/null +++ b/node_modules/lodash._reevaluate/index.js @@ -0,0 +1,13 @@ +/** + * lodash 3.0.0 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.7.0 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** Used to match template delimiters. */ +var reEvaluate = /<%([\s\S]+?)%>/g; + +module.exports = reEvaluate; diff --git a/node_modules/lodash._reevaluate/package.json b/node_modules/lodash._reevaluate/package.json new file mode 100644 index 0000000..b2c8280 --- /dev/null +++ b/node_modules/lodash._reevaluate/package.json @@ -0,0 +1,107 @@ +{ + "_args": [ + [ + { + "raw": "lodash._reevaluate@^3.0.0", + "scope": null, + "escapedName": "lodash._reevaluate", + "name": "lodash._reevaluate", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/gulp-util" + ] + ], + "_from": "lodash._reevaluate@>=3.0.0 <4.0.0", + "_id": "lodash._reevaluate@3.0.0", + "_inCache": true, + "_location": "/lodash._reevaluate", + "_nodeVersion": "0.10.35", + "_npmUser": { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + "_npmVersion": "2.3.0", + "_phantomChildren": {}, + "_requested": { + "raw": "lodash._reevaluate@^3.0.0", + "scope": null, + "escapedName": "lodash._reevaluate", + "name": "lodash._reevaluate", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/gulp-util" + ], + "_resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz", + "_shasum": "58bc74c40664953ae0b124d806996daca431e2ed", + "_shrinkwrap": null, + "_spec": "lodash._reevaluate@^3.0.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/gulp-util", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The modern build of lodash’s internal `reEvaluate` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "58bc74c40664953ae0b124d806996daca431e2ed", + "tarball": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + } + ], + "name": "lodash._reevaluate", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.0.0" +} diff --git a/node_modules/lodash._reinterpolate/LICENSE.txt b/node_modules/lodash._reinterpolate/LICENSE.txt new file mode 100644 index 0000000..1776432 --- /dev/null +++ b/node_modules/lodash._reinterpolate/LICENSE.txt @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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. diff --git a/node_modules/lodash._reinterpolate/README.md b/node_modules/lodash._reinterpolate/README.md new file mode 100644 index 0000000..1423e50 --- /dev/null +++ b/node_modules/lodash._reinterpolate/README.md @@ -0,0 +1,20 @@ +# lodash._reinterpolate v3.0.0 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `reInterpolate` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._reinterpolate +``` + +In Node.js/io.js: + +```js +var reInterpolate = require('lodash._reinterpolate'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash._reinterpolate) for more details. diff --git a/node_modules/lodash._reinterpolate/index.js b/node_modules/lodash._reinterpolate/index.js new file mode 100644 index 0000000..5c06abc --- /dev/null +++ b/node_modules/lodash._reinterpolate/index.js @@ -0,0 +1,13 @@ +/** + * lodash 3.0.0 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.7.0 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** Used to match template delimiters. */ +var reInterpolate = /<%=([\s\S]+?)%>/g; + +module.exports = reInterpolate; diff --git a/node_modules/lodash._reinterpolate/package.json b/node_modules/lodash._reinterpolate/package.json new file mode 100644 index 0000000..15f6a0a --- /dev/null +++ b/node_modules/lodash._reinterpolate/package.json @@ -0,0 +1,121 @@ +{ + "_args": [ + [ + { + "raw": "lodash._reinterpolate@^3.0.0", + "scope": null, + "escapedName": "lodash._reinterpolate", + "name": "lodash._reinterpolate", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/gulp-util" + ] + ], + "_from": "lodash._reinterpolate@>=3.0.0 <4.0.0", + "_id": "lodash._reinterpolate@3.0.0", + "_inCache": true, + "_location": "/lodash._reinterpolate", + "_nodeVersion": "0.10.35", + "_npmUser": { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + "_npmVersion": "2.3.0", + "_phantomChildren": {}, + "_requested": { + "raw": "lodash._reinterpolate@^3.0.0", + "scope": null, + "escapedName": "lodash._reinterpolate", + "name": "lodash._reinterpolate", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/gulp-util", + "/lodash.template", + "/lodash.templatesettings" + ], + "_resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "_shasum": "0ccf2d89166af03b3663c796538b75ac6e114d9d", + "_shrinkwrap": null, + "_spec": "lodash._reinterpolate@^3.0.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/gulp-util", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The modern build of lodash’s internal `reInterpolate` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "0ccf2d89166af03b3663c796538b75ac6e114d9d", + "tarball": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + } + ], + "name": "lodash._reinterpolate", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.0.0" +} diff --git a/node_modules/lodash._root/LICENSE b/node_modules/lodash._root/LICENSE new file mode 100644 index 0000000..bcbe13d --- /dev/null +++ b/node_modules/lodash._root/LICENSE @@ -0,0 +1,23 @@ +The MIT License (MIT) + +Copyright 2012-2016 The Dojo Foundation +Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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. diff --git a/node_modules/lodash._root/README.md b/node_modules/lodash._root/README.md new file mode 100644 index 0000000..0329abf --- /dev/null +++ b/node_modules/lodash._root/README.md @@ -0,0 +1,18 @@ +# lodash._root v3.0.1 + +The internal [lodash](https://lodash.com/) function `root` exported as a [Node.js](https://nodejs.org/) module. + +## Installation + +Using npm: +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._root +``` + +In Node.js: +```js +var root = require('lodash._root'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash._root) for more details. diff --git a/node_modules/lodash._root/index.js b/node_modules/lodash._root/index.js new file mode 100644 index 0000000..2d8ba0a --- /dev/null +++ b/node_modules/lodash._root/index.js @@ -0,0 +1,59 @@ +/** + * lodash 3.0.1 (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright 2012-2016 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** Used to determine if values are of the language type `Object`. */ +var objectTypes = { + 'function': true, + 'object': true +}; + +/** Detect free variable `exports`. */ +var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) + ? exports + : undefined; + +/** Detect free variable `module`. */ +var freeModule = (objectTypes[typeof module] && module && !module.nodeType) + ? module + : undefined; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global); + +/** Detect free variable `self`. */ +var freeSelf = checkGlobal(objectTypes[typeof self] && self); + +/** Detect free variable `window`. */ +var freeWindow = checkGlobal(objectTypes[typeof window] && window); + +/** Detect `this` as the global object. */ +var thisGlobal = checkGlobal(objectTypes[typeof this] && this); + +/** + * Used as a reference to the global object. + * + * The `this` value is used if it's the global object to avoid Greasemonkey's + * restricted `window` object, otherwise the `window` object is used. + */ +var root = freeGlobal || + ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || + freeSelf || thisGlobal || Function('return this')(); + +/** + * Checks if `value` is a global object. + * + * @private + * @param {*} value The value to check. + * @returns {null|Object} Returns `value` if it's a global object, else `null`. + */ +function checkGlobal(value) { + return (value && value.Object === Object) ? value : null; +} + +module.exports = root; diff --git a/node_modules/lodash._root/package.json b/node_modules/lodash._root/package.json new file mode 100644 index 0000000..2e6b10b --- /dev/null +++ b/node_modules/lodash._root/package.json @@ -0,0 +1,109 @@ +{ + "_args": [ + [ + { + "raw": "lodash._root@^3.0.0", + "scope": null, + "escapedName": "lodash._root", + "name": "lodash._root", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/lodash.escape" + ] + ], + "_from": "lodash._root@>=3.0.0 <4.0.0", + "_id": "lodash._root@3.0.1", + "_inCache": true, + "_location": "/lodash._root", + "_nodeVersion": "5.5.0", + "_npmOperationalInternal": { + "host": "packages-6-west.internal.npmjs.com", + "tmp": "tmp/lodash._root-3.0.1.tgz_1455615057559_0.24128212919458747" + }, + "_npmUser": { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + "_npmVersion": "2.14.18", + "_phantomChildren": {}, + "_requested": { + "raw": "lodash._root@^3.0.0", + "scope": null, + "escapedName": "lodash._root", + "name": "lodash._root", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/lodash.escape" + ], + "_resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz", + "_shasum": "fba1c4524c19ee9a5f8136b4609f017cf4ded692", + "_shrinkwrap": null, + "_spec": "lodash._root@^3.0.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/lodash.escape", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "https://github.com/phated" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The internal lodash function `root` exported as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "fba1c4524c19ee9a5f8136b4609f017cf4ded692", + "tarball": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine.bublitz@gmail.com" + } + ], + "name": "lodash._root", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.0.1" +} diff --git a/node_modules/lodash.assignwith/LICENSE b/node_modules/lodash.assignwith/LICENSE new file mode 100644 index 0000000..e0c69d5 --- /dev/null +++ b/node_modules/lodash.assignwith/LICENSE @@ -0,0 +1,47 @@ +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +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. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/node_modules/lodash.assignwith/README.md b/node_modules/lodash.assignwith/README.md new file mode 100644 index 0000000..026191e --- /dev/null +++ b/node_modules/lodash.assignwith/README.md @@ -0,0 +1,18 @@ +# lodash.assignwith v4.2.0 + +The [lodash](https://lodash.com/) method `_.assignWith` exported as a [Node.js](https://nodejs.org/) module. + +## Installation + +Using npm: +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.assignwith +``` + +In Node.js: +```js +var assignWith = require('lodash.assignwith'); +``` + +See the [documentation](https://lodash.com/docs#assignWith) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.assignwith) for more details. diff --git a/node_modules/lodash.assignwith/index.js b/node_modules/lodash.assignwith/index.js new file mode 100644 index 0000000..921dfce --- /dev/null +++ b/node_modules/lodash.assignwith/index.js @@ -0,0 +1,622 @@ +/** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]'; + +/** Used to detect unsigned integer values. */ +var reIsUint = /^(?:0|[1-9]\d*)$/; + +/** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ +function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); +} + +/** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ +function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; +} + +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeKeys = overArg(Object.keys, Object), + nativeMax = Math.max; + +/** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ +function arrayLikeKeys(value, inherited) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + // Safari 9 makes `arguments.length` enumerable in strict mode. + var result = (isArray(value) || isArguments(value)) + ? baseTimes(value.length, String) + : []; + + var length = result.length, + skipIndexes = !!length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && (key == 'length' || isIndex(key, length)))) { + result.push(key); + } + } + return result; +} + +/** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + object[key] = value; + } +} + +/** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; +} + +/** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ +function baseRest(func, start) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = array; + return apply(func, this, otherArgs); + }; +} + +/** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ +function copyObject(source, props, object, customizer) { + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + assignValue(object, key, newValue === undefined ? source[key] : newValue); + } + return object; +} + +/** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ +function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); +} + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && + (typeof value == 'number' || reIsUint.test(value)) && + (value > -1 && value % 1 == 0 && value < length); +} + +/** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ +function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; +} + +/** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ +function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; +} + +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +/** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +function isArguments(value) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && + (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); +} + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +/** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ +function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); +} + +/** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ +function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); +} + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; +} + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * This method is like `_.assign` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignInWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ +var assignWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keys(source), object, customizer); +}); + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); +} + +module.exports = assignWith; diff --git a/node_modules/lodash.assignwith/package.json b/node_modules/lodash.assignwith/package.json new file mode 100644 index 0000000..d2b0a16 --- /dev/null +++ b/node_modules/lodash.assignwith/package.json @@ -0,0 +1,113 @@ +{ + "_args": [ + [ + { + "raw": "lodash.assignwith@^4.0.7", + "scope": null, + "escapedName": "lodash.assignwith", + "name": "lodash.assignwith", + "rawSpec": "^4.0.7", + "spec": ">=4.0.7 <5.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/fined" + ] + ], + "_from": "lodash.assignwith@>=4.0.7 <5.0.0", + "_id": "lodash.assignwith@4.2.0", + "_inCache": true, + "_location": "/lodash.assignwith", + "_nodeVersion": "4.4.7", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/lodash.assignwith-4.2.0.tgz_1471109805358_0.5188975257333368" + }, + "_npmUser": { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + "_npmVersion": "2.15.10", + "_phantomChildren": {}, + "_requested": { + "raw": "lodash.assignwith@^4.0.7", + "scope": null, + "escapedName": "lodash.assignwith", + "name": "lodash.assignwith", + "rawSpec": "^4.0.7", + "spec": ">=4.0.7 <5.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fined" + ], + "_resolved": "https://registry.npmjs.org/lodash.assignwith/-/lodash.assignwith-4.2.0.tgz", + "_shasum": "127a97f02adc41751a954d24b0de17e100e038eb", + "_shrinkwrap": null, + "_spec": "lodash.assignwith@^4.0.7", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/fined", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine.bublitz@gmail.com", + "url": "https://github.com/phated" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The lodash method `_.assignWith` exported as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "127a97f02adc41751a954d24b0de17e100e038eb", + "tarball": "https://registry.npmjs.org/lodash.assignwith/-/lodash.assignwith-4.2.0.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "keywords": [ + "lodash-modularized", + "assignwith" + ], + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine.bublitz@gmail.com" + } + ], + "name": "lodash.assignwith", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "4.2.0" +} diff --git a/node_modules/lodash.escape/LICENSE b/node_modules/lodash.escape/LICENSE new file mode 100644 index 0000000..b054ca5 --- /dev/null +++ b/node_modules/lodash.escape/LICENSE @@ -0,0 +1,22 @@ +Copyright 2012-2016 The Dojo Foundation +Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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. diff --git a/node_modules/lodash.escape/README.md b/node_modules/lodash.escape/README.md new file mode 100644 index 0000000..b012def --- /dev/null +++ b/node_modules/lodash.escape/README.md @@ -0,0 +1,18 @@ +# lodash.escape v3.2.0 + +The [lodash](https://lodash.com/) method `_.escape` exported as a [Node.js](https://nodejs.org/) module. + +## Installation + +Using npm: +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.escape +``` + +In Node.js: +```js +var escape = require('lodash.escape'); +``` + +See the [documentation](https://lodash.com/docs#escape) or [package source](https://github.com/lodash/lodash/blob/3.2.0-npm-packages/lodash.escape) for more details. diff --git a/node_modules/lodash.escape/index.js b/node_modules/lodash.escape/index.js new file mode 100644 index 0000000..0971ae8 --- /dev/null +++ b/node_modules/lodash.escape/index.js @@ -0,0 +1,180 @@ +/** + * lodash 3.2.0 (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright 2012-2016 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var root = require('lodash._root'); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** Used to match HTML entities and HTML characters. */ +var reUnescapedHtml = /[&<>"'`]/g, + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + +/** Used to map characters to HTML entities. */ +var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + '`': '`' +}; + +/** + * Used by `_.escape` to convert characters to HTML entities. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ +function escapeHtmlChar(chr) { + return htmlEscapes[chr]; +} + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Built-in value references. */ +var Symbol = root.Symbol; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = Symbol ? symbolProto.toString : undefined; + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); +} + +/** + * Converts `value` to a string if it's not one. An empty string is returned + * for `null` and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to process. + * @returns {string} Returns the string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ +function toString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (value == null) { + return ''; + } + if (isSymbol(value)) { + return Symbol ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/** + * Converts the characters "&", "<", ">", '"', "'", and "\`" in `string` to + * their corresponding HTML entities. + * + * **Note:** No other characters are escaped. To escape additional + * characters use a third-party library like [_he_](https://mths.be/he). + * + * Though the ">" character is escaped for symmetry, characters like + * ">" and "/" don't need escaping in HTML and have no special meaning + * unless they're part of a tag or unquoted attribute value. + * See [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) + * (under "semi-related fun fact") for more details. + * + * Backticks are escaped because in IE < 9, they can break out of + * attribute values or HTML comments. See [#59](https://html5sec.org/#59), + * [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and + * [#133](https://html5sec.org/#133) of the [HTML5 Security Cheatsheet](https://html5sec.org/) + * for more details. + * + * When working with HTML you should always [quote attribute values](http://wonko.com/post/html-escaping) + * to reduce XSS vectors. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ +function escape(string) { + string = toString(string); + return (string && reHasUnescapedHtml.test(string)) + ? string.replace(reUnescapedHtml, escapeHtmlChar) + : string; +} + +module.exports = escape; diff --git a/node_modules/lodash.escape/package.json b/node_modules/lodash.escape/package.json new file mode 100644 index 0000000..dd588d8 --- /dev/null +++ b/node_modules/lodash.escape/package.json @@ -0,0 +1,116 @@ +{ + "_args": [ + [ + { + "raw": "lodash.escape@^3.0.0", + "scope": null, + "escapedName": "lodash.escape", + "name": "lodash.escape", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/lodash.template" + ] + ], + "_from": "lodash.escape@>=3.0.0 <4.0.0", + "_id": "lodash.escape@3.2.0", + "_inCache": true, + "_location": "/lodash.escape", + "_nodeVersion": "5.5.0", + "_npmOperationalInternal": { + "host": "packages-9-west.internal.npmjs.com", + "tmp": "tmp/lodash.escape-3.2.0.tgz_1454898355271_0.9197692747693509" + }, + "_npmUser": { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + "_npmVersion": "2.14.18", + "_phantomChildren": {}, + "_requested": { + "raw": "lodash.escape@^3.0.0", + "scope": null, + "escapedName": "lodash.escape", + "name": "lodash.escape", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/lodash.template", + "/lodash.templatesettings" + ], + "_resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", + "_shasum": "995ee0dc18c1b48cc92effae71a10aab5b487698", + "_shrinkwrap": null, + "_spec": "lodash.escape@^3.0.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/lodash.template", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "https://github.com/phated" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": { + "lodash._root": "^3.0.0" + }, + "description": "The lodash method `_.escape` exported as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "995ee0dc18c1b48cc92effae71a10aab5b487698", + "tarball": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "keywords": [ + "lodash-modularized", + "escape" + ], + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + } + ], + "name": "lodash.escape", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.2.0" +} diff --git a/node_modules/lodash.isarguments/LICENSE b/node_modules/lodash.isarguments/LICENSE new file mode 100644 index 0000000..e0c69d5 --- /dev/null +++ b/node_modules/lodash.isarguments/LICENSE @@ -0,0 +1,47 @@ +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +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. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/node_modules/lodash.isarguments/README.md b/node_modules/lodash.isarguments/README.md new file mode 100644 index 0000000..eb95fe1 --- /dev/null +++ b/node_modules/lodash.isarguments/README.md @@ -0,0 +1,18 @@ +# lodash.isarguments v3.1.0 + +The [lodash](https://lodash.com/) method `_.isArguments` exported as a [Node.js](https://nodejs.org/) module. + +## Installation + +Using npm: +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.isarguments +``` + +In Node.js: +```js +var isArguments = require('lodash.isarguments'); +``` + +See the [documentation](https://lodash.com/docs#isArguments) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.isarguments) for more details. diff --git a/node_modules/lodash.isarguments/index.js b/node_modules/lodash.isarguments/index.js new file mode 100644 index 0000000..042dac5 --- /dev/null +++ b/node_modules/lodash.isarguments/index.js @@ -0,0 +1,229 @@ +/** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]'; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +function isArguments(value) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && + (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); +} + +/** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ +function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); +} + +/** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ +function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); +} + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; +} + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +module.exports = isArguments; diff --git a/node_modules/lodash.isarguments/package.json b/node_modules/lodash.isarguments/package.json new file mode 100644 index 0000000..6bb34c5 --- /dev/null +++ b/node_modules/lodash.isarguments/package.json @@ -0,0 +1,113 @@ +{ + "_args": [ + [ + { + "raw": "lodash.isarguments@^3.0.0", + "scope": null, + "escapedName": "lodash.isarguments", + "name": "lodash.isarguments", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/lodash.keys" + ] + ], + "_from": "lodash.isarguments@>=3.0.0 <4.0.0", + "_id": "lodash.isarguments@3.1.0", + "_inCache": true, + "_location": "/lodash.isarguments", + "_nodeVersion": "4.4.7", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/lodash.isarguments-3.1.0.tgz_1471110006733_0.7392017105594277" + }, + "_npmUser": { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + "_npmVersion": "2.15.10", + "_phantomChildren": {}, + "_requested": { + "raw": "lodash.isarguments@^3.0.0", + "scope": null, + "escapedName": "lodash.isarguments", + "name": "lodash.isarguments", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/lodash.keys" + ], + "_resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", + "_shasum": "2f573d85c6a24289ff00663b491c1d338ff3458a", + "_shrinkwrap": null, + "_spec": "lodash.isarguments@^3.0.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/lodash.keys", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine.bublitz@gmail.com", + "url": "https://github.com/phated" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The lodash method `_.isArguments` exported as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "2f573d85c6a24289ff00663b491c1d338ff3458a", + "tarball": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "keywords": [ + "lodash-modularized", + "isarguments" + ], + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + } + ], + "name": "lodash.isarguments", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.1.0" +} diff --git a/node_modules/lodash.isarray/LICENSE b/node_modules/lodash.isarray/LICENSE new file mode 100644 index 0000000..9cd87e5 --- /dev/null +++ b/node_modules/lodash.isarray/LICENSE @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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. diff --git a/node_modules/lodash.isarray/README.md b/node_modules/lodash.isarray/README.md new file mode 100644 index 0000000..ea274aa --- /dev/null +++ b/node_modules/lodash.isarray/README.md @@ -0,0 +1,20 @@ +# lodash.isarray v3.0.4 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.isArray` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.isarray +``` + +In Node.js/io.js: + +```js +var isArray = require('lodash.isarray'); +``` + +See the [documentation](https://lodash.com/docs#isArray) or [package source](https://github.com/lodash/lodash/blob/3.0.4-npm-packages/lodash.isarray) for more details. diff --git a/node_modules/lodash.isarray/index.js b/node_modules/lodash.isarray/index.js new file mode 100644 index 0000000..dd24658 --- /dev/null +++ b/node_modules/lodash.isarray/index.js @@ -0,0 +1,180 @@ +/** + * lodash 3.0.4 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** `Object#toString` result references. */ +var arrayTag = '[object Array]', + funcTag = '[object Function]'; + +/** Used to detect host constructors (Safari > 5). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var fnToString = Function.prototype.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeIsArray = getNative(Array, 'isArray'); + +/** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = object == null ? undefined : object[key]; + return isNative(value) ? value : undefined; +} + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ +function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(function() { return arguments; }()); + * // => false + */ +var isArray = nativeIsArray || function(value) { + return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag; +}; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in older versions of Chrome and Safari which return 'function' for regexes + // and Safari 8 equivalents which return 'object' for typed array constructors. + return isObject(value) && objToString.call(value) == funcTag; +} + +/** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ +function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is a native function. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ +function isNative(value) { + if (value == null) { + return false; + } + if (isFunction(value)) { + return reIsNative.test(fnToString.call(value)); + } + return isObjectLike(value) && reIsHostCtor.test(value); +} + +module.exports = isArray; diff --git a/node_modules/lodash.isarray/package.json b/node_modules/lodash.isarray/package.json new file mode 100644 index 0000000..1d2eb38 --- /dev/null +++ b/node_modules/lodash.isarray/package.json @@ -0,0 +1,129 @@ +{ + "_args": [ + [ + { + "raw": "lodash.isarray@^3.0.0", + "scope": null, + "escapedName": "lodash.isarray", + "name": "lodash.isarray", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/lodash.keys" + ] + ], + "_from": "lodash.isarray@>=3.0.0 <4.0.0", + "_id": "lodash.isarray@3.0.4", + "_inCache": true, + "_location": "/lodash.isarray", + "_nodeVersion": "0.12.5", + "_npmUser": { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + "_npmVersion": "2.12.0", + "_phantomChildren": {}, + "_requested": { + "raw": "lodash.isarray@^3.0.0", + "scope": null, + "escapedName": "lodash.isarray", + "name": "lodash.isarray", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/lodash.keys" + ], + "_resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", + "_shasum": "79e4eb88c36a8122af86f844aa9bcd851b5fbb55", + "_shrinkwrap": null, + "_spec": "lodash.isarray@^3.0.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/lodash.keys", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The modern build of lodash’s `_.isArray` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "79e4eb88c36a8122af86f844aa9bcd851b5fbb55", + "tarball": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "keywords": [ + "lodash", + "lodash-modularized", + "stdlib", + "util" + ], + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + }, + { + "name": "d10", + "email": "demoneaux@gmail.com" + } + ], + "name": "lodash.isarray", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.0.4" +} diff --git a/node_modules/lodash.isempty/LICENSE b/node_modules/lodash.isempty/LICENSE new file mode 100644 index 0000000..e0c69d5 --- /dev/null +++ b/node_modules/lodash.isempty/LICENSE @@ -0,0 +1,47 @@ +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +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. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/node_modules/lodash.isempty/README.md b/node_modules/lodash.isempty/README.md new file mode 100644 index 0000000..b514bae --- /dev/null +++ b/node_modules/lodash.isempty/README.md @@ -0,0 +1,18 @@ +# lodash.isempty v4.4.0 + +The [lodash](https://lodash.com/) method `_.isEmpty` exported as a [Node.js](https://nodejs.org/) module. + +## Installation + +Using npm: +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.isempty +``` + +In Node.js: +```js +var isEmpty = require('lodash.isempty'); +``` + +See the [documentation](https://lodash.com/docs#isEmpty) or [package source](https://github.com/lodash/lodash/blob/4.4.0-npm-packages/lodash.isempty) for more details. diff --git a/node_modules/lodash.isempty/index.js b/node_modules/lodash.isempty/index.js new file mode 100644 index 0000000..6fb4aff --- /dev/null +++ b/node_modules/lodash.isempty/index.js @@ -0,0 +1,582 @@ +/** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + setTag = '[object Set]', + weakMapTag = '[object WeakMap]'; + +var dataViewTag = '[object DataView]'; + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +/** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ +function isHostObject(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) {} + } + return result; +} + +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +/** Used for built-in method references. */ +var funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined, + propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeKeys = overArg(Object.keys, Object); + +/* Built-in method references that are verified to be native. */ +var DataView = getNative(root, 'DataView'), + Map = getNative(root, 'Map'), + Promise = getNative(root, 'Promise'), + Set = getNative(root, 'Set'), + WeakMap = getNative(root, 'WeakMap'); + +/** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */ +var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf'); + +/** Used to detect maps, sets, and weakmaps. */ +var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + +/** + * The base implementation of `getTag`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + return objectToString.call(value); +} + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} + +/** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +var getTag = baseGetTag; + +// Fallback for data views, maps, sets, and weak maps in IE 11, +// for data views in Edge < 14, and promises in Node.js. +if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function(value) { + var result = objectToString.call(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : undefined; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; +} + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +/** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ +function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; +} + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to process. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +/** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +function isArguments(value) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && + (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); +} + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +/** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ +function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); +} + +/** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ +function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); +} + +/** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ +var isBuffer = nativeIsBuffer || stubFalse; + +/** + * Checks if `value` is an empty object, collection, map, or set. + * + * Objects are considered empty if they have no own enumerable string keyed + * properties. + * + * Array-like values such as `arguments` objects, arrays, buffers, strings, or + * jQuery-like collections are considered empty if they have a `length` of `0`. + * Similarly, maps and sets are considered empty if they have a `size` of `0`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ +function isEmpty(value) { + if (isArrayLike(value) && + (isArray(value) || typeof value == 'string' || + typeof value.splice == 'function' || isBuffer(value) || isArguments(value))) { + return !value.length; + } + var tag = getTag(value); + if (tag == mapTag || tag == setTag) { + return !value.size; + } + if (nonEnumShadows || isPrototype(value)) { + return !nativeKeys(value).length; + } + for (var key in value) { + if (hasOwnProperty.call(value, key)) { + return false; + } + } + return true; +} + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; +} + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ +function stubFalse() { + return false; +} + +module.exports = isEmpty; diff --git a/node_modules/lodash.isempty/package.json b/node_modules/lodash.isempty/package.json new file mode 100644 index 0000000..116d7f1 --- /dev/null +++ b/node_modules/lodash.isempty/package.json @@ -0,0 +1,113 @@ +{ + "_args": [ + [ + { + "raw": "lodash.isempty@^4.2.1", + "scope": null, + "escapedName": "lodash.isempty", + "name": "lodash.isempty", + "rawSpec": "^4.2.1", + "spec": ">=4.2.1 <5.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/fined" + ] + ], + "_from": "lodash.isempty@>=4.2.1 <5.0.0", + "_id": "lodash.isempty@4.4.0", + "_inCache": true, + "_location": "/lodash.isempty", + "_nodeVersion": "4.4.7", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/lodash.isempty-4.4.0.tgz_1471110024771_0.43532854481600225" + }, + "_npmUser": { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + "_npmVersion": "2.15.10", + "_phantomChildren": {}, + "_requested": { + "raw": "lodash.isempty@^4.2.1", + "scope": null, + "escapedName": "lodash.isempty", + "name": "lodash.isempty", + "rawSpec": "^4.2.1", + "spec": ">=4.2.1 <5.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fined" + ], + "_resolved": "https://registry.npmjs.org/lodash.isempty/-/lodash.isempty-4.4.0.tgz", + "_shasum": "6f86cbedd8be4ec987be9aaf33c9684db1b31e7e", + "_shrinkwrap": null, + "_spec": "lodash.isempty@^4.2.1", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/fined", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine.bublitz@gmail.com", + "url": "https://github.com/phated" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The lodash method `_.isEmpty` exported as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "6f86cbedd8be4ec987be9aaf33c9684db1b31e7e", + "tarball": "https://registry.npmjs.org/lodash.isempty/-/lodash.isempty-4.4.0.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "keywords": [ + "lodash-modularized", + "isempty" + ], + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + } + ], + "name": "lodash.isempty", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "4.4.0" +} diff --git a/node_modules/lodash.isplainobject/LICENSE b/node_modules/lodash.isplainobject/LICENSE new file mode 100644 index 0000000..e0c69d5 --- /dev/null +++ b/node_modules/lodash.isplainobject/LICENSE @@ -0,0 +1,47 @@ +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +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. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/node_modules/lodash.isplainobject/README.md b/node_modules/lodash.isplainobject/README.md new file mode 100644 index 0000000..aeefd74 --- /dev/null +++ b/node_modules/lodash.isplainobject/README.md @@ -0,0 +1,18 @@ +# lodash.isplainobject v4.0.6 + +The [lodash](https://lodash.com/) method `_.isPlainObject` exported as a [Node.js](https://nodejs.org/) module. + +## Installation + +Using npm: +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.isplainobject +``` + +In Node.js: +```js +var isPlainObject = require('lodash.isplainobject'); +``` + +See the [documentation](https://lodash.com/docs#isPlainObject) or [package source](https://github.com/lodash/lodash/blob/4.0.6-npm-packages/lodash.isplainobject) for more details. diff --git a/node_modules/lodash.isplainobject/index.js b/node_modules/lodash.isplainobject/index.js new file mode 100644 index 0000000..0f820ee --- /dev/null +++ b/node_modules/lodash.isplainobject/index.js @@ -0,0 +1,139 @@ +/** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** `Object#toString` result references. */ +var objectTag = '[object Object]'; + +/** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ +function isHostObject(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) {} + } + return result; +} + +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +/** Used for built-in method references. */ +var funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to infer the `Object` constructor. */ +var objectCtorString = funcToString.call(Object); + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Built-in value references. */ +var getPrototype = overArg(Object.getPrototypeOf, Object); + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ +function isPlainObject(value) { + if (!isObjectLike(value) || + objectToString.call(value) != objectTag || isHostObject(value)) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return (typeof Ctor == 'function' && + Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString); +} + +module.exports = isPlainObject; diff --git a/node_modules/lodash.isplainobject/package.json b/node_modules/lodash.isplainobject/package.json new file mode 100644 index 0000000..d963482 --- /dev/null +++ b/node_modules/lodash.isplainobject/package.json @@ -0,0 +1,114 @@ +{ + "_args": [ + [ + { + "raw": "lodash.isplainobject@^4.0.4", + "scope": null, + "escapedName": "lodash.isplainobject", + "name": "lodash.isplainobject", + "rawSpec": "^4.0.4", + "spec": ">=4.0.4 <5.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/liftoff" + ] + ], + "_from": "lodash.isplainobject@>=4.0.4 <5.0.0", + "_id": "lodash.isplainobject@4.0.6", + "_inCache": true, + "_location": "/lodash.isplainobject", + "_nodeVersion": "4.4.7", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/lodash.isplainobject-4.0.6.tgz_1471110064885_0.12097060843370855" + }, + "_npmUser": { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + "_npmVersion": "2.15.10", + "_phantomChildren": {}, + "_requested": { + "raw": "lodash.isplainobject@^4.0.4", + "scope": null, + "escapedName": "lodash.isplainobject", + "name": "lodash.isplainobject", + "rawSpec": "^4.0.4", + "spec": ">=4.0.4 <5.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fined", + "/liftoff" + ], + "_resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "_shasum": "7c526a52d89b45c45cc690b88163be0497f550cb", + "_shrinkwrap": null, + "_spec": "lodash.isplainobject@^4.0.4", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/liftoff", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine.bublitz@gmail.com", + "url": "https://github.com/phated" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The lodash method `_.isPlainObject` exported as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "7c526a52d89b45c45cc690b88163be0497f550cb", + "tarball": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "keywords": [ + "lodash-modularized", + "isplainobject" + ], + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + } + ], + "name": "lodash.isplainobject", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "4.0.6" +} diff --git a/node_modules/lodash.isstring/LICENSE b/node_modules/lodash.isstring/LICENSE new file mode 100644 index 0000000..b054ca5 --- /dev/null +++ b/node_modules/lodash.isstring/LICENSE @@ -0,0 +1,22 @@ +Copyright 2012-2016 The Dojo Foundation +Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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. diff --git a/node_modules/lodash.isstring/README.md b/node_modules/lodash.isstring/README.md new file mode 100644 index 0000000..f184029 --- /dev/null +++ b/node_modules/lodash.isstring/README.md @@ -0,0 +1,18 @@ +# lodash.isstring v4.0.1 + +The [lodash](https://lodash.com/) method `_.isString` exported as a [Node.js](https://nodejs.org/) module. + +## Installation + +Using npm: +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.isstring +``` + +In Node.js: +```js +var isString = require('lodash.isstring'); +``` + +See the [documentation](https://lodash.com/docs#isString) or [package source](https://github.com/lodash/lodash/blob/4.0.1-npm-packages/lodash.isstring) for more details. diff --git a/node_modules/lodash.isstring/index.js b/node_modules/lodash.isstring/index.js new file mode 100644 index 0000000..408225c --- /dev/null +++ b/node_modules/lodash.isstring/index.js @@ -0,0 +1,95 @@ +/** + * lodash 4.0.1 (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright 2012-2016 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** `Object#toString` result references. */ +var stringTag = '[object String]'; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @type Function + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ +function isString(value) { + return typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag); +} + +module.exports = isString; diff --git a/node_modules/lodash.isstring/package.json b/node_modules/lodash.isstring/package.json new file mode 100644 index 0000000..7f353e1 --- /dev/null +++ b/node_modules/lodash.isstring/package.json @@ -0,0 +1,114 @@ +{ + "_args": [ + [ + { + "raw": "lodash.isstring@^4.0.1", + "scope": null, + "escapedName": "lodash.isstring", + "name": "lodash.isstring", + "rawSpec": "^4.0.1", + "spec": ">=4.0.1 <5.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/liftoff" + ] + ], + "_from": "lodash.isstring@>=4.0.1 <5.0.0", + "_id": "lodash.isstring@4.0.1", + "_inCache": true, + "_location": "/lodash.isstring", + "_nodeVersion": "5.4.0", + "_npmOperationalInternal": { + "host": "packages-5-east.internal.npmjs.com", + "tmp": "tmp/lodash.isstring-4.0.1.tgz_1454484537621_0.8814679116476327" + }, + "_npmUser": { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + "_npmVersion": "2.14.15", + "_phantomChildren": {}, + "_requested": { + "raw": "lodash.isstring@^4.0.1", + "scope": null, + "escapedName": "lodash.isstring", + "name": "lodash.isstring", + "rawSpec": "^4.0.1", + "spec": ">=4.0.1 <5.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fined", + "/liftoff" + ], + "_resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "_shasum": "d527dfb5456eca7cc9bb95d5daeaf88ba54a5451", + "_shrinkwrap": null, + "_spec": "lodash.isstring@^4.0.1", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/liftoff", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "https://github.com/phated" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The lodash method `_.isString` exported as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "d527dfb5456eca7cc9bb95d5daeaf88ba54a5451", + "tarball": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "keywords": [ + "lodash-modularized", + "isstring" + ], + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + } + ], + "name": "lodash.isstring", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "4.0.1" +} diff --git a/node_modules/lodash.keys/LICENSE b/node_modules/lodash.keys/LICENSE new file mode 100644 index 0000000..9cd87e5 --- /dev/null +++ b/node_modules/lodash.keys/LICENSE @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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. diff --git a/node_modules/lodash.keys/README.md b/node_modules/lodash.keys/README.md new file mode 100644 index 0000000..5f69a18 --- /dev/null +++ b/node_modules/lodash.keys/README.md @@ -0,0 +1,20 @@ +# lodash.keys v3.1.2 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.keys` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.keys +``` + +In Node.js/io.js: + +```js +var keys = require('lodash.keys'); +``` + +See the [documentation](https://lodash.com/docs#keys) or [package source](https://github.com/lodash/lodash/blob/3.1.2-npm-packages/lodash.keys) for more details. diff --git a/node_modules/lodash.keys/index.js b/node_modules/lodash.keys/index.js new file mode 100644 index 0000000..f4c1774 --- /dev/null +++ b/node_modules/lodash.keys/index.js @@ -0,0 +1,236 @@ +/** + * lodash 3.1.2 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var getNative = require('lodash._getnative'), + isArguments = require('lodash.isarguments'), + isArray = require('lodash.isarray'); + +/** Used to detect unsigned integer values. */ +var reIsUint = /^\d+$/; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeKeys = getNative(Object, 'keys'); + +/** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; +} + +/** + * Gets the "length" property value of `object`. + * + * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) + * that affects Safari on at least iOS 8.1-8.3 ARM64. + * + * @private + * @param {Object} object The object to query. + * @returns {*} Returns the "length" value. + */ +var getLength = baseProperty('length'); + +/** + * Checks if `value` is array-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + */ +function isArrayLike(value) { + return value != null && isLength(getLength(value)); +} + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; + length = length == null ? MAX_SAFE_INTEGER : length; + return value > -1 && value % 1 == 0 && value < length; +} + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ +function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +/** + * A fallback implementation of `Object.keys` which creates an array of the + * own enumerable property names of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function shimKeys(object) { + var props = keysIn(object), + propsLength = props.length, + length = propsLength && object.length; + + var allowIndexes = !!length && isLength(length) && + (isArray(object) || isArguments(object)); + + var index = -1, + result = []; + + while (++index < propsLength) { + var key = props[index]; + if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) { + result.push(key); + } + } + return result; +} + +/** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ +function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys) + * for more details. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +var keys = !nativeKeys ? shimKeys : function(object) { + var Ctor = object == null ? undefined : object.constructor; + if ((typeof Ctor == 'function' && Ctor.prototype === object) || + (typeof object != 'function' && isArrayLike(object))) { + return shimKeys(object); + } + return isObject(object) ? nativeKeys(object) : []; +}; + +/** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ +function keysIn(object) { + if (object == null) { + return []; + } + if (!isObject(object)) { + object = Object(object); + } + var length = object.length; + length = (length && isLength(length) && + (isArray(object) || isArguments(object)) && length) || 0; + + var Ctor = object.constructor, + index = -1, + isProto = typeof Ctor == 'function' && Ctor.prototype === object, + result = Array(length), + skipIndexes = length > 0; + + while (++index < length) { + result[index] = (index + ''); + } + for (var key in object) { + if (!(skipIndexes && isIndex(key, length)) && + !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; +} + +module.exports = keys; diff --git a/node_modules/lodash.keys/package.json b/node_modules/lodash.keys/package.json new file mode 100644 index 0000000..42c8f71 --- /dev/null +++ b/node_modules/lodash.keys/package.json @@ -0,0 +1,133 @@ +{ + "_args": [ + [ + { + "raw": "lodash.keys@^3.0.0", + "scope": null, + "escapedName": "lodash.keys", + "name": "lodash.keys", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/lodash.template" + ] + ], + "_from": "lodash.keys@>=3.0.0 <4.0.0", + "_id": "lodash.keys@3.1.2", + "_inCache": true, + "_location": "/lodash.keys", + "_nodeVersion": "0.12.5", + "_npmUser": { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + "_npmVersion": "2.12.0", + "_phantomChildren": {}, + "_requested": { + "raw": "lodash.keys@^3.0.0", + "scope": null, + "escapedName": "lodash.keys", + "name": "lodash.keys", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/lodash.template" + ], + "_resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", + "_shasum": "4dbc0472b156be50a0b286855d1bd0b0c656098a", + "_shrinkwrap": null, + "_spec": "lodash.keys@^3.0.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/lodash.template", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": { + "lodash._getnative": "^3.0.0", + "lodash.isarguments": "^3.0.0", + "lodash.isarray": "^3.0.0" + }, + "description": "The modern build of lodash’s `_.keys` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "4dbc0472b156be50a0b286855d1bd0b0c656098a", + "tarball": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "keywords": [ + "lodash", + "lodash-modularized", + "stdlib", + "util" + ], + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + }, + { + "name": "d10", + "email": "demoneaux@gmail.com" + } + ], + "name": "lodash.keys", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.1.2" +} diff --git a/node_modules/lodash.mapvalues/LICENSE b/node_modules/lodash.mapvalues/LICENSE new file mode 100644 index 0000000..e0c69d5 --- /dev/null +++ b/node_modules/lodash.mapvalues/LICENSE @@ -0,0 +1,47 @@ +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +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. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/node_modules/lodash.mapvalues/README.md b/node_modules/lodash.mapvalues/README.md new file mode 100644 index 0000000..32cb163 --- /dev/null +++ b/node_modules/lodash.mapvalues/README.md @@ -0,0 +1,18 @@ +# lodash.mapvalues v4.6.0 + +The [lodash](https://lodash.com/) method `_.mapValues` exported as a [Node.js](https://nodejs.org/) module. + +## Installation + +Using npm: +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.mapvalues +``` + +In Node.js: +```js +var mapValues = require('lodash.mapvalues'); +``` + +See the [documentation](https://lodash.com/docs#mapValues) or [package source](https://github.com/lodash/lodash/blob/4.6.0-npm-packages/lodash.mapvalues) for more details. diff --git a/node_modules/lodash.mapvalues/index.js b/node_modules/lodash.mapvalues/index.js new file mode 100644 index 0000000..b04812c --- /dev/null +++ b/node_modules/lodash.mapvalues/index.js @@ -0,0 +1,2280 @@ +/** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** Used to compose bitmasks for comparison styles. */ +var UNORDERED_COMPARE_FLAG = 1, + PARTIAL_COMPARE_FLAG = 2; + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/, + reLeadingDot = /^\./, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Used to detect unsigned integer values. */ +var reIsUint = /^(?:0|[1-9]\d*)$/; + +/** Used to identify `toStringTag` values of typed arrays. */ +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = +typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = +typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = +typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = +typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag] = typedArrayTags[arrayTag] = +typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = +typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = +typedArrayTags[errorTag] = typedArrayTags[funcTag] = +typedArrayTags[mapTag] = typedArrayTags[numberTag] = +typedArrayTags[objectTag] = typedArrayTags[regexpTag] = +typedArrayTags[setTag] = typedArrayTags[stringTag] = +typedArrayTags[weakMapTag] = false; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Detect free variable `process` from Node.js. */ +var freeProcess = moduleExports && freeGlobal.process; + +/** Used to access faster Node.js helpers. */ +var nodeUtil = (function() { + try { + return freeProcess && freeProcess.binding('util'); + } catch (e) {} +}()); + +/* Node.js helper references. */ +var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + +/** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ +function arraySome(array, predicate) { + var index = -1, + length = array ? array.length : 0; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; +} + +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; +} + +/** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ +function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; +} + +/** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ +function baseUnary(func) { + return function(value) { + return func(value); + }; +} + +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +/** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ +function isHostObject(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) {} + } + return result; +} + +/** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ +function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; +} + +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +/** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ +function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} + +/** Used for built-in method references. */ +var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** Built-in value references. */ +var Symbol = root.Symbol, + Uint8Array = root.Uint8Array, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeKeys = overArg(Object.keys, Object); + +/* Built-in method references that are verified to be native. */ +var DataView = getNative(root, 'DataView'), + Map = getNative(root, 'Map'), + Promise = getNative(root, 'Promise'), + Set = getNative(root, 'Set'), + WeakMap = getNative(root, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); + +/** Used to detect maps, sets, and weakmaps. */ +var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; +} + +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; +} + +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); +} + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; +} + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + return true; +} + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; +} + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + return getMapData(this, key)['delete'](key); +} + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); + return this; +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; + +/** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ +function SetCache(values) { + var index = -1, + length = values ? values.length : 0; + + this.__data__ = new MapCache; + while (++index < length) { + this.add(values[index]); + } +} + +/** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ +function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; +} + +/** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ +function setCacheHas(value) { + return this.__data__.has(value); +} + +// Add methods to `SetCache`. +SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; +SetCache.prototype.has = setCacheHas; + +/** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Stack(entries) { + this.__data__ = new ListCache(entries); +} + +/** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ +function stackClear() { + this.__data__ = new ListCache; +} + +/** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function stackDelete(key) { + return this.__data__['delete'](key); +} + +/** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function stackGet(key) { + return this.__data__.get(key); +} + +/** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function stackHas(key) { + return this.__data__.has(key); +} + +/** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ +function stackSet(key, value) { + var cache = this.__data__; + if (cache instanceof ListCache) { + var pairs = cache.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + return this; + } + cache = this.__data__ = new MapCache(pairs); + } + cache.set(key, value); + return this; +} + +// Add methods to `Stack`. +Stack.prototype.clear = stackClear; +Stack.prototype['delete'] = stackDelete; +Stack.prototype.get = stackGet; +Stack.prototype.has = stackHas; +Stack.prototype.set = stackSet; + +/** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ +function arrayLikeKeys(value, inherited) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + // Safari 9 makes `arguments.length` enumerable in strict mode. + var result = (isArray(value) || isArguments(value)) + ? baseTimes(value.length, String) + : []; + + var length = result.length, + skipIndexes = !!length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && (key == 'length' || isIndex(key, length)))) { + result.push(key); + } + } + return result; +} + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; +} + +/** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ +var baseFor = createBaseFor(); + +/** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); +} + +/** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ +function baseGet(object, path) { + path = isKey(path, object) ? [path] : castPath(path); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return (index && index == length) ? object : undefined; +} + +/** + * The base implementation of `getTag`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + return objectToString.call(value); +} + +/** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHasIn(object, key) { + return object != null && key in Object(object); +} + +/** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @param {boolean} [bitmask] The bitmask of comparison flags. + * The bitmask may be composed of the following flags: + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ +function baseIsEqual(value, other, customizer, bitmask, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack); +} + +/** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparisons. + * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` + * for more details. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = arrayTag, + othTag = arrayTag; + + if (!objIsArr) { + objTag = getTag(object); + objTag = objTag == argsTag ? objectTag : objTag; + } + if (!othIsArr) { + othTag = getTag(other); + othTag = othTag == argsTag ? objectTag : othTag; + } + var objIsObj = objTag == objectTag && !isHostObject(object), + othIsObj = othTag == objectTag && !isHostObject(other), + isSameTag = objTag == othTag; + + if (isSameTag && !objIsObj) { + stack || (stack = new Stack); + return (objIsArr || isTypedArray(object)) + ? equalArrays(object, other, equalFunc, customizer, bitmask, stack) + : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack); + } + if (!(bitmask & PARTIAL_COMPARE_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new Stack); + return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack); + return equalObjects(object, other, equalFunc, customizer, bitmask, stack); +} + +/** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ +function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new Stack; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack) + : result + )) { + return false; + } + } + } + return true; +} + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} + +/** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ +function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[objectToString.call(value)]; +} + +/** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ +function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity; + } + if (typeof value == 'object') { + return isArray(value) + ? baseMatchesProperty(value[0], value[1]) + : baseMatches(value); + } + return property(value); +} + +/** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; +} + +/** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || baseIsMatch(object, source, matchData); + }; +} + +/** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); + } + return function(object) { + var objValue = get(object, path); + return (objValue === undefined && objValue === srcValue) + ? hasIn(object, path) + : baseIsEqual(srcValue, objValue, undefined, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG); + }; +} + +/** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function basePropertyDeep(path) { + return function(object) { + return baseGet(object, path); + }; +} + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value) { + return isArray(value) ? value : stringToPath(value); +} + +/** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; +} + +/** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} customizer The function to customize comparisons. + * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` + * for more details. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ +function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { + var isPartial = bitmask & PARTIAL_COMPARE_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(array); + if (stacked && stack.get(other)) { + return stacked == other; + } + var index = -1, + result = true, + seen = (bitmask & UNORDERED_COMPARE_FLAG) ? new SetCache : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!arraySome(other, function(othValue, othIndex) { + if (!seen.has(othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) { + return seen.add(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, customizer, bitmask, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; +} + +/** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} customizer The function to customize comparisons. + * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` + * for more details. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new Uint8Array(object), new Uint8Array(other))) { + return false; + } + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + case mapTag: + var convert = mapToArray; + + case setTag: + var isPartial = bitmask & PARTIAL_COMPARE_FLAG; + convert || (convert = setToArray); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= UNORDERED_COMPARE_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; +} + +/** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} customizer The function to customize comparisons. + * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` + * for more details. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalObjects(object, other, equalFunc, customizer, bitmask, stack) { + var isPartial = bitmask & PARTIAL_COMPARE_FLAG, + objProps = keys(object), + objLength = objProps.length, + othProps = keys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked && stack.get(other)) { + return stacked == other; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; +} + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +/** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ +function getMatchData(object) { + var result = keys(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, isStrictComparable(value)]; + } + return result; +} + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} + +/** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +var getTag = baseGetTag; + +// Fallback for data views, maps, sets, and weak maps in IE 11, +// for data views in Edge < 14, and promises in Node.js. +if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function(value) { + var result = objectToString.call(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : undefined; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; +} + +/** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ +function hasPath(object, path, hasFunc) { + path = isKey(path, object) ? [path] : castPath(path); + + var result, + index = -1, + length = path.length; + + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result) { + return result; + } + var length = object ? object.length : 0; + return !!length && isLength(length) && isIndex(key, length) && + (isArray(object) || isArguments(object)); +} + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && + (typeof value == 'number' || reIsUint.test(value)) && + (value > -1 && value % 1 == 0 && value < length); +} + +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); +} + +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +/** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ +function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; +} + +/** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ +function isStrictComparable(value) { + return value === value && !isObject(value); +} + +/** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; +} + +/** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ +var stringToPath = memoize(function(string) { + string = toString(string); + + var result = []; + if (reLeadingDot.test(string)) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, string) { + result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +}); + +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to process. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +/** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ +function memoize(func, resolver) { + if (typeof func != 'function' || (resolver && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result); + return result; + }; + memoized.cache = new (memoize.Cache || MapCache); + return memoized; +} + +// Assign cache to `_.memoize`. +memoize.Cache = MapCache; + +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +/** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +function isArguments(value) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && + (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); +} + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +/** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ +function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); +} + +/** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ +function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); +} + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; +} + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); +} + +/** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ +var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + +/** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {string} Returns the string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ +function toString(value) { + return value == null ? '' : baseToString(value); +} + +/** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ +function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, path); + return result === undefined ? defaultValue : result; +} + +/** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ +function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); +} + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); +} + +/** + * Creates an object with the same keys as `object` and values generated + * by running each own enumerable string keyed property of `object` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, key, object). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapKeys + * @example + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * _.mapValues(users, function(o) { return o.age; }); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + * + * // The `_.property` iteratee shorthand. + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + */ +function mapValues(object, iteratee) { + var result = {}; + iteratee = baseIteratee(iteratee, 3); + + baseForOwn(object, function(value, key, object) { + result[key] = iteratee(value, key, object); + }); + return result; +} + +/** + * This method returns the first argument it receives. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'a': 1 }; + * + * console.log(_.identity(object) === object); + * // => true + */ +function identity(value) { + return value; +} + +/** + * Creates a function that returns the value at `path` of a given object. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + * @example + * + * var objects = [ + * { 'a': { 'b': 2 } }, + * { 'a': { 'b': 1 } } + * ]; + * + * _.map(objects, _.property('a.b')); + * // => [2, 1] + * + * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); + * // => [1, 2] + */ +function property(path) { + return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); +} + +module.exports = mapValues; diff --git a/node_modules/lodash.mapvalues/package.json b/node_modules/lodash.mapvalues/package.json new file mode 100644 index 0000000..17e09b5 --- /dev/null +++ b/node_modules/lodash.mapvalues/package.json @@ -0,0 +1,113 @@ +{ + "_args": [ + [ + { + "raw": "lodash.mapvalues@^4.4.0", + "scope": null, + "escapedName": "lodash.mapvalues", + "name": "lodash.mapvalues", + "rawSpec": "^4.4.0", + "spec": ">=4.4.0 <5.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/liftoff" + ] + ], + "_from": "lodash.mapvalues@>=4.4.0 <5.0.0", + "_id": "lodash.mapvalues@4.6.0", + "_inCache": true, + "_location": "/lodash.mapvalues", + "_nodeVersion": "4.4.7", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/lodash.mapvalues-4.6.0.tgz_1471110117308_0.16050698678009212" + }, + "_npmUser": { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + "_npmVersion": "2.15.10", + "_phantomChildren": {}, + "_requested": { + "raw": "lodash.mapvalues@^4.4.0", + "scope": null, + "escapedName": "lodash.mapvalues", + "name": "lodash.mapvalues", + "rawSpec": "^4.4.0", + "spec": ">=4.4.0 <5.0.0", + "type": "range" + }, + "_requiredBy": [ + "/liftoff" + ], + "_resolved": "https://registry.npmjs.org/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz", + "_shasum": "1bafa5005de9dd6f4f26668c30ca37230cc9689c", + "_shrinkwrap": null, + "_spec": "lodash.mapvalues@^4.4.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/liftoff", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine.bublitz@gmail.com", + "url": "https://github.com/phated" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The lodash method `_.mapValues` exported as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "1bafa5005de9dd6f4f26668c30ca37230cc9689c", + "tarball": "https://registry.npmjs.org/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "keywords": [ + "lodash-modularized", + "mapvalues" + ], + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + } + ], + "name": "lodash.mapvalues", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "4.6.0" +} diff --git a/node_modules/lodash.pick/LICENSE b/node_modules/lodash.pick/LICENSE new file mode 100644 index 0000000..e0c69d5 --- /dev/null +++ b/node_modules/lodash.pick/LICENSE @@ -0,0 +1,47 @@ +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +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. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/node_modules/lodash.pick/README.md b/node_modules/lodash.pick/README.md new file mode 100644 index 0000000..587595d --- /dev/null +++ b/node_modules/lodash.pick/README.md @@ -0,0 +1,18 @@ +# lodash.pick v4.4.0 + +The [lodash](https://lodash.com/) method `_.pick` exported as a [Node.js](https://nodejs.org/) module. + +## Installation + +Using npm: +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.pick +``` + +In Node.js: +```js +var pick = require('lodash.pick'); +``` + +See the [documentation](https://lodash.com/docs#pick) or [package source](https://github.com/lodash/lodash/blob/4.4.0-npm-packages/lodash.pick) for more details. diff --git a/node_modules/lodash.pick/index.js b/node_modules/lodash.pick/index.js new file mode 100644 index 0000000..aeeb775 --- /dev/null +++ b/node_modules/lodash.pick/index.js @@ -0,0 +1,503 @@ +/** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + symbolTag = '[object Symbol]'; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +/** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ +function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); +} + +/** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function arrayMap(array, iteratee) { + var index = -1, + length = array ? array.length : 0, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; +} + +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Built-in value references. */ +var Symbol = root.Symbol, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ +function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; +} + +/** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} props The property identifiers to pick. + * @returns {Object} Returns the new object. + */ +function basePick(object, props) { + object = Object(object); + return basePickBy(object, props, function(value, key) { + return key in object; + }); +} + +/** + * The base implementation of `_.pickBy` without support for iteratee shorthands. + * + * @private + * @param {Object} object The source object. + * @param {string[]} props The property identifiers to pick from. + * @param {Function} predicate The function invoked per property. + * @returns {Object} Returns the new object. + */ +function basePickBy(object, props, predicate) { + var index = -1, + length = props.length, + result = {}; + + while (++index < length) { + var key = props[index], + value = object[key]; + + if (predicate(value, key)) { + result[key] = value; + } + } + return result; +} + +/** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ +function baseRest(func, start) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = array; + return apply(func, this, otherArgs); + }; +} + +/** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ +function isFlattenable(value) { + return isArray(value) || isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); +} + +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +function isArguments(value) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && + (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); +} + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +/** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ +function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); +} + +/** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ +function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); +} + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; +} + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); +} + +/** + * Creates an object composed of the picked `object` properties. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [props] The property identifiers to pick. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ +var pick = baseRest(function(object, props) { + return object == null ? {} : basePick(object, arrayMap(baseFlatten(props, 1), toKey)); +}); + +module.exports = pick; diff --git a/node_modules/lodash.pick/package.json b/node_modules/lodash.pick/package.json new file mode 100644 index 0000000..180dd14 --- /dev/null +++ b/node_modules/lodash.pick/package.json @@ -0,0 +1,113 @@ +{ + "_args": [ + [ + { + "raw": "lodash.pick@^4.2.1", + "scope": null, + "escapedName": "lodash.pick", + "name": "lodash.pick", + "rawSpec": "^4.2.1", + "spec": ">=4.2.1 <5.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/fined" + ] + ], + "_from": "lodash.pick@>=4.2.1 <5.0.0", + "_id": "lodash.pick@4.4.0", + "_inCache": true, + "_location": "/lodash.pick", + "_nodeVersion": "4.4.7", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/lodash.pick-4.4.0.tgz_1471110197744_0.19985924172215164" + }, + "_npmUser": { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + "_npmVersion": "2.15.10", + "_phantomChildren": {}, + "_requested": { + "raw": "lodash.pick@^4.2.1", + "scope": null, + "escapedName": "lodash.pick", + "name": "lodash.pick", + "rawSpec": "^4.2.1", + "spec": ">=4.2.1 <5.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fined" + ], + "_resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz", + "_shasum": "52f05610fff9ded422611441ed1fc123a03001b3", + "_shrinkwrap": null, + "_spec": "lodash.pick@^4.2.1", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/fined", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine.bublitz@gmail.com", + "url": "https://github.com/phated" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The lodash method `_.pick` exported as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "52f05610fff9ded422611441ed1fc123a03001b3", + "tarball": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "keywords": [ + "lodash-modularized", + "pick" + ], + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + } + ], + "name": "lodash.pick", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "4.4.0" +} diff --git a/node_modules/lodash.restparam/LICENSE.txt b/node_modules/lodash.restparam/LICENSE.txt new file mode 100644 index 0000000..9cd87e5 --- /dev/null +++ b/node_modules/lodash.restparam/LICENSE.txt @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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. diff --git a/node_modules/lodash.restparam/README.md b/node_modules/lodash.restparam/README.md new file mode 100644 index 0000000..80e47a4 --- /dev/null +++ b/node_modules/lodash.restparam/README.md @@ -0,0 +1,20 @@ +# lodash.restparam v3.6.1 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.restParam` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.restparam +``` + +In Node.js/io.js: + +```js +var restParam = require('lodash.restparam'); +``` + +See the [documentation](https://lodash.com/docs#restParam) or [package source](https://github.com/lodash/lodash/blob/3.6.1-npm-packages/lodash.restparam) for more details. diff --git a/node_modules/lodash.restparam/index.js b/node_modules/lodash.restparam/index.js new file mode 100644 index 0000000..932f47a --- /dev/null +++ b/node_modules/lodash.restparam/index.js @@ -0,0 +1,67 @@ +/** + * lodash 3.6.1 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as an array. + * + * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters). + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.restParam(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ +function restParam(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + rest = Array(length); + + while (++index < length) { + rest[index] = args[start + index]; + } + switch (start) { + case 0: return func.call(this, rest); + case 1: return func.call(this, args[0], rest); + case 2: return func.call(this, args[0], args[1], rest); + } + var otherArgs = Array(start + 1); + index = -1; + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = rest; + return func.apply(this, otherArgs); + }; +} + +module.exports = restParam; diff --git a/node_modules/lodash.restparam/package.json b/node_modules/lodash.restparam/package.json new file mode 100644 index 0000000..2e619af --- /dev/null +++ b/node_modules/lodash.restparam/package.json @@ -0,0 +1,129 @@ +{ + "_args": [ + [ + { + "raw": "lodash.restparam@^3.0.0", + "scope": null, + "escapedName": "lodash.restparam", + "name": "lodash.restparam", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/lodash.template" + ] + ], + "_from": "lodash.restparam@>=3.0.0 <4.0.0", + "_id": "lodash.restparam@3.6.1", + "_inCache": true, + "_location": "/lodash.restparam", + "_nodeVersion": "0.12.2", + "_npmUser": { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + "_npmVersion": "2.7.6", + "_phantomChildren": {}, + "_requested": { + "raw": "lodash.restparam@^3.0.0", + "scope": null, + "escapedName": "lodash.restparam", + "name": "lodash.restparam", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/lodash.template" + ], + "_resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", + "_shasum": "936a4e309ef330a7645ed4145986c85ae5b20805", + "_shrinkwrap": null, + "_spec": "lodash.restparam@^3.0.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/lodash.template", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Benjamin Tan", + "email": "demoneaux@gmail.com", + "url": "https://d10.github.io/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "http://www.iceddev.com/" + }, + { + "name": "Kit Cambridge", + "email": "github@kitcambridge.be", + "url": "http://kitcambridge.be/" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The modern build of lodash’s `_.restParam` as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "936a4e309ef330a7645ed4145986c85ae5b20805", + "tarball": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "keywords": [ + "lodash", + "lodash-modularized", + "stdlib", + "util" + ], + "license": "MIT", + "maintainers": [ + { + "name": "jdalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "d10", + "email": "demoneaux@gmail.com" + }, + { + "name": "kitcambridge", + "email": "github@kitcambridge.be" + }, + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + } + ], + "name": "lodash.restparam", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "3.6.1" +} diff --git a/node_modules/lodash.template/LICENSE b/node_modules/lodash.template/LICENSE new file mode 100644 index 0000000..9cd87e5 --- /dev/null +++ b/node_modules/lodash.template/LICENSE @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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. diff --git a/node_modules/lodash.template/README.md b/node_modules/lodash.template/README.md new file mode 100644 index 0000000..f542f71 --- /dev/null +++ b/node_modules/lodash.template/README.md @@ -0,0 +1,20 @@ +# lodash.template v3.6.2 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.template` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.template +``` + +In Node.js/io.js: + +```js +var template = require('lodash.template'); +``` + +See the [documentation](https://lodash.com/docs#template) or [package source](https://github.com/lodash/lodash/blob/3.6.2-npm-packages/lodash.template) for more details. diff --git a/node_modules/lodash.template/index.js b/node_modules/lodash.template/index.js new file mode 100644 index 0000000..e5a9629 --- /dev/null +++ b/node_modules/lodash.template/index.js @@ -0,0 +1,389 @@ +/** + * lodash 3.6.2 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +var baseCopy = require('lodash._basecopy'), + baseToString = require('lodash._basetostring'), + baseValues = require('lodash._basevalues'), + isIterateeCall = require('lodash._isiterateecall'), + reInterpolate = require('lodash._reinterpolate'), + keys = require('lodash.keys'), + restParam = require('lodash.restparam'), + templateSettings = require('lodash.templatesettings'); + +/** `Object#toString` result references. */ +var errorTag = '[object Error]'; + +/** Used to match empty string literals in compiled template source. */ +var reEmptyStringLeading = /\b__p \+= '';/g, + reEmptyStringMiddle = /\b(__p \+=) '' \+/g, + reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; + +/** Used to match [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). */ +var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; + +/** Used to ensure capturing order of template delimiters. */ +var reNoMatch = /($^)/; + +/** Used to match unescaped characters in compiled string literals. */ +var reUnescapedString = /['\n\r\u2028\u2029\\]/g; + +/** Used to escape characters for inclusion in compiled string literals. */ +var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\u2028': 'u2028', + '\u2029': 'u2029' +}; + +/** + * Used by `_.template` to escape characters for inclusion in compiled string literals. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ +function escapeStringChar(chr) { + return '\\' + stringEscapes[chr]; +} + +/** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/** + * Used by `_.template` to customize its `_.assign` use. + * + * **Note:** This function is like `assignDefaults` except that it ignores + * inherited property values when checking if a property is `undefined`. + * + * @private + * @param {*} objectValue The destination object property value. + * @param {*} sourceValue The source object property value. + * @param {string} key The key associated with the object and source values. + * @param {Object} object The destination object. + * @returns {*} Returns the value to assign to the destination object. + */ +function assignOwnDefaults(objectValue, sourceValue, key, object) { + return (objectValue === undefined || !hasOwnProperty.call(object, key)) + ? sourceValue + : objectValue; +} + +/** + * A specialized version of `_.assign` for customizing assigned values without + * support for argument juggling, multiple sources, and `this` binding `customizer` + * functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {Function} customizer The function to customize assigned values. + * @returns {Object} Returns `object`. + */ +function assignWith(object, source, customizer) { + var index = -1, + props = keys(source), + length = props.length; + + while (++index < length) { + var key = props[index], + value = object[key], + result = customizer(value, source[key], key, object, source); + + if ((result === result ? (result !== value) : (value === value)) || + (value === undefined && !(key in object))) { + object[key] = result; + } + } + return object; +} + +/** + * The base implementation of `_.assign` without support for argument juggling, + * multiple sources, and `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssign(object, source) { + return source == null + ? object + : baseCopy(source, keys(source), object); +} + +/** + * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, + * `SyntaxError`, `TypeError`, or `URIError` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an error object, else `false`. + * @example + * + * _.isError(new Error); + * // => true + * + * _.isError(Error); + * // => false + */ +function isError(value) { + return isObjectLike(value) && typeof value.message == 'string' && objToString.call(value) == errorTag; +} + +/** + * Creates a compiled template function that can interpolate data properties + * in "interpolate" delimiters, HTML-escape interpolated data properties in + * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data + * properties may be accessed as free variables in the template. If a setting + * object is provided it takes precedence over `_.templateSettings` values. + * + * **Note:** In the development build `_.template` utilizes + * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) + * for easier debugging. + * + * For more information on precompiling templates see + * [lodash's custom builds documentation](https://lodash.com/custom-builds). + * + * For more information on Chrome extension sandboxes see + * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The template string. + * @param {Object} [options] The options object. + * @param {RegExp} [options.escape] The HTML "escape" delimiter. + * @param {RegExp} [options.evaluate] The "evaluate" delimiter. + * @param {Object} [options.imports] An object to import into the template as free variables. + * @param {RegExp} [options.interpolate] The "interpolate" delimiter. + * @param {string} [options.sourceURL] The sourceURL of the template's compiled source. + * @param {string} [options.variable] The data object variable name. + * @param- {Object} [otherOptions] Enables the legacy `options` param signature. + * @returns {Function} Returns the compiled template function. + * @example + * + * // using the "interpolate" delimiter to create a compiled template + * var compiled = _.template('hello <%= user %>!'); + * compiled({ 'user': 'fred' }); + * // => 'hello fred!' + * + * // using the HTML "escape" delimiter to escape data property values + * var compiled = _.template('<%- value %>'); + * compiled({ 'value': ' +``` + +Note that the [es5-shim](https://github.com/es-shims/es5-shim) must be loaded before this library to support browsers pre IE9. + +```html + +``` + +## Usage + +The example below shows how you can load the promise library (in a way that works on both client and server). It then demonstrates creating a promise from scratch. You simply call `new Promise(fn)`. There is a complete specification for what is returned by this method in [Promises/A+](http://promises-aplus.github.com/promises-spec/). + +```javascript +var Promise = require('promise'); + +var promise = new Promise(function (resolve, reject) { + get('http://www.google.com', function (err, res) { + if (err) reject(err); + else resolve(res); + }); +}); +``` + +## API + +Before all examples, you will need: + +```js +var Promise = require('promise'); +``` + +### new Promise(resolver) + +This creates and returns a new promise. `resolver` must be a function. The `resolver` function is passed two arguments: + + 1. `resolve` should be called with a single argument. If it is called with a non-promise value then the promise is fulfilled with that value. If it is called with a promise (A) then the returned promise takes on the state of that new promise (A). + 2. `reject` should be called with a single argument. The returned promise will be rejected with that argument. + +### Static Functions + + These methods are invoked by calling `Promise.methodName`. + +#### Promise.resolve(value) + +(deprecated aliases: `Promise.from(value)`, `Promise.cast(value)`) + +Converts values and foreign promises into Promises/A+ promises. If you pass it a value then it returns a Promise for that value. If you pass it something that is close to a promise (such as a jQuery attempt at a promise) it returns a Promise that takes on the state of `value` (rejected or fulfilled). + +#### Promise.all(array) + +Returns a promise for an array. If it is called with a single argument that `Array.isArray` then this returns a promise for a copy of that array with any promises replaced by their fulfilled values. Otherwise it returns a promise for an array that conatins its arguments, except with promises replaced by their resolution values. e.g. + +```js +Promise.all([Promise.resolve('a'), 'b', Promise.resolve('c')]) + .then(function (res) { + assert(res[0] === 'a') + assert(res[1] === 'b') + assert(res[2] === 'c') + }) + +Promise.all(Promise.resolve('a'), 'b', Promise.resolve('c')) + .then(function (res) { + assert(res[0] === 'a') + assert(res[1] === 'b') + assert(res[2] === 'c') + }) +``` + +#### Promise.denodeify(fn) + +_Non Standard_ + +Takes a function which accepts a node style callback and returns a new function that returns a promise instead. + +e.g. + +```javascript +var fs = require('fs') + +var read = Promise.denodeify(fs.readFile) +var write = Promise.denodeify(fs.writeFile) + +var p = read('foo.json', 'utf8') + .then(function (str) { + return write('foo.json', JSON.stringify(JSON.parse(str), null, ' '), 'utf8') + }) +``` + +#### Promise.nodeify(fn) + +_Non Standard_ + +The twin to `denodeify` is useful when you want to export an API that can be used by people who haven't learnt about the brilliance of promises yet. + +```javascript +module.exports = Promise.nodeify(awesomeAPI) +function awesomeAPI(a, b) { + return download(a, b) +} +``` + +If the last argument passed to `module.exports` is a function, then it will be treated like a node.js callback and not parsed on to the child function, otherwise the API will just return a promise. + +### Prototype Methods + +These methods are invoked on a promise instance by calling `myPromise.methodName` + +### Promise#then(onFulfilled, onRejected) + +This method follows the [Promises/A+ spec](http://promises-aplus.github.io/promises-spec/). It explains things very clearly so I recommend you read it. + +Either `onFulfilled` or `onRejected` will be called and they will not be called more than once. They will be passed a single argument and will always be called asynchronously (in the next turn of the event loop). + +If the promise is fulfilled then `onFulfilled` is called. If the promise is rejected then `onRejected` is called. + +The call to `.then` also returns a promise. If the handler that is called returns a promise, the promise returned by `.then` takes on the state of that returned promise. If the handler that is called returns a value that is not a promise, the promise returned by `.then` will be fulfilled with that value. If the handler that is called throws an exception then the promise returned by `.then` is rejected with that exception. + +#### Promise#catch(onRejected) + +Sugar for `Promise#then(null, onRejected)`, to mirror `catch` in synchronous code. + +#### Promise#done(onFulfilled, onRejected) + +_Non Standard_ + +The same semantics as `.then` except that it does not return a promise and any exceptions are re-thrown so that they can be logged (crashing the application in non-browser environments) + +#### Promise#nodeify(callback) + +_Non Standard_ + +If `callback` is `null` or `undefined` it just returns `this`. If `callback` is a function it is called with rejection reason as the first argument and result as the second argument (as per the node.js convention). + +This lets you write API functions that look like: + +```javascript +function awesomeAPI(foo, bar, callback) { + return internalAPI(foo, bar) + .then(parseResult) + .then(null, retryErrors) + .nodeify(callback) +} +``` + +People who use typical node.js style callbacks will be able to just pass a callback and get the expected behavior. The enlightened people can not pass a callback and will get awesome promises. + +## Extending Promises + + There are three options for extending the promises created by this library. + +### Inheritance + + You can use inheritance if you want to create your own complete promise library with this as your basic starting point, perfect if you have lots of cool features you want to add. Here is an example of a promise library called `Awesome`, which is built on top of `Promise` correctly. + +```javascript +var Promise = require('promise'); +function Awesome(fn) { + if (!(this instanceof Awesome)) return new Awesome(fn); + Promise.call(this, fn); +} +Awesome.prototype = Object.create(Promise.prototype); +Awesome.prototype.constructor = Awesome; + +//Awesome extension +Awesome.prototype.spread = function (cb) { + return this.then(function (arr) { + return cb.apply(this, arr); + }) +}; +``` + + N.B. if you fail to set the prototype and constructor properly or fail to do Promise.call, things can fail in really subtle ways. + +### Wrap + + This is the nuclear option, for when you want to start from scratch. It ensures you won't be impacted by anyone who is extending the prototype (see below). + +```javascript +function Uber(fn) { + if (!(this instanceof Uber)) return new Uber(fn); + var _prom = new Promise(fn); + this.then = _prom.then; +} + +Uber.prototype.spread = function (cb) { + return this.then(function (arr) { + return cb.apply(this, arr); + }) +}; +``` + +### Extending the Prototype + + In general, you should never extend the prototype of this promise implimenation because your extensions could easily conflict with someone elses extensions. However, this organisation will host a library of extensions which do not conflict with each other, so you can safely enable any of those. If you think of an extension that we don't provide and you want to write it, submit an issue on this repository and (if I agree) I'll set you up with a repository and give you permission to commit to it. + +## License + + MIT diff --git a/node_modules/promise/core.js b/node_modules/promise/core.js new file mode 100644 index 0000000..5f332a2 --- /dev/null +++ b/node_modules/promise/core.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('./lib/core.js'); + +console.error('require("promise/core") is deprecated, use require("promise/lib/core") instead.'); diff --git a/node_modules/promise/index.js b/node_modules/promise/index.js new file mode 100644 index 0000000..17d5ed1 --- /dev/null +++ b/node_modules/promise/index.js @@ -0,0 +1,6 @@ +'use strict'; + +module.exports = require('./lib/core.js') +require('./lib/done.js') +require('./lib/es6-extensions.js') +require('./lib/node-extensions.js') \ No newline at end of file diff --git a/node_modules/promise/lib/core.js b/node_modules/promise/lib/core.js new file mode 100644 index 0000000..05a4313 --- /dev/null +++ b/node_modules/promise/lib/core.js @@ -0,0 +1,105 @@ +'use strict'; + +var asap = require('asap') + +module.exports = Promise; +function Promise(fn) { + if (typeof this !== 'object') throw new TypeError('Promises must be constructed via new') + if (typeof fn !== 'function') throw new TypeError('not a function') + var state = null + var value = null + var deferreds = [] + var self = this + + this.then = function(onFulfilled, onRejected) { + return new self.constructor(function(resolve, reject) { + handle(new Handler(onFulfilled, onRejected, resolve, reject)) + }) + } + + function handle(deferred) { + if (state === null) { + deferreds.push(deferred) + return + } + asap(function() { + var cb = state ? deferred.onFulfilled : deferred.onRejected + if (cb === null) { + (state ? deferred.resolve : deferred.reject)(value) + return + } + var ret + try { + ret = cb(value) + } + catch (e) { + deferred.reject(e) + return + } + deferred.resolve(ret) + }) + } + + function resolve(newValue) { + try { //Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure + if (newValue === self) throw new TypeError('A promise cannot be resolved with itself.') + if (newValue && (typeof newValue === 'object' || typeof newValue === 'function')) { + var then = newValue.then + if (typeof then === 'function') { + doResolve(then.bind(newValue), resolve, reject) + return + } + } + state = true + value = newValue + finale() + } catch (e) { reject(e) } + } + + function reject(newValue) { + state = false + value = newValue + finale() + } + + function finale() { + for (var i = 0, len = deferreds.length; i < len; i++) + handle(deferreds[i]) + deferreds = null + } + + doResolve(fn, resolve, reject) +} + + +function Handler(onFulfilled, onRejected, resolve, reject){ + this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null + this.onRejected = typeof onRejected === 'function' ? onRejected : null + this.resolve = resolve + this.reject = reject +} + +/** + * Take a potentially misbehaving resolver function and make sure + * onFulfilled and onRejected are only called once. + * + * Makes no guarantees about asynchrony. + */ +function doResolve(fn, onFulfilled, onRejected) { + var done = false; + try { + fn(function (value) { + if (done) return + done = true + onFulfilled(value) + }, function (reason) { + if (done) return + done = true + onRejected(reason) + }) + } catch (ex) { + if (done) return + done = true + onRejected(ex) + } +} diff --git a/node_modules/promise/lib/done.js b/node_modules/promise/lib/done.js new file mode 100644 index 0000000..2da6208 --- /dev/null +++ b/node_modules/promise/lib/done.js @@ -0,0 +1,14 @@ +'use strict'; + +var Promise = require('./core.js') +var asap = require('asap') + +module.exports = Promise +Promise.prototype.done = function (onFulfilled, onRejected) { + var self = arguments.length ? this.then.apply(this, arguments) : this + self.then(null, function (err) { + asap(function () { + throw err + }) + }) +} \ No newline at end of file diff --git a/node_modules/promise/lib/es6-extensions.js b/node_modules/promise/lib/es6-extensions.js new file mode 100644 index 0000000..084c1cd --- /dev/null +++ b/node_modules/promise/lib/es6-extensions.js @@ -0,0 +1,108 @@ +'use strict'; + +//This file contains the ES6 extensions to the core Promises/A+ API + +var Promise = require('./core.js') +var asap = require('asap') + +module.exports = Promise + +/* Static Functions */ + +function ValuePromise(value) { + this.then = function (onFulfilled) { + if (typeof onFulfilled !== 'function') return this + return new Promise(function (resolve, reject) { + asap(function () { + try { + resolve(onFulfilled(value)) + } catch (ex) { + reject(ex); + } + }) + }) + } +} +ValuePromise.prototype = Promise.prototype + +var TRUE = new ValuePromise(true) +var FALSE = new ValuePromise(false) +var NULL = new ValuePromise(null) +var UNDEFINED = new ValuePromise(undefined) +var ZERO = new ValuePromise(0) +var EMPTYSTRING = new ValuePromise('') + +Promise.resolve = function (value) { + if (value instanceof Promise) return value + + if (value === null) return NULL + if (value === undefined) return UNDEFINED + if (value === true) return TRUE + if (value === false) return FALSE + if (value === 0) return ZERO + if (value === '') return EMPTYSTRING + + if (typeof value === 'object' || typeof value === 'function') { + try { + var then = value.then + if (typeof then === 'function') { + return new Promise(then.bind(value)) + } + } catch (ex) { + return new Promise(function (resolve, reject) { + reject(ex) + }) + } + } + + return new ValuePromise(value) +} + +Promise.all = function (arr) { + var args = Array.prototype.slice.call(arr) + + return new Promise(function (resolve, reject) { + if (args.length === 0) return resolve([]) + var remaining = args.length + function res(i, val) { + try { + if (val && (typeof val === 'object' || typeof val === 'function')) { + var then = val.then + if (typeof then === 'function') { + then.call(val, function (val) { res(i, val) }, reject) + return + } + } + args[i] = val + if (--remaining === 0) { + resolve(args); + } + } catch (ex) { + reject(ex) + } + } + for (var i = 0; i < args.length; i++) { + res(i, args[i]) + } + }) +} + +Promise.reject = function (value) { + return new Promise(function (resolve, reject) { + reject(value); + }); +} + +Promise.race = function (values) { + return new Promise(function (resolve, reject) { + values.forEach(function(value){ + Promise.resolve(value).then(resolve, reject); + }) + }); +} + +/* Prototype Methods */ + +Promise.prototype['catch'] = function (onRejected) { + return this.then(null, onRejected); +} diff --git a/node_modules/promise/lib/node-extensions.js b/node_modules/promise/lib/node-extensions.js new file mode 100644 index 0000000..5e60f9e --- /dev/null +++ b/node_modules/promise/lib/node-extensions.js @@ -0,0 +1,63 @@ +'use strict'; + +//This file contains then/promise specific extensions that are only useful for node.js interop + +var Promise = require('./core.js') +var asap = require('asap') + +module.exports = Promise + +/* Static Functions */ + +Promise.denodeify = function (fn, argumentCount) { + argumentCount = argumentCount || Infinity + return function () { + var self = this + var args = Array.prototype.slice.call(arguments) + return new Promise(function (resolve, reject) { + while (args.length && args.length > argumentCount) { + args.pop() + } + args.push(function (err, res) { + if (err) reject(err) + else resolve(res) + }) + var res = fn.apply(self, args) + if (res && (typeof res === 'object' || typeof res === 'function') && typeof res.then === 'function') { + resolve(res) + } + }) + } +} +Promise.nodeify = function (fn) { + return function () { + var args = Array.prototype.slice.call(arguments) + var callback = typeof args[args.length - 1] === 'function' ? args.pop() : null + var ctx = this + try { + return fn.apply(this, arguments).nodeify(callback, ctx) + } catch (ex) { + if (callback === null || typeof callback == 'undefined') { + return new Promise(function (resolve, reject) { reject(ex) }) + } else { + asap(function () { + callback.call(ctx, ex) + }) + } + } + } +} + +Promise.prototype.nodeify = function (callback, ctx) { + if (typeof callback != 'function') return this + + this.then(function (value) { + asap(function () { + callback.call(ctx, null, value) + }) + }, function (err) { + asap(function () { + callback.call(ctx, err) + }) + }) +} diff --git a/node_modules/promise/package.json b/node_modules/promise/package.json new file mode 100644 index 0000000..1b69a3d --- /dev/null +++ b/node_modules/promise/package.json @@ -0,0 +1,90 @@ +{ + "_args": [ + [ + { + "raw": "promise@^6.0.1", + "scope": null, + "escapedName": "promise", + "name": "promise", + "rawSpec": "^6.0.1", + "spec": ">=6.0.1 <7.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/jstransformer" + ] + ], + "_from": "promise@>=6.0.1 <7.0.0", + "_id": "promise@6.1.0", + "_inCache": true, + "_location": "/promise", + "_npmUser": { + "name": "forbeslindesay", + "email": "forbes@lindesay.co.uk" + }, + "_npmVersion": "1.5.0-alpha-4", + "_phantomChildren": {}, + "_requested": { + "raw": "promise@^6.0.1", + "scope": null, + "escapedName": "promise", + "name": "promise", + "rawSpec": "^6.0.1", + "spec": ">=6.0.1 <7.0.0", + "type": "range" + }, + "_requiredBy": [ + "/jstransformer" + ], + "_resolved": "https://registry.npmjs.org/promise/-/promise-6.1.0.tgz", + "_shasum": "2ce729f6b94b45c26891ad0602c5c90e04c6eef6", + "_shrinkwrap": null, + "_spec": "promise@^6.0.1", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/jstransformer", + "author": { + "name": "ForbesLindesay" + }, + "bugs": { + "url": "https://github.com/then/promise/issues" + }, + "dependencies": { + "asap": "~1.0.0" + }, + "description": "Bare bones Promises/A+ implementation", + "devDependencies": { + "better-assert": "*", + "mocha": "*", + "promises-aplus-tests": "*" + }, + "directories": {}, + "dist": { + "shasum": "2ce729f6b94b45c26891ad0602c5c90e04c6eef6", + "tarball": "https://registry.npmjs.org/promise/-/promise-6.1.0.tgz" + }, + "gitHead": "c627c0cc1f886ed3aa26edec97838ec9e7dd858b", + "homepage": "https://github.com/then/promise", + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "forbeslindesay", + "email": "forbes@lindesay.co.uk" + }, + { + "name": "nathan7", + "email": "nathan@nathan7.eu" + } + ], + "name": "promise", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/then/promise.git" + }, + "scripts": { + "test": "mocha --timeout 200 --slow 99999", + "test-extensions": "mocha test/extensions-tests.js -R spec --timeout 200 --slow 999999", + "test-resolve": "mocha test/resolver-tests.js -R spec --timeout 200 --slow 999999" + }, + "version": "6.1.0" +} diff --git a/node_modules/promise/polyfill-done.js b/node_modules/promise/polyfill-done.js new file mode 100644 index 0000000..e50b4c0 --- /dev/null +++ b/node_modules/promise/polyfill-done.js @@ -0,0 +1,12 @@ +// should work in any browser without browserify + +if (typeof Promise.prototype.done !== 'function') { + Promise.prototype.done = function (onFulfilled, onRejected) { + var self = arguments.length ? this.then.apply(this, arguments) : this + self.then(null, function (err) { + setTimeout(function () { + throw err + }, 0) + }) + } +} \ No newline at end of file diff --git a/node_modules/promise/polyfill.js b/node_modules/promise/polyfill.js new file mode 100644 index 0000000..db099f8 --- /dev/null +++ b/node_modules/promise/polyfill.js @@ -0,0 +1,10 @@ +// not "use strict" so we can declare global "Promise" + +var asap = require('asap'); + +if (typeof Promise === 'undefined') { + Promise = require('./lib/core.js') + require('./lib/es6-extensions.js') +} + +require('./polyfill-done.js'); diff --git a/node_modules/proto-list/LICENSE b/node_modules/proto-list/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/node_modules/proto-list/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/proto-list/README.md b/node_modules/proto-list/README.md new file mode 100644 index 0000000..43cfa35 --- /dev/null +++ b/node_modules/proto-list/README.md @@ -0,0 +1,3 @@ +A list of objects, bound by their prototype chain. + +Used in npm's config stuff. diff --git a/node_modules/proto-list/package.json b/node_modules/proto-list/package.json new file mode 100644 index 0000000..f6ed714 --- /dev/null +++ b/node_modules/proto-list/package.json @@ -0,0 +1,83 @@ +{ + "_args": [ + [ + { + "raw": "proto-list@~1.2.1", + "scope": null, + "escapedName": "proto-list", + "name": "proto-list", + "rawSpec": "~1.2.1", + "spec": ">=1.2.1 <1.3.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/config-chain" + ] + ], + "_from": "proto-list@>=1.2.1 <1.3.0", + "_id": "proto-list@1.2.4", + "_inCache": true, + "_location": "/proto-list", + "_nodeVersion": "2.0.1", + "_npmUser": { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + "_npmVersion": "2.10.0", + "_phantomChildren": {}, + "_requested": { + "raw": "proto-list@~1.2.1", + "scope": null, + "escapedName": "proto-list", + "name": "proto-list", + "rawSpec": "~1.2.1", + "spec": ">=1.2.1 <1.3.0", + "type": "range" + }, + "_requiredBy": [ + "/config-chain" + ], + "_resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", + "_shasum": "212d5bfe1318306a420f6402b8e26ff39647a849", + "_shrinkwrap": null, + "_spec": "proto-list@~1.2.1", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/config-chain", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/proto-list/issues" + }, + "dependencies": {}, + "description": "A utility for managing a prototype chain", + "devDependencies": { + "tap": "0" + }, + "directories": {}, + "dist": { + "shasum": "212d5bfe1318306a420f6402b8e26ff39647a849", + "tarball": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz" + }, + "gitHead": "9e4af12d4dddee2fd531f0fe0c21c9cfacb78ac0", + "homepage": "https://github.com/isaacs/proto-list#readme", + "license": "ISC", + "main": "./proto-list.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "proto-list", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/proto-list.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "1.2.4" +} diff --git a/node_modules/proto-list/proto-list.js b/node_modules/proto-list/proto-list.js new file mode 100644 index 0000000..b55c25c --- /dev/null +++ b/node_modules/proto-list/proto-list.js @@ -0,0 +1,88 @@ + +module.exports = ProtoList + +function setProto(obj, proto) { + if (typeof Object.setPrototypeOf === "function") + return Object.setPrototypeOf(obj, proto) + else + obj.__proto__ = proto +} + +function ProtoList () { + this.list = [] + var root = null + Object.defineProperty(this, 'root', { + get: function () { return root }, + set: function (r) { + root = r + if (this.list.length) { + setProto(this.list[this.list.length - 1], r) + } + }, + enumerable: true, + configurable: true + }) +} + +ProtoList.prototype = + { get length () { return this.list.length } + , get keys () { + var k = [] + for (var i in this.list[0]) k.push(i) + return k + } + , get snapshot () { + var o = {} + this.keys.forEach(function (k) { o[k] = this.get(k) }, this) + return o + } + , get store () { + return this.list[0] + } + , push : function (obj) { + if (typeof obj !== "object") obj = {valueOf:obj} + if (this.list.length >= 1) { + setProto(this.list[this.list.length - 1], obj) + } + setProto(obj, this.root) + return this.list.push(obj) + } + , pop : function () { + if (this.list.length >= 2) { + setProto(this.list[this.list.length - 2], this.root) + } + return this.list.pop() + } + , unshift : function (obj) { + setProto(obj, this.list[0] || this.root) + return this.list.unshift(obj) + } + , shift : function () { + if (this.list.length === 1) { + setProto(this.list[0], this.root) + } + return this.list.shift() + } + , get : function (key) { + return this.list[0][key] + } + , set : function (key, val, save) { + if (!this.length) this.push({}) + if (save && this.list[0].hasOwnProperty(key)) this.push({}) + return this.list[0][key] = val + } + , forEach : function (fn, thisp) { + for (var key in this.list[0]) fn.call(thisp, key, this.list[0][key]) + } + , slice : function () { + return this.list.slice.apply(this.list, arguments) + } + , splice : function () { + // handle injections + var ret = this.list.splice.apply(this.list, arguments) + for (var i = 0, l = this.list.length; i < l; i++) { + setProto(this.list[i], this.list[i + 1] || this.root) + } + return ret + } + } diff --git a/node_modules/proto-list/test/basic.js b/node_modules/proto-list/test/basic.js new file mode 100644 index 0000000..5cd66be --- /dev/null +++ b/node_modules/proto-list/test/basic.js @@ -0,0 +1,61 @@ +var tap = require("tap") + , test = tap.test + , ProtoList = require("../proto-list.js") + +tap.plan(1) + +tap.test("protoList tests", function (t) { + var p = new ProtoList + p.push({foo:"bar"}) + p.push({}) + p.set("foo", "baz") + t.equal(p.get("foo"), "baz") + + var p = new ProtoList + p.push({foo:"bar"}) + p.set("foo", "baz") + t.equal(p.get("foo"), "baz") + t.equal(p.length, 1) + p.pop() + t.equal(p.length, 0) + p.set("foo", "asdf") + t.equal(p.length, 1) + t.equal(p.get("foo"), "asdf") + p.push({bar:"baz"}) + t.equal(p.length, 2) + t.equal(p.get("foo"), "asdf") + p.shift() + t.equal(p.length, 1) + t.equal(p.get("foo"), undefined) + + + p.unshift({foo:"blo", bar:"rab"}) + p.unshift({foo:"boo"}) + t.equal(p.length, 3) + t.equal(p.get("foo"), "boo") + t.equal(p.get("bar"), "rab") + + var ret = p.splice(1, 1, {bar:"bar"}) + t.same(ret, [{foo:"blo", bar:"rab"}]) + t.equal(p.get("bar"), "bar") + + // should not inherit default object properties + t.equal(p.get('hasOwnProperty'), undefined) + + // unless we give it those. + p.root = {} + t.equal(p.get('hasOwnProperty'), {}.hasOwnProperty) + + p.root = {default:'monkey'} + t.equal(p.get('default'), 'monkey') + + p.push({red:'blue'}) + p.push({red:'blue'}) + p.push({red:'blue'}) + while (p.length) { + t.equal(p.get('default'), 'monkey') + p.shift() + } + + t.end() +}) diff --git a/node_modules/proxy-addr/HISTORY.md b/node_modules/proxy-addr/HISTORY.md new file mode 100644 index 0000000..9a62abc --- /dev/null +++ b/node_modules/proxy-addr/HISTORY.md @@ -0,0 +1,109 @@ +1.1.4 / 2017-03-24 +================== + + * deps: ipaddr.js@1.3.0 + +1.1.3 / 2017-01-14 +================== + + * deps: ipaddr.js@1.2.0 + +1.1.2 / 2016-05-29 +================== + + * deps: ipaddr.js@1.1.1 + - Fix IPv6-mapped IPv4 validation edge cases + +1.1.1 / 2016-05-03 +================== + + * Fix regression matching mixed versions against multiple subnets + +1.1.0 / 2016-05-01 +================== + + * Fix accepting various invalid netmasks + - IPv4 netmasks must be contingous + - IPv6 addresses cannot be used as a netmask + * deps: ipaddr.js@1.1.0 + +1.0.10 / 2015-12-09 +=================== + + * deps: ipaddr.js@1.0.5 + - Fix regression in `isValid` with non-string arguments + +1.0.9 / 2015-12-01 +================== + + * deps: ipaddr.js@1.0.4 + - Fix accepting some invalid IPv6 addresses + - Reject CIDRs with negative or overlong masks + * perf: enable strict mode + +1.0.8 / 2015-05-10 +================== + + * deps: ipaddr.js@1.0.1 + +1.0.7 / 2015-03-16 +================== + + * deps: ipaddr.js@0.1.9 + - Fix OOM on certain inputs to `isValid` + +1.0.6 / 2015-02-01 +================== + + * deps: ipaddr.js@0.1.8 + +1.0.5 / 2015-01-08 +================== + + * deps: ipaddr.js@0.1.6 + +1.0.4 / 2014-11-23 +================== + + * deps: ipaddr.js@0.1.5 + - Fix edge cases with `isValid` + +1.0.3 / 2014-09-21 +================== + + * Use `forwarded` npm module + +1.0.2 / 2014-09-18 +================== + + * Fix a global leak when multiple subnets are trusted + * Support Node.js 0.6 + * deps: ipaddr.js@0.1.3 + +1.0.1 / 2014-06-03 +================== + + * Fix links in npm package + +1.0.0 / 2014-05-08 +================== + + * Add `trust` argument to determine proxy trust on + * Accepts custom function + * Accepts IPv4/IPv6 address(es) + * Accepts subnets + * Accepts pre-defined names + * Add optional `trust` argument to `proxyaddr.all` to + stop at first untrusted + * Add `proxyaddr.compile` to pre-compile `trust` function + to make subsequent calls faster + +0.0.1 / 2014-05-04 +================== + + * Fix bad npm publish + +0.0.0 / 2014-05-04 +================== + + * Initial release diff --git a/node_modules/proxy-addr/LICENSE b/node_modules/proxy-addr/LICENSE new file mode 100644 index 0000000..cab251c --- /dev/null +++ b/node_modules/proxy-addr/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2014-2016 Douglas Christopher Wilson + +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. diff --git a/node_modules/proxy-addr/README.md b/node_modules/proxy-addr/README.md new file mode 100644 index 0000000..6b1075a --- /dev/null +++ b/node_modules/proxy-addr/README.md @@ -0,0 +1,140 @@ +# proxy-addr + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +Determine address of proxied request + +## Install + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```sh +$ npm install proxy-addr +``` + +## API + +```js +var proxyaddr = require('proxy-addr') +``` + +### proxyaddr(req, trust) + +Return the address of the request, using the given `trust` parameter. + +The `trust` argument is a function that returns `true` if you trust +the address, `false` if you don't. The closest untrusted address is +returned. + +```js +proxyaddr(req, function(addr){ return addr === '127.0.0.1' }) +proxyaddr(req, function(addr, i){ return i < 1 }) +``` + +The `trust` arugment may also be a single IP address string or an +array of trusted addresses, as plain IP addresses, CIDR-formatted +strings, or IP/netmask strings. + +```js +proxyaddr(req, '127.0.0.1') +proxyaddr(req, ['127.0.0.0/8', '10.0.0.0/8']) +proxyaddr(req, ['127.0.0.0/255.0.0.0', '192.168.0.0/255.255.0.0']) +``` + +This module also supports IPv6. Your IPv6 addresses will be normalized +automatically (i.e. `fe80::00ed:1` equals `fe80:0:0:0:0:0:ed:1`). + +```js +proxyaddr(req, '::1') +proxyaddr(req, ['::1/128', 'fe80::/10']) +``` + +This module will automatically work with IPv4-mapped IPv6 addresses +as well to support node.js in IPv6-only mode. This means that you do +not have to specify both `::ffff:a00:1` and `10.0.0.1`. + +As a convenience, this module also takes certain pre-defined names +in addition to IP addresses, which expand into IP addresses: + +```js +proxyaddr(req, 'loopback') +proxyaddr(req, ['loopback', 'fc00:ac:1ab5:fff::1/64']) +``` + + * `loopback`: IPv4 and IPv6 loopback addresses (like `::1` and + `127.0.0.1`). + * `linklocal`: IPv4 and IPv6 link-local addresses (like + `fe80::1:1:1:1` and `169.254.0.1`). + * `uniquelocal`: IPv4 private addresses and IPv6 unique-local + addresses (like `fc00:ac:1ab5:fff::1` and `192.168.0.1`). + +When `trust` is specified as a function, it will be called for each +address to determine if it is a trusted address. The function is +given two arguments: `addr` and `i`, where `addr` is a string of +the address to check and `i` is a number that represents the distance +from the socket address. + +### proxyaddr.all(req, [trust]) + +Return all the addresses of the request, optionally stopping at the +first untrusted. This array is ordered from closest to furthest +(i.e. `arr[0] === req.connection.remoteAddress`). + +```js +proxyaddr.all(req) +``` + +The optional `trust` argument takes the same arguments as `trust` +does in `proxyaddr(req, trust)`. + +```js +proxyaddr.all(req, 'loopback') +``` + +### proxyaddr.compile(val) + +Compiles argument `val` into a `trust` function. This function takes +the same arguments as `trust` does in `proxyaddr(req, trust)` and +returns a function suitable for `proxyaddr(req, trust)`. + +```js +var trust = proxyaddr.compile('localhost') +var addr = proxyaddr(req, trust) +``` + +This function is meant to be optimized for use against every request. +It is recommend to compile a trust function up-front for the trusted +configuration and pass that to `proxyaddr(req, trust)` for each request. + +## Testing + +```sh +$ npm test +``` + +## Benchmarks + +```sh +$ npm run-script bench +``` + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/proxy-addr.svg +[npm-url]: https://npmjs.org/package/proxy-addr +[node-version-image]: https://img.shields.io/node/v/proxy-addr.svg +[node-version-url]: https://nodejs.org/en/download/ +[travis-image]: https://img.shields.io/travis/jshttp/proxy-addr/master.svg +[travis-url]: https://travis-ci.org/jshttp/proxy-addr +[coveralls-image]: https://img.shields.io/coveralls/jshttp/proxy-addr/master.svg +[coveralls-url]: https://coveralls.io/r/jshttp/proxy-addr?branch=master +[downloads-image]: https://img.shields.io/npm/dm/proxy-addr.svg +[downloads-url]: https://npmjs.org/package/proxy-addr diff --git a/node_modules/proxy-addr/index.js b/node_modules/proxy-addr/index.js new file mode 100644 index 0000000..2dad636 --- /dev/null +++ b/node_modules/proxy-addr/index.js @@ -0,0 +1,325 @@ +/*! + * proxy-addr + * Copyright(c) 2014-2016 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + * @public + */ + +module.exports = proxyaddr; +module.exports.all = alladdrs; +module.exports.compile = compile; + +/** + * Module dependencies. + * @private + */ + +var forwarded = require('forwarded'); +var ipaddr = require('ipaddr.js'); + +/** + * Variables. + * @private + */ + +var digitre = /^[0-9]+$/; +var isip = ipaddr.isValid; +var parseip = ipaddr.parse; + +/** + * Pre-defined IP ranges. + * @private + */ + +var ipranges = { + linklocal: ['169.254.0.0/16', 'fe80::/10'], + loopback: ['127.0.0.1/8', '::1/128'], + uniquelocal: ['10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16', 'fc00::/7'] +}; + +/** + * Get all addresses in the request, optionally stopping + * at the first untrusted. + * + * @param {Object} request + * @param {Function|Array|String} [trust] + * @public + */ + +function alladdrs(req, trust) { + // get addresses + var addrs = forwarded(req); + + if (!trust) { + // Return all addresses + return addrs; + } + + if (typeof trust !== 'function') { + trust = compile(trust); + } + + for (var i = 0; i < addrs.length - 1; i++) { + if (trust(addrs[i], i)) continue; + + addrs.length = i + 1; + } + + return addrs; +} + +/** + * Compile argument into trust function. + * + * @param {Array|String} val + * @private + */ + +function compile(val) { + if (!val) { + throw new TypeError('argument is required'); + } + + var trust = typeof val === 'string' + ? [val] + : val; + + if (!Array.isArray(trust)) { + throw new TypeError('unsupported trust argument'); + } + + for (var i = 0; i < trust.length; i++) { + val = trust[i]; + + if (!ipranges.hasOwnProperty(val)) { + continue; + } + + // Splice in pre-defined range + val = ipranges[val]; + trust.splice.apply(trust, [i, 1].concat(val)); + i += val.length - 1; + } + + return compileTrust(compileRangeSubnets(trust)); +} + +/** + * Compile `arr` elements into range subnets. + * + * @param {Array} arr + * @private + */ + +function compileRangeSubnets(arr) { + var rangeSubnets = new Array(arr.length); + + for (var i = 0; i < arr.length; i++) { + rangeSubnets[i] = parseipNotation(arr[i]); + } + + return rangeSubnets; +} + +/** + * Compile range subnet array into trust function. + * + * @param {Array} rangeSubnets + * @private + */ + +function compileTrust(rangeSubnets) { + // Return optimized function based on length + var len = rangeSubnets.length; + return len === 0 + ? trustNone + : len === 1 + ? trustSingle(rangeSubnets[0]) + : trustMulti(rangeSubnets); +} + +/** + * Parse IP notation string into range subnet. + * + * @param {String} note + * @private + */ + +function parseipNotation(note) { + var pos = note.lastIndexOf('/'); + var str = pos !== -1 + ? note.substring(0, pos) + : note; + + if (!isip(str)) { + throw new TypeError('invalid IP address: ' + str); + } + + var ip = parseip(str); + + if (pos === -1 && ip.kind() === 'ipv6' && ip.isIPv4MappedAddress()) { + // Store as IPv4 + ip = ip.toIPv4Address(); + } + + var max = ip.kind() === 'ipv6' + ? 128 + : 32; + + var range = pos !== -1 + ? note.substring(pos + 1, note.length) + : null; + + if (range === null) { + range = max; + } else if (digitre.test(range)) { + range = parseInt(range, 10); + } else if (ip.kind() === 'ipv4' && isip(range)) { + range = parseNetmask(range); + } else { + range = null; + } + + if (range <= 0 || range > max) { + throw new TypeError('invalid range on address: ' + note); + } + + return [ip, range]; +} + +/** + * Parse netmask string into CIDR range. + * + * @param {String} netmask + * @private + */ + +function parseNetmask(netmask) { + var ip = parseip(netmask); + var kind = ip.kind(); + + return kind === 'ipv4' + ? ip.prefixLengthFromSubnetMask() + : null; +} + +/** + * Determine address of proxied request. + * + * @param {Object} request + * @param {Function|Array|String} trust + * @public + */ + +function proxyaddr(req, trust) { + if (!req) { + throw new TypeError('req argument is required'); + } + + if (!trust) { + throw new TypeError('trust argument is required'); + } + + var addrs = alladdrs(req, trust); + var addr = addrs[addrs.length - 1]; + + return addr; +} + +/** + * Static trust function to trust nothing. + * + * @private + */ + +function trustNone() { + return false; +} + +/** + * Compile trust function for multiple subnets. + * + * @param {Array} subnets + * @private + */ + +function trustMulti(subnets) { + return function trust(addr) { + if (!isip(addr)) return false; + + var ip = parseip(addr); + var ipconv; + var kind = ip.kind(); + + for (var i = 0; i < subnets.length; i++) { + var subnet = subnets[i]; + var subnetip = subnet[0]; + var subnetkind = subnetip.kind(); + var subnetrange = subnet[1]; + var trusted = ip; + + if (kind !== subnetkind) { + if (subnetkind === 'ipv4' && !ip.isIPv4MappedAddress()) { + // Incompatible IP addresses + continue; + } + + if (!ipconv) { + // Convert IP to match subnet IP kind + ipconv = subnetkind === 'ipv4' + ? ip.toIPv4Address() + : ip.toIPv4MappedAddress(); + } + + trusted = ipconv; + } + + if (trusted.match(subnetip, subnetrange)) { + return true; + } + } + + return false; + }; +} + +/** + * Compile trust function for single subnet. + * + * @param {Object} subnet + * @private + */ + +function trustSingle(subnet) { + var subnetip = subnet[0]; + var subnetkind = subnetip.kind(); + var subnetisipv4 = subnetkind === 'ipv4'; + var subnetrange = subnet[1]; + + return function trust(addr) { + if (!isip(addr)) return false; + + var ip = parseip(addr); + var kind = ip.kind(); + + if (kind !== subnetkind) { + if (subnetisipv4 && !ip.isIPv4MappedAddress()) { + // Incompatible IP addresses + return false; + } + + // Convert IP to match subnet IP kind + ip = subnetisipv4 + ? ip.toIPv4Address() + : ip.toIPv4MappedAddress(); + } + + return ip.match(subnetip, subnetrange); + }; +} diff --git a/node_modules/proxy-addr/package.json b/node_modules/proxy-addr/package.json new file mode 100644 index 0000000..c6a55fd --- /dev/null +++ b/node_modules/proxy-addr/package.json @@ -0,0 +1,108 @@ +{ + "_args": [ + [ + { + "raw": "proxy-addr@~1.1.3", + "scope": null, + "escapedName": "proxy-addr", + "name": "proxy-addr", + "rawSpec": "~1.1.3", + "spec": ">=1.1.3 <1.2.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/express" + ] + ], + "_from": "proxy-addr@>=1.1.3 <1.2.0", + "_id": "proxy-addr@1.1.4", + "_inCache": true, + "_location": "/proxy-addr", + "_nodeVersion": "4.7.3", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/proxy-addr-1.1.4.tgz_1490396252699_0.9566438721958548" + }, + "_npmUser": { + "name": "dougwilson", + "email": "doug@somethingdoug.com" + }, + "_npmVersion": "2.15.11", + "_phantomChildren": {}, + "_requested": { + "raw": "proxy-addr@~1.1.3", + "scope": null, + "escapedName": "proxy-addr", + "name": "proxy-addr", + "rawSpec": "~1.1.3", + "spec": ">=1.1.3 <1.2.0", + "type": "range" + }, + "_requiredBy": [ + "/express" + ], + "_resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.1.4.tgz", + "_shasum": "27e545f6960a44a627d9b44467e35c1b6b4ce2f3", + "_shrinkwrap": null, + "_spec": "proxy-addr@~1.1.3", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/express", + "author": { + "name": "Douglas Christopher Wilson", + "email": "doug@somethingdoug.com" + }, + "bugs": { + "url": "https://github.com/jshttp/proxy-addr/issues" + }, + "dependencies": { + "forwarded": "~0.1.0", + "ipaddr.js": "1.3.0" + }, + "description": "Determine address of proxied request", + "devDependencies": { + "beautify-benchmark": "0.2.4", + "benchmark": "2.1.3", + "istanbul": "0.4.5", + "mocha": "~1.21.5" + }, + "directories": {}, + "dist": { + "shasum": "27e545f6960a44a627d9b44467e35c1b6b4ce2f3", + "tarball": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.1.4.tgz" + }, + "engines": { + "node": ">= 0.6" + }, + "files": [ + "LICENSE", + "HISTORY.md", + "README.md", + "index.js" + ], + "gitHead": "4c636264c036d9825e8a3cf50555a272e3246fe6", + "homepage": "https://github.com/jshttp/proxy-addr#readme", + "keywords": [ + "ip", + "proxy", + "x-forwarded-for" + ], + "license": "MIT", + "maintainers": [ + { + "name": "dougwilson", + "email": "doug@somethingdoug.com" + } + ], + "name": "proxy-addr", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jshttp/proxy-addr.git" + }, + "scripts": { + "bench": "node benchmark/index.js", + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" + }, + "version": "1.1.4" +} diff --git a/node_modules/pseudomap/LICENSE b/node_modules/pseudomap/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/node_modules/pseudomap/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/pseudomap/README.md b/node_modules/pseudomap/README.md new file mode 100644 index 0000000..778bf01 --- /dev/null +++ b/node_modules/pseudomap/README.md @@ -0,0 +1,60 @@ +# pseudomap + +A thing that is a lot like ES6 `Map`, but without iterators, for use +in environments where `for..of` syntax and `Map` are not available. + +If you need iterators, or just in general a more faithful polyfill to +ES6 Maps, check out [es6-map](http://npm.im/es6-map). + +If you are in an environment where `Map` is supported, then that will +be returned instead, unless `process.env.TEST_PSEUDOMAP` is set. + +You can use any value as keys, and any value as data. Setting again +with the identical key will overwrite the previous value. + +Internally, data is stored on an `Object.create(null)` style object. +The key is coerced to a string to generate the key on the internal +data-bag object. The original key used is stored along with the data. + +In the event of a stringified-key collision, a new key is generated by +appending an increasing number to the stringified-key until finding +either the intended key or an empty spot. + +Note that because object traversal order of plain objects is not +guaranteed to be identical to insertion order, the insertion order +guarantee of `Map.prototype.forEach` is not guaranteed in this +implementation. However, in all versions of Node.js and V8 where this +module works, `forEach` does traverse data in insertion order. + +## API + +Most of the [Map +API](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map), +with the following exceptions: + +1. A `Map` object is not an iterator. +2. `values`, `keys`, and `entries` methods are not implemented, + because they return iterators. +3. The argument to the constructor can be an Array of `[key, value]` + pairs, or a `Map` or `PseudoMap` object. But, since iterators + aren't used, passing any plain-old iterator won't initialize the + map properly. + +## USAGE + +Use just like a regular ES6 Map. + +```javascript +var PseudoMap = require('pseudomap') + +// optionally provide a pseudomap, or an array of [key,value] pairs +// as the argument to initialize the map with +var myMap = new PseudoMap() + +myMap.set(1, 'number 1') +myMap.set('1', 'string 1') +var akey = {} +var bkey = {} +myMap.set(akey, { some: 'data' }) +myMap.set(bkey, { some: 'other data' }) +``` diff --git a/node_modules/pseudomap/map.js b/node_modules/pseudomap/map.js new file mode 100644 index 0000000..7db1599 --- /dev/null +++ b/node_modules/pseudomap/map.js @@ -0,0 +1,9 @@ +if (process.env.npm_package_name === 'pseudomap' && + process.env.npm_lifecycle_script === 'test') + process.env.TEST_PSEUDOMAP = 'true' + +if (typeof Map === 'function' && !process.env.TEST_PSEUDOMAP) { + module.exports = Map +} else { + module.exports = require('./pseudomap') +} diff --git a/node_modules/pseudomap/package.json b/node_modules/pseudomap/package.json new file mode 100644 index 0000000..e4ebc39 --- /dev/null +++ b/node_modules/pseudomap/package.json @@ -0,0 +1,86 @@ +{ + "_args": [ + [ + { + "raw": "pseudomap@^1.0.1", + "scope": null, + "escapedName": "pseudomap", + "name": "pseudomap", + "rawSpec": "^1.0.1", + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/lru-cache" + ] + ], + "_from": "pseudomap@>=1.0.1 <2.0.0", + "_id": "pseudomap@1.0.2", + "_inCache": true, + "_location": "/pseudomap", + "_nodeVersion": "4.0.0", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "_npmVersion": "3.3.2", + "_phantomChildren": {}, + "_requested": { + "raw": "pseudomap@^1.0.1", + "scope": null, + "escapedName": "pseudomap", + "name": "pseudomap", + "rawSpec": "^1.0.1", + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/editorconfig/lru-cache", + "/lru-cache" + ], + "_resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "_shasum": "f052a28da70e618917ef0a8ac34c1ae5a68286b3", + "_shrinkwrap": null, + "_spec": "pseudomap@^1.0.1", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/lru-cache", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/pseudomap/issues" + }, + "dependencies": {}, + "description": "A thing that is a lot like ES6 `Map`, but without iterators, for use in environments where `for..of` syntax and `Map` are not available.", + "devDependencies": { + "tap": "^2.3.1" + }, + "directories": { + "test": "test" + }, + "dist": { + "shasum": "f052a28da70e618917ef0a8ac34c1ae5a68286b3", + "tarball": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz" + }, + "gitHead": "b6dc728207a0321ede6479e34506d3e0e13a940b", + "homepage": "https://github.com/isaacs/pseudomap#readme", + "license": "ISC", + "main": "map.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "pseudomap", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/pseudomap.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "1.0.2" +} diff --git a/node_modules/pseudomap/pseudomap.js b/node_modules/pseudomap/pseudomap.js new file mode 100644 index 0000000..25a21d8 --- /dev/null +++ b/node_modules/pseudomap/pseudomap.js @@ -0,0 +1,113 @@ +var hasOwnProperty = Object.prototype.hasOwnProperty + +module.exports = PseudoMap + +function PseudoMap (set) { + if (!(this instanceof PseudoMap)) // whyyyyyyy + throw new TypeError("Constructor PseudoMap requires 'new'") + + this.clear() + + if (set) { + if ((set instanceof PseudoMap) || + (typeof Map === 'function' && set instanceof Map)) + set.forEach(function (value, key) { + this.set(key, value) + }, this) + else if (Array.isArray(set)) + set.forEach(function (kv) { + this.set(kv[0], kv[1]) + }, this) + else + throw new TypeError('invalid argument') + } +} + +PseudoMap.prototype.forEach = function (fn, thisp) { + thisp = thisp || this + Object.keys(this._data).forEach(function (k) { + if (k !== 'size') + fn.call(thisp, this._data[k].value, this._data[k].key) + }, this) +} + +PseudoMap.prototype.has = function (k) { + return !!find(this._data, k) +} + +PseudoMap.prototype.get = function (k) { + var res = find(this._data, k) + return res && res.value +} + +PseudoMap.prototype.set = function (k, v) { + set(this._data, k, v) +} + +PseudoMap.prototype.delete = function (k) { + var res = find(this._data, k) + if (res) { + delete this._data[res._index] + this._data.size-- + } +} + +PseudoMap.prototype.clear = function () { + var data = Object.create(null) + data.size = 0 + + Object.defineProperty(this, '_data', { + value: data, + enumerable: false, + configurable: true, + writable: false + }) +} + +Object.defineProperty(PseudoMap.prototype, 'size', { + get: function () { + return this._data.size + }, + set: function (n) {}, + enumerable: true, + configurable: true +}) + +PseudoMap.prototype.values = +PseudoMap.prototype.keys = +PseudoMap.prototype.entries = function () { + throw new Error('iterators are not implemented in this version') +} + +// Either identical, or both NaN +function same (a, b) { + return a === b || a !== a && b !== b +} + +function Entry (k, v, i) { + this.key = k + this.value = v + this._index = i +} + +function find (data, k) { + for (var i = 0, s = '_' + k, key = s; + hasOwnProperty.call(data, key); + key = s + i++) { + if (same(data[key].key, k)) + return data[key] + } +} + +function set (data, k, v) { + for (var i = 0, s = '_' + k, key = s; + hasOwnProperty.call(data, key); + key = s + i++) { + if (same(data[key].key, k)) { + data[key].value = v + return + } + } + data.size++ + data[key] = new Entry(k, v, key) +} diff --git a/node_modules/pseudomap/test/basic.js b/node_modules/pseudomap/test/basic.js new file mode 100644 index 0000000..4378e45 --- /dev/null +++ b/node_modules/pseudomap/test/basic.js @@ -0,0 +1,86 @@ +var t = require('tap') + +process.env.TEST_PSEUDOMAP = 'true' + +var PM = require('../') +runTests(PM) + +// if possible, verify that Map also behaves the same way +if (typeof Map === 'function') + runTests(Map) + + +function runTests (Map) { + t.throws(Map) + + var m = new Map() + + t.equal(m.size, 0) + + m.set(1, '1 string') + t.equal(m.get(1), '1 string') + t.equal(m.size, 1) + m.size = 1000 + t.equal(m.size, 1) + m.size = 0 + t.equal(m.size, 1) + + m = new Map([[1, 'number 1'], ['1', 'string 1']]) + t.equal(m.get(1), 'number 1') + t.equal(m.get('1'), 'string 1') + t.equal(m.size, 2) + + m = new Map(m) + t.equal(m.get(1), 'number 1') + t.equal(m.get('1'), 'string 1') + t.equal(m.size, 2) + + var akey = {} + var bkey = {} + m.set(akey, { some: 'data' }) + m.set(bkey, { some: 'other data' }) + t.same(m.get(akey), { some: 'data' }) + t.same(m.get(bkey), { some: 'other data' }) + t.equal(m.size, 4) + + var x = /x/ + var y = /x/ + m.set(x, 'x regex') + m.set(y, 'y regex') + t.equal(m.get(x), 'x regex') + m.set(x, 'x again') + t.equal(m.get(x), 'x again') + t.equal(m.size, 6) + + m.set(NaN, 'not a number') + t.equal(m.get(NaN), 'not a number') + m.set(NaN, 'it is a ' + typeof NaN) + t.equal(m.get(NaN), 'it is a number') + m.set('NaN', 'stringie nan') + t.equal(m.get(NaN), 'it is a number') + t.equal(m.get('NaN'), 'stringie nan') + t.equal(m.size, 8) + + m.delete(NaN) + t.equal(m.get(NaN), undefined) + t.equal(m.size, 7) + + var expect = [ + { value: 'number 1', key: 1 }, + { value: 'string 1', key: '1' }, + { value: { some: 'data' }, key: {} }, + { value: { some: 'other data' }, key: {} }, + { value: 'x again', key: /x/ }, + { value: 'y regex', key: /x/ }, + { value: 'stringie nan', key: 'NaN' } + ] + var actual = [] + + m.forEach(function (value, key) { + actual.push({ value: value, key: key }) + }) + t.same(actual, expect) + + m.clear() + t.equal(m.size, 0) +} diff --git a/node_modules/qs/.eslintignore b/node_modules/qs/.eslintignore new file mode 100644 index 0000000..1521c8b --- /dev/null +++ b/node_modules/qs/.eslintignore @@ -0,0 +1 @@ +dist diff --git a/node_modules/qs/.eslintrc b/node_modules/qs/.eslintrc new file mode 100644 index 0000000..1faac27 --- /dev/null +++ b/node_modules/qs/.eslintrc @@ -0,0 +1,19 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "complexity": [2, 22], + "consistent-return": [1], + "id-length": [2, { "min": 1, "max": 25, "properties": "never" }], + "indent": [2, 4], + "max-params": [2, 9], + "max-statements": [2, 36], + "no-extra-parens": [1], + "no-continue": [1], + "no-magic-numbers": 0, + "no-restricted-syntax": [2, "BreakStatement", "DebuggerStatement", "ForInStatement", "LabeledStatement", "WithStatement"], + "operator-linebreak": 1 + } +} diff --git a/node_modules/qs/CHANGELOG.md b/node_modules/qs/CHANGELOG.md new file mode 100644 index 0000000..86bea76 --- /dev/null +++ b/node_modules/qs/CHANGELOG.md @@ -0,0 +1,130 @@ +## **6.2.1** +- [Fix] ensure `key[]=x&key[]&key[]=y` results in 3, not 2, values +- [Refactor] Be explicit and use `Object.prototype.hasOwnProperty.call` +- [Tests] remove `parallelshell` since it does not reliably report failures +- [Tests] up to `node` `v6.3`, `v5.12` +- [Dev Deps] update `tape`, `eslint`, `@ljharb/eslint-config`, `qs-iconv` + +## [**6.2.0**](https://github.com/ljharb/qs/issues?milestone=36&state=closed) +- [New] pass Buffers to the encoder/decoder directly (#161) +- [New] add "encoder" and "decoder" options, for custom param encoding/decoding (#160) +- [Fix] fix compacting of nested sparse arrays (#150) + +## [**6.1.0**](https://github.com/ljharb/qs/issues?milestone=35&state=closed) +- [New] allowDots option for `stringify` (#151) +- [Fix] "sort" option should work at a depth of 3 or more (#151) +- [Fix] Restore `dist` directory; will be removed in v7 (#148) + +## [**6.0.2**](https://github.com/ljharb/qs/issues?milestone=33&state=closed) +- Revert ES6 requirement and restore support for node down to v0.8. + +## [**6.0.1**](https://github.com/ljharb/qs/issues?milestone=32&state=closed) +- [**#127**](https://github.com/ljharb/qs/pull/127) Fix engines definition in package.json + +## [**6.0.0**](https://github.com/ljharb/qs/issues?milestone=31&state=closed) +- [**#124**](https://github.com/ljharb/qs/issues/124) Use ES6 and drop support for node < v4 + +## **5.2.1** +- [Fix] ensure `key[]=x&key[]&key[]=y` results in 3, not 2, values + +## [**5.2.0**](https://github.com/ljharb/qs/issues?milestone=30&state=closed) +- [**#64**](https://github.com/ljharb/qs/issues/64) Add option to sort object keys in the query string + +## [**5.1.0**](https://github.com/ljharb/qs/issues?milestone=29&state=closed) +- [**#117**](https://github.com/ljharb/qs/issues/117) make URI encoding stringified results optional +- [**#106**](https://github.com/ljharb/qs/issues/106) Add flag `skipNulls` to optionally skip null values in stringify + +## [**5.0.0**](https://github.com/ljharb/qs/issues?milestone=28&state=closed) +- [**#114**](https://github.com/ljharb/qs/issues/114) default allowDots to false +- [**#100**](https://github.com/ljharb/qs/issues/100) include dist to npm + +## [**4.0.0**](https://github.com/ljharb/qs/issues?milestone=26&state=closed) +- [**#98**](https://github.com/ljharb/qs/issues/98) make returning plain objects and allowing prototype overwriting properties optional + +## [**3.1.0**](https://github.com/ljharb/qs/issues?milestone=24&state=closed) +- [**#89**](https://github.com/ljharb/qs/issues/89) Add option to disable "Transform dot notation to bracket notation" + +## [**3.0.0**](https://github.com/ljharb/qs/issues?milestone=23&state=closed) +- [**#80**](https://github.com/ljharb/qs/issues/80) qs.parse silently drops properties +- [**#77**](https://github.com/ljharb/qs/issues/77) Perf boost +- [**#60**](https://github.com/ljharb/qs/issues/60) Add explicit option to disable array parsing +- [**#74**](https://github.com/ljharb/qs/issues/74) Bad parse when turning array into object +- [**#81**](https://github.com/ljharb/qs/issues/81) Add a `filter` option +- [**#68**](https://github.com/ljharb/qs/issues/68) Fixed issue with recursion and passing strings into objects. +- [**#66**](https://github.com/ljharb/qs/issues/66) Add mixed array and object dot notation support Closes: #47 +- [**#76**](https://github.com/ljharb/qs/issues/76) RFC 3986 +- [**#85**](https://github.com/ljharb/qs/issues/85) No equal sign +- [**#84**](https://github.com/ljharb/qs/issues/84) update license attribute + +## [**2.4.1**](https://github.com/ljharb/qs/issues?milestone=20&state=closed) +- [**#73**](https://github.com/ljharb/qs/issues/73) Property 'hasOwnProperty' of object # is not a function + +## [**2.4.0**](https://github.com/ljharb/qs/issues?milestone=19&state=closed) +- [**#70**](https://github.com/ljharb/qs/issues/70) Add arrayFormat option + +## [**2.3.3**](https://github.com/ljharb/qs/issues?milestone=18&state=closed) +- [**#59**](https://github.com/ljharb/qs/issues/59) make sure array indexes are >= 0, closes #57 +- [**#58**](https://github.com/ljharb/qs/issues/58) make qs usable for browser loader + +## [**2.3.2**](https://github.com/ljharb/qs/issues?milestone=17&state=closed) +- [**#55**](https://github.com/ljharb/qs/issues/55) allow merging a string into an object + +## [**2.3.1**](https://github.com/ljharb/qs/issues?milestone=16&state=closed) +- [**#52**](https://github.com/ljharb/qs/issues/52) Return "undefined" and "false" instead of throwing "TypeError". + +## [**2.3.0**](https://github.com/ljharb/qs/issues?milestone=15&state=closed) +- [**#50**](https://github.com/ljharb/qs/issues/50) add option to omit array indices, closes #46 + +## [**2.2.5**](https://github.com/ljharb/qs/issues?milestone=14&state=closed) +- [**#39**](https://github.com/ljharb/qs/issues/39) Is there an alternative to Buffer.isBuffer? +- [**#49**](https://github.com/ljharb/qs/issues/49) refactor utils.merge, fixes #45 +- [**#41**](https://github.com/ljharb/qs/issues/41) avoid browserifying Buffer, for #39 + +## [**2.2.4**](https://github.com/ljharb/qs/issues?milestone=13&state=closed) +- [**#38**](https://github.com/ljharb/qs/issues/38) how to handle object keys beginning with a number + +## [**2.2.3**](https://github.com/ljharb/qs/issues?milestone=12&state=closed) +- [**#37**](https://github.com/ljharb/qs/issues/37) parser discards first empty value in array +- [**#36**](https://github.com/ljharb/qs/issues/36) Update to lab 4.x + +## [**2.2.2**](https://github.com/ljharb/qs/issues?milestone=11&state=closed) +- [**#33**](https://github.com/ljharb/qs/issues/33) Error when plain object in a value +- [**#34**](https://github.com/ljharb/qs/issues/34) use Object.prototype.hasOwnProperty.call instead of obj.hasOwnProperty +- [**#24**](https://github.com/ljharb/qs/issues/24) Changelog? Semver? + +## [**2.2.1**](https://github.com/ljharb/qs/issues?milestone=10&state=closed) +- [**#32**](https://github.com/ljharb/qs/issues/32) account for circular references properly, closes #31 +- [**#31**](https://github.com/ljharb/qs/issues/31) qs.parse stackoverflow on circular objects + +## [**2.2.0**](https://github.com/ljharb/qs/issues?milestone=9&state=closed) +- [**#26**](https://github.com/ljharb/qs/issues/26) Don't use Buffer global if it's not present +- [**#30**](https://github.com/ljharb/qs/issues/30) Bug when merging non-object values into arrays +- [**#29**](https://github.com/ljharb/qs/issues/29) Don't call Utils.clone at the top of Utils.merge +- [**#23**](https://github.com/ljharb/qs/issues/23) Ability to not limit parameters? + +## [**2.1.0**](https://github.com/ljharb/qs/issues?milestone=8&state=closed) +- [**#22**](https://github.com/ljharb/qs/issues/22) Enable using a RegExp as delimiter + +## [**2.0.0**](https://github.com/ljharb/qs/issues?milestone=7&state=closed) +- [**#18**](https://github.com/ljharb/qs/issues/18) Why is there arrayLimit? +- [**#20**](https://github.com/ljharb/qs/issues/20) Configurable parametersLimit +- [**#21**](https://github.com/ljharb/qs/issues/21) make all limits optional, for #18, for #20 + +## [**1.2.2**](https://github.com/ljharb/qs/issues?milestone=6&state=closed) +- [**#19**](https://github.com/ljharb/qs/issues/19) Don't overwrite null values + +## [**1.2.1**](https://github.com/ljharb/qs/issues?milestone=5&state=closed) +- [**#16**](https://github.com/ljharb/qs/issues/16) ignore non-string delimiters +- [**#15**](https://github.com/ljharb/qs/issues/15) Close code block + +## [**1.2.0**](https://github.com/ljharb/qs/issues?milestone=4&state=closed) +- [**#12**](https://github.com/ljharb/qs/issues/12) Add optional delim argument +- [**#13**](https://github.com/ljharb/qs/issues/13) fix #11: flattened keys in array are now correctly parsed + +## [**1.1.0**](https://github.com/ljharb/qs/issues?milestone=3&state=closed) +- [**#7**](https://github.com/ljharb/qs/issues/7) Empty values of a POST array disappear after being submitted +- [**#9**](https://github.com/ljharb/qs/issues/9) Should not omit equals signs (=) when value is null +- [**#6**](https://github.com/ljharb/qs/issues/6) Minor grammar fix in README + +## [**1.0.2**](https://github.com/ljharb/qs/issues?milestone=2&state=closed) +- [**#5**](https://github.com/ljharb/qs/issues/5) array holes incorrectly copied into object on large index diff --git a/node_modules/qs/CONTRIBUTING.md b/node_modules/qs/CONTRIBUTING.md new file mode 100644 index 0000000..8928361 --- /dev/null +++ b/node_modules/qs/CONTRIBUTING.md @@ -0,0 +1 @@ +Please view our [hapijs contributing guide](https://github.com/hapijs/hapi/blob/master/CONTRIBUTING.md). diff --git a/node_modules/qs/LICENSE b/node_modules/qs/LICENSE new file mode 100644 index 0000000..d456948 --- /dev/null +++ b/node_modules/qs/LICENSE @@ -0,0 +1,28 @@ +Copyright (c) 2014 Nathan LaFreniere and other contributors. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * The names of any contributors may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + * * * + +The complete list of contributors can be found at: https://github.com/hapijs/qs/graphs/contributors diff --git a/node_modules/qs/README.md b/node_modules/qs/README.md new file mode 100644 index 0000000..97e3907 --- /dev/null +++ b/node_modules/qs/README.md @@ -0,0 +1,376 @@ +# qs + +A querystring parsing and stringifying library with some added security. + +[![Build Status](https://api.travis-ci.org/ljharb/qs.svg)](http://travis-ci.org/ljharb/qs) + +Lead Maintainer: [Jordan Harband](https://github.com/ljharb) + +The **qs** module was originally created and maintained by [TJ Holowaychuk](https://github.com/visionmedia/node-querystring). + +## Usage + +```javascript +var qs = require('qs'); +var assert = require('assert'); + +var obj = qs.parse('a=c'); +assert.deepEqual(obj, { a: 'c' }); + +var str = qs.stringify(obj); +assert.equal(str, 'a=c'); +``` + +### Parsing Objects + +[](#preventEval) +```javascript +qs.parse(string, [options]); +``` + +**qs** allows you to create nested objects within your query strings, by surrounding the name of sub-keys with square brackets `[]`. +For example, the string `'foo[bar]=baz'` converts to: + +```javascript +assert.deepEqual(qs.parse('foo[bar]=baz'), { + foo: { + bar: 'baz' + } +}); +``` + +When using the `plainObjects` option the parsed value is returned as a plain object, created via `Object.create(null)` and as such you should be aware that prototype methods will not exist on it and a user may set those names to whatever value they like: + +```javascript +var plainObject = qs.parse('a[hasOwnProperty]=b', { plainObjects: true }); +assert.deepEqual(plainObject, { a: { hasOwnProperty: 'b' } }); +``` + +By default parameters that would overwrite properties on the object prototype are ignored, if you wish to keep the data from those fields either use `plainObjects` as mentioned above, or set `allowPrototypes` to `true` which will allow user input to overwrite those properties. *WARNING* It is generally a bad idea to enable this option as it can cause problems when attempting to use the properties that have been overwritten. Always be careful with this option. + +```javascript +var protoObject = qs.parse('a[hasOwnProperty]=b', { allowPrototypes: true }); +assert.deepEqual(protoObject, { a: { hasOwnProperty: 'b' } }); +``` + +URI encoded strings work too: + +```javascript +assert.deepEqual(qs.parse('a%5Bb%5D=c'), { + a: { b: 'c' } +}); +``` + +You can also nest your objects, like `'foo[bar][baz]=foobarbaz'`: + +```javascript +assert.deepEqual(qs.parse('foo[bar][baz]=foobarbaz'), { + foo: { + bar: { + baz: 'foobarbaz' + } + } +}); +``` + +By default, when nesting objects **qs** will only parse up to 5 children deep. This means if you attempt to parse a string like +`'a[b][c][d][e][f][g][h][i]=j'` your resulting object will be: + +```javascript +var expected = { + a: { + b: { + c: { + d: { + e: { + f: { + '[g][h][i]': 'j' + } + } + } + } + } + } +}; +var string = 'a[b][c][d][e][f][g][h][i]=j'; +assert.deepEqual(qs.parse(string), expected); +``` + +This depth can be overridden by passing a `depth` option to `qs.parse(string, [options])`: + +```javascript +var deep = qs.parse('a[b][c][d][e][f][g][h][i]=j', { depth: 1 }); +assert.deepEqual(deep, { a: { b: { '[c][d][e][f][g][h][i]': 'j' } } }); +``` + +The depth limit helps mitigate abuse when **qs** is used to parse user input, and it is recommended to keep it a reasonably small number. + +For similar reasons, by default **qs** will only parse up to 1000 parameters. This can be overridden by passing a `parameterLimit` option: + +```javascript +var limited = qs.parse('a=b&c=d', { parameterLimit: 1 }); +assert.deepEqual(limited, { a: 'b' }); +``` + +An optional delimiter can also be passed: + +```javascript +var delimited = qs.parse('a=b;c=d', { delimiter: ';' }); +assert.deepEqual(delimited, { a: 'b', c: 'd' }); +``` + +Delimiters can be a regular expression too: + +```javascript +var regexed = qs.parse('a=b;c=d,e=f', { delimiter: /[;,]/ }); +assert.deepEqual(regexed, { a: 'b', c: 'd', e: 'f' }); +``` + +Option `allowDots` can be used to enable dot notation: + +```javascript +var withDots = qs.parse('a.b=c', { allowDots: true }); +assert.deepEqual(withDots, { a: { b: 'c' } }); +``` + +### Parsing Arrays + +**qs** can also parse arrays using a similar `[]` notation: + +```javascript +var withArray = qs.parse('a[]=b&a[]=c'); +assert.deepEqual(withArray, { a: ['b', 'c'] }); +``` + +You may specify an index as well: + +```javascript +var withIndexes = qs.parse('a[1]=c&a[0]=b'); +assert.deepEqual(withIndexes, { a: ['b', 'c'] }); +``` + +Note that the only difference between an index in an array and a key in an object is that the value between the brackets must be a number +to create an array. When creating arrays with specific indices, **qs** will compact a sparse array to only the existing values preserving +their order: + +```javascript +var noSparse = qs.parse('a[1]=b&a[15]=c'); +assert.deepEqual(noSparse, { a: ['b', 'c'] }); +``` + +Note that an empty string is also a value, and will be preserved: + +```javascript +var withEmptyString = qs.parse('a[]=&a[]=b'); +assert.deepEqual(withEmptyString, { a: ['', 'b'] }); + +var withIndexedEmptyString = qs.parse('a[0]=b&a[1]=&a[2]=c'); +assert.deepEqual(withIndexedEmptyString, { a: ['b', '', 'c'] }); +``` + +**qs** will also limit specifying indices in an array to a maximum index of `20`. Any array members with an index of greater than `20` will +instead be converted to an object with the index as the key: + +```javascript +var withMaxIndex = qs.parse('a[100]=b'); +assert.deepEqual(withMaxIndex, { a: { '100': 'b' } }); +``` + +This limit can be overridden by passing an `arrayLimit` option: + +```javascript +var withArrayLimit = qs.parse('a[1]=b', { arrayLimit: 0 }); +assert.deepEqual(withArrayLimit, { a: { '1': 'b' } }); +``` + +To disable array parsing entirely, set `parseArrays` to `false`. + +```javascript +var noParsingArrays = qs.parse('a[]=b', { parseArrays: false }); +assert.deepEqual(noParsingArrays, { a: { '0': 'b' } }); +``` + +If you mix notations, **qs** will merge the two items into an object: + +```javascript +var mixedNotation = qs.parse('a[0]=b&a[b]=c'); +assert.deepEqual(mixedNotation, { a: { '0': 'b', b: 'c' } }); +``` + +You can also create arrays of objects: + +```javascript +var arraysOfObjects = qs.parse('a[][b]=c'); +assert.deepEqual(arraysOfObjects, { a: [{ b: 'c' }] }); +``` + +### Stringifying + +[](#preventEval) +```javascript +qs.stringify(object, [options]); +``` + +When stringifying, **qs** by default URI encodes output. Objects are stringified as you would expect: + +```javascript +assert.equal(qs.stringify({ a: 'b' }), 'a=b'); +assert.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c'); +``` + +This encoding can be disabled by setting the `encode` option to `false`: + +```javascript +var unencoded = qs.stringify({ a: { b: 'c' } }, { encode: false }); +assert.equal(unencoded, 'a[b]=c'); +``` + +This encoding can also be replaced by a custom encoding method set as `encoder` option: + +```javascript +var encoded = qs.stringify({ a: { b: 'c' } }, { encoder: function (str) { + // Passed in values `a`, `b`, `c` + return // Return encoded string +}}) +``` + +_(Note: the `encoder` option does not apply if `encode` is `false`)_ + +Analogue to the `encoder` there is a `decoder` option for `parse` to override decoding of properties and values: + +```javascript +var decoded = qs.parse('x=z', { decoder: function (str) { + // Passed in values `x`, `z` + return // Return decoded string +}}) +``` + +Examples beyond this point will be shown as though the output is not URI encoded for clarity. Please note that the return values in these cases *will* be URI encoded during real usage. + +When arrays are stringified, by default they are given explicit indices: + +```javascript +qs.stringify({ a: ['b', 'c', 'd'] }); +// 'a[0]=b&a[1]=c&a[2]=d' +``` + +You may override this by setting the `indices` option to `false`: + +```javascript +qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false }); +// 'a=b&a=c&a=d' +``` + +You may use the `arrayFormat` option to specify the format of the output array + +```javascript +qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'indices' }) +// 'a[0]=b&a[1]=c' +qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'brackets' }) +// 'a[]=b&a[]=c' +qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'repeat' }) +// 'a=b&a=c' +``` + +Empty strings and null values will omit the value, but the equals sign (=) remains in place: + +```javascript +assert.equal(qs.stringify({ a: '' }), 'a='); +``` + +Properties that are set to `undefined` will be omitted entirely: + +```javascript +assert.equal(qs.stringify({ a: null, b: undefined }), 'a='); +``` + +The delimiter may be overridden with stringify as well: + +```javascript +assert.equal(qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' }), 'a=b;c=d'); +``` + +Finally, you can use the `filter` option to restrict which keys will be included in the stringified output. +If you pass a function, it will be called for each key to obtain the replacement value. Otherwise, if you +pass an array, it will be used to select properties and array indices for stringification: + +```javascript +function filterFunc(prefix, value) { + if (prefix == 'b') { + // Return an `undefined` value to omit a property. + return; + } + if (prefix == 'e[f]') { + return value.getTime(); + } + if (prefix == 'e[g][0]') { + return value * 2; + } + return value; +} +qs.stringify({ a: 'b', c: 'd', e: { f: new Date(123), g: [2] } }, { filter: filterFunc }); +// 'a=b&c=d&e[f]=123&e[g][0]=4' +qs.stringify({ a: 'b', c: 'd', e: 'f' }, { filter: ['a', 'e'] }); +// 'a=b&e=f' +qs.stringify({ a: ['b', 'c', 'd'], e: 'f' }, { filter: ['a', 0, 2] }); +// 'a[0]=b&a[2]=d' +``` + +### Handling of `null` values + +By default, `null` values are treated like empty strings: + +```javascript +var withNull = qs.stringify({ a: null, b: '' }); +assert.equal(withNull, 'a=&b='); +``` + +Parsing does not distinguish between parameters with and without equal signs. Both are converted to empty strings. + +```javascript +var equalsInsensitive = qs.parse('a&b='); +assert.deepEqual(equalsInsensitive, { a: '', b: '' }); +``` + +To distinguish between `null` values and empty strings use the `strictNullHandling` flag. In the result string the `null` +values have no `=` sign: + +```javascript +var strictNull = qs.stringify({ a: null, b: '' }, { strictNullHandling: true }); +assert.equal(strictNull, 'a&b='); +``` + +To parse values without `=` back to `null` use the `strictNullHandling` flag: + +```javascript +var parsedStrictNull = qs.parse('a&b=', { strictNullHandling: true }); +assert.deepEqual(parsedStrictNull, { a: null, b: '' }); +``` + +To completely skip rendering keys with `null` values, use the `skipNulls` flag: + +```javascript +var nullsSkipped = qs.stringify({ a: 'b', c: null}, { skipNulls: true }); +assert.equal(nullsSkipped, 'a=b'); +``` + +### Dealing with special character sets + +By default the encoding and decoding of characters is done in `utf-8`. If you +wish to encode querystrings to a different character set (i.e. +[Shift JIS](https://en.wikipedia.org/wiki/Shift_JIS)) you can use the +[`qs-iconv`](https://github.com/martinheidegger/qs-iconv) library: + +```javascript +var encoder = require('qs-iconv/encoder')('shift_jis'); +var shiftJISEncoded = qs.stringify({ a: 'こんにちは!' }, { encoder: encoder }); +assert.equal(shiftJISEncoded, 'a=%82%B1%82%F1%82%C9%82%BF%82%CD%81I'); +``` + +This also works for decoding of query strings: + +```javascript +var decoder = require('qs-iconv/decoder')('shift_jis'); +var obj = qs.parse('a=%82%B1%82%F1%82%C9%82%BF%82%CD%81I', { decoder: decoder }); +assert.deepEqual(obj, { a: 'こんにちは!' }); +``` diff --git a/node_modules/qs/dist/qs.js b/node_modules/qs/dist/qs.js new file mode 100644 index 0000000..fcf825b --- /dev/null +++ b/node_modules/qs/dist/qs.js @@ -0,0 +1,486 @@ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Qs = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= 0 && + (options.parseArrays && index <= options.arrayLimit) + ) { + obj = []; + obj[index] = parseObject(chain, val, options); + } else { + obj[cleanRoot] = parseObject(chain, val, options); + } + } + + return obj; +}; + +var parseKeys = function parseKeys(givenKey, val, options) { + if (!givenKey) { + return; + } + + // Transform dot notation to bracket notation + var key = options.allowDots ? givenKey.replace(/\.([^\.\[]+)/g, '[$1]') : givenKey; + + // The regex chunks + + var parent = /^([^\[\]]*)/; + var child = /(\[[^\[\]]*\])/g; + + // Get the parent + + var segment = parent.exec(key); + + // Stash the parent if it exists + + var keys = []; + if (segment[1]) { + // If we aren't using plain objects, optionally prefix keys + // that would overwrite object prototype properties + if (!options.plainObjects && has.call(Object.prototype, segment[1])) { + if (!options.allowPrototypes) { + return; + } + } + + keys.push(segment[1]); + } + + // Loop through children appending to the array until we hit depth + + var i = 0; + while ((segment = child.exec(key)) !== null && i < options.depth) { + i += 1; + if (!options.plainObjects && has.call(Object.prototype, segment[1].replace(/\[|\]/g, ''))) { + if (!options.allowPrototypes) { + continue; + } + } + keys.push(segment[1]); + } + + // If there's a remainder, just add whatever is left + + if (segment) { + keys.push('[' + key.slice(segment.index) + ']'); + } + + return parseObject(keys, val, options); +}; + +module.exports = function (str, opts) { + var options = opts || {}; + + if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') { + throw new TypeError('Decoder has to be a function.'); + } + + options.delimiter = typeof options.delimiter === 'string' || Utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter; + options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth; + options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit; + options.parseArrays = options.parseArrays !== false; + options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder; + options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults.allowDots; + options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects; + options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes; + options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit; + options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; + + if (str === '' || str === null || typeof str === 'undefined') { + return options.plainObjects ? Object.create(null) : {}; + } + + var tempObj = typeof str === 'string' ? parseValues(str, options) : str; + var obj = options.plainObjects ? Object.create(null) : {}; + + // Iterate over the keys and setup the new object + + var keys = Object.keys(tempObj); + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + var newObj = parseKeys(key, tempObj[key], options); + obj = Utils.merge(obj, newObj, options); + } + + return Utils.compact(obj); +}; + +},{"./utils":4}],3:[function(require,module,exports){ +'use strict'; + +var Utils = require('./utils'); + +var arrayPrefixGenerators = { + brackets: function brackets(prefix) { + return prefix + '[]'; + }, + indices: function indices(prefix, key) { + return prefix + '[' + key + ']'; + }, + repeat: function repeat(prefix) { + return prefix; + } +}; + +var defaults = { + delimiter: '&', + strictNullHandling: false, + skipNulls: false, + encode: true, + encoder: Utils.encode +}; + +var stringify = function stringify(object, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots) { + var obj = object; + if (typeof filter === 'function') { + obj = filter(prefix, obj); + } else if (obj instanceof Date) { + obj = obj.toISOString(); + } else if (obj === null) { + if (strictNullHandling) { + return encoder ? encoder(prefix) : prefix; + } + + obj = ''; + } + + if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || Utils.isBuffer(obj)) { + if (encoder) { + return [encoder(prefix) + '=' + encoder(obj)]; + } + return [prefix + '=' + String(obj)]; + } + + var values = []; + + if (typeof obj === 'undefined') { + return values; + } + + var objKeys; + if (Array.isArray(filter)) { + objKeys = filter; + } else { + var keys = Object.keys(obj); + objKeys = sort ? keys.sort(sort) : keys; + } + + for (var i = 0; i < objKeys.length; ++i) { + var key = objKeys[i]; + + if (skipNulls && obj[key] === null) { + continue; + } + + if (Array.isArray(obj)) { + values = values.concat(stringify(obj[key], generateArrayPrefix(prefix, key), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots)); + } else { + values = values.concat(stringify(obj[key], prefix + (allowDots ? '.' + key : '[' + key + ']'), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots)); + } + } + + return values; +}; + +module.exports = function (object, opts) { + var obj = object; + var options = opts || {}; + var delimiter = typeof options.delimiter === 'undefined' ? defaults.delimiter : options.delimiter; + var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; + var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults.skipNulls; + var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode; + var encoder = encode ? (typeof options.encoder === 'function' ? options.encoder : defaults.encoder) : null; + var sort = typeof options.sort === 'function' ? options.sort : null; + var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots; + var objKeys; + var filter; + + if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') { + throw new TypeError('Encoder has to be a function.'); + } + + if (typeof options.filter === 'function') { + filter = options.filter; + obj = filter('', obj); + } else if (Array.isArray(options.filter)) { + objKeys = filter = options.filter; + } + + var keys = []; + + if (typeof obj !== 'object' || obj === null) { + return ''; + } + + var arrayFormat; + if (options.arrayFormat in arrayPrefixGenerators) { + arrayFormat = options.arrayFormat; + } else if ('indices' in options) { + arrayFormat = options.indices ? 'indices' : 'repeat'; + } else { + arrayFormat = 'indices'; + } + + var generateArrayPrefix = arrayPrefixGenerators[arrayFormat]; + + if (!objKeys) { + objKeys = Object.keys(obj); + } + + if (sort) { + objKeys.sort(sort); + } + + for (var i = 0; i < objKeys.length; ++i) { + var key = objKeys[i]; + + if (skipNulls && obj[key] === null) { + continue; + } + + keys = keys.concat(stringify(obj[key], key, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots)); + } + + return keys.join(delimiter); +}; + +},{"./utils":4}],4:[function(require,module,exports){ +'use strict'; + +var hexTable = (function () { + var array = new Array(256); + for (var i = 0; i < 256; ++i) { + array[i] = '%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase(); + } + + return array; +}()); + +exports.arrayToObject = function (source, options) { + var obj = options.plainObjects ? Object.create(null) : {}; + for (var i = 0; i < source.length; ++i) { + if (typeof source[i] !== 'undefined') { + obj[i] = source[i]; + } + } + + return obj; +}; + +exports.merge = function (target, source, options) { + if (!source) { + return target; + } + + if (typeof source !== 'object') { + if (Array.isArray(target)) { + target.push(source); + } else if (typeof target === 'object') { + target[source] = true; + } else { + return [target, source]; + } + + return target; + } + + if (typeof target !== 'object') { + return [target].concat(source); + } + + var mergeTarget = target; + if (Array.isArray(target) && !Array.isArray(source)) { + mergeTarget = exports.arrayToObject(target, options); + } + + return Object.keys(source).reduce(function (acc, key) { + var value = source[key]; + + if (Object.prototype.hasOwnProperty.call(acc, key)) { + acc[key] = exports.merge(acc[key], value, options); + } else { + acc[key] = value; + } + return acc; + }, mergeTarget); +}; + +exports.decode = function (str) { + try { + return decodeURIComponent(str.replace(/\+/g, ' ')); + } catch (e) { + return str; + } +}; + +exports.encode = function (str) { + // This code was originally written by Brian White (mscdex) for the io.js core querystring library. + // It has been adapted here for stricter adherence to RFC 3986 + if (str.length === 0) { + return str; + } + + var string = typeof str === 'string' ? str : String(str); + + var out = ''; + for (var i = 0; i < string.length; ++i) { + var c = string.charCodeAt(i); + + if ( + c === 0x2D || // - + c === 0x2E || // . + c === 0x5F || // _ + c === 0x7E || // ~ + (c >= 0x30 && c <= 0x39) || // 0-9 + (c >= 0x41 && c <= 0x5A) || // a-z + (c >= 0x61 && c <= 0x7A) // A-Z + ) { + out += string.charAt(i); + continue; + } + + if (c < 0x80) { + out = out + hexTable[c]; + continue; + } + + if (c < 0x800) { + out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]); + continue; + } + + if (c < 0xD800 || c >= 0xE000) { + out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); + continue; + } + + i += 1; + c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); + out += hexTable[0xF0 | (c >> 18)] + hexTable[0x80 | ((c >> 12) & 0x3F)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]; + } + + return out; +}; + +exports.compact = function (obj, references) { + if (typeof obj !== 'object' || obj === null) { + return obj; + } + + var refs = references || []; + var lookup = refs.indexOf(obj); + if (lookup !== -1) { + return refs[lookup]; + } + + refs.push(obj); + + if (Array.isArray(obj)) { + var compacted = []; + + for (var i = 0; i < obj.length; ++i) { + if (obj[i] && typeof obj[i] === 'object') { + compacted.push(exports.compact(obj[i], refs)); + } else if (typeof obj[i] !== 'undefined') { + compacted.push(obj[i]); + } + } + + return compacted; + } + + var keys = Object.keys(obj); + for (var j = 0; j < keys.length; ++j) { + var key = keys[j]; + obj[key] = exports.compact(obj[key], refs); + } + + return obj; +}; + +exports.isRegExp = function (obj) { + return Object.prototype.toString.call(obj) === '[object RegExp]'; +}; + +exports.isBuffer = function (obj) { + if (obj === null || typeof obj === 'undefined') { + return false; + } + + return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); +}; + +},{}]},{},[1])(1) +}); \ No newline at end of file diff --git a/node_modules/qs/lib/index.js b/node_modules/qs/lib/index.js new file mode 100755 index 0000000..1901959 --- /dev/null +++ b/node_modules/qs/lib/index.js @@ -0,0 +1,9 @@ +'use strict'; + +var Stringify = require('./stringify'); +var Parse = require('./parse'); + +module.exports = { + stringify: Stringify, + parse: Parse +}; diff --git a/node_modules/qs/lib/parse.js b/node_modules/qs/lib/parse.js new file mode 100755 index 0000000..8b37cb3 --- /dev/null +++ b/node_modules/qs/lib/parse.js @@ -0,0 +1,166 @@ +'use strict'; + +var Utils = require('./utils'); + +var has = Object.prototype.hasOwnProperty; + +var defaults = { + delimiter: '&', + depth: 5, + arrayLimit: 20, + parameterLimit: 1000, + strictNullHandling: false, + plainObjects: false, + allowPrototypes: false, + allowDots: false, + decoder: Utils.decode +}; + +var parseValues = function parseValues(str, options) { + var obj = {}; + var parts = str.split(options.delimiter, options.parameterLimit === Infinity ? undefined : options.parameterLimit); + + for (var i = 0; i < parts.length; ++i) { + var part = parts[i]; + var pos = part.indexOf(']=') === -1 ? part.indexOf('=') : part.indexOf(']=') + 1; + + var key, val; + if (pos === -1) { + key = options.decoder(part); + val = options.strictNullHandling ? null : ''; + } else { + key = options.decoder(part.slice(0, pos)); + val = options.decoder(part.slice(pos + 1)); + } + if (has.call(obj, key)) { + obj[key] = [].concat(obj[key]).concat(val); + } else { + obj[key] = val; + } + } + + return obj; +}; + +var parseObject = function parseObject(chain, val, options) { + if (!chain.length) { + return val; + } + + var root = chain.shift(); + + var obj; + if (root === '[]') { + obj = []; + obj = obj.concat(parseObject(chain, val, options)); + } else { + obj = options.plainObjects ? Object.create(null) : {}; + var cleanRoot = root[0] === '[' && root[root.length - 1] === ']' ? root.slice(1, root.length - 1) : root; + var index = parseInt(cleanRoot, 10); + if ( + !isNaN(index) && + root !== cleanRoot && + String(index) === cleanRoot && + index >= 0 && + (options.parseArrays && index <= options.arrayLimit) + ) { + obj = []; + obj[index] = parseObject(chain, val, options); + } else { + obj[cleanRoot] = parseObject(chain, val, options); + } + } + + return obj; +}; + +var parseKeys = function parseKeys(givenKey, val, options) { + if (!givenKey) { + return; + } + + // Transform dot notation to bracket notation + var key = options.allowDots ? givenKey.replace(/\.([^\.\[]+)/g, '[$1]') : givenKey; + + // The regex chunks + + var parent = /^([^\[\]]*)/; + var child = /(\[[^\[\]]*\])/g; + + // Get the parent + + var segment = parent.exec(key); + + // Stash the parent if it exists + + var keys = []; + if (segment[1]) { + // If we aren't using plain objects, optionally prefix keys + // that would overwrite object prototype properties + if (!options.plainObjects && has.call(Object.prototype, segment[1])) { + if (!options.allowPrototypes) { + return; + } + } + + keys.push(segment[1]); + } + + // Loop through children appending to the array until we hit depth + + var i = 0; + while ((segment = child.exec(key)) !== null && i < options.depth) { + i += 1; + if (!options.plainObjects && has.call(Object.prototype, segment[1].replace(/\[|\]/g, ''))) { + if (!options.allowPrototypes) { + continue; + } + } + keys.push(segment[1]); + } + + // If there's a remainder, just add whatever is left + + if (segment) { + keys.push('[' + key.slice(segment.index) + ']'); + } + + return parseObject(keys, val, options); +}; + +module.exports = function (str, opts) { + var options = opts || {}; + + if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') { + throw new TypeError('Decoder has to be a function.'); + } + + options.delimiter = typeof options.delimiter === 'string' || Utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter; + options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth; + options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit; + options.parseArrays = options.parseArrays !== false; + options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder; + options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults.allowDots; + options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects; + options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes; + options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit; + options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; + + if (str === '' || str === null || typeof str === 'undefined') { + return options.plainObjects ? Object.create(null) : {}; + } + + var tempObj = typeof str === 'string' ? parseValues(str, options) : str; + var obj = options.plainObjects ? Object.create(null) : {}; + + // Iterate over the keys and setup the new object + + var keys = Object.keys(tempObj); + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + var newObj = parseKeys(key, tempObj[key], options); + obj = Utils.merge(obj, newObj, options); + } + + return Utils.compact(obj); +}; diff --git a/node_modules/qs/lib/stringify.js b/node_modules/qs/lib/stringify.js new file mode 100755 index 0000000..6e1c9a2 --- /dev/null +++ b/node_modules/qs/lib/stringify.js @@ -0,0 +1,137 @@ +'use strict'; + +var Utils = require('./utils'); + +var arrayPrefixGenerators = { + brackets: function brackets(prefix) { + return prefix + '[]'; + }, + indices: function indices(prefix, key) { + return prefix + '[' + key + ']'; + }, + repeat: function repeat(prefix) { + return prefix; + } +}; + +var defaults = { + delimiter: '&', + strictNullHandling: false, + skipNulls: false, + encode: true, + encoder: Utils.encode +}; + +var stringify = function stringify(object, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots) { + var obj = object; + if (typeof filter === 'function') { + obj = filter(prefix, obj); + } else if (obj instanceof Date) { + obj = obj.toISOString(); + } else if (obj === null) { + if (strictNullHandling) { + return encoder ? encoder(prefix) : prefix; + } + + obj = ''; + } + + if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || Utils.isBuffer(obj)) { + if (encoder) { + return [encoder(prefix) + '=' + encoder(obj)]; + } + return [prefix + '=' + String(obj)]; + } + + var values = []; + + if (typeof obj === 'undefined') { + return values; + } + + var objKeys; + if (Array.isArray(filter)) { + objKeys = filter; + } else { + var keys = Object.keys(obj); + objKeys = sort ? keys.sort(sort) : keys; + } + + for (var i = 0; i < objKeys.length; ++i) { + var key = objKeys[i]; + + if (skipNulls && obj[key] === null) { + continue; + } + + if (Array.isArray(obj)) { + values = values.concat(stringify(obj[key], generateArrayPrefix(prefix, key), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots)); + } else { + values = values.concat(stringify(obj[key], prefix + (allowDots ? '.' + key : '[' + key + ']'), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots)); + } + } + + return values; +}; + +module.exports = function (object, opts) { + var obj = object; + var options = opts || {}; + var delimiter = typeof options.delimiter === 'undefined' ? defaults.delimiter : options.delimiter; + var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; + var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults.skipNulls; + var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode; + var encoder = encode ? (typeof options.encoder === 'function' ? options.encoder : defaults.encoder) : null; + var sort = typeof options.sort === 'function' ? options.sort : null; + var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots; + var objKeys; + var filter; + + if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') { + throw new TypeError('Encoder has to be a function.'); + } + + if (typeof options.filter === 'function') { + filter = options.filter; + obj = filter('', obj); + } else if (Array.isArray(options.filter)) { + objKeys = filter = options.filter; + } + + var keys = []; + + if (typeof obj !== 'object' || obj === null) { + return ''; + } + + var arrayFormat; + if (options.arrayFormat in arrayPrefixGenerators) { + arrayFormat = options.arrayFormat; + } else if ('indices' in options) { + arrayFormat = options.indices ? 'indices' : 'repeat'; + } else { + arrayFormat = 'indices'; + } + + var generateArrayPrefix = arrayPrefixGenerators[arrayFormat]; + + if (!objKeys) { + objKeys = Object.keys(obj); + } + + if (sort) { + objKeys.sort(sort); + } + + for (var i = 0; i < objKeys.length; ++i) { + var key = objKeys[i]; + + if (skipNulls && obj[key] === null) { + continue; + } + + keys = keys.concat(stringify(obj[key], key, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots)); + } + + return keys.join(delimiter); +}; diff --git a/node_modules/qs/lib/utils.js b/node_modules/qs/lib/utils.js new file mode 100755 index 0000000..2c5c8ee --- /dev/null +++ b/node_modules/qs/lib/utils.js @@ -0,0 +1,164 @@ +'use strict'; + +var hexTable = (function () { + var array = new Array(256); + for (var i = 0; i < 256; ++i) { + array[i] = '%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase(); + } + + return array; +}()); + +exports.arrayToObject = function (source, options) { + var obj = options.plainObjects ? Object.create(null) : {}; + for (var i = 0; i < source.length; ++i) { + if (typeof source[i] !== 'undefined') { + obj[i] = source[i]; + } + } + + return obj; +}; + +exports.merge = function (target, source, options) { + if (!source) { + return target; + } + + if (typeof source !== 'object') { + if (Array.isArray(target)) { + target.push(source); + } else if (typeof target === 'object') { + target[source] = true; + } else { + return [target, source]; + } + + return target; + } + + if (typeof target !== 'object') { + return [target].concat(source); + } + + var mergeTarget = target; + if (Array.isArray(target) && !Array.isArray(source)) { + mergeTarget = exports.arrayToObject(target, options); + } + + return Object.keys(source).reduce(function (acc, key) { + var value = source[key]; + + if (Object.prototype.hasOwnProperty.call(acc, key)) { + acc[key] = exports.merge(acc[key], value, options); + } else { + acc[key] = value; + } + return acc; + }, mergeTarget); +}; + +exports.decode = function (str) { + try { + return decodeURIComponent(str.replace(/\+/g, ' ')); + } catch (e) { + return str; + } +}; + +exports.encode = function (str) { + // This code was originally written by Brian White (mscdex) for the io.js core querystring library. + // It has been adapted here for stricter adherence to RFC 3986 + if (str.length === 0) { + return str; + } + + var string = typeof str === 'string' ? str : String(str); + + var out = ''; + for (var i = 0; i < string.length; ++i) { + var c = string.charCodeAt(i); + + if ( + c === 0x2D || // - + c === 0x2E || // . + c === 0x5F || // _ + c === 0x7E || // ~ + (c >= 0x30 && c <= 0x39) || // 0-9 + (c >= 0x41 && c <= 0x5A) || // a-z + (c >= 0x61 && c <= 0x7A) // A-Z + ) { + out += string.charAt(i); + continue; + } + + if (c < 0x80) { + out = out + hexTable[c]; + continue; + } + + if (c < 0x800) { + out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]); + continue; + } + + if (c < 0xD800 || c >= 0xE000) { + out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); + continue; + } + + i += 1; + c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); + out += hexTable[0xF0 | (c >> 18)] + hexTable[0x80 | ((c >> 12) & 0x3F)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]; + } + + return out; +}; + +exports.compact = function (obj, references) { + if (typeof obj !== 'object' || obj === null) { + return obj; + } + + var refs = references || []; + var lookup = refs.indexOf(obj); + if (lookup !== -1) { + return refs[lookup]; + } + + refs.push(obj); + + if (Array.isArray(obj)) { + var compacted = []; + + for (var i = 0; i < obj.length; ++i) { + if (obj[i] && typeof obj[i] === 'object') { + compacted.push(exports.compact(obj[i], refs)); + } else if (typeof obj[i] !== 'undefined') { + compacted.push(obj[i]); + } + } + + return compacted; + } + + var keys = Object.keys(obj); + for (var j = 0; j < keys.length; ++j) { + var key = keys[j]; + obj[key] = exports.compact(obj[key], refs); + } + + return obj; +}; + +exports.isRegExp = function (obj) { + return Object.prototype.toString.call(obj) === '[object RegExp]'; +}; + +exports.isBuffer = function (obj) { + if (obj === null || typeof obj === 'undefined') { + return false; + } + + return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); +}; diff --git a/node_modules/qs/package.json b/node_modules/qs/package.json new file mode 100644 index 0000000..0941dcf --- /dev/null +++ b/node_modules/qs/package.json @@ -0,0 +1,120 @@ +{ + "_args": [ + [ + { + "raw": "qs@6.2.1", + "scope": null, + "escapedName": "qs", + "name": "qs", + "rawSpec": "6.2.1", + "spec": "6.2.1", + "type": "version" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/body-parser" + ] + ], + "_from": "qs@6.2.1", + "_id": "qs@6.2.1", + "_inCache": true, + "_location": "/qs", + "_nodeVersion": "6.3.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/qs-6.2.1.tgz_1469044929716_0.06957711698487401" + }, + "_npmUser": { + "name": "ljharb", + "email": "ljharb@gmail.com" + }, + "_npmVersion": "3.10.3", + "_phantomChildren": {}, + "_requested": { + "raw": "qs@6.2.1", + "scope": null, + "escapedName": "qs", + "name": "qs", + "rawSpec": "6.2.1", + "spec": "6.2.1", + "type": "version" + }, + "_requiredBy": [ + "/body-parser" + ], + "_resolved": "https://registry.npmjs.org/qs/-/qs-6.2.1.tgz", + "_shasum": "ce03c5ff0935bc1d9d69a9f14cbd18e568d67625", + "_shrinkwrap": null, + "_spec": "qs@6.2.1", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/body-parser", + "bugs": { + "url": "https://github.com/ljharb/qs/issues" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "dependencies": {}, + "description": "A querystring parser that supports nesting and arrays, with a depth limit", + "devDependencies": { + "@ljharb/eslint-config": "^6.0.0", + "browserify": "^13.0.1", + "covert": "^1.1.0", + "eslint": "^3.1.0", + "evalmd": "^0.0.17", + "iconv-lite": "^0.4.13", + "mkdirp": "^0.5.1", + "parallelshell": "^2.0.0", + "qs-iconv": "^1.0.3", + "tape": "^4.6.0" + }, + "directories": {}, + "dist": { + "shasum": "ce03c5ff0935bc1d9d69a9f14cbd18e568d67625", + "tarball": "https://registry.npmjs.org/qs/-/qs-6.2.1.tgz" + }, + "engines": { + "node": ">=0.6" + }, + "gitHead": "335f839142e6c2c69f5302c4940d92acb0e77561", + "homepage": "https://github.com/ljharb/qs", + "keywords": [ + "querystring", + "qs" + ], + "license": "BSD-3-Clause", + "main": "lib/index.js", + "maintainers": [ + { + "name": "hueniverse", + "email": "eran@hammer.io" + }, + { + "name": "ljharb", + "email": "ljharb@gmail.com" + }, + { + "name": "nlf", + "email": "quitlahok@gmail.com" + } + ], + "name": "qs", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/qs.git" + }, + "scripts": { + "coverage": "covert test", + "dist": "mkdirp dist && browserify --standalone Qs lib/index.js > dist/qs.js", + "lint": "eslint lib/*.js text/*.js", + "prepublish": "npm run dist", + "pretest": "npm run --silent readme && npm run --silent lint", + "readme": "evalmd README.md", + "test": "npm run --silent coverage", + "tests-only": "node test" + }, + "version": "6.2.1" +} diff --git a/node_modules/qs/test/index.js b/node_modules/qs/test/index.js new file mode 100644 index 0000000..b6a7d95 --- /dev/null +++ b/node_modules/qs/test/index.js @@ -0,0 +1,5 @@ +require('./parse'); + +require('./stringify'); + +require('./utils'); diff --git a/node_modules/qs/test/parse.js b/node_modules/qs/test/parse.js new file mode 100755 index 0000000..ccf8c8c --- /dev/null +++ b/node_modules/qs/test/parse.js @@ -0,0 +1,451 @@ +'use strict'; + +var test = require('tape'); +var qs = require('../'); +var iconv = require('iconv-lite'); + +test('parse()', function (t) { + t.test('parses a simple string', function (st) { + st.deepEqual(qs.parse('0=foo'), { '0': 'foo' }); + st.deepEqual(qs.parse('foo=c++'), { foo: 'c ' }); + st.deepEqual(qs.parse('a[>=]=23'), { a: { '>=': '23' } }); + st.deepEqual(qs.parse('a[<=>]==23'), { a: { '<=>': '=23' } }); + st.deepEqual(qs.parse('a[==]=23'), { a: { '==': '23' } }); + st.deepEqual(qs.parse('foo', { strictNullHandling: true }), { foo: null }); + st.deepEqual(qs.parse('foo'), { foo: '' }); + st.deepEqual(qs.parse('foo='), { foo: '' }); + st.deepEqual(qs.parse('foo=bar'), { foo: 'bar' }); + st.deepEqual(qs.parse(' foo = bar = baz '), { ' foo ': ' bar = baz ' }); + st.deepEqual(qs.parse('foo=bar=baz'), { foo: 'bar=baz' }); + st.deepEqual(qs.parse('foo=bar&bar=baz'), { foo: 'bar', bar: 'baz' }); + st.deepEqual(qs.parse('foo2=bar2&baz2='), { foo2: 'bar2', baz2: '' }); + st.deepEqual(qs.parse('foo=bar&baz', { strictNullHandling: true }), { foo: 'bar', baz: null }); + st.deepEqual(qs.parse('foo=bar&baz'), { foo: 'bar', baz: '' }); + st.deepEqual(qs.parse('cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World'), { + cht: 'p3', + chd: 't:60,40', + chs: '250x100', + chl: 'Hello|World' + }); + st.end(); + }); + + t.test('allows enabling dot notation', function (st) { + st.deepEqual(qs.parse('a.b=c'), { 'a.b': 'c' }); + st.deepEqual(qs.parse('a.b=c', { allowDots: true }), { a: { b: 'c' } }); + st.end(); + }); + + t.deepEqual(qs.parse('a[b]=c'), { a: { b: 'c' } }, 'parses a single nested string'); + t.deepEqual(qs.parse('a[b][c]=d'), { a: { b: { c: 'd' } } }, 'parses a double nested string'); + t.deepEqual( + qs.parse('a[b][c][d][e][f][g][h]=i'), + { a: { b: { c: { d: { e: { f: { '[g][h]': 'i' } } } } } } }, + 'defaults to a depth of 5' + ); + + t.test('only parses one level when depth = 1', function (st) { + st.deepEqual(qs.parse('a[b][c]=d', { depth: 1 }), { a: { b: { '[c]': 'd' } } }); + st.deepEqual(qs.parse('a[b][c][d]=e', { depth: 1 }), { a: { b: { '[c][d]': 'e' } } }); + st.end(); + }); + + t.deepEqual(qs.parse('a=b&a=c'), { a: ['b', 'c'] }, 'parses a simple array'); + + t.test('parses an explicit array', function (st) { + st.deepEqual(qs.parse('a[]=b'), { a: ['b'] }); + st.deepEqual(qs.parse('a[]=b&a[]=c'), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a[]=b&a[]=c&a[]=d'), { a: ['b', 'c', 'd'] }); + st.end(); + }); + + t.test('parses a mix of simple and explicit arrays', function (st) { + st.deepEqual(qs.parse('a=b&a[]=c'), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a[]=b&a=c'), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a[0]=b&a=c'), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a=b&a[0]=c'), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a[1]=b&a=c'), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a=b&a[1]=c'), { a: ['b', 'c'] }); + st.end(); + }); + + t.test('parses a nested array', function (st) { + st.deepEqual(qs.parse('a[b][]=c&a[b][]=d'), { a: { b: ['c', 'd'] } }); + st.deepEqual(qs.parse('a[>=]=25'), { a: { '>=': '25' } }); + st.end(); + }); + + t.test('allows to specify array indices', function (st) { + st.deepEqual(qs.parse('a[1]=c&a[0]=b&a[2]=d'), { a: ['b', 'c', 'd'] }); + st.deepEqual(qs.parse('a[1]=c&a[0]=b'), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a[1]=c'), { a: ['c'] }); + st.end(); + }); + + t.test('limits specific array indices to 20', function (st) { + st.deepEqual(qs.parse('a[20]=a'), { a: ['a'] }); + st.deepEqual(qs.parse('a[21]=a'), { a: { '21': 'a' } }); + st.end(); + }); + + t.deepEqual(qs.parse('a[12b]=c'), { a: { '12b': 'c' } }, 'supports keys that begin with a number'); + + t.test('supports encoded = signs', function (st) { + st.deepEqual(qs.parse('he%3Dllo=th%3Dere'), { 'he=llo': 'th=ere' }); + st.end(); + }); + + t.test('is ok with url encoded strings', function (st) { + st.deepEqual(qs.parse('a[b%20c]=d'), { a: { 'b c': 'd' } }); + st.deepEqual(qs.parse('a[b]=c%20d'), { a: { b: 'c d' } }); + st.end(); + }); + + t.test('allows brackets in the value', function (st) { + st.deepEqual(qs.parse('pets=["tobi"]'), { pets: '["tobi"]' }); + st.deepEqual(qs.parse('operators=[">=", "<="]'), { operators: '[">=", "<="]' }); + st.end(); + }); + + t.test('allows empty values', function (st) { + st.deepEqual(qs.parse(''), {}); + st.deepEqual(qs.parse(null), {}); + st.deepEqual(qs.parse(undefined), {}); + st.end(); + }); + + t.test('transforms arrays to objects', function (st) { + st.deepEqual(qs.parse('foo[0]=bar&foo[bad]=baz'), { foo: { '0': 'bar', bad: 'baz' } }); + st.deepEqual(qs.parse('foo[bad]=baz&foo[0]=bar'), { foo: { bad: 'baz', '0': 'bar' } }); + st.deepEqual(qs.parse('foo[bad]=baz&foo[]=bar'), { foo: { bad: 'baz', '0': 'bar' } }); + st.deepEqual(qs.parse('foo[]=bar&foo[bad]=baz'), { foo: { '0': 'bar', bad: 'baz' } }); + st.deepEqual(qs.parse('foo[bad]=baz&foo[]=bar&foo[]=foo'), { foo: { bad: 'baz', '0': 'bar', '1': 'foo' } }); + st.deepEqual(qs.parse('foo[0][a]=a&foo[0][b]=b&foo[1][a]=aa&foo[1][b]=bb'), { foo: [{ a: 'a', b: 'b' }, { a: 'aa', b: 'bb' }] }); + + st.deepEqual(qs.parse('a[]=b&a[t]=u&a[hasOwnProperty]=c', { allowPrototypes: false }), { a: { '0': 'b', c: true, t: 'u' } }); + st.deepEqual(qs.parse('a[]=b&a[t]=u&a[hasOwnProperty]=c', { allowPrototypes: true }), { a: { '0': 'b', t: 'u', hasOwnProperty: 'c' } }); + st.deepEqual(qs.parse('a[]=b&a[hasOwnProperty]=c&a[x]=y', { allowPrototypes: false }), { a: { '0': 'b', '1': 'c', x: 'y' } }); + st.deepEqual(qs.parse('a[]=b&a[hasOwnProperty]=c&a[x]=y', { allowPrototypes: true }), { a: { '0': 'b', hasOwnProperty: 'c', x: 'y' } }); + st.end(); + }); + + t.test('transforms arrays to objects (dot notation)', function (st) { + st.deepEqual(qs.parse('foo[0].baz=bar&fool.bad=baz', { allowDots: true }), { foo: [{ baz: 'bar' }], fool: { bad: 'baz' } }); + st.deepEqual(qs.parse('foo[0].baz=bar&fool.bad.boo=baz', { allowDots: true }), { foo: [{ baz: 'bar' }], fool: { bad: { boo: 'baz' } } }); + st.deepEqual(qs.parse('foo[0][0].baz=bar&fool.bad=baz', { allowDots: true }), { foo: [[{ baz: 'bar' }]], fool: { bad: 'baz' } }); + st.deepEqual(qs.parse('foo[0].baz[0]=15&foo[0].bar=2', { allowDots: true }), { foo: [{ baz: ['15'], bar: '2' }] }); + st.deepEqual(qs.parse('foo[0].baz[0]=15&foo[0].baz[1]=16&foo[0].bar=2', { allowDots: true }), { foo: [{ baz: ['15', '16'], bar: '2' }] }); + st.deepEqual(qs.parse('foo.bad=baz&foo[0]=bar', { allowDots: true }), { foo: { bad: 'baz', '0': 'bar' } }); + st.deepEqual(qs.parse('foo.bad=baz&foo[]=bar', { allowDots: true }), { foo: { bad: 'baz', '0': 'bar' } }); + st.deepEqual(qs.parse('foo[]=bar&foo.bad=baz', { allowDots: true }), { foo: { '0': 'bar', bad: 'baz' } }); + st.deepEqual(qs.parse('foo.bad=baz&foo[]=bar&foo[]=foo', { allowDots: true }), { foo: { bad: 'baz', '0': 'bar', '1': 'foo' } }); + st.deepEqual(qs.parse('foo[0].a=a&foo[0].b=b&foo[1].a=aa&foo[1].b=bb', { allowDots: true }), { foo: [{ a: 'a', b: 'b' }, { a: 'aa', b: 'bb' }] }); + st.end(); + }); + + t.deepEqual(qs.parse('a[b]=c&a=d'), { a: { b: 'c', d: true } }, 'can add keys to objects'); + + t.test('correctly prunes undefined values when converting an array to an object', function (st) { + st.deepEqual(qs.parse('a[2]=b&a[99999999]=c'), { a: { '2': 'b', '99999999': 'c' } }); + st.end(); + }); + + t.test('supports malformed uri characters', function (st) { + st.deepEqual(qs.parse('{%:%}', { strictNullHandling: true }), { '{%:%}': null }); + st.deepEqual(qs.parse('{%:%}='), { '{%:%}': '' }); + st.deepEqual(qs.parse('foo=%:%}'), { foo: '%:%}' }); + st.end(); + }); + + t.test('doesn\'t produce empty keys', function (st) { + st.deepEqual(qs.parse('_r=1&'), { '_r': '1' }); + st.end(); + }); + + t.test('cannot access Object prototype', function (st) { + qs.parse('constructor[prototype][bad]=bad'); + qs.parse('bad[constructor][prototype][bad]=bad'); + st.equal(typeof Object.prototype.bad, 'undefined'); + st.end(); + }); + + t.test('parses arrays of objects', function (st) { + st.deepEqual(qs.parse('a[][b]=c'), { a: [{ b: 'c' }] }); + st.deepEqual(qs.parse('a[0][b]=c'), { a: [{ b: 'c' }] }); + st.end(); + }); + + t.test('allows for empty strings in arrays', function (st) { + st.deepEqual(qs.parse('a[]=b&a[]=&a[]=c'), { a: ['b', '', 'c'] }); + + st.deepEqual( + qs.parse('a[0]=b&a[1]&a[2]=c&a[19]=', { strictNullHandling: true, arrayLimit: 20 }), + { a: ['b', null, 'c', ''] }, + 'with arrayLimit 20 + array indices: null then empty string works' + ); + st.deepEqual( + qs.parse('a[]=b&a[]&a[]=c&a[]=', { strictNullHandling: true, arrayLimit: 0 }), + { a: ['b', null, 'c', ''] }, + 'with arrayLimit 0 + array brackets: null then empty string works' + ); + + st.deepEqual( + qs.parse('a[0]=b&a[1]=&a[2]=c&a[19]', { strictNullHandling: true, arrayLimit: 20 }), + { a: ['b', '', 'c', null] }, + 'with arrayLimit 20 + array indices: empty string then null works' + ); + st.deepEqual( + qs.parse('a[]=b&a[]=&a[]=c&a[]', { strictNullHandling: true, arrayLimit: 0 }), + { a: ['b', '', 'c', null] }, + 'with arrayLimit 0 + array brackets: empty string then null works' + ); + + st.deepEqual( + qs.parse('a[]=&a[]=b&a[]=c'), + { a: ['', 'b', 'c'] }, + 'array brackets: empty strings work' + ); + st.end(); + }); + + t.test('compacts sparse arrays', function (st) { + st.deepEqual(qs.parse('a[10]=1&a[2]=2'), { a: ['2', '1'] }); + st.deepEqual(qs.parse('a[1][b][2][c]=1'), { a: [{ b: [{ c: '1' }] }] }); + st.deepEqual(qs.parse('a[1][2][3][c]=1'), { a: [[[{ c: '1' }]]] }); + st.deepEqual(qs.parse('a[1][2][3][c][1]=1'), { a: [[[{ c: ['1'] }]]] }); + st.end(); + }); + + t.test('parses semi-parsed strings', function (st) { + st.deepEqual(qs.parse({ 'a[b]': 'c' }), { a: { b: 'c' } }); + st.deepEqual(qs.parse({ 'a[b]': 'c', 'a[d]': 'e' }), { a: { b: 'c', d: 'e' } }); + st.end(); + }); + + t.test('parses buffers correctly', function (st) { + var b = new Buffer('test'); + st.deepEqual(qs.parse({ a: b }), { a: b }); + st.end(); + }); + + t.test('continues parsing when no parent is found', function (st) { + st.deepEqual(qs.parse('[]=&a=b'), { '0': '', a: 'b' }); + st.deepEqual(qs.parse('[]&a=b', { strictNullHandling: true }), { '0': null, a: 'b' }); + st.deepEqual(qs.parse('[foo]=bar'), { foo: 'bar' }); + st.end(); + }); + + t.test('does not error when parsing a very long array', function (st) { + var str = 'a[]=a'; + while (Buffer.byteLength(str) < 128 * 1024) { + str = str + '&' + str; + } + + st.doesNotThrow(function () { qs.parse(str); }); + + st.end(); + }); + + t.test('should not throw when a native prototype has an enumerable property', { parallel: false }, function (st) { + Object.prototype.crash = ''; + Array.prototype.crash = ''; + st.doesNotThrow(qs.parse.bind(null, 'a=b')); + st.deepEqual(qs.parse('a=b'), { a: 'b' }); + st.doesNotThrow(qs.parse.bind(null, 'a[][b]=c')); + st.deepEqual(qs.parse('a[][b]=c'), { a: [{ b: 'c' }] }); + delete Object.prototype.crash; + delete Array.prototype.crash; + st.end(); + }); + + t.test('parses a string with an alternative string delimiter', function (st) { + st.deepEqual(qs.parse('a=b;c=d', { delimiter: ';' }), { a: 'b', c: 'd' }); + st.end(); + }); + + t.test('parses a string with an alternative RegExp delimiter', function (st) { + st.deepEqual(qs.parse('a=b; c=d', { delimiter: /[;,] */ }), { a: 'b', c: 'd' }); + st.end(); + }); + + t.test('does not use non-splittable objects as delimiters', function (st) { + st.deepEqual(qs.parse('a=b&c=d', { delimiter: true }), { a: 'b', c: 'd' }); + st.end(); + }); + + t.test('allows overriding parameter limit', function (st) { + st.deepEqual(qs.parse('a=b&c=d', { parameterLimit: 1 }), { a: 'b' }); + st.end(); + }); + + t.test('allows setting the parameter limit to Infinity', function (st) { + st.deepEqual(qs.parse('a=b&c=d', { parameterLimit: Infinity }), { a: 'b', c: 'd' }); + st.end(); + }); + + t.test('allows overriding array limit', function (st) { + st.deepEqual(qs.parse('a[0]=b', { arrayLimit: -1 }), { a: { '0': 'b' } }); + st.deepEqual(qs.parse('a[-1]=b', { arrayLimit: -1 }), { a: { '-1': 'b' } }); + st.deepEqual(qs.parse('a[0]=b&a[1]=c', { arrayLimit: 0 }), { a: { '0': 'b', '1': 'c' } }); + st.end(); + }); + + t.test('allows disabling array parsing', function (st) { + st.deepEqual(qs.parse('a[0]=b&a[1]=c', { parseArrays: false }), { a: { '0': 'b', '1': 'c' } }); + st.end(); + }); + + t.test('parses an object', function (st) { + var input = { + 'user[name]': { 'pop[bob]': 3 }, + 'user[email]': null + }; + + var expected = { + user: { + name: { 'pop[bob]': 3 }, + email: null + } + }; + + var result = qs.parse(input); + + st.deepEqual(result, expected); + st.end(); + }); + + t.test('parses an object in dot notation', function (st) { + var input = { + 'user.name': { 'pop[bob]': 3 }, + 'user.email.': null + }; + + var expected = { + user: { + name: { 'pop[bob]': 3 }, + email: null + } + }; + + var result = qs.parse(input, { allowDots: true }); + + st.deepEqual(result, expected); + st.end(); + }); + + t.test('parses an object and not child values', function (st) { + var input = { + 'user[name]': { 'pop[bob]': { 'test': 3 } }, + 'user[email]': null + }; + + var expected = { + user: { + name: { 'pop[bob]': { 'test': 3 } }, + email: null + } + }; + + var result = qs.parse(input); + + st.deepEqual(result, expected); + st.end(); + }); + + t.test('does not blow up when Buffer global is missing', function (st) { + var tempBuffer = global.Buffer; + delete global.Buffer; + var result = qs.parse('a=b&c=d'); + global.Buffer = tempBuffer; + st.deepEqual(result, { a: 'b', c: 'd' }); + st.end(); + }); + + t.test('does not crash when parsing circular references', function (st) { + var a = {}; + a.b = a; + + var parsed; + + st.doesNotThrow(function () { + parsed = qs.parse({ 'foo[bar]': 'baz', 'foo[baz]': a }); + }); + + st.equal('foo' in parsed, true, 'parsed has "foo" property'); + st.equal('bar' in parsed.foo, true); + st.equal('baz' in parsed.foo, true); + st.equal(parsed.foo.bar, 'baz'); + st.deepEqual(parsed.foo.baz, a); + st.end(); + }); + + t.test('parses plain objects correctly', function (st) { + var a = Object.create(null); + a.b = 'c'; + + st.deepEqual(qs.parse(a), { b: 'c' }); + var result = qs.parse({ a: a }); + st.equal('a' in result, true, 'result has "a" property'); + st.deepEqual(result.a, a); + st.end(); + }); + + t.test('parses dates correctly', function (st) { + var now = new Date(); + st.deepEqual(qs.parse({ a: now }), { a: now }); + st.end(); + }); + + t.test('parses regular expressions correctly', function (st) { + var re = /^test$/; + st.deepEqual(qs.parse({ a: re }), { a: re }); + st.end(); + }); + + t.test('can allow overwriting prototype properties', function (st) { + st.deepEqual(qs.parse('a[hasOwnProperty]=b', { allowPrototypes: true }), { a: { hasOwnProperty: 'b' } }, { prototype: false }); + st.deepEqual(qs.parse('hasOwnProperty=b', { allowPrototypes: true }), { hasOwnProperty: 'b' }, { prototype: false }); + st.end(); + }); + + t.test('can return plain objects', function (st) { + var expected = Object.create(null); + expected.a = Object.create(null); + expected.a.b = 'c'; + expected.a.hasOwnProperty = 'd'; + st.deepEqual(qs.parse('a[b]=c&a[hasOwnProperty]=d', { plainObjects: true }), expected); + st.deepEqual(qs.parse(null, { plainObjects: true }), Object.create(null)); + var expectedArray = Object.create(null); + expectedArray.a = Object.create(null); + expectedArray.a['0'] = 'b'; + expectedArray.a.c = 'd'; + st.deepEqual(qs.parse('a[]=b&a[c]=d', { plainObjects: true }), expectedArray); + st.end(); + }); + + t.test('can parse with custom encoding', function (st) { + st.deepEqual(qs.parse('%8c%a7=%91%e5%8d%e3%95%7b', { + decoder: function (str) { + var reg = /\%([0-9A-F]{2})/ig; + var result = []; + var parts; + var last = 0; + while (parts = reg.exec(str)) { + result.push(parseInt(parts[1], 16)); + last = parts.index + parts[0].length; + } + return iconv.decode(new Buffer(result), 'shift_jis').toString(); + } + }), { 県: '大阪府' }); + st.end(); + }); + + t.test('throws error with wrong decoder', function (st) { + st.throws(function () { + qs.parse({}, { + decoder: 'string' + }); + }, new TypeError('Decoder has to be a function.')); + st.end(); + }); +}); diff --git a/node_modules/qs/test/stringify.js b/node_modules/qs/test/stringify.js new file mode 100755 index 0000000..699397e --- /dev/null +++ b/node_modules/qs/test/stringify.js @@ -0,0 +1,305 @@ +'use strict'; + +var test = require('tape'); +var qs = require('../'); +var iconv = require('iconv-lite'); + +test('stringify()', function (t) { + t.test('stringifies a querystring object', function (st) { + st.equal(qs.stringify({ a: 'b' }), 'a=b'); + st.equal(qs.stringify({ a: 1 }), 'a=1'); + st.equal(qs.stringify({ a: 1, b: 2 }), 'a=1&b=2'); + st.equal(qs.stringify({ a: 'A_Z' }), 'a=A_Z'); + st.equal(qs.stringify({ a: '€' }), 'a=%E2%82%AC'); + st.equal(qs.stringify({ a: '' }), 'a=%EE%80%80'); + st.equal(qs.stringify({ a: 'א' }), 'a=%D7%90'); + st.equal(qs.stringify({ a: '𐐷' }), 'a=%F0%90%90%B7'); + st.end(); + }); + + t.test('stringifies a nested object', function (st) { + st.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c'); + st.equal(qs.stringify({ a: { b: { c: { d: 'e' } } } }), 'a%5Bb%5D%5Bc%5D%5Bd%5D=e'); + st.end(); + }); + + t.test('stringifies a nested object with dots notation', function (st) { + st.equal(qs.stringify({ a: { b: 'c' } }, { allowDots: true }), 'a.b=c'); + st.equal(qs.stringify({ a: { b: { c: { d: 'e' } } } }, { allowDots: true }), 'a.b.c.d=e'); + st.end(); + }); + + t.test('stringifies an array value', function (st) { + st.equal(qs.stringify({ a: ['b', 'c', 'd'] }), 'a%5B0%5D=b&a%5B1%5D=c&a%5B2%5D=d'); + st.end(); + }); + + t.test('omits nulls when asked', function (st) { + st.equal(qs.stringify({ a: 'b', c: null }, { skipNulls: true }), 'a=b'); + st.end(); + }); + + + t.test('omits nested nulls when asked', function (st) { + st.equal(qs.stringify({ a: { b: 'c', d: null } }, { skipNulls: true }), 'a%5Bb%5D=c'); + st.end(); + }); + + t.test('omits array indices when asked', function (st) { + st.equal(qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false }), 'a=b&a=c&a=d'); + st.end(); + }); + + t.test('stringifies a nested array value', function (st) { + st.equal(qs.stringify({ a: { b: ['c', 'd'] } }), 'a%5Bb%5D%5B0%5D=c&a%5Bb%5D%5B1%5D=d'); + st.end(); + }); + + t.test('stringifies a nested array value with dots notation', function (st) { + st.equal(qs.stringify({ a: { b: ['c', 'd'] } }, { allowDots: true, encode: false }), 'a.b[0]=c&a.b[1]=d'); + st.end(); + }); + + t.test('stringifies an object inside an array', function (st) { + st.equal(qs.stringify({ a: [{ b: 'c' }] }), 'a%5B0%5D%5Bb%5D=c'); + st.equal(qs.stringify({ a: [{ b: { c: [1] } }] }), 'a%5B0%5D%5Bb%5D%5Bc%5D%5B0%5D=1'); + st.end(); + }); + + t.test('stringifies an array with mixed objects and primitives', function (st) { + st.equal(qs.stringify({ a: [{ b: 1 }, 2, 3] }, { encode: false }), 'a[0][b]=1&a[1]=2&a[2]=3'); + st.end(); + }); + + t.test('stringifies an object inside an array with dots notation', function (st) { + st.equal(qs.stringify({ a: [{ b: 'c' }] }, { allowDots: true, encode: false }), 'a[0].b=c'); + st.equal(qs.stringify({ a: [{ b: { c: [1] } }] }, { allowDots: true, encode: false }), 'a[0].b.c[0]=1'); + st.end(); + }); + + t.test('does not omit object keys when indices = false', function (st) { + st.equal(qs.stringify({ a: [{ b: 'c' }] }, { indices: false }), 'a%5Bb%5D=c'); + st.end(); + }); + + t.test('uses indices notation for arrays when indices=true', function (st) { + st.equal(qs.stringify({ a: ['b', 'c'] }, { indices: true }), 'a%5B0%5D=b&a%5B1%5D=c'); + st.end(); + }); + + t.test('uses indices notation for arrays when no arrayFormat is specified', function (st) { + st.equal(qs.stringify({ a: ['b', 'c'] }), 'a%5B0%5D=b&a%5B1%5D=c'); + st.end(); + }); + + t.test('uses indices notation for arrays when no arrayFormat=indices', function (st) { + st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'indices' }), 'a%5B0%5D=b&a%5B1%5D=c'); + st.end(); + }); + + t.test('uses repeat notation for arrays when no arrayFormat=repeat', function (st) { + st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'repeat' }), 'a=b&a=c'); + st.end(); + }); + + t.test('uses brackets notation for arrays when no arrayFormat=brackets', function (st) { + st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'brackets' }), 'a%5B%5D=b&a%5B%5D=c'); + st.end(); + }); + + t.test('stringifies a complicated object', function (st) { + st.equal(qs.stringify({ a: { b: 'c', d: 'e' } }), 'a%5Bb%5D=c&a%5Bd%5D=e'); + st.end(); + }); + + t.test('stringifies an empty value', function (st) { + st.equal(qs.stringify({ a: '' }), 'a='); + st.equal(qs.stringify({ a: null }, { strictNullHandling: true }), 'a'); + + st.equal(qs.stringify({ a: '', b: '' }), 'a=&b='); + st.equal(qs.stringify({ a: null, b: '' }, { strictNullHandling: true }), 'a&b='); + + st.equal(qs.stringify({ a: { b: '' } }), 'a%5Bb%5D='); + st.equal(qs.stringify({ a: { b: null } }, { strictNullHandling: true }), 'a%5Bb%5D'); + st.equal(qs.stringify({ a: { b: null } }, { strictNullHandling: false }), 'a%5Bb%5D='); + + st.end(); + }); + + t.test('stringifies an empty object', function (st) { + var obj = Object.create(null); + obj.a = 'b'; + st.equal(qs.stringify(obj), 'a=b'); + st.end(); + }); + + t.test('returns an empty string for invalid input', function (st) { + st.equal(qs.stringify(undefined), ''); + st.equal(qs.stringify(false), ''); + st.equal(qs.stringify(null), ''); + st.equal(qs.stringify(''), ''); + st.end(); + }); + + t.test('stringifies an object with an empty object as a child', function (st) { + var obj = { + a: Object.create(null) + }; + + obj.a.b = 'c'; + st.equal(qs.stringify(obj), 'a%5Bb%5D=c'); + st.end(); + }); + + t.test('drops keys with a value of undefined', function (st) { + st.equal(qs.stringify({ a: undefined }), ''); + + st.equal(qs.stringify({ a: { b: undefined, c: null } }, { strictNullHandling: true }), 'a%5Bc%5D'); + st.equal(qs.stringify({ a: { b: undefined, c: null } }, { strictNullHandling: false }), 'a%5Bc%5D='); + st.equal(qs.stringify({ a: { b: undefined, c: '' } }), 'a%5Bc%5D='); + st.end(); + }); + + t.test('url encodes values', function (st) { + st.equal(qs.stringify({ a: 'b c' }), 'a=b%20c'); + st.end(); + }); + + t.test('stringifies a date', function (st) { + var now = new Date(); + var str = 'a=' + encodeURIComponent(now.toISOString()); + st.equal(qs.stringify({ a: now }), str); + st.end(); + }); + + t.test('stringifies the weird object from qs', function (st) { + st.equal(qs.stringify({ 'my weird field': '~q1!2"\'w$5&7/z8)?' }), 'my%20weird%20field=~q1%212%22%27w%245%267%2Fz8%29%3F'); + st.end(); + }); + + t.test('skips properties that are part of the object prototype', function (st) { + Object.prototype.crash = 'test'; + st.equal(qs.stringify({ a: 'b' }), 'a=b'); + st.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c'); + delete Object.prototype.crash; + st.end(); + }); + + t.test('stringifies boolean values', function (st) { + st.equal(qs.stringify({ a: true }), 'a=true'); + st.equal(qs.stringify({ a: { b: true } }), 'a%5Bb%5D=true'); + st.equal(qs.stringify({ b: false }), 'b=false'); + st.equal(qs.stringify({ b: { c: false } }), 'b%5Bc%5D=false'); + st.end(); + }); + + t.test('stringifies buffer values', function (st) { + st.equal(qs.stringify({ a: new Buffer('test') }), 'a=test'); + st.equal(qs.stringify({ a: { b: new Buffer('test') } }), 'a%5Bb%5D=test'); + st.end(); + }); + + t.test('stringifies an object using an alternative delimiter', function (st) { + st.equal(qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' }), 'a=b;c=d'); + st.end(); + }); + + t.test('doesn\'t blow up when Buffer global is missing', function (st) { + var tempBuffer = global.Buffer; + delete global.Buffer; + var result = qs.stringify({ a: 'b', c: 'd' }); + global.Buffer = tempBuffer; + st.equal(result, 'a=b&c=d'); + st.end(); + }); + + t.test('selects properties when filter=array', function (st) { + st.equal(qs.stringify({ a: 'b' }, { filter: ['a'] }), 'a=b'); + st.equal(qs.stringify({ a: 1 }, { filter: [] }), ''); + st.equal(qs.stringify({ a: { b: [1, 2, 3, 4], c: 'd' }, c: 'f' }, { filter: ['a', 'b', 0, 2] }), 'a%5Bb%5D%5B0%5D=1&a%5Bb%5D%5B2%5D=3'); + st.end(); + }); + + t.test('supports custom representations when filter=function', function (st) { + var calls = 0; + var obj = { a: 'b', c: 'd', e: { f: new Date(1257894000000) } }; + var filterFunc = function (prefix, value) { + calls++; + if (calls === 1) { + st.equal(prefix, '', 'prefix is empty'); + st.equal(value, obj); + } else if (prefix === 'c') { + return; + } else if (value instanceof Date) { + st.equal(prefix, 'e[f]'); + return value.getTime(); + } + return value; + }; + + st.equal(qs.stringify(obj, { filter: filterFunc }), 'a=b&e%5Bf%5D=1257894000000'); + st.equal(calls, 5); + st.end(); + }); + + t.test('can disable uri encoding', function (st) { + st.equal(qs.stringify({ a: 'b' }, { encode: false }), 'a=b'); + st.equal(qs.stringify({ a: { b: 'c' } }, { encode: false }), 'a[b]=c'); + st.equal(qs.stringify({ a: 'b', c: null }, { strictNullHandling: true, encode: false }), 'a=b&c'); + st.end(); + }); + + t.test('can sort the keys', function (st) { + var sort = function (a, b) { return a.localeCompare(b); }; + st.equal(qs.stringify({ a: 'c', z: 'y', b: 'f' }, { sort: sort }), 'a=c&b=f&z=y'); + st.equal(qs.stringify({ a: 'c', z: { j: 'a', i: 'b' }, b: 'f' }, { sort: sort }), 'a=c&b=f&z%5Bi%5D=b&z%5Bj%5D=a'); + st.end(); + }); + + t.test('can sort the keys at depth 3 or more too', function (st) { + var sort = function (a, b) { return a.localeCompare(b); }; + st.equal(qs.stringify({ a: 'a', z: { zj: {zjb: 'zjb', zja: 'zja'}, zi: {zib: 'zib', zia: 'zia'} }, b: 'b' }, { sort: sort, encode: false }), 'a=a&b=b&z[zi][zia]=zia&z[zi][zib]=zib&z[zj][zja]=zja&z[zj][zjb]=zjb'); + st.equal(qs.stringify({ a: 'a', z: { zj: {zjb: 'zjb', zja: 'zja'}, zi: {zib: 'zib', zia: 'zia'} }, b: 'b' }, { sort: null, encode: false }), 'a=a&z[zj][zjb]=zjb&z[zj][zja]=zja&z[zi][zib]=zib&z[zi][zia]=zia&b=b'); + st.end(); + }); + + t.test('can stringify with custom encoding', function (st) { + st.equal(qs.stringify({ 県: '大阪府', '': ''}, { + encoder: function (str) { + if (str.length === 0) { + return ''; + } + var buf = iconv.encode(str, 'shiftjis'); + var result = []; + for (var i=0; i < buf.length; ++i) { + result.push(buf.readUInt8(i).toString(16)); + } + return '%' + result.join('%'); + } + }), '%8c%a7=%91%e5%8d%e3%95%7b&='); + st.end(); + }); + + t.test('throws error with wrong encoder', function (st) { + st.throws(function () { + qs.stringify({}, { + encoder: 'string' + }); + }, new TypeError('Encoder has to be a function.')); + st.end(); + }); + + t.test('can use custom encoder for a buffer object', { + skip: typeof Buffer === 'undefined' + }, function (st) { + st.equal(qs.stringify({ a: new Buffer([1]) }, { + encoder: function (buffer) { + if (typeof buffer === 'string') { + return buffer; + } + return String.fromCharCode(buffer.readUInt8(0) + 97); + } + }), 'a=b'); + st.end(); + }); +}); diff --git a/node_modules/qs/test/utils.js b/node_modules/qs/test/utils.js new file mode 100755 index 0000000..4a8d824 --- /dev/null +++ b/node_modules/qs/test/utils.js @@ -0,0 +1,9 @@ +'use strict'; + +var test = require('tape'); +var utils = require('../lib/utils'); + +test('merge()', function (t) { + t.deepEqual(utils.merge({ a: 'b' }, { a: 'c' }), { a: ['b', 'c'] }, 'merges two objects with the same key'); + t.end(); +}); diff --git a/node_modules/randomatic/LICENSE b/node_modules/randomatic/LICENSE new file mode 100755 index 0000000..4a3d2da --- /dev/null +++ b/node_modules/randomatic/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013-2016, Jon Schlinkert + +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. diff --git a/node_modules/randomatic/README.md b/node_modules/randomatic/README.md new file mode 100644 index 0000000..1c5202a --- /dev/null +++ b/node_modules/randomatic/README.md @@ -0,0 +1,152 @@ +# randomatic [![NPM version](https://img.shields.io/npm/v/randomatic.svg?style=flat)](https://www.npmjs.com/package/randomatic) [![NPM monthly downloads](https://img.shields.io/npm/dm/randomatic.svg?style=flat)](https://npmjs.org/package/randomatic) [![NPM total downloads](https://img.shields.io/npm/dt/randomatic.svg?style=flat)](https://npmjs.org/package/randomatic) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/randomatic.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/randomatic) + +> Generate randomized strings of a specified length, fast. Only the length is necessary, but you can optionally generate patterns using any combination of numeric, alpha-numeric, alphabetical, special or custom characters. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save randomatic +``` + +## Usage + +```js +var randomize = require('randomatic'); +``` + +## API + +```js +randomize(pattern, length, options); +``` + +* `pattern` **{String}**: The pattern to use for randomizing +* `length` **{Object}**: The length of the string to generate + +### pattern + +> The pattern to use for randomizing + +Patterns can contain any combination of the below characters, specified in any order. + +**Example:** + +To generate a 10-character randomized string using all available characters: + +```js +randomize('*', 10); +//=> + +randomize('Aa0!', 10); +//=> +``` + +* `a`: Lowercase alpha characters (`abcdefghijklmnopqrstuvwxyz'`) +* `A`: Uppercase alpha characters (`ABCDEFGHIJKLMNOPQRSTUVWXYZ'`) +* `0`: Numeric characters (`0123456789'`) +* `!`: Special characters (`~!@#$%^&()_+-={}[];\',.`) +* `*`: All characters (all of the above combined) +* `?`: Custom characters (pass a string of custom characters to the options) + +### length + +> the length of the string to generate + +**Examples:** + +* `randomize('A', 5)` will generate a 5-character, uppercase, alphabetical, randomized string, e.g. `KDJWJ`. +* `randomize('0', 2)` will generate a 2-digit random number +* `randomize('0', 3)` will generate a 3-digit random number +* `randomize('0', 12)` will generate a 12-digit random number +* `randomize('A0', 16)` will generate a 16-character, alpha-numeric randomized string + +If `length` is left undefined, the length of the pattern in the first parameter will be used. For example: + +* `randomize('00')` will generate a 2-digit random number +* `randomize('000')` will generate a 3-digit random number +* `randomize('0000')` will generate a 4-digit random number... +* `randomize('AAAAA')` will generate a 5-character, uppercase alphabetical random string... + +These are just examples, [see the tests](./test.js) for more use cases and examples. + +#### chars + +Type: `String` + +Default: `undefined` + +Define a custom string to be randomized. + +**Example:** + +* `randomize('?', 20, {chars: 'jonschlinkert'})` will generate a 20-character randomized string from the letters contained in `jonschlinkert`. +* `randomize('?', {chars: 'jonschlinkert'})` will generate a 13-character randomized string from the letters contained in `jonschlinkert`. + +## Usage Examples + +* `randomize('A', 4)` (_whitespace insenstive_) would result in randomized 4-digit uppercase letters, like, `ZAKH`, `UJSL`... etc. +* `randomize('AAAA')` is equivelant to `randomize('A', 4)` +* `randomize('AAA0')` and `randomize('AA00')` and `randomize('A0A0')` are equivelant to `randomize('A0', 4)` +* `randomize('aa')`: results in double-digit, randomized, lower-case letters (`abcdefghijklmnopqrstuvwxyz`) +* `randomize('AAA')`: results in triple-digit, randomized, upper-case letters (`ABCDEFGHIJKLMNOPQRSTUVWXYZ`) +* `randomize('0', 6)`: results in six-digit, randomized nubmers (`0123456789`) +* `randomize('!', 5)`: results in single-digit randomized, _valid_ non-letter characters (`~!@#$%^&()_+-={}[];\',.`) +* `randomize('A!a0', 9)`: results in nine-digit, randomized characters (any of the above) + +_The order in which the characters are defined is insignificant._ + +## About + +### Related projects + +* [pad-left](https://www.npmjs.com/package/pad-left): Left pad a string with zeros or a specified string. Fastest implementation. | [homepage](https://github.com/jonschlinkert/pad-left "Left pad a string with zeros or a specified string. Fastest implementation.") +* [pad-right](https://www.npmjs.com/package/pad-right): Right pad a string with zeros or a specified string. Fastest implementation. | [homepage](https://github.com/jonschlinkert/pad-right "Right pad a string with zeros or a specified string. Fastest implementation.") +* [repeat-string](https://www.npmjs.com/package/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. | [homepage](https://github.com/jonschlinkert/repeat-string "Repeat the given string n times. Fastest implementation for repeating a string.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor**
    | +| --- | --- | +| 36 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [TrySound](https://github.com/TrySound) | +| 1 | [paulmillr](https://github.com/paulmillr) | + +### Building docs + +_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ + +To generate the readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install -g verb verb-generate-readme && verb +``` + +### Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +### License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/randomatic/blob/master/LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on November 24, 2016._ \ No newline at end of file diff --git a/node_modules/randomatic/index.js b/node_modules/randomatic/index.js new file mode 100644 index 0000000..85dbe21 --- /dev/null +++ b/node_modules/randomatic/index.js @@ -0,0 +1,83 @@ +/*! + * randomatic + * + * This was originally inspired by + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License (MIT) + */ + +'use strict'; + +var isNumber = require('is-number'); +var typeOf = require('kind-of'); + +/** + * Expose `randomatic` + */ + +module.exports = randomatic; + +/** + * Available mask characters + */ + +var type = { + lower: 'abcdefghijklmnopqrstuvwxyz', + upper: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', + number: '0123456789', + special: '~!@#$%^&()_+-={}[];\',.' +}; + +type.all = type.lower + type.upper + type.number; + +/** + * Generate random character sequences of a specified `length`, + * based on the given `pattern`. + * + * @param {String} `pattern` The pattern to use for generating the random string. + * @param {String} `length` The length of the string to generate. + * @param {String} `options` + * @return {String} + * @api public + */ + +function randomatic(pattern, length, options) { + if (typeof pattern === 'undefined') { + throw new Error('randomatic expects a string or number.'); + } + + var custom = false; + if (arguments.length === 1) { + if (typeof pattern === 'string') { + length = pattern.length; + + } else if (isNumber(pattern)) { + options = {}; length = pattern; pattern = '*'; + } + } + + if (typeOf(length) === 'object' && length.hasOwnProperty('chars')) { + options = length; + pattern = options.chars; + length = pattern.length; + custom = true; + } + + var opts = options || {}; + var mask = ''; + var res = ''; + + // Characters to be used + if (pattern.indexOf('?') !== -1) mask += opts.chars; + if (pattern.indexOf('a') !== -1) mask += type.lower; + if (pattern.indexOf('A') !== -1) mask += type.upper; + if (pattern.indexOf('0') !== -1) mask += type.number; + if (pattern.indexOf('!') !== -1) mask += type.special; + if (pattern.indexOf('*') !== -1) mask += type.all; + if (custom) mask += pattern; + + while (length--) { + res += mask.charAt(parseInt(Math.random() * mask.length, 10)); + } + return res; +}; diff --git a/node_modules/randomatic/package.json b/node_modules/randomatic/package.json new file mode 100644 index 0000000..5f4b3ad --- /dev/null +++ b/node_modules/randomatic/package.json @@ -0,0 +1,141 @@ +{ + "_args": [ + [ + { + "raw": "randomatic@^1.1.3", + "scope": null, + "escapedName": "randomatic", + "name": "randomatic", + "rawSpec": "^1.1.3", + "spec": ">=1.1.3 <2.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/fill-range" + ] + ], + "_from": "randomatic@>=1.1.3 <2.0.0", + "_id": "randomatic@1.1.6", + "_inCache": true, + "_location": "/randomatic", + "_nodeVersion": "6.7.0", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/randomatic-1.1.6.tgz_1480022662943_0.08446102566085756" + }, + "_npmUser": { + "name": "jonschlinkert", + "email": "github@sellside.com" + }, + "_npmVersion": "3.10.3", + "_phantomChildren": {}, + "_requested": { + "raw": "randomatic@^1.1.3", + "scope": null, + "escapedName": "randomatic", + "name": "randomatic", + "rawSpec": "^1.1.3", + "spec": ">=1.1.3 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fill-range" + ], + "_resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.6.tgz", + "_shasum": "110dcabff397e9dcff7c0789ccc0a49adf1ec5bb", + "_shrinkwrap": null, + "_spec": "randomatic@^1.1.3", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/fill-range", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/randomatic/issues" + }, + "dependencies": { + "is-number": "^2.0.2", + "kind-of": "^3.0.2" + }, + "description": "Generate randomized strings of a specified length, fast. Only the length is necessary, but you can optionally generate patterns using any combination of numeric, alpha-numeric, alphabetical, special or custom characters.", + "devDependencies": { + "ansi-bold": "^0.1.1", + "benchmarked": "^0.1.4", + "glob": "^5.0.15", + "gulp-format-md": "^0.1.11", + "mocha": "*", + "should": "*" + }, + "directories": {}, + "dist": { + "shasum": "110dcabff397e9dcff7c0789ccc0a49adf1ec5bb", + "tarball": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.6.tgz" + }, + "engines": { + "node": ">= 0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "80065df04deaa8f7a405d2689aaaef57117c6a94", + "homepage": "https://github.com/jonschlinkert/randomatic", + "keywords": [ + "alpha", + "alpha-numeric", + "alphanumeric", + "characters", + "chars", + "numeric", + "rand", + "random", + "randomatic", + "randomize", + "randomized" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "doowb", + "email": "brian.woodward@gmail.com" + }, + { + "name": "jonschlinkert", + "email": "github@sellside.com" + } + ], + "name": "randomatic", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/randomatic.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "pad-left", + "pad-right", + "repeat-string" + ] + }, + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb", + "verb-generate-readme" + ] + }, + "version": "1.1.6" +} diff --git a/node_modules/range-parser/HISTORY.md b/node_modules/range-parser/HISTORY.md new file mode 100644 index 0000000..5e01eef --- /dev/null +++ b/node_modules/range-parser/HISTORY.md @@ -0,0 +1,51 @@ +1.2.0 / 2016-06-01 +================== + + * Add `combine` option to combine overlapping ranges + +1.1.0 / 2016-05-13 +================== + + * Fix incorrectly returning -1 when there is at least one valid range + * perf: remove internal function + +1.0.3 / 2015-10-29 +================== + + * perf: enable strict mode + +1.0.2 / 2014-09-08 +================== + + * Support Node.js 0.6 + +1.0.1 / 2014-09-07 +================== + + * Move repository to jshttp + +1.0.0 / 2013-12-11 +================== + + * Add repository to package.json + * Add MIT license + +0.0.4 / 2012-06-17 +================== + + * Change ret -1 for unsatisfiable and -2 when invalid + +0.0.3 / 2012-06-17 +================== + + * Fix last-byte-pos default to len - 1 + +0.0.2 / 2012-06-14 +================== + + * Add `.type` + +0.0.1 / 2012-06-11 +================== + + * Initial release diff --git a/node_modules/range-parser/LICENSE b/node_modules/range-parser/LICENSE new file mode 100644 index 0000000..3599954 --- /dev/null +++ b/node_modules/range-parser/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2012-2014 TJ Holowaychuk +Copyright (c) 2015-2016 Douglas Christopher Wilson [ +// { start: 0, end: 10 }, +// { start: 50, end: 60 } +// ] +``` + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/range-parser.svg +[npm-url]: https://npmjs.org/package/range-parser +[node-version-image]: https://img.shields.io/node/v/range-parser.svg +[node-version-url]: https://nodejs.org/endownload +[travis-image]: https://img.shields.io/travis/jshttp/range-parser.svg +[travis-url]: https://travis-ci.org/jshttp/range-parser +[coveralls-image]: https://img.shields.io/coveralls/jshttp/range-parser.svg +[coveralls-url]: https://coveralls.io/r/jshttp/range-parser +[downloads-image]: https://img.shields.io/npm/dm/range-parser.svg +[downloads-url]: https://npmjs.org/package/range-parser diff --git a/node_modules/range-parser/index.js b/node_modules/range-parser/index.js new file mode 100644 index 0000000..83b2eb6 --- /dev/null +++ b/node_modules/range-parser/index.js @@ -0,0 +1,158 @@ +/*! + * range-parser + * Copyright(c) 2012-2014 TJ Holowaychuk + * Copyright(c) 2015-2016 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + * @public + */ + +module.exports = rangeParser + +/** + * Parse "Range" header `str` relative to the given file `size`. + * + * @param {Number} size + * @param {String} str + * @param {Object} [options] + * @return {Array} + * @public + */ + +function rangeParser (size, str, options) { + var index = str.indexOf('=') + + if (index === -1) { + return -2 + } + + // split the range string + var arr = str.slice(index + 1).split(',') + var ranges = [] + + // add ranges type + ranges.type = str.slice(0, index) + + // parse all ranges + for (var i = 0; i < arr.length; i++) { + var range = arr[i].split('-') + var start = parseInt(range[0], 10) + var end = parseInt(range[1], 10) + + // -nnn + if (isNaN(start)) { + start = size - end + end = size - 1 + // nnn- + } else if (isNaN(end)) { + end = size - 1 + } + + // limit last-byte-pos to current length + if (end > size - 1) { + end = size - 1 + } + + // invalid or unsatisifiable + if (isNaN(start) || isNaN(end) || start > end || start < 0) { + continue + } + + // add range + ranges.push({ + start: start, + end: end + }) + } + + if (ranges.length < 1) { + // unsatisifiable + return -1 + } + + return options && options.combine + ? combineRanges(ranges) + : ranges +} + +/** + * Combine overlapping & adjacent ranges. + * @private + */ + +function combineRanges (ranges) { + var ordered = ranges.map(mapWithIndex).sort(sortByRangeStart) + + for (var j = 0, i = 1; i < ordered.length; i++) { + var range = ordered[i] + var current = ordered[j] + + if (range.start > current.end + 1) { + // next range + ordered[++j] = range + } else if (range.end > current.end) { + // extend range + current.end = range.end + current.index = Math.min(current.index, range.index) + } + } + + // trim ordered array + ordered.length = j + 1 + + // generate combined range + var combined = ordered.sort(sortByRangeIndex).map(mapWithoutIndex) + + // copy ranges type + combined.type = ranges.type + + return combined +} + +/** + * Map function to add index value to ranges. + * @private + */ + +function mapWithIndex (range, index) { + return { + start: range.start, + end: range.end, + index: index + } +} + +/** + * Map function to remove index value from ranges. + * @private + */ + +function mapWithoutIndex (range) { + return { + start: range.start, + end: range.end + } +} + +/** + * Sort function to sort ranges by index. + * @private + */ + +function sortByRangeIndex (a, b) { + return a.index - b.index +} + +/** + * Sort function to sort ranges by start position. + * @private + */ + +function sortByRangeStart (a, b) { + return a.start - b.start +} diff --git a/node_modules/range-parser/package.json b/node_modules/range-parser/package.json new file mode 100644 index 0000000..4ad928c --- /dev/null +++ b/node_modules/range-parser/package.json @@ -0,0 +1,134 @@ +{ + "_args": [ + [ + { + "raw": "range-parser@~1.2.0", + "scope": null, + "escapedName": "range-parser", + "name": "range-parser", + "rawSpec": "~1.2.0", + "spec": ">=1.2.0 <1.3.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/express" + ] + ], + "_from": "range-parser@>=1.2.0 <1.3.0", + "_id": "range-parser@1.2.0", + "_inCache": true, + "_location": "/range-parser", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/range-parser-1.2.0.tgz_1464803293097_0.6830497414339334" + }, + "_npmUser": { + "name": "dougwilson", + "email": "doug@somethingdoug.com" + }, + "_npmVersion": "1.4.28", + "_phantomChildren": {}, + "_requested": { + "raw": "range-parser@~1.2.0", + "scope": null, + "escapedName": "range-parser", + "name": "range-parser", + "rawSpec": "~1.2.0", + "spec": ">=1.2.0 <1.3.0", + "type": "range" + }, + "_requiredBy": [ + "/express", + "/send" + ], + "_resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "_shasum": "f49be6b487894ddc40dcc94a322f611092e00d5e", + "_shrinkwrap": null, + "_spec": "range-parser@~1.2.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/express", + "author": { + "name": "TJ Holowaychuk", + "email": "tj@vision-media.ca", + "url": "http://tjholowaychuk.com" + }, + "bugs": { + "url": "https://github.com/jshttp/range-parser/issues" + }, + "contributors": [ + { + "name": "Douglas Christopher Wilson", + "email": "doug@somethingdoug.com" + }, + { + "name": "James Wyatt Cready", + "email": "wyatt.cready@lanetix.com" + }, + { + "name": "Jonathan Ong", + "email": "me@jongleberry.com", + "url": "http://jongleberry.com" + } + ], + "dependencies": {}, + "description": "Range header field string parser", + "devDependencies": { + "eslint": "2.11.1", + "eslint-config-standard": "5.3.1", + "eslint-plugin-promise": "1.1.0", + "eslint-plugin-standard": "1.3.2", + "istanbul": "0.4.3", + "mocha": "1.21.5" + }, + "directories": {}, + "dist": { + "shasum": "f49be6b487894ddc40dcc94a322f611092e00d5e", + "tarball": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz" + }, + "engines": { + "node": ">= 0.6" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "index.js" + ], + "gitHead": "0665aca31639d799dee1d35fb10970799559ec48", + "homepage": "https://github.com/jshttp/range-parser", + "keywords": [ + "range", + "parser", + "http" + ], + "license": "MIT", + "maintainers": [ + { + "name": "dougwilson", + "email": "doug@somethingdoug.com" + }, + { + "name": "jonathanong", + "email": "jonathanrichardong@gmail.com" + }, + { + "name": "jongleberry", + "email": "jonathanrichardong@gmail.com" + }, + { + "name": "tjholowaychuk", + "email": "tj@vision-media.ca" + } + ], + "name": "range-parser", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jshttp/range-parser.git" + }, + "scripts": { + "lint": "eslint **/*.js", + "test": "mocha --reporter spec", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot" + }, + "version": "1.2.0" +} diff --git a/node_modules/raw-body/HISTORY.md b/node_modules/raw-body/HISTORY.md new file mode 100644 index 0000000..23e9481 --- /dev/null +++ b/node_modules/raw-body/HISTORY.md @@ -0,0 +1,220 @@ +2.2.0 / 2017-01-02 +================== + + * deps: iconv-lite@0.4.15 + - Added encoding MS-31J + - Added encoding MS-932 + - Added encoding MS-936 + - Added encoding MS-949 + - Added encoding MS-950 + - Fix GBK/GB18030 handling of Euro character + +2.1.7 / 2016-06-19 +================== + + * deps: bytes@2.4.0 + * perf: remove double-cleanup on happy path + +2.1.6 / 2016-03-07 +================== + + * deps: bytes@2.3.0 + - Drop partial bytes on all parsed units + - Fix parsing byte string that looks like hex + +2.1.5 / 2015-11-30 +================== + + * deps: bytes@2.2.0 + * deps: iconv-lite@0.4.13 + +2.1.4 / 2015-09-27 +================== + + * Fix masking critical errors from `iconv-lite` + * deps: iconv-lite@0.4.12 + - Fix CESU-8 decoding in Node.js 4.x + +2.1.3 / 2015-09-12 +================== + + * Fix sync callback when attaching data listener causes sync read + - Node.js 0.10 compatibility issue + +2.1.2 / 2015-07-05 +================== + + * Fix error stack traces to skip `makeError` + * deps: iconv-lite@0.4.11 + - Add encoding CESU-8 + +2.1.1 / 2015-06-14 +================== + + * Use `unpipe` module for unpiping requests + +2.1.0 / 2015-05-28 +================== + + * deps: iconv-lite@0.4.10 + - Improved UTF-16 endianness detection + - Leading BOM is now removed when decoding + - The encoding UTF-16 without BOM now defaults to UTF-16LE when detection fails + +2.0.2 / 2015-05-21 +================== + + * deps: bytes@2.1.0 + - Slight optimizations + +2.0.1 / 2015-05-10 +================== + + * Fix a false-positive when unpiping in Node.js 0.8 + +2.0.0 / 2015-05-08 +================== + + * Return a promise without callback instead of thunk + * deps: bytes@2.0.1 + - units no longer case sensitive when parsing + +1.3.4 / 2015-04-15 +================== + + * Fix hanging callback if request aborts during read + * deps: iconv-lite@0.4.8 + - Add encoding alias UNICODE-1-1-UTF-7 + +1.3.3 / 2015-02-08 +================== + + * deps: iconv-lite@0.4.7 + - Gracefully support enumerables on `Object.prototype` + +1.3.2 / 2015-01-20 +================== + + * deps: iconv-lite@0.4.6 + - Fix rare aliases of single-byte encodings + +1.3.1 / 2014-11-21 +================== + + * deps: iconv-lite@0.4.5 + - Fix Windows-31J and X-SJIS encoding support + +1.3.0 / 2014-07-20 +================== + + * Fully unpipe the stream on error + - Fixes `Cannot switch to old mode now` error on Node.js 0.10+ + +1.2.3 / 2014-07-20 +================== + + * deps: iconv-lite@0.4.4 + - Added encoding UTF-7 + +1.2.2 / 2014-06-19 +================== + + * Send invalid encoding error to callback + +1.2.1 / 2014-06-15 +================== + + * deps: iconv-lite@0.4.3 + - Added encodings UTF-16BE and UTF-16 with BOM + +1.2.0 / 2014-06-13 +================== + + * Passing string as `options` interpreted as encoding + * Support all encodings from `iconv-lite` + +1.1.7 / 2014-06-12 +================== + + * use `string_decoder` module from npm + +1.1.6 / 2014-05-27 +================== + + * check encoding for old streams1 + * support node.js < 0.10.6 + +1.1.5 / 2014-05-14 +================== + + * bump bytes + +1.1.4 / 2014-04-19 +================== + + * allow true as an option + * bump bytes + +1.1.3 / 2014-03-02 +================== + + * fix case when length=null + +1.1.2 / 2013-12-01 +================== + + * be less strict on state.encoding check + +1.1.1 / 2013-11-27 +================== + + * add engines + +1.1.0 / 2013-11-27 +================== + + * add err.statusCode and err.type + * allow for encoding option to be true + * pause the stream instead of dumping on error + * throw if the stream's encoding is set + +1.0.1 / 2013-11-19 +================== + + * dont support streams1, throw if dev set encoding + +1.0.0 / 2013-11-17 +================== + + * rename `expected` option to `length` + +0.2.0 / 2013-11-15 +================== + + * republish + +0.1.1 / 2013-11-15 +================== + + * use bytes + +0.1.0 / 2013-11-11 +================== + + * generator support + +0.0.3 / 2013-10-10 +================== + + * update repo + +0.0.2 / 2013-09-14 +================== + + * dump stream on bad headers + * listen to events after defining received and buffers + +0.0.1 / 2013-09-14 +================== + + * Initial release diff --git a/node_modules/raw-body/LICENSE b/node_modules/raw-body/LICENSE new file mode 100644 index 0000000..d695c8f --- /dev/null +++ b/node_modules/raw-body/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2013-2014 Jonathan Ong +Copyright (c) 2014-2015 Douglas Christopher Wilson + +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. diff --git a/node_modules/raw-body/README.md b/node_modules/raw-body/README.md new file mode 100644 index 0000000..7ed7441 --- /dev/null +++ b/node_modules/raw-body/README.md @@ -0,0 +1,145 @@ +# raw-body + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build status][travis-image]][travis-url] +[![Test coverage][coveralls-image]][coveralls-url] + +Gets the entire buffer of a stream either as a `Buffer` or a string. +Validates the stream's length against an expected length and maximum limit. +Ideal for parsing request bodies. + +## API + + + +```js +var getRawBody = require('raw-body') +``` + +### getRawBody(stream, [options], [callback]) + +**Returns a promise if no callback specified and global `Promise` exists.** + +Options: + +- `length` - The length of the stream. + If the contents of the stream do not add up to this length, + an `400` error code is returned. +- `limit` - The byte limit of the body. + This is the number of bytes or any string format supported by + [bytes](https://www.npmjs.com/package/bytes), + for example `1000`, `'500kb'` or `'3mb'`. + If the body ends up being larger than this limit, + a `413` error code is returned. +- `encoding` - The encoding to use to decode the body into a string. + By default, a `Buffer` instance will be returned when no encoding is specified. + Most likely, you want `utf-8`, so setting `encoding` to `true` will decode as `utf-8`. + You can use any type of encoding supported by [iconv-lite](https://www.npmjs.org/package/iconv-lite#readme). + +You can also pass a string in place of options to just specify the encoding. + +`callback(err, res)`: + +- `err` - the following attributes will be defined if applicable: + + - `limit` - the limit in bytes + - `length` and `expected` - the expected length of the stream + - `received` - the received bytes + - `encoding` - the invalid encoding + - `status` and `statusCode` - the corresponding status code for the error + - `type` - either `entity.too.large`, `request.aborted`, `request.size.invalid`, `stream.encoding.set`, or `encoding.unsupported` + +- `res` - the result, either as a `String` if an encoding was set or a `Buffer` otherwise. + +If an error occurs, the stream will be paused, everything unpiped, +and you are responsible for correctly disposing the stream. +For HTTP requests, no handling is required if you send a response. +For streams that use file descriptors, you should `stream.destroy()` or `stream.close()` to prevent leaks. + +## Examples + +### Simple Express example + +```js +var contentType = require('content-type') +var express = require('express') +var getRawBody = require('raw-body') + +var app = express() + +app.use(function (req, res, next) { + getRawBody(req, { + length: req.headers['content-length'], + limit: '1mb', + encoding: contentType.parse(req).parameters.charset + }, function (err, string) { + if (err) return next(err) + req.text = string + next() + }) +}) + +// now access req.text +``` + +### Simple Koa example + +```js +var contentType = require('content-type') +var getRawBody = require('raw-body') +var koa = require('koa') + +var app = koa() + +app.use(function * (next) { + this.text = yield getRawBody(this.req, { + length: this.req.headers['content-length'], + limit: '1mb', + encoding: contentType.parse(this.req).parameters.charset + }) + yield next +}) + +// now access this.text +``` + +### Using as a promise + +To use this library as a promise, simply omit the `callback` and a promise is +returned, provided that a global `Promise` is defined. + +```js +var getRawBody = require('raw-body') +var http = require('http') + +var server = http.createServer(function (req, res) { + getRawBody(req) + .then(function (buf) { + res.statusCode = 200 + res.end(buf.length + ' bytes submitted') + }) + .catch(function (err) { + res.statusCode = 500 + res.end(err.message) + }) +}) + +server.listen(3000) +``` + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/raw-body.svg +[npm-url]: https://npmjs.org/package/raw-body +[node-version-image]: https://img.shields.io/node/v/raw-body.svg +[node-version-url]: https://nodejs.org/en/download/ +[travis-image]: https://img.shields.io/travis/stream-utils/raw-body/master.svg +[travis-url]: https://travis-ci.org/stream-utils/raw-body +[coveralls-image]: https://img.shields.io/coveralls/stream-utils/raw-body/master.svg +[coveralls-url]: https://coveralls.io/r/stream-utils/raw-body?branch=master +[downloads-image]: https://img.shields.io/npm/dm/raw-body.svg +[downloads-url]: https://npmjs.org/package/raw-body diff --git a/node_modules/raw-body/index.js b/node_modules/raw-body/index.js new file mode 100644 index 0000000..57b9c11 --- /dev/null +++ b/node_modules/raw-body/index.js @@ -0,0 +1,320 @@ +/*! + * raw-body + * Copyright(c) 2013-2014 Jonathan Ong + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var bytes = require('bytes') +var iconv = require('iconv-lite') +var unpipe = require('unpipe') + +/** + * Module exports. + * @public + */ + +module.exports = getRawBody + +/** + * Module variables. + * @private + */ + +var iconvEncodingMessageRegExp = /^Encoding not recognized: / + +/** + * Get the decoder for a given encoding. + * + * @param {string} encoding + * @private + */ + +function getDecoder (encoding) { + if (!encoding) return null + + try { + return iconv.getDecoder(encoding) + } catch (e) { + // error getting decoder + if (!iconvEncodingMessageRegExp.test(e.message)) throw e + + // the encoding was not found + throw createError(415, 'specified encoding unsupported', 'encoding.unsupported', { + encoding: encoding + }) + } +} + +/** + * Get the raw body of a stream (typically HTTP). + * + * @param {object} stream + * @param {object|string|function} [options] + * @param {function} [callback] + * @public + */ + +function getRawBody (stream, options, callback) { + var done = callback + var opts = options || {} + + if (options === true || typeof options === 'string') { + // short cut for encoding + opts = { + encoding: options + } + } + + if (typeof options === 'function') { + done = options + opts = {} + } + + // validate callback is a function, if provided + if (done !== undefined && typeof done !== 'function') { + throw new TypeError('argument callback must be a function') + } + + // require the callback without promises + if (!done && !global.Promise) { + throw new TypeError('argument callback is required') + } + + // get encoding + var encoding = opts.encoding !== true + ? opts.encoding + : 'utf-8' + + // convert the limit to an integer + var limit = bytes.parse(opts.limit) + + // convert the expected length to an integer + var length = opts.length != null && !isNaN(opts.length) + ? parseInt(opts.length, 10) + : null + + if (done) { + // classic callback style + return readStream(stream, encoding, length, limit, done) + } + + return new Promise(function executor (resolve, reject) { + readStream(stream, encoding, length, limit, function onRead (err, buf) { + if (err) return reject(err) + resolve(buf) + }) + }) +} + +/** + * Halt a stream. + * + * @param {Object} stream + * @private + */ + +function halt (stream) { + // unpipe everything from the stream + unpipe(stream) + + // pause stream + if (typeof stream.pause === 'function') { + stream.pause() + } +} + +/** + * Make a serializable error object. + * + * To create serializable errors you must re-set message so + * that it is enumerable and you must re configure the type + * property so that is writable and enumerable. + * + * @param {number} status + * @param {string} message + * @param {string} type + * @param {object} props + * @private + */ + +function createError (status, message, type, props) { + var error = new Error() + + // capture stack trace + Error.captureStackTrace(error, createError) + + // set free-form properties + for (var prop in props) { + error[prop] = props[prop] + } + + // set message + error.message = message + + // set status + error.status = status + error.statusCode = status + + // set type + Object.defineProperty(error, 'type', { + value: type, + enumerable: true, + writable: true, + configurable: true + }) + + return error +} + +/** + * Read the data from the stream. + * + * @param {object} stream + * @param {string} encoding + * @param {number} length + * @param {number} limit + * @param {function} callback + * @public + */ + +function readStream (stream, encoding, length, limit, callback) { + var complete = false + var sync = true + + // check the length and limit options. + // note: we intentionally leave the stream paused, + // so users should handle the stream themselves. + if (limit !== null && length !== null && length > limit) { + return done(createError(413, 'request entity too large', 'entity.too.large', { + expected: length, + length: length, + limit: limit + })) + } + + // streams1: assert request encoding is buffer. + // streams2+: assert the stream encoding is buffer. + // stream._decoder: streams1 + // state.encoding: streams2 + // state.decoder: streams2, specifically < 0.10.6 + var state = stream._readableState + if (stream._decoder || (state && (state.encoding || state.decoder))) { + // developer error + return done(createError(500, 'stream encoding should not be set', 'stream.encoding.set')) + } + + var received = 0 + var decoder + + try { + decoder = getDecoder(encoding) + } catch (err) { + return done(err) + } + + var buffer = decoder + ? '' + : [] + + // attach listeners + stream.on('aborted', onAborted) + stream.on('close', cleanup) + stream.on('data', onData) + stream.on('end', onEnd) + stream.on('error', onEnd) + + // mark sync section complete + sync = false + + function done () { + var args = new Array(arguments.length) + + // copy arguments + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i] + } + + // mark complete + complete = true + + if (sync) { + process.nextTick(invokeCallback) + } else { + invokeCallback() + } + + function invokeCallback () { + cleanup() + + if (args[0]) { + // halt the stream on error + halt(stream) + } + + callback.apply(null, args) + } + } + + function onAborted () { + if (complete) return + + done(createError(400, 'request aborted', 'request.aborted', { + code: 'ECONNABORTED', + expected: length, + length: length, + received: received + })) + } + + function onData (chunk) { + if (complete) return + + received += chunk.length + decoder + ? buffer += decoder.write(chunk) + : buffer.push(chunk) + + if (limit !== null && received > limit) { + done(createError(413, 'request entity too large', 'entity.too.large', { + limit: limit, + received: received + })) + } + } + + function onEnd (err) { + if (complete) return + if (err) return done(err) + + if (length !== null && received !== length) { + done(createError(400, 'request size did not match content length', 'request.size.invalid', { + expected: length, + length: length, + received: received + })) + } else { + var string = decoder + ? buffer + (decoder.end() || '') + : Buffer.concat(buffer) + done(null, string) + } + } + + function cleanup () { + buffer = null + + stream.removeListener('aborted', onAborted) + stream.removeListener('data', onData) + stream.removeListener('end', onEnd) + stream.removeListener('error', onEnd) + stream.removeListener('close', cleanup) + } +} diff --git a/node_modules/raw-body/package.json b/node_modules/raw-body/package.json new file mode 100644 index 0000000..4001133 --- /dev/null +++ b/node_modules/raw-body/package.json @@ -0,0 +1,125 @@ +{ + "_args": [ + [ + { + "raw": "raw-body@~2.2.0", + "scope": null, + "escapedName": "raw-body", + "name": "raw-body", + "rawSpec": "~2.2.0", + "spec": ">=2.2.0 <2.3.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/body-parser" + ] + ], + "_from": "raw-body@>=2.2.0 <2.3.0", + "_id": "raw-body@2.2.0", + "_inCache": true, + "_location": "/raw-body", + "_nodeVersion": "4.6.1", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/raw-body-2.2.0.tgz_1483409502596_0.06903165532276034" + }, + "_npmUser": { + "name": "dougwilson", + "email": "doug@somethingdoug.com" + }, + "_npmVersion": "2.15.9", + "_phantomChildren": {}, + "_requested": { + "raw": "raw-body@~2.2.0", + "scope": null, + "escapedName": "raw-body", + "name": "raw-body", + "rawSpec": "~2.2.0", + "spec": ">=2.2.0 <2.3.0", + "type": "range" + }, + "_requiredBy": [ + "/body-parser" + ], + "_resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.2.0.tgz", + "_shasum": "994976cf6a5096a41162840492f0bdc5d6e7fb96", + "_shrinkwrap": null, + "_spec": "raw-body@~2.2.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/body-parser", + "author": { + "name": "Jonathan Ong", + "email": "me@jongleberry.com", + "url": "http://jongleberry.com" + }, + "bugs": { + "url": "https://github.com/stream-utils/raw-body/issues" + }, + "contributors": [ + { + "name": "Douglas Christopher Wilson", + "email": "doug@somethingdoug.com" + }, + { + "name": "Raynos", + "email": "raynos2@gmail.com" + } + ], + "dependencies": { + "bytes": "2.4.0", + "iconv-lite": "0.4.15", + "unpipe": "1.0.0" + }, + "description": "Get and validate the raw body of a readable stream.", + "devDependencies": { + "bluebird": "3.4.7", + "eslint": "3.12.2", + "eslint-config-standard": "6.2.1", + "eslint-plugin-markdown": "1.0.0-beta.3", + "eslint-plugin-promise": "3.4.0", + "eslint-plugin-standard": "2.0.1", + "istanbul": "0.4.5", + "mocha": "2.5.3", + "readable-stream": "2.1.2", + "through2": "2.0.1" + }, + "directories": {}, + "dist": { + "shasum": "994976cf6a5096a41162840492f0bdc5d6e7fb96", + "tarball": "https://registry.npmjs.org/raw-body/-/raw-body-2.2.0.tgz" + }, + "engines": { + "node": ">= 0.8" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "README.md", + "index.js" + ], + "gitHead": "02fac48ae40b8452629bcd310d19dbea543f7c3c", + "homepage": "https://github.com/stream-utils/raw-body#readme", + "license": "MIT", + "maintainers": [ + { + "name": "dougwilson", + "email": "doug@somethingdoug.com" + }, + { + "name": "jongleberry", + "email": "jonathanrichardong@gmail.com" + } + ], + "name": "raw-body", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/stream-utils/raw-body.git" + }, + "scripts": { + "lint": "eslint --plugin markdown --ext js,md .", + "test": "mocha --trace-deprecation --reporter spec --bail --check-leaks test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --trace-deprecation --reporter dot --check-leaks test/", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --trace-deprecation --reporter spec --check-leaks test/" + }, + "version": "2.2.0" +} diff --git a/node_modules/read-pkg-up/index.js b/node_modules/read-pkg-up/index.js new file mode 100644 index 0000000..beb3d48 --- /dev/null +++ b/node_modules/read-pkg-up/index.js @@ -0,0 +1,31 @@ +'use strict'; +var findUp = require('find-up'); +var readPkg = require('read-pkg'); + +module.exports = function (opts) { + return findUp('package.json', opts).then(function (fp) { + if (!fp) { + return {}; + } + + return readPkg(fp, opts).then(function (pkg) { + return { + pkg: pkg, + path: fp + }; + }); + }); +}; + +module.exports.sync = function (opts) { + var fp = findUp.sync('package.json', opts); + + if (!fp) { + return {}; + } + + return { + pkg: readPkg.sync(fp, opts), + path: fp + }; +}; diff --git a/node_modules/read-pkg-up/license b/node_modules/read-pkg-up/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/read-pkg-up/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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. diff --git a/node_modules/read-pkg-up/package.json b/node_modules/read-pkg-up/package.json new file mode 100644 index 0000000..ebd72b2 --- /dev/null +++ b/node_modules/read-pkg-up/package.json @@ -0,0 +1,122 @@ +{ + "_args": [ + [ + { + "raw": "read-pkg-up@^1.0.1", + "scope": null, + "escapedName": "read-pkg-up", + "name": "read-pkg-up", + "rawSpec": "^1.0.1", + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/sequelize-cli/node_modules/yargs" + ] + ], + "_from": "read-pkg-up@>=1.0.1 <2.0.0", + "_id": "read-pkg-up@1.0.1", + "_inCache": true, + "_location": "/read-pkg-up", + "_nodeVersion": "0.12.7", + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "2.11.3", + "_phantomChildren": {}, + "_requested": { + "raw": "read-pkg-up@^1.0.1", + "scope": null, + "escapedName": "read-pkg-up", + "name": "read-pkg-up", + "rawSpec": "^1.0.1", + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/sequelize-cli/yargs" + ], + "_resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "_shasum": "9d63c13276c065918d57f002a57f40a1b643fb02", + "_shrinkwrap": null, + "_spec": "read-pkg-up@^1.0.1", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/sequelize-cli/node_modules/yargs", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/read-pkg-up/issues" + }, + "dependencies": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + }, + "description": "Read the closest package.json file", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "9d63c13276c065918d57f002a57f40a1b643fb02", + "tarball": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "27ec7c844b495a39eea7859c5f4d4721ebf60e8e", + "homepage": "https://github.com/sindresorhus/read-pkg-up", + "keywords": [ + "json", + "read", + "parse", + "file", + "fs", + "graceful", + "load", + "pkg", + "package", + "find", + "up", + "find-up", + "findup", + "look-up", + "look", + "file", + "search", + "match", + "package", + "resolve", + "parent", + "parents", + "folder", + "directory", + "dir", + "walk", + "walking", + "path" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "read-pkg-up", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/read-pkg-up.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.1" +} diff --git a/node_modules/read-pkg-up/readme.md b/node_modules/read-pkg-up/readme.md new file mode 100644 index 0000000..dbd88f3 --- /dev/null +++ b/node_modules/read-pkg-up/readme.md @@ -0,0 +1,79 @@ +# read-pkg-up [![Build Status](https://travis-ci.org/sindresorhus/read-pkg-up.svg?branch=master)](https://travis-ci.org/sindresorhus/read-pkg-up) + +> Read the closest package.json file + + +## Why + +- [Finds the closest package.json](https://github.com/sindresorhus/find-up) +- [Gracefully handles filesystem issues](https://github.com/isaacs/node-graceful-fs) +- [Strips UTF-8 BOM](https://github.com/sindresorhus/strip-bom) +- [Throws more helpful JSON errors](https://github.com/sindresorhus/parse-json) +- [Normalizes the data](https://github.com/npm/normalize-package-data#what-normalization-currently-entails) + + +## Install + +``` +$ npm install --save read-pkg-up +``` + + +## Usage + +```js +var readPkgUp = require('read-pkg-up'); + +readPkgUp().then(function (result) { + console.log(result); + /* + { + pkg: { + name: 'awesome-package', + version: '1.0.0', + ... + }, + path: '/Users/sindresorhus/dev/awesome-package' + } + */ +}); +``` + + +## API + +### readPkgUp([options]) + +Returns a promise that resolves to a result object. + +### readPkgUp.sync([options]) + +Returns a result object. + +#### options + +##### cwd + +Type: `string` +Default: `.` + +Directory to start looking for a package.json file. + +##### normalize + +Type: `boolean` +Default: `true` + +[Normalize](https://github.com/npm/normalize-package-data#what-normalization-currently-entails) the package data. + + +## Related + +- [read-pkg](https://github.com/sindresorhus/read-pkg) - Read a package.json file +- [find-up](https://github.com/sindresorhus/find-up) - Find a file by walking up parent directories +- [pkg-conf](https://github.com/sindresorhus/pkg-conf) - Get namespaced config from the closest package.json + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/read-pkg/index.js b/node_modules/read-pkg/index.js new file mode 100644 index 0000000..c5c3afa --- /dev/null +++ b/node_modules/read-pkg/index.js @@ -0,0 +1,48 @@ +'use strict'; +var path = require('path'); +var loadJsonFile = require('load-json-file'); +var normalizePackageData = require('normalize-package-data'); +var pathType = require('path-type'); + +module.exports = function (fp, opts) { + if (typeof fp !== 'string') { + opts = fp; + fp = '.'; + } + + opts = opts || {}; + + return pathType.dir(fp) + .then(function (isDir) { + if (isDir) { + fp = path.join(fp, 'package.json'); + } + + return loadJsonFile(fp); + }) + .then(function (x) { + if (opts.normalize !== false) { + normalizePackageData(x); + } + + return x; + }); +}; + +module.exports.sync = function (fp, opts) { + if (typeof fp !== 'string') { + opts = fp; + fp = '.'; + } + + opts = opts || {}; + fp = pathType.dirSync(fp) ? path.join(fp, 'package.json') : fp; + + var x = loadJsonFile.sync(fp); + + if (opts.normalize !== false) { + normalizePackageData(x); + } + + return x; +}; diff --git a/node_modules/read-pkg/license b/node_modules/read-pkg/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/read-pkg/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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. diff --git a/node_modules/read-pkg/package.json b/node_modules/read-pkg/package.json new file mode 100644 index 0000000..e46c164 --- /dev/null +++ b/node_modules/read-pkg/package.json @@ -0,0 +1,105 @@ +{ + "_args": [ + [ + { + "raw": "read-pkg@^1.0.0", + "scope": null, + "escapedName": "read-pkg", + "name": "read-pkg", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/read-pkg-up" + ] + ], + "_from": "read-pkg@>=1.0.0 <2.0.0", + "_id": "read-pkg@1.1.0", + "_inCache": true, + "_location": "/read-pkg", + "_nodeVersion": "3.0.0", + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "2.13.3", + "_phantomChildren": {}, + "_requested": { + "raw": "read-pkg@^1.0.0", + "scope": null, + "escapedName": "read-pkg", + "name": "read-pkg", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/read-pkg-up" + ], + "_resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "_shasum": "f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28", + "_shrinkwrap": null, + "_spec": "read-pkg@^1.0.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/read-pkg-up", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/read-pkg/issues" + }, + "dependencies": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + }, + "description": "Read a package.json file", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28", + "tarball": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "9448d32b2ebcd65fc0547def3cfe5b28ef522e68", + "homepage": "https://github.com/sindresorhus/read-pkg", + "keywords": [ + "json", + "read", + "parse", + "file", + "fs", + "graceful", + "load", + "pkg", + "package", + "normalize" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "read-pkg", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/read-pkg.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.1.0" +} diff --git a/node_modules/read-pkg/readme.md b/node_modules/read-pkg/readme.md new file mode 100644 index 0000000..9a0d4cc --- /dev/null +++ b/node_modules/read-pkg/readme.md @@ -0,0 +1,79 @@ +# read-pkg [![Build Status](https://travis-ci.org/sindresorhus/read-pkg.svg?branch=master)](https://travis-ci.org/sindresorhus/read-pkg) + +> Read a package.json file + + +## Why + +- [Gracefully handles filesystem issues](https://github.com/isaacs/node-graceful-fs) +- [Strips UTF-8 BOM](https://github.com/sindresorhus/strip-bom) +- [Throws more helpful JSON errors](https://github.com/sindresorhus/parse-json) +- [Normalizes the data](https://github.com/npm/normalize-package-data#what-normalization-currently-entails) + + +## Install + +``` +$ npm install --save read-pkg +``` + + +## Usage + +```js +var readPkg = require('read-pkg'); + +readPkg().then(function (pkg) { + console.log(pkg); + //=> {name: 'read-pkg', ...} +}); + +readPkg(__dirname).then(function (pkg) { + console.log(pkg); + //=> {name: 'read-pkg', ...} +}); + +readPkg(path.join('unicorn', 'package.json')).then(function (pkg) { + console.log(pkg); + //=> {name: 'read-pkg', ...} +}); +``` + + +## API + +### readPkg([path], [options]) + +Returns a promise that resolves to the parsed JSON. + +### readPkg.sync([path], [options]) + +Returns the parsed JSON. + +#### path + +Type: `string` +Default: `.` + +Path to a `package.json` file or its directory. + +#### options + +##### normalize + +Type: `boolean` +Default: `true` + +[Normalize](https://github.com/npm/normalize-package-data#what-normalization-currently-entails) the package data. + + +## Related + +- [read-pkg-up](https://github.com/sindresorhus/read-pkg-up) - Read the closest package.json file +- [write-pkg](https://github.com/sindresorhus/write-pkg) - Write a `package.json` file +- [load-json-file](https://github.com/sindresorhus/load-json-file) - Read and parse a JSON file + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/readable-stream/.npmignore b/node_modules/readable-stream/.npmignore new file mode 100644 index 0000000..38344f8 --- /dev/null +++ b/node_modules/readable-stream/.npmignore @@ -0,0 +1,5 @@ +build/ +test/ +examples/ +fs.js +zlib.js \ No newline at end of file diff --git a/node_modules/readable-stream/LICENSE b/node_modules/readable-stream/LICENSE new file mode 100644 index 0000000..e3d4e69 --- /dev/null +++ b/node_modules/readable-stream/LICENSE @@ -0,0 +1,18 @@ +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +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. diff --git a/node_modules/readable-stream/README.md b/node_modules/readable-stream/README.md new file mode 100644 index 0000000..e46b823 --- /dev/null +++ b/node_modules/readable-stream/README.md @@ -0,0 +1,15 @@ +# readable-stream + +***Node-core streams for userland*** + +[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) +[![NPM](https://nodei.co/npm-dl/readable-stream.png&months=6&height=3)](https://nodei.co/npm/readable-stream/) + +This package is a mirror of the Streams2 and Streams3 implementations in Node-core. + +If you want to guarantee a stable streams base, regardless of what version of Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core. + +**readable-stream** comes in two major versions, v1.0.x and v1.1.x. The former tracks the Streams2 implementation in Node 0.10, including bug-fixes and minor improvements as they are added. The latter tracks Streams3 as it develops in Node 0.11; we will likely see a v1.2.x branch for Node 0.12. + +**readable-stream** uses proper patch-level versioning so if you pin to `"~1.0.0"` you’ll get the latest Node 0.10 Streams2 implementation, including any fixes and minor non-breaking improvements. The patch-level versions of 1.0.x and 1.1.x should mirror the patch-level versions of Node-core releases. You should prefer the **1.0.x** releases for now and when you’re ready to start using Streams3, pin to `"~1.1.0"` + diff --git a/node_modules/readable-stream/duplex.js b/node_modules/readable-stream/duplex.js new file mode 100644 index 0000000..ca807af --- /dev/null +++ b/node_modules/readable-stream/duplex.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_duplex.js") diff --git a/node_modules/readable-stream/float.patch b/node_modules/readable-stream/float.patch new file mode 100644 index 0000000..b984607 --- /dev/null +++ b/node_modules/readable-stream/float.patch @@ -0,0 +1,923 @@ +diff --git a/lib/_stream_duplex.js b/lib/_stream_duplex.js +index c5a741c..a2e0d8e 100644 +--- a/lib/_stream_duplex.js ++++ b/lib/_stream_duplex.js +@@ -26,8 +26,8 @@ + + module.exports = Duplex; + var util = require('util'); +-var Readable = require('_stream_readable'); +-var Writable = require('_stream_writable'); ++var Readable = require('./_stream_readable'); ++var Writable = require('./_stream_writable'); + + util.inherits(Duplex, Readable); + +diff --git a/lib/_stream_passthrough.js b/lib/_stream_passthrough.js +index a5e9864..330c247 100644 +--- a/lib/_stream_passthrough.js ++++ b/lib/_stream_passthrough.js +@@ -25,7 +25,7 @@ + + module.exports = PassThrough; + +-var Transform = require('_stream_transform'); ++var Transform = require('./_stream_transform'); + var util = require('util'); + util.inherits(PassThrough, Transform); + +diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js +index 0c3fe3e..90a8298 100644 +--- a/lib/_stream_readable.js ++++ b/lib/_stream_readable.js +@@ -23,10 +23,34 @@ module.exports = Readable; + Readable.ReadableState = ReadableState; + + var EE = require('events').EventEmitter; ++if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { ++ return emitter.listeners(type).length; ++}; ++ ++if (!global.setImmediate) global.setImmediate = function setImmediate(fn) { ++ return setTimeout(fn, 0); ++}; ++if (!global.clearImmediate) global.clearImmediate = function clearImmediate(i) { ++ return clearTimeout(i); ++}; ++ + var Stream = require('stream'); + var util = require('util'); ++if (!util.isUndefined) { ++ var utilIs = require('core-util-is'); ++ for (var f in utilIs) { ++ util[f] = utilIs[f]; ++ } ++} + var StringDecoder; +-var debug = util.debuglog('stream'); ++var debug; ++if (util.debuglog) ++ debug = util.debuglog('stream'); ++else try { ++ debug = require('debuglog')('stream'); ++} catch (er) { ++ debug = function() {}; ++} + + util.inherits(Readable, Stream); + +@@ -380,7 +404,7 @@ function chunkInvalid(state, chunk) { + + + function onEofChunk(stream, state) { +- if (state.decoder && !state.ended) { ++ if (state.decoder && !state.ended && state.decoder.end) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); +diff --git a/lib/_stream_transform.js b/lib/_stream_transform.js +index b1f9fcc..b0caf57 100644 +--- a/lib/_stream_transform.js ++++ b/lib/_stream_transform.js +@@ -64,8 +64,14 @@ + + module.exports = Transform; + +-var Duplex = require('_stream_duplex'); ++var Duplex = require('./_stream_duplex'); + var util = require('util'); ++if (!util.isUndefined) { ++ var utilIs = require('core-util-is'); ++ for (var f in utilIs) { ++ util[f] = utilIs[f]; ++ } ++} + util.inherits(Transform, Duplex); + + +diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js +index ba2e920..f49288b 100644 +--- a/lib/_stream_writable.js ++++ b/lib/_stream_writable.js +@@ -27,6 +27,12 @@ module.exports = Writable; + Writable.WritableState = WritableState; + + var util = require('util'); ++if (!util.isUndefined) { ++ var utilIs = require('core-util-is'); ++ for (var f in utilIs) { ++ util[f] = utilIs[f]; ++ } ++} + var Stream = require('stream'); + + util.inherits(Writable, Stream); +@@ -119,7 +125,7 @@ function WritableState(options, stream) { + function Writable(options) { + // Writable ctor is applied to Duplexes, though they're not + // instanceof Writable, they're instanceof Readable. +- if (!(this instanceof Writable) && !(this instanceof Stream.Duplex)) ++ if (!(this instanceof Writable) && !(this instanceof require('./_stream_duplex'))) + return new Writable(options); + + this._writableState = new WritableState(options, this); +diff --git a/test/simple/test-stream-big-push.js b/test/simple/test-stream-big-push.js +index e3787e4..8cd2127 100644 +--- a/test/simple/test-stream-big-push.js ++++ b/test/simple/test-stream-big-push.js +@@ -21,7 +21,7 @@ + + var common = require('../common'); + var assert = require('assert'); +-var stream = require('stream'); ++var stream = require('../../'); + var str = 'asdfasdfasdfasdfasdf'; + + var r = new stream.Readable({ +diff --git a/test/simple/test-stream-end-paused.js b/test/simple/test-stream-end-paused.js +index bb73777..d40efc7 100644 +--- a/test/simple/test-stream-end-paused.js ++++ b/test/simple/test-stream-end-paused.js +@@ -25,7 +25,7 @@ var gotEnd = false; + + // Make sure we don't miss the end event for paused 0-length streams + +-var Readable = require('stream').Readable; ++var Readable = require('../../').Readable; + var stream = new Readable(); + var calledRead = false; + stream._read = function() { +diff --git a/test/simple/test-stream-pipe-after-end.js b/test/simple/test-stream-pipe-after-end.js +index b46ee90..0be8366 100644 +--- a/test/simple/test-stream-pipe-after-end.js ++++ b/test/simple/test-stream-pipe-after-end.js +@@ -22,8 +22,8 @@ + var common = require('../common'); + var assert = require('assert'); + +-var Readable = require('_stream_readable'); +-var Writable = require('_stream_writable'); ++var Readable = require('../../lib/_stream_readable'); ++var Writable = require('../../lib/_stream_writable'); + var util = require('util'); + + util.inherits(TestReadable, Readable); +diff --git a/test/simple/test-stream-pipe-cleanup.js b/test/simple/test-stream-pipe-cleanup.js +deleted file mode 100644 +index f689358..0000000 +--- a/test/simple/test-stream-pipe-cleanup.js ++++ /dev/null +@@ -1,122 +0,0 @@ +-// Copyright Joyent, Inc. and other Node 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. +- +-// This test asserts that Stream.prototype.pipe does not leave listeners +-// hanging on the source or dest. +- +-var common = require('../common'); +-var stream = require('stream'); +-var assert = require('assert'); +-var util = require('util'); +- +-function Writable() { +- this.writable = true; +- this.endCalls = 0; +- stream.Stream.call(this); +-} +-util.inherits(Writable, stream.Stream); +-Writable.prototype.end = function() { +- this.endCalls++; +-}; +- +-Writable.prototype.destroy = function() { +- this.endCalls++; +-}; +- +-function Readable() { +- this.readable = true; +- stream.Stream.call(this); +-} +-util.inherits(Readable, stream.Stream); +- +-function Duplex() { +- this.readable = true; +- Writable.call(this); +-} +-util.inherits(Duplex, Writable); +- +-var i = 0; +-var limit = 100; +- +-var w = new Writable(); +- +-var r; +- +-for (i = 0; i < limit; i++) { +- r = new Readable(); +- r.pipe(w); +- r.emit('end'); +-} +-assert.equal(0, r.listeners('end').length); +-assert.equal(limit, w.endCalls); +- +-w.endCalls = 0; +- +-for (i = 0; i < limit; i++) { +- r = new Readable(); +- r.pipe(w); +- r.emit('close'); +-} +-assert.equal(0, r.listeners('close').length); +-assert.equal(limit, w.endCalls); +- +-w.endCalls = 0; +- +-r = new Readable(); +- +-for (i = 0; i < limit; i++) { +- w = new Writable(); +- r.pipe(w); +- w.emit('close'); +-} +-assert.equal(0, w.listeners('close').length); +- +-r = new Readable(); +-w = new Writable(); +-var d = new Duplex(); +-r.pipe(d); // pipeline A +-d.pipe(w); // pipeline B +-assert.equal(r.listeners('end').length, 2); // A.onend, A.cleanup +-assert.equal(r.listeners('close').length, 2); // A.onclose, A.cleanup +-assert.equal(d.listeners('end').length, 2); // B.onend, B.cleanup +-assert.equal(d.listeners('close').length, 3); // A.cleanup, B.onclose, B.cleanup +-assert.equal(w.listeners('end').length, 0); +-assert.equal(w.listeners('close').length, 1); // B.cleanup +- +-r.emit('end'); +-assert.equal(d.endCalls, 1); +-assert.equal(w.endCalls, 0); +-assert.equal(r.listeners('end').length, 0); +-assert.equal(r.listeners('close').length, 0); +-assert.equal(d.listeners('end').length, 2); // B.onend, B.cleanup +-assert.equal(d.listeners('close').length, 2); // B.onclose, B.cleanup +-assert.equal(w.listeners('end').length, 0); +-assert.equal(w.listeners('close').length, 1); // B.cleanup +- +-d.emit('end'); +-assert.equal(d.endCalls, 1); +-assert.equal(w.endCalls, 1); +-assert.equal(r.listeners('end').length, 0); +-assert.equal(r.listeners('close').length, 0); +-assert.equal(d.listeners('end').length, 0); +-assert.equal(d.listeners('close').length, 0); +-assert.equal(w.listeners('end').length, 0); +-assert.equal(w.listeners('close').length, 0); +diff --git a/test/simple/test-stream-pipe-error-handling.js b/test/simple/test-stream-pipe-error-handling.js +index c5d724b..c7d6b7d 100644 +--- a/test/simple/test-stream-pipe-error-handling.js ++++ b/test/simple/test-stream-pipe-error-handling.js +@@ -21,7 +21,7 @@ + + var common = require('../common'); + var assert = require('assert'); +-var Stream = require('stream').Stream; ++var Stream = require('../../').Stream; + + (function testErrorListenerCatches() { + var source = new Stream(); +diff --git a/test/simple/test-stream-pipe-event.js b/test/simple/test-stream-pipe-event.js +index cb9d5fe..56f8d61 100644 +--- a/test/simple/test-stream-pipe-event.js ++++ b/test/simple/test-stream-pipe-event.js +@@ -20,7 +20,7 @@ + // USE OR OTHER DEALINGS IN THE SOFTWARE. + + var common = require('../common'); +-var stream = require('stream'); ++var stream = require('../../'); + var assert = require('assert'); + var util = require('util'); + +diff --git a/test/simple/test-stream-push-order.js b/test/simple/test-stream-push-order.js +index f2e6ec2..a5c9bf9 100644 +--- a/test/simple/test-stream-push-order.js ++++ b/test/simple/test-stream-push-order.js +@@ -20,7 +20,7 @@ + // USE OR OTHER DEALINGS IN THE SOFTWARE. + + var common = require('../common.js'); +-var Readable = require('stream').Readable; ++var Readable = require('../../').Readable; + var assert = require('assert'); + + var s = new Readable({ +diff --git a/test/simple/test-stream-push-strings.js b/test/simple/test-stream-push-strings.js +index 06f43dc..1701a9a 100644 +--- a/test/simple/test-stream-push-strings.js ++++ b/test/simple/test-stream-push-strings.js +@@ -22,7 +22,7 @@ + var common = require('../common'); + var assert = require('assert'); + +-var Readable = require('stream').Readable; ++var Readable = require('../../').Readable; + var util = require('util'); + + util.inherits(MyStream, Readable); +diff --git a/test/simple/test-stream-readable-event.js b/test/simple/test-stream-readable-event.js +index ba6a577..a8e6f7b 100644 +--- a/test/simple/test-stream-readable-event.js ++++ b/test/simple/test-stream-readable-event.js +@@ -22,7 +22,7 @@ + var common = require('../common'); + var assert = require('assert'); + +-var Readable = require('stream').Readable; ++var Readable = require('../../').Readable; + + (function first() { + // First test, not reading when the readable is added. +diff --git a/test/simple/test-stream-readable-flow-recursion.js b/test/simple/test-stream-readable-flow-recursion.js +index 2891ad6..11689ba 100644 +--- a/test/simple/test-stream-readable-flow-recursion.js ++++ b/test/simple/test-stream-readable-flow-recursion.js +@@ -27,7 +27,7 @@ var assert = require('assert'); + // more data continuously, but without triggering a nextTick + // warning or RangeError. + +-var Readable = require('stream').Readable; ++var Readable = require('../../').Readable; + + // throw an error if we trigger a nextTick warning. + process.throwDeprecation = true; +diff --git a/test/simple/test-stream-unshift-empty-chunk.js b/test/simple/test-stream-unshift-empty-chunk.js +index 0c96476..7827538 100644 +--- a/test/simple/test-stream-unshift-empty-chunk.js ++++ b/test/simple/test-stream-unshift-empty-chunk.js +@@ -24,7 +24,7 @@ var assert = require('assert'); + + // This test verifies that stream.unshift(Buffer(0)) or + // stream.unshift('') does not set state.reading=false. +-var Readable = require('stream').Readable; ++var Readable = require('../../').Readable; + + var r = new Readable(); + var nChunks = 10; +diff --git a/test/simple/test-stream-unshift-read-race.js b/test/simple/test-stream-unshift-read-race.js +index 83fd9fa..17c18aa 100644 +--- a/test/simple/test-stream-unshift-read-race.js ++++ b/test/simple/test-stream-unshift-read-race.js +@@ -29,7 +29,7 @@ var assert = require('assert'); + // 3. push() after the EOF signaling null is an error. + // 4. _read() is not called after pushing the EOF null chunk. + +-var stream = require('stream'); ++var stream = require('../../'); + var hwm = 10; + var r = stream.Readable({ highWaterMark: hwm }); + var chunks = 10; +@@ -51,7 +51,14 @@ r._read = function(n) { + + function push(fast) { + assert(!pushedNull, 'push() after null push'); +- var c = pos >= data.length ? null : data.slice(pos, pos + n); ++ var c; ++ if (pos >= data.length) ++ c = null; ++ else { ++ if (n + pos > data.length) ++ n = data.length - pos; ++ c = data.slice(pos, pos + n); ++ } + pushedNull = c === null; + if (fast) { + pos += n; +diff --git a/test/simple/test-stream-writev.js b/test/simple/test-stream-writev.js +index 5b49e6e..b5321f3 100644 +--- a/test/simple/test-stream-writev.js ++++ b/test/simple/test-stream-writev.js +@@ -22,7 +22,7 @@ + var common = require('../common'); + var assert = require('assert'); + +-var stream = require('stream'); ++var stream = require('../../'); + + var queue = []; + for (var decode = 0; decode < 2; decode++) { +diff --git a/test/simple/test-stream2-basic.js b/test/simple/test-stream2-basic.js +index 3814bf0..248c1be 100644 +--- a/test/simple/test-stream2-basic.js ++++ b/test/simple/test-stream2-basic.js +@@ -21,7 +21,7 @@ + + + var common = require('../common.js'); +-var R = require('_stream_readable'); ++var R = require('../../lib/_stream_readable'); + var assert = require('assert'); + + var util = require('util'); +diff --git a/test/simple/test-stream2-compatibility.js b/test/simple/test-stream2-compatibility.js +index 6cdd4e9..f0fa84b 100644 +--- a/test/simple/test-stream2-compatibility.js ++++ b/test/simple/test-stream2-compatibility.js +@@ -21,7 +21,7 @@ + + + var common = require('../common.js'); +-var R = require('_stream_readable'); ++var R = require('../../lib/_stream_readable'); + var assert = require('assert'); + + var util = require('util'); +diff --git a/test/simple/test-stream2-finish-pipe.js b/test/simple/test-stream2-finish-pipe.js +index 39b274f..006a19b 100644 +--- a/test/simple/test-stream2-finish-pipe.js ++++ b/test/simple/test-stream2-finish-pipe.js +@@ -20,7 +20,7 @@ + // USE OR OTHER DEALINGS IN THE SOFTWARE. + + var common = require('../common.js'); +-var stream = require('stream'); ++var stream = require('../../'); + var Buffer = require('buffer').Buffer; + + var r = new stream.Readable(); +diff --git a/test/simple/test-stream2-fs.js b/test/simple/test-stream2-fs.js +deleted file mode 100644 +index e162406..0000000 +--- a/test/simple/test-stream2-fs.js ++++ /dev/null +@@ -1,72 +0,0 @@ +-// Copyright Joyent, Inc. and other Node 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. +- +- +-var common = require('../common.js'); +-var R = require('_stream_readable'); +-var assert = require('assert'); +- +-var fs = require('fs'); +-var FSReadable = fs.ReadStream; +- +-var path = require('path'); +-var file = path.resolve(common.fixturesDir, 'x1024.txt'); +- +-var size = fs.statSync(file).size; +- +-var expectLengths = [1024]; +- +-var util = require('util'); +-var Stream = require('stream'); +- +-util.inherits(TestWriter, Stream); +- +-function TestWriter() { +- Stream.apply(this); +- this.buffer = []; +- this.length = 0; +-} +- +-TestWriter.prototype.write = function(c) { +- this.buffer.push(c.toString()); +- this.length += c.length; +- return true; +-}; +- +-TestWriter.prototype.end = function(c) { +- if (c) this.buffer.push(c.toString()); +- this.emit('results', this.buffer); +-} +- +-var r = new FSReadable(file); +-var w = new TestWriter(); +- +-w.on('results', function(res) { +- console.error(res, w.length); +- assert.equal(w.length, size); +- var l = 0; +- assert.deepEqual(res.map(function (c) { +- return c.length; +- }), expectLengths); +- console.log('ok'); +-}); +- +-r.pipe(w); +diff --git a/test/simple/test-stream2-httpclient-response-end.js b/test/simple/test-stream2-httpclient-response-end.js +deleted file mode 100644 +index 15cffc2..0000000 +--- a/test/simple/test-stream2-httpclient-response-end.js ++++ /dev/null +@@ -1,52 +0,0 @@ +-// Copyright Joyent, Inc. and other Node 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. +- +-var common = require('../common.js'); +-var assert = require('assert'); +-var http = require('http'); +-var msg = 'Hello'; +-var readable_event = false; +-var end_event = false; +-var server = http.createServer(function(req, res) { +- res.writeHead(200, {'Content-Type': 'text/plain'}); +- res.end(msg); +-}).listen(common.PORT, function() { +- http.get({port: common.PORT}, function(res) { +- var data = ''; +- res.on('readable', function() { +- console.log('readable event'); +- readable_event = true; +- data += res.read(); +- }); +- res.on('end', function() { +- console.log('end event'); +- end_event = true; +- assert.strictEqual(msg, data); +- server.close(); +- }); +- }); +-}); +- +-process.on('exit', function() { +- assert(readable_event); +- assert(end_event); +-}); +- +diff --git a/test/simple/test-stream2-large-read-stall.js b/test/simple/test-stream2-large-read-stall.js +index 2fbfbca..667985b 100644 +--- a/test/simple/test-stream2-large-read-stall.js ++++ b/test/simple/test-stream2-large-read-stall.js +@@ -30,7 +30,7 @@ var PUSHSIZE = 20; + var PUSHCOUNT = 1000; + var HWM = 50; + +-var Readable = require('stream').Readable; ++var Readable = require('../../').Readable; + var r = new Readable({ + highWaterMark: HWM + }); +@@ -39,23 +39,23 @@ var rs = r._readableState; + r._read = push; + + r.on('readable', function() { +- console.error('>> readable'); ++ //console.error('>> readable'); + do { +- console.error(' > read(%d)', READSIZE); ++ //console.error(' > read(%d)', READSIZE); + var ret = r.read(READSIZE); +- console.error(' < %j (%d remain)', ret && ret.length, rs.length); ++ //console.error(' < %j (%d remain)', ret && ret.length, rs.length); + } while (ret && ret.length === READSIZE); + +- console.error('<< after read()', +- ret && ret.length, +- rs.needReadable, +- rs.length); ++ //console.error('<< after read()', ++ // ret && ret.length, ++ // rs.needReadable, ++ // rs.length); + }); + + var endEmitted = false; + r.on('end', function() { + endEmitted = true; +- console.error('end'); ++ //console.error('end'); + }); + + var pushes = 0; +@@ -64,11 +64,11 @@ function push() { + return; + + if (pushes++ === PUSHCOUNT) { +- console.error(' push(EOF)'); ++ //console.error(' push(EOF)'); + return r.push(null); + } + +- console.error(' push #%d', pushes); ++ //console.error(' push #%d', pushes); + if (r.push(new Buffer(PUSHSIZE))) + setTimeout(push); + } +diff --git a/test/simple/test-stream2-objects.js b/test/simple/test-stream2-objects.js +index 3e6931d..ff47d89 100644 +--- a/test/simple/test-stream2-objects.js ++++ b/test/simple/test-stream2-objects.js +@@ -21,8 +21,8 @@ + + + var common = require('../common.js'); +-var Readable = require('_stream_readable'); +-var Writable = require('_stream_writable'); ++var Readable = require('../../lib/_stream_readable'); ++var Writable = require('../../lib/_stream_writable'); + var assert = require('assert'); + + // tiny node-tap lookalike. +diff --git a/test/simple/test-stream2-pipe-error-handling.js b/test/simple/test-stream2-pipe-error-handling.js +index cf7531c..e3f3e4e 100644 +--- a/test/simple/test-stream2-pipe-error-handling.js ++++ b/test/simple/test-stream2-pipe-error-handling.js +@@ -21,7 +21,7 @@ + + var common = require('../common'); + var assert = require('assert'); +-var stream = require('stream'); ++var stream = require('../../'); + + (function testErrorListenerCatches() { + var count = 1000; +diff --git a/test/simple/test-stream2-pipe-error-once-listener.js b/test/simple/test-stream2-pipe-error-once-listener.js +index 5e8e3cb..53b2616 100755 +--- a/test/simple/test-stream2-pipe-error-once-listener.js ++++ b/test/simple/test-stream2-pipe-error-once-listener.js +@@ -24,7 +24,7 @@ var common = require('../common.js'); + var assert = require('assert'); + + var util = require('util'); +-var stream = require('stream'); ++var stream = require('../../'); + + + var Read = function() { +diff --git a/test/simple/test-stream2-push.js b/test/simple/test-stream2-push.js +index b63edc3..eb2b0e9 100644 +--- a/test/simple/test-stream2-push.js ++++ b/test/simple/test-stream2-push.js +@@ -20,7 +20,7 @@ + // USE OR OTHER DEALINGS IN THE SOFTWARE. + + var common = require('../common.js'); +-var stream = require('stream'); ++var stream = require('../../'); + var Readable = stream.Readable; + var Writable = stream.Writable; + var assert = require('assert'); +diff --git a/test/simple/test-stream2-read-sync-stack.js b/test/simple/test-stream2-read-sync-stack.js +index e8a7305..9740a47 100644 +--- a/test/simple/test-stream2-read-sync-stack.js ++++ b/test/simple/test-stream2-read-sync-stack.js +@@ -21,7 +21,7 @@ + + var common = require('../common'); + var assert = require('assert'); +-var Readable = require('stream').Readable; ++var Readable = require('../../').Readable; + var r = new Readable(); + var N = 256 * 1024; + +diff --git a/test/simple/test-stream2-readable-empty-buffer-no-eof.js b/test/simple/test-stream2-readable-empty-buffer-no-eof.js +index cd30178..4b1659d 100644 +--- a/test/simple/test-stream2-readable-empty-buffer-no-eof.js ++++ b/test/simple/test-stream2-readable-empty-buffer-no-eof.js +@@ -22,10 +22,9 @@ + var common = require('../common'); + var assert = require('assert'); + +-var Readable = require('stream').Readable; ++var Readable = require('../../').Readable; + + test1(); +-test2(); + + function test1() { + var r = new Readable(); +@@ -88,31 +87,3 @@ function test1() { + console.log('ok'); + }); + } +- +-function test2() { +- var r = new Readable({ encoding: 'base64' }); +- var reads = 5; +- r._read = function(n) { +- if (!reads--) +- return r.push(null); // EOF +- else +- return r.push(new Buffer('x')); +- }; +- +- var results = []; +- function flow() { +- var chunk; +- while (null !== (chunk = r.read())) +- results.push(chunk + ''); +- } +- r.on('readable', flow); +- r.on('end', function() { +- results.push('EOF'); +- }); +- flow(); +- +- process.on('exit', function() { +- assert.deepEqual(results, [ 'eHh4', 'eHg=', 'EOF' ]); +- console.log('ok'); +- }); +-} +diff --git a/test/simple/test-stream2-readable-from-list.js b/test/simple/test-stream2-readable-from-list.js +index 7c96ffe..04a96f5 100644 +--- a/test/simple/test-stream2-readable-from-list.js ++++ b/test/simple/test-stream2-readable-from-list.js +@@ -21,7 +21,7 @@ + + var assert = require('assert'); + var common = require('../common.js'); +-var fromList = require('_stream_readable')._fromList; ++var fromList = require('../../lib/_stream_readable')._fromList; + + // tiny node-tap lookalike. + var tests = []; +diff --git a/test/simple/test-stream2-readable-legacy-drain.js b/test/simple/test-stream2-readable-legacy-drain.js +index 675da8e..51fd3d5 100644 +--- a/test/simple/test-stream2-readable-legacy-drain.js ++++ b/test/simple/test-stream2-readable-legacy-drain.js +@@ -22,7 +22,7 @@ + var common = require('../common'); + var assert = require('assert'); + +-var Stream = require('stream'); ++var Stream = require('../../'); + var Readable = Stream.Readable; + + var r = new Readable(); +diff --git a/test/simple/test-stream2-readable-non-empty-end.js b/test/simple/test-stream2-readable-non-empty-end.js +index 7314ae7..c971898 100644 +--- a/test/simple/test-stream2-readable-non-empty-end.js ++++ b/test/simple/test-stream2-readable-non-empty-end.js +@@ -21,7 +21,7 @@ + + var assert = require('assert'); + var common = require('../common.js'); +-var Readable = require('_stream_readable'); ++var Readable = require('../../lib/_stream_readable'); + + var len = 0; + var chunks = new Array(10); +diff --git a/test/simple/test-stream2-readable-wrap-empty.js b/test/simple/test-stream2-readable-wrap-empty.js +index 2e5cf25..fd8a3dc 100644 +--- a/test/simple/test-stream2-readable-wrap-empty.js ++++ b/test/simple/test-stream2-readable-wrap-empty.js +@@ -22,7 +22,7 @@ + var common = require('../common'); + var assert = require('assert'); + +-var Readable = require('_stream_readable'); ++var Readable = require('../../lib/_stream_readable'); + var EE = require('events').EventEmitter; + + var oldStream = new EE(); +diff --git a/test/simple/test-stream2-readable-wrap.js b/test/simple/test-stream2-readable-wrap.js +index 90eea01..6b177f7 100644 +--- a/test/simple/test-stream2-readable-wrap.js ++++ b/test/simple/test-stream2-readable-wrap.js +@@ -22,8 +22,8 @@ + var common = require('../common'); + var assert = require('assert'); + +-var Readable = require('_stream_readable'); +-var Writable = require('_stream_writable'); ++var Readable = require('../../lib/_stream_readable'); ++var Writable = require('../../lib/_stream_writable'); + var EE = require('events').EventEmitter; + + var testRuns = 0, completedRuns = 0; +diff --git a/test/simple/test-stream2-set-encoding.js b/test/simple/test-stream2-set-encoding.js +index 5d2c32a..685531b 100644 +--- a/test/simple/test-stream2-set-encoding.js ++++ b/test/simple/test-stream2-set-encoding.js +@@ -22,7 +22,7 @@ + + var common = require('../common.js'); + var assert = require('assert'); +-var R = require('_stream_readable'); ++var R = require('../../lib/_stream_readable'); + var util = require('util'); + + // tiny node-tap lookalike. +diff --git a/test/simple/test-stream2-transform.js b/test/simple/test-stream2-transform.js +index 9c9ddd8..a0cacc6 100644 +--- a/test/simple/test-stream2-transform.js ++++ b/test/simple/test-stream2-transform.js +@@ -21,8 +21,8 @@ + + var assert = require('assert'); + var common = require('../common.js'); +-var PassThrough = require('_stream_passthrough'); +-var Transform = require('_stream_transform'); ++var PassThrough = require('../../').PassThrough; ++var Transform = require('../../').Transform; + + // tiny node-tap lookalike. + var tests = []; +diff --git a/test/simple/test-stream2-unpipe-drain.js b/test/simple/test-stream2-unpipe-drain.js +index d66dc3c..365b327 100644 +--- a/test/simple/test-stream2-unpipe-drain.js ++++ b/test/simple/test-stream2-unpipe-drain.js +@@ -22,7 +22,7 @@ + + var common = require('../common.js'); + var assert = require('assert'); +-var stream = require('stream'); ++var stream = require('../../'); + var crypto = require('crypto'); + + var util = require('util'); +diff --git a/test/simple/test-stream2-unpipe-leak.js b/test/simple/test-stream2-unpipe-leak.js +index 99f8746..17c92ae 100644 +--- a/test/simple/test-stream2-unpipe-leak.js ++++ b/test/simple/test-stream2-unpipe-leak.js +@@ -22,7 +22,7 @@ + + var common = require('../common.js'); + var assert = require('assert'); +-var stream = require('stream'); ++var stream = require('../../'); + + var chunk = new Buffer('hallo'); + +diff --git a/test/simple/test-stream2-writable.js b/test/simple/test-stream2-writable.js +index 704100c..209c3a6 100644 +--- a/test/simple/test-stream2-writable.js ++++ b/test/simple/test-stream2-writable.js +@@ -20,8 +20,8 @@ + // USE OR OTHER DEALINGS IN THE SOFTWARE. + + var common = require('../common.js'); +-var W = require('_stream_writable'); +-var D = require('_stream_duplex'); ++var W = require('../../').Writable; ++var D = require('../../').Duplex; + var assert = require('assert'); + + var util = require('util'); +diff --git a/test/simple/test-stream3-pause-then-read.js b/test/simple/test-stream3-pause-then-read.js +index b91bde3..2f72c15 100644 +--- a/test/simple/test-stream3-pause-then-read.js ++++ b/test/simple/test-stream3-pause-then-read.js +@@ -22,7 +22,7 @@ + var common = require('../common'); + var assert = require('assert'); + +-var stream = require('stream'); ++var stream = require('../../'); + var Readable = stream.Readable; + var Writable = stream.Writable; + diff --git a/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/readable-stream/lib/_stream_duplex.js new file mode 100644 index 0000000..b513d61 --- /dev/null +++ b/node_modules/readable-stream/lib/_stream_duplex.js @@ -0,0 +1,89 @@ +// Copyright Joyent, Inc. and other Node 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. + +// a duplex stream is just a stream that is both readable and writable. +// Since JS doesn't have multiple prototypal inheritance, this class +// prototypally inherits from Readable, and then parasitically from +// Writable. + +module.exports = Duplex; + +/**/ +var objectKeys = Object.keys || function (obj) { + var keys = []; + for (var key in obj) keys.push(key); + return keys; +} +/**/ + + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +var Readable = require('./_stream_readable'); +var Writable = require('./_stream_writable'); + +util.inherits(Duplex, Readable); + +forEach(objectKeys(Writable.prototype), function(method) { + if (!Duplex.prototype[method]) + Duplex.prototype[method] = Writable.prototype[method]; +}); + +function Duplex(options) { + if (!(this instanceof Duplex)) + return new Duplex(options); + + Readable.call(this, options); + Writable.call(this, options); + + if (options && options.readable === false) + this.readable = false; + + if (options && options.writable === false) + this.writable = false; + + this.allowHalfOpen = true; + if (options && options.allowHalfOpen === false) + this.allowHalfOpen = false; + + this.once('end', onend); +} + +// the no-half-open enforcer +function onend() { + // if we allow half-open state, or if the writable side ended, + // then we're ok. + if (this.allowHalfOpen || this._writableState.ended) + return; + + // no more data can be written. + // But allow more writes to happen in this tick. + process.nextTick(this.end.bind(this)); +} + +function forEach (xs, f) { + for (var i = 0, l = xs.length; i < l; i++) { + f(xs[i], i); + } +} diff --git a/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/readable-stream/lib/_stream_passthrough.js new file mode 100644 index 0000000..895ca50 --- /dev/null +++ b/node_modules/readable-stream/lib/_stream_passthrough.js @@ -0,0 +1,46 @@ +// Copyright Joyent, Inc. and other Node 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. + +// a passthrough stream. +// basically just the most minimal sort of Transform stream. +// Every written chunk gets output as-is. + +module.exports = PassThrough; + +var Transform = require('./_stream_transform'); + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +util.inherits(PassThrough, Transform); + +function PassThrough(options) { + if (!(this instanceof PassThrough)) + return new PassThrough(options); + + Transform.call(this, options); +} + +PassThrough.prototype._transform = function(chunk, encoding, cb) { + cb(null, chunk); +}; diff --git a/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/readable-stream/lib/_stream_readable.js new file mode 100644 index 0000000..19ab358 --- /dev/null +++ b/node_modules/readable-stream/lib/_stream_readable.js @@ -0,0 +1,951 @@ +// Copyright Joyent, Inc. and other Node 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. + +module.exports = Readable; + +/**/ +var isArray = require('isarray'); +/**/ + + +/**/ +var Buffer = require('buffer').Buffer; +/**/ + +Readable.ReadableState = ReadableState; + +var EE = require('events').EventEmitter; + +/**/ +if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { + return emitter.listeners(type).length; +}; +/**/ + +var Stream = require('stream'); + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +var StringDecoder; + + +/**/ +var debug = require('util'); +if (debug && debug.debuglog) { + debug = debug.debuglog('stream'); +} else { + debug = function () {}; +} +/**/ + + +util.inherits(Readable, Stream); + +function ReadableState(options, stream) { + var Duplex = require('./_stream_duplex'); + + options = options || {}; + + // the point at which it stops calling _read() to fill the buffer + // Note: 0 is a valid value, means "don't call _read preemptively ever" + var hwm = options.highWaterMark; + var defaultHwm = options.objectMode ? 16 : 16 * 1024; + this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm; + + // cast to ints. + this.highWaterMark = ~~this.highWaterMark; + + this.buffer = []; + this.length = 0; + this.pipes = null; + this.pipesCount = 0; + this.flowing = null; + this.ended = false; + this.endEmitted = false; + this.reading = false; + + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, because any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; + + // whenever we return null, then we set a flag to say + // that we're awaiting a 'readable' event emission. + this.needReadable = false; + this.emittedReadable = false; + this.readableListening = false; + + + // object stream flag. Used to make read(n) ignore n and to + // make all the buffer merging and length checks go away + this.objectMode = !!options.objectMode; + + if (stream instanceof Duplex) + this.objectMode = this.objectMode || !!options.readableObjectMode; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // when piping, we only care about 'readable' events that happen + // after read()ing all the bytes and not getting any pushback. + this.ranOut = false; + + // the number of writers that are awaiting a drain event in .pipe()s + this.awaitDrain = 0; + + // if true, a maybeReadMore has been scheduled + this.readingMore = false; + + this.decoder = null; + this.encoding = null; + if (options.encoding) { + if (!StringDecoder) + StringDecoder = require('string_decoder/').StringDecoder; + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; + } +} + +function Readable(options) { + var Duplex = require('./_stream_duplex'); + + if (!(this instanceof Readable)) + return new Readable(options); + + this._readableState = new ReadableState(options, this); + + // legacy + this.readable = true; + + Stream.call(this); +} + +// Manually shove something into the read() buffer. +// This returns true if the highWaterMark has not been hit yet, +// similar to how Writable.write() returns true if you should +// write() some more. +Readable.prototype.push = function(chunk, encoding) { + var state = this._readableState; + + if (util.isString(chunk) && !state.objectMode) { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = new Buffer(chunk, encoding); + encoding = ''; + } + } + + return readableAddChunk(this, state, chunk, encoding, false); +}; + +// Unshift should *always* be something directly out of read() +Readable.prototype.unshift = function(chunk) { + var state = this._readableState; + return readableAddChunk(this, state, chunk, '', true); +}; + +function readableAddChunk(stream, state, chunk, encoding, addToFront) { + var er = chunkInvalid(state, chunk); + if (er) { + stream.emit('error', er); + } else if (util.isNullOrUndefined(chunk)) { + state.reading = false; + if (!state.ended) + onEofChunk(stream, state); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (state.ended && !addToFront) { + var e = new Error('stream.push() after EOF'); + stream.emit('error', e); + } else if (state.endEmitted && addToFront) { + var e = new Error('stream.unshift() after end event'); + stream.emit('error', e); + } else { + if (state.decoder && !addToFront && !encoding) + chunk = state.decoder.write(chunk); + + if (!addToFront) + state.reading = false; + + // if we want the data now, just emit it. + if (state.flowing && state.length === 0 && !state.sync) { + stream.emit('data', chunk); + stream.read(0); + } else { + // update the buffer info. + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) + state.buffer.unshift(chunk); + else + state.buffer.push(chunk); + + if (state.needReadable) + emitReadable(stream); + } + + maybeReadMore(stream, state); + } + } else if (!addToFront) { + state.reading = false; + } + + return needMoreData(state); +} + + + +// if it's past the high water mark, we can push in some more. +// Also, if we have no data yet, we can stand some +// more bytes. This is to work around cases where hwm=0, +// such as the repl. Also, if the push() triggered a +// readable event, and the user called read(largeNumber) such that +// needReadable was set, then we ought to push more, so that another +// 'readable' event will be triggered. +function needMoreData(state) { + return !state.ended && + (state.needReadable || + state.length < state.highWaterMark || + state.length === 0); +} + +// backwards compatibility. +Readable.prototype.setEncoding = function(enc) { + if (!StringDecoder) + StringDecoder = require('string_decoder/').StringDecoder; + this._readableState.decoder = new StringDecoder(enc); + this._readableState.encoding = enc; + return this; +}; + +// Don't raise the hwm > 128MB +var MAX_HWM = 0x800000; +function roundUpToNextPowerOf2(n) { + if (n >= MAX_HWM) { + n = MAX_HWM; + } else { + // Get the next highest power of 2 + n--; + for (var p = 1; p < 32; p <<= 1) n |= n >> p; + n++; + } + return n; +} + +function howMuchToRead(n, state) { + if (state.length === 0 && state.ended) + return 0; + + if (state.objectMode) + return n === 0 ? 0 : 1; + + if (isNaN(n) || util.isNull(n)) { + // only flow one buffer at a time + if (state.flowing && state.buffer.length) + return state.buffer[0].length; + else + return state.length; + } + + if (n <= 0) + return 0; + + // If we're asking for more than the target buffer level, + // then raise the water mark. Bump up to the next highest + // power of 2, to prevent increasing it excessively in tiny + // amounts. + if (n > state.highWaterMark) + state.highWaterMark = roundUpToNextPowerOf2(n); + + // don't have that much. return null, unless we've ended. + if (n > state.length) { + if (!state.ended) { + state.needReadable = true; + return 0; + } else + return state.length; + } + + return n; +} + +// you can override either this method, or the async _read(n) below. +Readable.prototype.read = function(n) { + debug('read', n); + var state = this._readableState; + var nOrig = n; + + if (!util.isNumber(n) || n > 0) + state.emittedReadable = false; + + // if we're doing read(0) to trigger a readable event, but we + // already have a bunch of data in the buffer, then just trigger + // the 'readable' event and move on. + if (n === 0 && + state.needReadable && + (state.length >= state.highWaterMark || state.ended)) { + debug('read: emitReadable', state.length, state.ended); + if (state.length === 0 && state.ended) + endReadable(this); + else + emitReadable(this); + return null; + } + + n = howMuchToRead(n, state); + + // if we've ended, and we're now clear, then finish it up. + if (n === 0 && state.ended) { + if (state.length === 0) + endReadable(this); + return null; + } + + // All the actual chunk generation logic needs to be + // *below* the call to _read. The reason is that in certain + // synthetic stream cases, such as passthrough streams, _read + // may be a completely synchronous operation which may change + // the state of the read buffer, providing enough data when + // before there was *not* enough. + // + // So, the steps are: + // 1. Figure out what the state of things will be after we do + // a read from the buffer. + // + // 2. If that resulting state will trigger a _read, then call _read. + // Note that this may be asynchronous, or synchronous. Yes, it is + // deeply ugly to write APIs this way, but that still doesn't mean + // that the Readable class should behave improperly, as streams are + // designed to be sync/async agnostic. + // Take note if the _read call is sync or async (ie, if the read call + // has returned yet), so that we know whether or not it's safe to emit + // 'readable' etc. + // + // 3. Actually pull the requested chunks out of the buffer and return. + + // if we need a readable event, then we need to do some reading. + var doRead = state.needReadable; + debug('need readable', doRead); + + // if we currently have less than the highWaterMark, then also read some + if (state.length === 0 || state.length - n < state.highWaterMark) { + doRead = true; + debug('length less than watermark', doRead); + } + + // however, if we've ended, then there's no point, and if we're already + // reading, then it's unnecessary. + if (state.ended || state.reading) { + doRead = false; + debug('reading or ended', doRead); + } + + if (doRead) { + debug('do read'); + state.reading = true; + state.sync = true; + // if the length is currently zero, then we *need* a readable event. + if (state.length === 0) + state.needReadable = true; + // call internal read method + this._read(state.highWaterMark); + state.sync = false; + } + + // If _read pushed data synchronously, then `reading` will be false, + // and we need to re-evaluate how much data we can return to the user. + if (doRead && !state.reading) + n = howMuchToRead(nOrig, state); + + var ret; + if (n > 0) + ret = fromList(n, state); + else + ret = null; + + if (util.isNull(ret)) { + state.needReadable = true; + n = 0; + } + + state.length -= n; + + // If we have nothing in the buffer, then we want to know + // as soon as we *do* get something into the buffer. + if (state.length === 0 && !state.ended) + state.needReadable = true; + + // If we tried to read() past the EOF, then emit end on the next tick. + if (nOrig !== n && state.ended && state.length === 0) + endReadable(this); + + if (!util.isNull(ret)) + this.emit('data', ret); + + return ret; +}; + +function chunkInvalid(state, chunk) { + var er = null; + if (!util.isBuffer(chunk) && + !util.isString(chunk) && + !util.isNullOrUndefined(chunk) && + !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + return er; +} + + +function onEofChunk(stream, state) { + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); + state.length += state.objectMode ? 1 : chunk.length; + } + } + state.ended = true; + + // emit 'readable' now to make sure it gets picked up. + emitReadable(stream); +} + +// Don't emit readable right away in sync mode, because this can trigger +// another read() call => stack overflow. This way, it might trigger +// a nextTick recursion warning, but that's not so bad. +function emitReadable(stream) { + var state = stream._readableState; + state.needReadable = false; + if (!state.emittedReadable) { + debug('emitReadable', state.flowing); + state.emittedReadable = true; + if (state.sync) + process.nextTick(function() { + emitReadable_(stream); + }); + else + emitReadable_(stream); + } +} + +function emitReadable_(stream) { + debug('emit readable'); + stream.emit('readable'); + flow(stream); +} + + +// at this point, the user has presumably seen the 'readable' event, +// and called read() to consume some data. that may have triggered +// in turn another _read(n) call, in which case reading = true if +// it's in progress. +// However, if we're not ended, or reading, and the length < hwm, +// then go ahead and try to read some more preemptively. +function maybeReadMore(stream, state) { + if (!state.readingMore) { + state.readingMore = true; + process.nextTick(function() { + maybeReadMore_(stream, state); + }); + } +} + +function maybeReadMore_(stream, state) { + var len = state.length; + while (!state.reading && !state.flowing && !state.ended && + state.length < state.highWaterMark) { + debug('maybeReadMore read 0'); + stream.read(0); + if (len === state.length) + // didn't get any data, stop spinning. + break; + else + len = state.length; + } + state.readingMore = false; +} + +// abstract method. to be overridden in specific implementation classes. +// call cb(er, data) where data is <= n in length. +// for virtual (non-string, non-buffer) streams, "length" is somewhat +// arbitrary, and perhaps not very meaningful. +Readable.prototype._read = function(n) { + this.emit('error', new Error('not implemented')); +}; + +Readable.prototype.pipe = function(dest, pipeOpts) { + var src = this; + var state = this._readableState; + + switch (state.pipesCount) { + case 0: + state.pipes = dest; + break; + case 1: + state.pipes = [state.pipes, dest]; + break; + default: + state.pipes.push(dest); + break; + } + state.pipesCount += 1; + debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); + + var doEnd = (!pipeOpts || pipeOpts.end !== false) && + dest !== process.stdout && + dest !== process.stderr; + + var endFn = doEnd ? onend : cleanup; + if (state.endEmitted) + process.nextTick(endFn); + else + src.once('end', endFn); + + dest.on('unpipe', onunpipe); + function onunpipe(readable) { + debug('onunpipe'); + if (readable === src) { + cleanup(); + } + } + + function onend() { + debug('onend'); + dest.end(); + } + + // when the dest drains, it reduces the awaitDrain counter + // on the source. This would be more elegant with a .once() + // handler in flow(), but adding and removing repeatedly is + // too slow. + var ondrain = pipeOnDrain(src); + dest.on('drain', ondrain); + + function cleanup() { + debug('cleanup'); + // cleanup event handlers once the pipe is broken + dest.removeListener('close', onclose); + dest.removeListener('finish', onfinish); + dest.removeListener('drain', ondrain); + dest.removeListener('error', onerror); + dest.removeListener('unpipe', onunpipe); + src.removeListener('end', onend); + src.removeListener('end', cleanup); + src.removeListener('data', ondata); + + // if the reader is waiting for a drain event from this + // specific writer, then it would cause it to never start + // flowing again. + // So, if this is awaiting a drain, then we just call it now. + // If we don't know, then assume that we are waiting for one. + if (state.awaitDrain && + (!dest._writableState || dest._writableState.needDrain)) + ondrain(); + } + + src.on('data', ondata); + function ondata(chunk) { + debug('ondata'); + var ret = dest.write(chunk); + if (false === ret) { + debug('false write response, pause', + src._readableState.awaitDrain); + src._readableState.awaitDrain++; + src.pause(); + } + } + + // if the dest has an error, then stop piping into it. + // however, don't suppress the throwing behavior for this. + function onerror(er) { + debug('onerror', er); + unpipe(); + dest.removeListener('error', onerror); + if (EE.listenerCount(dest, 'error') === 0) + dest.emit('error', er); + } + // This is a brutally ugly hack to make sure that our error handler + // is attached before any userland ones. NEVER DO THIS. + if (!dest._events || !dest._events.error) + dest.on('error', onerror); + else if (isArray(dest._events.error)) + dest._events.error.unshift(onerror); + else + dest._events.error = [onerror, dest._events.error]; + + + + // Both close and finish should trigger unpipe, but only once. + function onclose() { + dest.removeListener('finish', onfinish); + unpipe(); + } + dest.once('close', onclose); + function onfinish() { + debug('onfinish'); + dest.removeListener('close', onclose); + unpipe(); + } + dest.once('finish', onfinish); + + function unpipe() { + debug('unpipe'); + src.unpipe(dest); + } + + // tell the dest that it's being piped to + dest.emit('pipe', src); + + // start the flow if it hasn't been started already. + if (!state.flowing) { + debug('pipe resume'); + src.resume(); + } + + return dest; +}; + +function pipeOnDrain(src) { + return function() { + var state = src._readableState; + debug('pipeOnDrain', state.awaitDrain); + if (state.awaitDrain) + state.awaitDrain--; + if (state.awaitDrain === 0 && EE.listenerCount(src, 'data')) { + state.flowing = true; + flow(src); + } + }; +} + + +Readable.prototype.unpipe = function(dest) { + var state = this._readableState; + + // if we're not piping anywhere, then do nothing. + if (state.pipesCount === 0) + return this; + + // just one destination. most common case. + if (state.pipesCount === 1) { + // passed in one, but it's not the right one. + if (dest && dest !== state.pipes) + return this; + + if (!dest) + dest = state.pipes; + + // got a match. + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + if (dest) + dest.emit('unpipe', this); + return this; + } + + // slow case. multiple pipe destinations. + + if (!dest) { + // remove all. + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + + for (var i = 0; i < len; i++) + dests[i].emit('unpipe', this); + return this; + } + + // try to find the right one. + var i = indexOf(state.pipes, dest); + if (i === -1) + return this; + + state.pipes.splice(i, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) + state.pipes = state.pipes[0]; + + dest.emit('unpipe', this); + + return this; +}; + +// set up data events if they are asked for +// Ensure readable listeners eventually get something +Readable.prototype.on = function(ev, fn) { + var res = Stream.prototype.on.call(this, ev, fn); + + // If listening to data, and it has not explicitly been paused, + // then call resume to start the flow of data on the next tick. + if (ev === 'data' && false !== this._readableState.flowing) { + this.resume(); + } + + if (ev === 'readable' && this.readable) { + var state = this._readableState; + if (!state.readableListening) { + state.readableListening = true; + state.emittedReadable = false; + state.needReadable = true; + if (!state.reading) { + var self = this; + process.nextTick(function() { + debug('readable nexttick read 0'); + self.read(0); + }); + } else if (state.length) { + emitReadable(this, state); + } + } + } + + return res; +}; +Readable.prototype.addListener = Readable.prototype.on; + +// pause() and resume() are remnants of the legacy readable stream API +// If the user uses them, then switch into old mode. +Readable.prototype.resume = function() { + var state = this._readableState; + if (!state.flowing) { + debug('resume'); + state.flowing = true; + if (!state.reading) { + debug('resume read 0'); + this.read(0); + } + resume(this, state); + } + return this; +}; + +function resume(stream, state) { + if (!state.resumeScheduled) { + state.resumeScheduled = true; + process.nextTick(function() { + resume_(stream, state); + }); + } +} + +function resume_(stream, state) { + state.resumeScheduled = false; + stream.emit('resume'); + flow(stream); + if (state.flowing && !state.reading) + stream.read(0); +} + +Readable.prototype.pause = function() { + debug('call pause flowing=%j', this._readableState.flowing); + if (false !== this._readableState.flowing) { + debug('pause'); + this._readableState.flowing = false; + this.emit('pause'); + } + return this; +}; + +function flow(stream) { + var state = stream._readableState; + debug('flow', state.flowing); + if (state.flowing) { + do { + var chunk = stream.read(); + } while (null !== chunk && state.flowing); + } +} + +// wrap an old-style stream as the async data source. +// This is *not* part of the readable stream interface. +// It is an ugly unfortunate mess of history. +Readable.prototype.wrap = function(stream) { + var state = this._readableState; + var paused = false; + + var self = this; + stream.on('end', function() { + debug('wrapped end'); + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) + self.push(chunk); + } + + self.push(null); + }); + + stream.on('data', function(chunk) { + debug('wrapped data'); + if (state.decoder) + chunk = state.decoder.write(chunk); + if (!chunk || !state.objectMode && !chunk.length) + return; + + var ret = self.push(chunk); + if (!ret) { + paused = true; + stream.pause(); + } + }); + + // proxy all the other methods. + // important when wrapping filters and duplexes. + for (var i in stream) { + if (util.isFunction(stream[i]) && util.isUndefined(this[i])) { + this[i] = function(method) { return function() { + return stream[method].apply(stream, arguments); + }}(i); + } + } + + // proxy certain important events. + var events = ['error', 'close', 'destroy', 'pause', 'resume']; + forEach(events, function(ev) { + stream.on(ev, self.emit.bind(self, ev)); + }); + + // when we try to consume some more bytes, simply unpause the + // underlying stream. + self._read = function(n) { + debug('wrapped _read', n); + if (paused) { + paused = false; + stream.resume(); + } + }; + + return self; +}; + + + +// exposed for testing purposes only. +Readable._fromList = fromList; + +// Pluck off n bytes from an array of buffers. +// Length is the combined lengths of all the buffers in the list. +function fromList(n, state) { + var list = state.buffer; + var length = state.length; + var stringMode = !!state.decoder; + var objectMode = !!state.objectMode; + var ret; + + // nothing in the list, definitely empty. + if (list.length === 0) + return null; + + if (length === 0) + ret = null; + else if (objectMode) + ret = list.shift(); + else if (!n || n >= length) { + // read it all, truncate the array. + if (stringMode) + ret = list.join(''); + else + ret = Buffer.concat(list, length); + list.length = 0; + } else { + // read just some of it. + if (n < list[0].length) { + // just take a part of the first list item. + // slice is the same for buffers and strings. + var buf = list[0]; + ret = buf.slice(0, n); + list[0] = buf.slice(n); + } else if (n === list[0].length) { + // first list is a perfect match + ret = list.shift(); + } else { + // complex case. + // we have enough to cover it, but it spans past the first buffer. + if (stringMode) + ret = ''; + else + ret = new Buffer(n); + + var c = 0; + for (var i = 0, l = list.length; i < l && c < n; i++) { + var buf = list[0]; + var cpy = Math.min(n - c, buf.length); + + if (stringMode) + ret += buf.slice(0, cpy); + else + buf.copy(ret, c, 0, cpy); + + if (cpy < buf.length) + list[0] = buf.slice(cpy); + else + list.shift(); + + c += cpy; + } + } + } + + return ret; +} + +function endReadable(stream) { + var state = stream._readableState; + + // If we get here before consuming all the bytes, then that is a + // bug in node. Should never happen. + if (state.length > 0) + throw new Error('endReadable called on non-empty stream'); + + if (!state.endEmitted) { + state.ended = true; + process.nextTick(function() { + // Check that we didn't get one last unshift. + if (!state.endEmitted && state.length === 0) { + state.endEmitted = true; + stream.readable = false; + stream.emit('end'); + } + }); + } +} + +function forEach (xs, f) { + for (var i = 0, l = xs.length; i < l; i++) { + f(xs[i], i); + } +} + +function indexOf (xs, x) { + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) return i; + } + return -1; +} diff --git a/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/readable-stream/lib/_stream_transform.js new file mode 100644 index 0000000..905c5e4 --- /dev/null +++ b/node_modules/readable-stream/lib/_stream_transform.js @@ -0,0 +1,209 @@ +// Copyright Joyent, Inc. and other Node 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. + + +// a transform stream is a readable/writable stream where you do +// something with the data. Sometimes it's called a "filter", +// but that's not a great name for it, since that implies a thing where +// some bits pass through, and others are simply ignored. (That would +// be a valid example of a transform, of course.) +// +// While the output is causally related to the input, it's not a +// necessarily symmetric or synchronous transformation. For example, +// a zlib stream might take multiple plain-text writes(), and then +// emit a single compressed chunk some time in the future. +// +// Here's how this works: +// +// The Transform stream has all the aspects of the readable and writable +// stream classes. When you write(chunk), that calls _write(chunk,cb) +// internally, and returns false if there's a lot of pending writes +// buffered up. When you call read(), that calls _read(n) until +// there's enough pending readable data buffered up. +// +// In a transform stream, the written data is placed in a buffer. When +// _read(n) is called, it transforms the queued up data, calling the +// buffered _write cb's as it consumes chunks. If consuming a single +// written chunk would result in multiple output chunks, then the first +// outputted bit calls the readcb, and subsequent chunks just go into +// the read buffer, and will cause it to emit 'readable' if necessary. +// +// This way, back-pressure is actually determined by the reading side, +// since _read has to be called to start processing a new chunk. However, +// a pathological inflate type of transform can cause excessive buffering +// here. For example, imagine a stream where every byte of input is +// interpreted as an integer from 0-255, and then results in that many +// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in +// 1kb of data being output. In this case, you could write a very small +// amount of input, and end up with a very large amount of output. In +// such a pathological inflating mechanism, there'd be no way to tell +// the system to stop doing the transform. A single 4MB write could +// cause the system to run out of memory. +// +// However, even in such a pathological case, only a single written chunk +// would be consumed, and then the rest would wait (un-transformed) until +// the results of the previous transformed chunk were consumed. + +module.exports = Transform; + +var Duplex = require('./_stream_duplex'); + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +util.inherits(Transform, Duplex); + + +function TransformState(options, stream) { + this.afterTransform = function(er, data) { + return afterTransform(stream, er, data); + }; + + this.needTransform = false; + this.transforming = false; + this.writecb = null; + this.writechunk = null; +} + +function afterTransform(stream, er, data) { + var ts = stream._transformState; + ts.transforming = false; + + var cb = ts.writecb; + + if (!cb) + return stream.emit('error', new Error('no writecb in Transform class')); + + ts.writechunk = null; + ts.writecb = null; + + if (!util.isNullOrUndefined(data)) + stream.push(data); + + if (cb) + cb(er); + + var rs = stream._readableState; + rs.reading = false; + if (rs.needReadable || rs.length < rs.highWaterMark) { + stream._read(rs.highWaterMark); + } +} + + +function Transform(options) { + if (!(this instanceof Transform)) + return new Transform(options); + + Duplex.call(this, options); + + this._transformState = new TransformState(options, this); + + // when the writable side finishes, then flush out anything remaining. + var stream = this; + + // start out asking for a readable event once data is transformed. + this._readableState.needReadable = true; + + // we have implemented the _read method, and done the other things + // that Readable wants before the first _read call, so unset the + // sync guard flag. + this._readableState.sync = false; + + this.once('prefinish', function() { + if (util.isFunction(this._flush)) + this._flush(function(er) { + done(stream, er); + }); + else + done(stream); + }); +} + +Transform.prototype.push = function(chunk, encoding) { + this._transformState.needTransform = false; + return Duplex.prototype.push.call(this, chunk, encoding); +}; + +// This is the part where you do stuff! +// override this function in implementation classes. +// 'chunk' is an input chunk. +// +// Call `push(newChunk)` to pass along transformed output +// to the readable side. You may call 'push' zero or more times. +// +// Call `cb(err)` when you are done with this chunk. If you pass +// an error, then that'll put the hurt on the whole operation. If you +// never call cb(), then you'll never get another chunk. +Transform.prototype._transform = function(chunk, encoding, cb) { + throw new Error('not implemented'); +}; + +Transform.prototype._write = function(chunk, encoding, cb) { + var ts = this._transformState; + ts.writecb = cb; + ts.writechunk = chunk; + ts.writeencoding = encoding; + if (!ts.transforming) { + var rs = this._readableState; + if (ts.needTransform || + rs.needReadable || + rs.length < rs.highWaterMark) + this._read(rs.highWaterMark); + } +}; + +// Doesn't matter what the args are here. +// _transform does all the work. +// That we got here means that the readable side wants more data. +Transform.prototype._read = function(n) { + var ts = this._transformState; + + if (!util.isNull(ts.writechunk) && ts.writecb && !ts.transforming) { + ts.transforming = true; + this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); + } else { + // mark that we need a transform, so that any data that comes in + // will get processed, now that we've asked for it. + ts.needTransform = true; + } +}; + + +function done(stream, er) { + if (er) + return stream.emit('error', er); + + // if there's nothing in the write buffer, then that means + // that nothing more will ever be provided + var ws = stream._writableState; + var ts = stream._transformState; + + if (ws.length) + throw new Error('calling transform done when ws.length != 0'); + + if (ts.transforming) + throw new Error('calling transform done when still transforming'); + + return stream.push(null); +} diff --git a/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/readable-stream/lib/_stream_writable.js new file mode 100644 index 0000000..db8539c --- /dev/null +++ b/node_modules/readable-stream/lib/_stream_writable.js @@ -0,0 +1,477 @@ +// Copyright Joyent, Inc. and other Node 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. + +// A bit simpler than readable streams. +// Implement an async ._write(chunk, cb), and it'll handle all +// the drain event emission and buffering. + +module.exports = Writable; + +/**/ +var Buffer = require('buffer').Buffer; +/**/ + +Writable.WritableState = WritableState; + + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +var Stream = require('stream'); + +util.inherits(Writable, Stream); + +function WriteReq(chunk, encoding, cb) { + this.chunk = chunk; + this.encoding = encoding; + this.callback = cb; +} + +function WritableState(options, stream) { + var Duplex = require('./_stream_duplex'); + + options = options || {}; + + // the point at which write() starts returning false + // Note: 0 is a valid value, means that we always return false if + // the entire buffer is not flushed immediately on write() + var hwm = options.highWaterMark; + var defaultHwm = options.objectMode ? 16 : 16 * 1024; + this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm; + + // object stream flag to indicate whether or not this stream + // contains buffers or objects. + this.objectMode = !!options.objectMode; + + if (stream instanceof Duplex) + this.objectMode = this.objectMode || !!options.writableObjectMode; + + // cast to ints. + this.highWaterMark = ~~this.highWaterMark; + + this.needDrain = false; + // at the start of calling end() + this.ending = false; + // when end() has been called, and returned + this.ended = false; + // when 'finish' is emitted + this.finished = false; + + // should we decode strings into buffers before passing to _write? + // this is here so that some node-core streams can optimize string + // handling at a lower level. + var noDecode = options.decodeStrings === false; + this.decodeStrings = !noDecode; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // not an actual buffer we keep track of, but a measurement + // of how much we're waiting to get pushed to some underlying + // socket or file. + this.length = 0; + + // a flag to see when we're in the middle of a write. + this.writing = false; + + // when true all writes will be buffered until .uncork() call + this.corked = 0; + + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, because any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; + + // a flag to know if we're processing previously buffered items, which + // may call the _write() callback in the same tick, so that we don't + // end up in an overlapped onwrite situation. + this.bufferProcessing = false; + + // the callback that's passed to _write(chunk,cb) + this.onwrite = function(er) { + onwrite(stream, er); + }; + + // the callback that the user supplies to write(chunk,encoding,cb) + this.writecb = null; + + // the amount that is being written when _write is called. + this.writelen = 0; + + this.buffer = []; + + // number of pending user-supplied write callbacks + // this must be 0 before 'finish' can be emitted + this.pendingcb = 0; + + // emit prefinish if the only thing we're waiting for is _write cbs + // This is relevant for synchronous Transform streams + this.prefinished = false; + + // True if the error was already emitted and should not be thrown again + this.errorEmitted = false; +} + +function Writable(options) { + var Duplex = require('./_stream_duplex'); + + // Writable ctor is applied to Duplexes, though they're not + // instanceof Writable, they're instanceof Readable. + if (!(this instanceof Writable) && !(this instanceof Duplex)) + return new Writable(options); + + this._writableState = new WritableState(options, this); + + // legacy. + this.writable = true; + + Stream.call(this); +} + +// Otherwise people can pipe Writable streams, which is just wrong. +Writable.prototype.pipe = function() { + this.emit('error', new Error('Cannot pipe. Not readable.')); +}; + + +function writeAfterEnd(stream, state, cb) { + var er = new Error('write after end'); + // TODO: defer error events consistently everywhere, not just the cb + stream.emit('error', er); + process.nextTick(function() { + cb(er); + }); +} + +// If we get something that is not a buffer, string, null, or undefined, +// and we're not in objectMode, then that's an error. +// Otherwise stream chunks are all considered to be of length=1, and the +// watermarks determine how many objects to keep in the buffer, rather than +// how many bytes or characters. +function validChunk(stream, state, chunk, cb) { + var valid = true; + if (!util.isBuffer(chunk) && + !util.isString(chunk) && + !util.isNullOrUndefined(chunk) && + !state.objectMode) { + var er = new TypeError('Invalid non-string/buffer chunk'); + stream.emit('error', er); + process.nextTick(function() { + cb(er); + }); + valid = false; + } + return valid; +} + +Writable.prototype.write = function(chunk, encoding, cb) { + var state = this._writableState; + var ret = false; + + if (util.isFunction(encoding)) { + cb = encoding; + encoding = null; + } + + if (util.isBuffer(chunk)) + encoding = 'buffer'; + else if (!encoding) + encoding = state.defaultEncoding; + + if (!util.isFunction(cb)) + cb = function() {}; + + if (state.ended) + writeAfterEnd(this, state, cb); + else if (validChunk(this, state, chunk, cb)) { + state.pendingcb++; + ret = writeOrBuffer(this, state, chunk, encoding, cb); + } + + return ret; +}; + +Writable.prototype.cork = function() { + var state = this._writableState; + + state.corked++; +}; + +Writable.prototype.uncork = function() { + var state = this._writableState; + + if (state.corked) { + state.corked--; + + if (!state.writing && + !state.corked && + !state.finished && + !state.bufferProcessing && + state.buffer.length) + clearBuffer(this, state); + } +}; + +function decodeChunk(state, chunk, encoding) { + if (!state.objectMode && + state.decodeStrings !== false && + util.isString(chunk)) { + chunk = new Buffer(chunk, encoding); + } + return chunk; +} + +// if we're already writing something, then just put this +// in the queue, and wait our turn. Otherwise, call _write +// If we return false, then we need a drain event, so set that flag. +function writeOrBuffer(stream, state, chunk, encoding, cb) { + chunk = decodeChunk(state, chunk, encoding); + if (util.isBuffer(chunk)) + encoding = 'buffer'; + var len = state.objectMode ? 1 : chunk.length; + + state.length += len; + + var ret = state.length < state.highWaterMark; + // we must ensure that previous needDrain will not be reset to false. + if (!ret) + state.needDrain = true; + + if (state.writing || state.corked) + state.buffer.push(new WriteReq(chunk, encoding, cb)); + else + doWrite(stream, state, false, len, chunk, encoding, cb); + + return ret; +} + +function doWrite(stream, state, writev, len, chunk, encoding, cb) { + state.writelen = len; + state.writecb = cb; + state.writing = true; + state.sync = true; + if (writev) + stream._writev(chunk, state.onwrite); + else + stream._write(chunk, encoding, state.onwrite); + state.sync = false; +} + +function onwriteError(stream, state, sync, er, cb) { + if (sync) + process.nextTick(function() { + state.pendingcb--; + cb(er); + }); + else { + state.pendingcb--; + cb(er); + } + + stream._writableState.errorEmitted = true; + stream.emit('error', er); +} + +function onwriteStateUpdate(state) { + state.writing = false; + state.writecb = null; + state.length -= state.writelen; + state.writelen = 0; +} + +function onwrite(stream, er) { + var state = stream._writableState; + var sync = state.sync; + var cb = state.writecb; + + onwriteStateUpdate(state); + + if (er) + onwriteError(stream, state, sync, er, cb); + else { + // Check if we're actually ready to finish, but don't emit yet + var finished = needFinish(stream, state); + + if (!finished && + !state.corked && + !state.bufferProcessing && + state.buffer.length) { + clearBuffer(stream, state); + } + + if (sync) { + process.nextTick(function() { + afterWrite(stream, state, finished, cb); + }); + } else { + afterWrite(stream, state, finished, cb); + } + } +} + +function afterWrite(stream, state, finished, cb) { + if (!finished) + onwriteDrain(stream, state); + state.pendingcb--; + cb(); + finishMaybe(stream, state); +} + +// Must force callback to be called on nextTick, so that we don't +// emit 'drain' before the write() consumer gets the 'false' return +// value, and has a chance to attach a 'drain' listener. +function onwriteDrain(stream, state) { + if (state.length === 0 && state.needDrain) { + state.needDrain = false; + stream.emit('drain'); + } +} + + +// if there's something in the buffer waiting, then process it +function clearBuffer(stream, state) { + state.bufferProcessing = true; + + if (stream._writev && state.buffer.length > 1) { + // Fast case, write everything using _writev() + var cbs = []; + for (var c = 0; c < state.buffer.length; c++) + cbs.push(state.buffer[c].callback); + + // count the one we are adding, as well. + // TODO(isaacs) clean this up + state.pendingcb++; + doWrite(stream, state, true, state.length, state.buffer, '', function(err) { + for (var i = 0; i < cbs.length; i++) { + state.pendingcb--; + cbs[i](err); + } + }); + + // Clear buffer + state.buffer = []; + } else { + // Slow case, write chunks one-by-one + for (var c = 0; c < state.buffer.length; c++) { + var entry = state.buffer[c]; + var chunk = entry.chunk; + var encoding = entry.encoding; + var cb = entry.callback; + var len = state.objectMode ? 1 : chunk.length; + + doWrite(stream, state, false, len, chunk, encoding, cb); + + // if we didn't call the onwrite immediately, then + // it means that we need to wait until it does. + // also, that means that the chunk and cb are currently + // being processed, so move the buffer counter past them. + if (state.writing) { + c++; + break; + } + } + + if (c < state.buffer.length) + state.buffer = state.buffer.slice(c); + else + state.buffer.length = 0; + } + + state.bufferProcessing = false; +} + +Writable.prototype._write = function(chunk, encoding, cb) { + cb(new Error('not implemented')); + +}; + +Writable.prototype._writev = null; + +Writable.prototype.end = function(chunk, encoding, cb) { + var state = this._writableState; + + if (util.isFunction(chunk)) { + cb = chunk; + chunk = null; + encoding = null; + } else if (util.isFunction(encoding)) { + cb = encoding; + encoding = null; + } + + if (!util.isNullOrUndefined(chunk)) + this.write(chunk, encoding); + + // .end() fully uncorks + if (state.corked) { + state.corked = 1; + this.uncork(); + } + + // ignore unnecessary end() calls. + if (!state.ending && !state.finished) + endWritable(this, state, cb); +}; + + +function needFinish(stream, state) { + return (state.ending && + state.length === 0 && + !state.finished && + !state.writing); +} + +function prefinish(stream, state) { + if (!state.prefinished) { + state.prefinished = true; + stream.emit('prefinish'); + } +} + +function finishMaybe(stream, state) { + var need = needFinish(stream, state); + if (need) { + if (state.pendingcb === 0) { + prefinish(stream, state); + state.finished = true; + stream.emit('finish'); + } else + prefinish(stream, state); + } + return need; +} + +function endWritable(stream, state, cb) { + state.ending = true; + finishMaybe(stream, state); + if (cb) { + if (state.finished) + process.nextTick(cb); + else + stream.once('finish', cb); + } + state.ended = true; +} diff --git a/node_modules/readable-stream/node_modules/isarray/README.md b/node_modules/readable-stream/node_modules/isarray/README.md new file mode 100644 index 0000000..052a62b --- /dev/null +++ b/node_modules/readable-stream/node_modules/isarray/README.md @@ -0,0 +1,54 @@ + +# isarray + +`Array#isArray` for older browsers. + +## Usage + +```js +var isArray = require('isarray'); + +console.log(isArray([])); // => true +console.log(isArray({})); // => false +``` + +## Installation + +With [npm](http://npmjs.org) do + +```bash +$ npm install isarray +``` + +Then bundle for the browser with +[browserify](https://github.com/substack/browserify). + +With [component](http://component.io) do + +```bash +$ component install juliangruber/isarray +``` + +## License + +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> + +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. diff --git a/node_modules/readable-stream/node_modules/isarray/build/build.js b/node_modules/readable-stream/node_modules/isarray/build/build.js new file mode 100644 index 0000000..ec58596 --- /dev/null +++ b/node_modules/readable-stream/node_modules/isarray/build/build.js @@ -0,0 +1,209 @@ + +/** + * Require the given path. + * + * @param {String} path + * @return {Object} exports + * @api public + */ + +function require(path, parent, orig) { + var resolved = require.resolve(path); + + // lookup failed + if (null == resolved) { + orig = orig || path; + parent = parent || 'root'; + var err = new Error('Failed to require "' + orig + '" from "' + parent + '"'); + err.path = orig; + err.parent = parent; + err.require = true; + throw err; + } + + var module = require.modules[resolved]; + + // perform real require() + // by invoking the module's + // registered function + if (!module.exports) { + module.exports = {}; + module.client = module.component = true; + module.call(this, module.exports, require.relative(resolved), module); + } + + return module.exports; +} + +/** + * Registered modules. + */ + +require.modules = {}; + +/** + * Registered aliases. + */ + +require.aliases = {}; + +/** + * Resolve `path`. + * + * Lookup: + * + * - PATH/index.js + * - PATH.js + * - PATH + * + * @param {String} path + * @return {String} path or null + * @api private + */ + +require.resolve = function(path) { + if (path.charAt(0) === '/') path = path.slice(1); + var index = path + '/index.js'; + + var paths = [ + path, + path + '.js', + path + '.json', + path + '/index.js', + path + '/index.json' + ]; + + for (var i = 0; i < paths.length; i++) { + var path = paths[i]; + if (require.modules.hasOwnProperty(path)) return path; + } + + if (require.aliases.hasOwnProperty(index)) { + return require.aliases[index]; + } +}; + +/** + * Normalize `path` relative to the current path. + * + * @param {String} curr + * @param {String} path + * @return {String} + * @api private + */ + +require.normalize = function(curr, path) { + var segs = []; + + if ('.' != path.charAt(0)) return path; + + curr = curr.split('/'); + path = path.split('/'); + + for (var i = 0; i < path.length; ++i) { + if ('..' == path[i]) { + curr.pop(); + } else if ('.' != path[i] && '' != path[i]) { + segs.push(path[i]); + } + } + + return curr.concat(segs).join('/'); +}; + +/** + * Register module at `path` with callback `definition`. + * + * @param {String} path + * @param {Function} definition + * @api private + */ + +require.register = function(path, definition) { + require.modules[path] = definition; +}; + +/** + * Alias a module definition. + * + * @param {String} from + * @param {String} to + * @api private + */ + +require.alias = function(from, to) { + if (!require.modules.hasOwnProperty(from)) { + throw new Error('Failed to alias "' + from + '", it does not exist'); + } + require.aliases[to] = from; +}; + +/** + * Return a require function relative to the `parent` path. + * + * @param {String} parent + * @return {Function} + * @api private + */ + +require.relative = function(parent) { + var p = require.normalize(parent, '..'); + + /** + * lastIndexOf helper. + */ + + function lastIndexOf(arr, obj) { + var i = arr.length; + while (i--) { + if (arr[i] === obj) return i; + } + return -1; + } + + /** + * The relative require() itself. + */ + + function localRequire(path) { + var resolved = localRequire.resolve(path); + return require(resolved, parent, path); + } + + /** + * Resolve relative to the parent. + */ + + localRequire.resolve = function(path) { + var c = path.charAt(0); + if ('/' == c) return path.slice(1); + if ('.' == c) return require.normalize(p, path); + + // resolve deps by returning + // the dep in the nearest "deps" + // directory + var segs = parent.split('/'); + var i = lastIndexOf(segs, 'deps') + 1; + if (!i) i = 0; + path = segs.slice(0, i + 1).join('/') + '/deps/' + path; + return path; + }; + + /** + * Check if module is defined at `path`. + */ + + localRequire.exists = function(path) { + return require.modules.hasOwnProperty(localRequire.resolve(path)); + }; + + return localRequire; +}; +require.register("isarray/index.js", function(exports, require, module){ +module.exports = Array.isArray || function (arr) { + return Object.prototype.toString.call(arr) == '[object Array]'; +}; + +}); +require.alias("isarray/index.js", "isarray/index.js"); + diff --git a/node_modules/readable-stream/node_modules/isarray/component.json b/node_modules/readable-stream/node_modules/isarray/component.json new file mode 100644 index 0000000..9e31b68 --- /dev/null +++ b/node_modules/readable-stream/node_modules/isarray/component.json @@ -0,0 +1,19 @@ +{ + "name" : "isarray", + "description" : "Array#isArray for older browsers", + "version" : "0.0.1", + "repository" : "juliangruber/isarray", + "homepage": "https://github.com/juliangruber/isarray", + "main" : "index.js", + "scripts" : [ + "index.js" + ], + "dependencies" : {}, + "keywords": ["browser","isarray","array"], + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "license": "MIT" +} diff --git a/node_modules/readable-stream/node_modules/isarray/index.js b/node_modules/readable-stream/node_modules/isarray/index.js new file mode 100644 index 0000000..5f5ad45 --- /dev/null +++ b/node_modules/readable-stream/node_modules/isarray/index.js @@ -0,0 +1,3 @@ +module.exports = Array.isArray || function (arr) { + return Object.prototype.toString.call(arr) == '[object Array]'; +}; diff --git a/node_modules/readable-stream/node_modules/isarray/package.json b/node_modules/readable-stream/node_modules/isarray/package.json new file mode 100644 index 0000000..6abca52 --- /dev/null +++ b/node_modules/readable-stream/node_modules/isarray/package.json @@ -0,0 +1,86 @@ +{ + "_args": [ + [ + { + "raw": "isarray@0.0.1", + "scope": null, + "escapedName": "isarray", + "name": "isarray", + "rawSpec": "0.0.1", + "spec": "0.0.1", + "type": "version" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/readable-stream" + ] + ], + "_from": "isarray@0.0.1", + "_id": "isarray@0.0.1", + "_inCache": true, + "_location": "/readable-stream/isarray", + "_npmUser": { + "name": "juliangruber", + "email": "julian@juliangruber.com" + }, + "_npmVersion": "1.2.18", + "_phantomChildren": {}, + "_requested": { + "raw": "isarray@0.0.1", + "scope": null, + "escapedName": "isarray", + "name": "isarray", + "rawSpec": "0.0.1", + "spec": "0.0.1", + "type": "version" + }, + "_requiredBy": [ + "/readable-stream" + ], + "_resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "_shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf", + "_shrinkwrap": null, + "_spec": "isarray@0.0.1", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/readable-stream", + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "bugs": { + "url": "https://github.com/juliangruber/isarray/issues" + }, + "dependencies": {}, + "description": "Array#isArray for older browsers", + "devDependencies": { + "tap": "*" + }, + "directories": {}, + "dist": { + "shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf", + "tarball": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + }, + "homepage": "https://github.com/juliangruber/isarray", + "keywords": [ + "browser", + "isarray", + "array" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "juliangruber", + "email": "julian@juliangruber.com" + } + ], + "name": "isarray", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/isarray.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "0.0.1" +} diff --git a/node_modules/readable-stream/package.json b/node_modules/readable-stream/package.json new file mode 100644 index 0000000..582e9b9 --- /dev/null +++ b/node_modules/readable-stream/package.json @@ -0,0 +1,112 @@ +{ + "_args": [ + [ + { + "raw": "readable-stream@~1.1.9", + "scope": null, + "escapedName": "readable-stream", + "name": "readable-stream", + "rawSpec": "~1.1.9", + "spec": ">=1.1.9 <1.2.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/duplexer2" + ] + ], + "_from": "readable-stream@>=1.1.9 <1.2.0", + "_id": "readable-stream@1.1.14", + "_inCache": true, + "_location": "/readable-stream", + "_nodeVersion": "5.10.1", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/readable-stream-1.1.14.tgz_1460563293219_0.5682175166439265" + }, + "_npmUser": { + "name": "cwmma", + "email": "calvin.metcalf@gmail.com" + }, + "_npmVersion": "3.8.3", + "_phantomChildren": {}, + "_requested": { + "raw": "readable-stream@~1.1.9", + "scope": null, + "escapedName": "readable-stream", + "name": "readable-stream", + "rawSpec": "~1.1.9", + "spec": ">=1.1.9 <1.2.0", + "type": "range" + }, + "_requiredBy": [ + "/duplexer2" + ], + "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "_shasum": "7cf4c54ef648e3813084c636dd2079e166c081d9", + "_shrinkwrap": null, + "_spec": "readable-stream@~1.1.9", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/duplexer2", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "browser": { + "util": false + }, + "bugs": { + "url": "https://github.com/isaacs/readable-stream/issues" + }, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + }, + "description": "Streams3, a user-land copy of the stream library from Node.js v0.11.x", + "devDependencies": { + "tap": "~0.2.6" + }, + "directories": {}, + "dist": { + "shasum": "7cf4c54ef648e3813084c636dd2079e166c081d9", + "tarball": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz" + }, + "gitHead": "52550840cb1d6e8a98ef9a909a4bea360bc6f7da", + "homepage": "https://github.com/isaacs/readable-stream#readme", + "keywords": [ + "readable", + "stream", + "pipe" + ], + "license": "MIT", + "main": "readable.js", + "maintainers": [ + { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + { + "name": "tootallnate", + "email": "nathan@tootallnate.net" + }, + { + "name": "rvagg", + "email": "rod@vagg.org" + }, + { + "name": "cwmma", + "email": "calvin.metcalf@gmail.com" + } + ], + "name": "readable-stream", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/readable-stream.git" + }, + "scripts": { + "test": "tap test/simple/*.js" + }, + "version": "1.1.14" +} diff --git a/node_modules/readable-stream/passthrough.js b/node_modules/readable-stream/passthrough.js new file mode 100644 index 0000000..27e8d8a --- /dev/null +++ b/node_modules/readable-stream/passthrough.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_passthrough.js") diff --git a/node_modules/readable-stream/readable.js b/node_modules/readable-stream/readable.js new file mode 100644 index 0000000..2a8b5c6 --- /dev/null +++ b/node_modules/readable-stream/readable.js @@ -0,0 +1,10 @@ +exports = module.exports = require('./lib/_stream_readable.js'); +exports.Stream = require('stream'); +exports.Readable = exports; +exports.Writable = require('./lib/_stream_writable.js'); +exports.Duplex = require('./lib/_stream_duplex.js'); +exports.Transform = require('./lib/_stream_transform.js'); +exports.PassThrough = require('./lib/_stream_passthrough.js'); +if (!process.browser && process.env.READABLE_STREAM === 'disable') { + module.exports = require('stream'); +} diff --git a/node_modules/readable-stream/transform.js b/node_modules/readable-stream/transform.js new file mode 100644 index 0000000..5d482f0 --- /dev/null +++ b/node_modules/readable-stream/transform.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_transform.js") diff --git a/node_modules/readable-stream/writable.js b/node_modules/readable-stream/writable.js new file mode 100644 index 0000000..e1e9efd --- /dev/null +++ b/node_modules/readable-stream/writable.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_writable.js") diff --git a/node_modules/rechoir/.npmignore b/node_modules/rechoir/.npmignore new file mode 100644 index 0000000..9daeafb --- /dev/null +++ b/node_modules/rechoir/.npmignore @@ -0,0 +1 @@ +test diff --git a/node_modules/rechoir/.travis.yml b/node_modules/rechoir/.travis.yml new file mode 100644 index 0000000..57e9fda --- /dev/null +++ b/node_modules/rechoir/.travis.yml @@ -0,0 +1,24 @@ +sudo: false +language: node_js +node_js: + - "0.10" + - "0.12" +env: + global: + - REMOVE_DEPS="" + matrix: + - "CUSTOM_DEPS=coffee-script@~1.3" + - "CUSTOM_DEPS=coffee-script@~1.5" + - "CUSTOM_DEPS=coffee-script@~1.7" + - "CUSTOM_DEPS=coffee-script@latest" + - "CUSTOM_DEPS=iced-coffee-script@1.6.3-j" + - "CUSTOM_DEPS=iced-coffee-script@latest" + - "CUSTOM_DEPS=LiveScript@1.3.1 REMOVE_DEPS=livescript" + - "CUSTOM_DEPS=typescript-require REMOVE_DEPS=typescript-register" +matrix: + fast_finish: true +before_install: + - "npm install -g npm" # needs the newest version of npm +before_script: + - "[ \"${REMOVE_DEPS}\" == \"\" ] || npm rm $REMOVE_DEPS" + - "npm install $CUSTOM_DEPS" # install a specific version of dependencies diff --git a/node_modules/rechoir/CHANGELOG b/node_modules/rechoir/CHANGELOG new file mode 100644 index 0000000..e10327b --- /dev/null +++ b/node_modules/rechoir/CHANGELOG @@ -0,0 +1,38 @@ +v0.6.2: + date: 2015-07-22 + changes: + - Return `undefined` when an unknown extension is provided to prepare and + the `nothrow` option is specified. +v0.6.1: + date: 2015-05-22 + changes: + - Add option for not throwing. +v0.6.0: + date: 2015-05-20 + changes: + - Include module name when prepare is successful. +v0.5.0: + date: 2015-05-20 + changes: + - Overhaul to support interpret 0.6.0. +v0.3.0: + date: 2015-01-10 + changes: + - Breaking: `load` method removed. + - Improved extension recognition. + - No longer fails upon dots in filenames. + - Support confuration objects. + - Support and test ES6. + - Support legacy module loading. +v0.2.2: + date: 2014-12-17 + changes: + - Expose interpret. +v0.2.0: + date: 2014-04-20 + changes: + - Simplify loading of coffee-script and iced-coffee-script. +v0.1.0: + date: 2014-04-20 + changes: + - Initial public release. diff --git a/node_modules/rechoir/LICENSE b/node_modules/rechoir/LICENSE new file mode 100644 index 0000000..f467993 --- /dev/null +++ b/node_modules/rechoir/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2015 Tyler Kellen + +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. diff --git a/node_modules/rechoir/README.md b/node_modules/rechoir/README.md new file mode 100644 index 0000000..32280c0 --- /dev/null +++ b/node_modules/rechoir/README.md @@ -0,0 +1,42 @@ +# rechoir [![Build Status](https://secure.travis-ci.org/tkellen/js-rechoir.png)](http://travis-ci.org/tkellen/js-rechoir) +> Require any supported file as a node module. + +[![NPM](https://nodei.co/npm/rechoir.png)](https://nodei.co/npm/rechoir/) + +## What is it? +This module, in conjunction with [interpret]-like objects can register any file type the npm ecosystem has a module loader for. This library is a dependency of [Liftoff]. + +## API + +### prepare(config, filepath, requireFrom) +Look for a module loader associated with the provided file and attempt require it. If necessary, run any setup required to inject it into [require.extensions](http://nodejs.org/api/globals.html#globals_require_extensions). + +`config` An [interpret]-like configuration object. + +`filepath` A file whose type you'd like to register a module loader for. + +`requireFrom` An optional path to start searching for the module required to load the requested file. Defaults to the directory of `filepath`. + +If calling this method is successful (aka: it doesn't throw), you can now require files of the type you requested natively. + +An error with a `failures` property will be thrown if the module loader(s) configured for a given extension cannot be registered. + +If a loader is already registered, this will simply return `true`. + +**Note:** While rechoir will automatically load and register transpilers like `coffee-script`, you must provide a local installation. The transpilers are **not** bundled with this module. + +#### Usage +```js +const config = require('interpret').extensions; +const rechoir = require('rechoir'); +rechoir.prepare(config, './test/fixtures/test.coffee'); +rechoir.prepare(config, './test/fixtures/test.csv'); +rechoir.prepare(config, './test/fixtures/test.toml'); + +console.log(require('./test/fixtures/test.coffee')); +console.log(require('./test/fixtures/test.csv')); +console.log(require('./test/fixtures/test.toml')); +``` + +[interpret]: http://github.com/tkellen/js-interpret +[Liftoff]: http://github.com/tkellen/js-liftoff diff --git a/node_modules/rechoir/index.js b/node_modules/rechoir/index.js new file mode 100644 index 0000000..0c36d05 --- /dev/null +++ b/node_modules/rechoir/index.js @@ -0,0 +1,59 @@ +const path = require('path'); + +const extension = require('./lib/extension'); +const normalize = require('./lib/normalize'); +const register = require('./lib/register'); + +exports.prepare = function (extensions, filepath, cwd, nothrow) { + var option, attempt; + var attempts = []; + var err; + var onlyErrors = false; + var ext = extension(filepath); + if (Object.keys(require.extensions).indexOf(ext) !== -1) { + return true; + } + var config = normalize(extensions[ext]); + if (!config) { + if (nothrow) { + return; + } else { + throw new Error('No module loader found for "'+ext+'".'); + } + } + if (!cwd) { + cwd = path.dirname(path.resolve(filepath)); + } + if (!Array.isArray(config)) { + config = [config]; + } + for (var i in config) { + option = config[i]; + attempt = register(cwd, option.module, option.register); + error = (attempt instanceof Error) ? attempt : null; + if (error) { + attempt = null; + } + attempts.push({ + moduleName: option.module, + module: attempt, + error: error + }); + if (!error) { + onlyErrors = false; + break; + } else { + onlyErrors = true; + } + } + if (onlyErrors) { + err = new Error('Unable to use specified module loaders for "'+ext+'".'); + err.failures = attempts; + if (nothrow) { + return err; + } else { + throw err; + } + } + return attempts; +}; diff --git a/node_modules/rechoir/lib/extension.js b/node_modules/rechoir/lib/extension.js new file mode 100644 index 0000000..60f19da --- /dev/null +++ b/node_modules/rechoir/lib/extension.js @@ -0,0 +1,11 @@ +const path = require('path'); + +const EXTRE = /^[.]?[^.]+([.].*)$/; + +module.exports = function (input) { + var extension = EXTRE.exec(path.basename(input)); + if (!extension) { + return; + } + return extension[1]; +}; diff --git a/node_modules/rechoir/lib/normalize.js b/node_modules/rechoir/lib/normalize.js new file mode 100644 index 0000000..0da5e58 --- /dev/null +++ b/node_modules/rechoir/lib/normalize.js @@ -0,0 +1,15 @@ +function normalizer (config) { + if (typeof config === 'string') { + return { + module: config + } + } + return config; +}; + +module.exports = function (config) { + if (Array.isArray(config)) { + return config.map(normalizer); + } + return normalizer(config); +}; diff --git a/node_modules/rechoir/lib/register.js b/node_modules/rechoir/lib/register.js new file mode 100644 index 0000000..20e8ca7 --- /dev/null +++ b/node_modules/rechoir/lib/register.js @@ -0,0 +1,15 @@ +const path = require('path'); +const resolve = require('resolve'); + +module.exports = function (cwd, moduleName, register) { + try { + var modulePath = resolve.sync(moduleName, {basedir: cwd}); + var result = require(modulePath); + if (typeof register === 'function') { + register(result); + } + } catch (e) { + result = e; + } + return result; +}; diff --git a/node_modules/rechoir/package.json b/node_modules/rechoir/package.json new file mode 100644 index 0000000..2139b62 --- /dev/null +++ b/node_modules/rechoir/package.json @@ -0,0 +1,148 @@ +{ + "_args": [ + [ + { + "raw": "rechoir@^0.6.2", + "scope": null, + "escapedName": "rechoir", + "name": "rechoir", + "rawSpec": "^0.6.2", + "spec": ">=0.6.2 <0.7.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/liftoff" + ] + ], + "_from": "rechoir@>=0.6.2 <0.7.0", + "_id": "rechoir@0.6.2", + "_inCache": true, + "_location": "/rechoir", + "_nodeVersion": "0.12.4", + "_npmUser": { + "name": "tkellen", + "email": "tyler@sleekcode.net" + }, + "_npmVersion": "2.7.4", + "_phantomChildren": {}, + "_requested": { + "raw": "rechoir@^0.6.2", + "scope": null, + "escapedName": "rechoir", + "name": "rechoir", + "rawSpec": "^0.6.2", + "spec": ">=0.6.2 <0.7.0", + "type": "range" + }, + "_requiredBy": [ + "/liftoff" + ], + "_resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "_shasum": "85204b54dba82d5742e28c96756ef43af50e3384", + "_shrinkwrap": null, + "_spec": "rechoir@^0.6.2", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/liftoff", + "author": { + "name": "Tyler Kellen", + "url": "http://goingslowly.com/" + }, + "bugs": { + "url": "https://github.com/tkellen/node-rechoir/issues" + }, + "dependencies": { + "resolve": "^1.1.6" + }, + "description": "Require any supported file as a node module.", + "devDependencies": { + "babel": "^5.4.3", + "chai": "^2.3.0", + "coco": "^0.9.1", + "coffee-script": "^1.9.2", + "earlgrey": "0.0.9", + "iced-coffee-script": "^1.8.0-d", + "interpret": "^0.6.1", + "json5": "^0.4.0", + "livescript": "^1.4.0", + "mocha": "^2.2.5", + "node-jsx": "^0.13.3", + "require-csv": "0.0.1", + "require-ini": "0.0.1", + "require-uncached": "^1.0.2", + "require-xml": "0.0.1", + "require-yaml": "0.0.1", + "rimraf": "^2.3.4", + "semver": "^4.3.4", + "sinon": "^1.14.1", + "toml-require": "^1.0.1", + "typescript-register": "^1.1.0" + }, + "directories": {}, + "dist": { + "shasum": "85204b54dba82d5742e28c96756ef43af50e3384", + "tarball": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz" + }, + "engines": { + "node": ">= 0.10" + }, + "gitHead": "1aafd85aac487171be71891b916c9136c620ac0e", + "homepage": "https://github.com/tkellen/node-rechoir", + "keywords": [ + "require", + "cjsx", + "co", + "coco", + "coffee-script", + "coffee", + "coffee.md", + "csv", + "earlgrey", + "es", + "es6", + "iced", + "iced.md", + "iced-coffee-script", + "ini", + "js", + "json", + "json5", + "jsx", + "react", + "litcoffee", + "liticed", + "ls", + "livescript", + "toml", + "ts", + "typescript", + "xml", + "yaml", + "yml" + ], + "licenses": [ + { + "type": "MIT", + "url": "https://github.com/tkellen/node-rechoir/blob/master/LICENSE" + } + ], + "main": "index.js", + "maintainers": [ + { + "name": "tkellen", + "email": "tyler@sleekcode.net" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + } + ], + "name": "rechoir", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/tkellen/node-rechoir.git" + }, + "scripts": { + "test": "mocha -R spec test/index.js" + }, + "version": "0.6.2" +} diff --git a/node_modules/redefine/.gitattributes b/node_modules/redefine/.gitattributes new file mode 100644 index 0000000..2125666 --- /dev/null +++ b/node_modules/redefine/.gitattributes @@ -0,0 +1 @@ +* text=auto \ No newline at end of file diff --git a/node_modules/redefine/.npmignore b/node_modules/redefine/.npmignore new file mode 100644 index 0000000..11482a9 --- /dev/null +++ b/node_modules/redefine/.npmignore @@ -0,0 +1,6 @@ +src/* +test/* +template/* +build/*.amd.js +Makefile +index.html \ No newline at end of file diff --git a/node_modules/redefine/.travis.yml b/node_modules/redefine/.travis.yml new file mode 100644 index 0000000..b6c89b3 --- /dev/null +++ b/node_modules/redefine/.travis.yml @@ -0,0 +1,9 @@ +language: node_js +node_js: + - 0.8 + - 0.9 +git: + depth: 1 +branches: + only: + - master \ No newline at end of file diff --git a/node_modules/redefine/HOWTO.md b/node_modules/redefine/HOWTO.md new file mode 100644 index 0000000..86ad2b5 --- /dev/null +++ b/node_modules/redefine/HOWTO.md @@ -0,0 +1,307 @@ +redefine VS ES5 +=============== + +#### Create A Null Object + + // redefine + var o = redefine.from(null); + + // ES5 + var o = Object.create(null); + +#### Add Properties During Creation + + // redefine + var o = redefine.from(null, { + name: "object", + toString: function () { + return "Hi, I am " + this.name; + } + }); + + // ES5 + var o = Object.create(null, { + name: { + value: "object" + }, + toString: { + value: function () { + return "Hi, I am " + this.name; + } + } + }); + +#### Add Configurable + Writable Properties During Creation + + // redefine + var o = redefine.from(null, { + name: "object", + toString: function () { + return "Hi, I am " + this.name; + } + }, { + configurable : true, + writable: true + }); + + // ES5 + var o = Object.create(null, { + name: { + configurable: true, + writable: true, + value: "object" + }, + toString: { + configurable: true, + writable: true, + value: function () { + return "Hi, I am " + this.name; + } + } + }); + +#### Add A Getter/Setter + + // redefine + var o = redefine.from({}, { + bday: Date.now(), + age: redefine.as({ + set: function () { + throw 'you cannot set your age'; + }, + get: function () { + return parseInt( + (Date.now() - this.bday) / + (1000 * 60 * 60 * 24 * 365) + ); // I know, no leap year + } + }) + }); + + // ES5 + var o = Object.create({}, { + bday: { + value: Date.now() + }, + age: { + set: function () { + throw 'you cannot set your age'; + }, + get: function () { + return parseInt( + (Date.now() - this.bday) / + (1000 * 60 * 60 * 24 * 365) + ); // I know, no leap year + } + } + }); + +#### Real World Example: An Emitter Class +This a simplified `Emitter` class with a logic optimized to save some memory and GC cycle. + + // generic basic Emitter constructor + function Emitter(){} + function emit(callback) { + // just a recycled function + callback(this); + } + +This is how we can define the prototype of the `Emitter` class. + + // redefine + redefine( + Emitter.prototype, + { + emit: function (type, data) { + if (type in this._handlers) { + this._handlers[type].forEach(emit, data); + } + return this; + }, + on: function (type, handler) { + var list = this._getList(type); + list.indexOf(handler) < 0 && list.push(handler); + return this; + }, + off: function (type, handler) { + var list = this._getList(type), + i = list.indexOf(handler); + if (-1 < i) { + list.splice(i, 1); + if (!list.length) { + delete this._handlers[type]; + if (!Object.keys(this._handler).length) { + delete this._handlers; + } + } + } + return this; + }, + _getList: function (type) { + return this._handlers[type] || ( + this._handlers[type] = [] + ); + }, + _handlers: redefine.later(function(){ + return {}; + }) + } + ); + +The pattern used for the `_handlers` property only is an inherited getter replaced on demand with a direct property access, explained in details in [The Power Of Getters](http://webreflection.blogspot.com/2013/01/the-power-of-getters.html) post. + +Long story short: we can create 100 instances of `Emitter` and the amount of extra objects will be exactly `100` instead of `200` considering a handler created during initialization. + +With this pattern, only when the `_handlers` object is needed is created once per instance and set as property to avoid calling the getter per each access. +When listeners are removed, both Array used as type list and `_handlers` are removed, if empty. In order to obtain the same behavior in ES5: + + // ES5 + Object.defineProperties( + Emitter.prototype, + { + emit: { + value: function (type, data) { + if (type in this._handlers) { + this._handlers[type].forEach(emit, data); + } + return this; + } + }, + on: { + value: function (type, handler) { + var list = this._getList(type); + list.indexOf(handler) < 0 && list.push(handler); + return this; + }, + } + off: { + value: function (type, handler) { + var list = this._getList(type), + i = list.indexOf(handler); + if (-1 < i) { + list.splice(i, 1); + if (!list.length) { + delete this._handlers[type]; + if (!Object.keys(this._handler).length) { + delete this._handlers; + } + } + } + return this; + } + }, + _getList: { + value: function (type) { + return this._handlers[type] || ( + this._handlers[type] = [] + ); + } + }, + _handlers: { + get: function () { + Object.defineProperty( + this, "_handlers", { + configurable: true, + value: {} + } + ); + return this._handlers; + } + } + } + ); + +#### Real World Example: A Safer Definition +While `Object.defineProperties(object, descriptorsList)` second argument loops only through `hasOwnProperty(key)`, once it comes to property definition, and the same is for `Object.defineProperty(obj, key, descriptor)`, the object used to described the property looks up for inherited properties too and consider them. + +Even if defaults are `{writable: false, enumerable: false, configurable: false}`, it's easy to make every property `enumerable` and `configurable` simply doing this: + + Object.prototype.configurable = true; + Object.prototype.enumerable = true; + +After above malicious piece of code, if you think a constant variable defined like this cannot be changed you are wrong: + + Object.defineProperty(window, "myLibrary", {value:myLibrary}); + +It is necessary indeed to ensure that defaults are written as well, making defaults meaningless because of inheritance, but even worse, if a malicious code will write `Object.prototype.writable = true` and there are getters or setters involved, these will all throw an exception because `writable` does not accept getters or setters. + +##### How To Prevent Problems in ES5 +In ES5 every descriptor should inherit from `null` otherwise no descriptor will be immune from possible attacks. + +Here an example of few problems we might want to avoid: + + // set up the nasty environment + Object.prototype.configurable = + Object.prototype.enumerable = + Object.prototype.writable = true; + + // verify that there are actually problems + try { + Object.defineProperty(this, "problem", {get: function () { + return "we gonna have bad time"; + }}); + } catch(o_O) { + console.log("ouch!"); + Object.defineProperty(this, "problem", {value:true}); + console.log(this.propertyIsEnumerable("problem")); // true + this.problem = {}; // no problems + delete this.problem; // true again + } + +Accordingly, every single descriptor should be created via `Object.crete(null)` so our code should look like + + function descriptor(object) { + // now don't take this wrong + // but this function is almost + // as big as the whole redefine.js library + // I would not go through this pattern + for (var + nullDescriptor = Object.create(null), + properties = [ + "configurable", + "enumerable", + "writable", + "get", + "set", + "value" + ], + i = properties.length; i--; + object.hasOwnProperty(properties[i]) && ( + nullDescriptor[properties[i]] = object[properties[i]] + ) + ); + return nullDescriptor; + } + + Object.defineProperty(this, "problem", descriptor({ + value: "now we talk" + })); + + this.propertyIsEnumerable("problem"); // false + this.problem = {}; // nope + delete this.problem; // false + this.problem; // "now we talk" + +Got it? Now ... + +##### How To Prevent Problems in redefine.js + + redefine(this, "problem", "solved"); + + this.propertyIsEnumerable("problem"); // false + this.problem = {}; // nope + delete this.problem; // false + this.problem; // "solved" + +If you are wondering about **performance** there are many things to consider behind `redefine.js` and one of these is that performance are really good for what it offers. + +While is usually slightly slower on desktop, `redefine.js` is [almost as fast in older Android 2.3 devices](http://jsperf.com/redefine-js) where performance matters the most. + +`redefine.js` is indeed suitable for mobile phones, even if quite old! + + + + + + + diff --git a/node_modules/redefine/LICENSE.txt b/node_modules/redefine/LICENSE.txt new file mode 100644 index 0000000..fcb09a4 --- /dev/null +++ b/node_modules/redefine/LICENSE.txt @@ -0,0 +1,19 @@ +Copyright (C) 2011 by Andrea Giammarchi, @WebReflection + +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. \ No newline at end of file diff --git a/node_modules/redefine/README.md b/node_modules/redefine/README.md new file mode 100644 index 0000000..9668faa --- /dev/null +++ b/node_modules/redefine/README.md @@ -0,0 +1,491 @@ +redefine.js +=========== +a lightweight yet powerful ES5 utility. + +[![build status](https://secure.travis-ci.org/WebReflection/redefine.png 'travis')](http://travis-ci.org/WebReflection/redefine) + +## Obsolete +The most updated, future proof, actively maintained, and widely compatible way to define classes is [es-class](https://github.com/WebReflection/es-class#es-class). + +If you are here to enrich prototypes, please have a look at `es-class`, it will most likely provide everything you need and much more. + +If you are here to be able to lazily assign properties to a generic object or prototype, please check [lazyval](https://github.com/WebReflection/lazyval#lazyval). + + + +### About Redefine JS +This ~1.5KB (minified and gzipped) framework brings the power of ES5 and ES6 features in node.js and all modern mobile or desktop browsers. + +Main features: + + * **ES6** like **classes** definition with extra power via `mixin` and `bound` magic + * **ES5** **properties** definition without descriptors paranoia and prolix syntax + * **ES3** **friendly** and mostly compatible + +All common tasks to organize your objects access, definition, and inheritance, can be achieved via `redefine.js` goodness. + +### Classes +One thing really frequent in JS world, one thing not so easy to get right if not familiar with ES5: the JavaScript **Class** concept from other OOP languages. + +Well, with tests included on top of all features, `redefine.Class(definition)` now offers a semantic utility to safely create classes in JavaScript. + +```JavaScript +var Lib = redefine.Class({ + + extend: SuperLib, // inheritance + + mixin: oneOrMoreObject, // mixin + Constructor + + statics: { // statics + someMethod: function () {}, + someProperty: 0 + }, + // common definition + method1: function () {}, + property1: null + + // constructor + constructor: function Lib() { + //implicit initialization + // never invoked if extended via other classes + } +}); +``` +All properties tested and fully covered, included the very special case where you want to use `this.super(argN)` in inherited methods or constructor. No performance impact if you don't use it, not a single problem if you are under strict code and don't want to allow `callback.caller` access, you use what you want/need when you want/need, how easy is that? Enjoy! (now back to the problem ...) + + +### The Problem +ES5 verbosity is not just annoying, is also *spaghetti prone*. The inability to group few descriptors together for one or more properties is inefficient too because of the amount of garbage we create at runtime to define all properties we need. + +```javascript +// classic ES5 syntax +Object.defineProperties( + SomeClass.prototype, + { + method: { + value: function () { + // the method + } + }, + property: { + enumerable: true, + value: "the property" + } + } +); +``` + +To define one method and one property we have used 3 extra objects: the properties wrapper, and each property descriptor. In case we were planning to make a list of properties all enumerable, as well as we could decide for writable or configurable, we would have repeated that pattern all over, resulting in a giant piece of JavaScript that will look like `enumerable:true` and nothing else. We also have some difficulty to understand what is each property about because the way we are familiar with is this one: + +```javascript +// the familiar JS approach +SomeClass.prototype = { + method: function () { + // the method + }, + property: "the property" +}; +``` + +Above snippet is not just more elegant and clean, is also better at runtime and much easier to read. In ES5, as example, when we see a function is not necessarily because that is a method, it might be a getter or setter too so we have to pay a lot of attention when we look at the code. + +### The Solution +So why cannot we have the best from both worlds? An easy to read and naturally understand syntax with the ability to switch ES5 power *on or off on demand*? + +```javascript +// redefine.js +redefine( + SomeClass.prototype, { + method: function () { + // the method + }, + property: "the property" +}); +``` + +The best part about `redefine.js` is its **ambiguity free** approach, granted by hidden classes understood at definition time, a technique that lets us switch `power on` when and if needed. As example, the very first `Object.definePropeties` snippet is not just setting properties, is also defining one of them as `enumerable`. + +```javascript +// identical to initial snippet +redefine( + SomeClass.prototype, { + method: function () { + // the method + }, + property: redefine.as({ + enumerable: true, + value: "the property" + }) +}); +``` + +The powerful simplified API lets us define **defaults** too, so imagine we want that all properties should be `configurable`, `enumerable`, and `writable` because we expect exactly same *ES3* behavior. This is what you would be forced to do in ES5: + +```javascript +// ES5 has no defaults +Object.defineProperties( + SomeClass.prototype, + { + method: { + configurable: true, + enumerable: true, + writable: true, + value: function () { + // the method + } + }, + property: { + configurable: true, + enumerable: true, + writable: true, + value: "the property" + } + } +); +``` + +It's kinda hard to tell anymore what is that code about, don't you agree? Now let's compare against `redefine()` + +```javascript +// redefine.js +redefine( + SomeClass.prototype, + { + method: function () { + // the method + }, + property: "the property" + }, + + // optional 3rd argument for defaults + { + configurable: true, + enumerable: true, + writable: true + } +); +``` + +We focus on the definition of our meant behavior, rather than on each descriptor property. If we apply defaults in groups, the code will be much more organized too. Bear in mind that defaults can be overwritten by semantic `redefine.as()` definition. + +```javascript +redefine( + object, + { + prop: as({ + enumerable: false, + value: theValue + }) + }, + { + enumerable: true + } +); +``` + +### A Simplified Object.create +We all have to consider that current descriptors verbosity and concept is ["*trolling*" major ECMAScript experts in the world](https://mail.mozilla.org/pipermail/es-discuss/2012-November/026716.html) too. `Object.create` is not natural for JS developers and it makes things more complex than ever. Same descriptors verbosity applied for what should be the `new function` substitute ... in this sense it was a failure! How about redefining objects from others? + +```javascript +// ES5 Object.create +var instance = Object.create( + sourceObject, + { + name: + { + value: "instance" + }, + age: + { + value: 34 + }, + toString: + { + value: function () { + // isn't the `this` ambiguous here ? + // I would expect to refer to the toString descriptor + return "Hi, I am " + this.name + ", and I am " this.age; + } + } + } +); + +// redefine.js +var instance = redefine.from( + sourceObject, + { + name: "instance", + age: 34, + toString: function () { + return "Hi, I am " + this.name + ", and I am " this.age; + } + } +); +``` + +I hope you agree that every time we define a method where `this` is used inside another context, as the descriptor is, looks so confusing! +The descriptor is just an object and it could be used differently in other pieces of logic so that if invoked a part everything will fail there. + +In few words, `redefine.js` can also be **less ambiguous** than ES5! + +### Lazy Property Definition Pattern Included +I have described this pattern in [The Power Of Getters](http://webreflection.blogspot.com/2013/01/the-power-of-getters.html) entry in my blog. + +However, these two comments left me with too many thoughts about ES5 and the fact that really is not easy to understand for developers. + +> **Adrien Risser** ... Andrea, every post of yours is a brainfuck! Understanding barely most of what you describe, I can't say I see how I would use all of or just a part of it in any project of mine. + +or even worst ... + +> **jonz** ... Right now this *syntax seems like obfuscation but the patterns it supports are what I've always wanted*, I wonder if it will ever become familiar. + +So you are right guys, the way ES5 lets us implement amazing new patterns and possibilities is even hard to understand or imagine. This is why `redefine.js` comes with a pattern many other programming languages can only dream about: the memory efficient and performance oriented **inherited getter replaced on demand with a direct property access**! (BOOM, I know your mind just blown!) + +```javascript +// what you would do today in ES3 classes +function MyClass() { + this.handlersIMightNeed = {}; + this.propertiesIMightLookFor = []; + this.stuffNotSureIfEvenUse = {}; + this.methodThatShouldBindWhenNeeded = + this.method.bind(this); +} +``` + +Above snippet creates 4 extra objects per each instance of `MyClass`. This is a [memory disaster prone approach plus is really slow during instance creation](http://jsperf.com/the-power-of-getters-element) you can easily compare checking the *Element_Getter* results across all browsers and engines. We also force our syntax to be ES3 because if the prototype of MyClass would have been defined via `Object.defineProperties()` and these were not `configurable` or `writable`, this is what we should really do in order to have an equivalent behavior in our code. + +```javascript +// what we should do if MyClass.prototype +// was defined with these properties as defaults +function MyClass() { + Object.defineProperty(this, + "handlersIMightNeed", {value: {}}); + Object.defineProperty(this, + "propertiesIMightLookFor", {value: []}); + Object.defineProperty(this, + "stuffNotSureIfEvenUse", {value: {}}); + Object.defineProperty(this, + "methodThatShouldBindWhenNeeded", + {value: this.method.bind(this)}); +} +``` + +This ain't going anywhere, and this is why ES5 is keeping developers far away from its goodness. So, how about `redefine.later()` to obtain the desired pattern ? + +```javascript +var later = redefine.later; +// redefine.js lazy getter replacement +function MyClass(){ + // nothing to do here + // it cannot be faster! +} +redefine( + MyClass.prototype, + { + handlersIMightNeed: later(function(){ + return {}; + }), + propertiesIMightLookFor: later(function(){ + return []; + }), + stuffNotSureIfEvenUse: later(function(){ + return {}; + }), + methodThatShouldBindWhenNeeded: later(function(){ + return this.method.bind(this); + }) + } +); +``` + +There, a **zero costs** runtime instance creation where all those properties will be assigned as direct properties, rather than getters, when and only if the instance is using, or better, accessing them. These properties are also all deletable by default, unless specified differently, so that it's easy to reset hard a property and reassign it later on when, and if, needed. + +### More Robust Than ES5 +There is a potential hole in ES5 specifications about descriptors, inherited properties are considered too. This is an example of how to destroy any library I know based on ES5: + +```javascript +// malicious code +Object.prototype.get = function screwed(){ + // deal with it +}; +Object.prototype.configurable = +Object.prototype.enumerable = +Object.prototype.writable = true; + +// your code +var o = Object.defineProperty({}, "key", {value: "value"}); +``` + +**TypeError** `Invalid property. 'value' present on property with getter or setter.` + +This would never happen in `redefine.js` world. + +```javascript +var o = redefine({}, "key", "value"); +o.key; // "value", all good +``` + +Happy coding! + +### API + +#### redefine(obj, properties) +This is the main function and the only exported object. It does basically one thing but it has different overloads to do that: + + * `redefine(obj:Object, key:string, value:any[, defaults:Object]):Object`, returns the first argument and define a value straight forward using ES5 defaults unless specified differently. +This signature has these two kind of overloads + * `redefine(obj:Object, key:string, value:As[, defaults:Object]):Object`, returns the first argument and define a property `key` using `redefine.as({descriptor})` as value descriptor. `As` is an internal, private, class that overrides any default, if specified, or inherited behavior. + * `redefine(obj:Object, key:string, value:Later[, defaults:Object]):Object`, returns the first argument and define a property `key` as lazily accessed and replaced as direct property that could be deleted at any time in order to reuse the inherited getter. `Later` is an internal, private, class that overrides any default, if specified, or inherited behavior. + * `redefine(obj:Object, properties:Object[, defaults:Object])`, returns the first argument, it does exactly what other overloads do in this case looping through own properties in the specified `properties` Object. + +#### redefine.from(proto) +This semantic method is similar to ES5 `Object.create` except descriptors are those accepted by `redefine()` and `defaults` can be used as well. + + * `redefine.from(source:object[, properties:Object[, defaults:Object]]):Object` returns a new instance where `source.isPrototypeOf(returnedObject)`. Please note `null` is possible too and the second argument, optional as optional is the third one, can be used to redefine properties. + * `redefine.from(Class:Function[, properties:Object[, defaults:Object]]):Object` returns an `instanceof Class`, using `Class.prototype` as extend. + +Here an example: + +```javascript +var son = redefine.from( + ClassName, {age: 123} +); +son.age; // 123 +son instanceof ClassName; // true +ClassName.prototype.isPrototypeOf(son); // true +``` + +Creating instances from classes is the most common pattern in JS but if it's really needed to extend a function , rather than its prototype, this method is not the best one but it's possible to hack this behavior, if really needed, in an ugly way such `function df(){} df.prototype = Class; var o = redefine.from(df);`. Highly discouraged, user defined instance of functions cannot be even invoked, just saying... + +#### redefine.as(descriptor) +This semantic method returns an `instanceof As` with properties specified in the `descriptor` addressed once at initialization time. + +```javascript +var ES3Like = redefine.as({ + enumerable: true, + configurable: true, + writable: true +}); + +// later on, reused to define all ES3 classes +redefine( + MyES3Class.prototype, + {... all properties here ...}, + ES3Like // as defaults +); +``` + +#### redefine.later(Object) +This semantic method returns an `instanceof Later` object which aim is to be recognized later on in order to define a lazy getter replacement with direct property access pattern, an innovative pattern described in [The Power Of Getters](http://webreflection.blogspot.com/2013/01/the-power-of-getters.html) post. + +```javascript +var setAsObjectLaterOn = redefine.later(function (){ + return {}; +}); + +// in some class +redefine( + MyEvent.prototype, + { + handlers: setAsObjectLaterOn + } +); + +// so that no property is created runtime +var me = new MyEvent; +// but only, and once, when/if needed +me.handlers.test = listener; +``` + +It is possible to use a descriptor in order to overwrite the default configuration for this use case which is `{configurable:true, writable:false, enumerable:false}`. In this case, the `value` should be the callback able to return the lazily defined property. + +```javascript +var setAsObjectLaterOn = redefine.later({ + writable: true, //we want be able to change it later on + enumerable: true, // shows up in for/in loops + configurable: false,// once define there's no way to delete it + value: function (){ + return {}; + } +}); +``` + +I see what you are thinking about: "*What? How can those properties have value and writable if we are defining a getter?*" Did I mention this method is called `later()` because is later that the property is define through the inherited getter ? :-) + +#### redefine.using(descriptor) +This is to simplify partial implementations. As example, to use redefine to create enumerable properties: + +```javascript +var enumerable = redefine.using({ + enumerable: true +}); + +// any property we want +var o = enumerable({}, "test", 123); +o.propertyIsEnumerable("test"); // true +o.test; // 123 +```` + +### Libraries Compatibility +The `redefine.js` API is compatible with [Underscore](http://underscorejs.org) and [Lo-Dash](http://lodash.com) too as `_.redefine` utility. Bear in mind, **you don't need these libraries** at all, in fact `redefine.js` is completely dependencies free but in order to avoid global scope pollution the `redefine` function is defined into a global `_` object. If this is not present it is created, while if it's already there, is simply enriched. + +In *node.js* you can use require + + npm install redefine + +```javascript +var + redefine = require('redefine'), + // redefine = require('redefine').redefine, works too + as = redefine.as, + from = redefine.from, + later = redefine.later +; +``` + +### Browsers And Engines Compatibility +It is possible to enhance redefine targets using some partial polyfill of ES5 `Object` methods such `create` or [inherit](https://gist.github.com/4397807) and `defineProperty`. However, this library is targeting all browsers supported by [jQuery 2.0](http://blog.jquery.com/2012/07/01/jquery-1-9-and-2-0-tldr-edition/) so here the list: + + * Internet Explorer 9 and greater + * Chrome, and mobile + * Firefox, and mobile + * Opera, and mobile + * Safari, and mobile + * Webkit stock browsers for mobile + * node.js + * Rhino + +Other server side engines such **Ringo** should be supported too since these are compatible with ES5 and ES5.1. The best way to know if your device, browser, or server side JS engine is working is to [grab wru](https://github.com/WebReflection/wru) and run those tests :-) + + +### 100% Code Coverage +You can check examples and all tests to `redefine()`, `redefine.as(descriptr)`, `redefine.later(function value(){})`, or `redefine.from(proto)` in [this redefine.js file](https://github.com/WebReflection/redefine/blob/master/test/redefine.js). + +To launch tests in **node.js** simply this: + + npm install wru + wru test/redefine.js + +To launch tests in any browser simply do `open test.html` in OSX or just double click the test.html file. If your browser needs a web server in order to load files locally, simply this: + + npm install polpetta + polpetta ./ + +then check [your localhost/test.html](http://127.0.0.1:1337/test.html) page and it should be green. + + +### Shut Up And Give Me Code ! +You can find the [source code here](https://github.com/WebReflection/redefine/blob/master/src/redefine.js) and the [minified version here](https://github.com/WebReflection/redefine/blob/master/build/redefine.js). + +As you can see, once minzipped the library is **about 0.6 KB** and for an easier life enriched with new patterns I think is hard to expect a lighter utility. + +### De Facto Targets +These are those situations where you might want to use `redefine.js` + + * `node.js` development, or generally speaking any ES5 capable server side environment. The fact `redefine.js` is more robust should be an extra reason to adopt it. + * Smartphones, since nowadays, all of them support ES5 + * modern desktop browsers and modern libraries + +Enjoy! + diff --git a/node_modules/redefine/build/redefine.js b/node_modules/redefine/build/redefine.js new file mode 100644 index 0000000..689ecb7 --- /dev/null +++ b/node_modules/redefine/build/redefine.js @@ -0,0 +1,2 @@ +/*! (C) WebReflection Mit Style License */ +var _=this._=function(e,t,n){function q(e,t){for(var n={},r=T(e),i=0,s=r.length,o;i=0.2.0 <0.3.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/umzug" + ] + ], + "_from": "redefine@>=0.2.0 <0.3.0", + "_id": "redefine@0.2.1", + "_inCache": true, + "_location": "/redefine", + "_nodeVersion": "0.12.7", + "_npmUser": { + "name": "webreflection", + "email": "andrea.giammarchi@gmail.com" + }, + "_npmVersion": "2.13.2", + "_phantomChildren": {}, + "_requested": { + "raw": "redefine@^0.2.0", + "scope": null, + "escapedName": "redefine", + "name": "redefine", + "rawSpec": "^0.2.0", + "spec": ">=0.2.0 <0.3.0", + "type": "range" + }, + "_requiredBy": [ + "/umzug" + ], + "_resolved": "https://registry.npmjs.org/redefine/-/redefine-0.2.1.tgz", + "_shasum": "e89ee7a6f24d19fff62590569332dc60380a89a3", + "_shrinkwrap": null, + "_spec": "redefine@^0.2.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/umzug", + "author": { + "name": "Andrea Giammarchi", + "email": "andrea.giammarchi@gmail.com", + "url": "http://webreflection.blogspot.com/" + }, + "bugs": { + "url": "https://github.com/WebReflection/redefine/issues" + }, + "dependencies": {}, + "description": "A lightweight utility for ES6 like classes and an easier ES5 aware object properties definition introducing new, performance oriented, patterns.", + "devDependencies": { + "wru": ">= 0.0.0" + }, + "directories": {}, + "dist": { + "shasum": "e89ee7a6f24d19fff62590569332dc60380a89a3", + "tarball": "https://registry.npmjs.org/redefine/-/redefine-0.2.1.tgz" + }, + "engines": [ + "node", + "rhino" + ], + "gitHead": "7e8037c729e4ed8219ea06716582f3b913ab6420", + "homepage": "https://github.com/WebReflection/redefine", + "keywords": [ + "super", + "ES5", + "ES6", + "defineProperty", + "defineProperties", + "Object", + "create", + "inheritance", + "security", + "bind", + "bound", + "lazy", + "performance", + "safe", + "mixin", + "Class", + "OOP" + ], + "licenses": [ + { + "type": "MIT", + "url": "http://mths.be/mit" + } + ], + "main": "./build/redefine.js", + "maintainers": [ + { + "name": "webreflection", + "email": "andrea.giammarchi@gmail.com" + } + ], + "name": "redefine", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/WebReflection/redefine.git" + }, + "scripts": { + "test": "node test/.test.js" + }, + "version": "0.2.1" +} diff --git a/node_modules/redefine/template/license.after b/node_modules/redefine/template/license.after new file mode 100644 index 0000000..d7365df --- /dev/null +++ b/node_modules/redefine/template/license.after @@ -0,0 +1,2 @@ + +*/ diff --git a/node_modules/redefine/template/license.before b/node_modules/redefine/template/license.before new file mode 100644 index 0000000..bf11147 --- /dev/null +++ b/node_modules/redefine/template/license.before @@ -0,0 +1 @@ +/*! diff --git a/node_modules/regex-cache/LICENSE b/node_modules/regex-cache/LICENSE new file mode 100644 index 0000000..1e49edf --- /dev/null +++ b/node_modules/regex-cache/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2016, Jon Schlinkert. + +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. diff --git a/node_modules/regex-cache/README.md b/node_modules/regex-cache/README.md new file mode 100644 index 0000000..ab19174 --- /dev/null +++ b/node_modules/regex-cache/README.md @@ -0,0 +1,160 @@ +# regex-cache [![NPM version](https://img.shields.io/npm/v/regex-cache.svg?style=flat)](https://www.npmjs.com/package/regex-cache) [![NPM downloads](https://img.shields.io/npm/dm/regex-cache.svg?style=flat)](https://npmjs.org/package/regex-cache) [![Build Status](https://img.shields.io/travis/jonschlinkert/regex-cache.svg?style=flat)](https://travis-ci.org/jonschlinkert/regex-cache) + +> Memoize the results of a call to the RegExp constructor, avoiding repetitious runtime compilation of the same string and options, resulting in suprising performance improvements. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install regex-cache --save +``` + +* Read [what this does](#what-this-does). +* See [the benchmarks](#benchmarks) + +## Usage + +Wrap a function like this: + +```js +var cache = require('regex-cache'); +var someRegex = cache(require('some-regex-lib')); +``` + +**Caching a regex** + +If you want to cache a regex after calling `new RegExp()`, or you're requiring a module that returns a regex, wrap it with a function first: + +```js +var cache = require('regex-cache'); + +function yourRegex(str, opts) { + // do stuff to str and opts + return new RegExp(str, opts.flags); +} + +var regex = cache(yourRegex); +``` + +## Recommendations + +### Use this when... + +* **No options are passed** to the function that creates the regex. Regardless of how big or small the regex is, when zero options are passed, caching will be faster than not. +* **A few options are passed**, and the values are primitives. The limited benchmarks I did show that caching is beneficial when up to 8 or 9 options are passed. + +### Do not use this when... + +* **The values of options are not primitives**. When non-primitives must be compared for equality, the time to compare the options is most likely as long or longer than the time to just create a new regex. + +### Example benchmarks + +Performance results, with and without regex-cache: + +```bash +# no args passed (defaults) + with-cache x 8,699,231 ops/sec ±0.86% (93 runs sampled) + without-cache x 2,777,551 ops/sec ±0.63% (95 runs sampled) + +# string and six options passed + with-cache x 1,885,934 ops/sec ±0.80% (93 runs sampled) + without-cache x 1,256,893 ops/sec ±0.65% (97 runs sampled) + +# string only + with-cache x 7,723,256 ops/sec ±0.87% (92 runs sampled) + without-cache x 2,303,060 ops/sec ±0.47% (99 runs sampled) + +# one option passed + with-cache x 4,179,877 ops/sec ±0.53% (100 runs sampled) + without-cache x 2,198,422 ops/sec ±0.47% (95 runs sampled) + +# two options passed + with-cache x 3,256,222 ops/sec ±0.51% (99 runs sampled) + without-cache x 2,121,401 ops/sec ±0.79% (97 runs sampled) + +# six options passed + with-cache x 1,816,018 ops/sec ±1.08% (96 runs sampled) + without-cache x 1,157,176 ops/sec ±0.53% (100 runs sampled) + +# +# diminishing returns happen about here +# + +# ten options passed + with-cache x 1,210,598 ops/sec ±0.56% (92 runs sampled) + without-cache x 1,665,588 ops/sec ±1.07% (100 runs sampled) + +# twelve options passed + with-cache x 1,042,096 ops/sec ±0.68% (92 runs sampled) + without-cache x 1,389,414 ops/sec ±0.68% (97 runs sampled) + +# twenty options passed + with-cache x 661,125 ops/sec ±0.80% (93 runs sampled) + without-cache x 1,208,757 ops/sec ±0.65% (97 runs sampled) + +# +# when non-primitive values are compared +# + +# single value on the options is an object + with-cache x 1,398,313 ops/sec ±1.05% (95 runs sampled) + without-cache x 2,228,281 ops/sec ±0.56% (99 runs sampled) +``` + +## Run benchmarks + +Install dev dependencies: + +```bash +npm i -d && npm run benchmarks +``` + +## What this does + +If you're using `new RegExp('foo')` instead of a regex literal, it's probably because you need to dyamically generate a regex based on user options or some other potentially changing factors. + +When your function creates a string based on user inputs and passes it to the `RegExp` constructor, regex-cache caches the results. The next time the function is called if the key of a cached regex matches the user input (or no input was given), the cached regex is returned, avoiding unnecessary runtime compilation. + +Using the RegExp constructor offers a lot of flexibility, but the runtime compilation comes at a price - it's slow. Not specifically because of the call to the RegExp constructor, but **because you have to build up the string before `new RegExp()` is even called**. +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/regex-cache/issues/new). + +## Building docs + +Generate readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install verb && npm run docs +``` + +Or, if [verb](https://github.com/verbose/verb) is installed globally: + +```sh +$ verb +``` + +## Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +## Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/regex-cache/blob/master/LICENSE). + +*** + +_This file was generated by [verb](https://github.com/verbose/verb), v, on April 01, 2016._ \ No newline at end of file diff --git a/node_modules/regex-cache/index.js b/node_modules/regex-cache/index.js new file mode 100644 index 0000000..13d2022 --- /dev/null +++ b/node_modules/regex-cache/index.js @@ -0,0 +1,69 @@ +/*! + * regex-cache + * + * Copyright (c) 2015 Jon Schlinkert. + * Licensed under the MIT license. + */ + +'use strict'; + +var isPrimitive = require('is-primitive'); +var equal = require('is-equal-shallow'); +var basic = {}; +var cache = {}; + +/** + * Expose `regexCache` + */ + +module.exports = regexCache; + +/** + * Memoize the results of a call to the new RegExp constructor. + * + * @param {Function} fn [description] + * @param {String} str [description] + * @param {Options} options [description] + * @param {Boolean} nocompare [description] + * @return {RegExp} + */ + +function regexCache(fn, str, opts) { + var key = '_default_', regex, cached; + + if (!str && !opts) { + if (typeof fn !== 'function') { + return fn; + } + return basic[key] || (basic[key] = fn(str)); + } + + var isString = typeof str === 'string'; + if (isString) { + if (!opts) { + return basic[str] || (basic[str] = fn(str)); + } + key = str; + } else { + opts = str; + } + + cached = cache[key]; + if (cached && equal(cached.opts, opts)) { + return cached.regex; + } + + memo(key, opts, (regex = fn(str, opts))); + return regex; +} + +function memo(key, opts, regex) { + cache[key] = {regex: regex, opts: opts}; +} + +/** + * Expose `cache` + */ + +module.exports.cache = cache; +module.exports.basic = basic; diff --git a/node_modules/regex-cache/package.json b/node_modules/regex-cache/package.json new file mode 100644 index 0000000..6f3efc0 --- /dev/null +++ b/node_modules/regex-cache/package.json @@ -0,0 +1,131 @@ +{ + "_args": [ + [ + { + "raw": "regex-cache@^0.4.2", + "scope": null, + "escapedName": "regex-cache", + "name": "regex-cache", + "rawSpec": "^0.4.2", + "spec": ">=0.4.2 <0.5.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/micromatch" + ] + ], + "_from": "regex-cache@>=0.4.2 <0.5.0", + "_id": "regex-cache@0.4.3", + "_inCache": true, + "_location": "/regex-cache", + "_nodeVersion": "5.5.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/regex-cache-0.4.3.tgz_1459536604904_0.22530420310795307" + }, + "_npmUser": { + "name": "jonschlinkert", + "email": "github@sellside.com" + }, + "_npmVersion": "3.6.0", + "_phantomChildren": {}, + "_requested": { + "raw": "regex-cache@^0.4.2", + "scope": null, + "escapedName": "regex-cache", + "name": "regex-cache", + "rawSpec": "^0.4.2", + "spec": ">=0.4.2 <0.5.0", + "type": "range" + }, + "_requiredBy": [ + "/micromatch" + ], + "_resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz", + "_shasum": "9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145", + "_shrinkwrap": null, + "_spec": "regex-cache@^0.4.2", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/micromatch", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/regex-cache/issues" + }, + "dependencies": { + "is-equal-shallow": "^0.1.3", + "is-primitive": "^2.0.0" + }, + "description": "Memoize the results of a call to the RegExp constructor, avoiding repetitious runtime compilation of the same string and options, resulting in suprising performance improvements.", + "devDependencies": { + "benchmarked": "^0.1.5", + "chalk": "^1.1.3", + "gulp-format-md": "^0.1.7", + "micromatch": "^2.3.7", + "should": "^8.3.0" + }, + "directories": {}, + "dist": { + "shasum": "9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145", + "tarball": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "06ce46bda29a19064a968bd5d2d5596440be05ca", + "homepage": "https://github.com/jonschlinkert/regex-cache", + "keywords": [ + "cache", + "expression", + "regex", + "regexp", + "regular", + "regular expression", + "store", + "to-regex" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "jonschlinkert", + "email": "github@sellside.com" + }, + { + "name": "doowb", + "email": "brian.woodward@gmail.com" + } + ], + "name": "regex-cache", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/regex-cache.git" + }, + "scripts": { + "benchmarks": "node benchmark", + "test": "mocha" + }, + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "reflinks": [ + "verb" + ], + "lint": { + "reflinks": true + } + }, + "version": "0.4.3" +} diff --git a/node_modules/remove-trailing-separator/history.md b/node_modules/remove-trailing-separator/history.md new file mode 100644 index 0000000..a9ca222 --- /dev/null +++ b/node_modules/remove-trailing-separator/history.md @@ -0,0 +1,9 @@ +## History + +### 1.0.1 - 25th Sep 2016 + +- [b78606d](https://github.com/darsain/remove-trailing-separator/commit/af90b4e153a4527894741af6c7005acaeb78606d) Remove backslash only on win32 systems + +### 1.0.0 - 24th Sep 2016 + +Initial release. \ No newline at end of file diff --git a/node_modules/remove-trailing-separator/index.js b/node_modules/remove-trailing-separator/index.js new file mode 100644 index 0000000..1ed8e93 --- /dev/null +++ b/node_modules/remove-trailing-separator/index.js @@ -0,0 +1,13 @@ +const isWin = process.platform === 'win32'; + +module.exports = function (str) { + while (endsInSeparator(str)) { + str = str.slice(0, -1); + } + return str; +}; + +function endsInSeparator(str) { + var last = str[str.length - 1]; + return str.length > 1 && (last === '/' || (isWin && last === '\\')); +} diff --git a/node_modules/remove-trailing-separator/license b/node_modules/remove-trailing-separator/license new file mode 100644 index 0000000..a169aff --- /dev/null +++ b/node_modules/remove-trailing-separator/license @@ -0,0 +1,3 @@ +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. \ No newline at end of file diff --git a/node_modules/remove-trailing-separator/package.json b/node_modules/remove-trailing-separator/package.json new file mode 100644 index 0000000..a4ba35d --- /dev/null +++ b/node_modules/remove-trailing-separator/package.json @@ -0,0 +1,100 @@ +{ + "_args": [ + [ + { + "raw": "remove-trailing-separator@^1.0.1", + "scope": null, + "escapedName": "remove-trailing-separator", + "name": "remove-trailing-separator", + "rawSpec": "^1.0.1", + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/normalize-path" + ] + ], + "_from": "remove-trailing-separator@>=1.0.1 <2.0.0", + "_id": "remove-trailing-separator@1.0.1", + "_inCache": true, + "_location": "/remove-trailing-separator", + "_nodeVersion": "6.4.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/remove-trailing-separator-1.0.1.tgz_1474797962066_0.45308714639395475" + }, + "_npmUser": { + "name": "darsain", + "email": "darsain@gmail.com" + }, + "_npmVersion": "3.10.5", + "_phantomChildren": {}, + "_requested": { + "raw": "remove-trailing-separator@^1.0.1", + "scope": null, + "escapedName": "remove-trailing-separator", + "name": "remove-trailing-separator", + "rawSpec": "^1.0.1", + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/normalize-path" + ], + "_resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.0.1.tgz", + "_shasum": "615ebb96af559552d4bf4057c8436d486ab63cc4", + "_shrinkwrap": null, + "_spec": "remove-trailing-separator@^1.0.1", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/normalize-path", + "author": { + "name": "darsain" + }, + "bugs": { + "url": "https://github.com/darsain/remove-trailing-separator/issues" + }, + "dependencies": {}, + "description": "Removes separators from the end of the string.", + "devDependencies": { + "ava": "^0.16.0", + "coveralls": "^2.11.14", + "nyc": "^8.3.0", + "xo": "^0.16.0" + }, + "directories": {}, + "dist": { + "shasum": "615ebb96af559552d4bf4057c8436d486ab63cc4", + "tarball": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.0.1.tgz" + }, + "files": [ + "index.js" + ], + "gitHead": "8a5da3ac1efb1314d55e50a2a923b068d500d77a", + "homepage": "https://github.com/darsain/remove-trailing-separator#readme", + "keywords": [ + "remove", + "strip", + "trailing", + "separator" + ], + "license": "ISC", + "main": "index.js", + "maintainers": [ + { + "name": "darsain", + "email": "darsain@gmail.com" + } + ], + "name": "remove-trailing-separator", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/darsain/remove-trailing-separator.git" + }, + "scripts": { + "lint": "xo", + "pretest": "npm run lint", + "report": "nyc report --reporter=html", + "test": "nyc ava" + }, + "version": "1.0.1" +} diff --git a/node_modules/remove-trailing-separator/readme.md b/node_modules/remove-trailing-separator/readme.md new file mode 100644 index 0000000..8c643d4 --- /dev/null +++ b/node_modules/remove-trailing-separator/readme.md @@ -0,0 +1,51 @@ +# remove-trailing-separator + +[![NPM version][npm-img]][npm-url] [![Build Status: Linux][travis-img]][travis-url] [![Build Status: Windows][appveyor-img]][appveyor-url] [![Coverage Status][coveralls-img]][coveralls-url] + +Removes all separators from the end of a string. + +## Install + +``` +npm install remove-trailing-separator +``` + +## Examples + +```js +const removeTrailingSeparator = require('remove-trailing-separator'); + +removeTrailingSeparator('/foo/bar/') // '/foo/bar' +removeTrailingSeparator('/foo/bar///') // '/foo/bar' + +// leaves only/last separator +removeTrailingSeparator('/') // '/' +removeTrailingSeparator('///') // '/' + +// returns empty string +removeTrailingSeparator('') // '' +``` + +## Backslash, or win32 separator + +`\` is considered a separator only on WIN32 systems. All UNIX compliant systems +see backslash as a valid file name character, so it would break UNIX compliance +to remove it there. + +In practice, this means that this code will return different things depending on +what system it runs on: + +``` +removeTrailingSeparator('\\foo\\') +// UNIX => '\\foo\\' +// WIN32 => '\\foo' +``` + +[npm-url]: https://npmjs.org/package/remove-trailing-separator +[npm-img]: https://badge.fury.io/js/remove-trailing-separator.svg +[travis-url]: https://travis-ci.org/darsain/remove-trailing-separator +[travis-img]: https://travis-ci.org/darsain/remove-trailing-separator.svg?branch=master +[appveyor-url]: https://ci.appveyor.com/project/darsain/remove-trailing-separator/branch/master +[appveyor-img]: https://ci.appveyor.com/api/projects/status/wvg9a93rrq95n2xl/branch/master?svg=true +[coveralls-url]: https://coveralls.io/github/darsain/remove-trailing-separator?branch=master +[coveralls-img]: https://coveralls.io/repos/github/darsain/remove-trailing-separator/badge.svg?branch=master \ No newline at end of file diff --git a/node_modules/repeat-element/LICENSE b/node_modules/repeat-element/LICENSE new file mode 100644 index 0000000..33754da --- /dev/null +++ b/node_modules/repeat-element/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jon Schlinkert + +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. diff --git a/node_modules/repeat-element/README.md b/node_modules/repeat-element/README.md new file mode 100644 index 0000000..008e20e --- /dev/null +++ b/node_modules/repeat-element/README.md @@ -0,0 +1,71 @@ +# repeat-element [![NPM version](https://badge.fury.io/js/repeat-element.svg)](http://badge.fury.io/js/repeat-element) + +> Create an array by repeating the given value n times. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```bash +npm i repeat-element --save +``` + +## Usage + +```js +var repeat = require('repeat-element'); + +repeat('a', 5); +//=> ['a', 'a', 'a', 'a', 'a'] + +repeat('a', 1); +//=> ['a'] + +repeat('a', 0); +//=> [] + +repeat(null, 5) +//» [ null, null, null, null, null ] + +repeat({some: 'object'}, 5) +//» [ { some: 'object' }, +// { some: 'object' }, +// { some: 'object' }, +// { some: 'object' }, +// { some: 'object' } ] + +repeat(5, 5) +//» [ 5, 5, 5, 5, 5 ] +``` + +## Related projects + +[repeat-string](https://github.com/jonschlinkert/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. + +## Running tests + +Install dev dependencies: + +```bash +npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/repeat-element/issues) + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright (c) 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on May 06, 2015._ diff --git a/node_modules/repeat-element/index.js b/node_modules/repeat-element/index.js new file mode 100644 index 0000000..0ad45ab --- /dev/null +++ b/node_modules/repeat-element/index.js @@ -0,0 +1,18 @@ +/*! + * repeat-element + * + * Copyright (c) 2015 Jon Schlinkert. + * Licensed under the MIT license. + */ + +'use strict'; + +module.exports = function repeat(ele, num) { + var arr = new Array(num); + + for (var i = 0; i < num; i++) { + arr[i] = ele; + } + + return arr; +}; diff --git a/node_modules/repeat-element/package.json b/node_modules/repeat-element/package.json new file mode 100644 index 0000000..df28b80 --- /dev/null +++ b/node_modules/repeat-element/package.json @@ -0,0 +1,102 @@ +{ + "_args": [ + [ + { + "raw": "repeat-element@^1.1.2", + "scope": null, + "escapedName": "repeat-element", + "name": "repeat-element", + "rawSpec": "^1.1.2", + "spec": ">=1.1.2 <2.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/braces" + ] + ], + "_from": "repeat-element@>=1.1.2 <2.0.0", + "_id": "repeat-element@1.1.2", + "_inCache": true, + "_location": "/repeat-element", + "_nodeVersion": "0.12.0", + "_npmUser": { + "name": "jonschlinkert", + "email": "github@sellside.com" + }, + "_npmVersion": "2.5.1", + "_phantomChildren": {}, + "_requested": { + "raw": "repeat-element@^1.1.2", + "scope": null, + "escapedName": "repeat-element", + "name": "repeat-element", + "rawSpec": "^1.1.2", + "spec": ">=1.1.2 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/braces", + "/fill-range" + ], + "_resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", + "_shasum": "ef089a178d1483baae4d93eb98b4f9e4e11d990a", + "_shrinkwrap": null, + "_spec": "repeat-element@^1.1.2", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/braces", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/repeat-element/issues" + }, + "dependencies": {}, + "description": "Create an array by repeating the given value n times.", + "devDependencies": { + "benchmarked": "^0.1.4", + "chalk": "^1.0.0", + "glob": "^5.0.5", + "minimist": "^1.1.1", + "mocha": "^2.2.4" + }, + "directories": {}, + "dist": { + "shasum": "ef089a178d1483baae4d93eb98b4f9e4e11d990a", + "tarball": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "7a6b21d58eafcc44fc8de133c70a8398ee9fdd8d", + "homepage": "https://github.com/jonschlinkert/repeat-element", + "keywords": [ + "array", + "element", + "repeat", + "string" + ], + "license": { + "type": "MIT", + "url": "https://github.com/jonschlinkert/repeat-element/blob/master/LICENSE" + }, + "main": "index.js", + "maintainers": [ + { + "name": "jonschlinkert", + "email": "github@sellside.com" + } + ], + "name": "repeat-element", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/jonschlinkert/repeat-element.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "1.1.2" +} diff --git a/node_modules/repeat-string/LICENSE b/node_modules/repeat-string/LICENSE new file mode 100644 index 0000000..39245ac --- /dev/null +++ b/node_modules/repeat-string/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2016, Jon Schlinkert. + +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. diff --git a/node_modules/repeat-string/README.md b/node_modules/repeat-string/README.md new file mode 100644 index 0000000..aaa5e91 --- /dev/null +++ b/node_modules/repeat-string/README.md @@ -0,0 +1,136 @@ +# repeat-string [![NPM version](https://img.shields.io/npm/v/repeat-string.svg?style=flat)](https://www.npmjs.com/package/repeat-string) [![NPM monthly downloads](https://img.shields.io/npm/dm/repeat-string.svg?style=flat)](https://npmjs.org/package/repeat-string) [![NPM total downloads](https://img.shields.io/npm/dt/repeat-string.svg?style=flat)](https://npmjs.org/package/repeat-string) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/repeat-string.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/repeat-string) + +> Repeat the given string n times. Fastest implementation for repeating a string. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save repeat-string +``` + +## Usage + +### [repeat](index.js#L41) + +Repeat the given `string` the specified `number` of times. + +**Example:** + +**Example** + +```js +var repeat = require('repeat-string'); +repeat('A', 5); +//=> AAAAA +``` + +**Params** + +* `string` **{String}**: The string to repeat +* `number` **{Number}**: The number of times to repeat the string +* `returns` **{String}**: Repeated string + +## Benchmarks + +Repeat string is significantly faster than the native method (which is itself faster than [repeating](https://github.com/sindresorhus/repeating)): + +```sh +# 2x +repeat-string █████████████████████████ (26,953,977 ops/sec) +repeating █████████ (9,855,695 ops/sec) +native ██████████████████ (19,453,895 ops/sec) + +# 3x +repeat-string █████████████████████████ (19,445,252 ops/sec) +repeating ███████████ (8,661,565 ops/sec) +native ████████████████████ (16,020,598 ops/sec) + +# 10x +repeat-string █████████████████████████ (23,792,521 ops/sec) +repeating █████████ (8,571,332 ops/sec) +native ███████████████ (14,582,955 ops/sec) + +# 50x +repeat-string █████████████████████████ (23,640,179 ops/sec) +repeating █████ (5,505,509 ops/sec) +native ██████████ (10,085,557 ops/sec) + +# 250x +repeat-string █████████████████████████ (23,489,618 ops/sec) +repeating ████ (3,962,937 ops/sec) +native ████████ (7,724,892 ops/sec) + +# 2000x +repeat-string █████████████████████████ (20,315,172 ops/sec) +repeating ████ (3,297,079 ops/sec) +native ███████ (6,203,331 ops/sec) + +# 20000x +repeat-string █████████████████████████ (23,382,915 ops/sec) +repeating ███ (2,980,058 ops/sec) +native █████ (5,578,808 ops/sec) +``` + +**Run the benchmarks** + +Install dev dependencies: + +```sh +npm i -d && node benchmark +``` + +## About + +### Related projects + +[repeat-element](https://www.npmjs.com/package/repeat-element): Create an array by repeating the given value n times. | [homepage](https://github.com/jonschlinkert/repeat-element "Create an array by repeating the given value n times.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor**
    | +| --- | --- | +| 51 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [LinusU](https://github.com/LinusU) | +| 2 | [tbusser](https://github.com/tbusser) | +| 1 | [doowb](https://github.com/doowb) | +| 1 | [wooorm](https://github.com/wooorm) | + +### Building docs + +_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ + +To generate the readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install -g verb verb-generate-readme && verb +``` + +### Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +### License + +Copyright © 2016, [Jon Schlinkert](http://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/repeat-string/blob/master/LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on October 23, 2016._ \ No newline at end of file diff --git a/node_modules/repeat-string/index.js b/node_modules/repeat-string/index.js new file mode 100644 index 0000000..4459afd --- /dev/null +++ b/node_modules/repeat-string/index.js @@ -0,0 +1,70 @@ +/*! + * repeat-string + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +/** + * Results cache + */ + +var res = ''; +var cache; + +/** + * Expose `repeat` + */ + +module.exports = repeat; + +/** + * Repeat the given `string` the specified `number` + * of times. + * + * **Example:** + * + * ```js + * var repeat = require('repeat-string'); + * repeat('A', 5); + * //=> AAAAA + * ``` + * + * @param {String} `string` The string to repeat + * @param {Number} `number` The number of times to repeat the string + * @return {String} Repeated string + * @api public + */ + +function repeat(str, num) { + if (typeof str !== 'string') { + throw new TypeError('expected a string'); + } + + // cover common, quick use cases + if (num === 1) return str; + if (num === 2) return str + str; + + var max = str.length * num; + if (cache !== str || typeof cache === 'undefined') { + cache = str; + res = ''; + } else if (res.length >= max) { + return res.substr(0, max); + } + + while (max > res.length && num > 1) { + if (num & 1) { + res += str; + } + + num >>= 1; + str += str; + } + + res += str; + res = res.substr(0, max); + return res; +} diff --git a/node_modules/repeat-string/package.json b/node_modules/repeat-string/package.json new file mode 100644 index 0000000..43286dd --- /dev/null +++ b/node_modules/repeat-string/package.json @@ -0,0 +1,168 @@ +{ + "_args": [ + [ + { + "raw": "repeat-string@^1.5.2", + "scope": null, + "escapedName": "repeat-string", + "name": "repeat-string", + "rawSpec": "^1.5.2", + "spec": ">=1.5.2 <2.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/align-text" + ] + ], + "_from": "repeat-string@>=1.5.2 <2.0.0", + "_id": "repeat-string@1.6.1", + "_inCache": true, + "_location": "/repeat-string", + "_nodeVersion": "6.7.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/repeat-string-1.6.1.tgz_1477241638674_0.3764322670176625" + }, + "_npmUser": { + "name": "jonschlinkert", + "email": "github@sellside.com" + }, + "_npmVersion": "3.10.3", + "_phantomChildren": {}, + "_requested": { + "raw": "repeat-string@^1.5.2", + "scope": null, + "escapedName": "repeat-string", + "name": "repeat-string", + "rawSpec": "^1.5.2", + "spec": ">=1.5.2 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/align-text" + ], + "_resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "_shasum": "8dcae470e1c88abc2d600fff4a776286da75e637", + "_shrinkwrap": null, + "_spec": "repeat-string@^1.5.2", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/align-text", + "author": { + "name": "Jon Schlinkert", + "url": "http://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/repeat-string/issues" + }, + "contributors": [ + { + "name": "Brian Woodward", + "email": "brian.woodward@gmail.com", + "url": "https://github.com/doowb" + }, + { + "name": "Jon Schlinkert", + "email": "jon.schlinkert@sellside.com", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Linus Unnebäck", + "email": "linus@folkdatorn.se", + "url": "http://linus.unnebäck.se" + }, + { + "name": "Thijs Busser", + "email": "tbusser@gmail.com", + "url": "http://tbusser.net" + }, + { + "name": "Titus", + "email": "tituswormer@gmail.com", + "url": "wooorm.com" + } + ], + "dependencies": {}, + "description": "Repeat the given string n times. Fastest implementation for repeating a string.", + "devDependencies": { + "ansi-cyan": "^0.1.1", + "benchmarked": "^0.2.5", + "gulp-format-md": "^0.1.11", + "isobject": "^2.1.0", + "mocha": "^3.1.2", + "repeating": "^3.0.0", + "text-table": "^0.2.0", + "yargs-parser": "^4.0.2" + }, + "directories": {}, + "dist": { + "shasum": "8dcae470e1c88abc2d600fff4a776286da75e637", + "tarball": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz" + }, + "engines": { + "node": ">=0.10" + }, + "files": [ + "index.js" + ], + "gitHead": "1a95c5d99a02999ccd2cf4663959a18bd2def7b8", + "homepage": "https://github.com/jonschlinkert/repeat-string", + "keywords": [ + "fast", + "fastest", + "fill", + "left", + "left-pad", + "multiple", + "pad", + "padding", + "repeat", + "repeating", + "repetition", + "right", + "right-pad", + "string", + "times" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "jonschlinkert", + "email": "github@sellside.com" + }, + { + "name": "doowb", + "email": "brian.woodward@gmail.com" + } + ], + "name": "repeat-string", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/repeat-string.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "repeat-element" + ] + }, + "helpers": [ + "./benchmark/helper.js" + ], + "reflinks": [ + "verb" + ] + }, + "version": "1.6.1" +} diff --git a/node_modules/replace-ext/.npmignore b/node_modules/replace-ext/.npmignore new file mode 100644 index 0000000..b5ef13a --- /dev/null +++ b/node_modules/replace-ext/.npmignore @@ -0,0 +1,6 @@ +.DS_Store +*.log +node_modules +build +*.node +components \ No newline at end of file diff --git a/node_modules/replace-ext/.travis.yml b/node_modules/replace-ext/.travis.yml new file mode 100644 index 0000000..8101b9f --- /dev/null +++ b/node_modules/replace-ext/.travis.yml @@ -0,0 +1,8 @@ +language: node_js +node_js: + - "0.7" + - "0.8" + - "0.9" + - "0.10" +after_script: + - npm run coveralls \ No newline at end of file diff --git a/node_modules/replace-ext/LICENSE b/node_modules/replace-ext/LICENSE new file mode 100755 index 0000000..7cbe012 --- /dev/null +++ b/node_modules/replace-ext/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2014 Fractal + +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. diff --git a/node_modules/replace-ext/README.md b/node_modules/replace-ext/README.md new file mode 100644 index 0000000..05b5d21 --- /dev/null +++ b/node_modules/replace-ext/README.md @@ -0,0 +1,44 @@ +# replace-ext [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status][david-image]][david-url] + + +## Information + + + + + + + + + + + + + +
    Packagereplace-ext
    DescriptionReplaces a file extension with another one
    Node Version>= 0.4
    + +## Usage + +```javascript +var replaceExt = require('replace-ext'); + +var path = '/some/dir/file.js'; +var npath = replaceExt(path, '.coffee'); + +console.log(npath); // /some/dir/file.coffee +``` + +[npm-url]: https://npmjs.org/package/replace-ext +[npm-image]: https://badge.fury.io/js/replace-ext.png + +[travis-url]: https://travis-ci.org/wearefractal/replace-ext +[travis-image]: https://travis-ci.org/wearefractal/replace-ext.png?branch=master + +[coveralls-url]: https://coveralls.io/r/wearefractal/replace-ext +[coveralls-image]: https://coveralls.io/repos/wearefractal/replace-ext/badge.png + +[depstat-url]: https://david-dm.org/wearefractal/replace-ext +[depstat-image]: https://david-dm.org/wearefractal/replace-ext.png + +[david-url]: https://david-dm.org/wearefractal/replace-ext +[david-image]: https://david-dm.org/wearefractal/replace-ext.png?theme=shields.io \ No newline at end of file diff --git a/node_modules/replace-ext/index.js b/node_modules/replace-ext/index.js new file mode 100644 index 0000000..3f76938 --- /dev/null +++ b/node_modules/replace-ext/index.js @@ -0,0 +1,9 @@ +var path = require('path'); + +module.exports = function(npath, ext) { + if (typeof npath !== 'string') return npath; + if (npath.length === 0) return npath; + + var nFileName = path.basename(npath, path.extname(npath))+ext; + return path.join(path.dirname(npath), nFileName); +}; \ No newline at end of file diff --git a/node_modules/replace-ext/package.json b/node_modules/replace-ext/package.json new file mode 100644 index 0000000..da29838 --- /dev/null +++ b/node_modules/replace-ext/package.json @@ -0,0 +1,97 @@ +{ + "_args": [ + [ + { + "raw": "replace-ext@0.0.1", + "scope": null, + "escapedName": "replace-ext", + "name": "replace-ext", + "rawSpec": "0.0.1", + "spec": "0.0.1", + "type": "version" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/gulp-util" + ] + ], + "_from": "replace-ext@0.0.1", + "_id": "replace-ext@0.0.1", + "_inCache": true, + "_location": "/replace-ext", + "_npmUser": { + "name": "fractal", + "email": "contact@wearefractal.com" + }, + "_npmVersion": "1.4.4", + "_phantomChildren": {}, + "_requested": { + "raw": "replace-ext@0.0.1", + "scope": null, + "escapedName": "replace-ext", + "name": "replace-ext", + "rawSpec": "0.0.1", + "spec": "0.0.1", + "type": "version" + }, + "_requiredBy": [ + "/gulp-util", + "/vinyl" + ], + "_resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", + "_shasum": "29bbd92078a739f0bcce2b4ee41e837953522924", + "_shrinkwrap": null, + "_spec": "replace-ext@0.0.1", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/gulp-util", + "author": { + "name": "Fractal", + "email": "contact@wearefractal.com", + "url": "http://wearefractal.com/" + }, + "bugs": { + "url": "https://github.com/wearefractal/replace-ext/issues" + }, + "dependencies": {}, + "description": "Replaces a file extension with another one", + "devDependencies": { + "coveralls": "~2.6.1", + "istanbul": "~0.2.3", + "jshint": "~2.4.1", + "mocha": "~1.17.0", + "mocha-lcov-reporter": "~0.0.1", + "rimraf": "~2.2.5", + "should": "~3.1.0" + }, + "directories": {}, + "dist": { + "shasum": "29bbd92078a739f0bcce2b4ee41e837953522924", + "tarball": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz" + }, + "engines": { + "node": ">= 0.4" + }, + "homepage": "http://github.com/wearefractal/replace-ext", + "licenses": [ + { + "type": "MIT", + "url": "http://github.com/wearefractal/replace-ext/raw/master/LICENSE" + } + ], + "main": "./index.js", + "maintainers": [ + { + "name": "fractal", + "email": "contact@wearefractal.com" + } + ], + "name": "replace-ext", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/wearefractal/replace-ext.git" + }, + "scripts": { + "coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage", + "test": "mocha --reporter spec && jshint" + }, + "version": "0.0.1" +} diff --git a/node_modules/replace-ext/test/main.js b/node_modules/replace-ext/test/main.js new file mode 100644 index 0000000..5137702 --- /dev/null +++ b/node_modules/replace-ext/test/main.js @@ -0,0 +1,51 @@ +var replaceExt = require('../'); +var path = require('path'); +var should = require('should'); +require('mocha'); + +describe('replace-ext', function() { + it('should return a valid replaced extension on nested', function(done) { + var fname = path.join(__dirname, './fixtures/test.coffee'); + var expected = path.join(__dirname, './fixtures/test.js'); + var nu = replaceExt(fname, '.js'); + should.exist(nu); + nu.should.equal(expected); + done(); + }); + + it('should return a valid replaced extension on flat', function(done) { + var fname = 'test.coffee'; + var expected = 'test.js'; + var nu = replaceExt(fname, '.js'); + should.exist(nu); + nu.should.equal(expected); + done(); + }); + + it('should not return a valid replaced extension on empty string', function(done) { + var fname = ''; + var expected = ''; + var nu = replaceExt(fname, '.js'); + should.exist(nu); + nu.should.equal(expected); + done(); + }); + + it('should return a valid removed extension on nested', function(done) { + var fname = path.join(__dirname, './fixtures/test.coffee'); + var expected = path.join(__dirname, './fixtures/test'); + var nu = replaceExt(fname, ''); + should.exist(nu); + nu.should.equal(expected); + done(); + }); + + it('should return a valid added extension on nested', function(done) { + var fname = path.join(__dirname, './fixtures/test'); + var expected = path.join(__dirname, './fixtures/test.js'); + var nu = replaceExt(fname, '.js'); + should.exist(nu); + nu.should.equal(expected); + done(); + }); +}); diff --git a/node_modules/require-directory/.jshintrc b/node_modules/require-directory/.jshintrc new file mode 100644 index 0000000..e14e4dc --- /dev/null +++ b/node_modules/require-directory/.jshintrc @@ -0,0 +1,67 @@ +{ + "maxerr" : 50, + "bitwise" : true, + "camelcase" : true, + "curly" : true, + "eqeqeq" : true, + "forin" : true, + "immed" : true, + "indent" : 2, + "latedef" : true, + "newcap" : true, + "noarg" : true, + "noempty" : true, + "nonew" : true, + "plusplus" : true, + "quotmark" : true, + "undef" : true, + "unused" : true, + "strict" : true, + "trailing" : true, + "maxparams" : false, + "maxdepth" : false, + "maxstatements" : false, + "maxcomplexity" : false, + "maxlen" : false, + "asi" : false, + "boss" : false, + "debug" : false, + "eqnull" : true, + "es5" : false, + "esnext" : false, + "moz" : false, + "evil" : false, + "expr" : true, + "funcscope" : true, + "globalstrict" : true, + "iterator" : true, + "lastsemic" : false, + "laxbreak" : false, + "laxcomma" : false, + "loopfunc" : false, + "multistr" : false, + "proto" : false, + "scripturl" : false, + "smarttabs" : false, + "shadow" : false, + "sub" : false, + "supernew" : false, + "validthis" : false, + "browser" : true, + "couch" : false, + "devel" : true, + "dojo" : false, + "jquery" : false, + "mootools" : false, + "node" : true, + "nonstandard" : false, + "prototypejs" : false, + "rhino" : false, + "worker" : false, + "wsh" : false, + "yui" : false, + "nomen" : true, + "onevar" : true, + "passfail" : false, + "white" : true +} diff --git a/node_modules/require-directory/.npmignore b/node_modules/require-directory/.npmignore new file mode 100644 index 0000000..47cf365 --- /dev/null +++ b/node_modules/require-directory/.npmignore @@ -0,0 +1 @@ +test/** diff --git a/node_modules/require-directory/.travis.yml b/node_modules/require-directory/.travis.yml new file mode 100644 index 0000000..20fd86b --- /dev/null +++ b/node_modules/require-directory/.travis.yml @@ -0,0 +1,3 @@ +language: node_js +node_js: + - 0.10 diff --git a/node_modules/require-directory/LICENSE b/node_modules/require-directory/LICENSE new file mode 100644 index 0000000..a70f253 --- /dev/null +++ b/node_modules/require-directory/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2011 Troy Goode + +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. diff --git a/node_modules/require-directory/README.markdown b/node_modules/require-directory/README.markdown new file mode 100644 index 0000000..926a063 --- /dev/null +++ b/node_modules/require-directory/README.markdown @@ -0,0 +1,184 @@ +# require-directory + +Recursively iterates over specified directory, `require()`'ing each file, and returning a nested hash structure containing those modules. + +**[Follow me (@troygoode) on Twitter!](https://twitter.com/intent/user?screen_name=troygoode)** + +[![NPM](https://nodei.co/npm/require-directory.png?downloads=true&stars=true)](https://nodei.co/npm/require-directory/) + +[![build status](https://secure.travis-ci.org/troygoode/node-require-directory.png)](http://travis-ci.org/troygoode/node-require-directory) + +## How To Use + +### Installation (via [npm](https://npmjs.org/package/require-directory)) + +```bash +$ npm install require-directory +``` + +### Usage + +A common pattern in node.js is to include an index file which creates a hash of the files in its current directory. Given a directory structure like so: + +* app.js +* routes/ + * index.js + * home.js + * auth/ + * login.js + * logout.js + * register.js + +`routes/index.js` uses `require-directory` to build the hash (rather than doing so manually) like so: + +```javascript +var requireDirectory = require('require-directory'); +module.exports = requireDirectory(module); +``` + +`app.js` references `routes/index.js` like any other module, but it now has a hash/tree of the exports from the `./routes/` directory: + +```javascript +var routes = require('./routes'); + +// snip + +app.get('/', routes.home); +app.get('/register', routes.auth.register); +app.get('/login', routes.auth.login); +app.get('/logout', routes.auth.logout); +``` + +The `routes` variable above is the equivalent of this: + +```javascript +var routes = { + home: require('routes/home.js'), + auth: { + login: require('routes/auth/login.js'), + logout: require('routes/auth/logout.js'), + register: require('routes/auth/register.js') + } +}; +``` + +*Note that `routes.index` will be `undefined` as you would hope.* + +### Specifying Another Directory + +You can specify which directory you want to build a tree of (if it isn't the current directory for whatever reason) by passing it as the second parameter. Not specifying the path (`requireDirectory(module)`) is the equivelant of `requireDirectory(module, __dirname)`: + +```javascript +var requireDirectory = require('require-directory'); +module.exports = requireDirectory(module, './some/subdirectory'); +``` + +For example, in the [example in the Usage section](#usage) we could have avoided creating `routes/index.js` and instead changed the first lines of `app.js` to: + +```javascript +var requireDirectory = require('require-directory'); +var routes = requireDirectory(module, './routes'); +``` + +## Options + +You can pass an options hash to `require-directory` as the 2nd parameter (or 3rd if you're passing the path to another directory as the 2nd parameter already). Here are the available options: + +### Whitelisting + +Whitelisting (either via RegExp or function) allows you to specify that only certain files be loaded. + +```javascript +var requireDirectory = require('require-directory'), + whitelist = /onlyinclude.js$/, + hash = requireDirectory(module, {include: whitelist}); +``` + +```javascript +var requireDirectory = require('require-directory'), + check = function(path){ + if(/onlyinclude.js$/.test(path)){ + return true; // don't include + }else{ + return false; // go ahead and include + } + }, + hash = requireDirectory(module, {include: check}); +``` + +### Blacklisting + +Blacklisting (either via RegExp or function) allows you to specify that all but certain files should be loaded. + +```javascript +var requireDirectory = require('require-directory'), + blacklist = /dontinclude\.js$/, + hash = requireDirectory(module, {exclude: blacklist}); +``` + +```javascript +var requireDirectory = require('require-directory'), + check = function(path){ + if(/dontinclude\.js$/.test(path)){ + return false; // don't include + }else{ + return true; // go ahead and include + } + }, + hash = requireDirectory(module, {exclude: check}); +``` + +### Visiting Objects As They're Loaded + +`require-directory` takes a function as the `visit` option that will be called for each module that is added to module.exports. + +```javascript +var requireDirectory = require('require-directory'), + visitor = function(obj) { + console.log(obj); // will be called for every module that is loaded + }, + hash = requireDirectory(module, {visit: visitor}); +``` + +The visitor can also transform the objects by returning a value: + +```javascript +var requireDirectory = require('require-directory'), + visitor = function(obj) { + return obj(new Date()); + }, + hash = requireDirectory(module, {visit: visitor}); +``` + +### Renaming Keys + +```javascript +var requireDirectory = require('require-directory'), + renamer = function(name) { + return name.toUpperCase(); + }, + hash = requireDirectory(module, {rename: renamer}); +``` + +### No Recursion + +```javascript +var requireDirectory = require('require-directory'), + hash = requireDirectory(module, {recurse: false}); +``` + +## Run Unit Tests + +```bash +$ npm run lint +$ npm test +``` + +## License + +[MIT License](http://www.opensource.org/licenses/mit-license.php) + +## Author + +[Troy Goode](https://github.com/TroyGoode) ([troygoode@gmail.com](mailto:troygoode@gmail.com)) + diff --git a/node_modules/require-directory/index.js b/node_modules/require-directory/index.js new file mode 100644 index 0000000..cd37da7 --- /dev/null +++ b/node_modules/require-directory/index.js @@ -0,0 +1,86 @@ +'use strict'; + +var fs = require('fs'), + join = require('path').join, + resolve = require('path').resolve, + dirname = require('path').dirname, + defaultOptions = { + extensions: ['js', 'json', 'coffee'], + recurse: true, + rename: function (name) { + return name; + }, + visit: function (obj) { + return obj; + } + }; + +function checkFileInclusion(path, filename, options) { + return ( + // verify file has valid extension + (new RegExp('\\.(' + options.extensions.join('|') + ')$', 'i').test(filename)) && + + // if options.include is a RegExp, evaluate it and make sure the path passes + !(options.include && options.include instanceof RegExp && !options.include.test(path)) && + + // if options.include is a function, evaluate it and make sure the path passes + !(options.include && typeof options.include === 'function' && !options.include(path, filename)) && + + // if options.exclude is a RegExp, evaluate it and make sure the path doesn't pass + !(options.exclude && options.exclude instanceof RegExp && options.exclude.test(path)) && + + // if options.exclude is a function, evaluate it and make sure the path doesn't pass + !(options.exclude && typeof options.exclude === 'function' && options.exclude(path, filename)) + ); +} + +function requireDirectory(m, path, options) { + var retval = {}; + + // path is optional + if (path && !options && typeof path !== 'string') { + options = path; + path = null; + } + + // default options + options = options || {}; + for (var prop in defaultOptions) { + if (typeof options[prop] === 'undefined') { + options[prop] = defaultOptions[prop]; + } + } + + // if no path was passed in, assume the equivelant of __dirname from caller + // otherwise, resolve path relative to the equivalent of __dirname + path = !path ? dirname(m.filename) : resolve(dirname(m.filename), path); + + // get the path of each file in specified directory, append to current tree node, recurse + fs.readdirSync(path).forEach(function (filename) { + var joined = join(path, filename), + files, + key, + obj; + + if (fs.statSync(joined).isDirectory() && options.recurse) { + // this node is a directory; recurse + files = requireDirectory(m, joined, options); + // exclude empty directories + if (Object.keys(files).length) { + retval[options.rename(filename, joined, filename)] = files; + } + } else { + if (joined !== m.filename && checkFileInclusion(joined, filename, options)) { + // hash node key shouldn't include file extension + key = filename.substring(0, filename.lastIndexOf('.')); + obj = m.require(joined); + retval[options.rename(key, joined, filename)] = options.visit(obj, joined, filename) || obj; + } + } + }); + + return retval; +} + +module.exports = requireDirectory; +module.exports.defaults = defaultOptions; diff --git a/node_modules/require-directory/package.json b/node_modules/require-directory/package.json new file mode 100644 index 0000000..711ae38 --- /dev/null +++ b/node_modules/require-directory/package.json @@ -0,0 +1,101 @@ +{ + "_args": [ + [ + { + "raw": "require-directory@^2.1.1", + "scope": null, + "escapedName": "require-directory", + "name": "require-directory", + "rawSpec": "^2.1.1", + "spec": ">=2.1.1 <3.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/sequelize-cli/node_modules/yargs" + ] + ], + "_from": "require-directory@>=2.1.1 <3.0.0", + "_id": "require-directory@2.1.1", + "_inCache": true, + "_location": "/require-directory", + "_nodeVersion": "0.12.0", + "_npmUser": { + "name": "troygoode", + "email": "troygoode@gmail.com" + }, + "_npmVersion": "2.5.1", + "_phantomChildren": {}, + "_requested": { + "raw": "require-directory@^2.1.1", + "scope": null, + "escapedName": "require-directory", + "name": "require-directory", + "rawSpec": "^2.1.1", + "spec": ">=2.1.1 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/sequelize-cli/yargs" + ], + "_resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "_shasum": "8c64ad5fd30dab1c976e2344ffe7f792a6a6df42", + "_shrinkwrap": null, + "_spec": "require-directory@^2.1.1", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/sequelize-cli/node_modules/yargs", + "author": { + "name": "Troy Goode", + "email": "troygoode@gmail.com", + "url": "http://github.com/troygoode/" + }, + "bugs": { + "url": "http://github.com/troygoode/node-require-directory/issues/" + }, + "contributors": [ + { + "name": "Troy Goode", + "email": "troygoode@gmail.com", + "url": "http://github.com/troygoode/" + } + ], + "dependencies": {}, + "description": "Recursively iterates over specified directory, require()'ing each file, and returning a nested hash structure containing those modules.", + "devDependencies": { + "jshint": "^2.6.0", + "mocha": "^2.1.0" + }, + "directories": {}, + "dist": { + "shasum": "8c64ad5fd30dab1c976e2344ffe7f792a6a6df42", + "tarball": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "gitHead": "cc71c23dd0c16cefd26855303c16ca1b9b50a36d", + "homepage": "https://github.com/troygoode/node-require-directory/", + "keywords": [ + "require", + "directory", + "library", + "recursive" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "troygoode", + "email": "troygoode@gmail.com" + } + ], + "name": "require-directory", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/troygoode/node-require-directory.git" + }, + "scripts": { + "lint": "jshint index.js test/test.js", + "test": "mocha" + }, + "version": "2.1.1" +} diff --git a/node_modules/require-main-filename/.npmignore b/node_modules/require-main-filename/.npmignore new file mode 100644 index 0000000..6f9fe6b --- /dev/null +++ b/node_modules/require-main-filename/.npmignore @@ -0,0 +1,3 @@ +node_modules +.DS_Store +.nyc_output diff --git a/node_modules/require-main-filename/.travis.yml b/node_modules/require-main-filename/.travis.yml new file mode 100644 index 0000000..ab61ce7 --- /dev/null +++ b/node_modules/require-main-filename/.travis.yml @@ -0,0 +1,8 @@ +language: node_js +os: + - linux +node_js: + - "0.10" + - "0.12" + - "4.1" + - "node" diff --git a/node_modules/require-main-filename/LICENSE.txt b/node_modules/require-main-filename/LICENSE.txt new file mode 100644 index 0000000..836440b --- /dev/null +++ b/node_modules/require-main-filename/LICENSE.txt @@ -0,0 +1,14 @@ +Copyright (c) 2016, Contributors + +Permission to use, copy, modify, and/or distribute this software +for any purpose with or without fee is hereby granted, provided +that the above copyright notice and this permission notice +appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE +LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/require-main-filename/README.md b/node_modules/require-main-filename/README.md new file mode 100644 index 0000000..820d9f5 --- /dev/null +++ b/node_modules/require-main-filename/README.md @@ -0,0 +1,26 @@ +# require-main-filename + +[![Build Status](https://travis-ci.org/yargs/require-main-filename.png)](https://travis-ci.org/yargs/require-main-filename) +[![Coverage Status](https://coveralls.io/repos/yargs/require-main-filename/badge.svg?branch=master)](https://coveralls.io/r/yargs/require-main-filename?branch=master) +[![NPM version](https://img.shields.io/npm/v/require-main-filename.svg)](https://www.npmjs.com/package/require-main-filename) + +`require.main.filename` is great for figuring out the entry +point for the current application. This can be combined with a module like +[pkg-conf](https://www.npmjs.com/package/pkg-conf) to, _as if by magic_, load +top-level configuration. + +Unfortunately, `require.main.filename` sometimes fails when an application is +executed with an alternative process manager, e.g., [iisnode](https://github.com/tjanczuk/iisnode). + +`require-main-filename` is a shim that addresses this problem. + +## Usage + +```js +var main = require('require-main-filename')() +// use main as an alternative to require.main.filename. +``` + +## License + +ISC diff --git a/node_modules/require-main-filename/index.js b/node_modules/require-main-filename/index.js new file mode 100644 index 0000000..dca7f0c --- /dev/null +++ b/node_modules/require-main-filename/index.js @@ -0,0 +1,18 @@ +module.exports = function (_require) { + _require = _require || require + var main = _require.main + if (main && isIISNode(main)) return handleIISNode(main) + else return main ? main.filename : process.cwd() +} + +function isIISNode (main) { + return /\\iisnode\\/.test(main.filename) +} + +function handleIISNode (main) { + if (!main.children.length) { + return main.filename + } else { + return main.children[0].filename + } +} diff --git a/node_modules/require-main-filename/package.json b/node_modules/require-main-filename/package.json new file mode 100644 index 0000000..2f451e0 --- /dev/null +++ b/node_modules/require-main-filename/package.json @@ -0,0 +1,94 @@ +{ + "_args": [ + [ + { + "raw": "require-main-filename@^1.0.1", + "scope": null, + "escapedName": "require-main-filename", + "name": "require-main-filename", + "rawSpec": "^1.0.1", + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/sequelize-cli/node_modules/yargs" + ] + ], + "_from": "require-main-filename@>=1.0.1 <2.0.0", + "_id": "require-main-filename@1.0.1", + "_inCache": true, + "_location": "/require-main-filename", + "_nodeVersion": "3.2.0", + "_npmOperationalInternal": { + "host": "packages-6-west.internal.npmjs.com", + "tmp": "tmp/require-main-filename-1.0.1.tgz_1455688492890_0.0750324921682477" + }, + "_npmUser": { + "name": "bcoe", + "email": "ben@npmjs.com" + }, + "_npmVersion": "3.3.0", + "_phantomChildren": {}, + "_requested": { + "raw": "require-main-filename@^1.0.1", + "scope": null, + "escapedName": "require-main-filename", + "name": "require-main-filename", + "rawSpec": "^1.0.1", + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/sequelize-cli/yargs" + ], + "_resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "_shasum": "97f717b69d48784f5f526a6c5aa8ffdda055a4d1", + "_shrinkwrap": null, + "_spec": "require-main-filename@^1.0.1", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/sequelize-cli/node_modules/yargs", + "author": { + "name": "Ben Coe", + "email": "ben@npmjs.com" + }, + "bugs": { + "url": "https://github.com/yargs/require-main-filename/issues" + }, + "dependencies": {}, + "description": "shim for require.main.filename() that works in as many environments as possible", + "devDependencies": { + "chai": "^3.5.0", + "standard": "^6.0.5", + "tap": "^5.2.0" + }, + "directories": {}, + "dist": { + "shasum": "97f717b69d48784f5f526a6c5aa8ffdda055a4d1", + "tarball": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz" + }, + "gitHead": "6dd2291332bed764c56302ccdd14da8a213249a1", + "homepage": "https://github.com/yargs/require-main-filename#readme", + "keywords": [ + "require", + "shim", + "iisnode" + ], + "license": "ISC", + "main": "index.js", + "maintainers": [ + { + "name": "bcoe", + "email": "ben@npmjs.com" + } + ], + "name": "require-main-filename", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/yargs/require-main-filename.git" + }, + "scripts": { + "pretest": "standard", + "test": "tap --coverage test.js" + }, + "version": "1.0.1" +} diff --git a/node_modules/require-main-filename/test.js b/node_modules/require-main-filename/test.js new file mode 100644 index 0000000..d89e7dc --- /dev/null +++ b/node_modules/require-main-filename/test.js @@ -0,0 +1,36 @@ +/* global describe, it */ + +var requireMainFilename = require('./') + +require('tap').mochaGlobals() +require('chai').should() + +describe('require-main-filename', function () { + it('returns require.main.filename in normal circumstances', function () { + requireMainFilename().should.match(/test\.js/) + }) + + it('should use children[0].filename when running on iisnode', function () { + var main = { + filename: 'D:\\Program Files (x86)\\iisnode\\interceptor.js', + children: [ {filename: 'D:\\home\\site\\wwwroot\\server.js'} ] + } + requireMainFilename({ + main: main + }).should.match(/server\.js/) + }) + + it('should not use children[0] if no children exist', function () { + var main = { + filename: 'D:\\Program Files (x86)\\iisnode\\interceptor.js', + children: [] + } + requireMainFilename({ + main: main + }).should.match(/interceptor\.js/) + }) + + it('should default to process.cwd() if require.main is undefined', function () { + requireMainFilename({}).should.match(/require-main-filename/) + }) +}) diff --git a/node_modules/resolve-dir/LICENSE b/node_modules/resolve-dir/LICENSE new file mode 100644 index 0000000..6525171 --- /dev/null +++ b/node_modules/resolve-dir/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2016, Jon Schlinkert + +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. diff --git a/node_modules/resolve-dir/README.md b/node_modules/resolve-dir/README.md new file mode 100644 index 0000000..220178d --- /dev/null +++ b/node_modules/resolve-dir/README.md @@ -0,0 +1,88 @@ +# resolve-dir [![NPM version](https://img.shields.io/npm/v/resolve-dir.svg?style=flat)](https://www.npmjs.com/package/resolve-dir) [![NPM downloads](https://img.shields.io/npm/dm/resolve-dir.svg?style=flat)](https://npmjs.org/package/resolve-dir) [![Build Status](https://img.shields.io/travis/jonschlinkert/resolve-dir.svg?style=flat)](https://travis-ci.org/jonschlinkert/resolve-dir) + +Resolve a directory that is either local, global or in the user's home directory. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save resolve-dir +``` + +## Usage + +```js +var resolve = require('resolve-dir'); +``` + +Returns a local directory path unchanged + +```js +resolve('a') +//=> 'a' +``` + +Resolves the path to user home + +```js +resolve('~') +//=> '/Users/jonschlinkert' +resolve('~/foo') +//=> '/Users/jonschlinkert/foo' +``` + +Resolves the path to global npm modules + +```js +resolve('@') +//=> '/usr/local/lib/node_modules' +resolve('@/foo') +//=> '/usr/local/lib/node_modules/foo' +``` + +## About + +### Related projects + +* [expand-tilde](https://www.npmjs.com/package/expand-tilde): Bash-like tilde expansion for node.js. Expands a leading tilde in a file path to the… [more](https://github.com/jonschlinkert/expand-tilde) | [homepage](https://github.com/jonschlinkert/expand-tilde "Bash-like tilde expansion for node.js. Expands a leading tilde in a file path to the user home directory, or `~+` to the cwd.") +* [findup-sync](https://www.npmjs.com/package/findup-sync): Find the first file matching a given pattern in the current directory or the nearest… [more](https://github.com/cowboy/node-findup-sync) | [homepage](https://github.com/cowboy/node-findup-sync "Find the first file matching a given pattern in the current directory or the nearest ancestor directory.") +* [resolve-modules](https://www.npmjs.com/package/resolve-modules): Resolves local and global npm modules that match specified patterns, and returns a configuration object… [more](https://github.com/jonschlinkert/resolve-modules) | [homepage](https://github.com/jonschlinkert/resolve-modules "Resolves local and global npm modules that match specified patterns, and returns a configuration object for each resolved module.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ + +To generate the readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install -g verb verb-generate-readme && verb +``` + +### Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +### License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/resolve-dir/blob/master/LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.28, on July 29, 2016._ \ No newline at end of file diff --git a/node_modules/resolve-dir/index.js b/node_modules/resolve-dir/index.js new file mode 100644 index 0000000..3fe5366 --- /dev/null +++ b/node_modules/resolve-dir/index.js @@ -0,0 +1,22 @@ +/*! + * resolve-dir + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var path = require('path'); +var expand = require('expand-tilde'); +var gm = require('global-modules'); + +module.exports = function resolveDir(dir) { + if (dir.charAt(0) === '~') { + dir = expand(dir); + } + if (dir.charAt(0) === '@') { + dir = path.join(gm, dir.slice(1)); + } + return dir; +}; diff --git a/node_modules/resolve-dir/package.json b/node_modules/resolve-dir/package.json new file mode 100644 index 0000000..b1f9d11 --- /dev/null +++ b/node_modules/resolve-dir/package.json @@ -0,0 +1,140 @@ +{ + "_args": [ + [ + { + "raw": "resolve-dir@^0.1.0", + "scope": null, + "escapedName": "resolve-dir", + "name": "resolve-dir", + "rawSpec": "^0.1.0", + "spec": ">=0.1.0 <0.2.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/findup-sync" + ] + ], + "_from": "resolve-dir@>=0.1.0 <0.2.0", + "_id": "resolve-dir@0.1.1", + "_inCache": true, + "_location": "/resolve-dir", + "_nodeVersion": "6.3.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/resolve-dir-0.1.1.tgz_1469811619883_0.7320640422403812" + }, + "_npmUser": { + "name": "jonschlinkert", + "email": "github@sellside.com" + }, + "_npmVersion": "3.10.3", + "_phantomChildren": {}, + "_requested": { + "raw": "resolve-dir@^0.1.0", + "scope": null, + "escapedName": "resolve-dir", + "name": "resolve-dir", + "rawSpec": "^0.1.0", + "spec": ">=0.1.0 <0.2.0", + "type": "range" + }, + "_requiredBy": [ + "/findup-sync" + ], + "_resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-0.1.1.tgz", + "_shasum": "b219259a5602fac5c5c496ad894a6e8cc430261e", + "_shrinkwrap": null, + "_spec": "resolve-dir@^0.1.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/findup-sync", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/resolve-dir/issues" + }, + "dependencies": { + "expand-tilde": "^1.2.2", + "global-modules": "^0.2.3" + }, + "description": "Resolve a directory that is either local, global or in the user's home directory.", + "devDependencies": { + "gulp-format-md": "^0.1.9", + "mocha": "^2.5.3" + }, + "directories": {}, + "dist": { + "shasum": "b219259a5602fac5c5c496ad894a6e8cc430261e", + "tarball": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-0.1.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js", + "LICENSE", + "README.md" + ], + "gitHead": "a9ba6b37227d5b708c3606bc97ff62b1a679ef56", + "homepage": "https://github.com/jonschlinkert/resolve-dir", + "keywords": [ + "dir", + "directory", + "expansion", + "file", + "filepath", + "fp", + "global", + "home", + "modules", + "npm", + "path", + "resolve", + "tilde", + "user", + "user-home", + "userhome" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "jonschlinkert", + "email": "github@sellside.com" + } + ], + "name": "resolve-dir", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/resolve-dir.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "findup-sync", + "expand-tilde", + "resolve-modules" + ] + }, + "reflinks": [ + "verb", + "verb-generate-readme" + ], + "lint": { + "reflinks": true + } + }, + "version": "0.1.1" +} diff --git a/node_modules/resolve/.eslintignore b/node_modules/resolve/.eslintignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/node_modules/resolve/.eslintignore @@ -0,0 +1 @@ +node_modules diff --git a/node_modules/resolve/.eslintrc b/node_modules/resolve/.eslintrc new file mode 100644 index 0000000..ae352e2 --- /dev/null +++ b/node_modules/resolve/.eslintrc @@ -0,0 +1,27 @@ +{ + "extends": "@ljharb", + "root": true, + "rules": { + "indent": [2, 4], + "strict": 0, + "complexity": 0, + "consistent-return": 0, + "curly": 0, + "func-name-matching": 0, + "func-style": 0, + "global-require": 0, + "id-length": [2, { "min": 1, "max": 30 }], + "max-nested-callbacks": 0, + "max-params": 0, + "max-statements-per-line": [2, { "max": 2 }], + "max-statements": 0, + "no-magic-numbers": 0, + "no-console": 0, + "no-shadow": 0, + "no-unused-vars": [2, { "vars": "all", "args": "none" }], + "no-use-before-define": 0, + "object-curly-newline": 0, + "operator-linebreak": [2, "before"], + "sort-keys": 0, + } +} diff --git a/node_modules/resolve/.npmignore b/node_modules/resolve/.npmignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/node_modules/resolve/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/node_modules/resolve/.travis.yml b/node_modules/resolve/.travis.yml new file mode 100644 index 0000000..f5450af --- /dev/null +++ b/node_modules/resolve/.travis.yml @@ -0,0 +1,176 @@ +language: node_js +os: + - linux +node_js: + - "7.9" + - "6.10" + - "5.12" + - "4.8" + - "iojs-v3.3" + - "iojs-v2.5" + - "iojs-v1.8" + - "0.12" + - "0.10" + - "0.8" + - "0.6" +before_install: + - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then npm install -g npm@1.3 ; elif [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi' + - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then npm install -g npm; fi' +install: + - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then nvm install 0.8 && npm install -g npm@1.3 && npm install -g npm@1.4.28 && npm install -g npm@2 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' +script: + - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' + - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' + - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' + - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' +sudo: false +env: + - TEST=true +matrix: + fast_finish: true + include: + - node_js: "node" + env: PRETEST=true + - node_js: "7.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.4" + env: TEST=true ALLOW_FAILURE=true + ##- node_js: "7" + #env: TEST=true + #os: osx + #- node_js: "6" + #env: TEST=true + #os: osx + #- node_js: "5" + #env: TEST=true + #os: osx + #- node_js: "4" + #env: TEST=true + #os: osx + #- node_js: "iojs" + #env: TEST=true + #os: osx + #- node_js: "0.12" + #env: TEST=true + #os: osx + #- node_js: "0.10" + #env: TEST=true + #os: osx + #- node_js: "0.8" + #env: TEST=true + #os: osx + allow_failures: + - os: osx + - env: TEST=true ALLOW_FAILURE=true diff --git a/node_modules/resolve/LICENSE b/node_modules/resolve/LICENSE new file mode 100644 index 0000000..ee27ba4 --- /dev/null +++ b/node_modules/resolve/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +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. diff --git a/node_modules/resolve/appveyor.yml b/node_modules/resolve/appveyor.yml new file mode 100644 index 0000000..f54a1b6 --- /dev/null +++ b/node_modules/resolve/appveyor.yml @@ -0,0 +1,44 @@ +version: 1.0.{build} +skip_branch_with_pr: true +build: off + +environment: + matrix: + - nodejs_version: "7" + - nodejs_version: "6" + - nodejs_version: "5" + - nodejs_version: "4" + - nodejs_version: "3" + - nodejs_version: "2" + - nodejs_version: "1" + - nodejs_version: "0.12" + - nodejs_version: "0.10" + - nodejs_version: "0.8" + - nodejs_version: "0.6" +matrix: + # fast_finish: true + allow_failures: + - nodejs_version: "0.6" + +platform: + - x86 + - x64 + +# Install scripts. (runs after repo cloning) +install: + # Get the latest stable version of Node.js or io.js + - ps: Install-Product node $env:nodejs_version $env:platform + - IF %nodejs_version% EQU 0.6 npm -g install npm@1.3 + - IF %nodejs_version% EQU 0.8 npm -g install npm@2 + - set PATH=%APPDATA%\npm;%PATH% + #- IF %nodejs_version% NEQ 0.6 AND %nodejs_version% NEQ 0.8 npm -g install npm + # install modules + - npm install + +# Post-install test scripts. +test_script: + # Output useful info for debugging. + - node --version + - npm --version + # run tests + - npm run tests-only diff --git a/node_modules/resolve/example/async.js b/node_modules/resolve/example/async.js new file mode 100644 index 0000000..20e65dc --- /dev/null +++ b/node_modules/resolve/example/async.js @@ -0,0 +1,5 @@ +var resolve = require('../'); +resolve('tap', { basedir: __dirname }, function (err, res) { + if (err) console.error(err); + else console.log(res); +}); diff --git a/node_modules/resolve/example/sync.js b/node_modules/resolve/example/sync.js new file mode 100644 index 0000000..54b2cc1 --- /dev/null +++ b/node_modules/resolve/example/sync.js @@ -0,0 +1,3 @@ +var resolve = require('../'); +var res = resolve.sync('tap', { basedir: __dirname }); +console.log(res); diff --git a/node_modules/resolve/index.js b/node_modules/resolve/index.js new file mode 100644 index 0000000..eb6ba89 --- /dev/null +++ b/node_modules/resolve/index.js @@ -0,0 +1,8 @@ +var core = require('./lib/core'); +var async = require('./lib/async'); +async.core = core; +async.isCore = function isCore(x) { return core[x]; }; +async.sync = require('./lib/sync'); + +exports = async; +module.exports = async; diff --git a/node_modules/resolve/lib/async.js b/node_modules/resolve/lib/async.js new file mode 100644 index 0000000..ef1bde7 --- /dev/null +++ b/node_modules/resolve/lib/async.js @@ -0,0 +1,203 @@ +var core = require('./core'); +var fs = require('fs'); +var path = require('path'); +var caller = require('./caller.js'); +var nodeModulesPaths = require('./node-modules-paths.js'); + +module.exports = function resolve(x, options, callback) { + var cb = callback; + var opts = options || {}; + if (typeof opts === 'function') { + cb = opts; + opts = {}; + } + if (typeof x !== 'string') { + var err = new TypeError('Path must be a string.'); + return process.nextTick(function () { + cb(err); + }); + } + + var isFile = opts.isFile || function (file, cb) { + fs.stat(file, function (err, stat) { + if (!err) { + return cb(null, stat.isFile() || stat.isFIFO()); + } + if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); + return cb(err); + }); + }; + var readFile = opts.readFile || fs.readFile; + + var extensions = opts.extensions || ['.js']; + var y = opts.basedir || path.dirname(caller()); + + opts.paths = opts.paths || []; + + if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(x)) { + var res = path.resolve(y, x); + if (x === '..' || x.slice(-1) === '/') res += '/'; + if (/\/$/.test(x) && res === y) { + loadAsDirectory(res, opts.package, onfile); + } else loadAsFile(res, opts.package, onfile); + } else loadNodeModules(x, y, function (err, n, pkg) { + if (err) cb(err); + else if (n) cb(null, n, pkg); + else if (core[x]) return cb(null, x); + else { + var moduleError = new Error("Cannot find module '" + x + "' from '" + y + "'"); + moduleError.code = 'MODULE_NOT_FOUND'; + cb(moduleError); + } + }); + + function onfile(err, m, pkg) { + if (err) cb(err); + else if (m) cb(null, m, pkg); + else loadAsDirectory(res, function (err, d, pkg) { + if (err) cb(err); + else if (d) cb(null, d, pkg); + else { + var moduleError = new Error("Cannot find module '" + x + "' from '" + y + "'"); + moduleError.code = 'MODULE_NOT_FOUND'; + cb(moduleError); + } + }); + } + + function loadAsFile(x, thePackage, callback) { + var loadAsFilePackage = thePackage; + var cb = callback; + if (typeof loadAsFilePackage === 'function') { + cb = loadAsFilePackage; + loadAsFilePackage = undefined; + } + + var exts = [''].concat(extensions); + load(exts, x, loadAsFilePackage); + + function load(exts, x, loadPackage) { + if (exts.length === 0) return cb(null, undefined, loadPackage); + var file = x + exts[0]; + + var pkg = loadPackage; + if (pkg) onpkg(null, pkg); + else loadpkg(path.dirname(file), onpkg); + + function onpkg(err, pkg_, dir) { + pkg = pkg_; + if (err) return cb(err); + if (dir && pkg && opts.pathFilter) { + var rfile = path.relative(dir, file); + var rel = rfile.slice(0, rfile.length - exts[0].length); + var r = opts.pathFilter(pkg, x, rel); + if (r) return load( + [''].concat(extensions.slice()), + path.resolve(dir, r), + pkg + ); + } + isFile(file, onex); + } + function onex(err, ex) { + if (err) return cb(err); + if (ex) return cb(null, file, pkg); + load(exts.slice(1), x, pkg); + } + } + } + + function loadpkg(dir, cb) { + if (dir === '' || dir === '/') return cb(null); + if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) { + return cb(null); + } + if (/[/\\]node_modules[/\\]*$/.test(dir)) return cb(null); + + var pkgfile = path.join(dir, 'package.json'); + isFile(pkgfile, function (err, ex) { + // on err, ex is false + if (!ex) return loadpkg(path.dirname(dir), cb); + + readFile(pkgfile, function (err, body) { + if (err) cb(err); + try { var pkg = JSON.parse(body); } catch (jsonErr) {} + + if (pkg && opts.packageFilter) { + pkg = opts.packageFilter(pkg, pkgfile); + } + cb(null, pkg, dir); + }); + }); + } + + function loadAsDirectory(x, loadAsDirectoryPackage, callback) { + var cb = callback; + var fpkg = loadAsDirectoryPackage; + if (typeof fpkg === 'function') { + cb = fpkg; + fpkg = opts.package; + } + + var pkgfile = path.join(x, 'package.json'); + isFile(pkgfile, function (err, ex) { + if (err) return cb(err); + if (!ex) return loadAsFile(path.join(x, 'index'), fpkg, cb); + + readFile(pkgfile, function (err, body) { + if (err) return cb(err); + try { + var pkg = JSON.parse(body); + } catch (jsonErr) {} + + if (opts.packageFilter) { + pkg = opts.packageFilter(pkg, pkgfile); + } + + if (pkg.main) { + if (pkg.main === '.' || pkg.main === './') { + pkg.main = 'index'; + } + loadAsFile(path.resolve(x, pkg.main), pkg, function (err, m, pkg) { + if (err) return cb(err); + if (m) return cb(null, m, pkg); + if (!pkg) return loadAsFile(path.join(x, 'index'), pkg, cb); + + var dir = path.resolve(x, pkg.main); + loadAsDirectory(dir, pkg, function (err, n, pkg) { + if (err) return cb(err); + if (n) return cb(null, n, pkg); + loadAsFile(path.join(x, 'index'), pkg, cb); + }); + }); + return; + } + + loadAsFile(path.join(x, '/index'), pkg, cb); + }); + }); + } + + function processDirs(cb, dirs) { + if (dirs.length === 0) return cb(null, undefined); + var dir = dirs[0]; + + var file = path.join(dir, x); + loadAsFile(file, undefined, onfile); + + function onfile(err, m, pkg) { + if (err) return cb(err); + if (m) return cb(null, m, pkg); + loadAsDirectory(path.join(dir, x), undefined, ondir); + } + + function ondir(err, n, pkg) { + if (err) return cb(err); + if (n) return cb(null, n, pkg); + processDirs(cb, dirs.slice(1)); + } + } + function loadNodeModules(x, start, cb) { + processDirs(cb, nodeModulesPaths(start, opts)); + } +}; diff --git a/node_modules/resolve/lib/caller.js b/node_modules/resolve/lib/caller.js new file mode 100644 index 0000000..b14a280 --- /dev/null +++ b/node_modules/resolve/lib/caller.js @@ -0,0 +1,8 @@ +module.exports = function () { + // see https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi + var origPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = function (_, stack) { return stack; }; + var stack = (new Error()).stack; + Error.prepareStackTrace = origPrepareStackTrace; + return stack[2].getFileName(); +}; diff --git a/node_modules/resolve/lib/core.js b/node_modules/resolve/lib/core.js new file mode 100644 index 0000000..ad9efd1 --- /dev/null +++ b/node_modules/resolve/lib/core.js @@ -0,0 +1,22 @@ +var current = (process.versions && process.versions.node && process.versions.node.split('.')) || []; + +function versionIncluded(version) { + if (version === '*') return true; + var versionParts = version.split('.'); + for (var i = 0; i < 3; ++i) { + if ((current[i] || 0) >= (versionParts[i] || 0)) return true; + } + return false; +} + +var data = require('./core.json'); + +var core = {}; +for (var version in data) { // eslint-disable-line no-restricted-syntax + if (Object.prototype.hasOwnProperty.call(data, version) && versionIncluded(version)) { + for (var i = 0; i < data[version].length; ++i) { + core[data[version][i]] = true; + } + } +} +module.exports = core; diff --git a/node_modules/resolve/lib/core.json b/node_modules/resolve/lib/core.json new file mode 100644 index 0000000..843844e --- /dev/null +++ b/node_modules/resolve/lib/core.json @@ -0,0 +1,47 @@ +{ + "*": [ + "assert", + "buffer_ieee754", + "buffer", + "child_process", + "cluster", + "console", + "constants", + "crypto", + "_debugger", + "dgram", + "dns", + "domain", + "events", + "freelist", + "fs", + "http", + "https", + "_linklist", + "module", + "net", + "os", + "path", + "punycode", + "querystring", + "readline", + "repl", + "stream", + "string_decoder", + "sys", + "timers", + "tls", + "tty", + "url", + "util", + "vm", + "zlib" + ], + "0.11": [ + "_http_server" + ], + "1.0": [ + "process", + "v8" + ] +} diff --git a/node_modules/resolve/lib/node-modules-paths.js b/node_modules/resolve/lib/node-modules-paths.js new file mode 100644 index 0000000..dc06199 --- /dev/null +++ b/node_modules/resolve/lib/node-modules-paths.js @@ -0,0 +1,35 @@ +var path = require('path'); +var parse = path.parse || require('path-parse'); + +module.exports = function nodeModulesPaths(start, opts) { + var modules = opts && opts.moduleDirectory + ? [].concat(opts.moduleDirectory) + : ['node_modules'] + ; + + // ensure that `start` is an absolute path at this point, + // resolving against the process' current working directory + var absoluteStart = path.resolve(start); + + var prefix = '/'; + if (/^([A-Za-z]:)/.test(absoluteStart)) { + prefix = ''; + } else if (/^\\\\/.test(absoluteStart)) { + prefix = '\\\\'; + } + + var paths = [absoluteStart]; + var parsed = parse(absoluteStart); + while (parsed.dir !== paths[paths.length - 1]) { + paths.push(parsed.dir); + parsed = parse(parsed.dir); + } + + var dirs = paths.reduce(function (dirs, aPath) { + return dirs.concat(modules.map(function (moduleDir) { + return path.join(prefix, aPath, moduleDir); + })); + }, []); + + return opts && opts.paths ? dirs.concat(opts.paths) : dirs; +}; diff --git a/node_modules/resolve/lib/sync.js b/node_modules/resolve/lib/sync.js new file mode 100644 index 0000000..510ca25 --- /dev/null +++ b/node_modules/resolve/lib/sync.js @@ -0,0 +1,89 @@ +var core = require('./core'); +var fs = require('fs'); +var path = require('path'); +var caller = require('./caller.js'); +var nodeModulesPaths = require('./node-modules-paths.js'); + +module.exports = function (x, options) { + if (typeof x !== 'string') { + throw new TypeError('Path must be a string.'); + } + var opts = options || {}; + var isFile = opts.isFile || function (file) { + try { + var stat = fs.statSync(file); + } catch (e) { + if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; + throw e; + } + return stat.isFile() || stat.isFIFO(); + }; + var readFileSync = opts.readFileSync || fs.readFileSync; + + var extensions = opts.extensions || ['.js']; + var y = opts.basedir || path.dirname(caller()); + + opts.paths = opts.paths || []; + + if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(x)) { + var res = path.resolve(y, x); + if (x === '..' || x.slice(-1) === '/') res += '/'; + var m = loadAsFileSync(res) || loadAsDirectorySync(res); + if (m) return m; + } else { + var n = loadNodeModulesSync(x, y); + if (n) return n; + } + + if (core[x]) return x; + + var err = new Error("Cannot find module '" + x + "' from '" + y + "'"); + err.code = 'MODULE_NOT_FOUND'; + throw err; + + function loadAsFileSync(x) { + if (isFile(x)) { + return x; + } + + for (var i = 0; i < extensions.length; i++) { + var file = x + extensions[i]; + if (isFile(file)) { + return file; + } + } + } + + function loadAsDirectorySync(x) { + var pkgfile = path.join(x, '/package.json'); + if (isFile(pkgfile)) { + var body = readFileSync(pkgfile, 'utf8'); + try { + var pkg = JSON.parse(body); + if (opts.packageFilter) { + pkg = opts.packageFilter(pkg, x); + } + + if (pkg.main) { + var m = loadAsFileSync(path.resolve(x, pkg.main)); + if (m) return m; + var n = loadAsDirectorySync(path.resolve(x, pkg.main)); + if (n) return n; + } + } catch (e) {} + } + + return loadAsFileSync(path.join(x, '/index')); + } + + function loadNodeModulesSync(x, start) { + var dirs = nodeModulesPaths(start, opts); + for (var i = 0; i < dirs.length; i++) { + var dir = dirs[i]; + var m = loadAsFileSync(path.join(dir, '/', x)); + if (m) return m; + var n = loadAsDirectorySync(path.join(dir, '/', x)); + if (n) return n; + } + } +}; diff --git a/node_modules/resolve/package.json b/node_modules/resolve/package.json new file mode 100644 index 0000000..8db3b8e --- /dev/null +++ b/node_modules/resolve/package.json @@ -0,0 +1,111 @@ +{ + "_args": [ + [ + { + "raw": "resolve@^1.3.2", + "scope": null, + "escapedName": "resolve", + "name": "resolve", + "rawSpec": "^1.3.2", + "spec": ">=1.3.2 <2.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/sequelize-cli" + ] + ], + "_from": "resolve@>=1.3.2 <2.0.0", + "_id": "resolve@1.3.3", + "_inCache": true, + "_location": "/resolve", + "_nodeVersion": "7.9.0", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/resolve-1.3.3.tgz_1492668562208_0.1827435742598027" + }, + "_npmUser": { + "name": "ljharb", + "email": "ljharb@gmail.com" + }, + "_npmVersion": "4.2.0", + "_phantomChildren": {}, + "_requested": { + "raw": "resolve@^1.3.2", + "scope": null, + "escapedName": "resolve", + "name": "resolve", + "rawSpec": "^1.3.2", + "spec": ">=1.3.2 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/liftoff", + "/rechoir", + "/sequelize-cli", + "/umzug" + ], + "_resolved": "https://registry.npmjs.org/resolve/-/resolve-1.3.3.tgz", + "_shasum": "655907c3469a8680dc2de3a275a8fdd69691f0e5", + "_shrinkwrap": null, + "_spec": "resolve@^1.3.2", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/sequelize-cli", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "bugs": { + "url": "https://github.com/substack/node-resolve/issues" + }, + "dependencies": { + "path-parse": "^1.0.5" + }, + "description": "resolve like require.resolve() on behalf of files asynchronously and synchronously", + "devDependencies": { + "@ljharb/eslint-config": "^11.0.0", + "eslint": "^3.19.0", + "object-keys": "^1.0.11", + "safe-publish-latest": "^1.1.1", + "tap": "0.4.13", + "tape": "^4.6.3" + }, + "directories": {}, + "dist": { + "shasum": "655907c3469a8680dc2de3a275a8fdd69691f0e5", + "tarball": "https://registry.npmjs.org/resolve/-/resolve-1.3.3.tgz" + }, + "gitHead": "f0098226a4fd0dedc85b5f1e8ca8aac6a7ca7a60", + "homepage": "https://github.com/substack/node-resolve#readme", + "keywords": [ + "resolve", + "require", + "node", + "module" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "ljharb", + "email": "ljharb@gmail.com" + }, + { + "name": "substack", + "email": "substack@gmail.com" + } + ], + "name": "resolve", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/substack/node-resolve.git" + }, + "scripts": { + "lint": "eslint .", + "prepublish": "safe-publish-latest", + "pretest": "npm run lint", + "test": "npm run --silent tests-only", + "tests-only": "tape test/*.js" + }, + "version": "1.3.3" +} diff --git a/node_modules/resolve/readme.markdown b/node_modules/resolve/readme.markdown new file mode 100644 index 0000000..db0d69f --- /dev/null +++ b/node_modules/resolve/readme.markdown @@ -0,0 +1,148 @@ +# resolve + +implements the [node `require.resolve()` +algorithm](https://nodejs.org/api/modules.html#modules_all_together) +such that you can `require.resolve()` on behalf of a file asynchronously and +synchronously + +[![build status](https://secure.travis-ci.org/substack/node-resolve.png)](http://travis-ci.org/substack/node-resolve) + +# example + +asynchronously resolve: + +``` js +var resolve = require('resolve'); +resolve('tap', { basedir: __dirname }, function (err, res) { + if (err) console.error(err) + else console.log(res) +}); +``` + +``` +$ node example/async.js +/home/substack/projects/node-resolve/node_modules/tap/lib/main.js +``` + +synchronously resolve: + +``` js +var resolve = require('resolve'); +var res = resolve.sync('tap', { basedir: __dirname }); +console.log(res); +``` + +``` +$ node example/sync.js +/home/substack/projects/node-resolve/node_modules/tap/lib/main.js +``` + +# methods + +``` js +var resolve = require('resolve') +``` + +## resolve(id, opts={}, cb) + +Asynchronously resolve the module path string `id` into `cb(err, res [, pkg])`, where `pkg` (if defined) is the data from `package.json`. + +options are: + +* opts.basedir - directory to begin resolving from + +* opts.package - `package.json` data applicable to the module being loaded + +* opts.extensions - array of file extensions to search in order + +* opts.readFile - how to read files asynchronously + +* opts.isFile - function to asynchronously test whether a file exists + +* opts.packageFilter - transform the parsed package.json contents before looking +at the "main" field + +* opts.pathFilter(pkg, path, relativePath) - transform a path within a package + * pkg - package data + * path - the path being resolved + * relativePath - the path relative from the package.json location + * returns - a relative path that will be joined from the package.json location + +* opts.paths - require.paths array to use if nothing is found on the normal +node_modules recursive walk (probably don't use this) + +* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"` + +default `opts` values: + +``` javascript +{ + paths: [], + basedir: __dirname, + extensions: [ '.js' ], + readFile: fs.readFile, + isFile: function (file, cb) { + fs.stat(file, function (err, stat) { + if (err && err.code === 'ENOENT') cb(null, false) + else if (err) cb(err) + else cb(null, stat.isFile()) + }); + }, + moduleDirectory: 'node_modules' +} +``` + +## resolve.sync(id, opts) + +Synchronously resolve the module path string `id`, returning the result and +throwing an error when `id` can't be resolved. + +options are: + +* opts.basedir - directory to begin resolving from + +* opts.extensions - array of file extensions to search in order + +* opts.readFile - how to read files synchronously + +* opts.isFile - function to synchronously test whether a file exists + +* `opts.packageFilter(pkg, pkgfile)` - transform the parsed package.json +* contents before looking at the "main" field + +* opts.paths - require.paths array to use if nothing is found on the normal +node_modules recursive walk (probably don't use this) + +* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"` + +default `opts` values: + +``` javascript +{ + paths: [], + basedir: __dirname, + extensions: [ '.js' ], + readFileSync: fs.readFileSync, + isFile: function (file) { + try { return fs.statSync(file).isFile() } + catch (e) { return false } + }, + moduleDirectory: 'node_modules' +} +```` + +## resolve.isCore(pkg) + +Return whether a package is in core. + +# install + +With [npm](https://npmjs.org) do: + +``` +npm install resolve +``` + +# license + +MIT diff --git a/node_modules/resolve/test/core.js b/node_modules/resolve/test/core.js new file mode 100644 index 0000000..1182e0c --- /dev/null +++ b/node_modules/resolve/test/core.js @@ -0,0 +1,29 @@ +var test = require('tape'); +var resolve = require('../'); + +test('core modules', function (t) { + t.test('isCore()', function (st) { + st.ok(resolve.isCore('fs')); + st.ok(resolve.isCore('net')); + st.ok(resolve.isCore('http')); + + st.ok(!resolve.isCore('seq')); + st.ok(!resolve.isCore('../')); + st.end(); + }); + + t.test('core list', function (st) { + st.plan(resolve.core.length); + + for (var i = 0; i < resolve.core.length; ++i) { + st.doesNotThrow( + function () { require(resolve.core[i]); }, // eslint-disable-line no-loop-func + 'requiring ' + resolve.core[i] + ' does not throw' + ); + } + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/resolve/test/dotdot.js b/node_modules/resolve/test/dotdot.js new file mode 100644 index 0000000..3080665 --- /dev/null +++ b/node_modules/resolve/test/dotdot.js @@ -0,0 +1,29 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('dotdot', function (t) { + t.plan(4); + var dir = path.join(__dirname, '/dotdot/abc'); + + resolve('..', { basedir: dir }, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(__dirname, 'dotdot/index.js')); + }); + + resolve('.', { basedir: dir }, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, 'index.js')); + }); +}); + +test('dotdot sync', function (t) { + t.plan(2); + var dir = path.join(__dirname, '/dotdot/abc'); + + var a = resolve.sync('..', { basedir: dir }); + t.equal(a, path.join(__dirname, 'dotdot/index.js')); + + var b = resolve.sync('.', { basedir: dir }); + t.equal(b, path.join(dir, 'index.js')); +}); diff --git a/node_modules/resolve/test/dotdot/abc/index.js b/node_modules/resolve/test/dotdot/abc/index.js new file mode 100644 index 0000000..67f2534 --- /dev/null +++ b/node_modules/resolve/test/dotdot/abc/index.js @@ -0,0 +1,2 @@ +var x = require('..'); +console.log(x); diff --git a/node_modules/resolve/test/dotdot/index.js b/node_modules/resolve/test/dotdot/index.js new file mode 100644 index 0000000..643f9fc --- /dev/null +++ b/node_modules/resolve/test/dotdot/index.js @@ -0,0 +1 @@ +module.exports = 'whatever'; diff --git a/node_modules/resolve/test/faulty_basedir.js b/node_modules/resolve/test/faulty_basedir.js new file mode 100644 index 0000000..e20d937 --- /dev/null +++ b/node_modules/resolve/test/faulty_basedir.js @@ -0,0 +1,13 @@ +var test = require('tape'); +var resolve = require('../'); + +test('faulty basedir must produce error in windows', { skip: process.platform !== 'win32' }, function (t) { + t.plan(1); + + var resolverDir = 'C:\\a\\b\\c\\d'; + + resolve('tape/lib/test.js', { basedir: resolverDir }, function (err, res, pkg) { + t.equal(true, !!err); + }); + +}); diff --git a/node_modules/resolve/test/filter.js b/node_modules/resolve/test/filter.js new file mode 100644 index 0000000..51a753f --- /dev/null +++ b/node_modules/resolve/test/filter.js @@ -0,0 +1,19 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('filter', function (t) { + t.plan(2); + var dir = path.join(__dirname, 'resolver'); + resolve('./baz', { + basedir: dir, + packageFilter: function (pkg) { + pkg.main = 'doom'; + return pkg; + } + }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'baz/doom.js')); + t.equal(pkg.main, 'doom'); + }); +}); diff --git a/node_modules/resolve/test/filter_sync.js b/node_modules/resolve/test/filter_sync.js new file mode 100644 index 0000000..fd4e97c --- /dev/null +++ b/node_modules/resolve/test/filter_sync.js @@ -0,0 +1,16 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('filter', function (t) { + var dir = path.join(__dirname, 'resolver'); + var res = resolve.sync('./baz', { + basedir: dir, + packageFilter: function (pkg) { + pkg.main = 'doom'; + return pkg; + } + }); + t.equal(res, path.join(dir, 'baz/doom.js')); + t.end(); +}); diff --git a/node_modules/resolve/test/mock.js b/node_modules/resolve/test/mock.js new file mode 100644 index 0000000..a88059d --- /dev/null +++ b/node_modules/resolve/test/mock.js @@ -0,0 +1,143 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('mock', function (t) { + t.plan(8); + + var files = {}; + files[path.resolve('/foo/bar/baz.js')] = 'beep'; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file, cb) { + cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); + }, + readFile: function (file, cb) { + cb(null, files[path.resolve(file)]); + } + }; + } + + resolve('./baz', opts('/foo/bar'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/bar/baz.js')); + t.equal(pkg, undefined); + }); + + resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/bar/baz.js')); + t.equal(pkg, undefined); + }); + + resolve('baz', opts('/foo/bar'), function (err, res) { + t.equal(err.message, "Cannot find module 'baz' from '" + path.resolve('/foo/bar') + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); + + resolve('../baz', opts('/foo/bar'), function (err, res) { + t.equal(err.message, "Cannot find module '../baz' from '" + path.resolve('/foo/bar') + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); +}); + +test('mock from package', function (t) { + t.plan(8); + + var files = {}; + files[path.resolve('/foo/bar/baz.js')] = 'beep'; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file, cb) { + cb(null, Object.prototype.hasOwnProperty.call(files, file)); + }, + 'package': { main: 'bar' }, + readFile: function (file, cb) { + cb(null, files[file]); + } + }; + } + + resolve('./baz', opts('/foo/bar'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/bar/baz.js')); + t.equal(pkg && pkg.main, 'bar'); + }); + + resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/bar/baz.js')); + t.equal(pkg && pkg.main, 'bar'); + }); + + resolve('baz', opts('/foo/bar'), function (err, res) { + t.equal(err.message, "Cannot find module 'baz' from '" + path.resolve('/foo/bar') + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); + + resolve('../baz', opts('/foo/bar'), function (err, res) { + t.equal(err.message, "Cannot find module '../baz' from '" + path.resolve('/foo/bar') + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); +}); + +test('mock package', function (t) { + t.plan(2); + + var files = {}; + files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep'; + files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ + main: './baz.js' + }); + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file, cb) { + cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); + }, + readFile: function (file, cb) { + cb(null, files[path.resolve(file)]); + } + }; + } + + resolve('bar', opts('/foo'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/node_modules/bar/baz.js')); + t.equal(pkg && pkg.main, './baz.js'); + }); +}); + +test('mock package from package', function (t) { + t.plan(2); + + var files = {}; + files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep'; + files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ + main: './baz.js' + }); + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file, cb) { + cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); + }, + 'package': { main: 'bar' }, + readFile: function (file, cb) { + cb(null, files[path.resolve(file)]); + } + }; + } + + resolve('bar', opts('/foo'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/node_modules/bar/baz.js')); + t.equal(pkg && pkg.main, './baz.js'); + }); +}); diff --git a/node_modules/resolve/test/mock_sync.js b/node_modules/resolve/test/mock_sync.js new file mode 100644 index 0000000..43af102 --- /dev/null +++ b/node_modules/resolve/test/mock_sync.js @@ -0,0 +1,67 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('mock', function (t) { + t.plan(4); + + var files = {}; + files[path.resolve('/foo/bar/baz.js')] = 'beep'; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file) { + return Object.prototype.hasOwnProperty.call(files, file); + }, + readFileSync: function (file) { + return files[file]; + } + }; + } + + t.equal( + resolve.sync('./baz', opts('/foo/bar')), + path.resolve('/foo/bar/baz.js') + ); + + t.equal( + resolve.sync('./baz.js', opts('/foo/bar')), + path.resolve('/foo/bar/baz.js') + ); + + t.throws(function () { + resolve.sync('baz', opts('/foo/bar')); + }); + + t.throws(function () { + resolve.sync('../baz', opts('/foo/bar')); + }); +}); + +test('mock package', function (t) { + t.plan(1); + + var files = {}; + files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep'; + files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ + main: './baz.js' + }); + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file) { + return Object.prototype.hasOwnProperty.call(files, file); + }, + readFileSync: function (file) { + return files[file]; + } + }; + } + + t.equal( + resolve.sync('bar', opts('/foo')), + path.resolve('/foo/node_modules/bar/baz.js') + ); +}); diff --git a/node_modules/resolve/test/module_dir.js b/node_modules/resolve/test/module_dir.js new file mode 100644 index 0000000..b50e5bb --- /dev/null +++ b/node_modules/resolve/test/module_dir.js @@ -0,0 +1,56 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('moduleDirectory strings', function (t) { + t.plan(4); + var dir = path.join(__dirname, 'module_dir'); + var xopts = { + basedir: dir, + moduleDirectory: 'xmodules' + }; + resolve('aaa', xopts, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, '/xmodules/aaa/index.js')); + }); + + var yopts = { + basedir: dir, + moduleDirectory: 'ymodules' + }; + resolve('aaa', yopts, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, '/ymodules/aaa/index.js')); + }); +}); + +test('moduleDirectory array', function (t) { + t.plan(6); + var dir = path.join(__dirname, 'module_dir'); + var aopts = { + basedir: dir, + moduleDirectory: ['xmodules', 'ymodules', 'zmodules'] + }; + resolve('aaa', aopts, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, '/xmodules/aaa/index.js')); + }); + + var bopts = { + basedir: dir, + moduleDirectory: ['zmodules', 'ymodules', 'xmodules'] + }; + resolve('aaa', bopts, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, '/ymodules/aaa/index.js')); + }); + + var copts = { + basedir: dir, + moduleDirectory: ['xmodules', 'ymodules', 'zmodules'] + }; + resolve('bbb', copts, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, '/zmodules/bbb/main.js')); + }); +}); diff --git a/node_modules/resolve/test/module_dir/xmodules/aaa/index.js b/node_modules/resolve/test/module_dir/xmodules/aaa/index.js new file mode 100644 index 0000000..dd7cf7b --- /dev/null +++ b/node_modules/resolve/test/module_dir/xmodules/aaa/index.js @@ -0,0 +1 @@ +module.exports = function (x) { return x * 100; }; diff --git a/node_modules/resolve/test/module_dir/ymodules/aaa/index.js b/node_modules/resolve/test/module_dir/ymodules/aaa/index.js new file mode 100644 index 0000000..ef2d4d4 --- /dev/null +++ b/node_modules/resolve/test/module_dir/ymodules/aaa/index.js @@ -0,0 +1 @@ +module.exports = function (x) { return x + 100; }; diff --git a/node_modules/resolve/test/module_dir/zmodules/bbb/main.js b/node_modules/resolve/test/module_dir/zmodules/bbb/main.js new file mode 100644 index 0000000..e8ba629 --- /dev/null +++ b/node_modules/resolve/test/module_dir/zmodules/bbb/main.js @@ -0,0 +1 @@ +module.exports = function (n) { return n * 111; }; diff --git a/node_modules/resolve/test/module_dir/zmodules/bbb/package.json b/node_modules/resolve/test/module_dir/zmodules/bbb/package.json new file mode 100644 index 0000000..c13b8cf --- /dev/null +++ b/node_modules/resolve/test/module_dir/zmodules/bbb/package.json @@ -0,0 +1,3 @@ +{ + "main": "main.js" +} diff --git a/node_modules/resolve/test/node-modules-paths.js b/node_modules/resolve/test/node-modules-paths.js new file mode 100644 index 0000000..a917f06 --- /dev/null +++ b/node_modules/resolve/test/node-modules-paths.js @@ -0,0 +1,93 @@ +var test = require('tape'); +var path = require('path'); +var parse = path.parse || require('path-parse'); +var keys = require('object-keys'); + +var nodeModulesPaths = require('../lib/node-modules-paths'); + +var verifyDirs = function verifyDirs(t, start, dirs, moduleDirectories, paths) { + var moduleDirs = [].concat(moduleDirectories || 'node_modules'); + + var foundModuleDirs = {}; + var uniqueDirs = {}; + var parsedDirs = {}; + for (var i = 0; i < dirs.length; ++i) { + var parsed = parse(dirs[i]); + if (!foundModuleDirs[parsed.base]) { foundModuleDirs[parsed.base] = 0; } + foundModuleDirs[parsed.base] += 1; + parsedDirs[parsed.dir] = true; + uniqueDirs[dirs[i]] = true; + } + t.equal(keys(parsedDirs).length >= start.split(path.sep).length, true, 'there are >= dirs than "start" has'); + var foundModuleDirNames = keys(foundModuleDirs); + t.deepEqual(foundModuleDirNames, moduleDirs.concat(paths || []), 'all desired module dirs were found'); + t.equal(keys(uniqueDirs).length, dirs.length, 'all dirs provided were unique'); + + var counts = {}; + for (var j = 0; j < foundModuleDirNames.length; ++j) { + counts[foundModuleDirs[j]] = true; + } + t.equal(keys(counts).length, 1, 'all found module directories had the same count'); +}; + +test('node-modules-paths', function (t) { + t.test('no options', function (t) { + var start = path.join(__dirname, 'resolver'); + var dirs = nodeModulesPaths(start); + + verifyDirs(t, start, dirs); + + t.end(); + }); + + t.test('empty options', function (t) { + var start = path.join(__dirname, 'resolver'); + var dirs = nodeModulesPaths(start, {}); + + verifyDirs(t, start, dirs); + + t.end(); + }); + + t.test('with paths option', function (t) { + var start = path.join(__dirname, 'resolver'); + var paths = ['a', 'b']; + var dirs = nodeModulesPaths(start, { paths: paths }); + + verifyDirs(t, start, dirs, null, paths); + + t.end(); + }); + + t.test('with moduleDirectory option', function (t) { + var start = path.join(__dirname, 'resolver'); + var moduleDirectory = 'not node modules'; + var dirs = nodeModulesPaths(start, { moduleDirectory: moduleDirectory }); + + verifyDirs(t, start, dirs, moduleDirectory); + + t.end(); + }); + + t.test('with 1 moduleDirectory and paths options', function (t) { + var start = path.join(__dirname, 'resolver'); + var paths = ['a', 'b']; + var moduleDirectory = 'not node modules'; + var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectory }); + + verifyDirs(t, start, dirs, moduleDirectory, paths); + + t.end(); + }); + + t.test('with 1+ moduleDirectory and paths options', function (t) { + var start = path.join(__dirname, 'resolver'); + var paths = ['a', 'b']; + var moduleDirectories = ['not node modules', 'other modules']; + var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories }); + + verifyDirs(t, start, dirs, moduleDirectories, paths); + + t.end(); + }); +}); diff --git a/node_modules/resolve/test/node_path.js b/node_modules/resolve/test/node_path.js new file mode 100644 index 0000000..38a7d7e --- /dev/null +++ b/node_modules/resolve/test/node_path.js @@ -0,0 +1,49 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('$NODE_PATH', function (t) { + t.plan(4); + + resolve('aaa', { + paths: [ + path.join(__dirname, '/node_path/x'), + path.join(__dirname, '/node_path/y') + ], + basedir: __dirname + }, function (err, res) { + t.equal(res, path.join(__dirname, '/node_path/x/aaa/index.js')); + }); + + resolve('bbb', { + paths: [ + path.join(__dirname, '/node_path/x'), + path.join(__dirname, '/node_path/y') + ], + basedir: __dirname + }, function (err, res) { + t.equal(res, path.join(__dirname, '/node_path/y/bbb/index.js')); + }); + + resolve('ccc', { + paths: [ + path.join(__dirname, '/node_path/x'), + path.join(__dirname, '/node_path/y') + ], + basedir: __dirname + }, function (err, res) { + t.equal(res, path.join(__dirname, '/node_path/x/ccc/index.js')); + }); + + // ensure that relative paths still resolve against the + // regular `node_modules` correctly + resolve('tap', { + paths: [ + 'node_path' + ], + basedir: 'node_path/x' + }, function (err, res) { + var root = require('tap/package.json').main; + t.equal(res, path.resolve(__dirname, '..', 'node_modules/tap', root)); + }); +}); diff --git a/node_modules/resolve/test/node_path/x/aaa/index.js b/node_modules/resolve/test/node_path/x/aaa/index.js new file mode 100644 index 0000000..ad70d0b --- /dev/null +++ b/node_modules/resolve/test/node_path/x/aaa/index.js @@ -0,0 +1 @@ +module.exports = 'A'; diff --git a/node_modules/resolve/test/node_path/x/ccc/index.js b/node_modules/resolve/test/node_path/x/ccc/index.js new file mode 100644 index 0000000..a64132e --- /dev/null +++ b/node_modules/resolve/test/node_path/x/ccc/index.js @@ -0,0 +1 @@ +module.exports = 'C'; diff --git a/node_modules/resolve/test/node_path/y/bbb/index.js b/node_modules/resolve/test/node_path/y/bbb/index.js new file mode 100644 index 0000000..4d0f32e --- /dev/null +++ b/node_modules/resolve/test/node_path/y/bbb/index.js @@ -0,0 +1 @@ +module.exports = 'B'; diff --git a/node_modules/resolve/test/node_path/y/ccc/index.js b/node_modules/resolve/test/node_path/y/ccc/index.js new file mode 100644 index 0000000..793315e --- /dev/null +++ b/node_modules/resolve/test/node_path/y/ccc/index.js @@ -0,0 +1 @@ +module.exports = 'CY'; diff --git a/node_modules/resolve/test/nonstring.js b/node_modules/resolve/test/nonstring.js new file mode 100644 index 0000000..ef63c40 --- /dev/null +++ b/node_modules/resolve/test/nonstring.js @@ -0,0 +1,9 @@ +var test = require('tape'); +var resolve = require('../'); + +test('nonstring', function (t) { + t.plan(1); + resolve(555, function (err, res, pkg) { + t.ok(err); + }); +}); diff --git a/node_modules/resolve/test/pathfilter.js b/node_modules/resolve/test/pathfilter.js new file mode 100644 index 0000000..733045a --- /dev/null +++ b/node_modules/resolve/test/pathfilter.js @@ -0,0 +1,42 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('#62: deep module references and the pathFilter', function (t) { + t.plan(9); + + var resolverDir = path.join(__dirname, '/pathfilter/deep_ref'); + var pathFilter = function (pkg, x, remainder) { + t.equal(pkg.version, '1.2.3'); + t.equal(x, path.join(resolverDir, 'node_modules/deep/ref')); + t.equal(remainder, 'ref'); + return 'alt'; + }; + + resolve('deep/ref', { basedir: resolverDir }, function (err, res, pkg) { + if (err) t.fail(err); + + t.equal(pkg.version, '1.2.3'); + t.equal(res, path.join(resolverDir, 'node_modules/deep/ref.js')); + }); + + resolve( + 'deep/deeper/ref', + { basedir: resolverDir }, + function (err, res, pkg) { + if (err) t.fail(err); + t.notEqual(pkg, undefined); + t.equal(pkg.version, '1.2.3'); + t.equal(res, path.join(resolverDir, 'node_modules/deep/deeper/ref.js')); + } + ); + + resolve( + 'deep/ref', + { basedir: resolverDir, pathFilter: pathFilter }, + function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(resolverDir, 'node_modules/deep/alt.js')); + } + ); +}); diff --git a/node_modules/resolve/test/pathfilter/deep_ref/main.js b/node_modules/resolve/test/pathfilter/deep_ref/main.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/precedence.js b/node_modules/resolve/test/precedence.js new file mode 100644 index 0000000..2febb59 --- /dev/null +++ b/node_modules/resolve/test/precedence.js @@ -0,0 +1,23 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('precedence', function (t) { + t.plan(3); + var dir = path.join(__dirname, 'precedence/aaa'); + + resolve('./', { basedir: dir }, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, 'index.js')); + t.equal(pkg.name, 'resolve'); + }); +}); + +test('./ should not load ${dir}.js', function (t) { // eslint-disable-line no-template-curly-in-string + t.plan(1); + var dir = path.join(__dirname, 'precedence/bbb'); + + resolve('./', { basedir: dir }, function (err, res, pkg) { + t.ok(err); + }); +}); diff --git a/node_modules/resolve/test/precedence/aaa.js b/node_modules/resolve/test/precedence/aaa.js new file mode 100644 index 0000000..b83a3e7 --- /dev/null +++ b/node_modules/resolve/test/precedence/aaa.js @@ -0,0 +1 @@ +module.exports = 'wtf'; diff --git a/node_modules/resolve/test/precedence/aaa/index.js b/node_modules/resolve/test/precedence/aaa/index.js new file mode 100644 index 0000000..e0f8f6a --- /dev/null +++ b/node_modules/resolve/test/precedence/aaa/index.js @@ -0,0 +1 @@ +module.exports = 'okok'; diff --git a/node_modules/resolve/test/precedence/aaa/main.js b/node_modules/resolve/test/precedence/aaa/main.js new file mode 100644 index 0000000..93542a9 --- /dev/null +++ b/node_modules/resolve/test/precedence/aaa/main.js @@ -0,0 +1 @@ +console.log(require('./')); diff --git a/node_modules/resolve/test/precedence/bbb.js b/node_modules/resolve/test/precedence/bbb.js new file mode 100644 index 0000000..2298f47 --- /dev/null +++ b/node_modules/resolve/test/precedence/bbb.js @@ -0,0 +1 @@ +module.exports = '>_<'; diff --git a/node_modules/resolve/test/precedence/bbb/main.js b/node_modules/resolve/test/precedence/bbb/main.js new file mode 100644 index 0000000..716b81d --- /dev/null +++ b/node_modules/resolve/test/precedence/bbb/main.js @@ -0,0 +1 @@ +console.log(require('./')); // should throw diff --git a/node_modules/resolve/test/resolver.js b/node_modules/resolve/test/resolver.js new file mode 100644 index 0000000..adde544 --- /dev/null +++ b/node_modules/resolve/test/resolver.js @@ -0,0 +1,327 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('async foo', function (t) { + t.plan(10); + var dir = path.join(__dirname, 'resolver'); + + resolve('./foo', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo.js')); + t.equal(pkg && pkg.name, 'resolve'); + }); + + resolve('./foo.js', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo.js')); + t.equal(pkg && pkg.name, 'resolve'); + }); + + resolve('./foo', { basedir: dir, 'package': { main: 'resolver' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo.js')); + t.equal(pkg && pkg.main, 'resolver'); + }); + + resolve('./foo.js', { basedir: dir, 'package': { main: 'resolver' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo.js')); + t.equal(pkg.main, 'resolver'); + }); + + resolve('foo', { basedir: dir }, function (err) { + t.equal(err.message, "Cannot find module 'foo' from '" + path.resolve(dir) + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); +}); + +test('bar', function (t) { + t.plan(6); + var dir = path.join(__dirname, 'resolver'); + + resolve('foo', { basedir: dir + '/bar' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js')); + t.equal(pkg, undefined); + }); + + resolve('foo', { basedir: dir + '/bar' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js')); + t.equal(pkg, undefined); + }); + + resolve('foo', { basedir: dir + '/bar', 'package': { main: 'bar' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js')); + t.equal(pkg, undefined); + }); +}); + +test('baz', function (t) { + t.plan(4); + var dir = path.join(__dirname, 'resolver'); + + resolve('./baz', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'baz/quux.js')); + t.equal(pkg.main, 'quux.js'); + }); + + resolve('./baz', { basedir: dir, 'package': { main: 'resolver' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'baz/quux.js')); + t.equal(pkg.main, 'quux.js'); + }); +}); + +test('biz', function (t) { + t.plan(24); + var dir = path.join(__dirname, 'resolver/biz/node_modules'); + + resolve('./grux', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'grux/index.js')); + t.equal(pkg, undefined); + }); + + resolve('./grux', { basedir: dir, 'package': { main: 'biz' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'grux/index.js')); + t.equal(pkg.main, 'biz'); + }); + + resolve('./garply', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'garply/lib/index.js')); + t.equal(pkg.main, './lib'); + }); + + resolve('./garply', { basedir: dir, 'package': { main: 'biz' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'garply/lib/index.js')); + t.equal(pkg.main, './lib'); + }); + + resolve('tiv', { basedir: dir + '/grux' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'tiv/index.js')); + t.equal(pkg, undefined); + }); + + resolve('tiv', { basedir: dir + '/grux', 'package': { main: 'grux' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'tiv/index.js')); + t.equal(pkg, undefined); + }); + + resolve('tiv', { basedir: dir + '/garply' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'tiv/index.js')); + t.equal(pkg, undefined); + }); + + resolve('tiv', { basedir: dir + '/garply', 'package': { main: './lib' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'tiv/index.js')); + t.equal(pkg, undefined); + }); + + resolve('grux', { basedir: dir + '/tiv' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'grux/index.js')); + t.equal(pkg, undefined); + }); + + resolve('grux', { basedir: dir + '/tiv', 'package': { main: 'tiv' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'grux/index.js')); + t.equal(pkg, undefined); + }); + + resolve('garply', { basedir: dir + '/tiv' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'garply/lib/index.js')); + t.equal(pkg.main, './lib'); + }); + + resolve('garply', { basedir: dir + '/tiv', 'package': { main: 'tiv' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'garply/lib/index.js')); + t.equal(pkg.main, './lib'); + }); +}); + +test('quux', function (t) { + t.plan(2); + var dir = path.join(__dirname, 'resolver/quux'); + + resolve('./foo', { basedir: dir, 'package': { main: 'quux' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo/index.js')); + t.equal(pkg.main, 'quux'); + }); +}); + +test('normalize', function (t) { + t.plan(2); + var dir = path.join(__dirname, 'resolver/biz/node_modules/grux'); + + resolve('../grux', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'index.js')); + t.equal(pkg, undefined); + }); +}); + +test('cup', function (t) { + t.plan(4); + var dir = path.join(__dirname, 'resolver'); + + resolve('./cup', { basedir: dir, extensions: ['.js', '.coffee'] }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'cup.coffee')); + }); + + resolve('./cup.coffee', { basedir: dir }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'cup.coffee')); + }); + + resolve('./cup', { basedir: dir, extensions: ['.js'] }, function (err, res) { + t.equal(err.message, "Cannot find module './cup' from '" + path.resolve(dir) + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); +}); + +test('mug', function (t) { + t.plan(3); + var dir = path.join(__dirname, 'resolver'); + + resolve('./mug', { basedir: dir }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'mug.js')); + }); + + resolve('./mug', { basedir: dir, extensions: ['.coffee', '.js'] }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(dir, '/mug.coffee')); + }); + + resolve('./mug', { basedir: dir, extensions: ['.js', '.coffee'] }, function (err, res) { + t.equal(res, path.join(dir, '/mug.js')); + }); +}); + +test('other path', function (t) { + t.plan(6); + var resolverDir = path.join(__dirname, 'resolver'); + var dir = path.join(resolverDir, 'bar'); + var otherDir = path.join(resolverDir, 'other_path'); + + resolve('root', { basedir: dir, paths: [otherDir] }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(resolverDir, 'other_path/root.js')); + }); + + resolve('lib/other-lib', { basedir: dir, paths: [otherDir] }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(resolverDir, 'other_path/lib/other-lib.js')); + }); + + resolve('root', { basedir: dir }, function (err, res) { + t.equal(err.message, "Cannot find module 'root' from '" + path.resolve(dir) + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); + + resolve('zzz', { basedir: dir, paths: [otherDir] }, function (err, res) { + t.equal(err.message, "Cannot find module 'zzz' from '" + path.resolve(dir) + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); +}); + +test('incorrect main', function (t) { + t.plan(1); + + var resolverDir = path.join(__dirname, 'resolver'); + var dir = path.join(resolverDir, 'incorrect_main'); + + resolve('./incorrect_main', { basedir: resolverDir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'index.js')); + }); +}); + +test('without basedir', function (t) { + t.plan(1); + + var dir = path.join(__dirname, 'resolver/without_basedir'); + var tester = require(path.join(dir, 'main.js')); + + tester(t, function (err, res, pkg) { + if (err) { + t.fail(err); + } else { + t.equal(res, path.join(dir, 'node_modules/mymodule.js')); + } + }); +}); + +test('#25: node modules with the same name as node stdlib modules', function (t) { + t.plan(1); + + var resolverDir = path.join(__dirname, 'resolver/punycode'); + + resolve('punycode', { basedir: resolverDir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(resolverDir, 'node_modules/punycode/index.js')); + }); +}); + +test('#52 - incorrectly resolves module-paths like "./someFolder/" when there is a file of the same name', function (t) { + t.plan(2); + + var dir = path.join(__dirname, 'resolver'); + + resolve('./foo', { basedir: path.join(dir, 'same_names') }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'same_names/foo.js')); + }); + + resolve('./foo/', { basedir: path.join(dir, 'same_names') }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'same_names/foo/index.js')); + }); +}); + +test('async: #121 - treating an existing file as a dir when no basedir', function (t) { + var testFile = path.basename(__filename); + + t.test('sanity check', function (st) { + st.plan(1); + resolve('./' + testFile, function (err, res, pkg) { + if (err) t.fail(err); + st.equal(res, __filename, 'sanity check'); + }); + }); + + t.test('with a fake directory', function (st) { + st.plan(4); + + resolve('./' + testFile + '/blah', function (err, res, pkg) { + st.ok(err, 'there is an error'); + st.notOk(res, 'no result'); + + st.equal(err && err.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve'); + st.equal( + err && err.message, + 'Cannot find module \'./' + testFile + '/blah\' from \'' + __dirname + '\'', + 'can not find nonexistent module' + ); + st.end(); + }); + }); + + t.end(); +}); diff --git a/node_modules/resolve/test/resolver/baz/doom.js b/node_modules/resolve/test/resolver/baz/doom.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/baz/package.json b/node_modules/resolve/test/resolver/baz/package.json new file mode 100644 index 0000000..c41e4db --- /dev/null +++ b/node_modules/resolve/test/resolver/baz/package.json @@ -0,0 +1,3 @@ +{ + "main": "quux.js" +} diff --git a/node_modules/resolve/test/resolver/baz/quux.js b/node_modules/resolve/test/resolver/baz/quux.js new file mode 100644 index 0000000..bd816ea --- /dev/null +++ b/node_modules/resolve/test/resolver/baz/quux.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/cup.coffee b/node_modules/resolve/test/resolver/cup.coffee new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/node_modules/resolve/test/resolver/cup.coffee @@ -0,0 +1 @@ + diff --git a/node_modules/resolve/test/resolver/foo.js b/node_modules/resolve/test/resolver/foo.js new file mode 100644 index 0000000..bd816ea --- /dev/null +++ b/node_modules/resolve/test/resolver/foo.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/incorrect_main/index.js b/node_modules/resolve/test/resolver/incorrect_main/index.js new file mode 100644 index 0000000..bc1fb0a --- /dev/null +++ b/node_modules/resolve/test/resolver/incorrect_main/index.js @@ -0,0 +1,2 @@ +// this is the actual main file 'index.js', not 'wrong.js' like the package.json would indicate +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/incorrect_main/package.json b/node_modules/resolve/test/resolver/incorrect_main/package.json new file mode 100644 index 0000000..b718804 --- /dev/null +++ b/node_modules/resolve/test/resolver/incorrect_main/package.json @@ -0,0 +1,3 @@ +{ + "main": "wrong.js" +} diff --git a/node_modules/resolve/test/resolver/mug.coffee b/node_modules/resolve/test/resolver/mug.coffee new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/mug.js b/node_modules/resolve/test/resolver/mug.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/other_path/lib/other-lib.js b/node_modules/resolve/test/resolver/other_path/lib/other-lib.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/other_path/root.js b/node_modules/resolve/test/resolver/other_path/root.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/resolve/test/resolver/quux/foo/index.js b/node_modules/resolve/test/resolver/quux/foo/index.js new file mode 100644 index 0000000..bd816ea --- /dev/null +++ b/node_modules/resolve/test/resolver/quux/foo/index.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/same_names/foo.js b/node_modules/resolve/test/resolver/same_names/foo.js new file mode 100644 index 0000000..888cae3 --- /dev/null +++ b/node_modules/resolve/test/resolver/same_names/foo.js @@ -0,0 +1 @@ +module.exports = 42; diff --git a/node_modules/resolve/test/resolver/same_names/foo/index.js b/node_modules/resolve/test/resolver/same_names/foo/index.js new file mode 100644 index 0000000..bd816ea --- /dev/null +++ b/node_modules/resolve/test/resolver/same_names/foo/index.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/node_modules/resolve/test/resolver/without_basedir/main.js b/node_modules/resolve/test/resolver/without_basedir/main.js new file mode 100644 index 0000000..5b31975 --- /dev/null +++ b/node_modules/resolve/test/resolver/without_basedir/main.js @@ -0,0 +1,5 @@ +var resolve = require('../../../'); + +module.exports = function (t, cb) { + resolve('mymodule', null, cb); +}; diff --git a/node_modules/resolve/test/resolver_sync.js b/node_modules/resolve/test/resolver_sync.js new file mode 100644 index 0000000..2bc3610 --- /dev/null +++ b/node_modules/resolve/test/resolver_sync.js @@ -0,0 +1,253 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('foo', function (t) { + var dir = path.join(__dirname, 'resolver'); + + t.equal( + resolve.sync('./foo', { basedir: dir }), + path.join(dir, 'foo.js') + ); + + t.equal( + resolve.sync('./foo.js', { basedir: dir }), + path.join(dir, 'foo.js') + ); + + t.throws(function () { + resolve.sync('foo', { basedir: dir }); + }); + + t.end(); +}); + +test('bar', function (t) { + var dir = path.join(__dirname, 'resolver'); + + t.equal( + resolve.sync('foo', { basedir: path.join(dir, 'bar') }), + path.join(dir, 'bar/node_modules/foo/index.js') + ); + t.end(); +}); + +test('baz', function (t) { + var dir = path.join(__dirname, 'resolver'); + + t.equal( + resolve.sync('./baz', { basedir: dir }), + path.join(dir, 'baz/quux.js') + ); + t.end(); +}); + +test('biz', function (t) { + var dir = path.join(__dirname, 'resolver/biz/node_modules'); + t.equal( + resolve.sync('./grux', { basedir: dir }), + path.join(dir, 'grux/index.js') + ); + + t.equal( + resolve.sync('tiv', { basedir: path.join(dir, 'grux') }), + path.join(dir, 'tiv/index.js') + ); + + t.equal( + resolve.sync('grux', { basedir: path.join(dir, 'tiv') }), + path.join(dir, 'grux/index.js') + ); + t.end(); +}); + +test('normalize', function (t) { + var dir = path.join(__dirname, 'resolver/biz/node_modules/grux'); + t.equal( + resolve.sync('../grux', { basedir: dir }), + path.join(dir, 'index.js') + ); + t.end(); +}); + +test('cup', function (t) { + var dir = path.join(__dirname, 'resolver'); + t.equal( + resolve.sync('./cup', { + basedir: dir, + extensions: ['.js', '.coffee'] + }), + path.join(dir, 'cup.coffee') + ); + + t.equal( + resolve.sync('./cup.coffee', { basedir: dir }), + path.join(dir, 'cup.coffee') + ); + + t.throws(function () { + resolve.sync('./cup', { + basedir: dir, + extensions: ['.js'] + }); + }); + + t.end(); +}); + +test('mug', function (t) { + var dir = path.join(__dirname, 'resolver'); + t.equal( + resolve.sync('./mug', { basedir: dir }), + path.join(dir, 'mug.js') + ); + + t.equal( + resolve.sync('./mug', { + basedir: dir, + extensions: ['.coffee', '.js'] + }), + path.join(dir, 'mug.coffee') + ); + + t.equal( + resolve.sync('./mug', { + basedir: dir, + extensions: ['.js', '.coffee'] + }), + path.join(dir, 'mug.js') + ); + + t.end(); +}); + +test('other path', function (t) { + var resolverDir = path.join(__dirname, 'resolver'); + var dir = path.join(resolverDir, 'bar'); + var otherDir = path.join(resolverDir, 'other_path'); + + t.equal( + resolve.sync('root', { + basedir: dir, + paths: [otherDir] + }), + path.join(resolverDir, 'other_path/root.js') + ); + + t.equal( + resolve.sync('lib/other-lib', { + basedir: dir, + paths: [otherDir] + }), + path.join(resolverDir, 'other_path/lib/other-lib.js') + ); + + t.throws(function () { + resolve.sync('root', { basedir: dir }); + }); + + t.throws(function () { + resolve.sync('zzz', { + basedir: dir, + paths: [otherDir] + }); + }); + + t.end(); +}); + +test('incorrect main', function (t) { + var resolverDir = path.join(__dirname, 'resolver'); + var dir = path.join(resolverDir, 'incorrect_main'); + + t.equal( + resolve.sync('./incorrect_main', { basedir: resolverDir }), + path.join(dir, 'index.js') + ); + + t.end(); +}); + +test('#25: node modules with the same name as node stdlib modules', function (t) { + var resolverDir = path.join(__dirname, 'resolver/punycode'); + + t.equal( + resolve.sync('punycode', { basedir: resolverDir }), + path.join(resolverDir, 'node_modules/punycode/index.js') + ); + + t.end(); +}); + +var stubStatSync = function stubStatSync(fn) { + var fs = require('fs'); + var statSync = fs.statSync; + try { + fs.statSync = function () { + throw new EvalError('Unknown Error'); + }; + return fn(); + } finally { + fs.statSync = statSync; + } +}; + +test('#79 - re-throw non ENOENT errors from stat', function (t) { + var dir = path.join(__dirname, 'resolver'); + + stubStatSync(function () { + t.throws(function () { + resolve.sync('foo', { basedir: dir }); + }, /Unknown Error/); + }); + + t.end(); +}); + +test('#52 - incorrectly resolves module-paths like "./someFolder/" when there is a file of the same name', function (t) { + var dir = path.join(__dirname, 'resolver'); + + t.equal( + resolve.sync('./foo', { basedir: path.join(dir, 'same_names') }), + path.join(dir, 'same_names/foo.js') + ); + t.equal( + resolve.sync('./foo/', { basedir: path.join(dir, 'same_names') }), + path.join(dir, 'same_names/foo/index.js') + ); + t.end(); +}); + +test('sync: #121 - treating an existing file as a dir when no basedir', function (t) { + var testFile = path.basename(__filename); + + t.test('sanity check', function (st) { + st.equal( + resolve.sync('./' + testFile), + __filename, + 'sanity check' + ); + st.end(); + }); + + t.test('with a fake directory', function (st) { + function run() { return resolve.sync('./' + testFile + '/blah'); } + + st.throws(run, 'throws an error'); + + try { + run(); + } catch (e) { + st.equal(e.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve'); + st.equal( + e.message, + 'Cannot find module \'./' + testFile + '/blah\' from \'' + __dirname + '\'', + 'can not find nonexistent module' + ); + } + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/resolve/test/subdirs.js b/node_modules/resolve/test/subdirs.js new file mode 100644 index 0000000..b7b8450 --- /dev/null +++ b/node_modules/resolve/test/subdirs.js @@ -0,0 +1,13 @@ +var test = require('tape'); +var resolve = require('../'); +var path = require('path'); + +test('subdirs', function (t) { + t.plan(2); + + var dir = path.join(__dirname, '/subdirs'); + resolve('a/b/c/x.json', { basedir: dir }, function (err, res) { + t.ifError(err); + t.equal(res, path.join(dir, 'node_modules/a/b/c/x.json')); + }); +}); diff --git a/node_modules/retry-as-promised/.npmignore b/node_modules/retry-as-promised/.npmignore new file mode 100644 index 0000000..123ae94 --- /dev/null +++ b/node_modules/retry-as-promised/.npmignore @@ -0,0 +1,27 @@ +# Logs +logs +*.log + +# Runtime data +pids +*.pid +*.seed + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directory +# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git +node_modules diff --git a/node_modules/retry-as-promised/LICENSE b/node_modules/retry-as-promised/LICENSE new file mode 100644 index 0000000..d007bfb --- /dev/null +++ b/node_modules/retry-as-promised/LICENSE @@ -0,0 +1,23 @@ +The MIT License + +Copyright (c) 2015-2016 Mick Hansen. http://mhansen.io + +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. + + diff --git a/node_modules/retry-as-promised/README.md b/node_modules/retry-as-promised/README.md new file mode 100644 index 0000000..1d0bc26 --- /dev/null +++ b/node_modules/retry-as-promised/README.md @@ -0,0 +1,33 @@ +# retry-as-promised + +```sh +$ npm install --save retry-as-promised +``` + +Retry a failed promise + +```js +var retry = require('retry-as-promised'); + +var warningFn = function(msg){ someLoggingFunction(msg, 'notice'); }; + +// Will call the until max retries or the promise is resolved. +return retry(function () { + return promise; +}, { + max: 3, // maximum amount of tries + timeout: 10000 // throw if no response or error within milisecnd timeout, default: undefined, + match: [ // Must match error signature (ala bluebird catch) to continue + Sequelize.ConnectionError, + 'SQLITE_BUSY' + ], + backoffBase: 1000 // Initial backoff duration in ms. Default: 100, + backoffExponent: 1.5 // Exponent to increase backoff each try. Default: 1.1 + report: warningFn, // the function used for reporting; must have a (string, object) argument signature, where string is the message that will passed in by retry-as-promised, and the object will be this configuration object + the $current property + name: 'SourceX' // if user supplies string, it will be used when composing error/reporting messages; else if retry gets a callback, uses callback name in erroring/reporting; else (default) uses litteral string 'unknown' +}); +``` + +## Tested with + +- Bluebird diff --git a/node_modules/retry-as-promised/index.js b/node_modules/retry-as-promised/index.js new file mode 100644 index 0000000..f822d5f --- /dev/null +++ b/node_modules/retry-as-promised/index.js @@ -0,0 +1,88 @@ +var debug = require('debug')('retry-as-promised') + , error = require('debug')('retry-as-promised:error') + , Promise = require('bluebird'); + +module.exports = function retryAsPromised(callback, options) { + if (!callback || !options) throw new Error('retry-as-promised must be passed a callback and a options set or a number'); + + if (typeof options === 'number') { + options = {max: options}; + } + + // Super cheap clone + options = { + $current: options.$current || 1, + max: options.max, + timeout: options.timeout || undefined, + match: options.match || [], + backoffBase: options.backoffBase === undefined ? 100 : options.backoffBase, + backoffExponent: options.backoffExponent || 1.1, + report: options.report || null, + name: options.name || callback.name || 'unknown' + }; + + // Massage match option into array so we can blindly treat it as such later + if (!Array.isArray(options.match)) options.match = [options.match]; + + debug('Trying '+ options.name + ' (%s)', options.$current); + if(options.report) options.report('Trying ' + options.name + ' #' + options.$current + ' at ' + new Date().toLocaleTimeString(), options); + + return new Promise(function (resolve, reject) { + var timeout, backoffTimeout; + + if (options.timeout) { + timeout = setTimeout(function () { + if (backoffTimeout) clearTimeout(backoffTimeout); + reject(Promise.TimeoutError( options.name + ' timed out')); + }, options.timeout); + } + + Promise.resolve(callback()).then(resolve).tap(function () { + if (timeout) clearTimeout(timeout); + if (backoffTimeout) clearTimeout(backoffTimeout); + }).catch(function (err) { + if (timeout) clearTimeout(timeout); + if (backoffTimeout) clearTimeout(backoffTimeout); + + error(err && err.toString() || err); + if (options.report) options.report('Try ' + options.name + ' #' + options.$current + ' failed: ' + err.toString(), options, err); + + // Should not retry if max has been reached + var shouldRetry = options.$current < options.max; + + if (shouldRetry && options.match.length && err) { + // If match is defined we should fail if it is not met + shouldRetry = options.match.reduce(function (shouldRetry, match) { + if (shouldRetry) return shouldRetry; + + if (match === err.toString() || + match === err.message || + (typeof match === "function" && err instanceof match) || + (match instanceof RegExp && (match.test(err.message) || match.test(err.toString()) )) + ) { + shouldRetry = true; + } + return shouldRetry; + }, false); + } + + if (!shouldRetry) return reject(err); + + // Do some accounting + options.$current++; + + if (options.backoffBase) { + // Use backoff function to ease retry rate + options.backoffBase = Math.pow(options.backoffBase, options.backoffExponent); + debug('Delaying retry of '+ options.name+' by %s', options.backoffBase); + if(options.report) options.report('Delaying retry of ' + options.name + ' by ' + options.backoffBase, options); + backoffTimeout = setTimeout(function() { + retryAsPromised(callback, options).then(resolve).catch(reject); + }, options.backoffBase); + } else { + retryAsPromised(callback, options).then(resolve).catch(reject); + } + + }); + }); +}; diff --git a/node_modules/retry-as-promised/package.json b/node_modules/retry-as-promised/package.json new file mode 100644 index 0000000..ca42a3a --- /dev/null +++ b/node_modules/retry-as-promised/package.json @@ -0,0 +1,102 @@ +{ + "_args": [ + [ + { + "raw": "retry-as-promised@^2.0.0", + "scope": null, + "escapedName": "retry-as-promised", + "name": "retry-as-promised", + "rawSpec": "^2.0.0", + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/sequelize" + ] + ], + "_from": "retry-as-promised@>=2.0.0 <3.0.0", + "_id": "retry-as-promised@2.2.0", + "_inCache": true, + "_location": "/retry-as-promised", + "_nodeVersion": "4.0.0", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/retry-as-promised-2.2.0.tgz_1477652948471_0.21952940267510712" + }, + "_npmUser": { + "name": "mickhansen", + "email": "mick.kasper.hansen@gmail.com" + }, + "_npmVersion": "2.14.2", + "_phantomChildren": {}, + "_requested": { + "raw": "retry-as-promised@^2.0.0", + "scope": null, + "escapedName": "retry-as-promised", + "name": "retry-as-promised", + "rawSpec": "^2.0.0", + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/sequelize" + ], + "_resolved": "https://registry.npmjs.org/retry-as-promised/-/retry-as-promised-2.2.0.tgz", + "_shasum": "b0463d7fd3cf5b2fed64500ab6e8b8a49c5b8e6c", + "_shrinkwrap": null, + "_spec": "retry-as-promised@^2.0.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/sequelize", + "author": { + "name": "Mick Hansen", + "email": "maker@mhansen.io" + }, + "bugs": { + "url": "https://github.com/mickhansen/retry-as-promised/issues" + }, + "dependencies": { + "bluebird": "^3.4.6", + "cross-env": "^3.1.2", + "debug": "^2.2.0" + }, + "description": "Retry a failed promise", + "devDependencies": { + "chai": "^2.3.0", + "chai-as-promised": "^5.0.0", + "mocha": "^2.2.5", + "moment": "^2.10.6", + "q": "^1.4.1", + "sinon": "^1.15.1", + "sinon-as-promised": "^4.0.0", + "sinon-chai": "^2.8.0" + }, + "directories": {}, + "dist": { + "shasum": "b0463d7fd3cf5b2fed64500ab6e8b8a49c5b8e6c", + "tarball": "https://registry.npmjs.org/retry-as-promised/-/retry-as-promised-2.2.0.tgz" + }, + "gitHead": "b3189fbccfc99e1560596df917ab17f0c2a4009f", + "homepage": "https://github.com/mickhansen/retry-as-promised", + "keywords": [ + "retry", + "promise", + "bluebird" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "mickhansen", + "email": "mick.kasper.hansen@gmail.com" + } + ], + "name": "retry-as-promised", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/mickhansen/retry-as-promised.git" + }, + "scripts": { + "test": "cross-env DEBUG=retry-as-promised,retry-as-promised:* NODE_ENV=test ./node_modules/.bin/mocha --check-leaks --colors -t 10000 --reporter spec test/**/*.test.js test/*.test.js" + }, + "version": "2.2.0" +} diff --git a/node_modules/retry-as-promised/test/bluebird.test.js b/node_modules/retry-as-promised/test/bluebird.test.js new file mode 100644 index 0000000..57cfa5f --- /dev/null +++ b/node_modules/retry-as-promised/test/bluebird.test.js @@ -0,0 +1,186 @@ +var chai = require('chai') + , expect = chai.expect + , Promise = require('bluebird') + , moment = require('moment') + , sinon = require('sinon') + , sinonChai = require('sinon-chai') + , retry = require('../'); + +chai.use(require('chai-as-promised')); +require('sinon-as-promised')(Promise); + +describe('bluebird', function () { + var count + , soRejected + , soResolved; + + beforeEach(function () { + count = 0; + soRejected = Math.random().toString(); + soResolved = Math.random().toString(); + }); + + it('should reject immediately if max is 1 (using options)', function () { + var callback = sinon.stub(); + callback.resolves(soResolved); + callback.onCall(0).rejects(soRejected); + return expect(retry(callback, {max: 1, backoffBase: 0})).to.eventually.be.rejectedWith(soRejected).then(function () { + expect(callback.callCount).to.equal(1); + }); + }); + + it('should reject immediately if max is 1 (using integer)', function () { + var callback = sinon.stub(); + callback.resolves(soResolved); + callback.onCall(0).rejects(soRejected); + return expect(retry(callback, 1)).to.eventually.be.rejectedWith(soRejected).then(function () { + expect(callback.callCount).to.equal(1); + }); + }); + + it('should reject after all tries if still rejected', function () { + var callback = sinon.stub(); + callback.rejects(soRejected); + return expect(retry(callback, {max: 3, backoffBase: 0})).to.eventually.be.rejectedWith(soRejected).then(function () { + expect(callback.callCount).to.equal(3); + }); + }); + + it('should resolve immediately if resolved on first try', function () { + var callback = sinon.stub(); + callback.resolves(soResolved); + callback.onCall(0).resolves(soResolved); + return expect(retry(callback, {max: 10, backoffBase: 0})).to.eventually.equal(soResolved).then(function () { + expect(callback.callCount).to.equal(1); + }); + }); + + it('should resolve if resolved before hitting max', function () { + var callback = sinon.stub(); + callback.rejects(soRejected); + callback.onCall(3).resolves(soResolved); + return expect(retry(callback, {max: 10, backoffBase: 0})).to.eventually.equal(soResolved).then(function () { + expect(callback.callCount).to.equal(4); + }); + }); + + describe('timeout', function () { + it('should throw if reject on first attempt', function () { + return expect(retry(function () { + return Promise.delay(2000); + }, { + max: 1, + backoffBase: 0, + timeout: 1000 + })).to.eventually.be.rejectedWith(Promise.TimeoutError); + }); + + it('should throw if reject on last attempt', function () { + return expect(retry(function () { + count++; + if (count === 3) { + return Promise.delay(3500); + } + return Promise.reject(); + }, { + max: 3, + backoffBase: 0, + timeout: 1500 + })).to.eventually.be.rejectedWith(Promise.TimeoutError).then(function () { + expect(count).to.equal(3); + }); + }); + }); + + describe('match', function () { + it('should continue retry while error is equal to match string', function () { + var callback = sinon.stub(); + callback.rejects(soRejected); + callback.onCall(3).resolves(soResolved); + return expect(retry(callback, {max: 15, backoffBase: 0, match: 'Error: ' + soRejected})).to.eventually.equal(soResolved).then(function () { + expect(callback.callCount).to.equal(4); + }); + }); + + it('should reject immediately if error is not equal to match string', function () { + var callback = sinon.stub(); + callback.rejects(soRejected); + return expect(retry(callback, {max: 15, backoffBase: 0, match: 'A custom error string'})).to.eventually.be.rejectedWith(soRejected).then(function () { + expect(callback.callCount).to.equal(1); + }); + }); + + it('should continue retry while error is instanceof match', function () { + var callback = sinon.stub(); + callback.rejects(soRejected); + callback.onCall(4).resolves(soResolved); + return expect(retry(callback, {max: 15, backoffBase: 0, match: Error})).to.eventually.equal(soResolved).then(function () { + expect(callback.callCount).to.equal(5); + }); + }); + + it('should reject immediately if error is not instanceof match', function () { + var callback = sinon.stub(); + callback.rejects(soRejected); + return expect(retry(callback, {max: 15, backoffBase: 0, match: function foo(){}})).to.eventually.be.rejectedWith(Error).then(function () { + expect(callback.callCount).to.equal(1); + }); + }); + + it('should continue retry while error is equal to match string in array', function () { + var callback = sinon.stub(); + callback.rejects(soRejected); + callback.onCall(4).resolves(soResolved); + return expect(retry(callback, {max: 15, backoffBase: 0, match: ['Error: ' + (soRejected + 1), 'Error: ' + soRejected]})).to.eventually.equal(soResolved).then(function () { + expect(callback.callCount).to.equal(5); + }); + }); + + it('should reject immediately if error is not equal to match string in array', function () { + var callback = sinon.stub(); + callback.rejects(soRejected); + return expect(retry(callback, {max: 15, backoffBase: 0, match: ['Error: ' + (soRejected + 1), 'Error: ' + (soRejected + 2)]})).to.eventually.be.rejectedWith(Error).then(function () { + expect(callback.callCount).to.equal(1); + }); + }); + + it('should reject immediately if error is not instanceof match in array', function () { + var callback = sinon.stub(); + callback.rejects(soRejected); + return expect(retry(callback, {max: 15, backoffBase: 0, match: ['Error: ' + (soRejected + 1), function foo(){}]})).to.eventually.be.rejectedWith(Error).then(function () { + expect(callback.callCount).to.equal(1); + }); + }); + + it('should continue retry while error is instanceof match in array', function () { + var callback = sinon.stub(); + callback.rejects(soRejected); + callback.onCall(4).resolves(soResolved); + return expect(retry(callback, {max: 15, backoffBase: 0, match: ['Error: ' + (soRejected + 1), Error]})).to.eventually.equal(soResolved).then(function () { + expect(callback.callCount).to.equal(5); + }); + }); + }); + + describe('backoff', function () { + it('should resolve after 10 retries and an eventual delay over 3400ms using default backoff', function () { + var startTime = moment(); + var callback = sinon.stub(); + callback.rejects(soRejected); + callback.onCall(5).resolves(soResolved); + return expect(retry(callback, {max: 15})).to.eventually.equal(soResolved).then(function () { + expect(callback.callCount).to.equal(6); + expect(moment().diff(startTime)).to.be.above(3400); + }); + }); + + it('should throw TimeoutError and cancel backoff delay if timeout is reached', function () { + return expect(retry(function () { + return Promise.delay(2000); + }, { + max: 15, + timeout: 1000 + })).to.eventually.be.rejectedWith(Promise.TimeoutError); + }); + }); +}); diff --git a/node_modules/right-align/LICENSE b/node_modules/right-align/LICENSE new file mode 100644 index 0000000..65f90ac --- /dev/null +++ b/node_modules/right-align/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, Jon Schlinkert. + +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. diff --git a/node_modules/right-align/README.md b/node_modules/right-align/README.md new file mode 100644 index 0000000..3abdfb3 --- /dev/null +++ b/node_modules/right-align/README.md @@ -0,0 +1,77 @@ +# right-align [![NPM version](https://badge.fury.io/js/right-align.svg)](http://badge.fury.io/js/right-align) + +> Right-align the text in a string. + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i right-align --save +``` + +## Usage + +```js +var rightAlign = require('right-align'); +rightAlign(string); +``` + +**Example** + +If used on the following: + +``` +Lorem ipsum dolor sit amet, +consectetur adipiscing +elit, sed do eiusmod tempor incididunt +ut labore et dolore +magna aliqua. Ut enim ad minim +veniam, quis +``` + +The result would be: + +``` + Lorem ipsum dolor sit amet, + consectetur adipiscing +elit, sed do eiusmod tempor incididunt + ut labore et dolore + magna aliqua. Ut enim ad minim + veniam, quis +``` + +## Related projects + +* [align-text](https://github.com/jonschlinkert/align-text): Align the text in a string. +* [center-align](https://github.com/jonschlinkert/center-align): Center-align the text in a string. +* [justify](https://github.com/bahamas10/node-justify): Left or right (or both) justify text using a custom width and character +* [repeat-string](https://github.com/jonschlinkert/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. +* [repeat-element](https://github.com/jonschlinkert/repeat-element): Create an array by repeating the given value n times. +* [word-wrap](https://github.com/jonschlinkert/word-wrap): Wrap words to a specified length. + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/right-align/issues/new) + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on June 09, 2015._ diff --git a/node_modules/right-align/index.js b/node_modules/right-align/index.js new file mode 100644 index 0000000..ad54f5f --- /dev/null +++ b/node_modules/right-align/index.js @@ -0,0 +1,16 @@ +/*! + * right-align + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var align = require('align-text'); + +module.exports = function rightAlign(val) { + return align(val, function (len, longest) { + return longest - len; + }); +}; diff --git a/node_modules/right-align/package.json b/node_modules/right-align/package.json new file mode 100644 index 0000000..e68685e --- /dev/null +++ b/node_modules/right-align/package.json @@ -0,0 +1,101 @@ +{ + "_args": [ + [ + { + "raw": "right-align@^0.1.1", + "scope": null, + "escapedName": "right-align", + "name": "right-align", + "rawSpec": "^0.1.1", + "spec": ">=0.1.1 <0.2.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/cliui" + ] + ], + "_from": "right-align@>=0.1.1 <0.2.0", + "_id": "right-align@0.1.3", + "_inCache": true, + "_location": "/right-align", + "_nodeVersion": "0.12.4", + "_npmUser": { + "name": "jonschlinkert", + "email": "github@sellside.com" + }, + "_npmVersion": "2.10.1", + "_phantomChildren": {}, + "_requested": { + "raw": "right-align@^0.1.1", + "scope": null, + "escapedName": "right-align", + "name": "right-align", + "rawSpec": "^0.1.1", + "spec": ">=0.1.1 <0.2.0", + "type": "range" + }, + "_requiredBy": [ + "/cliui" + ], + "_resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "_shasum": "61339b722fe6a3515689210d24e14c96148613ef", + "_shrinkwrap": null, + "_spec": "right-align@^0.1.1", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/cliui", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/right-align/issues" + }, + "dependencies": { + "align-text": "^0.1.1" + }, + "description": "Right-align the text in a string.", + "devDependencies": { + "mocha": "*", + "should": "*" + }, + "directories": {}, + "dist": { + "shasum": "61339b722fe6a3515689210d24e14c96148613ef", + "tarball": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "23ee38d6eedbcbfed241ace6587ce5730684dd18", + "homepage": "https://github.com/jonschlinkert/right-align", + "keywords": [ + "align", + "align-center", + "center", + "center-align", + "right", + "right-align", + "text", + "typography" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "jonschlinkert", + "email": "github@sellside.com" + } + ], + "name": "right-align", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/jonschlinkert/right-align.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "0.1.3" +} diff --git a/node_modules/semver/.npmignore b/node_modules/semver/.npmignore new file mode 100644 index 0000000..7300fbc --- /dev/null +++ b/node_modules/semver/.npmignore @@ -0,0 +1 @@ +# nada diff --git a/node_modules/semver/LICENSE b/node_modules/semver/LICENSE new file mode 100644 index 0000000..0c44ae7 --- /dev/null +++ b/node_modules/semver/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) Isaac Z. Schlueter ("Author") +All rights reserved. + +The BSD License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/semver/Makefile b/node_modules/semver/Makefile new file mode 100644 index 0000000..71af0e9 --- /dev/null +++ b/node_modules/semver/Makefile @@ -0,0 +1,24 @@ +files = semver.browser.js \ + semver.min.js \ + semver.browser.js.gz \ + semver.min.js.gz + +all: $(files) + +clean: + rm -f $(files) + +semver.browser.js: head.js.txt semver.js foot.js.txt + ( cat head.js.txt; \ + cat semver.js | \ + egrep -v '^ *\/\* nomin \*\/' | \ + perl -pi -e 's/debug\([^\)]+\)//g'; \ + cat foot.js.txt ) > semver.browser.js + +semver.min.js: semver.browser.js + uglifyjs -m semver.min.js + +%.gz: % + gzip --stdout -9 <$< >$@ + +.PHONY: all clean diff --git a/node_modules/semver/README.md b/node_modules/semver/README.md new file mode 100644 index 0000000..b5e35ff --- /dev/null +++ b/node_modules/semver/README.md @@ -0,0 +1,303 @@ +semver(1) -- The semantic versioner for npm +=========================================== + +## Usage + + $ npm install semver + + semver.valid('1.2.3') // '1.2.3' + semver.valid('a.b.c') // null + semver.clean(' =v1.2.3 ') // '1.2.3' + semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true + semver.gt('1.2.3', '9.8.7') // false + semver.lt('1.2.3', '9.8.7') // true + +As a command-line utility: + + $ semver -h + + Usage: semver [ [...]] [-r | -i | --preid | -l | -rv] + Test if version(s) satisfy the supplied range(s), and sort them. + + Multiple versions or ranges may be supplied, unless increment + option is specified. In that case, only a single version may + be used, and it is incremented by the specified level + + Program exits successfully if any valid version satisfies + all supplied ranges, and prints all satisfying versions. + + If no versions are valid, or ranges are not satisfied, + then exits failure. + + Versions are printed in ascending order, so supplying + multiple versions to the utility will just sort them. + +## Versions + +A "version" is described by the `v2.0.0` specification found at +. + +A leading `"="` or `"v"` character is stripped off and ignored. + +## Ranges + +A `version range` is a set of `comparators` which specify versions +that satisfy the range. + +A `comparator` is composed of an `operator` and a `version`. The set +of primitive `operators` is: + +* `<` Less than +* `<=` Less than or equal to +* `>` Greater than +* `>=` Greater than or equal to +* `=` Equal. If no operator is specified, then equality is assumed, + so this operator is optional, but MAY be included. + +For example, the comparator `>=1.2.7` would match the versions +`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6` +or `1.1.0`. + +Comparators can be joined by whitespace to form a `comparator set`, +which is satisfied by the **intersection** of all of the comparators +it includes. + +A range is composed of one or more comparator sets, joined by `||`. A +version matches a range if and only if every comparator in at least +one of the `||`-separated comparator sets is satisfied by the version. + +For example, the range `>=1.2.7 <1.3.0` would match the versions +`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`, +or `1.1.0`. + +The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`, +`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`. + +### Prerelease Tags + +If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then +it will only be allowed to satisfy comparator sets if at least one +comparator with the same `[major, minor, patch]` tuple also has a +prerelease tag. + +For example, the range `>1.2.3-alpha.3` would be allowed to match the +version `1.2.3-alpha.7`, but it would *not* be satisfied by +`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater +than" `1.2.3-alpha.3` according to the SemVer sort rules. The version +range only accepts prerelease tags on the `1.2.3` version. The +version `3.4.5` *would* satisfy the range, because it does not have a +prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`. + +The purpose for this behavior is twofold. First, prerelease versions +frequently are updated very quickly, and contain many breaking changes +that are (by the author's design) not yet fit for public consumption. +Therefore, by default, they are excluded from range matching +semantics. + +Second, a user who has opted into using a prerelease version has +clearly indicated the intent to use *that specific* set of +alpha/beta/rc versions. By including a prerelease tag in the range, +the user is indicating that they are aware of the risk. However, it +is still not appropriate to assume that they have opted into taking a +similar risk on the *next* set of prerelease versions. + +#### Prerelease Identifiers + +The method `.inc` takes an additional `identifier` string argument that +will append the value of the string as a prerelease identifier: + +```javascript +> semver.inc('1.2.3', 'pre', 'beta') +'1.2.4-beta.0' +``` + +command-line example: + +```shell +$ semver 1.2.3 -i prerelease --preid beta +1.2.4-beta.0 +``` + +Which then can be used to increment further: + +```shell +$ semver 1.2.4-beta.0 -i prerelease +1.2.4-beta.1 +``` + +### Advanced Range Syntax + +Advanced range syntax desugars to primitive comparators in +deterministic ways. + +Advanced ranges may be combined in the same way as primitive +comparators using white space or `||`. + +#### Hyphen Ranges `X.Y.Z - A.B.C` + +Specifies an inclusive set. + +* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4` + +If a partial version is provided as the first version in the inclusive +range, then the missing pieces are replaced with zeroes. + +* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4` + +If a partial version is provided as the second version in the +inclusive range, then all versions that start with the supplied parts +of the tuple are accepted, but nothing that would be greater than the +provided tuple parts. + +* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0` +* `1.2.3 - 2` := `>=1.2.3 <3.0.0` + +#### X-Ranges `1.2.x` `1.X` `1.2.*` `*` + +Any of `X`, `x`, or `*` may be used to "stand in" for one of the +numeric values in the `[major, minor, patch]` tuple. + +* `*` := `>=0.0.0` (Any version satisfies) +* `1.x` := `>=1.0.0 <2.0.0` (Matching major version) +* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions) + +A partial version range is treated as an X-Range, so the special +character is in fact optional. + +* `""` (empty string) := `*` := `>=0.0.0` +* `1` := `1.x.x` := `>=1.0.0 <2.0.0` +* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0` + +#### Tilde Ranges `~1.2.3` `~1.2` `~1` + +Allows patch-level changes if a minor version is specified on the +comparator. Allows minor-level changes if not. + +* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0` +* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`) +* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`) +* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0` +* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`) +* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`) +* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in + the `1.2.3` version will be allowed, if they are greater than or + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but + `1.2.4-beta.2` would not, because it is a prerelease of a + different `[major, minor, patch]` tuple. + +#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` + +Allows changes that do not modify the left-most non-zero digit in the +`[major, minor, patch]` tuple. In other words, this allows patch and +minor updates for versions `1.0.0` and above, patch updates for +versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. + +Many authors treat a `0.x` version as if the `x` were the major +"breaking-change" indicator. + +Caret ranges are ideal when an author may make breaking changes +between `0.2.4` and `0.3.0` releases, which is a common practice. +However, it presumes that there will *not* be breaking changes between +`0.2.4` and `0.2.5`. It allows for changes that are presumed to be +additive (but non-breaking), according to commonly observed practices. + +* `^1.2.3` := `>=1.2.3 <2.0.0` +* `^0.2.3` := `>=0.2.3 <0.3.0` +* `^0.0.3` := `>=0.0.3 <0.0.4` +* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in + the `1.2.3` version will be allowed, if they are greater than or + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but + `1.2.4-beta.2` would not, because it is a prerelease of a + different `[major, minor, patch]` tuple. +* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the + `0.0.3` version *only* will be allowed, if they are greater than or + equal to `beta`. So, `0.0.3-pr.2` would be allowed. + +When parsing caret ranges, a missing `patch` value desugars to the +number `0`, but will allow flexibility within that value, even if the +major and minor versions are both `0`. + +* `^1.2.x` := `>=1.2.0 <2.0.0` +* `^0.0.x` := `>=0.0.0 <0.1.0` +* `^0.0` := `>=0.0.0 <0.1.0` + +A missing `minor` and `patch` values will desugar to zero, but also +allow flexibility within those values, even if the major version is +zero. + +* `^1.x` := `>=1.0.0 <2.0.0` +* `^0.x` := `>=0.0.0 <1.0.0` + +## Functions + +All methods and classes take a final `loose` boolean argument that, if +true, will be more forgiving about not-quite-valid semver strings. +The resulting output will always be 100% strict, of course. + +Strict-mode Comparators and Ranges will be strict about the SemVer +strings that they parse. + +* `valid(v)`: Return the parsed version, or null if it's not valid. +* `inc(v, release)`: Return the version incremented by the release + type (`major`, `premajor`, `minor`, `preminor`, `patch`, + `prepatch`, or `prerelease`), or null if it's not valid + * `premajor` in one call will bump the version up to the next major + version and down to a prerelease of that major version. + `preminor`, and `prepatch` work the same way. + * If called from a non-prerelease version, the `prerelease` will work the + same as `prepatch`. It increments the patch version, then makes a + prerelease. If the input version is already a prerelease it simply + increments it. +* `major(v)`: Return the major version number. +* `minor(v)`: Return the minor version number. +* `patch(v)`: Return the patch version number. + +### Comparison + +* `gt(v1, v2)`: `v1 > v2` +* `gte(v1, v2)`: `v1 >= v2` +* `lt(v1, v2)`: `v1 < v2` +* `lte(v1, v2)`: `v1 <= v2` +* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent, + even if they're not the exact same string. You already know how to + compare strings. +* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`. +* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call + the corresponding function above. `"==="` and `"!=="` do simple + string comparison, but are included for completeness. Throws if an + invalid comparison string is provided. +* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if + `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. +* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions + in descending order when passed to `Array.sort()`. +* `diff(v1, v2)`: Returns difference between two versions by the release type + (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), + or null if the versions are the same. + + +### Ranges + +* `validRange(range)`: Return the valid range or null if it's not valid +* `satisfies(version, range)`: Return true if the version satisfies the + range. +* `maxSatisfying(versions, range)`: Return the highest version in the list + that satisfies the range, or `null` if none of them do. +* `gtr(version, range)`: Return `true` if version is greater than all the + versions possible in the range. +* `ltr(version, range)`: Return `true` if version is less than all the + versions possible in the range. +* `outside(version, range, hilo)`: Return true if the version is outside + the bounds of the range in either the high or low direction. The + `hilo` argument must be either the string `'>'` or `'<'`. (This is + the function called by `gtr` and `ltr`.) + +Note that, since ranges may be non-contiguous, a version might not be +greater than a range, less than a range, *or* satisfy a range! For +example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9` +until `2.0.0`, so the version `1.2.10` would not be greater than the +range (because `2.0.1` satisfies, which is higher), nor less than the +range (since `1.2.8` satisfies, which is lower), and it also does not +satisfy the range. + +If you want to know if a version satisfies or does not satisfy a +range, use the `satisfies(version, range)` function. diff --git a/node_modules/semver/bin/semver b/node_modules/semver/bin/semver new file mode 100755 index 0000000..c5f2e85 --- /dev/null +++ b/node_modules/semver/bin/semver @@ -0,0 +1,133 @@ +#!/usr/bin/env node +// Standalone semver comparison program. +// Exits successfully and prints matching version(s) if +// any supplied version is valid and passes all tests. + +var argv = process.argv.slice(2) + , versions = [] + , range = [] + , gt = [] + , lt = [] + , eq = [] + , inc = null + , version = require("../package.json").version + , loose = false + , identifier = undefined + , semver = require("../semver") + , reverse = false + +main() + +function main () { + if (!argv.length) return help() + while (argv.length) { + var a = argv.shift() + var i = a.indexOf('=') + if (i !== -1) { + a = a.slice(0, i) + argv.unshift(a.slice(i + 1)) + } + switch (a) { + case "-rv": case "-rev": case "--rev": case "--reverse": + reverse = true + break + case "-l": case "--loose": + loose = true + break + case "-v": case "--version": + versions.push(argv.shift()) + break + case "-i": case "--inc": case "--increment": + switch (argv[0]) { + case "major": case "minor": case "patch": case "prerelease": + case "premajor": case "preminor": case "prepatch": + inc = argv.shift() + break + default: + inc = "patch" + break + } + break + case "--preid": + identifier = argv.shift() + break + case "-r": case "--range": + range.push(argv.shift()) + break + case "-h": case "--help": case "-?": + return help() + default: + versions.push(a) + break + } + } + + versions = versions.filter(function (v) { + return semver.valid(v, loose) + }) + if (!versions.length) return fail() + if (inc && (versions.length !== 1 || range.length)) + return failInc() + + for (var i = 0, l = range.length; i < l ; i ++) { + versions = versions.filter(function (v) { + return semver.satisfies(v, range[i], loose) + }) + if (!versions.length) return fail() + } + return success(versions) +} + +function failInc () { + console.error("--inc can only be used on a single version with no range") + fail() +} + +function fail () { process.exit(1) } + +function success () { + var compare = reverse ? "rcompare" : "compare" + versions.sort(function (a, b) { + return semver[compare](a, b, loose) + }).map(function (v) { + return semver.clean(v, loose) + }).map(function (v) { + return inc ? semver.inc(v, inc, loose, identifier) : v + }).forEach(function (v,i,_) { console.log(v) }) +} + +function help () { + console.log(["SemVer " + version + ,"" + ,"A JavaScript implementation of the http://semver.org/ specification" + ,"Copyright Isaac Z. Schlueter" + ,"" + ,"Usage: semver [options] [ [...]]" + ,"Prints valid versions sorted by SemVer precedence" + ,"" + ,"Options:" + ,"-r --range " + ," Print versions that match the specified range." + ,"" + ,"-i --increment []" + ," Increment a version by the specified level. Level can" + ," be one of: major, minor, patch, premajor, preminor," + ," prepatch, or prerelease. Default level is 'patch'." + ," Only one version may be specified." + ,"" + ,"--preid " + ," Identifier to be used to prefix premajor, preminor," + ," prepatch or prerelease version increments." + ,"" + ,"-l --loose" + ," Interpret versions and ranges loosely" + ,"" + ,"Program exits successfully if any valid version satisfies" + ,"all supplied ranges, and prints all satisfying versions." + ,"" + ,"If no satisfying versions are found, then exits failure." + ,"" + ,"Versions are printed in ascending order, so supplying" + ,"multiple versions to the utility will just sort them." + ].join("\n")) +} diff --git a/node_modules/semver/foot.js.txt b/node_modules/semver/foot.js.txt new file mode 100644 index 0000000..8f83c20 --- /dev/null +++ b/node_modules/semver/foot.js.txt @@ -0,0 +1,6 @@ + +})( + typeof exports === 'object' ? exports : + typeof define === 'function' && define.amd ? {} : + semver = {} +); diff --git a/node_modules/semver/head.js.txt b/node_modules/semver/head.js.txt new file mode 100644 index 0000000..6536865 --- /dev/null +++ b/node_modules/semver/head.js.txt @@ -0,0 +1,2 @@ +;(function(exports) { + diff --git a/node_modules/semver/package.json b/node_modules/semver/package.json new file mode 100644 index 0000000..a9b058a --- /dev/null +++ b/node_modules/semver/package.json @@ -0,0 +1,91 @@ +{ + "_args": [ + [ + { + "raw": "semver@4.3.2", + "scope": null, + "escapedName": "semver", + "name": "semver", + "rawSpec": "4.3.2", + "spec": "4.3.2", + "type": "version" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/pg" + ] + ], + "_from": "semver@4.3.2", + "_id": "semver@4.3.2", + "_inCache": true, + "_location": "/semver", + "_nodeVersion": "1.4.2", + "_npmUser": { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + "_npmVersion": "2.7.4", + "_phantomChildren": {}, + "_requested": { + "raw": "semver@4.3.2", + "scope": null, + "escapedName": "semver", + "name": "semver", + "rawSpec": "4.3.2", + "spec": "4.3.2", + "type": "version" + }, + "_requiredBy": [ + "/gulp", + "/normalize-package-data", + "/pg" + ], + "_resolved": "https://registry.npmjs.org/semver/-/semver-4.3.2.tgz", + "_shasum": "c7a07158a80bedd052355b770d82d6640f803be7", + "_shrinkwrap": null, + "_spec": "semver@4.3.2", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/pg", + "bin": { + "semver": "./bin/semver" + }, + "browser": "semver.browser.js", + "bugs": { + "url": "https://github.com/npm/node-semver/issues" + }, + "dependencies": {}, + "description": "The semantic version parser used by npm.", + "devDependencies": { + "tap": "0.x >=0.0.4", + "uglify-js": "~2.3.6" + }, + "directories": {}, + "dist": { + "shasum": "c7a07158a80bedd052355b770d82d6640f803be7", + "tarball": "https://registry.npmjs.org/semver/-/semver-4.3.2.tgz" + }, + "gitHead": "22e583cc12d21b80bd7175b64ebe55890aa34e46", + "homepage": "https://github.com/npm/node-semver", + "license": "BSD", + "main": "semver.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + } + ], + "min": "semver.min.js", + "name": "semver", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/npm/node-semver.git" + }, + "scripts": { + "prepublish": "make", + "test": "tap test/*.js" + }, + "version": "4.3.2" +} diff --git a/node_modules/semver/semver.browser.js b/node_modules/semver/semver.browser.js new file mode 100644 index 0000000..250885a --- /dev/null +++ b/node_modules/semver/semver.browser.js @@ -0,0 +1,1187 @@ +;(function(exports) { + +// export the class if we are in a Node-like system. +if (typeof module === 'object' && module.exports === exports) + exports = module.exports = SemVer; + +// The debug function is excluded entirely from the minified version. + +// Note: this is the semver.org version of the spec that it implements +// Not necessarily the package version of this code. +exports.SEMVER_SPEC_VERSION = '2.0.0'; + +var MAX_LENGTH = 256; +var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; + +// The actual regexps go on exports.re +var re = exports.re = []; +var src = exports.src = []; +var R = 0; + +// The following Regular Expressions can be used for tokenizing, +// validating, and parsing SemVer version strings. + +// ## Numeric Identifier +// A single `0`, or a non-zero digit followed by zero or more digits. + +var NUMERICIDENTIFIER = R++; +src[NUMERICIDENTIFIER] = '0|[1-9]\\d*'; +var NUMERICIDENTIFIERLOOSE = R++; +src[NUMERICIDENTIFIERLOOSE] = '[0-9]+'; + + +// ## Non-numeric Identifier +// Zero or more digits, followed by a letter or hyphen, and then zero or +// more letters, digits, or hyphens. + +var NONNUMERICIDENTIFIER = R++; +src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'; + + +// ## Main Version +// Three dot-separated numeric identifiers. + +var MAINVERSION = R++; +src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')'; + +var MAINVERSIONLOOSE = R++; +src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')'; + +// ## Pre-release Version Identifier +// A numeric identifier, or a non-numeric identifier. + +var PRERELEASEIDENTIFIER = R++; +src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + + '|' + src[NONNUMERICIDENTIFIER] + ')'; + +var PRERELEASEIDENTIFIERLOOSE = R++; +src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + + '|' + src[NONNUMERICIDENTIFIER] + ')'; + + +// ## Pre-release Version +// Hyphen, followed by one or more dot-separated pre-release version +// identifiers. + +var PRERELEASE = R++; +src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + + '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))'; + +var PRERELEASELOOSE = R++; +src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + + '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))'; + +// ## Build Metadata Identifier +// Any combination of digits, letters, or hyphens. + +var BUILDIDENTIFIER = R++; +src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+'; + +// ## Build Metadata +// Plus sign, followed by one or more period-separated build metadata +// identifiers. + +var BUILD = R++; +src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + + '(?:\\.' + src[BUILDIDENTIFIER] + ')*))'; + + +// ## Full Version String +// A main version, followed optionally by a pre-release version and +// build metadata. + +// Note that the only major, minor, patch, and pre-release sections of +// the version string are capturing groups. The build metadata is not a +// capturing group, because it should not ever be used in version +// comparison. + +var FULL = R++; +var FULLPLAIN = 'v?' + src[MAINVERSION] + + src[PRERELEASE] + '?' + + src[BUILD] + '?'; + +src[FULL] = '^' + FULLPLAIN + '$'; + +// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. +// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty +// common in the npm registry. +var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + + src[PRERELEASELOOSE] + '?' + + src[BUILD] + '?'; + +var LOOSE = R++; +src[LOOSE] = '^' + LOOSEPLAIN + '$'; + +var GTLT = R++; +src[GTLT] = '((?:<|>)?=?)'; + +// Something like "2.*" or "1.2.x". +// Note that "x.x" is a valid xRange identifer, meaning "any version" +// Only the first item is strictly required. +var XRANGEIDENTIFIERLOOSE = R++; +src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*'; +var XRANGEIDENTIFIER = R++; +src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*'; + +var XRANGEPLAIN = R++; +src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:' + src[PRERELEASE] + ')?' + + src[BUILD] + '?' + + ')?)?'; + +var XRANGEPLAINLOOSE = R++; +src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:' + src[PRERELEASELOOSE] + ')?' + + src[BUILD] + '?' + + ')?)?'; + +var XRANGE = R++; +src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$'; +var XRANGELOOSE = R++; +src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$'; + +// Tilde ranges. +// Meaning is "reasonably at or greater than" +var LONETILDE = R++; +src[LONETILDE] = '(?:~>?)'; + +var TILDETRIM = R++; +src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+'; +re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g'); +var tildeTrimReplace = '$1~'; + +var TILDE = R++; +src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$'; +var TILDELOOSE = R++; +src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$'; + +// Caret ranges. +// Meaning is "at least and backwards compatible with" +var LONECARET = R++; +src[LONECARET] = '(?:\\^)'; + +var CARETTRIM = R++; +src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+'; +re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g'); +var caretTrimReplace = '$1^'; + +var CARET = R++; +src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$'; +var CARETLOOSE = R++; +src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$'; + +// A simple gt/lt/eq thing, or just "" to indicate "any version" +var COMPARATORLOOSE = R++; +src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$'; +var COMPARATOR = R++; +src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$'; + + +// An expression to strip any whitespace between the gtlt and the thing +// it modifies, so that `> 1.2.3` ==> `>1.2.3` +var COMPARATORTRIM = R++; +src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + + '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')'; + +// this one has to use the /g flag +re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g'); +var comparatorTrimReplace = '$1$2$3'; + + +// Something like `1.2.3 - 1.2.4` +// Note that these all use the loose form, because they'll be +// checked against either the strict or loose comparator form +// later. +var HYPHENRANGE = R++; +src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAIN] + ')' + + '\\s*$'; + +var HYPHENRANGELOOSE = R++; +src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s*$'; + +// Star ranges basically just allow anything at all. +var STAR = R++; +src[STAR] = '(<|>)?=?\\s*\\*'; + +// Compile to actual regexp objects. +// All are flag-free, unless they were created above with a flag. +for (var i = 0; i < R; i++) { + ; + if (!re[i]) + re[i] = new RegExp(src[i]); +} + +exports.parse = parse; +function parse(version, loose) { + if (version.length > MAX_LENGTH) + return null; + + var r = loose ? re[LOOSE] : re[FULL]; + if (!r.test(version)) + return null; + + try { + return new SemVer(version, loose); + } catch (er) { + return null; + } +} + +exports.valid = valid; +function valid(version, loose) { + var v = parse(version, loose); + return v ? v.version : null; +} + + +exports.clean = clean; +function clean(version, loose) { + var s = parse(version.trim().replace(/^[=v]+/, ''), loose); + return s ? s.version : null; +} + +exports.SemVer = SemVer; + +function SemVer(version, loose) { + if (version instanceof SemVer) { + if (version.loose === loose) + return version; + else + version = version.version; + } else if (typeof version !== 'string') { + throw new TypeError('Invalid Version: ' + version); + } + + if (version.length > MAX_LENGTH) + throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') + + if (!(this instanceof SemVer)) + return new SemVer(version, loose); + + ; + this.loose = loose; + var m = version.trim().match(loose ? re[LOOSE] : re[FULL]); + + if (!m) + throw new TypeError('Invalid Version: ' + version); + + this.raw = version; + + // these are actually numbers + this.major = +m[1]; + this.minor = +m[2]; + this.patch = +m[3]; + + if (this.major > MAX_SAFE_INTEGER || this.major < 0) + throw new TypeError('Invalid major version') + + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) + throw new TypeError('Invalid minor version') + + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) + throw new TypeError('Invalid patch version') + + // numberify any prerelease numeric ids + if (!m[4]) + this.prerelease = []; + else + this.prerelease = m[4].split('.').map(function(id) { + return (/^[0-9]+$/.test(id)) ? +id : id; + }); + + this.build = m[5] ? m[5].split('.') : []; + this.format(); +} + +SemVer.prototype.format = function() { + this.version = this.major + '.' + this.minor + '.' + this.patch; + if (this.prerelease.length) + this.version += '-' + this.prerelease.join('.'); + return this.version; +}; + +SemVer.prototype.inspect = function() { + return ''; +}; + +SemVer.prototype.toString = function() { + return this.version; +}; + +SemVer.prototype.compare = function(other) { + ; + if (!(other instanceof SemVer)) + other = new SemVer(other, this.loose); + + return this.compareMain(other) || this.comparePre(other); +}; + +SemVer.prototype.compareMain = function(other) { + if (!(other instanceof SemVer)) + other = new SemVer(other, this.loose); + + return compareIdentifiers(this.major, other.major) || + compareIdentifiers(this.minor, other.minor) || + compareIdentifiers(this.patch, other.patch); +}; + +SemVer.prototype.comparePre = function(other) { + if (!(other instanceof SemVer)) + other = new SemVer(other, this.loose); + + // NOT having a prerelease is > having one + if (this.prerelease.length && !other.prerelease.length) + return -1; + else if (!this.prerelease.length && other.prerelease.length) + return 1; + else if (!this.prerelease.length && !other.prerelease.length) + return 0; + + var i = 0; + do { + var a = this.prerelease[i]; + var b = other.prerelease[i]; + ; + if (a === undefined && b === undefined) + return 0; + else if (b === undefined) + return 1; + else if (a === undefined) + return -1; + else if (a === b) + continue; + else + return compareIdentifiers(a, b); + } while (++i); +}; + +// preminor will bump the version up to the next minor release, and immediately +// down to pre-release. premajor and prepatch work the same way. +SemVer.prototype.inc = function(release, identifier) { + switch (release) { + case 'premajor': + this.prerelease.length = 0; + this.patch = 0; + this.minor = 0; + this.major++; + this.inc('pre', identifier); + break; + case 'preminor': + this.prerelease.length = 0; + this.patch = 0; + this.minor++; + this.inc('pre', identifier); + break; + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0; + this.inc('patch', identifier); + this.inc('pre', identifier); + break; + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case 'prerelease': + if (this.prerelease.length === 0) + this.inc('patch', identifier); + this.inc('pre', identifier); + break; + + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) + this.major++; + this.minor = 0; + this.patch = 0; + this.prerelease = []; + break; + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) + this.minor++; + this.patch = 0; + this.prerelease = []; + break; + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) + this.patch++; + this.prerelease = []; + break; + // This probably shouldn't be used publicly. + // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. + case 'pre': + if (this.prerelease.length === 0) + this.prerelease = [0]; + else { + var i = this.prerelease.length; + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++; + i = -2; + } + } + if (i === -1) // didn't increment anything + this.prerelease.push(0); + } + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) + this.prerelease = [identifier, 0]; + } else + this.prerelease = [identifier, 0]; + } + break; + + default: + throw new Error('invalid increment argument: ' + release); + } + this.format(); + return this; +}; + +exports.inc = inc; +function inc(version, release, loose, identifier) { + if (typeof(loose) === 'string') { + identifier = loose; + loose = undefined; + } + + try { + return new SemVer(version, loose).inc(release, identifier).version; + } catch (er) { + return null; + } +} + +exports.diff = diff; +function diff(version1, version2) { + if (eq(version1, version2)) { + return null; + } else { + var v1 = parse(version1); + var v2 = parse(version2); + if (v1.prerelease.length || v2.prerelease.length) { + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return 'pre'+key; + } + } + } + return 'prerelease'; + } + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return key; + } + } + } + } +} + +exports.compareIdentifiers = compareIdentifiers; + +var numeric = /^[0-9]+$/; +function compareIdentifiers(a, b) { + var anum = numeric.test(a); + var bnum = numeric.test(b); + + if (anum && bnum) { + a = +a; + b = +b; + } + + return (anum && !bnum) ? -1 : + (bnum && !anum) ? 1 : + a < b ? -1 : + a > b ? 1 : + 0; +} + +exports.rcompareIdentifiers = rcompareIdentifiers; +function rcompareIdentifiers(a, b) { + return compareIdentifiers(b, a); +} + +exports.major = major; +function major(a, loose) { + return new SemVer(a, loose).major; +} + +exports.minor = minor; +function minor(a, loose) { + return new SemVer(a, loose).minor; +} + +exports.patch = patch; +function patch(a, loose) { + return new SemVer(a, loose).patch; +} + +exports.compare = compare; +function compare(a, b, loose) { + return new SemVer(a, loose).compare(b); +} + +exports.compareLoose = compareLoose; +function compareLoose(a, b) { + return compare(a, b, true); +} + +exports.rcompare = rcompare; +function rcompare(a, b, loose) { + return compare(b, a, loose); +} + +exports.sort = sort; +function sort(list, loose) { + return list.sort(function(a, b) { + return exports.compare(a, b, loose); + }); +} + +exports.rsort = rsort; +function rsort(list, loose) { + return list.sort(function(a, b) { + return exports.rcompare(a, b, loose); + }); +} + +exports.gt = gt; +function gt(a, b, loose) { + return compare(a, b, loose) > 0; +} + +exports.lt = lt; +function lt(a, b, loose) { + return compare(a, b, loose) < 0; +} + +exports.eq = eq; +function eq(a, b, loose) { + return compare(a, b, loose) === 0; +} + +exports.neq = neq; +function neq(a, b, loose) { + return compare(a, b, loose) !== 0; +} + +exports.gte = gte; +function gte(a, b, loose) { + return compare(a, b, loose) >= 0; +} + +exports.lte = lte; +function lte(a, b, loose) { + return compare(a, b, loose) <= 0; +} + +exports.cmp = cmp; +function cmp(a, op, b, loose) { + var ret; + switch (op) { + case '===': + if (typeof a === 'object') a = a.version; + if (typeof b === 'object') b = b.version; + ret = a === b; + break; + case '!==': + if (typeof a === 'object') a = a.version; + if (typeof b === 'object') b = b.version; + ret = a !== b; + break; + case '': case '=': case '==': ret = eq(a, b, loose); break; + case '!=': ret = neq(a, b, loose); break; + case '>': ret = gt(a, b, loose); break; + case '>=': ret = gte(a, b, loose); break; + case '<': ret = lt(a, b, loose); break; + case '<=': ret = lte(a, b, loose); break; + default: throw new TypeError('Invalid operator: ' + op); + } + return ret; +} + +exports.Comparator = Comparator; +function Comparator(comp, loose) { + if (comp instanceof Comparator) { + if (comp.loose === loose) + return comp; + else + comp = comp.value; + } + + if (!(this instanceof Comparator)) + return new Comparator(comp, loose); + + ; + this.loose = loose; + this.parse(comp); + + if (this.semver === ANY) + this.value = ''; + else + this.value = this.operator + this.semver.version; + + ; +} + +var ANY = {}; +Comparator.prototype.parse = function(comp) { + var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; + var m = comp.match(r); + + if (!m) + throw new TypeError('Invalid comparator: ' + comp); + + this.operator = m[1]; + if (this.operator === '=') + this.operator = ''; + + // if it literally is just '>' or '' then allow anything. + if (!m[2]) + this.semver = ANY; + else + this.semver = new SemVer(m[2], this.loose); +}; + +Comparator.prototype.inspect = function() { + return ''; +}; + +Comparator.prototype.toString = function() { + return this.value; +}; + +Comparator.prototype.test = function(version) { + ; + + if (this.semver === ANY) + return true; + + if (typeof version === 'string') + version = new SemVer(version, this.loose); + + return cmp(version, this.operator, this.semver, this.loose); +}; + + +exports.Range = Range; +function Range(range, loose) { + if ((range instanceof Range) && range.loose === loose) + return range; + + if (!(this instanceof Range)) + return new Range(range, loose); + + this.loose = loose; + + // First, split based on boolean or || + this.raw = range; + this.set = range.split(/\s*\|\|\s*/).map(function(range) { + return this.parseRange(range.trim()); + }, this).filter(function(c) { + // throw out any that are not relevant for whatever reason + return c.length; + }); + + if (!this.set.length) { + throw new TypeError('Invalid SemVer Range: ' + range); + } + + this.format(); +} + +Range.prototype.inspect = function() { + return ''; +}; + +Range.prototype.format = function() { + this.range = this.set.map(function(comps) { + return comps.join(' ').trim(); + }).join('||').trim(); + return this.range; +}; + +Range.prototype.toString = function() { + return this.range; +}; + +Range.prototype.parseRange = function(range) { + var loose = this.loose; + range = range.trim(); + ; + // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE]; + range = range.replace(hr, hyphenReplace); + ; + // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace); + ; + + // `~ 1.2.3` => `~1.2.3` + range = range.replace(re[TILDETRIM], tildeTrimReplace); + + // `^ 1.2.3` => `^1.2.3` + range = range.replace(re[CARETTRIM], caretTrimReplace); + + // normalize spaces + range = range.split(/\s+/).join(' '); + + // At this point, the range is completely trimmed and + // ready to be split into comparators. + + var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; + var set = range.split(' ').map(function(comp) { + return parseComparator(comp, loose); + }).join(' ').split(/\s+/); + if (this.loose) { + // in loose mode, throw out any that are not valid comparators + set = set.filter(function(comp) { + return !!comp.match(compRe); + }); + } + set = set.map(function(comp) { + return new Comparator(comp, loose); + }); + + return set; +}; + +// Mostly just for testing and legacy API reasons +exports.toComparators = toComparators; +function toComparators(range, loose) { + return new Range(range, loose).set.map(function(comp) { + return comp.map(function(c) { + return c.value; + }).join(' ').trim().split(' '); + }); +} + +// comprised of xranges, tildes, stars, and gtlt's at this point. +// already replaced the hyphen ranges +// turn into a set of JUST comparators. +function parseComparator(comp, loose) { + ; + comp = replaceCarets(comp, loose); + ; + comp = replaceTildes(comp, loose); + ; + comp = replaceXRanges(comp, loose); + ; + comp = replaceStars(comp, loose); + ; + return comp; +} + +function isX(id) { + return !id || id.toLowerCase() === 'x' || id === '*'; +} + +// ~, ~> --> * (any, kinda silly) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 +function replaceTildes(comp, loose) { + return comp.trim().split(/\s+/).map(function(comp) { + return replaceTilde(comp, loose); + }).join(' '); +} + +function replaceTilde(comp, loose) { + var r = loose ? re[TILDELOOSE] : re[TILDE]; + return comp.replace(r, function(_, M, m, p, pr) { + ; + var ret; + + if (isX(M)) + ret = ''; + else if (isX(m)) + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + else if (isX(p)) + // ~1.2 == >=1.2.0- <1.3.0- + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + else if (pr) { + ; + if (pr.charAt(0) !== '-') + pr = '-' + pr; + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + M + '.' + (+m + 1) + '.0'; + } else + // ~1.2.3 == >=1.2.3 <1.3.0 + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0'; + + ; + return ret; + }); +} + +// ^ --> * (any, kinda silly) +// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 +// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 +// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 +// ^1.2.3 --> >=1.2.3 <2.0.0 +// ^1.2.0 --> >=1.2.0 <2.0.0 +function replaceCarets(comp, loose) { + return comp.trim().split(/\s+/).map(function(comp) { + return replaceCaret(comp, loose); + }).join(' '); +} + +function replaceCaret(comp, loose) { + ; + var r = loose ? re[CARETLOOSE] : re[CARET]; + return comp.replace(r, function(_, M, m, p, pr) { + ; + var ret; + + if (isX(M)) + ret = ''; + else if (isX(m)) + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + else if (isX(p)) { + if (M === '0') + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + else + ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'; + } else if (pr) { + ; + if (pr.charAt(0) !== '-') + pr = '-' + pr; + if (M === '0') { + if (m === '0') + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + M + '.' + m + '.' + (+p + 1); + else + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + M + '.' + (+m + 1) + '.0'; + } else + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + (+M + 1) + '.0.0'; + } else { + ; + if (M === '0') { + if (m === '0') + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + m + '.' + (+p + 1); + else + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0'; + } else + ret = '>=' + M + '.' + m + '.' + p + + ' <' + (+M + 1) + '.0.0'; + } + + ; + return ret; + }); +} + +function replaceXRanges(comp, loose) { + ; + return comp.split(/\s+/).map(function(comp) { + return replaceXRange(comp, loose); + }).join(' '); +} + +function replaceXRange(comp, loose) { + comp = comp.trim(); + var r = loose ? re[XRANGELOOSE] : re[XRANGE]; + return comp.replace(r, function(ret, gtlt, M, m, p, pr) { + ; + var xM = isX(M); + var xm = xM || isX(m); + var xp = xm || isX(p); + var anyX = xp; + + if (gtlt === '=' && anyX) + gtlt = ''; + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0'; + } else { + // nothing is forbidden + ret = '*'; + } + } else if (gtlt && anyX) { + // replace X with 0 + if (xm) + m = 0; + if (xp) + p = 0; + + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + // >1.2.3 => >= 1.2.4 + gtlt = '>='; + if (xm) { + M = +M + 1; + m = 0; + p = 0; + } else if (xp) { + m = +m + 1; + p = 0; + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<' + if (xm) + M = +M + 1 + else + m = +m + 1 + } + + ret = gtlt + M + '.' + m + '.' + p; + } else if (xm) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + } else if (xp) { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + } + + ; + + return ret; + }); +} + +// Because * is AND-ed with everything else in the comparator, +// and '' means "any version", just remove the *s entirely. +function replaceStars(comp, loose) { + ; + // Looseness is ignored here. star is always as loose as it gets! + return comp.trim().replace(re[STAR], ''); +} + +// This function is passed to string.replace(re[HYPHENRANGE]) +// M, m, patch, prerelease, build +// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 +// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do +// 1.2 - 3.4 => >=1.2.0 <3.5.0 +function hyphenReplace($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr, tb) { + + if (isX(fM)) + from = ''; + else if (isX(fm)) + from = '>=' + fM + '.0.0'; + else if (isX(fp)) + from = '>=' + fM + '.' + fm + '.0'; + else + from = '>=' + from; + + if (isX(tM)) + to = ''; + else if (isX(tm)) + to = '<' + (+tM + 1) + '.0.0'; + else if (isX(tp)) + to = '<' + tM + '.' + (+tm + 1) + '.0'; + else if (tpr) + to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr; + else + to = '<=' + to; + + return (from + ' ' + to).trim(); +} + + +// if ANY of the sets match ALL of its comparators, then pass +Range.prototype.test = function(version) { + if (!version) + return false; + + if (typeof version === 'string') + version = new SemVer(version, this.loose); + + for (var i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version)) + return true; + } + return false; +}; + +function testSet(set, version) { + for (var i = 0; i < set.length; i++) { + if (!set[i].test(version)) + return false; + } + + if (version.prerelease.length) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (var i = 0; i < set.length; i++) { + ; + if (set[i].semver === ANY) + return true; + + if (set[i].semver.prerelease.length > 0) { + var allowed = set[i].semver; + if (allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch) + return true; + } + } + + // Version has a -pre, but it's not one of the ones we like. + return false; + } + + return true; +} + +exports.satisfies = satisfies; +function satisfies(version, range, loose) { + try { + range = new Range(range, loose); + } catch (er) { + return false; + } + return range.test(version); +} + +exports.maxSatisfying = maxSatisfying; +function maxSatisfying(versions, range, loose) { + return versions.filter(function(version) { + return satisfies(version, range, loose); + }).sort(function(a, b) { + return rcompare(a, b, loose); + })[0] || null; +} + +exports.validRange = validRange; +function validRange(range, loose) { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, loose).range || '*'; + } catch (er) { + return null; + } +} + +// Determine if version is less than all the versions possible in the range +exports.ltr = ltr; +function ltr(version, range, loose) { + return outside(version, range, '<', loose); +} + +// Determine if version is greater than all the versions possible in the range. +exports.gtr = gtr; +function gtr(version, range, loose) { + return outside(version, range, '>', loose); +} + +exports.outside = outside; +function outside(version, range, hilo, loose) { + version = new SemVer(version, loose); + range = new Range(range, loose); + + var gtfn, ltefn, ltfn, comp, ecomp; + switch (hilo) { + case '>': + gtfn = gt; + ltefn = lte; + ltfn = lt; + comp = '>'; + ecomp = '>='; + break; + case '<': + gtfn = lt; + ltefn = gte; + ltfn = gt; + comp = '<'; + ecomp = '<='; + break; + default: + throw new TypeError('Must provide a hilo val of "<" or ">"'); + } + + // If it satisifes the range it is not outside + if (satisfies(version, range, loose)) { + return false; + } + + // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. + + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i]; + + var high = null; + var low = null; + + comparators.forEach(function(comparator) { + high = high || comparator; + low = low || comparator; + if (gtfn(comparator.semver, high.semver, loose)) { + high = comparator; + } else if (ltfn(comparator.semver, low.semver, loose)) { + low = comparator; + } + }); + + // If the edge version comparator has a operator then our version + // isn't outside it + if (high.operator === comp || high.operator === ecomp) { + return false; + } + + // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + if ((!low.operator || low.operator === comp) && + ltefn(version, low.semver)) { + return false; + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false; + } + } + return true; +} + +// Use the define() function if we're in AMD land +if (typeof define === 'function' && define.amd) + define(exports); + +})( + typeof exports === 'object' ? exports : + typeof define === 'function' && define.amd ? {} : + semver = {} +); diff --git a/node_modules/semver/semver.browser.js.gz b/node_modules/semver/semver.browser.js.gz new file mode 100644 index 0000000000000000000000000000000000000000..6a8cf09559b126dbaa32606c11ae43c302a9d1b5 GIT binary patch literal 7938 zcmV+dAN}ATiwFR$u@qGT1KmAqa~n63-}NhCtt%uglBVSNc4LWBDT$K!%934@vgKV{ ziihNgnwXqnW`=qsl7IX41CPc$NXl_`tL|=Nia?{$=ocD51Ke(2%;RAmC2=#nnI&nS zwbUPLYfqml{;KlJPz@(RmZ|7MU56@2Llwm;P)Erq>`bDMp~`NvJe+pd0HB%Q&cftE zO_R}l5~_Z`uNukV*Kn9O)K_2W;;!zAs!gwJO4;HPoH_}o{|wV@BJ30>8ij-TSQ*k) zltJU+WIhT z|HHvAFONG^D;j+$FZJ^_G(n^_7x z1MUD@f>;egHP1jq7fGt}kbRIC%0$yuI4X~x3+ z+ux8QVHyq9%Moe>$Unu3eT8j7H9zz|v=wv~s5pr`zlUj}M$s6=%d`S1gIh(#05nZt z z^6K^LlY@nr2!hbP>jAP2R1`B{7)M+==zo`o(e}m}s7aXTz)S$Tyq#T!F|!(!IW|l{ zM1+7r0fWJ08(HSOK3dG5ih3Fo^5$L8`F+3h@6MV21BTf-dm_ep7=ZuzCrh0bEDd2; zN#4mq(2XF6F&REYmJf!u!~K^>&e|+VqL?UYHq?fyk>!SJwBEn(0t7g%(*OOHO`Th? z)Rt7HShr+28fGzJ%c%R(NE+Kl*l*IX1KvCgve3x9WYJ||3(GE7YDIW+d~kg5>R|um zpjt_*>Y0~&FBXZZcIY(xJKMC<2BeUy2q;Or7HBD{hTRM4eGt+0BEy=Wv|o{aCy7Jn zmplWW2_#nzN!gwq1FG3#_|UP6S1s5oK43f6=S2-+^iNt9Qd=M^PePr&g`_Q$(+Wfi z%hHsxq`sX;laV?M^8n`8plDa|Ed(snK@X^kTfp4CN3^AjqUCyTU|p(ncKq&|SRCF)W6tNepPF z!LJGUN{El~V;1DYOC4ef)LBR|b_NQ7Xt1##a?z4t7|ilHeH*9Ae3o?;1%5su7-+{3 zFOx6|E!q$Q4g-h*F~rU;lR30Q*bq9i(V^oDVMwMR>nNj$9;Nxi&#zt?VVdu6Ucr2b z^1RwJvhn8nvRxJZ2S{$OQ3I#dg+M^EScILD0-a-jjs$>ttW}&=O&1`381x+2fdbCd z)n<3A`;7SCr$5{3`Z5|`f@UYM;s6J!vIJNeO+!#$Kod-|q^&k_y%0=hm%*lLg5ZqY zuA>~d$kJvbZE1WU1%S)*Tg}8NuApK9jAv6^4n!c?+b;2te1~P?yQ}{D_Zfs^WmeYv zsY>5h$JHvfS~{eqIv+}m7IYd;W3wMmU!BTU_?^ug>~-gEx3$;bGam5-xqFEkNdj8m z>ONUV_p*-CxLNP|Ry_d~ zlxDc745x?*?P-`pRT};_hehm&Mez1`|LDg>K|mz{j&ezyb$4_3_U`?Avm7a+S=2=> z_99||*=SJ#DHWed?Xpg{+$+Tzb}oO{{8m2CFJAE#Dx?VKFS8c`P9+bYN% z3(Q1w3bSvhQuIqaWgKdc1kPqXg=qrfi2?W#!!Nr0N~!hO|jEGIyePh6&$ZF zG-1-G-8~!rQpM@<%R|}17IF(Dzh&qb*mz_Z2d1IlCJwK0=jh;O*7WhURb$*}F*|b{ z>}eWJkHgs{7~)n{tD`Lo?K_C4@;ae`q;PuADNGmy z!;jZNI?6Z{%A>)A=Y1!=@Ai)mPK(l`LKozoTj^0nQF^wpMtT~XCq1uCL3*xEN^gjx zE=lj)qpU<#na!4%MbaanlJs2Z>S)W-!wp8=ck|e|J`*iBoXHb6I z0GL5Y>xav5_z{+7!5CJppxz<4ADTl#9nPZSGa5%RVWgE1PBMW&HI`-3SCo&{L`|n*N32dV%Hgh%#zg>>lTk=)hKA$i0X&+fF7P0w|0`_SrE-h zFzsaEyKohG$pnSYmBpVUm!(^QgFI6*4TZMLn5g;U6cy-+8RkC0UeXnE-j_}GbvWf!T z-4%@fs%v(mUg++jYuon_f~6QR(WmH}zSs7h75najC!01~-ITp-^Xd7!{?*yWQ}D-) zRs~@h5SCRDX3u{4>{1+TThgleUQ`!_&NhgLc-YP@j3_*vA{D`7cE+M@-LQ|Lwy89n zWTCD$UG(jNxq!SUNF~nt4frEG?B^}Ph9M@uOu;vxI-LUWL7FCMv+*)!mC$>iFBJMH zqoJ%mtJ+2-e#@c^h7BHzS2Wa%I8O)n2a^}fM?>7pZnR9FkD8nlP~vZERSVHx1ko4? zaNV}nuc=_I)~qR7RCAF@Gh(7}+WKtf8oJWp+7Us;ytkWih6lS}@bEF^6=bFv?HEJD zjp@71GdoDyK<3gdS4#WIT>9+H5--r~s;YDa0kETbD~yz3^-!D~1!apmB7hY;BG~GV zc(4mPVt~~;Vpy*ukPeF?y11oaTI}??BhJif$h)u4Oh?$c1LhnJVee%CY~0OelPGUC zx((FLnadK2M#i?SEucH3WQ500dA0$V7HIJX4CRGFpO3)zLi_kw0DF3V27ve>I)p~= zoEl-M801Z!YT4v~+$2xX{peaiWeH^RsHt;gLaD&+>6Au@-zy^KZ+o(}%+ZcWaMpCO z0lu%}aJUw~CQ(eI64Qfh3B%g17#Fyo8H7CLfoT+t9X*Atn@({Q>${B_e0jnrOtlDC zpo!!6P@+gM*e?W5Tv+QsxwbDoC>6DZ!(>&Flf59QSXuP%^pVsMi_+__DqHa-j}CY;Bk@FI#~odo0!{Gvjr*mFT5Ay^E(S%3}}LU*dc z2L^1IfFj59uoS1(8(7eW<{YhFU*d|gxv>#xbq93=-mv4pj&L7iKAm~T+VdH%KQYSRw=mT}0)UT8DBX5obQ&^b>x7{k= zKa_@Ndv@syY=#*uY;hT;0nEHSM9XQI?i(*Ow`w%AZ)97D+Wb-z;T1};16n&rP*)vr?#%&>fSlU{Q_I zWLAjZGTwZfM&rxe;ty}4EN^47>X3KbC@hbY+@ZqeS3#UB+PT9+eF!!3?!)-V+@S$i z^5XV(9v!(MYUt7EA}|LwYScFMi?C z3bK4NE2s4T;cBi977kmKFZvx$~trY&oPRxL0AJexT4&N#s+!Pc@|{jt%NK1 zPW53O=X=Ha&Chcigr&&mr5vTybjr0#26W2KS#5D6xA|u9Ngf*0V#S`0Ni0Yl75j%-a@D2Vk8} zq;|10fkMe`#Bx~6*N1r9qv5wx72r-l8aEKv*^*`VYvsR?f{1$RY_@2Ijz~mKmCeb< zT5adu**v>!_Us&SFBo48+6pQ>2=l=A5VmxyT?2lRB!kKCc&_FOD>3xEQ5HGYV+L0f zsEN;xf}>Ky&9hc(kt|ScWG=o_A+vqF_8D#OD<)uAPz3Wy?qWx?sirs7BE6v|gqe=# z_y_Ncn#h?qol6@|-WCL}9?S+l$LR2{I8?yE!Ma2n8`4U*9K1WtZ|WWXe#QQ|YbE!P zl``APc1>ls%^z@cZdef6!siD7v@+y6{7A2EUr#H`~UaZ#hnczg1P&btqjC zofT~s4{SDDZcTi(Rjl1=xux*cW`$dXY4~cZVySKo#GWF4gvcDTk~gLCAYQB>iE?;| zC|wbSEnX2%yk!f#+I$BvXA~Y>ZPDLFPiS@o(dBOdz+#VgzgB8xf@-}_yS8kAUu1YI z4Nep34ay(LeNh3+y8(FoS1Q!U_Gat6uiPHCJSME!TCgXD0U*FlE=I$<-$Bcq^9(9# z2ksn)8spXre426N2G2&oqs7gfje)gnv)gW(J>qtIFmb6Dj%m$-sSk9$R~@JwKwNAT zs9h@c3VYs>Wm?JEw2HNsf9XO7*6-g8+A8qR*3H2aeTp9FJK_|_q-Dov>$|$W#H`mP z^eHjp_lIES_Fg^!hvND~LF5DAS>NiIb^EfCJIyZZEb)2eE=;3AtE!(@dbW{Y%RN$Y zt#~y(c{&eUm3k$VsX~Klhhr%Rm2pR~0)K|L*!v1U1YZ2woX{Ri87G!gJ9q5mhGn4& zO!6osqb-b66OtAvNxvW|>58G7 zXVQSDGi;U2ikSHUfP7nQHYYQGpBb3!FEn{I7kFnW!ed@^ zU!xw>?qNLoFHrPoAw`WBhFR_}{F7T3^l!UrL>4$+4!vuE3r1Z9+ZVv$GUy!(JXwl) zr!RmPU^Yv*#TgOFETqIyUbcY_niZSYeNs}P<=?qf)4pVu)A6EwtOiL!nZKY|lp7;*9yMiF)pJv(Gti!5O8OoAfA-{Q zA@?n126&;j^P_@xoz=;+6bq)+y@+5UOdYnN!9j zRX7tN5_K!7j@vpQ0DUW515$LGieDXoC4;^j#P}}@cMZz7SzZ*1&&mXt#Q95bQ~Vf# zzOdvGrEhn^QV>6%YqE417u8}e-==C;Uy;&1>MlRo3uVyNCw-r6K_Bw!Y4O6TO=tUX zF0r03$11Nx7B50ttTC$nB>Eknql5CSgwXo0ji)WA&!+jl%o1tS`Jwjke0_8hVmgyT zRhi<|nRv9O(@ZcQB~S3slD#anPXurAEfrQ3EIST;by+zQD|=$H#*+CKte0%0HUt(n zjL0O1ykJbseH?7XdJNNK6t)++=VBbl87w>)bU!7pFNRcnf_mt?7*6}d)|q~9CXFb)>*(SrQb|S@kkp~K|NZ&o)HgZ*cG;rUEDl1i zH+8>s!#pb~Mj4Ra4_F28EeUKDNW4f`4d<!~eo3BG~Oy7M0q0M#)svwA-U*J>87H?$UR^$rh$#Q4^RL+Vn3s;jc8`nI@dY zvcq{px(PlE^hwW(4(eGEs%M~jRk+;tbFHL{dyBq#=xJt|K}z%seX}p}+GgIWUraOd z>4g`z;H;omZq9AHcsQOICMplK0k zw@)|F=(Y(d0)B07V8Ld~lvZJySxj2Cpx8#99WBsKeP8(3l<{+)uDH1|6}=bxo{5YQ zxj{NhyLfSKKX3MUH@wklxP*`yZClV?m|42L3Rwh7;Dy`Bjg{#2QcA3iI38KcSe=vy zQXv#Z?nlbG<9wmtIS0c(Cogcm$j6+MRi9V*6bC|1+makRV|CQSuu%x zNsmG3AMP>A&Fmal;WgxwA1`dd{~NF2Wo#Vsbl4N7`URYY^7FY?!B|85{a@mE{E-*( zPo`y-e6FjibQDv;yBUqyrLh#!;J#q5HFCOtfTR|5*jPn~Rl@u7QuvPx;6KUxhp~O> z6jbz+RRO#8l+yQoj_+pV4|m=b?Fhd-EpuC075@BfX8*pXV|(V@OgOSdJS{RUqb zVuvmY@gNCmaN$92TvQ?LP_L_Iq6&h6w^%t7Qw2STq|bzKuN`5GWpJH26k_FQv4?Otdk(VoEXeRh;FD+?O@ed+5%5mGgzX>5_qGc2 zVYkG@oko#`l?<$N?v5i?4ZSFfx~Xx+rRYS;?=yn58o_;mSj^4>3s)lF>Sw&3Aour= zzVC!1wlF+b(r-91h5S65+jXK}*K&ke_Mk^-5RVH$!O;Z7U-tn1(wJ~BN8z#mbr#;_`RRJ{%nJMQ!n z6+Pc$_(FGeE;G!FTNC)lhosVvR3wsE&Hp{kr?yI1^f3 z^{Gfh(3uPrco5IJ&*1~#V@J>%zAZIMJf!6Yj^W;cOY?EBUH9Y{{$dVHh%lB5{G8!` zI71F zqM!wpPem8yUC@cODUojMBA8@D1>Ex=rTJ#B?Bu z%61vRJRt75TO=@=@Fu_`N4-_`tOHB?O*IO$`50yeY^=AYxMIh}WaOy>`x612?)1UJ zZhfGK7%<*2;6DL9lpjM-Uw7!O{4Rv8bQbf$V8S;@2A2M|X$?(r9!%!rOVIL0MsuZ} z8u|PbSuwaR%$2(P2MEqzEo%u@Wgb;!A5}K1xY)GoU%;d_h!z-~ExN{j%&LLRHH^M{ zzl=-1`pTOjEI8k-kl<8O1FkPj2ylL9Z+XkWl!<$RrDIQVV^1IF*JeU3 zx{fC(_Oq~jH&D1$b8|u@-g26X_uac?Bgze`tZFd+(}G#)_}g=9?htwjpY-m*(t8jK z?myslS6B^~USg#4dy`}1z7*f7tjm;h!UN4a)~QWT8kFh=?gjM>qGj`bF(?o^4-9MZ zAsFYQDEOqfj#CXN*|UKebDUoQaW=%dD`d;*{3jTxUUaW`e-mi_13r#Y+xebD(`1e6}?cEE+qOTco0Udy=Sm+ zHJRZH8^-lTxm~yr2fT|BWQM@Wa!pv7NoN&YMueJb3^KF4mhRXQj+v< z8x8|&e%3!2z|T=MTVf|oxR3qA@6`k|OT{9dTksm*G@^qKuIL6+dN5EUHa`~)DtX^( sVgSZi3jIODKkliGy$SQj{TlT7f5O`GH!gbs0GL~K=Kufz literal 0 HcmV?d00001 diff --git a/node_modules/semver/semver.js b/node_modules/semver/semver.js new file mode 100644 index 0000000..d265b56 --- /dev/null +++ b/node_modules/semver/semver.js @@ -0,0 +1,1191 @@ +// export the class if we are in a Node-like system. +if (typeof module === 'object' && module.exports === exports) + exports = module.exports = SemVer; + +// The debug function is excluded entirely from the minified version. +/* nomin */ var debug; +/* nomin */ if (typeof process === 'object' && + /* nomin */ process.env && + /* nomin */ process.env.NODE_DEBUG && + /* nomin */ /\bsemver\b/i.test(process.env.NODE_DEBUG)) + /* nomin */ debug = function() { + /* nomin */ var args = Array.prototype.slice.call(arguments, 0); + /* nomin */ args.unshift('SEMVER'); + /* nomin */ console.log.apply(console, args); + /* nomin */ }; +/* nomin */ else + /* nomin */ debug = function() {}; + +// Note: this is the semver.org version of the spec that it implements +// Not necessarily the package version of this code. +exports.SEMVER_SPEC_VERSION = '2.0.0'; + +var MAX_LENGTH = 256; +var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; + +// The actual regexps go on exports.re +var re = exports.re = []; +var src = exports.src = []; +var R = 0; + +// The following Regular Expressions can be used for tokenizing, +// validating, and parsing SemVer version strings. + +// ## Numeric Identifier +// A single `0`, or a non-zero digit followed by zero or more digits. + +var NUMERICIDENTIFIER = R++; +src[NUMERICIDENTIFIER] = '0|[1-9]\\d*'; +var NUMERICIDENTIFIERLOOSE = R++; +src[NUMERICIDENTIFIERLOOSE] = '[0-9]+'; + + +// ## Non-numeric Identifier +// Zero or more digits, followed by a letter or hyphen, and then zero or +// more letters, digits, or hyphens. + +var NONNUMERICIDENTIFIER = R++; +src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'; + + +// ## Main Version +// Three dot-separated numeric identifiers. + +var MAINVERSION = R++; +src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')'; + +var MAINVERSIONLOOSE = R++; +src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')'; + +// ## Pre-release Version Identifier +// A numeric identifier, or a non-numeric identifier. + +var PRERELEASEIDENTIFIER = R++; +src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + + '|' + src[NONNUMERICIDENTIFIER] + ')'; + +var PRERELEASEIDENTIFIERLOOSE = R++; +src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + + '|' + src[NONNUMERICIDENTIFIER] + ')'; + + +// ## Pre-release Version +// Hyphen, followed by one or more dot-separated pre-release version +// identifiers. + +var PRERELEASE = R++; +src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + + '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))'; + +var PRERELEASELOOSE = R++; +src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + + '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))'; + +// ## Build Metadata Identifier +// Any combination of digits, letters, or hyphens. + +var BUILDIDENTIFIER = R++; +src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+'; + +// ## Build Metadata +// Plus sign, followed by one or more period-separated build metadata +// identifiers. + +var BUILD = R++; +src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + + '(?:\\.' + src[BUILDIDENTIFIER] + ')*))'; + + +// ## Full Version String +// A main version, followed optionally by a pre-release version and +// build metadata. + +// Note that the only major, minor, patch, and pre-release sections of +// the version string are capturing groups. The build metadata is not a +// capturing group, because it should not ever be used in version +// comparison. + +var FULL = R++; +var FULLPLAIN = 'v?' + src[MAINVERSION] + + src[PRERELEASE] + '?' + + src[BUILD] + '?'; + +src[FULL] = '^' + FULLPLAIN + '$'; + +// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. +// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty +// common in the npm registry. +var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + + src[PRERELEASELOOSE] + '?' + + src[BUILD] + '?'; + +var LOOSE = R++; +src[LOOSE] = '^' + LOOSEPLAIN + '$'; + +var GTLT = R++; +src[GTLT] = '((?:<|>)?=?)'; + +// Something like "2.*" or "1.2.x". +// Note that "x.x" is a valid xRange identifer, meaning "any version" +// Only the first item is strictly required. +var XRANGEIDENTIFIERLOOSE = R++; +src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*'; +var XRANGEIDENTIFIER = R++; +src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*'; + +var XRANGEPLAIN = R++; +src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:' + src[PRERELEASE] + ')?' + + src[BUILD] + '?' + + ')?)?'; + +var XRANGEPLAINLOOSE = R++; +src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:' + src[PRERELEASELOOSE] + ')?' + + src[BUILD] + '?' + + ')?)?'; + +var XRANGE = R++; +src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$'; +var XRANGELOOSE = R++; +src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$'; + +// Tilde ranges. +// Meaning is "reasonably at or greater than" +var LONETILDE = R++; +src[LONETILDE] = '(?:~>?)'; + +var TILDETRIM = R++; +src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+'; +re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g'); +var tildeTrimReplace = '$1~'; + +var TILDE = R++; +src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$'; +var TILDELOOSE = R++; +src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$'; + +// Caret ranges. +// Meaning is "at least and backwards compatible with" +var LONECARET = R++; +src[LONECARET] = '(?:\\^)'; + +var CARETTRIM = R++; +src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+'; +re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g'); +var caretTrimReplace = '$1^'; + +var CARET = R++; +src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$'; +var CARETLOOSE = R++; +src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$'; + +// A simple gt/lt/eq thing, or just "" to indicate "any version" +var COMPARATORLOOSE = R++; +src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$'; +var COMPARATOR = R++; +src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$'; + + +// An expression to strip any whitespace between the gtlt and the thing +// it modifies, so that `> 1.2.3` ==> `>1.2.3` +var COMPARATORTRIM = R++; +src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + + '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')'; + +// this one has to use the /g flag +re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g'); +var comparatorTrimReplace = '$1$2$3'; + + +// Something like `1.2.3 - 1.2.4` +// Note that these all use the loose form, because they'll be +// checked against either the strict or loose comparator form +// later. +var HYPHENRANGE = R++; +src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAIN] + ')' + + '\\s*$'; + +var HYPHENRANGELOOSE = R++; +src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s*$'; + +// Star ranges basically just allow anything at all. +var STAR = R++; +src[STAR] = '(<|>)?=?\\s*\\*'; + +// Compile to actual regexp objects. +// All are flag-free, unless they were created above with a flag. +for (var i = 0; i < R; i++) { + debug(i, src[i]); + if (!re[i]) + re[i] = new RegExp(src[i]); +} + +exports.parse = parse; +function parse(version, loose) { + if (version.length > MAX_LENGTH) + return null; + + var r = loose ? re[LOOSE] : re[FULL]; + if (!r.test(version)) + return null; + + try { + return new SemVer(version, loose); + } catch (er) { + return null; + } +} + +exports.valid = valid; +function valid(version, loose) { + var v = parse(version, loose); + return v ? v.version : null; +} + + +exports.clean = clean; +function clean(version, loose) { + var s = parse(version.trim().replace(/^[=v]+/, ''), loose); + return s ? s.version : null; +} + +exports.SemVer = SemVer; + +function SemVer(version, loose) { + if (version instanceof SemVer) { + if (version.loose === loose) + return version; + else + version = version.version; + } else if (typeof version !== 'string') { + throw new TypeError('Invalid Version: ' + version); + } + + if (version.length > MAX_LENGTH) + throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') + + if (!(this instanceof SemVer)) + return new SemVer(version, loose); + + debug('SemVer', version, loose); + this.loose = loose; + var m = version.trim().match(loose ? re[LOOSE] : re[FULL]); + + if (!m) + throw new TypeError('Invalid Version: ' + version); + + this.raw = version; + + // these are actually numbers + this.major = +m[1]; + this.minor = +m[2]; + this.patch = +m[3]; + + if (this.major > MAX_SAFE_INTEGER || this.major < 0) + throw new TypeError('Invalid major version') + + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) + throw new TypeError('Invalid minor version') + + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) + throw new TypeError('Invalid patch version') + + // numberify any prerelease numeric ids + if (!m[4]) + this.prerelease = []; + else + this.prerelease = m[4].split('.').map(function(id) { + return (/^[0-9]+$/.test(id)) ? +id : id; + }); + + this.build = m[5] ? m[5].split('.') : []; + this.format(); +} + +SemVer.prototype.format = function() { + this.version = this.major + '.' + this.minor + '.' + this.patch; + if (this.prerelease.length) + this.version += '-' + this.prerelease.join('.'); + return this.version; +}; + +SemVer.prototype.inspect = function() { + return ''; +}; + +SemVer.prototype.toString = function() { + return this.version; +}; + +SemVer.prototype.compare = function(other) { + debug('SemVer.compare', this.version, this.loose, other); + if (!(other instanceof SemVer)) + other = new SemVer(other, this.loose); + + return this.compareMain(other) || this.comparePre(other); +}; + +SemVer.prototype.compareMain = function(other) { + if (!(other instanceof SemVer)) + other = new SemVer(other, this.loose); + + return compareIdentifiers(this.major, other.major) || + compareIdentifiers(this.minor, other.minor) || + compareIdentifiers(this.patch, other.patch); +}; + +SemVer.prototype.comparePre = function(other) { + if (!(other instanceof SemVer)) + other = new SemVer(other, this.loose); + + // NOT having a prerelease is > having one + if (this.prerelease.length && !other.prerelease.length) + return -1; + else if (!this.prerelease.length && other.prerelease.length) + return 1; + else if (!this.prerelease.length && !other.prerelease.length) + return 0; + + var i = 0; + do { + var a = this.prerelease[i]; + var b = other.prerelease[i]; + debug('prerelease compare', i, a, b); + if (a === undefined && b === undefined) + return 0; + else if (b === undefined) + return 1; + else if (a === undefined) + return -1; + else if (a === b) + continue; + else + return compareIdentifiers(a, b); + } while (++i); +}; + +// preminor will bump the version up to the next minor release, and immediately +// down to pre-release. premajor and prepatch work the same way. +SemVer.prototype.inc = function(release, identifier) { + switch (release) { + case 'premajor': + this.prerelease.length = 0; + this.patch = 0; + this.minor = 0; + this.major++; + this.inc('pre', identifier); + break; + case 'preminor': + this.prerelease.length = 0; + this.patch = 0; + this.minor++; + this.inc('pre', identifier); + break; + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0; + this.inc('patch', identifier); + this.inc('pre', identifier); + break; + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case 'prerelease': + if (this.prerelease.length === 0) + this.inc('patch', identifier); + this.inc('pre', identifier); + break; + + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) + this.major++; + this.minor = 0; + this.patch = 0; + this.prerelease = []; + break; + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) + this.minor++; + this.patch = 0; + this.prerelease = []; + break; + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) + this.patch++; + this.prerelease = []; + break; + // This probably shouldn't be used publicly. + // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. + case 'pre': + if (this.prerelease.length === 0) + this.prerelease = [0]; + else { + var i = this.prerelease.length; + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++; + i = -2; + } + } + if (i === -1) // didn't increment anything + this.prerelease.push(0); + } + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) + this.prerelease = [identifier, 0]; + } else + this.prerelease = [identifier, 0]; + } + break; + + default: + throw new Error('invalid increment argument: ' + release); + } + this.format(); + return this; +}; + +exports.inc = inc; +function inc(version, release, loose, identifier) { + if (typeof(loose) === 'string') { + identifier = loose; + loose = undefined; + } + + try { + return new SemVer(version, loose).inc(release, identifier).version; + } catch (er) { + return null; + } +} + +exports.diff = diff; +function diff(version1, version2) { + if (eq(version1, version2)) { + return null; + } else { + var v1 = parse(version1); + var v2 = parse(version2); + if (v1.prerelease.length || v2.prerelease.length) { + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return 'pre'+key; + } + } + } + return 'prerelease'; + } + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return key; + } + } + } + } +} + +exports.compareIdentifiers = compareIdentifiers; + +var numeric = /^[0-9]+$/; +function compareIdentifiers(a, b) { + var anum = numeric.test(a); + var bnum = numeric.test(b); + + if (anum && bnum) { + a = +a; + b = +b; + } + + return (anum && !bnum) ? -1 : + (bnum && !anum) ? 1 : + a < b ? -1 : + a > b ? 1 : + 0; +} + +exports.rcompareIdentifiers = rcompareIdentifiers; +function rcompareIdentifiers(a, b) { + return compareIdentifiers(b, a); +} + +exports.major = major; +function major(a, loose) { + return new SemVer(a, loose).major; +} + +exports.minor = minor; +function minor(a, loose) { + return new SemVer(a, loose).minor; +} + +exports.patch = patch; +function patch(a, loose) { + return new SemVer(a, loose).patch; +} + +exports.compare = compare; +function compare(a, b, loose) { + return new SemVer(a, loose).compare(b); +} + +exports.compareLoose = compareLoose; +function compareLoose(a, b) { + return compare(a, b, true); +} + +exports.rcompare = rcompare; +function rcompare(a, b, loose) { + return compare(b, a, loose); +} + +exports.sort = sort; +function sort(list, loose) { + return list.sort(function(a, b) { + return exports.compare(a, b, loose); + }); +} + +exports.rsort = rsort; +function rsort(list, loose) { + return list.sort(function(a, b) { + return exports.rcompare(a, b, loose); + }); +} + +exports.gt = gt; +function gt(a, b, loose) { + return compare(a, b, loose) > 0; +} + +exports.lt = lt; +function lt(a, b, loose) { + return compare(a, b, loose) < 0; +} + +exports.eq = eq; +function eq(a, b, loose) { + return compare(a, b, loose) === 0; +} + +exports.neq = neq; +function neq(a, b, loose) { + return compare(a, b, loose) !== 0; +} + +exports.gte = gte; +function gte(a, b, loose) { + return compare(a, b, loose) >= 0; +} + +exports.lte = lte; +function lte(a, b, loose) { + return compare(a, b, loose) <= 0; +} + +exports.cmp = cmp; +function cmp(a, op, b, loose) { + var ret; + switch (op) { + case '===': + if (typeof a === 'object') a = a.version; + if (typeof b === 'object') b = b.version; + ret = a === b; + break; + case '!==': + if (typeof a === 'object') a = a.version; + if (typeof b === 'object') b = b.version; + ret = a !== b; + break; + case '': case '=': case '==': ret = eq(a, b, loose); break; + case '!=': ret = neq(a, b, loose); break; + case '>': ret = gt(a, b, loose); break; + case '>=': ret = gte(a, b, loose); break; + case '<': ret = lt(a, b, loose); break; + case '<=': ret = lte(a, b, loose); break; + default: throw new TypeError('Invalid operator: ' + op); + } + return ret; +} + +exports.Comparator = Comparator; +function Comparator(comp, loose) { + if (comp instanceof Comparator) { + if (comp.loose === loose) + return comp; + else + comp = comp.value; + } + + if (!(this instanceof Comparator)) + return new Comparator(comp, loose); + + debug('comparator', comp, loose); + this.loose = loose; + this.parse(comp); + + if (this.semver === ANY) + this.value = ''; + else + this.value = this.operator + this.semver.version; + + debug('comp', this); +} + +var ANY = {}; +Comparator.prototype.parse = function(comp) { + var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; + var m = comp.match(r); + + if (!m) + throw new TypeError('Invalid comparator: ' + comp); + + this.operator = m[1]; + if (this.operator === '=') + this.operator = ''; + + // if it literally is just '>' or '' then allow anything. + if (!m[2]) + this.semver = ANY; + else + this.semver = new SemVer(m[2], this.loose); +}; + +Comparator.prototype.inspect = function() { + return ''; +}; + +Comparator.prototype.toString = function() { + return this.value; +}; + +Comparator.prototype.test = function(version) { + debug('Comparator.test', version, this.loose); + + if (this.semver === ANY) + return true; + + if (typeof version === 'string') + version = new SemVer(version, this.loose); + + return cmp(version, this.operator, this.semver, this.loose); +}; + + +exports.Range = Range; +function Range(range, loose) { + if ((range instanceof Range) && range.loose === loose) + return range; + + if (!(this instanceof Range)) + return new Range(range, loose); + + this.loose = loose; + + // First, split based on boolean or || + this.raw = range; + this.set = range.split(/\s*\|\|\s*/).map(function(range) { + return this.parseRange(range.trim()); + }, this).filter(function(c) { + // throw out any that are not relevant for whatever reason + return c.length; + }); + + if (!this.set.length) { + throw new TypeError('Invalid SemVer Range: ' + range); + } + + this.format(); +} + +Range.prototype.inspect = function() { + return ''; +}; + +Range.prototype.format = function() { + this.range = this.set.map(function(comps) { + return comps.join(' ').trim(); + }).join('||').trim(); + return this.range; +}; + +Range.prototype.toString = function() { + return this.range; +}; + +Range.prototype.parseRange = function(range) { + var loose = this.loose; + range = range.trim(); + debug('range', range, loose); + // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE]; + range = range.replace(hr, hyphenReplace); + debug('hyphen replace', range); + // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace); + debug('comparator trim', range, re[COMPARATORTRIM]); + + // `~ 1.2.3` => `~1.2.3` + range = range.replace(re[TILDETRIM], tildeTrimReplace); + + // `^ 1.2.3` => `^1.2.3` + range = range.replace(re[CARETTRIM], caretTrimReplace); + + // normalize spaces + range = range.split(/\s+/).join(' '); + + // At this point, the range is completely trimmed and + // ready to be split into comparators. + + var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; + var set = range.split(' ').map(function(comp) { + return parseComparator(comp, loose); + }).join(' ').split(/\s+/); + if (this.loose) { + // in loose mode, throw out any that are not valid comparators + set = set.filter(function(comp) { + return !!comp.match(compRe); + }); + } + set = set.map(function(comp) { + return new Comparator(comp, loose); + }); + + return set; +}; + +// Mostly just for testing and legacy API reasons +exports.toComparators = toComparators; +function toComparators(range, loose) { + return new Range(range, loose).set.map(function(comp) { + return comp.map(function(c) { + return c.value; + }).join(' ').trim().split(' '); + }); +} + +// comprised of xranges, tildes, stars, and gtlt's at this point. +// already replaced the hyphen ranges +// turn into a set of JUST comparators. +function parseComparator(comp, loose) { + debug('comp', comp); + comp = replaceCarets(comp, loose); + debug('caret', comp); + comp = replaceTildes(comp, loose); + debug('tildes', comp); + comp = replaceXRanges(comp, loose); + debug('xrange', comp); + comp = replaceStars(comp, loose); + debug('stars', comp); + return comp; +} + +function isX(id) { + return !id || id.toLowerCase() === 'x' || id === '*'; +} + +// ~, ~> --> * (any, kinda silly) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 +function replaceTildes(comp, loose) { + return comp.trim().split(/\s+/).map(function(comp) { + return replaceTilde(comp, loose); + }).join(' '); +} + +function replaceTilde(comp, loose) { + var r = loose ? re[TILDELOOSE] : re[TILDE]; + return comp.replace(r, function(_, M, m, p, pr) { + debug('tilde', comp, _, M, m, p, pr); + var ret; + + if (isX(M)) + ret = ''; + else if (isX(m)) + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + else if (isX(p)) + // ~1.2 == >=1.2.0- <1.3.0- + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + else if (pr) { + debug('replaceTilde pr', pr); + if (pr.charAt(0) !== '-') + pr = '-' + pr; + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + M + '.' + (+m + 1) + '.0'; + } else + // ~1.2.3 == >=1.2.3 <1.3.0 + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0'; + + debug('tilde return', ret); + return ret; + }); +} + +// ^ --> * (any, kinda silly) +// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 +// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 +// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 +// ^1.2.3 --> >=1.2.3 <2.0.0 +// ^1.2.0 --> >=1.2.0 <2.0.0 +function replaceCarets(comp, loose) { + return comp.trim().split(/\s+/).map(function(comp) { + return replaceCaret(comp, loose); + }).join(' '); +} + +function replaceCaret(comp, loose) { + debug('caret', comp, loose); + var r = loose ? re[CARETLOOSE] : re[CARET]; + return comp.replace(r, function(_, M, m, p, pr) { + debug('caret', comp, _, M, m, p, pr); + var ret; + + if (isX(M)) + ret = ''; + else if (isX(m)) + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + else if (isX(p)) { + if (M === '0') + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + else + ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'; + } else if (pr) { + debug('replaceCaret pr', pr); + if (pr.charAt(0) !== '-') + pr = '-' + pr; + if (M === '0') { + if (m === '0') + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + M + '.' + m + '.' + (+p + 1); + else + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + M + '.' + (+m + 1) + '.0'; + } else + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + (+M + 1) + '.0.0'; + } else { + debug('no pr'); + if (M === '0') { + if (m === '0') + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + m + '.' + (+p + 1); + else + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0'; + } else + ret = '>=' + M + '.' + m + '.' + p + + ' <' + (+M + 1) + '.0.0'; + } + + debug('caret return', ret); + return ret; + }); +} + +function replaceXRanges(comp, loose) { + debug('replaceXRanges', comp, loose); + return comp.split(/\s+/).map(function(comp) { + return replaceXRange(comp, loose); + }).join(' '); +} + +function replaceXRange(comp, loose) { + comp = comp.trim(); + var r = loose ? re[XRANGELOOSE] : re[XRANGE]; + return comp.replace(r, function(ret, gtlt, M, m, p, pr) { + debug('xRange', comp, ret, gtlt, M, m, p, pr); + var xM = isX(M); + var xm = xM || isX(m); + var xp = xm || isX(p); + var anyX = xp; + + if (gtlt === '=' && anyX) + gtlt = ''; + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0'; + } else { + // nothing is forbidden + ret = '*'; + } + } else if (gtlt && anyX) { + // replace X with 0 + if (xm) + m = 0; + if (xp) + p = 0; + + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + // >1.2.3 => >= 1.2.4 + gtlt = '>='; + if (xm) { + M = +M + 1; + m = 0; + p = 0; + } else if (xp) { + m = +m + 1; + p = 0; + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<' + if (xm) + M = +M + 1 + else + m = +m + 1 + } + + ret = gtlt + M + '.' + m + '.' + p; + } else if (xm) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + } else if (xp) { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + } + + debug('xRange return', ret); + + return ret; + }); +} + +// Because * is AND-ed with everything else in the comparator, +// and '' means "any version", just remove the *s entirely. +function replaceStars(comp, loose) { + debug('replaceStars', comp, loose); + // Looseness is ignored here. star is always as loose as it gets! + return comp.trim().replace(re[STAR], ''); +} + +// This function is passed to string.replace(re[HYPHENRANGE]) +// M, m, patch, prerelease, build +// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 +// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do +// 1.2 - 3.4 => >=1.2.0 <3.5.0 +function hyphenReplace($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr, tb) { + + if (isX(fM)) + from = ''; + else if (isX(fm)) + from = '>=' + fM + '.0.0'; + else if (isX(fp)) + from = '>=' + fM + '.' + fm + '.0'; + else + from = '>=' + from; + + if (isX(tM)) + to = ''; + else if (isX(tm)) + to = '<' + (+tM + 1) + '.0.0'; + else if (isX(tp)) + to = '<' + tM + '.' + (+tm + 1) + '.0'; + else if (tpr) + to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr; + else + to = '<=' + to; + + return (from + ' ' + to).trim(); +} + + +// if ANY of the sets match ALL of its comparators, then pass +Range.prototype.test = function(version) { + if (!version) + return false; + + if (typeof version === 'string') + version = new SemVer(version, this.loose); + + for (var i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version)) + return true; + } + return false; +}; + +function testSet(set, version) { + for (var i = 0; i < set.length; i++) { + if (!set[i].test(version)) + return false; + } + + if (version.prerelease.length) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (var i = 0; i < set.length; i++) { + debug(set[i].semver); + if (set[i].semver === ANY) + return true; + + if (set[i].semver.prerelease.length > 0) { + var allowed = set[i].semver; + if (allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch) + return true; + } + } + + // Version has a -pre, but it's not one of the ones we like. + return false; + } + + return true; +} + +exports.satisfies = satisfies; +function satisfies(version, range, loose) { + try { + range = new Range(range, loose); + } catch (er) { + return false; + } + return range.test(version); +} + +exports.maxSatisfying = maxSatisfying; +function maxSatisfying(versions, range, loose) { + return versions.filter(function(version) { + return satisfies(version, range, loose); + }).sort(function(a, b) { + return rcompare(a, b, loose); + })[0] || null; +} + +exports.validRange = validRange; +function validRange(range, loose) { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, loose).range || '*'; + } catch (er) { + return null; + } +} + +// Determine if version is less than all the versions possible in the range +exports.ltr = ltr; +function ltr(version, range, loose) { + return outside(version, range, '<', loose); +} + +// Determine if version is greater than all the versions possible in the range. +exports.gtr = gtr; +function gtr(version, range, loose) { + return outside(version, range, '>', loose); +} + +exports.outside = outside; +function outside(version, range, hilo, loose) { + version = new SemVer(version, loose); + range = new Range(range, loose); + + var gtfn, ltefn, ltfn, comp, ecomp; + switch (hilo) { + case '>': + gtfn = gt; + ltefn = lte; + ltfn = lt; + comp = '>'; + ecomp = '>='; + break; + case '<': + gtfn = lt; + ltefn = gte; + ltfn = gt; + comp = '<'; + ecomp = '<='; + break; + default: + throw new TypeError('Must provide a hilo val of "<" or ">"'); + } + + // If it satisifes the range it is not outside + if (satisfies(version, range, loose)) { + return false; + } + + // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. + + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i]; + + var high = null; + var low = null; + + comparators.forEach(function(comparator) { + high = high || comparator; + low = low || comparator; + if (gtfn(comparator.semver, high.semver, loose)) { + high = comparator; + } else if (ltfn(comparator.semver, low.semver, loose)) { + low = comparator; + } + }); + + // If the edge version comparator has a operator then our version + // isn't outside it + if (high.operator === comp || high.operator === ecomp) { + return false; + } + + // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + if ((!low.operator || low.operator === comp) && + ltefn(version, low.semver)) { + return false; + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false; + } + } + return true; +} + +// Use the define() function if we're in AMD land +if (typeof define === 'function' && define.amd) + define(exports); diff --git a/node_modules/semver/semver.min.js b/node_modules/semver/semver.min.js new file mode 100644 index 0000000..abe2d81 --- /dev/null +++ b/node_modules/semver/semver.min.js @@ -0,0 +1 @@ +(function(e){if(typeof module==="object"&&module.exports===e)e=module.exports=K;e.SEMVER_SPEC_VERSION="2.0.0";var r=256;var t=Number.MAX_SAFE_INTEGER||9007199254740991;var n=e.re=[];var i=e.src=[];var s=0;var o=s++;i[o]="0|[1-9]\\d*";var a=s++;i[a]="[0-9]+";var f=s++;i[f]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var u=s++;i[u]="("+i[o]+")\\."+"("+i[o]+")\\."+"("+i[o]+")";var l=s++;i[l]="("+i[a]+")\\."+"("+i[a]+")\\."+"("+i[a]+")";var h=s++;i[h]="(?:"+i[o]+"|"+i[f]+")";var p=s++;i[p]="(?:"+i[a]+"|"+i[f]+")";var c=s++;i[c]="(?:-("+i[h]+"(?:\\."+i[h]+")*))";var v=s++;i[v]="(?:-?("+i[p]+"(?:\\."+i[p]+")*))";var m=s++;i[m]="[0-9A-Za-z-]+";var g=s++;i[g]="(?:\\+("+i[m]+"(?:\\."+i[m]+")*))";var w=s++;var y="v?"+i[u]+i[c]+"?"+i[g]+"?";i[w]="^"+y+"$";var d="[v=\\s]*"+i[l]+i[v]+"?"+i[g]+"?";var j=s++;i[j]="^"+d+"$";var b=s++;i[b]="((?:<|>)?=?)";var E=s++;i[E]=i[a]+"|x|X|\\*";var $=s++;i[$]=i[o]+"|x|X|\\*";var k=s++;i[k]="[v=\\s]*("+i[$]+")"+"(?:\\.("+i[$]+")"+"(?:\\.("+i[$]+")"+"(?:"+i[c]+")?"+i[g]+"?"+")?)?";var R=s++;i[R]="[v=\\s]*("+i[E]+")"+"(?:\\.("+i[E]+")"+"(?:\\.("+i[E]+")"+"(?:"+i[v]+")?"+i[g]+"?"+")?)?";var S=s++;i[S]="^"+i[b]+"\\s*"+i[k]+"$";var x=s++;i[x]="^"+i[b]+"\\s*"+i[R]+"$";var I=s++;i[I]="(?:~>?)";var T=s++;i[T]="(\\s*)"+i[I]+"\\s+";n[T]=new RegExp(i[T],"g");var V="$1~";var A=s++;i[A]="^"+i[I]+i[k]+"$";var C=s++;i[C]="^"+i[I]+i[R]+"$";var M=s++;i[M]="(?:\\^)";var N=s++;i[N]="(\\s*)"+i[M]+"\\s+";n[N]=new RegExp(i[N],"g");var _="$1^";var z=s++;i[z]="^"+i[M]+i[k]+"$";var P=s++;i[P]="^"+i[M]+i[R]+"$";var X=s++;i[X]="^"+i[b]+"\\s*("+d+")$|^$";var Z=s++;i[Z]="^"+i[b]+"\\s*("+y+")$|^$";var q=s++;i[q]="(\\s*)"+i[b]+"\\s*("+d+"|"+i[k]+")";n[q]=new RegExp(i[q],"g");var L="$1$2$3";var F=s++;i[F]="^\\s*("+i[k]+")"+"\\s+-\\s+"+"("+i[k]+")"+"\\s*$";var G=s++;i[G]="^\\s*("+i[R]+")"+"\\s+-\\s+"+"("+i[R]+")"+"\\s*$";var O=s++;i[O]="(<|>)?=?\\s*\\*";for(var B=0;Br)return null;var i=t?n[j]:n[w];if(!i.test(e))return null;try{return new K(e,t)}catch(s){return null}}e.valid=H;function H(e,r){var t=D(e,r);return t?t.version:null}e.clean=J;function J(e,r){var t=D(e.trim().replace(/^[=v]+/,""),r);return t?t.version:null}e.SemVer=K;function K(e,i){if(e instanceof K){if(e.loose===i)return e;else e=e.version}else if(typeof e!=="string"){throw new TypeError("Invalid Version: "+e)}if(e.length>r)throw new TypeError("version is longer than "+r+" characters");if(!(this instanceof K))return new K(e,i);this.loose=i;var s=e.trim().match(i?n[j]:n[w]);if(!s)throw new TypeError("Invalid Version: "+e);this.raw=e;this.major=+s[1];this.minor=+s[2];this.patch=+s[3];if(this.major>t||this.major<0)throw new TypeError("Invalid major version");if(this.minor>t||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>t||this.patch<0)throw new TypeError("Invalid patch version");if(!s[4])this.prerelease=[];else this.prerelease=s[4].split(".").map(function(e){return/^[0-9]+$/.test(e)?+e:e});this.build=s[5]?s[5].split("."):[];this.format()}K.prototype.format=function(){this.version=this.major+"."+this.minor+"."+this.patch;if(this.prerelease.length)this.version+="-"+this.prerelease.join(".");return this.version};K.prototype.inspect=function(){return''};K.prototype.toString=function(){return this.version};K.prototype.compare=function(e){if(!(e instanceof K))e=new K(e,this.loose);return this.compareMain(e)||this.comparePre(e)};K.prototype.compareMain=function(e){if(!(e instanceof K))e=new K(e,this.loose);return Y(this.major,e.major)||Y(this.minor,e.minor)||Y(this.patch,e.patch)};K.prototype.comparePre=function(e){if(!(e instanceof K))e=new K(e,this.loose);if(this.prerelease.length&&!e.prerelease.length)return-1;else if(!this.prerelease.length&&e.prerelease.length)return 1;else if(!this.prerelease.length&&!e.prerelease.length)return 0;var r=0;do{var t=this.prerelease[r];var n=e.prerelease[r];if(t===undefined&&n===undefined)return 0;else if(n===undefined)return 1;else if(t===undefined)return-1;else if(t===n)continue;else return Y(t,n)}while(++r)};K.prototype.inc=function(e,r){switch(e){case"premajor":this.prerelease.length=0;this.patch=0;this.minor=0;this.major++;this.inc("pre",r);break;case"preminor":this.prerelease.length=0;this.patch=0;this.minor++;this.inc("pre",r);break;case"prepatch":this.prerelease.length=0;this.inc("patch",r);this.inc("pre",r);break;case"prerelease":if(this.prerelease.length===0)this.inc("patch",r);this.inc("pre",r);break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0)this.major++;this.minor=0;this.patch=0;this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0)this.minor++;this.patch=0;this.prerelease=[];break;case"patch":if(this.prerelease.length===0)this.patch++;this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{var t=this.prerelease.length;while(--t>=0){if(typeof this.prerelease[t]==="number"){this.prerelease[t]++;t=-2}}if(t===-1)this.prerelease.push(0)}if(r){if(this.prerelease[0]===r){if(isNaN(this.prerelease[1]))this.prerelease=[r,0]}else this.prerelease=[r,0]}break;default:throw new Error("invalid increment argument: "+e)}this.format();return this};e.inc=Q;function Q(e,r,t,n){if(typeof t==="string"){n=t;t=undefined}try{return new K(e,t).inc(r,n).version}catch(i){return null}}e.diff=U;function U(e,r){if(hr(e,r)){return null}else{var t=D(e);var n=D(r);if(t.prerelease.length||n.prerelease.length){for(var i in t){if(i==="major"||i==="minor"||i==="patch"){if(t[i]!==n[i]){return"pre"+i}}}return"prerelease"}for(var i in t){if(i==="major"||i==="minor"||i==="patch"){if(t[i]!==n[i]){return i}}}}}e.compareIdentifiers=Y;var W=/^[0-9]+$/;function Y(e,r){var t=W.test(e);var n=W.test(r);if(t&&n){e=+e;r=+r}return t&&!n?-1:n&&!t?1:er?1:0}e.rcompareIdentifiers=er;function er(e,r){return Y(r,e)}e.major=rr;function rr(e,r){return new K(e,r).major}e.minor=tr;function tr(e,r){return new K(e,r).minor}e.patch=nr;function nr(e,r){return new K(e,r).patch}e.compare=ir;function ir(e,r,t){return new K(e,t).compare(r)}e.compareLoose=sr;function sr(e,r){return ir(e,r,true)}e.rcompare=or;function or(e,r,t){return ir(r,e,t)}e.sort=ar;function ar(r,t){return r.sort(function(r,n){return e.compare(r,n,t)})}e.rsort=fr;function fr(r,t){return r.sort(function(r,n){return e.rcompare(r,n,t)})}e.gt=ur;function ur(e,r,t){return ir(e,r,t)>0}e.lt=lr;function lr(e,r,t){return ir(e,r,t)<0}e.eq=hr;function hr(e,r,t){return ir(e,r,t)===0}e.neq=pr;function pr(e,r,t){return ir(e,r,t)!==0}e.gte=cr;function cr(e,r,t){return ir(e,r,t)>=0}e.lte=vr;function vr(e,r,t){return ir(e,r,t)<=0}e.cmp=mr;function mr(e,r,t,n){var i;switch(r){case"===":if(typeof e==="object")e=e.version;if(typeof t==="object")t=t.version;i=e===t;break;case"!==":if(typeof e==="object")e=e.version;if(typeof t==="object")t=t.version;i=e!==t;break;case"":case"=":case"==":i=hr(e,t,n);break;case"!=":i=pr(e,t,n);break;case">":i=ur(e,t,n);break;case">=":i=cr(e,t,n);break;case"<":i=lr(e,t,n);break;case"<=":i=vr(e,t,n);break;default:throw new TypeError("Invalid operator: "+r)}return i}e.Comparator=gr;function gr(e,r){if(e instanceof gr){if(e.loose===r)return e;else e=e.value}if(!(this instanceof gr))return new gr(e,r);this.loose=r;this.parse(e);if(this.semver===wr)this.value="";else this.value=this.operator+this.semver.version}var wr={};gr.prototype.parse=function(e){var r=this.loose?n[X]:n[Z];var t=e.match(r);if(!t)throw new TypeError("Invalid comparator: "+e);this.operator=t[1];if(this.operator==="=")this.operator="";if(!t[2])this.semver=wr;else this.semver=new K(t[2],this.loose)};gr.prototype.inspect=function(){return''};gr.prototype.toString=function(){return this.value};gr.prototype.test=function(e){if(this.semver===wr)return true;if(typeof e==="string")e=new K(e,this.loose);return mr(e,this.operator,this.semver,this.loose)};e.Range=yr;function yr(e,r){if(e instanceof yr&&e.loose===r)return e;if(!(this instanceof yr))return new yr(e,r);this.loose=r;this.raw=e;this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length});if(!this.set.length){throw new TypeError("Invalid SemVer Range: "+e)}this.format()}yr.prototype.inspect=function(){return''};yr.prototype.format=function(){this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim();return this.range};yr.prototype.toString=function(){return this.range};yr.prototype.parseRange=function(e){var r=this.loose;e=e.trim();var t=r?n[G]:n[F];e=e.replace(t,Tr);e=e.replace(n[q],L);e=e.replace(n[T],V);e=e.replace(n[N],_);e=e.split(/\s+/).join(" ");var i=r?n[X]:n[Z];var s=e.split(" ").map(function(e){return jr(e,r)}).join(" ").split(/\s+/);if(this.loose){s=s.filter(function(e){return!!e.match(i)})}s=s.map(function(e){return new gr(e,r)});return s};e.toComparators=dr;function dr(e,r){return new yr(e,r).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})}function jr(e,r){e=kr(e,r);e=Er(e,r);e=Sr(e,r);e=Ir(e,r);return e}function br(e){return!e||e.toLowerCase()==="x"||e==="*"}function Er(e,r){return e.trim().split(/\s+/).map(function(e){return $r(e,r)}).join(" ")}function $r(e,r){var t=r?n[C]:n[A];return e.replace(t,function(e,r,t,n,i){var s;if(br(r))s="";else if(br(t))s=">="+r+".0.0 <"+(+r+1)+".0.0";else if(br(n))s=">="+r+"."+t+".0 <"+r+"."+(+t+1)+".0";else if(i){if(i.charAt(0)!=="-")i="-"+i;s=">="+r+"."+t+"."+n+i+" <"+r+"."+(+t+1)+".0"}else s=">="+r+"."+t+"."+n+" <"+r+"."+(+t+1)+".0";return s})}function kr(e,r){return e.trim().split(/\s+/).map(function(e){return Rr(e,r)}).join(" ")}function Rr(e,r){var t=r?n[P]:n[z];return e.replace(t,function(e,r,t,n,i){var s;if(br(r))s="";else if(br(t))s=">="+r+".0.0 <"+(+r+1)+".0.0";else if(br(n)){if(r==="0")s=">="+r+"."+t+".0 <"+r+"."+(+t+1)+".0";else s=">="+r+"."+t+".0 <"+(+r+1)+".0.0"}else if(i){if(i.charAt(0)!=="-")i="-"+i;if(r==="0"){if(t==="0")s=">="+r+"."+t+"."+n+i+" <"+r+"."+t+"."+(+n+1);else s=">="+r+"."+t+"."+n+i+" <"+r+"."+(+t+1)+".0"}else s=">="+r+"."+t+"."+n+i+" <"+(+r+1)+".0.0"}else{if(r==="0"){if(t==="0")s=">="+r+"."+t+"."+n+" <"+r+"."+t+"."+(+n+1);else s=">="+r+"."+t+"."+n+" <"+r+"."+(+t+1)+".0"}else s=">="+r+"."+t+"."+n+" <"+(+r+1)+".0.0"}return s})}function Sr(e,r){return e.split(/\s+/).map(function(e){return xr(e,r)}).join(" ")}function xr(e,r){e=e.trim();var t=r?n[x]:n[S];return e.replace(t,function(e,r,t,n,i,s){var o=br(t);var a=o||br(n);var f=a||br(i);var u=f;if(r==="="&&u)r="";if(o){if(r===">"||r==="<"){e="<0.0.0"}else{e="*"}}else if(r&&u){if(a)n=0;if(f)i=0;if(r===">"){r=">=";if(a){t=+t+1;n=0;i=0}else if(f){n=+n+1;i=0}}else if(r==="<="){r="<";if(a)t=+t+1;else n=+n+1}e=r+t+"."+n+"."+i}else if(a){e=">="+t+".0.0 <"+(+t+1)+".0.0"}else if(f){e=">="+t+"."+n+".0 <"+t+"."+(+n+1)+".0"}return e})}function Ir(e,r){return e.trim().replace(n[O],"")}function Tr(e,r,t,n,i,s,o,a,f,u,l,h,p){if(br(t))r="";else if(br(n))r=">="+t+".0.0";else if(br(i))r=">="+t+"."+n+".0";else r=">="+r;if(br(f))a="";else if(br(u))a="<"+(+f+1)+".0.0";else if(br(l))a="<"+f+"."+(+u+1)+".0";else if(h)a="<="+f+"."+u+"."+l+"-"+h;else a="<="+a;return(r+" "+a).trim()}yr.prototype.test=function(e){if(!e)return false;if(typeof e==="string")e=new K(e,this.loose);for(var r=0;r0){var n=e[t].semver;if(n.major===r.major&&n.minor===r.minor&&n.patch===r.patch)return true}}return false}return true}e.satisfies=Ar;function Ar(e,r,t){try{r=new yr(r,t)}catch(n){return false}return r.test(e)}e.maxSatisfying=Cr;function Cr(e,r,t){return e.filter(function(e){return Ar(e,r,t)}).sort(function(e,r){return or(e,r,t)})[0]||null}e.validRange=Mr;function Mr(e,r){try{return new yr(e,r).range||"*"}catch(t){return null}}e.ltr=Nr;function Nr(e,r,t){return zr(e,r,"<",t)}e.gtr=_r;function _r(e,r,t){return zr(e,r,">",t)}e.outside=zr;function zr(e,r,t,n){e=new K(e,n);r=new yr(r,n);var i,s,o,a,f;switch(t){case">":i=ur;s=vr;o=lr;a=">";f=">=";break;case"<":i=lr;s=cr;o=ur;a="<";f="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Ar(e,r,n)){return false}for(var u=0;u3wucrg;nm(gF!X9o$_c< znMD2Bm@~$l=*w5$OPsAO)z#oP(?}#S3~`sULg%X%Z=4^Uygxd-Jb!z1cnJ^Z$8S!V zv(socnojG=7Zt&Fe)*4lO4#Xa@`a1W$-#%q^Me;hm&d2?j$R&}Ef!Ck&0n{lKHd4{ z=U;zrK7G0^=|jdFg0oInwgPCyqL(#e)|9^yi#@LubfPYEnv2eM{b~2&qW@UU?bDzS zgPkS}d8&Uv{R8Mn>W*LkaZvwM@6rR1*1Lo;Bib3zRviy#@*MZ#qTzUJ+KP8fyyJ}5 zFVL2@74L|6N65Rsn;|doVW7#TL^joAehFER$a;#bE@vCTI5gz^s^va*iQ$SEu83h@ za!f6bsl_oNjtMCn^a$FlXF4C!@K6C>TzC?3Vj)f}#B0fdPq)mu+DC#}*TY44j%*F( z1Atxw=x4{f^_)$`+6Nh~*u_N*X7tbi9xlaZL%Odd)mH`3&jG&Bz!wx31Z*$%+C+n>4(M!_m_4HyZxd)ly1jY)XS=3b{v@L)vhSbz#e;<(<(? zXT_P0mSNX-Ii$cNI1lz#EY<(5o9p$4=x)mB&NSUI(H$#y`Fk%@{W}_X zhXcsyBImI}0bdJoB;?nXGd?`JnO2dq<_sNIa=&NJ=JwwT>41<9GEt7ZwycLlaA*-2 zLY@%8N#@g^Nyt+gIJJa4F@!uV2zhDhDxti!D8CcscWZq%@FKIki|hSfSnqdZy{~b-n>(97DexBr{sP4y zybMVxur9SoG1C}$Oya#HgqIe=*(!vyWrR0`@CFx1dmo489v(!ZibT)g40_g%ThBaC z9;O>%=ULaqKlWOoGv$q`FJjJ~x3Uws^1RAxiDcxBF%O5yXivC;Co>UN!r6FC$6m4@ zLU`H@A;`6GlAw|BIDzxqqD{o@JZr<;uOxQb^ON4F8oP6YGzD3%{Bh7{ziC;11A5`k z)iM2CHd@4!>?e&YE@B|tmHfQX8*@Koziam23+#Vw%1BdIg19n{!XXERjQkMT zh38ayBVYKv1W3U1(U#R@1ccVA+=3MYw}nKs&VZ7iT*DJ-;XwO{0*>ALFH7MI|C(|2 zIPt$mf_ZUgyGtEGs5*A2V~Vq4$4}BHHP>FUSm;)}xn2xOR3ViqmFW326t?b!LZT8V zDQONRTX#W8A{%NW?)=__58JRJu~)oD0rqiNO5yOo7uPso&X z^GUX$_dUMLQ?kdGSupMc)GytA{A1wlcE}14hrs+*H+==OM@fY4O`R;C4;>t6X*o`n3Y{b&==0CZ5Nfdd8*+zeYhQMa?(5!IHL2al!YeaN#iJRXmT{DilUqK~?y#O=Q#_{Q>i`c8ux}3* zT^nrDbRP^&%C-(W$Vi&z8D+Lt&uZ!2vWTTb`^YjSQTDLT%6rai+U0(ek%{i1Oi7u8 zuf!AgGmQz*R3~=%UMJ3$+DP?!vIh`Gk*pXRk}ej^LRr&t=$N&JaS5!xlcuzP>)S<% z8q--ksy1b2Db!pAlqOE1hJyIiKV2f&?z+qC6t!kIEzM2TkWwQA8-F%Vc6ByHnNUEP z5O^?bS{^19UkqpXK#8!Gewb%s+EM}M51qgNfkCH+Ax;uY`qYEGU=p;dqJ9}x}C+O^nX2B1?NHKQ6_NQ z2Wtm|094IBN|pS@bjGT6`_a7l{gq|1q(f?xBH@H|=bU-G1$PONW?lnFbhuyN-VNa) z+27vfZGla`C!o;;iA0G=Txb!vGU_}(4k7o!3%9z)2!m4Cl$mb{SJ9@FGO@(qNmlb9 zZA$qR3k{xdC6A=lT4sU46$rIc+!Eg>dQhciel2f=v4IfV^JaizCiRi&kwpeeRGbu; zKz~>~;EgyE3G)qV9|tw9kQDlEgS#^u<67ogh;UK_i8wG22M<9MC6Gf190uO3WId{5 z4}EEzu(3fsUP;|XYW|C>KJYCLU#J_LrT!7yFPu%Q@+31>Znp|@Ikro`v$%Amhm zEx)AiO{Q#O&`*R8#xi=eC>Ioz3u2(yH7X^>Db;-wU#h$^OANKNvkYMw)H5A6}MpaeKJFB|VY3cUE z&Ic@wed^L%NKQpFbu4Wp>#IS%T-j!|EEAO_SR~8VoA-k6F~_z0VAXQE&JIsG!Ci-AtA2p5SYP1^kO2 zKUq}^tmyqCmyuV{-Bd2qZ43g4{i2LDOF&a{XPQ4xOV@fgIf|ULEVoZ@ALelqD04Q@ z2(-xMET9!dN=eW16|B%zR$r_*E@>%sscW&w`>aZx1TM&Mm)n=|XbY_kIW3+S=qct1 zh(a$h3ccvc!R*CIQhNu!WcJ{zvfArn-@9(@eX;MfTf0exV{do`{Rz6e8Ce6hgQzK*WB zID{OcirJ-e1HLUI=VM3n9oZ}Aww&Y-E0(#rY+wycgLCb?hv-2E-ImV9a}PF)i$TBA(-gUf?;UsH&1u%2Ljt9oNw5w|`-*vvtNgTQb&L zG}e#*o3T*!G6!lp4>Mdju{BkCUke*D%&GoXD$kPP6Ot{2Nn5Ke{|}snSeDl_e~7RT z7xkZcwJm0uN1qox`aZ6Fv(A-o@=#iGe%_#0pWoA~Yq9d{h)EBo&jF*wLb@n@1?bCW z;L?YFgWPGDv$ZvIvz$HB9=!))SU$8Jl+tN84J&dPopTQrh=H8G8?q(>4Zu5_EsX_A zk?L4x_$wBCcC7H2IaADoKXx&E3>78X(TCFMlzFs#~#M4 zks_jTpZvUvAC5pX&vkF_x`%D>?7lMa0q|j0udJ?&Z<0j2aG7Wc`qJsW$ZmT{M|5lY zTO_>erRMCZ&ePtL6J%2)_{ylAzjjHouc+|VNme+vRwCb$tgF1QK$L)ME~du#GWuRq z1(J{%WXKg#ff;U)>S=2$r24V!!YAxf!9ULKRtUURK6$&L#RS-hU1a_`_mBk*~RV=CVLAx68KXW{)&gr`cUB z=tD1g|5R706GMO#a+1O;pe&)6mom8JL7Y{qO_tvNj1$354aC#pl76TT*r%$>Jp_hJ zgW+-&!yYk2vm_4soc%DEei)Tiy|dt?F-%0~P9D#);%h?1SE@Zia(X3N5f-X_JSAEK zbx1519D%Zjlru@$mXz(Ba$S}2(a9`MDiBAmU?CO1G782~1x!+bC;>nftQhS%kK~I< zGIQt_94p&(GuU;rwlL#_=griv88g}6nRV%-_WZ-fsd^k^E#SxpEtn2AVk5Zjw5Du| zKbYrLc~&XKu2x$Run^brXt8rRA1.2.3', null], + ['~1.2.3', null], + ['<=1.2.3', null], + ['1.2.x', null] + ].forEach(function(tuple) { + var range = tuple[0]; + var version = tuple[1]; + var msg = 'clean(' + range + ') = ' + version; + t.equal(clean(range), version, msg); + }); + t.end(); +}); diff --git a/node_modules/semver/test/gtr.js b/node_modules/semver/test/gtr.js new file mode 100644 index 0000000..bbb8789 --- /dev/null +++ b/node_modules/semver/test/gtr.js @@ -0,0 +1,173 @@ +var tap = require('tap'); +var test = tap.test; +var semver = require('../semver.js'); +var gtr = semver.gtr; + +test('\ngtr tests', function(t) { + // [range, version, loose] + // Version should be greater than range + [ + ['~1.2.2', '1.3.0'], + ['~0.6.1-1', '0.7.1-1'], + ['1.0.0 - 2.0.0', '2.0.1'], + ['1.0.0', '1.0.1-beta1'], + ['1.0.0', '2.0.0'], + ['<=2.0.0', '2.1.1'], + ['<=2.0.0', '3.2.9'], + ['<2.0.0', '2.0.0'], + ['0.1.20 || 1.2.4', '1.2.5'], + ['2.x.x', '3.0.0'], + ['1.2.x', '1.3.0'], + ['1.2.x || 2.x', '3.0.0'], + ['2.*.*', '5.0.1'], + ['1.2.*', '1.3.3'], + ['1.2.* || 2.*', '4.0.0'], + ['2', '3.0.0'], + ['2.3', '2.4.2'], + ['~2.4', '2.5.0'], // >=2.4.0 <2.5.0 + ['~2.4', '2.5.5'], + ['~>3.2.1', '3.3.0'], // >=3.2.1 <3.3.0 + ['~1', '2.2.3'], // >=1.0.0 <2.0.0 + ['~>1', '2.2.4'], + ['~> 1', '3.2.3'], + ['~1.0', '1.1.2'], // >=1.0.0 <1.1.0 + ['~ 1.0', '1.1.0'], + ['<1.2', '1.2.0'], + ['< 1.2', '1.2.1'], + ['1', '2.0.0beta', true], + ['~v0.5.4-pre', '0.6.0'], + ['~v0.5.4-pre', '0.6.1-pre'], + ['=0.7.x', '0.8.0'], + ['=0.7.x', '0.8.0-asdf'], + ['<0.7.x', '0.7.0'], + ['~1.2.2', '1.3.0'], + ['1.0.0 - 2.0.0', '2.2.3'], + ['1.0.0', '1.0.1'], + ['<=2.0.0', '3.0.0'], + ['<=2.0.0', '2.9999.9999'], + ['<=2.0.0', '2.2.9'], + ['<2.0.0', '2.9999.9999'], + ['<2.0.0', '2.2.9'], + ['2.x.x', '3.1.3'], + ['1.2.x', '1.3.3'], + ['1.2.x || 2.x', '3.1.3'], + ['2.*.*', '3.1.3'], + ['1.2.*', '1.3.3'], + ['1.2.* || 2.*', '3.1.3'], + ['2', '3.1.2'], + ['2.3', '2.4.1'], + ['~2.4', '2.5.0'], // >=2.4.0 <2.5.0 + ['~>3.2.1', '3.3.2'], // >=3.2.1 <3.3.0 + ['~1', '2.2.3'], // >=1.0.0 <2.0.0 + ['~>1', '2.2.3'], + ['~1.0', '1.1.0'], // >=1.0.0 <1.1.0 + ['<1', '1.0.0'], + ['1', '2.0.0beta', true], + ['<1', '1.0.0beta', true], + ['< 1', '1.0.0beta', true], + ['=0.7.x', '0.8.2'], + ['<0.7.x', '0.7.2'] + ].forEach(function(tuple) { + var range = tuple[0]; + var version = tuple[1]; + var loose = tuple[2] || false; + var msg = 'gtr(' + version + ', ' + range + ', ' + loose + ')'; + t.ok(gtr(version, range, loose), msg); + }); + t.end(); +}); + +test('\nnegative gtr tests', function(t) { + // [range, version, loose] + // Version should NOT be greater than range + [ + ['~0.6.1-1', '0.6.1-1'], + ['1.0.0 - 2.0.0', '1.2.3'], + ['1.0.0 - 2.0.0', '0.9.9'], + ['1.0.0', '1.0.0'], + ['>=*', '0.2.4'], + ['', '1.0.0', true], + ['*', '1.2.3'], + ['*', 'v1.2.3-foo'], + ['>=1.0.0', '1.0.0'], + ['>=1.0.0', '1.0.1'], + ['>=1.0.0', '1.1.0'], + ['>1.0.0', '1.0.1'], + ['>1.0.0', '1.1.0'], + ['<=2.0.0', '2.0.0'], + ['<=2.0.0', '1.9999.9999'], + ['<=2.0.0', '0.2.9'], + ['<2.0.0', '1.9999.9999'], + ['<2.0.0', '0.2.9'], + ['>= 1.0.0', '1.0.0'], + ['>= 1.0.0', '1.0.1'], + ['>= 1.0.0', '1.1.0'], + ['> 1.0.0', '1.0.1'], + ['> 1.0.0', '1.1.0'], + ['<= 2.0.0', '2.0.0'], + ['<= 2.0.0', '1.9999.9999'], + ['<= 2.0.0', '0.2.9'], + ['< 2.0.0', '1.9999.9999'], + ['<\t2.0.0', '0.2.9'], + ['>=0.1.97', 'v0.1.97'], + ['>=0.1.97', '0.1.97'], + ['0.1.20 || 1.2.4', '1.2.4'], + ['0.1.20 || >1.2.4', '1.2.4'], + ['0.1.20 || 1.2.4', '1.2.3'], + ['0.1.20 || 1.2.4', '0.1.20'], + ['>=0.2.3 || <0.0.1', '0.0.0'], + ['>=0.2.3 || <0.0.1', '0.2.3'], + ['>=0.2.3 || <0.0.1', '0.2.4'], + ['||', '1.3.4'], + ['2.x.x', '2.1.3'], + ['1.2.x', '1.2.3'], + ['1.2.x || 2.x', '2.1.3'], + ['1.2.x || 2.x', '1.2.3'], + ['x', '1.2.3'], + ['2.*.*', '2.1.3'], + ['1.2.*', '1.2.3'], + ['1.2.* || 2.*', '2.1.3'], + ['1.2.* || 2.*', '1.2.3'], + ['1.2.* || 2.*', '1.2.3'], + ['*', '1.2.3'], + ['2', '2.1.2'], + ['2.3', '2.3.1'], + ['~2.4', '2.4.0'], // >=2.4.0 <2.5.0 + ['~2.4', '2.4.5'], + ['~>3.2.1', '3.2.2'], // >=3.2.1 <3.3.0 + ['~1', '1.2.3'], // >=1.0.0 <2.0.0 + ['~>1', '1.2.3'], + ['~> 1', '1.2.3'], + ['~1.0', '1.0.2'], // >=1.0.0 <1.1.0 + ['~ 1.0', '1.0.2'], + ['>=1', '1.0.0'], + ['>= 1', '1.0.0'], + ['<1.2', '1.1.1'], + ['< 1.2', '1.1.1'], + ['1', '1.0.0beta', true], + ['~v0.5.4-pre', '0.5.5'], + ['~v0.5.4-pre', '0.5.4'], + ['=0.7.x', '0.7.2'], + ['>=0.7.x', '0.7.2'], + ['=0.7.x', '0.7.0-asdf'], + ['>=0.7.x', '0.7.0-asdf'], + ['<=0.7.x', '0.6.2'], + ['>0.2.3 >0.2.4 <=0.2.5', '0.2.5'], + ['>=0.2.3 <=0.2.4', '0.2.4'], + ['1.0.0 - 2.0.0', '2.0.0'], + ['^1', '0.0.0-0'], + ['^3.0.0', '2.0.0'], + ['^1.0.0 || ~2.0.1', '2.0.0'], + ['^0.1.0 || ~3.0.1 || 5.0.0', '3.2.0'], + ['^0.1.0 || ~3.0.1 || 5.0.0', '1.0.0beta', true], + ['^0.1.0 || ~3.0.1 || 5.0.0', '5.0.0-0', true], + ['^0.1.0 || ~3.0.1 || >4 <=5.0.0', '3.5.0'] + ].forEach(function(tuple) { + var range = tuple[0]; + var version = tuple[1]; + var loose = tuple[2] || false; + var msg = '!gtr(' + version + ', ' + range + ', ' + loose + ')'; + t.notOk(gtr(version, range, loose), msg); + }); + t.end(); +}); diff --git a/node_modules/semver/test/index.js b/node_modules/semver/test/index.js new file mode 100644 index 0000000..926d560 --- /dev/null +++ b/node_modules/semver/test/index.js @@ -0,0 +1,684 @@ +'use strict'; + +var tap = require('tap'); +var test = tap.test; +var semver = require('../semver.js'); +var eq = semver.eq; +var gt = semver.gt; +var lt = semver.lt; +var neq = semver.neq; +var cmp = semver.cmp; +var gte = semver.gte; +var lte = semver.lte; +var satisfies = semver.satisfies; +var validRange = semver.validRange; +var inc = semver.inc; +var diff = semver.diff; +var replaceStars = semver.replaceStars; +var toComparators = semver.toComparators; +var SemVer = semver.SemVer; +var Range = semver.Range; + +test('\ncomparison tests', function(t) { + // [version1, version2] + // version1 should be greater than version2 + [['0.0.0', '0.0.0-foo'], + ['0.0.1', '0.0.0'], + ['1.0.0', '0.9.9'], + ['0.10.0', '0.9.0'], + ['0.99.0', '0.10.0'], + ['2.0.0', '1.2.3'], + ['v0.0.0', '0.0.0-foo', true], + ['v0.0.1', '0.0.0', true], + ['v1.0.0', '0.9.9', true], + ['v0.10.0', '0.9.0', true], + ['v0.99.0', '0.10.0', true], + ['v2.0.0', '1.2.3', true], + ['0.0.0', 'v0.0.0-foo', true], + ['0.0.1', 'v0.0.0', true], + ['1.0.0', 'v0.9.9', true], + ['0.10.0', 'v0.9.0', true], + ['0.99.0', 'v0.10.0', true], + ['2.0.0', 'v1.2.3', true], + ['1.2.3', '1.2.3-asdf'], + ['1.2.3', '1.2.3-4'], + ['1.2.3', '1.2.3-4-foo'], + ['1.2.3-5-foo', '1.2.3-5'], + ['1.2.3-5', '1.2.3-4'], + ['1.2.3-5-foo', '1.2.3-5-Foo'], + ['3.0.0', '2.7.2+asdf'], + ['1.2.3-a.10', '1.2.3-a.5'], + ['1.2.3-a.b', '1.2.3-a.5'], + ['1.2.3-a.b', '1.2.3-a'], + ['1.2.3-a.b.c.10.d.5', '1.2.3-a.b.c.5.d.100'], + ['1.2.3-r2', '1.2.3-r100'], + ['1.2.3-r100', '1.2.3-R2'] + ].forEach(function(v) { + var v0 = v[0]; + var v1 = v[1]; + var loose = v[2]; + t.ok(gt(v0, v1, loose), "gt('" + v0 + "', '" + v1 + "')"); + t.ok(lt(v1, v0, loose), "lt('" + v1 + "', '" + v0 + "')"); + t.ok(!gt(v1, v0, loose), "!gt('" + v1 + "', '" + v0 + "')"); + t.ok(!lt(v0, v1, loose), "!lt('" + v0 + "', '" + v1 + "')"); + t.ok(eq(v0, v0, loose), "eq('" + v0 + "', '" + v0 + "')"); + t.ok(eq(v1, v1, loose), "eq('" + v1 + "', '" + v1 + "')"); + t.ok(neq(v0, v1, loose), "neq('" + v0 + "', '" + v1 + "')"); + t.ok(cmp(v1, '==', v1, loose), "cmp('" + v1 + "' == '" + v1 + "')"); + t.ok(cmp(v0, '>=', v1, loose), "cmp('" + v0 + "' >= '" + v1 + "')"); + t.ok(cmp(v1, '<=', v0, loose), "cmp('" + v1 + "' <= '" + v0 + "')"); + t.ok(cmp(v0, '!=', v1, loose), "cmp('" + v0 + "' != '" + v1 + "')"); + }); + t.end(); +}); + +test('\nequality tests', function(t) { + // [version1, version2] + // version1 should be equivalent to version2 + [['1.2.3', 'v1.2.3', true], + ['1.2.3', '=1.2.3', true], + ['1.2.3', 'v 1.2.3', true], + ['1.2.3', '= 1.2.3', true], + ['1.2.3', ' v1.2.3', true], + ['1.2.3', ' =1.2.3', true], + ['1.2.3', ' v 1.2.3', true], + ['1.2.3', ' = 1.2.3', true], + ['1.2.3-0', 'v1.2.3-0', true], + ['1.2.3-0', '=1.2.3-0', true], + ['1.2.3-0', 'v 1.2.3-0', true], + ['1.2.3-0', '= 1.2.3-0', true], + ['1.2.3-0', ' v1.2.3-0', true], + ['1.2.3-0', ' =1.2.3-0', true], + ['1.2.3-0', ' v 1.2.3-0', true], + ['1.2.3-0', ' = 1.2.3-0', true], + ['1.2.3-1', 'v1.2.3-1', true], + ['1.2.3-1', '=1.2.3-1', true], + ['1.2.3-1', 'v 1.2.3-1', true], + ['1.2.3-1', '= 1.2.3-1', true], + ['1.2.3-1', ' v1.2.3-1', true], + ['1.2.3-1', ' =1.2.3-1', true], + ['1.2.3-1', ' v 1.2.3-1', true], + ['1.2.3-1', ' = 1.2.3-1', true], + ['1.2.3-beta', 'v1.2.3-beta', true], + ['1.2.3-beta', '=1.2.3-beta', true], + ['1.2.3-beta', 'v 1.2.3-beta', true], + ['1.2.3-beta', '= 1.2.3-beta', true], + ['1.2.3-beta', ' v1.2.3-beta', true], + ['1.2.3-beta', ' =1.2.3-beta', true], + ['1.2.3-beta', ' v 1.2.3-beta', true], + ['1.2.3-beta', ' = 1.2.3-beta', true], + ['1.2.3-beta+build', ' = 1.2.3-beta+otherbuild', true], + ['1.2.3+build', ' = 1.2.3+otherbuild', true], + ['1.2.3-beta+build', '1.2.3-beta+otherbuild'], + ['1.2.3+build', '1.2.3+otherbuild'], + [' v1.2.3+build', '1.2.3+otherbuild'] + ].forEach(function(v) { + var v0 = v[0]; + var v1 = v[1]; + var loose = v[2]; + t.ok(eq(v0, v1, loose), "eq('" + v0 + "', '" + v1 + "')"); + t.ok(!neq(v0, v1, loose), "!neq('" + v0 + "', '" + v1 + "')"); + t.ok(cmp(v0, '==', v1, loose), 'cmp(' + v0 + '==' + v1 + ')'); + t.ok(!cmp(v0, '!=', v1, loose), '!cmp(' + v0 + '!=' + v1 + ')'); + t.ok(!cmp(v0, '===', v1, loose), '!cmp(' + v0 + '===' + v1 + ')'); + t.ok(cmp(v0, '!==', v1, loose), 'cmp(' + v0 + '!==' + v1 + ')'); + t.ok(!gt(v0, v1, loose), "!gt('" + v0 + "', '" + v1 + "')"); + t.ok(gte(v0, v1, loose), "gte('" + v0 + "', '" + v1 + "')"); + t.ok(!lt(v0, v1, loose), "!lt('" + v0 + "', '" + v1 + "')"); + t.ok(lte(v0, v1, loose), "lte('" + v0 + "', '" + v1 + "')"); + }); + t.end(); +}); + + +test('\nrange tests', function(t) { + // [range, version] + // version should be included by range + [['1.0.0 - 2.0.0', '1.2.3'], + ['^1.2.3+build', '1.2.3'], + ['^1.2.3+build', '1.3.0'], + ['1.2.3-pre+asdf - 2.4.3-pre+asdf', '1.2.3'], + ['1.2.3pre+asdf - 2.4.3-pre+asdf', '1.2.3', true], + ['1.2.3-pre+asdf - 2.4.3pre+asdf', '1.2.3', true], + ['1.2.3pre+asdf - 2.4.3pre+asdf', '1.2.3', true], + ['1.2.3-pre+asdf - 2.4.3-pre+asdf', '1.2.3-pre.2'], + ['1.2.3-pre+asdf - 2.4.3-pre+asdf', '2.4.3-alpha'], + ['1.2.3+asdf - 2.4.3+asdf', '1.2.3'], + ['1.0.0', '1.0.0'], + ['>=*', '0.2.4'], + ['', '1.0.0'], + ['*', '1.2.3'], + ['*', 'v1.2.3-foo', true], + ['>=1.0.0', '1.0.0'], + ['>=1.0.0', '1.0.1'], + ['>=1.0.0', '1.1.0'], + ['>1.0.0', '1.0.1'], + ['>1.0.0', '1.1.0'], + ['<=2.0.0', '2.0.0'], + ['<=2.0.0', '1.9999.9999'], + ['<=2.0.0', '0.2.9'], + ['<2.0.0', '1.9999.9999'], + ['<2.0.0', '0.2.9'], + ['>= 1.0.0', '1.0.0'], + ['>= 1.0.0', '1.0.1'], + ['>= 1.0.0', '1.1.0'], + ['> 1.0.0', '1.0.1'], + ['> 1.0.0', '1.1.0'], + ['<= 2.0.0', '2.0.0'], + ['<= 2.0.0', '1.9999.9999'], + ['<= 2.0.0', '0.2.9'], + ['< 2.0.0', '1.9999.9999'], + ['<\t2.0.0', '0.2.9'], + ['>=0.1.97', 'v0.1.97', true], + ['>=0.1.97', '0.1.97'], + ['0.1.20 || 1.2.4', '1.2.4'], + ['>=0.2.3 || <0.0.1', '0.0.0'], + ['>=0.2.3 || <0.0.1', '0.2.3'], + ['>=0.2.3 || <0.0.1', '0.2.4'], + ['||', '1.3.4'], + ['2.x.x', '2.1.3'], + ['1.2.x', '1.2.3'], + ['1.2.x || 2.x', '2.1.3'], + ['1.2.x || 2.x', '1.2.3'], + ['x', '1.2.3'], + ['2.*.*', '2.1.3'], + ['1.2.*', '1.2.3'], + ['1.2.* || 2.*', '2.1.3'], + ['1.2.* || 2.*', '1.2.3'], + ['*', '1.2.3'], + ['2', '2.1.2'], + ['2.3', '2.3.1'], + ['~2.4', '2.4.0'], // >=2.4.0 <2.5.0 + ['~2.4', '2.4.5'], + ['~>3.2.1', '3.2.2'], // >=3.2.1 <3.3.0, + ['~1', '1.2.3'], // >=1.0.0 <2.0.0 + ['~>1', '1.2.3'], + ['~> 1', '1.2.3'], + ['~1.0', '1.0.2'], // >=1.0.0 <1.1.0, + ['~ 1.0', '1.0.2'], + ['~ 1.0.3', '1.0.12'], + ['>=1', '1.0.0'], + ['>= 1', '1.0.0'], + ['<1.2', '1.1.1'], + ['< 1.2', '1.1.1'], + ['~v0.5.4-pre', '0.5.5'], + ['~v0.5.4-pre', '0.5.4'], + ['=0.7.x', '0.7.2'], + ['<=0.7.x', '0.7.2'], + ['>=0.7.x', '0.7.2'], + ['<=0.7.x', '0.6.2'], + ['~1.2.1 >=1.2.3', '1.2.3'], + ['~1.2.1 =1.2.3', '1.2.3'], + ['~1.2.1 1.2.3', '1.2.3'], + ['~1.2.1 >=1.2.3 1.2.3', '1.2.3'], + ['~1.2.1 1.2.3 >=1.2.3', '1.2.3'], + ['~1.2.1 1.2.3', '1.2.3'], + ['>=1.2.1 1.2.3', '1.2.3'], + ['1.2.3 >=1.2.1', '1.2.3'], + ['>=1.2.3 >=1.2.1', '1.2.3'], + ['>=1.2.1 >=1.2.3', '1.2.3'], + ['>=1.2', '1.2.8'], + ['^1.2.3', '1.8.1'], + ['^0.1.2', '0.1.2'], + ['^0.1', '0.1.2'], + ['^1.2', '1.4.2'], + ['^1.2 ^1', '1.4.2'], + ['^1.2.3-alpha', '1.2.3-pre'], + ['^1.2.0-alpha', '1.2.0-pre'], + ['^0.0.1-alpha', '0.0.1-beta'] + ].forEach(function(v) { + var range = v[0]; + var ver = v[1]; + var loose = v[2]; + t.ok(satisfies(ver, range, loose), range + ' satisfied by ' + ver); + }); + t.end(); +}); + +test('\nnegative range tests', function(t) { + // [range, version] + // version should not be included by range + [['1.0.0 - 2.0.0', '2.2.3'], + ['1.2.3+asdf - 2.4.3+asdf', '1.2.3-pre.2'], + ['1.2.3+asdf - 2.4.3+asdf', '2.4.3-alpha'], + ['^1.2.3+build', '2.0.0'], + ['^1.2.3+build', '1.2.0'], + ['^1.2.3', '1.2.3-pre'], + ['^1.2', '1.2.0-pre'], + ['>1.2', '1.3.0-beta'], + ['<=1.2.3', '1.2.3-beta'], + ['^1.2.3', '1.2.3-beta'], + ['=0.7.x', '0.7.0-asdf'], + ['>=0.7.x', '0.7.0-asdf'], + ['1', '1.0.0beta', true], + ['<1', '1.0.0beta', true], + ['< 1', '1.0.0beta', true], + ['1.0.0', '1.0.1'], + ['>=1.0.0', '0.0.0'], + ['>=1.0.0', '0.0.1'], + ['>=1.0.0', '0.1.0'], + ['>1.0.0', '0.0.1'], + ['>1.0.0', '0.1.0'], + ['<=2.0.0', '3.0.0'], + ['<=2.0.0', '2.9999.9999'], + ['<=2.0.0', '2.2.9'], + ['<2.0.0', '2.9999.9999'], + ['<2.0.0', '2.2.9'], + ['>=0.1.97', 'v0.1.93', true], + ['>=0.1.97', '0.1.93'], + ['0.1.20 || 1.2.4', '1.2.3'], + ['>=0.2.3 || <0.0.1', '0.0.3'], + ['>=0.2.3 || <0.0.1', '0.2.2'], + ['2.x.x', '1.1.3'], + ['2.x.x', '3.1.3'], + ['1.2.x', '1.3.3'], + ['1.2.x || 2.x', '3.1.3'], + ['1.2.x || 2.x', '1.1.3'], + ['2.*.*', '1.1.3'], + ['2.*.*', '3.1.3'], + ['1.2.*', '1.3.3'], + ['1.2.* || 2.*', '3.1.3'], + ['1.2.* || 2.*', '1.1.3'], + ['2', '1.1.2'], + ['2.3', '2.4.1'], + ['~2.4', '2.5.0'], // >=2.4.0 <2.5.0 + ['~2.4', '2.3.9'], + ['~>3.2.1', '3.3.2'], // >=3.2.1 <3.3.0 + ['~>3.2.1', '3.2.0'], // >=3.2.1 <3.3.0 + ['~1', '0.2.3'], // >=1.0.0 <2.0.0 + ['~>1', '2.2.3'], + ['~1.0', '1.1.0'], // >=1.0.0 <1.1.0 + ['<1', '1.0.0'], + ['>=1.2', '1.1.1'], + ['1', '2.0.0beta', true], + ['~v0.5.4-beta', '0.5.4-alpha'], + ['=0.7.x', '0.8.2'], + ['>=0.7.x', '0.6.2'], + ['<0.7.x', '0.7.2'], + ['<1.2.3', '1.2.3-beta'], + ['=1.2.3', '1.2.3-beta'], + ['>1.2', '1.2.8'], + ['^1.2.3', '2.0.0-alpha'], + ['^1.2.3', '1.2.2'], + ['^1.2', '1.1.9'], + // invalid ranges never satisfied! + ['blerg', '1.2.3'], + ['git+https://user:password0123@github.com/foo', '123.0.0', true], + ['^1.2.3', '2.0.0-pre'] + ].forEach(function(v) { + var range = v[0]; + var ver = v[1]; + var loose = v[2]; + var found = satisfies(ver, range, loose); + t.ok(!found, ver + ' not satisfied by ' + range); + }); + t.end(); +}); + +test('\nincrement versions test', function(t) { +// [version, inc, result, identifier] +// inc(version, inc) -> result + [['1.2.3', 'major', '2.0.0'], + ['1.2.3', 'minor', '1.3.0'], + ['1.2.3', 'patch', '1.2.4'], + ['1.2.3tag', 'major', '2.0.0', true], + ['1.2.3-tag', 'major', '2.0.0'], + ['1.2.3', 'fake', null], + ['1.2.0-0', 'patch', '1.2.0'], + ['fake', 'major', null], + ['1.2.3-4', 'major', '2.0.0'], + ['1.2.3-4', 'minor', '1.3.0'], + ['1.2.3-4', 'patch', '1.2.3'], + ['1.2.3-alpha.0.beta', 'major', '2.0.0'], + ['1.2.3-alpha.0.beta', 'minor', '1.3.0'], + ['1.2.3-alpha.0.beta', 'patch', '1.2.3'], + ['1.2.4', 'prerelease', '1.2.5-0'], + ['1.2.3-0', 'prerelease', '1.2.3-1'], + ['1.2.3-alpha.0', 'prerelease', '1.2.3-alpha.1'], + ['1.2.3-alpha.1', 'prerelease', '1.2.3-alpha.2'], + ['1.2.3-alpha.2', 'prerelease', '1.2.3-alpha.3'], + ['1.2.3-alpha.0.beta', 'prerelease', '1.2.3-alpha.1.beta'], + ['1.2.3-alpha.1.beta', 'prerelease', '1.2.3-alpha.2.beta'], + ['1.2.3-alpha.2.beta', 'prerelease', '1.2.3-alpha.3.beta'], + ['1.2.3-alpha.10.0.beta', 'prerelease', '1.2.3-alpha.10.1.beta'], + ['1.2.3-alpha.10.1.beta', 'prerelease', '1.2.3-alpha.10.2.beta'], + ['1.2.3-alpha.10.2.beta', 'prerelease', '1.2.3-alpha.10.3.beta'], + ['1.2.3-alpha.10.beta.0', 'prerelease', '1.2.3-alpha.10.beta.1'], + ['1.2.3-alpha.10.beta.1', 'prerelease', '1.2.3-alpha.10.beta.2'], + ['1.2.3-alpha.10.beta.2', 'prerelease', '1.2.3-alpha.10.beta.3'], + ['1.2.3-alpha.9.beta', 'prerelease', '1.2.3-alpha.10.beta'], + ['1.2.3-alpha.10.beta', 'prerelease', '1.2.3-alpha.11.beta'], + ['1.2.3-alpha.11.beta', 'prerelease', '1.2.3-alpha.12.beta'], + ['1.2.0', 'prepatch', '1.2.1-0'], + ['1.2.0-1', 'prepatch', '1.2.1-0'], + ['1.2.0', 'preminor', '1.3.0-0'], + ['1.2.3-1', 'preminor', '1.3.0-0'], + ['1.2.0', 'premajor', '2.0.0-0'], + ['1.2.3-1', 'premajor', '2.0.0-0'], + ['1.2.0-1', 'minor', '1.2.0'], + ['1.0.0-1', 'major', '1.0.0'], + + ['1.2.3', 'major', '2.0.0', false, 'dev'], + ['1.2.3', 'minor', '1.3.0', false, 'dev'], + ['1.2.3', 'patch', '1.2.4', false, 'dev'], + ['1.2.3tag', 'major', '2.0.0', true, 'dev'], + ['1.2.3-tag', 'major', '2.0.0', false, 'dev'], + ['1.2.3', 'fake', null, false, 'dev'], + ['1.2.0-0', 'patch', '1.2.0', false, 'dev'], + ['fake', 'major', null, false, 'dev'], + ['1.2.3-4', 'major', '2.0.0', false, 'dev'], + ['1.2.3-4', 'minor', '1.3.0', false, 'dev'], + ['1.2.3-4', 'patch', '1.2.3', false, 'dev'], + ['1.2.3-alpha.0.beta', 'major', '2.0.0', false, 'dev'], + ['1.2.3-alpha.0.beta', 'minor', '1.3.0', false, 'dev'], + ['1.2.3-alpha.0.beta', 'patch', '1.2.3', false, 'dev'], + ['1.2.4', 'prerelease', '1.2.5-dev.0', false, 'dev'], + ['1.2.3-0', 'prerelease', '1.2.3-dev.0', false, 'dev'], + ['1.2.3-alpha.0', 'prerelease', '1.2.3-dev.0', false, 'dev'], + ['1.2.3-alpha.0', 'prerelease', '1.2.3-alpha.1', false, 'alpha'], + ['1.2.3-alpha.0.beta', 'prerelease', '1.2.3-dev.0', false, 'dev'], + ['1.2.3-alpha.0.beta', 'prerelease', '1.2.3-alpha.1.beta', false, 'alpha'], + ['1.2.3-alpha.10.0.beta', 'prerelease', '1.2.3-dev.0', false, 'dev'], + ['1.2.3-alpha.10.0.beta', 'prerelease', '1.2.3-alpha.10.1.beta', false, 'alpha'], + ['1.2.3-alpha.10.1.beta', 'prerelease', '1.2.3-alpha.10.2.beta', false, 'alpha'], + ['1.2.3-alpha.10.2.beta', 'prerelease', '1.2.3-alpha.10.3.beta', false, 'alpha'], + ['1.2.3-alpha.10.beta.0', 'prerelease', '1.2.3-dev.0', false, 'dev'], + ['1.2.3-alpha.10.beta.0', 'prerelease', '1.2.3-alpha.10.beta.1', false, 'alpha'], + ['1.2.3-alpha.10.beta.1', 'prerelease', '1.2.3-alpha.10.beta.2', false, 'alpha'], + ['1.2.3-alpha.10.beta.2', 'prerelease', '1.2.3-alpha.10.beta.3', false, 'alpha'], + ['1.2.3-alpha.9.beta', 'prerelease', '1.2.3-dev.0', false, 'dev'], + ['1.2.3-alpha.9.beta', 'prerelease', '1.2.3-alpha.10.beta', false, 'alpha'], + ['1.2.3-alpha.10.beta', 'prerelease', '1.2.3-alpha.11.beta', false, 'alpha'], + ['1.2.3-alpha.11.beta', 'prerelease', '1.2.3-alpha.12.beta', false, 'alpha'], + ['1.2.0', 'prepatch', '1.2.1-dev.0', 'dev'], + ['1.2.0-1', 'prepatch', '1.2.1-dev.0', 'dev'], + ['1.2.0', 'preminor', '1.3.0-dev.0', 'dev'], + ['1.2.3-1', 'preminor', '1.3.0-dev.0', 'dev'], + ['1.2.0', 'premajor', '2.0.0-dev.0', 'dev'], + ['1.2.3-1', 'premajor', '2.0.0-dev.0', 'dev'], + ['1.2.0-1', 'minor', '1.2.0', 'dev'], + ['1.0.0-1', 'major', '1.0.0', 'dev'], + ['1.2.3-dev.bar', 'prerelease', '1.2.3-dev.0', false, 'dev'] + + ].forEach(function(v) { + var pre = v[0]; + var what = v[1]; + var wanted = v[2]; + var loose = v[3]; + var id = v[4]; + var found = inc(pre, what, loose, id); + var cmd = 'inc(' + pre + ', ' + what + ', ' + id + ')'; + t.equal(found, wanted, cmd + ' === ' + wanted); + }); + + t.end(); +}); + +test('\ndiff versions test', function(t) { +// [version1, version2, result] +// diff(version1, version2) -> result + [['1.2.3', '0.2.3', 'major'], + ['1.4.5', '0.2.3', 'major'], + ['1.2.3', '2.0.0-pre', 'premajor'], + ['1.2.3', '1.3.3', 'minor'], + ['1.0.1', '1.1.0-pre', 'preminor'], + ['1.2.3', '1.2.4', 'patch'], + ['1.2.3', '1.2.4-pre', 'prepatch'], + ['0.0.1', '0.0.1-pre', 'prerelease'], + ['0.0.1', '0.0.1-pre-2', 'prerelease'], + ['1.1.0', '1.1.0-pre', 'prerelease'], + ['1.1.0-pre-1', '1.1.0-pre-2', 'prerelease'], + ['1.0.0', '1.0.0', null] + + ].forEach(function(v) { + var version1 = v[0]; + var version2 = v[1]; + var wanted = v[2]; + var found = diff(version1, version2); + var cmd = 'diff(' + version1 + ', ' + version2 + ')'; + t.equal(found, wanted, cmd + ' === ' + wanted); + }); + + t.end(); +}); + +test('\nvalid range test', function(t) { + // [range, result] + // validRange(range) -> result + // translate ranges into their canonical form + [['1.0.0 - 2.0.0', '>=1.0.0 <=2.0.0'], + ['1.0.0', '1.0.0'], + ['>=*', '*'], + ['', '*'], + ['*', '*'], + ['*', '*'], + ['>=1.0.0', '>=1.0.0'], + ['>1.0.0', '>1.0.0'], + ['<=2.0.0', '<=2.0.0'], + ['1', '>=1.0.0 <2.0.0'], + ['<=2.0.0', '<=2.0.0'], + ['<=2.0.0', '<=2.0.0'], + ['<2.0.0', '<2.0.0'], + ['<2.0.0', '<2.0.0'], + ['>= 1.0.0', '>=1.0.0'], + ['>= 1.0.0', '>=1.0.0'], + ['>= 1.0.0', '>=1.0.0'], + ['> 1.0.0', '>1.0.0'], + ['> 1.0.0', '>1.0.0'], + ['<= 2.0.0', '<=2.0.0'], + ['<= 2.0.0', '<=2.0.0'], + ['<= 2.0.0', '<=2.0.0'], + ['< 2.0.0', '<2.0.0'], + ['< 2.0.0', '<2.0.0'], + ['>=0.1.97', '>=0.1.97'], + ['>=0.1.97', '>=0.1.97'], + ['0.1.20 || 1.2.4', '0.1.20||1.2.4'], + ['>=0.2.3 || <0.0.1', '>=0.2.3||<0.0.1'], + ['>=0.2.3 || <0.0.1', '>=0.2.3||<0.0.1'], + ['>=0.2.3 || <0.0.1', '>=0.2.3||<0.0.1'], + ['||', '||'], + ['2.x.x', '>=2.0.0 <3.0.0'], + ['1.2.x', '>=1.2.0 <1.3.0'], + ['1.2.x || 2.x', '>=1.2.0 <1.3.0||>=2.0.0 <3.0.0'], + ['1.2.x || 2.x', '>=1.2.0 <1.3.0||>=2.0.0 <3.0.0'], + ['x', '*'], + ['2.*.*', '>=2.0.0 <3.0.0'], + ['1.2.*', '>=1.2.0 <1.3.0'], + ['1.2.* || 2.*', '>=1.2.0 <1.3.0||>=2.0.0 <3.0.0'], + ['*', '*'], + ['2', '>=2.0.0 <3.0.0'], + ['2.3', '>=2.3.0 <2.4.0'], + ['~2.4', '>=2.4.0 <2.5.0'], + ['~2.4', '>=2.4.0 <2.5.0'], + ['~>3.2.1', '>=3.2.1 <3.3.0'], + ['~1', '>=1.0.0 <2.0.0'], + ['~>1', '>=1.0.0 <2.0.0'], + ['~> 1', '>=1.0.0 <2.0.0'], + ['~1.0', '>=1.0.0 <1.1.0'], + ['~ 1.0', '>=1.0.0 <1.1.0'], + ['^0', '>=0.0.0 <1.0.0'], + ['^ 1', '>=1.0.0 <2.0.0'], + ['^0.1', '>=0.1.0 <0.2.0'], + ['^1.0', '>=1.0.0 <2.0.0'], + ['^1.2', '>=1.2.0 <2.0.0'], + ['^0.0.1', '>=0.0.1 <0.0.2'], + ['^0.0.1-beta', '>=0.0.1-beta <0.0.2'], + ['^0.1.2', '>=0.1.2 <0.2.0'], + ['^1.2.3', '>=1.2.3 <2.0.0'], + ['^1.2.3-beta.4', '>=1.2.3-beta.4 <2.0.0'], + ['<1', '<1.0.0'], + ['< 1', '<1.0.0'], + ['>=1', '>=1.0.0'], + ['>= 1', '>=1.0.0'], + ['<1.2', '<1.2.0'], + ['< 1.2', '<1.2.0'], + ['1', '>=1.0.0 <2.0.0'], + ['>01.02.03', '>1.2.3', true], + ['>01.02.03', null], + ['~1.2.3beta', '>=1.2.3-beta <1.3.0', true], + ['~1.2.3beta', null], + ['^ 1.2 ^ 1', '>=1.2.0 <2.0.0 >=1.0.0 <2.0.0'] + ].forEach(function(v) { + var pre = v[0]; + var wanted = v[1]; + var loose = v[2]; + var found = validRange(pre, loose); + + t.equal(found, wanted, 'validRange(' + pre + ') === ' + wanted); + }); + + t.end(); +}); + +test('\ncomparators test', function(t) { + // [range, comparators] + // turn range into a set of individual comparators + [['1.0.0 - 2.0.0', [['>=1.0.0', '<=2.0.0']]], + ['1.0.0', [['1.0.0']]], + ['>=*', [['']]], + ['', [['']]], + ['*', [['']]], + ['*', [['']]], + ['>=1.0.0', [['>=1.0.0']]], + ['>=1.0.0', [['>=1.0.0']]], + ['>=1.0.0', [['>=1.0.0']]], + ['>1.0.0', [['>1.0.0']]], + ['>1.0.0', [['>1.0.0']]], + ['<=2.0.0', [['<=2.0.0']]], + ['1', [['>=1.0.0', '<2.0.0']]], + ['<=2.0.0', [['<=2.0.0']]], + ['<=2.0.0', [['<=2.0.0']]], + ['<2.0.0', [['<2.0.0']]], + ['<2.0.0', [['<2.0.0']]], + ['>= 1.0.0', [['>=1.0.0']]], + ['>= 1.0.0', [['>=1.0.0']]], + ['>= 1.0.0', [['>=1.0.0']]], + ['> 1.0.0', [['>1.0.0']]], + ['> 1.0.0', [['>1.0.0']]], + ['<= 2.0.0', [['<=2.0.0']]], + ['<= 2.0.0', [['<=2.0.0']]], + ['<= 2.0.0', [['<=2.0.0']]], + ['< 2.0.0', [['<2.0.0']]], + ['<\t2.0.0', [['<2.0.0']]], + ['>=0.1.97', [['>=0.1.97']]], + ['>=0.1.97', [['>=0.1.97']]], + ['0.1.20 || 1.2.4', [['0.1.20'], ['1.2.4']]], + ['>=0.2.3 || <0.0.1', [['>=0.2.3'], ['<0.0.1']]], + ['>=0.2.3 || <0.0.1', [['>=0.2.3'], ['<0.0.1']]], + ['>=0.2.3 || <0.0.1', [['>=0.2.3'], ['<0.0.1']]], + ['||', [[''], ['']]], + ['2.x.x', [['>=2.0.0', '<3.0.0']]], + ['1.2.x', [['>=1.2.0', '<1.3.0']]], + ['1.2.x || 2.x', [['>=1.2.0', '<1.3.0'], ['>=2.0.0', '<3.0.0']]], + ['1.2.x || 2.x', [['>=1.2.0', '<1.3.0'], ['>=2.0.0', '<3.0.0']]], + ['x', [['']]], + ['2.*.*', [['>=2.0.0', '<3.0.0']]], + ['1.2.*', [['>=1.2.0', '<1.3.0']]], + ['1.2.* || 2.*', [['>=1.2.0', '<1.3.0'], ['>=2.0.0', '<3.0.0']]], + ['1.2.* || 2.*', [['>=1.2.0', '<1.3.0'], ['>=2.0.0', '<3.0.0']]], + ['*', [['']]], + ['2', [['>=2.0.0', '<3.0.0']]], + ['2.3', [['>=2.3.0', '<2.4.0']]], + ['~2.4', [['>=2.4.0', '<2.5.0']]], + ['~2.4', [['>=2.4.0', '<2.5.0']]], + ['~>3.2.1', [['>=3.2.1', '<3.3.0']]], + ['~1', [['>=1.0.0', '<2.0.0']]], + ['~>1', [['>=1.0.0', '<2.0.0']]], + ['~> 1', [['>=1.0.0', '<2.0.0']]], + ['~1.0', [['>=1.0.0', '<1.1.0']]], + ['~ 1.0', [['>=1.0.0', '<1.1.0']]], + ['~ 1.0.3', [['>=1.0.3', '<1.1.0']]], + ['~> 1.0.3', [['>=1.0.3', '<1.1.0']]], + ['<1', [['<1.0.0']]], + ['< 1', [['<1.0.0']]], + ['>=1', [['>=1.0.0']]], + ['>= 1', [['>=1.0.0']]], + ['<1.2', [['<1.2.0']]], + ['< 1.2', [['<1.2.0']]], + ['1', [['>=1.0.0', '<2.0.0']]], + ['1 2', [['>=1.0.0', '<2.0.0', '>=2.0.0', '<3.0.0']]], + ['1.2 - 3.4.5', [['>=1.2.0', '<=3.4.5']]], + ['1.2.3 - 3.4', [['>=1.2.3', '<3.5.0']]], + ['1.2.3 - 3', [['>=1.2.3', '<4.0.0']]], + ['>*', [['<0.0.0']]], + ['<*', [['<0.0.0']]] + ].forEach(function(v) { + var pre = v[0]; + var wanted = v[1]; + var found = toComparators(v[0]); + var jw = JSON.stringify(wanted); + t.equivalent(found, wanted, 'toComparators(' + pre + ') === ' + jw); + }); + + t.end(); +}); + +test('\ninvalid version numbers', function(t) { + ['1.2.3.4', + 'NOT VALID', + 1.2, + null, + 'Infinity.NaN.Infinity' + ].forEach(function(v) { + t.throws(function() { + new SemVer(v); + }, {name:'TypeError', message:'Invalid Version: ' + v}); + }); + + t.end(); +}); + +test('\nstrict vs loose version numbers', function(t) { + [['=1.2.3', '1.2.3'], + ['01.02.03', '1.2.3'], + ['1.2.3-beta.01', '1.2.3-beta.1'], + [' =1.2.3', '1.2.3'], + ['1.2.3foo', '1.2.3-foo'] + ].forEach(function(v) { + var loose = v[0]; + var strict = v[1]; + t.throws(function() { + new SemVer(loose); + }); + var lv = new SemVer(loose, true); + t.equal(lv.version, strict); + t.ok(eq(loose, strict, true)); + t.throws(function() { + eq(loose, strict); + }); + t.throws(function() { + new SemVer(strict).compare(loose); + }); + }); + t.end(); +}); + +test('\nstrict vs loose ranges', function(t) { + [['>=01.02.03', '>=1.2.3'], + ['~1.02.03beta', '>=1.2.3-beta <1.3.0'] + ].forEach(function(v) { + var loose = v[0]; + var comps = v[1]; + t.throws(function() { + new Range(loose); + }); + t.equal(new Range(loose, true).range, comps); + }); + t.end(); +}); + +test('\nmax satisfying', function(t) { + [[['1.2.3', '1.2.4'], '1.2', '1.2.4'], + [['1.2.4', '1.2.3'], '1.2', '1.2.4'], + [['1.2.3', '1.2.4', '1.2.5', '1.2.6'], '~1.2.3', '1.2.6'], + [['1.1.0', '1.2.0', '1.2.1', '1.3.0', '2.0.0b1', '2.0.0b2', '2.0.0b3', '2.0.0', '2.1.0'], '~2.0.0', '2.0.0', true] + ].forEach(function(v) { + var versions = v[0]; + var range = v[1]; + var expect = v[2]; + var loose = v[3]; + var actual = semver.maxSatisfying(versions, range, loose); + t.equal(actual, expect); + }); + t.end(); +}); diff --git a/node_modules/semver/test/ltr.js b/node_modules/semver/test/ltr.js new file mode 100644 index 0000000..ecd1387 --- /dev/null +++ b/node_modules/semver/test/ltr.js @@ -0,0 +1,181 @@ +var tap = require('tap'); +var test = tap.test; +var semver = require('../semver.js'); +var ltr = semver.ltr; + +test('\nltr tests', function(t) { + // [range, version, loose] + // Version should be less than range + [ + ['~1.2.2', '1.2.1'], + ['~0.6.1-1', '0.6.1-0'], + ['1.0.0 - 2.0.0', '0.0.1'], + ['1.0.0-beta.2', '1.0.0-beta.1'], + ['1.0.0', '0.0.0'], + ['>=2.0.0', '1.1.1'], + ['>=2.0.0', '1.2.9'], + ['>2.0.0', '2.0.0'], + ['0.1.20 || 1.2.4', '0.1.5'], + ['2.x.x', '1.0.0'], + ['1.2.x', '1.1.0'], + ['1.2.x || 2.x', '1.0.0'], + ['2.*.*', '1.0.1'], + ['1.2.*', '1.1.3'], + ['1.2.* || 2.*', '1.1.9999'], + ['2', '1.0.0'], + ['2.3', '2.2.2'], + ['~2.4', '2.3.0'], // >=2.4.0 <2.5.0 + ['~2.4', '2.3.5'], + ['~>3.2.1', '3.2.0'], // >=3.2.1 <3.3.0 + ['~1', '0.2.3'], // >=1.0.0 <2.0.0 + ['~>1', '0.2.4'], + ['~> 1', '0.2.3'], + ['~1.0', '0.1.2'], // >=1.0.0 <1.1.0 + ['~ 1.0', '0.1.0'], + ['>1.2', '1.2.0'], + ['> 1.2', '1.2.1'], + ['1', '0.0.0beta', true], + ['~v0.5.4-pre', '0.5.4-alpha'], + ['~v0.5.4-pre', '0.5.4-alpha'], + ['=0.7.x', '0.6.0'], + ['=0.7.x', '0.6.0-asdf'], + ['>=0.7.x', '0.6.0'], + ['~1.2.2', '1.2.1'], + ['1.0.0 - 2.0.0', '0.2.3'], + ['1.0.0', '0.0.1'], + ['>=2.0.0', '1.0.0'], + ['>=2.0.0', '1.9999.9999'], + ['>=2.0.0', '1.2.9'], + ['>2.0.0', '2.0.0'], + ['>2.0.0', '1.2.9'], + ['2.x.x', '1.1.3'], + ['1.2.x', '1.1.3'], + ['1.2.x || 2.x', '1.1.3'], + ['2.*.*', '1.1.3'], + ['1.2.*', '1.1.3'], + ['1.2.* || 2.*', '1.1.3'], + ['2', '1.9999.9999'], + ['2.3', '2.2.1'], + ['~2.4', '2.3.0'], // >=2.4.0 <2.5.0 + ['~>3.2.1', '2.3.2'], // >=3.2.1 <3.3.0 + ['~1', '0.2.3'], // >=1.0.0 <2.0.0 + ['~>1', '0.2.3'], + ['~1.0', '0.0.0'], // >=1.0.0 <1.1.0 + ['>1', '1.0.0'], + ['2', '1.0.0beta', true], + ['>1', '1.0.0beta', true], + ['> 1', '1.0.0beta', true], + ['=0.7.x', '0.6.2'], + ['=0.7.x', '0.7.0-asdf'], + ['^1', '1.0.0-0'], + ['>=0.7.x', '0.7.0-asdf'], + ['1', '1.0.0beta', true], + ['>=0.7.x', '0.6.2'] + ].forEach(function(tuple) { + var range = tuple[0]; + var version = tuple[1]; + var loose = tuple[2] || false; + var msg = 'ltr(' + version + ', ' + range + ', ' + loose + ')'; + t.ok(ltr(version, range, loose), msg); + }); + t.end(); +}); + +test('\nnegative ltr tests', function(t) { + // [range, version, loose] + // Version should NOT be greater than range + [ + ['~ 1.0', '1.1.0'], + ['~0.6.1-1', '0.6.1-1'], + ['1.0.0 - 2.0.0', '1.2.3'], + ['1.0.0 - 2.0.0', '2.9.9'], + ['1.0.0', '1.0.0'], + ['>=*', '0.2.4'], + ['', '1.0.0', true], + ['*', '1.2.3'], + ['*', 'v1.2.3-foo'], + ['>=1.0.0', '1.0.0'], + ['>=1.0.0', '1.0.1'], + ['>=1.0.0', '1.1.0'], + ['>1.0.0', '1.0.1'], + ['>1.0.0', '1.1.0'], + ['<=2.0.0', '2.0.0'], + ['<=2.0.0', '1.9999.9999'], + ['<=2.0.0', '0.2.9'], + ['<2.0.0', '1.9999.9999'], + ['<2.0.0', '0.2.9'], + ['>= 1.0.0', '1.0.0'], + ['>= 1.0.0', '1.0.1'], + ['>= 1.0.0', '1.1.0'], + ['> 1.0.0', '1.0.1'], + ['> 1.0.0', '1.1.0'], + ['<= 2.0.0', '2.0.0'], + ['<= 2.0.0', '1.9999.9999'], + ['<= 2.0.0', '0.2.9'], + ['< 2.0.0', '1.9999.9999'], + ['<\t2.0.0', '0.2.9'], + ['>=0.1.97', 'v0.1.97'], + ['>=0.1.97', '0.1.97'], + ['0.1.20 || 1.2.4', '1.2.4'], + ['0.1.20 || >1.2.4', '1.2.4'], + ['0.1.20 || 1.2.4', '1.2.3'], + ['0.1.20 || 1.2.4', '0.1.20'], + ['>=0.2.3 || <0.0.1', '0.0.0'], + ['>=0.2.3 || <0.0.1', '0.2.3'], + ['>=0.2.3 || <0.0.1', '0.2.4'], + ['||', '1.3.4'], + ['2.x.x', '2.1.3'], + ['1.2.x', '1.2.3'], + ['1.2.x || 2.x', '2.1.3'], + ['1.2.x || 2.x', '1.2.3'], + ['x', '1.2.3'], + ['2.*.*', '2.1.3'], + ['1.2.*', '1.2.3'], + ['1.2.* || 2.*', '2.1.3'], + ['1.2.* || 2.*', '1.2.3'], + ['1.2.* || 2.*', '1.2.3'], + ['*', '1.2.3'], + ['2', '2.1.2'], + ['2.3', '2.3.1'], + ['~2.4', '2.4.0'], // >=2.4.0 <2.5.0 + ['~2.4', '2.4.5'], + ['~>3.2.1', '3.2.2'], // >=3.2.1 <3.3.0 + ['~1', '1.2.3'], // >=1.0.0 <2.0.0 + ['~>1', '1.2.3'], + ['~> 1', '1.2.3'], + ['~1.0', '1.0.2'], // >=1.0.0 <1.1.0 + ['~ 1.0', '1.0.2'], + ['>=1', '1.0.0'], + ['>= 1', '1.0.0'], + ['<1.2', '1.1.1'], + ['< 1.2', '1.1.1'], + ['~v0.5.4-pre', '0.5.5'], + ['~v0.5.4-pre', '0.5.4'], + ['=0.7.x', '0.7.2'], + ['>=0.7.x', '0.7.2'], + ['<=0.7.x', '0.6.2'], + ['>0.2.3 >0.2.4 <=0.2.5', '0.2.5'], + ['>=0.2.3 <=0.2.4', '0.2.4'], + ['1.0.0 - 2.0.0', '2.0.0'], + ['^3.0.0', '4.0.0'], + ['^1.0.0 || ~2.0.1', '2.0.0'], + ['^0.1.0 || ~3.0.1 || 5.0.0', '3.2.0'], + ['^0.1.0 || ~3.0.1 || 5.0.0', '1.0.0beta', true], + ['^0.1.0 || ~3.0.1 || 5.0.0', '5.0.0-0', true], + ['^0.1.0 || ~3.0.1 || >4 <=5.0.0', '3.5.0'], + ['^1.0.0alpha', '1.0.0beta', true], + ['~1.0.0alpha', '1.0.0beta', true], + ['^1.0.0-alpha', '1.0.0beta', true], + ['~1.0.0-alpha', '1.0.0beta', true], + ['^1.0.0-alpha', '1.0.0-beta'], + ['~1.0.0-alpha', '1.0.0-beta'], + ['=0.1.0', '1.0.0'] + ].forEach(function(tuple) { + var range = tuple[0]; + var version = tuple[1]; + var loose = tuple[2] || false; + var msg = '!ltr(' + version + ', ' + range + ', ' + loose + ')'; + t.notOk(ltr(version, range, loose), msg); + }); + t.end(); +}); diff --git a/node_modules/semver/test/major-minor-patch.js b/node_modules/semver/test/major-minor-patch.js new file mode 100644 index 0000000..e9d4039 --- /dev/null +++ b/node_modules/semver/test/major-minor-patch.js @@ -0,0 +1,72 @@ +var tap = require('tap'); +var test = tap.test; +var semver = require('../semver.js'); + +test('\nmajor tests', function(t) { + // [range, version] + // Version should be detectable despite extra characters + [ + ['1.2.3', 1], + [' 1.2.3 ', 1], + [' 2.2.3-4 ', 2], + [' 3.2.3-pre ', 3], + ['v5.2.3', 5], + [' v8.2.3 ', 8], + ['\t13.2.3', 13], + ['=21.2.3', 21, true], + ['v=34.2.3', 34, true] + ].forEach(function(tuple) { + var range = tuple[0]; + var version = tuple[1]; + var loose = tuple[2] || false; + var msg = 'major(' + range + ') = ' + version; + t.equal(semver.major(range, loose), version, msg); + }); + t.end(); +}); + +test('\nminor tests', function(t) { + // [range, version] + // Version should be detectable despite extra characters + [ + ['1.1.3', 1], + [' 1.1.3 ', 1], + [' 1.2.3-4 ', 2], + [' 1.3.3-pre ', 3], + ['v1.5.3', 5], + [' v1.8.3 ', 8], + ['\t1.13.3', 13], + ['=1.21.3', 21, true], + ['v=1.34.3', 34, true] + ].forEach(function(tuple) { + var range = tuple[0]; + var version = tuple[1]; + var loose = tuple[2] || false; + var msg = 'minor(' + range + ') = ' + version; + t.equal(semver.minor(range, loose), version, msg); + }); + t.end(); +}); + +test('\npatch tests', function(t) { + // [range, version] + // Version should be detectable despite extra characters + [ + ['1.2.1', 1], + [' 1.2.1 ', 1], + [' 1.2.2-4 ', 2], + [' 1.2.3-pre ', 3], + ['v1.2.5', 5], + [' v1.2.8 ', 8], + ['\t1.2.13', 13], + ['=1.2.21', 21, true], + ['v=1.2.34', 34, true] + ].forEach(function(tuple) { + var range = tuple[0]; + var version = tuple[1]; + var loose = tuple[2] || false; + var msg = 'patch(' + range + ') = ' + version; + t.equal(semver.patch(range, loose), version, msg); + }); + t.end(); +}); diff --git a/node_modules/semver/test/no-module.js b/node_modules/semver/test/no-module.js new file mode 100644 index 0000000..8b50873 --- /dev/null +++ b/node_modules/semver/test/no-module.js @@ -0,0 +1,19 @@ +var tap = require('tap'); +var test = tap.test; + +test('no module system', function(t) { + var fs = require('fs'); + var vm = require('vm'); + var head = fs.readFileSync(require.resolve('../head.js.txt'), 'utf8'); + var src = fs.readFileSync(require.resolve('../'), 'utf8'); + var foot = fs.readFileSync(require.resolve('../foot.js.txt'), 'utf8'); + vm.runInThisContext(head + src + foot, 'semver.js'); + + // just some basic poking to see if it did some stuff + t.type(global.semver, 'object'); + t.type(global.semver.SemVer, 'function'); + t.type(global.semver.Range, 'function'); + t.ok(global.semver.satisfies('1.2.3', '1.2')); + t.end(); +}); + diff --git a/node_modules/send/HISTORY.md b/node_modules/send/HISTORY.md new file mode 100644 index 0000000..d8123cc --- /dev/null +++ b/node_modules/send/HISTORY.md @@ -0,0 +1,356 @@ +0.14.2 / 2017-01-23 +=================== + + * deps: http-errors@~1.5.1 + - deps: inherits@2.0.3 + - deps: setprototypeof@1.0.2 + - deps: statuses@'>= 1.3.1 < 2' + * deps: ms@0.7.2 + * deps: statuses@~1.3.1 + +0.14.1 / 2016-06-09 +=================== + + * Fix redirect error when `path` contains raw non-URL characters + * Fix redirect when `path` starts with multiple forward slashes + +0.14.0 / 2016-06-06 +=================== + + * Add `acceptRanges` option + * Add `cacheControl` option + * Attempt to combine multiple ranges into single range + * Correctly inherit from `Stream` class + * Fix `Content-Range` header in 416 responses when using `start`/`end` options + * Fix `Content-Range` header missing from default 416 responses + * Ignore non-byte `Range` headers + * deps: http-errors@~1.5.0 + - Add `HttpError` export, for `err instanceof createError.HttpError` + - Support new code `421 Misdirected Request` + - Use `setprototypeof` module to replace `__proto__` setting + - deps: inherits@2.0.1 + - deps: statuses@'>= 1.3.0 < 2' + - perf: enable strict mode + * deps: range-parser@~1.2.0 + - Fix incorrectly returning -1 when there is at least one valid range + - perf: remove internal function + * deps: statuses@~1.3.0 + - Add `421 Misdirected Request` + - perf: enable strict mode + * perf: remove argument reassignment + +0.13.2 / 2016-03-05 +=================== + + * Fix invalid `Content-Type` header when `send.mime.default_type` unset + +0.13.1 / 2016-01-16 +=================== + + * deps: depd@~1.1.0 + - Support web browser loading + - perf: enable strict mode + * deps: destroy@~1.0.4 + - perf: enable strict mode + * deps: escape-html@~1.0.3 + - perf: enable strict mode + - perf: optimize string replacement + - perf: use faster string coercion + * deps: range-parser@~1.0.3 + - perf: enable strict mode + +0.13.0 / 2015-06-16 +=================== + + * Allow Node.js HTTP server to set `Date` response header + * Fix incorrectly removing `Content-Location` on 304 response + * Improve the default redirect response headers + * Send appropriate headers on default error response + * Use `http-errors` for standard emitted errors + * Use `statuses` instead of `http` module for status messages + * deps: escape-html@1.0.2 + * deps: etag@~1.7.0 + - Improve stat performance by removing hashing + * deps: fresh@0.3.0 + - Add weak `ETag` matching support + * deps: on-finished@~2.3.0 + - Add defined behavior for HTTP `CONNECT` requests + - Add defined behavior for HTTP `Upgrade` requests + - deps: ee-first@1.1.1 + * perf: enable strict mode + * perf: remove unnecessary array allocations + +0.12.3 / 2015-05-13 +=================== + + * deps: debug@~2.2.0 + - deps: ms@0.7.1 + * deps: depd@~1.0.1 + * deps: etag@~1.6.0 + - Improve support for JXcore + - Support "fake" stats objects in environments without `fs` + * deps: ms@0.7.1 + - Prevent extraordinarily long inputs + * deps: on-finished@~2.2.1 + +0.12.2 / 2015-03-13 +=================== + + * Throw errors early for invalid `extensions` or `index` options + * deps: debug@~2.1.3 + - Fix high intensity foreground color for bold + - deps: ms@0.7.0 + +0.12.1 / 2015-02-17 +=================== + + * Fix regression sending zero-length files + +0.12.0 / 2015-02-16 +=================== + + * Always read the stat size from the file + * Fix mutating passed-in `options` + * deps: mime@1.3.4 + +0.11.1 / 2015-01-20 +=================== + + * Fix `root` path disclosure + +0.11.0 / 2015-01-05 +=================== + + * deps: debug@~2.1.1 + * deps: etag@~1.5.1 + - deps: crc@3.2.1 + * deps: ms@0.7.0 + - Add `milliseconds` + - Add `msecs` + - Add `secs` + - Add `mins` + - Add `hrs` + - Add `yrs` + * deps: on-finished@~2.2.0 + +0.10.1 / 2014-10-22 +=================== + + * deps: on-finished@~2.1.1 + - Fix handling of pipelined requests + +0.10.0 / 2014-10-15 +=================== + + * deps: debug@~2.1.0 + - Implement `DEBUG_FD` env variable support + * deps: depd@~1.0.0 + * deps: etag@~1.5.0 + - Improve string performance + - Slightly improve speed for weak ETags over 1KB + +0.9.3 / 2014-09-24 +================== + + * deps: etag@~1.4.0 + - Support "fake" stats objects + +0.9.2 / 2014-09-15 +================== + + * deps: depd@0.4.5 + * deps: etag@~1.3.1 + * deps: range-parser@~1.0.2 + +0.9.1 / 2014-09-07 +================== + + * deps: fresh@0.2.4 + +0.9.0 / 2014-09-07 +================== + + * Add `lastModified` option + * Use `etag` to generate `ETag` header + * deps: debug@~2.0.0 + +0.8.5 / 2014-09-04 +================== + + * Fix malicious path detection for empty string path + +0.8.4 / 2014-09-04 +================== + + * Fix a path traversal issue when using `root` + +0.8.3 / 2014-08-16 +================== + + * deps: destroy@1.0.3 + - renamed from dethroy + * deps: on-finished@2.1.0 + +0.8.2 / 2014-08-14 +================== + + * Work around `fd` leak in Node.js 0.10 for `fs.ReadStream` + * deps: dethroy@1.0.2 + +0.8.1 / 2014-08-05 +================== + + * Fix `extensions` behavior when file already has extension + +0.8.0 / 2014-08-05 +================== + + * Add `extensions` option + +0.7.4 / 2014-08-04 +================== + + * Fix serving index files without root dir + +0.7.3 / 2014-07-29 +================== + + * Fix incorrect 403 on Windows and Node.js 0.11 + +0.7.2 / 2014-07-27 +================== + + * deps: depd@0.4.4 + - Work-around v8 generating empty stack traces + +0.7.1 / 2014-07-26 +================== + + * deps: depd@0.4.3 + - Fix exception when global `Error.stackTraceLimit` is too low + +0.7.0 / 2014-07-20 +================== + + * Deprecate `hidden` option; use `dotfiles` option + * Add `dotfiles` option + * deps: debug@1.0.4 + * deps: depd@0.4.2 + - Add `TRACE_DEPRECATION` environment variable + - Remove non-standard grey color from color output + - Support `--no-deprecation` argument + - Support `--trace-deprecation` argument + +0.6.0 / 2014-07-11 +================== + + * Deprecate `from` option; use `root` option + * Deprecate `send.etag()` -- use `etag` in `options` + * Deprecate `send.hidden()` -- use `hidden` in `options` + * Deprecate `send.index()` -- use `index` in `options` + * Deprecate `send.maxage()` -- use `maxAge` in `options` + * Deprecate `send.root()` -- use `root` in `options` + * Cap `maxAge` value to 1 year + * deps: debug@1.0.3 + - Add support for multiple wildcards in namespaces + +0.5.0 / 2014-06-28 +================== + + * Accept string for `maxAge` (converted by `ms`) + * Add `headers` event + * Include link in default redirect response + * Use `EventEmitter.listenerCount` to count listeners + +0.4.3 / 2014-06-11 +================== + + * Do not throw un-catchable error on file open race condition + * Use `escape-html` for HTML escaping + * deps: debug@1.0.2 + - fix some debugging output colors on node.js 0.8 + * deps: finished@1.2.2 + * deps: fresh@0.2.2 + +0.4.2 / 2014-06-09 +================== + + * fix "event emitter leak" warnings + * deps: debug@1.0.1 + * deps: finished@1.2.1 + +0.4.1 / 2014-06-02 +================== + + * Send `max-age` in `Cache-Control` in correct format + +0.4.0 / 2014-05-27 +================== + + * Calculate ETag with md5 for reduced collisions + * Fix wrong behavior when index file matches directory + * Ignore stream errors after request ends + - Goodbye `EBADF, read` + * Skip directories in index file search + * deps: debug@0.8.1 + +0.3.0 / 2014-04-24 +================== + + * Fix sending files with dots without root set + * Coerce option types + * Accept API options in options object + * Set etags to "weak" + * Include file path in etag + * Make "Can't set headers after they are sent." catchable + * Send full entity-body for multi range requests + * Default directory access to 403 when index disabled + * Support multiple index paths + * Support "If-Range" header + * Control whether to generate etags + * deps: mime@1.2.11 + +0.2.0 / 2014-01-29 +================== + + * update range-parser and fresh + +0.1.4 / 2013-08-11 +================== + + * update fresh + +0.1.3 / 2013-07-08 +================== + + * Revert "Fix fd leak" + +0.1.2 / 2013-07-03 +================== + + * Fix fd leak + +0.1.0 / 2012-08-25 +================== + + * add options parameter to send() that is passed to fs.createReadStream() [kanongil] + +0.0.4 / 2012-08-16 +================== + + * allow custom "Accept-Ranges" definition + +0.0.3 / 2012-07-16 +================== + + * fix normalization of the root directory. Closes #3 + +0.0.2 / 2012-07-09 +================== + + * add passing of req explicitly for now (YUCK) + +0.0.1 / 2010-01-03 +================== + + * Initial release diff --git a/node_modules/send/LICENSE b/node_modules/send/LICENSE new file mode 100644 index 0000000..4aa69e8 --- /dev/null +++ b/node_modules/send/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2012 TJ Holowaychuk +Copyright (c) 2014-2016 Douglas Christopher Wilson + +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. diff --git a/node_modules/send/README.md b/node_modules/send/README.md new file mode 100644 index 0000000..0453578 --- /dev/null +++ b/node_modules/send/README.md @@ -0,0 +1,251 @@ +# send + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Linux Build][travis-image]][travis-url] +[![Windows Build][appveyor-image]][appveyor-url] +[![Test Coverage][coveralls-image]][coveralls-url] +[![Gratipay][gratipay-image]][gratipay-url] + +Send is a library for streaming files from the file system as a http response +supporting partial responses (Ranges), conditional-GET negotiation, high test +coverage, and granular events which may be leveraged to take appropriate actions +in your application or framework. + +Looking to serve up entire folders mapped to URLs? Try [serve-static](https://www.npmjs.org/package/serve-static). + +## Installation + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```bash +$ npm install send +``` + +## API + +```js +var send = require('send') +``` + +### send(req, path, [options]) + +Create a new `SendStream` for the given path to send to a `res`. The `req` is +the Node.js HTTP request and the `path` is a urlencoded path to send (urlencoded, +not the actual file-system path). + +#### Options + +##### acceptRanges + +Enable or disable accepting ranged requests, defaults to true. +Disabling this will not send `Accept-Ranges` and ignore the contents +of the `Range` request header. + +##### cacheControl + +Enable or disable setting `Cache-Control` response header, defaults to +true. Disabling this will ignore the `maxAge` option. + +##### dotfiles + +Set how "dotfiles" are treated when encountered. A dotfile is a file +or directory that begins with a dot ("."). Note this check is done on +the path itself without checking if the path actually exists on the +disk. If `root` is specified, only the dotfiles above the root are +checked (i.e. the root itself can be within a dotfile when when set +to "deny"). + + - `'allow'` No special treatment for dotfiles. + - `'deny'` Send a 403 for any request for a dotfile. + - `'ignore'` Pretend like the dotfile does not exist and 404. + +The default value is _similar_ to `'ignore'`, with the exception that +this default will not ignore the files within a directory that begins +with a dot, for backward-compatibility. + +##### end + +Byte offset at which the stream ends, defaults to the length of the file +minus 1. The end is inclusive in the stream, meaning `end: 3` will include +the 4th byte in the stream. + +##### etag + +Enable or disable etag generation, defaults to true. + +##### extensions + +If a given file doesn't exist, try appending one of the given extensions, +in the given order. By default, this is disabled (set to `false`). An +example value that will serve extension-less HTML files: `['html', 'htm']`. +This is skipped if the requested file already has an extension. + +##### index + +By default send supports "index.html" files, to disable this +set `false` or to supply a new index pass a string or an array +in preferred order. + +##### lastModified + +Enable or disable `Last-Modified` header, defaults to true. Uses the file +system's last modified value. + +##### maxAge + +Provide a max-age in milliseconds for http caching, defaults to 0. +This can also be a string accepted by the +[ms](https://www.npmjs.org/package/ms#readme) module. + +##### root + +Serve files relative to `path`. + +##### start + +Byte offset at which the stream starts, defaults to 0. The start is inclusive, +meaning `start: 2` will include the 3rd byte in the stream. + +#### Events + +The `SendStream` is an event emitter and will emit the following events: + + - `error` an error occurred `(err)` + - `directory` a directory was requested + - `file` a file was requested `(path, stat)` + - `headers` the headers are about to be set on a file `(res, path, stat)` + - `stream` file streaming has started `(stream)` + - `end` streaming has completed + +#### .pipe + +The `pipe` method is used to pipe the response into the Node.js HTTP response +object, typically `send(req, path, options).pipe(res)`. + +### .mime + +The `mime` export is the global instance of of the +[`mime` npm module](https://www.npmjs.com/package/mime). + +This is used to configure the MIME types that are associated with file extensions +as well as other options for how to resolve the MIME type of a file (like the +default type to use for an unknown file extension). + +## Error-handling + +By default when no `error` listeners are present an automatic response will be +made, otherwise you have full control over the response, aka you may show a 5xx +page etc. + +## Caching + +It does _not_ perform internal caching, you should use a reverse proxy cache +such as Varnish for this, or those fancy things called CDNs. If your +application is small enough that it would benefit from single-node memory +caching, it's small enough that it does not need caching at all ;). + +## Debugging + +To enable `debug()` instrumentation output export __DEBUG__: + +``` +$ DEBUG=send node app +``` + +## Running tests + +``` +$ npm install +$ npm test +``` + +## Examples + +### Small example + +```js +var http = require('http') +var parseUrl = require('parseurl') +var send = require('send') + +var app = http.createServer(function onRequest (req, res) { + send(req, parseUrl(req).pathname).pipe(res) +}).listen(3000) +``` + +### Custom file types + +```js +var http = require('http') +var parseUrl = require('parseurl') +var send = require('send') + +// Default unknown types to text/plain +send.mime.default_type = 'text/plain' + +// Add a custom type +send.mime.define({ + 'application/x-my-type': ['x-mt', 'x-mtt'] +}) + +var app = http.createServer(function onRequest (req, res) { + send(req, parseUrl(req).pathname).pipe(res) +}).listen(3000) +``` + +### Serving from a root directory with custom error-handling + +```js +var http = require('http') +var parseUrl = require('parseurl') +var send = require('send') + +var app = http.createServer(function onRequest (req, res) { + // your custom error-handling logic: + function error (err) { + res.statusCode = err.status || 500 + res.end(err.message) + } + + // your custom headers + function headers (res, path, stat) { + // serve all files for download + res.setHeader('Content-Disposition', 'attachment') + } + + // your custom directory handling logic: + function redirect () { + res.statusCode = 301 + res.setHeader('Location', req.url + '/') + res.end('Redirecting to ' + req.url + '/') + } + + // transfer arbitrary files from within + // /www/example.com/public/* + send(req, parseUrl(req).pathname, {root: '/www/example.com/public'}) + .on('error', error) + .on('directory', redirect) + .on('headers', headers) + .pipe(res); +}).listen(3000) +``` + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/send.svg +[npm-url]: https://npmjs.org/package/send +[travis-image]: https://img.shields.io/travis/pillarjs/send/master.svg?label=linux +[travis-url]: https://travis-ci.org/pillarjs/send +[appveyor-image]: https://img.shields.io/appveyor/ci/dougwilson/send/master.svg?label=windows +[appveyor-url]: https://ci.appveyor.com/project/dougwilson/send +[coveralls-image]: https://img.shields.io/coveralls/pillarjs/send/master.svg +[coveralls-url]: https://coveralls.io/r/pillarjs/send?branch=master +[downloads-image]: https://img.shields.io/npm/dm/send.svg +[downloads-url]: https://npmjs.org/package/send +[gratipay-image]: https://img.shields.io/gratipay/dougwilson.svg +[gratipay-url]: https://www.gratipay.com/dougwilson/ diff --git a/node_modules/send/index.js b/node_modules/send/index.js new file mode 100644 index 0000000..81ec0b3 --- /dev/null +++ b/node_modules/send/index.js @@ -0,0 +1,948 @@ +/*! + * send + * Copyright(c) 2012 TJ Holowaychuk + * Copyright(c) 2014-2016 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var createError = require('http-errors') +var debug = require('debug')('send') +var deprecate = require('depd')('send') +var destroy = require('destroy') +var encodeUrl = require('encodeurl') +var escapeHtml = require('escape-html') +var etag = require('etag') +var EventEmitter = require('events').EventEmitter +var fresh = require('fresh') +var fs = require('fs') +var mime = require('mime') +var ms = require('ms') +var onFinished = require('on-finished') +var parseRange = require('range-parser') +var path = require('path') +var statuses = require('statuses') +var Stream = require('stream') +var util = require('util') + +/** + * Path function references. + * @private + */ + +var extname = path.extname +var join = path.join +var normalize = path.normalize +var resolve = path.resolve +var sep = path.sep + +/** + * Regular expression for identifying a bytes Range header. + * @private + */ + +var BYTES_RANGE_REGEXP = /^ *bytes=/ + +/** + * Maximum value allowed for the max age. + * @private + */ + +var MAX_MAXAGE = 60 * 60 * 24 * 365 * 1000 // 1 year + +/** + * Regular expression to match a path with a directory up component. + * @private + */ + +var UP_PATH_REGEXP = /(?:^|[\\\/])\.\.(?:[\\\/]|$)/ + +/** + * Module exports. + * @public + */ + +module.exports = send +module.exports.mime = mime + +/** + * Shim EventEmitter.listenerCount for node.js < 0.10 + */ + +/* istanbul ignore next */ +var listenerCount = EventEmitter.listenerCount || + function (emitter, type) { return emitter.listeners(type).length } + +/** + * Return a `SendStream` for `req` and `path`. + * + * @param {object} req + * @param {string} path + * @param {object} [options] + * @return {SendStream} + * @public + */ + +function send (req, path, options) { + return new SendStream(req, path, options) +} + +/** + * Initialize a `SendStream` with the given `path`. + * + * @param {Request} req + * @param {String} path + * @param {object} [options] + * @private + */ + +function SendStream (req, path, options) { + Stream.call(this) + + var opts = options || {} + + this.options = opts + this.path = path + this.req = req + + this._acceptRanges = opts.acceptRanges !== undefined + ? Boolean(opts.acceptRanges) + : true + + this._cacheControl = opts.cacheControl !== undefined + ? Boolean(opts.cacheControl) + : true + + this._etag = opts.etag !== undefined + ? Boolean(opts.etag) + : true + + this._dotfiles = opts.dotfiles !== undefined + ? opts.dotfiles + : 'ignore' + + if (this._dotfiles !== 'ignore' && this._dotfiles !== 'allow' && this._dotfiles !== 'deny') { + throw new TypeError('dotfiles option must be "allow", "deny", or "ignore"') + } + + this._hidden = Boolean(opts.hidden) + + if (opts.hidden !== undefined) { + deprecate('hidden: use dotfiles: \'' + (this._hidden ? 'allow' : 'ignore') + '\' instead') + } + + // legacy support + if (opts.dotfiles === undefined) { + this._dotfiles = undefined + } + + this._extensions = opts.extensions !== undefined + ? normalizeList(opts.extensions, 'extensions option') + : [] + + this._index = opts.index !== undefined + ? normalizeList(opts.index, 'index option') + : ['index.html'] + + this._lastModified = opts.lastModified !== undefined + ? Boolean(opts.lastModified) + : true + + this._maxage = opts.maxAge || opts.maxage + this._maxage = typeof this._maxage === 'string' + ? ms(this._maxage) + : Number(this._maxage) + this._maxage = !isNaN(this._maxage) + ? Math.min(Math.max(0, this._maxage), MAX_MAXAGE) + : 0 + + this._root = opts.root + ? resolve(opts.root) + : null + + if (!this._root && opts.from) { + this.from(opts.from) + } +} + +/** + * Inherits from `Stream`. + */ + +util.inherits(SendStream, Stream) + +/** + * Enable or disable etag generation. + * + * @param {Boolean} val + * @return {SendStream} + * @api public + */ + +SendStream.prototype.etag = deprecate.function(function etag (val) { + this._etag = Boolean(val) + debug('etag %s', this._etag) + return this +}, 'send.etag: pass etag as option') + +/** + * Enable or disable "hidden" (dot) files. + * + * @param {Boolean} path + * @return {SendStream} + * @api public + */ + +SendStream.prototype.hidden = deprecate.function(function hidden (val) { + this._hidden = Boolean(val) + this._dotfiles = undefined + debug('hidden %s', this._hidden) + return this +}, 'send.hidden: use dotfiles option') + +/** + * Set index `paths`, set to a falsy + * value to disable index support. + * + * @param {String|Boolean|Array} paths + * @return {SendStream} + * @api public + */ + +SendStream.prototype.index = deprecate.function(function index (paths) { + var index = !paths ? [] : normalizeList(paths, 'paths argument') + debug('index %o', paths) + this._index = index + return this +}, 'send.index: pass index as option') + +/** + * Set root `path`. + * + * @param {String} path + * @return {SendStream} + * @api public + */ + +SendStream.prototype.root = function root (path) { + this._root = resolve(String(path)) + debug('root %s', this._root) + return this +} + +SendStream.prototype.from = deprecate.function(SendStream.prototype.root, + 'send.from: pass root as option') + +SendStream.prototype.root = deprecate.function(SendStream.prototype.root, + 'send.root: pass root as option') + +/** + * Set max-age to `maxAge`. + * + * @param {Number} maxAge + * @return {SendStream} + * @api public + */ + +SendStream.prototype.maxage = deprecate.function(function maxage (maxAge) { + this._maxage = typeof maxAge === 'string' + ? ms(maxAge) + : Number(maxAge) + this._maxage = !isNaN(this._maxage) + ? Math.min(Math.max(0, this._maxage), MAX_MAXAGE) + : 0 + debug('max-age %d', this._maxage) + return this +}, 'send.maxage: pass maxAge as option') + +/** + * Emit error with `status`. + * + * @param {number} status + * @param {Error} [error] + * @private + */ + +SendStream.prototype.error = function error (status, error) { + // emit if listeners instead of responding + if (listenerCount(this, 'error') !== 0) { + return this.emit('error', createError(error, status, { + expose: false + })) + } + + var res = this.res + var msg = statuses[status] + + // clear existing headers + clearHeaders(res) + + // add error headers + if (error && error.headers) { + setHeaders(res, error.headers) + } + + // send basic response + res.statusCode = status + res.setHeader('Content-Type', 'text/plain; charset=UTF-8') + res.setHeader('Content-Length', Buffer.byteLength(msg)) + res.setHeader('X-Content-Type-Options', 'nosniff') + res.end(msg) +} + +/** + * Check if the pathname ends with "/". + * + * @return {Boolean} + * @api private + */ + +SendStream.prototype.hasTrailingSlash = function hasTrailingSlash () { + return this.path[this.path.length - 1] === '/' +} + +/** + * Check if this is a conditional GET request. + * + * @return {Boolean} + * @api private + */ + +SendStream.prototype.isConditionalGET = function isConditionalGET () { + return this.req.headers['if-none-match'] || + this.req.headers['if-modified-since'] +} + +/** + * Strip content-* header fields. + * + * @private + */ + +SendStream.prototype.removeContentHeaderFields = function removeContentHeaderFields () { + var res = this.res + var headers = Object.keys(res._headers || {}) + + for (var i = 0; i < headers.length; i++) { + var header = headers[i] + if (header.substr(0, 8) === 'content-' && header !== 'content-location') { + res.removeHeader(header) + } + } +} + +/** + * Respond with 304 not modified. + * + * @api private + */ + +SendStream.prototype.notModified = function notModified () { + var res = this.res + debug('not modified') + this.removeContentHeaderFields() + res.statusCode = 304 + res.end() +} + +/** + * Raise error that headers already sent. + * + * @api private + */ + +SendStream.prototype.headersAlreadySent = function headersAlreadySent () { + var err = new Error('Can\'t set headers after they are sent.') + debug('headers already sent') + this.error(500, err) +} + +/** + * Check if the request is cacheable, aka + * responded with 2xx or 304 (see RFC 2616 section 14.2{5,6}). + * + * @return {Boolean} + * @api private + */ + +SendStream.prototype.isCachable = function isCachable () { + var statusCode = this.res.statusCode + return (statusCode >= 200 && statusCode < 300) || + statusCode === 304 +} + +/** + * Handle stat() error. + * + * @param {Error} error + * @private + */ + +SendStream.prototype.onStatError = function onStatError (error) { + switch (error.code) { + case 'ENAMETOOLONG': + case 'ENOENT': + case 'ENOTDIR': + this.error(404, error) + break + default: + this.error(500, error) + break + } +} + +/** + * Check if the cache is fresh. + * + * @return {Boolean} + * @api private + */ + +SendStream.prototype.isFresh = function isFresh () { + return fresh(this.req.headers, this.res._headers) +} + +/** + * Check if the range is fresh. + * + * @return {Boolean} + * @api private + */ + +SendStream.prototype.isRangeFresh = function isRangeFresh () { + var ifRange = this.req.headers['if-range'] + + if (!ifRange) { + return true + } + + return ~ifRange.indexOf('"') + ? ~ifRange.indexOf(this.res._headers['etag']) + : Date.parse(this.res._headers['last-modified']) <= Date.parse(ifRange) +} + +/** + * Redirect to path. + * + * @param {string} path + * @private + */ + +SendStream.prototype.redirect = function redirect (path) { + if (listenerCount(this, 'directory') !== 0) { + this.emit('directory') + return + } + + if (this.hasTrailingSlash()) { + this.error(403) + return + } + + var loc = encodeUrl(collapseLeadingSlashes(path + '/')) + var msg = 'Redirecting to ' + escapeHtml(loc) + '\n' + var res = this.res + + // redirect + res.statusCode = 301 + res.setHeader('Content-Type', 'text/html; charset=UTF-8') + res.setHeader('Content-Length', Buffer.byteLength(msg)) + res.setHeader('X-Content-Type-Options', 'nosniff') + res.setHeader('Location', loc) + res.end(msg) +} + +/** + * Pipe to `res. + * + * @param {Stream} res + * @return {Stream} res + * @api public + */ + +SendStream.prototype.pipe = function pipe (res) { + // root path + var root = this._root + + // references + this.res = res + + // decode the path + var path = decode(this.path) + if (path === -1) { + this.error(400) + return res + } + + // null byte(s) + if (~path.indexOf('\0')) { + this.error(400) + return res + } + + var parts + if (root !== null) { + // malicious path + if (UP_PATH_REGEXP.test(normalize('.' + sep + path))) { + debug('malicious path "%s"', path) + this.error(403) + return res + } + + // join / normalize from optional root dir + path = normalize(join(root, path)) + root = normalize(root + sep) + + // explode path parts + parts = path.substr(root.length).split(sep) + } else { + // ".." is malicious without "root" + if (UP_PATH_REGEXP.test(path)) { + debug('malicious path "%s"', path) + this.error(403) + return res + } + + // explode path parts + parts = normalize(path).split(sep) + + // resolve the path + path = resolve(path) + } + + // dotfile handling + if (containsDotFile(parts)) { + var access = this._dotfiles + + // legacy support + if (access === undefined) { + access = parts[parts.length - 1][0] === '.' + ? (this._hidden ? 'allow' : 'ignore') + : 'allow' + } + + debug('%s dotfile "%s"', access, path) + switch (access) { + case 'allow': + break + case 'deny': + this.error(403) + return res + case 'ignore': + default: + this.error(404) + return res + } + } + + // index file support + if (this._index.length && this.path[this.path.length - 1] === '/') { + this.sendIndex(path) + return res + } + + this.sendFile(path) + return res +} + +/** + * Transfer `path`. + * + * @param {String} path + * @api public + */ + +SendStream.prototype.send = function send (path, stat) { + var len = stat.size + var options = this.options + var opts = {} + var res = this.res + var req = this.req + var ranges = req.headers.range + var offset = options.start || 0 + + if (res._header) { + // impossible to send now + this.headersAlreadySent() + return + } + + debug('pipe "%s"', path) + + // set header fields + this.setHeader(path, stat) + + // set content-type + this.type(path) + + // conditional GET support + if (this.isConditionalGET() && this.isCachable() && this.isFresh()) { + this.notModified() + return + } + + // adjust len to start/end options + len = Math.max(0, len - offset) + if (options.end !== undefined) { + var bytes = options.end - offset + 1 + if (len > bytes) len = bytes + } + + // Range support + if (this._acceptRanges && BYTES_RANGE_REGEXP.test(ranges)) { + // parse + ranges = parseRange(len, ranges, { + combine: true + }) + + // If-Range support + if (!this.isRangeFresh()) { + debug('range stale') + ranges = -2 + } + + // unsatisfiable + if (ranges === -1) { + debug('range unsatisfiable') + + // Content-Range + res.setHeader('Content-Range', contentRange('bytes', len)) + + // 416 Requested Range Not Satisfiable + return this.error(416, { + headers: {'Content-Range': res.getHeader('Content-Range')} + }) + } + + // valid (syntactically invalid/multiple ranges are treated as a regular response) + if (ranges !== -2 && ranges.length === 1) { + debug('range %j', ranges) + + // Content-Range + res.statusCode = 206 + res.setHeader('Content-Range', contentRange('bytes', len, ranges[0])) + + // adjust for requested range + offset += ranges[0].start + len = ranges[0].end - ranges[0].start + 1 + } + } + + // clone options + for (var prop in options) { + opts[prop] = options[prop] + } + + // set read options + opts.start = offset + opts.end = Math.max(offset, offset + len - 1) + + // content-length + res.setHeader('Content-Length', len) + + // HEAD support + if (req.method === 'HEAD') { + res.end() + return + } + + this.stream(path, opts) +} + +/** + * Transfer file for `path`. + * + * @param {String} path + * @api private + */ +SendStream.prototype.sendFile = function sendFile (path) { + var i = 0 + var self = this + + debug('stat "%s"', path) + fs.stat(path, function onstat (err, stat) { + if (err && err.code === 'ENOENT' && !extname(path) && path[path.length - 1] !== sep) { + // not found, check extensions + return next(err) + } + if (err) return self.onStatError(err) + if (stat.isDirectory()) return self.redirect(self.path) + self.emit('file', path, stat) + self.send(path, stat) + }) + + function next (err) { + if (self._extensions.length <= i) { + return err + ? self.onStatError(err) + : self.error(404) + } + + var p = path + '.' + self._extensions[i++] + + debug('stat "%s"', p) + fs.stat(p, function (err, stat) { + if (err) return next(err) + if (stat.isDirectory()) return next() + self.emit('file', p, stat) + self.send(p, stat) + }) + } +} + +/** + * Transfer index for `path`. + * + * @param {String} path + * @api private + */ +SendStream.prototype.sendIndex = function sendIndex (path) { + var i = -1 + var self = this + + function next (err) { + if (++i >= self._index.length) { + if (err) return self.onStatError(err) + return self.error(404) + } + + var p = join(path, self._index[i]) + + debug('stat "%s"', p) + fs.stat(p, function (err, stat) { + if (err) return next(err) + if (stat.isDirectory()) return next() + self.emit('file', p, stat) + self.send(p, stat) + }) + } + + next() +} + +/** + * Stream `path` to the response. + * + * @param {String} path + * @param {Object} options + * @api private + */ + +SendStream.prototype.stream = function stream (path, options) { + // TODO: this is all lame, refactor meeee + var finished = false + var self = this + var res = this.res + + // pipe + var stream = fs.createReadStream(path, options) + this.emit('stream', stream) + stream.pipe(res) + + // response finished, done with the fd + onFinished(res, function onfinished () { + finished = true + destroy(stream) + }) + + // error handling code-smell + stream.on('error', function onerror (err) { + // request already finished + if (finished) return + + // clean up stream + finished = true + destroy(stream) + + // error + self.onStatError(err) + }) + + // end + stream.on('end', function onend () { + self.emit('end') + }) +} + +/** + * Set content-type based on `path` + * if it hasn't been explicitly set. + * + * @param {String} path + * @api private + */ + +SendStream.prototype.type = function type (path) { + var res = this.res + + if (res.getHeader('Content-Type')) return + + var type = mime.lookup(path) + + if (!type) { + debug('no content-type') + return + } + + var charset = mime.charsets.lookup(type) + + debug('content-type %s', type) + res.setHeader('Content-Type', type + (charset ? '; charset=' + charset : '')) +} + +/** + * Set response header fields, most + * fields may be pre-defined. + * + * @param {String} path + * @param {Object} stat + * @api private + */ + +SendStream.prototype.setHeader = function setHeader (path, stat) { + var res = this.res + + this.emit('headers', res, path, stat) + + if (this._acceptRanges && !res.getHeader('Accept-Ranges')) { + debug('accept ranges') + res.setHeader('Accept-Ranges', 'bytes') + } + + if (this._cacheControl && !res.getHeader('Cache-Control')) { + var cacheControl = 'public, max-age=' + Math.floor(this._maxage / 1000) + debug('cache-control %s', cacheControl) + res.setHeader('Cache-Control', cacheControl) + } + + if (this._lastModified && !res.getHeader('Last-Modified')) { + var modified = stat.mtime.toUTCString() + debug('modified %s', modified) + res.setHeader('Last-Modified', modified) + } + + if (this._etag && !res.getHeader('ETag')) { + var val = etag(stat) + debug('etag %s', val) + res.setHeader('ETag', val) + } +} + +/** + * Clear all headers from a response. + * + * @param {object} res + * @private + */ + +function clearHeaders (res) { + res._headers = {} + res._headerNames = {} +} + +/** + * Collapse all leading slashes into a single slash + * + * @param {string} str + * @private + */ +function collapseLeadingSlashes (str) { + for (var i = 0; i < str.length; i++) { + if (str[i] !== '/') { + break + } + } + + return i > 1 + ? '/' + str.substr(i) + : str +} + +/** + * Determine if path parts contain a dotfile. + * + * @api private + */ + +function containsDotFile (parts) { + for (var i = 0; i < parts.length; i++) { + if (parts[i][0] === '.') { + return true + } + } + + return false +} + +/** + * Create a Content-Range header. + * + * @param {string} type + * @param {number} size + * @param {array} [range] + */ + +function contentRange (type, size, range) { + return type + ' ' + (range ? range.start + '-' + range.end : '*') + '/' + size +} + +/** + * decodeURIComponent. + * + * Allows V8 to only deoptimize this fn instead of all + * of send(). + * + * @param {String} path + * @api private + */ + +function decode (path) { + try { + return decodeURIComponent(path) + } catch (err) { + return -1 + } +} + +/** + * Normalize the index option into an array. + * + * @param {boolean|string|array} val + * @param {string} name + * @private + */ + +function normalizeList (val, name) { + var list = [].concat(val || []) + + for (var i = 0; i < list.length; i++) { + if (typeof list[i] !== 'string') { + throw new TypeError(name + ' must be array of strings or false') + } + } + + return list +} + +/** + * Set an object of headers on a response. + * + * @param {object} res + * @param {object} headers + * @private + */ + +function setHeaders (res, headers) { + var keys = Object.keys(headers) + + for (var i = 0; i < keys.length; i++) { + var key = keys[i] + res.setHeader(key, headers[key]) + } +} diff --git a/node_modules/send/node_modules/debug/.jshintrc b/node_modules/send/node_modules/debug/.jshintrc new file mode 100644 index 0000000..299877f --- /dev/null +++ b/node_modules/send/node_modules/debug/.jshintrc @@ -0,0 +1,3 @@ +{ + "laxbreak": true +} diff --git a/node_modules/send/node_modules/debug/.npmignore b/node_modules/send/node_modules/debug/.npmignore new file mode 100644 index 0000000..7e6163d --- /dev/null +++ b/node_modules/send/node_modules/debug/.npmignore @@ -0,0 +1,6 @@ +support +test +examples +example +*.sock +dist diff --git a/node_modules/send/node_modules/debug/History.md b/node_modules/send/node_modules/debug/History.md new file mode 100644 index 0000000..854c971 --- /dev/null +++ b/node_modules/send/node_modules/debug/History.md @@ -0,0 +1,195 @@ + +2.2.0 / 2015-05-09 +================== + + * package: update "ms" to v0.7.1 (#202, @dougwilson) + * README: add logging to file example (#193, @DanielOchoa) + * README: fixed a typo (#191, @amir-s) + * browser: expose `storage` (#190, @stephenmathieson) + * Makefile: add a `distclean` target (#189, @stephenmathieson) + +2.1.3 / 2015-03-13 +================== + + * Updated stdout/stderr example (#186) + * Updated example/stdout.js to match debug current behaviour + * Renamed example/stderr.js to stdout.js + * Update Readme.md (#184) + * replace high intensity foreground color for bold (#182, #183) + +2.1.2 / 2015-03-01 +================== + + * dist: recompile + * update "ms" to v0.7.0 + * package: update "browserify" to v9.0.3 + * component: fix "ms.js" repo location + * changed bower package name + * updated documentation about using debug in a browser + * fix: security error on safari (#167, #168, @yields) + +2.1.1 / 2014-12-29 +================== + + * browser: use `typeof` to check for `console` existence + * browser: check for `console.log` truthiness (fix IE 8/9) + * browser: add support for Chrome apps + * Readme: added Windows usage remarks + * Add `bower.json` to properly support bower install + +2.1.0 / 2014-10-15 +================== + + * node: implement `DEBUG_FD` env variable support + * package: update "browserify" to v6.1.0 + * package: add "license" field to package.json (#135, @panuhorsmalahti) + +2.0.0 / 2014-09-01 +================== + + * package: update "browserify" to v5.11.0 + * node: use stderr rather than stdout for logging (#29, @stephenmathieson) + +1.0.4 / 2014-07-15 +================== + + * dist: recompile + * example: remove `console.info()` log usage + * example: add "Content-Type" UTF-8 header to browser example + * browser: place %c marker after the space character + * browser: reset the "content" color via `color: inherit` + * browser: add colors support for Firefox >= v31 + * debug: prefer an instance `log()` function over the global one (#119) + * Readme: update documentation about styled console logs for FF v31 (#116, @wryk) + +1.0.3 / 2014-07-09 +================== + + * Add support for multiple wildcards in namespaces (#122, @seegno) + * browser: fix lint + +1.0.2 / 2014-06-10 +================== + + * browser: update color palette (#113, @gscottolson) + * common: make console logging function configurable (#108, @timoxley) + * node: fix %o colors on old node <= 0.8.x + * Makefile: find node path using shell/which (#109, @timoxley) + +1.0.1 / 2014-06-06 +================== + + * browser: use `removeItem()` to clear localStorage + * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777) + * package: add "contributors" section + * node: fix comment typo + * README: list authors + +1.0.0 / 2014-06-04 +================== + + * make ms diff be global, not be scope + * debug: ignore empty strings in enable() + * node: make DEBUG_COLORS able to disable coloring + * *: export the `colors` array + * npmignore: don't publish the `dist` dir + * Makefile: refactor to use browserify + * package: add "browserify" as a dev dependency + * Readme: add Web Inspector Colors section + * node: reset terminal color for the debug content + * node: map "%o" to `util.inspect()` + * browser: map "%j" to `JSON.stringify()` + * debug: add custom "formatters" + * debug: use "ms" module for humanizing the diff + * Readme: add "bash" syntax highlighting + * browser: add Firebug color support + * browser: add colors for WebKit browsers + * node: apply log to `console` + * rewrite: abstract common logic for Node & browsers + * add .jshintrc file + +0.8.1 / 2014-04-14 +================== + + * package: re-add the "component" section + +0.8.0 / 2014-03-30 +================== + + * add `enable()` method for nodejs. Closes #27 + * change from stderr to stdout + * remove unnecessary index.js file + +0.7.4 / 2013-11-13 +================== + + * remove "browserify" key from package.json (fixes something in browserify) + +0.7.3 / 2013-10-30 +================== + + * fix: catch localStorage security error when cookies are blocked (Chrome) + * add debug(err) support. Closes #46 + * add .browser prop to package.json. Closes #42 + +0.7.2 / 2013-02-06 +================== + + * fix package.json + * fix: Mobile Safari (private mode) is broken with debug + * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript + +0.7.1 / 2013-02-05 +================== + + * add repository URL to package.json + * add DEBUG_COLORED to force colored output + * add browserify support + * fix component. Closes #24 + +0.7.0 / 2012-05-04 +================== + + * Added .component to package.json + * Added debug.component.js build + +0.6.0 / 2012-03-16 +================== + + * Added support for "-" prefix in DEBUG [Vinay Pulim] + * Added `.enabled` flag to the node version [TooTallNate] + +0.5.0 / 2012-02-02 +================== + + * Added: humanize diffs. Closes #8 + * Added `debug.disable()` to the CS variant + * Removed padding. Closes #10 + * Fixed: persist client-side variant again. Closes #9 + +0.4.0 / 2012-02-01 +================== + + * Added browser variant support for older browsers [TooTallNate] + * Added `debug.enable('project:*')` to browser variant [TooTallNate] + * Added padding to diff (moved it to the right) + +0.3.0 / 2012-01-26 +================== + + * Added millisecond diff when isatty, otherwise UTC string + +0.2.0 / 2012-01-22 +================== + + * Added wildcard support + +0.1.0 / 2011-12-02 +================== + + * Added: remove colors unless stderr isatty [TooTallNate] + +0.0.1 / 2010-01-03 +================== + + * Initial release diff --git a/node_modules/send/node_modules/debug/Makefile b/node_modules/send/node_modules/debug/Makefile new file mode 100644 index 0000000..5cf4a59 --- /dev/null +++ b/node_modules/send/node_modules/debug/Makefile @@ -0,0 +1,36 @@ + +# get Makefile directory name: http://stackoverflow.com/a/5982798/376773 +THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) +THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd) + +# BIN directory +BIN := $(THIS_DIR)/node_modules/.bin + +# applications +NODE ?= $(shell which node) +NPM ?= $(NODE) $(shell which npm) +BROWSERIFY ?= $(NODE) $(BIN)/browserify + +all: dist/debug.js + +install: node_modules + +clean: + @rm -rf dist + +dist: + @mkdir -p $@ + +dist/debug.js: node_modules browser.js debug.js dist + @$(BROWSERIFY) \ + --standalone debug \ + . > $@ + +distclean: clean + @rm -rf node_modules + +node_modules: package.json + @NODE_ENV= $(NPM) install + @touch node_modules + +.PHONY: all install clean distclean diff --git a/node_modules/send/node_modules/debug/Readme.md b/node_modules/send/node_modules/debug/Readme.md new file mode 100644 index 0000000..b4f45e3 --- /dev/null +++ b/node_modules/send/node_modules/debug/Readme.md @@ -0,0 +1,188 @@ +# debug + + tiny node.js debugging utility modelled after node core's debugging technique. + +## Installation + +```bash +$ npm install debug +``` + +## Usage + + With `debug` you simply invoke the exported function to generate your debug function, passing it a name which will determine if a noop function is returned, or a decorated `console.error`, so all of the `console` format string goodies you're used to work fine. A unique color is selected per-function for visibility. + +Example _app.js_: + +```js +var debug = require('debug')('http') + , http = require('http') + , name = 'My App'; + +// fake app + +debug('booting %s', name); + +http.createServer(function(req, res){ + debug(req.method + ' ' + req.url); + res.end('hello\n'); +}).listen(3000, function(){ + debug('listening'); +}); + +// fake worker of some kind + +require('./worker'); +``` + +Example _worker.js_: + +```js +var debug = require('debug')('worker'); + +setInterval(function(){ + debug('doing some work'); +}, 1000); +``` + + The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples: + + ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png) + + ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png) + +#### Windows note + + On Windows the environment variable is set using the `set` command. + + ```cmd + set DEBUG=*,-not_this + ``` + +Then, run the program to be debugged as usual. + +## Millisecond diff + + When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. + + ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png) + + When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below: + + ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png) + +## Conventions + + If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". + +## Wildcards + + The `*` character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. + + You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=*,-connect:*` would include all debuggers except those starting with "connect:". + +## Browser support + + Debug works in the browser as well, currently persisted by `localStorage`. Consider the situation shown below where you have `worker:a` and `worker:b`, and wish to debug both. Somewhere in the code on your page, include: + +```js +window.myDebug = require("debug"); +``` + + ("debug" is a global object in the browser so we give this object a different name.) When your page is open in the browser, type the following in the console: + +```js +myDebug.enable("worker:*") +``` + + Refresh the page. Debug output will continue to be sent to the console until it is disabled by typing `myDebug.disable()` in the console. + +```js +a = debug('worker:a'); +b = debug('worker:b'); + +setInterval(function(){ + a('doing some work'); +}, 1000); + +setInterval(function(){ + b('doing some work'); +}, 1200); +``` + +#### Web Inspector Colors + + Colors are also enabled on "Web Inspectors" that understand the `%c` formatting + option. These are WebKit web inspectors, Firefox ([since version + 31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/)) + and the Firebug plugin for Firefox (any version). + + Colored output looks something like: + + ![](https://cloud.githubusercontent.com/assets/71256/3139768/b98c5fd8-e8ef-11e3-862a-f7253b6f47c6.png) + +### stderr vs stdout + +You can set an alternative logging method per-namespace by overriding the `log` method on a per-namespace or globally: + +Example _stdout.js_: + +```js +var debug = require('debug'); +var error = debug('app:error'); + +// by default stderr is used +error('goes to stderr!'); + +var log = debug('app:log'); +// set this namespace to log via console.log +log.log = console.log.bind(console); // don't forget to bind to console! +log('goes to stdout'); +error('still goes to stderr!'); + +// set all output to go via console.info +// overrides all per-namespace log settings +debug.log = console.info.bind(console); +error('now goes to stdout via console.info'); +log('still goes to stdout, but via console.info now'); +``` + +### Save debug output to a file + +You can save all debug statements to a file by piping them. + +Example: + +```bash +$ DEBUG_FD=3 node your-app.js 3> whatever.log +``` + +## Authors + + - TJ Holowaychuk + - Nathan Rajlich + +## License + +(The MIT License) + +Copyright (c) 2014 TJ Holowaychuk <tj@vision-media.ca> + +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. diff --git a/node_modules/send/node_modules/debug/bower.json b/node_modules/send/node_modules/debug/bower.json new file mode 100644 index 0000000..6af573f --- /dev/null +++ b/node_modules/send/node_modules/debug/bower.json @@ -0,0 +1,28 @@ +{ + "name": "visionmedia-debug", + "main": "dist/debug.js", + "version": "2.2.0", + "homepage": "https://github.com/visionmedia/debug", + "authors": [ + "TJ Holowaychuk " + ], + "description": "visionmedia-debug", + "moduleType": [ + "amd", + "es6", + "globals", + "node" + ], + "keywords": [ + "visionmedia", + "debug" + ], + "license": "MIT", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ] +} diff --git a/node_modules/send/node_modules/debug/browser.js b/node_modules/send/node_modules/debug/browser.js new file mode 100644 index 0000000..7c76452 --- /dev/null +++ b/node_modules/send/node_modules/debug/browser.js @@ -0,0 +1,168 @@ + +/** + * This is the web browser implementation of `debug()`. + * + * Expose `debug()` as the module. + */ + +exports = module.exports = require('./debug'); +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.storage = 'undefined' != typeof chrome + && 'undefined' != typeof chrome.storage + ? chrome.storage.local + : localstorage(); + +/** + * Colors. + */ + +exports.colors = [ + 'lightseagreen', + 'forestgreen', + 'goldenrod', + 'dodgerblue', + 'darkorchid', + 'crimson' +]; + +/** + * Currently only WebKit-based Web Inspectors, Firefox >= v31, + * and the Firebug extension (any Firefox version) are known + * to support "%c" CSS customizations. + * + * TODO: add a `localStorage` variable to explicitly enable/disable colors + */ + +function useColors() { + // is webkit? http://stackoverflow.com/a/16459606/376773 + return ('WebkitAppearance' in document.documentElement.style) || + // is firebug? http://stackoverflow.com/a/398120/376773 + (window.console && (console.firebug || (console.exception && console.table))) || + // is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + (navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31); +} + +/** + * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. + */ + +exports.formatters.j = function(v) { + return JSON.stringify(v); +}; + + +/** + * Colorize log arguments if enabled. + * + * @api public + */ + +function formatArgs() { + var args = arguments; + var useColors = this.useColors; + + args[0] = (useColors ? '%c' : '') + + this.namespace + + (useColors ? ' %c' : ' ') + + args[0] + + (useColors ? '%c ' : ' ') + + '+' + exports.humanize(this.diff); + + if (!useColors) return args; + + var c = 'color: ' + this.color; + args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1)); + + // the final "%c" is somewhat tricky, because there could be other + // arguments passed either before or after the %c, so we need to + // figure out the correct index to insert the CSS into + var index = 0; + var lastC = 0; + args[0].replace(/%[a-z%]/g, function(match) { + if ('%%' === match) return; + index++; + if ('%c' === match) { + // we only are interested in the *last* %c + // (the user may have provided their own) + lastC = index; + } + }); + + args.splice(lastC, 0, c); + return args; +} + +/** + * Invokes `console.log()` when available. + * No-op when `console.log` is not a "function". + * + * @api public + */ + +function log() { + // this hackery is required for IE8/9, where + // the `console.log` function doesn't have 'apply' + return 'object' === typeof console + && console.log + && Function.prototype.apply.call(console.log, console, arguments); +} + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ + +function save(namespaces) { + try { + if (null == namespaces) { + exports.storage.removeItem('debug'); + } else { + exports.storage.debug = namespaces; + } + } catch(e) {} +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + +function load() { + var r; + try { + r = exports.storage.debug; + } catch(e) {} + return r; +} + +/** + * Enable namespaces listed in `localStorage.debug` initially. + */ + +exports.enable(load()); + +/** + * Localstorage attempts to return the localstorage. + * + * This is necessary because safari throws + * when a user disables cookies/localstorage + * and you attempt to access it. + * + * @return {LocalStorage} + * @api private + */ + +function localstorage(){ + try { + return window.localStorage; + } catch (e) {} +} diff --git a/node_modules/send/node_modules/debug/component.json b/node_modules/send/node_modules/debug/component.json new file mode 100644 index 0000000..ca10637 --- /dev/null +++ b/node_modules/send/node_modules/debug/component.json @@ -0,0 +1,19 @@ +{ + "name": "debug", + "repo": "visionmedia/debug", + "description": "small debugging utility", + "version": "2.2.0", + "keywords": [ + "debug", + "log", + "debugger" + ], + "main": "browser.js", + "scripts": [ + "browser.js", + "debug.js" + ], + "dependencies": { + "rauchg/ms.js": "0.7.1" + } +} diff --git a/node_modules/send/node_modules/debug/debug.js b/node_modules/send/node_modules/debug/debug.js new file mode 100644 index 0000000..7571a86 --- /dev/null +++ b/node_modules/send/node_modules/debug/debug.js @@ -0,0 +1,197 @@ + +/** + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + * + * Expose `debug()` as the module. + */ + +exports = module.exports = debug; +exports.coerce = coerce; +exports.disable = disable; +exports.enable = enable; +exports.enabled = enabled; +exports.humanize = require('ms'); + +/** + * The currently active debug mode names, and names to skip. + */ + +exports.names = []; +exports.skips = []; + +/** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lowercased letter, i.e. "n". + */ + +exports.formatters = {}; + +/** + * Previously assigned color. + */ + +var prevColor = 0; + +/** + * Previous log timestamp. + */ + +var prevTime; + +/** + * Select a color. + * + * @return {Number} + * @api private + */ + +function selectColor() { + return exports.colors[prevColor++ % exports.colors.length]; +} + +/** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + +function debug(namespace) { + + // define the `disabled` version + function disabled() { + } + disabled.enabled = false; + + // define the `enabled` version + function enabled() { + + var self = enabled; + + // set `diff` timestamp + var curr = +new Date(); + var ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + + // add the `color` if not set + if (null == self.useColors) self.useColors = exports.useColors(); + if (null == self.color && self.useColors) self.color = selectColor(); + + var args = Array.prototype.slice.call(arguments); + + args[0] = exports.coerce(args[0]); + + if ('string' !== typeof args[0]) { + // anything else let's inspect with %o + args = ['%o'].concat(args); + } + + // apply any `formatters` transformations + var index = 0; + args[0] = args[0].replace(/%([a-z%])/g, function(match, format) { + // if we encounter an escaped % then don't increase the array index + if (match === '%%') return match; + index++; + var formatter = exports.formatters[format]; + if ('function' === typeof formatter) { + var val = args[index]; + match = formatter.call(self, val); + + // now we need to remove `args[index]` since it's inlined in the `format` + args.splice(index, 1); + index--; + } + return match; + }); + + if ('function' === typeof exports.formatArgs) { + args = exports.formatArgs.apply(self, args); + } + var logFn = enabled.log || exports.log || console.log.bind(console); + logFn.apply(self, args); + } + enabled.enabled = true; + + var fn = exports.enabled(namespace) ? enabled : disabled; + + fn.namespace = namespace; + + return fn; +} + +/** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + +function enable(namespaces) { + exports.save(namespaces); + + var split = (namespaces || '').split(/[\s,]+/); + var len = split.length; + + for (var i = 0; i < len; i++) { + if (!split[i]) continue; // ignore empty strings + namespaces = split[i].replace(/\*/g, '.*?'); + if (namespaces[0] === '-') { + exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); + } else { + exports.names.push(new RegExp('^' + namespaces + '$')); + } + } +} + +/** + * Disable debug output. + * + * @api public + */ + +function disable() { + exports.enable(''); +} + +/** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + +function enabled(name) { + var i, len; + for (i = 0, len = exports.skips.length; i < len; i++) { + if (exports.skips[i].test(name)) { + return false; + } + } + for (i = 0, len = exports.names.length; i < len; i++) { + if (exports.names[i].test(name)) { + return true; + } + } + return false; +} + +/** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + +function coerce(val) { + if (val instanceof Error) return val.stack || val.message; + return val; +} diff --git a/node_modules/send/node_modules/debug/node.js b/node_modules/send/node_modules/debug/node.js new file mode 100644 index 0000000..1d392a8 --- /dev/null +++ b/node_modules/send/node_modules/debug/node.js @@ -0,0 +1,209 @@ + +/** + * Module dependencies. + */ + +var tty = require('tty'); +var util = require('util'); + +/** + * This is the Node.js implementation of `debug()`. + * + * Expose `debug()` as the module. + */ + +exports = module.exports = require('./debug'); +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; + +/** + * Colors. + */ + +exports.colors = [6, 2, 3, 4, 5, 1]; + +/** + * The file descriptor to write the `debug()` calls to. + * Set the `DEBUG_FD` env variable to override with another value. i.e.: + * + * $ DEBUG_FD=3 node script.js 3>debug.log + */ + +var fd = parseInt(process.env.DEBUG_FD, 10) || 2; +var stream = 1 === fd ? process.stdout : + 2 === fd ? process.stderr : + createWritableStdioStream(fd); + +/** + * Is stdout a TTY? Colored output is enabled when `true`. + */ + +function useColors() { + var debugColors = (process.env.DEBUG_COLORS || '').trim().toLowerCase(); + if (0 === debugColors.length) { + return tty.isatty(fd); + } else { + return '0' !== debugColors + && 'no' !== debugColors + && 'false' !== debugColors + && 'disabled' !== debugColors; + } +} + +/** + * Map %o to `util.inspect()`, since Node doesn't do that out of the box. + */ + +var inspect = (4 === util.inspect.length ? + // node <= 0.8.x + function (v, colors) { + return util.inspect(v, void 0, void 0, colors); + } : + // node > 0.8.x + function (v, colors) { + return util.inspect(v, { colors: colors }); + } +); + +exports.formatters.o = function(v) { + return inspect(v, this.useColors) + .replace(/\s*\n\s*/g, ' '); +}; + +/** + * Adds ANSI color escape codes if enabled. + * + * @api public + */ + +function formatArgs() { + var args = arguments; + var useColors = this.useColors; + var name = this.namespace; + + if (useColors) { + var c = this.color; + + args[0] = ' \u001b[3' + c + ';1m' + name + ' ' + + '\u001b[0m' + + args[0] + '\u001b[3' + c + 'm' + + ' +' + exports.humanize(this.diff) + '\u001b[0m'; + } else { + args[0] = new Date().toUTCString() + + ' ' + name + ' ' + args[0]; + } + return args; +} + +/** + * Invokes `console.error()` with the specified arguments. + */ + +function log() { + return stream.write(util.format.apply(this, arguments) + '\n'); +} + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ + +function save(namespaces) { + if (null == namespaces) { + // If you set a process.env field to null or undefined, it gets cast to the + // string 'null' or 'undefined'. Just delete instead. + delete process.env.DEBUG; + } else { + process.env.DEBUG = namespaces; + } +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + +function load() { + return process.env.DEBUG; +} + +/** + * Copied from `node/src/node.js`. + * + * XXX: It's lame that node doesn't expose this API out-of-the-box. It also + * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame. + */ + +function createWritableStdioStream (fd) { + var stream; + var tty_wrap = process.binding('tty_wrap'); + + // Note stream._type is used for test-module-load-list.js + + switch (tty_wrap.guessHandleType(fd)) { + case 'TTY': + stream = new tty.WriteStream(fd); + stream._type = 'tty'; + + // Hack to have stream not keep the event loop alive. + // See https://github.com/joyent/node/issues/1726 + if (stream._handle && stream._handle.unref) { + stream._handle.unref(); + } + break; + + case 'FILE': + var fs = require('fs'); + stream = new fs.SyncWriteStream(fd, { autoClose: false }); + stream._type = 'fs'; + break; + + case 'PIPE': + case 'TCP': + var net = require('net'); + stream = new net.Socket({ + fd: fd, + readable: false, + writable: true + }); + + // FIXME Should probably have an option in net.Socket to create a + // stream from an existing fd which is writable only. But for now + // we'll just add this hack and set the `readable` member to false. + // Test: ./node test/fixtures/echo.js < /etc/passwd + stream.readable = false; + stream.read = null; + stream._type = 'pipe'; + + // FIXME Hack to have stream not keep the event loop alive. + // See https://github.com/joyent/node/issues/1726 + if (stream._handle && stream._handle.unref) { + stream._handle.unref(); + } + break; + + default: + // Probably an error on in uv_guess_handle() + throw new Error('Implement me. Unknown stream file type!'); + } + + // For supporting legacy API we put the FD here. + stream.fd = fd; + + stream._isStdio = true; + + return stream; +} + +/** + * Enable namespaces listed in `process.env.DEBUG` initially. + */ + +exports.enable(load()); diff --git a/node_modules/send/node_modules/debug/node_modules/ms/.npmignore b/node_modules/send/node_modules/debug/node_modules/ms/.npmignore new file mode 100644 index 0000000..d1aa0ce --- /dev/null +++ b/node_modules/send/node_modules/debug/node_modules/ms/.npmignore @@ -0,0 +1,5 @@ +node_modules +test +History.md +Makefile +component.json diff --git a/node_modules/send/node_modules/debug/node_modules/ms/History.md b/node_modules/send/node_modules/debug/node_modules/ms/History.md new file mode 100644 index 0000000..32fdfc1 --- /dev/null +++ b/node_modules/send/node_modules/debug/node_modules/ms/History.md @@ -0,0 +1,66 @@ + +0.7.1 / 2015-04-20 +================== + + * prevent extraordinary long inputs (@evilpacket) + * Fixed broken readme link + +0.7.0 / 2014-11-24 +================== + + * add time abbreviations, updated tests and readme for the new units + * fix example in the readme. + * add LICENSE file + +0.6.2 / 2013-12-05 +================== + + * Adding repository section to package.json to suppress warning from NPM. + +0.6.1 / 2013-05-10 +================== + + * fix singularization [visionmedia] + +0.6.0 / 2013-03-15 +================== + + * fix minutes + +0.5.1 / 2013-02-24 +================== + + * add component namespace + +0.5.0 / 2012-11-09 +================== + + * add short formatting as default and .long option + * add .license property to component.json + * add version to component.json + +0.4.0 / 2012-10-22 +================== + + * add rounding to fix crazy decimals + +0.3.0 / 2012-09-07 +================== + + * fix `ms()` [visionmedia] + +0.2.0 / 2012-09-03 +================== + + * add component.json [visionmedia] + * add days support [visionmedia] + * add hours support [visionmedia] + * add minutes support [visionmedia] + * add seconds support [visionmedia] + * add ms string support [visionmedia] + * refactor tests to facilitate ms(number) [visionmedia] + +0.1.0 / 2012-03-07 +================== + + * Initial release diff --git a/node_modules/send/node_modules/debug/node_modules/ms/LICENSE b/node_modules/send/node_modules/debug/node_modules/ms/LICENSE new file mode 100644 index 0000000..6c07561 --- /dev/null +++ b/node_modules/send/node_modules/debug/node_modules/ms/LICENSE @@ -0,0 +1,20 @@ +(The MIT License) + +Copyright (c) 2014 Guillermo Rauch + +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. diff --git a/node_modules/send/node_modules/debug/node_modules/ms/README.md b/node_modules/send/node_modules/debug/node_modules/ms/README.md new file mode 100644 index 0000000..9b4fd03 --- /dev/null +++ b/node_modules/send/node_modules/debug/node_modules/ms/README.md @@ -0,0 +1,35 @@ +# ms.js: miliseconds conversion utility + +```js +ms('2 days') // 172800000 +ms('1d') // 86400000 +ms('10h') // 36000000 +ms('2.5 hrs') // 9000000 +ms('2h') // 7200000 +ms('1m') // 60000 +ms('5s') // 5000 +ms('100') // 100 +``` + +```js +ms(60000) // "1m" +ms(2 * 60000) // "2m" +ms(ms('10 hours')) // "10h" +``` + +```js +ms(60000, { long: true }) // "1 minute" +ms(2 * 60000, { long: true }) // "2 minutes" +ms(ms('10 hours'), { long: true }) // "10 hours" +``` + +- Node/Browser compatible. Published as [`ms`](https://www.npmjs.org/package/ms) in [NPM](http://nodejs.org/download). +- If a number is supplied to `ms`, a string with a unit is returned. +- If a string that contains the number is supplied, it returns it as +a number (e.g: it returns `100` for `'100'`). +- If you pass a string with a number and a valid unit, the number of +equivalent ms is returned. + +## License + +MIT diff --git a/node_modules/send/node_modules/debug/node_modules/ms/index.js b/node_modules/send/node_modules/debug/node_modules/ms/index.js new file mode 100644 index 0000000..4f92771 --- /dev/null +++ b/node_modules/send/node_modules/debug/node_modules/ms/index.js @@ -0,0 +1,125 @@ +/** + * Helpers. + */ + +var s = 1000; +var m = s * 60; +var h = m * 60; +var d = h * 24; +var y = d * 365.25; + +/** + * Parse or format the given `val`. + * + * Options: + * + * - `long` verbose formatting [false] + * + * @param {String|Number} val + * @param {Object} options + * @return {String|Number} + * @api public + */ + +module.exports = function(val, options){ + options = options || {}; + if ('string' == typeof val) return parse(val); + return options.long + ? long(val) + : short(val); +}; + +/** + * Parse the given `str` and return milliseconds. + * + * @param {String} str + * @return {Number} + * @api private + */ + +function parse(str) { + str = '' + str; + if (str.length > 10000) return; + var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str); + if (!match) return; + var n = parseFloat(match[1]); + var type = (match[2] || 'ms').toLowerCase(); + switch (type) { + case 'years': + case 'year': + case 'yrs': + case 'yr': + case 'y': + return n * y; + case 'days': + case 'day': + case 'd': + return n * d; + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h; + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m; + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s; + case 'milliseconds': + case 'millisecond': + case 'msecs': + case 'msec': + case 'ms': + return n; + } +} + +/** + * Short format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function short(ms) { + if (ms >= d) return Math.round(ms / d) + 'd'; + if (ms >= h) return Math.round(ms / h) + 'h'; + if (ms >= m) return Math.round(ms / m) + 'm'; + if (ms >= s) return Math.round(ms / s) + 's'; + return ms + 'ms'; +} + +/** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function long(ms) { + return plural(ms, d, 'day') + || plural(ms, h, 'hour') + || plural(ms, m, 'minute') + || plural(ms, s, 'second') + || ms + ' ms'; +} + +/** + * Pluralization helper. + */ + +function plural(ms, n, name) { + if (ms < n) return; + if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name; + return Math.ceil(ms / n) + ' ' + name + 's'; +} diff --git a/node_modules/send/node_modules/debug/node_modules/ms/package.json b/node_modules/send/node_modules/debug/node_modules/ms/package.json new file mode 100644 index 0000000..e3b3577 --- /dev/null +++ b/node_modules/send/node_modules/debug/node_modules/ms/package.json @@ -0,0 +1,82 @@ +{ + "_args": [ + [ + { + "raw": "ms@0.7.1", + "scope": null, + "escapedName": "ms", + "name": "ms", + "rawSpec": "0.7.1", + "spec": "0.7.1", + "type": "version" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/send/node_modules/debug" + ] + ], + "_from": "ms@0.7.1", + "_id": "ms@0.7.1", + "_inCache": true, + "_location": "/send/debug/ms", + "_nodeVersion": "0.12.2", + "_npmUser": { + "name": "rauchg", + "email": "rauchg@gmail.com" + }, + "_npmVersion": "2.7.5", + "_phantomChildren": {}, + "_requested": { + "raw": "ms@0.7.1", + "scope": null, + "escapedName": "ms", + "name": "ms", + "rawSpec": "0.7.1", + "spec": "0.7.1", + "type": "version" + }, + "_requiredBy": [ + "/send/debug" + ], + "_resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "_shasum": "9cd13c03adbff25b65effde7ce864ee952017098", + "_shrinkwrap": null, + "_spec": "ms@0.7.1", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/send/node_modules/debug", + "bugs": { + "url": "https://github.com/guille/ms.js/issues" + }, + "component": { + "scripts": { + "ms/index.js": "index.js" + } + }, + "dependencies": {}, + "description": "Tiny ms conversion utility", + "devDependencies": { + "expect.js": "*", + "mocha": "*", + "serve": "*" + }, + "directories": {}, + "dist": { + "shasum": "9cd13c03adbff25b65effde7ce864ee952017098", + "tarball": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz" + }, + "gitHead": "713dcf26d9e6fd9dbc95affe7eff9783b7f1b909", + "homepage": "https://github.com/guille/ms.js", + "main": "./index", + "maintainers": [ + { + "name": "rauchg", + "email": "rauchg@gmail.com" + } + ], + "name": "ms", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/guille/ms.js.git" + }, + "scripts": {}, + "version": "0.7.1" +} diff --git a/node_modules/send/node_modules/debug/package.json b/node_modules/send/node_modules/debug/package.json new file mode 100644 index 0000000..dea007a --- /dev/null +++ b/node_modules/send/node_modules/debug/package.json @@ -0,0 +1,106 @@ +{ + "_args": [ + [ + { + "raw": "debug@~2.2.0", + "scope": null, + "escapedName": "debug", + "name": "debug", + "rawSpec": "~2.2.0", + "spec": ">=2.2.0 <2.3.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/send" + ] + ], + "_from": "debug@>=2.2.0 <2.3.0", + "_id": "debug@2.2.0", + "_inCache": true, + "_location": "/send/debug", + "_nodeVersion": "0.12.2", + "_npmUser": { + "name": "tootallnate", + "email": "nathan@tootallnate.net" + }, + "_npmVersion": "2.7.4", + "_phantomChildren": {}, + "_requested": { + "raw": "debug@~2.2.0", + "scope": null, + "escapedName": "debug", + "name": "debug", + "rawSpec": "~2.2.0", + "spec": ">=2.2.0 <2.3.0", + "type": "range" + }, + "_requiredBy": [ + "/send" + ], + "_resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "_shasum": "f87057e995b1a1f6ae6a4960664137bc56f039da", + "_shrinkwrap": null, + "_spec": "debug@~2.2.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/send", + "author": { + "name": "TJ Holowaychuk", + "email": "tj@vision-media.ca" + }, + "browser": "./browser.js", + "bugs": { + "url": "https://github.com/visionmedia/debug/issues" + }, + "component": { + "scripts": { + "debug/index.js": "browser.js", + "debug/debug.js": "debug.js" + } + }, + "contributors": [ + { + "name": "Nathan Rajlich", + "email": "nathan@tootallnate.net", + "url": "http://n8.io" + } + ], + "dependencies": { + "ms": "0.7.1" + }, + "description": "small debugging utility", + "devDependencies": { + "browserify": "9.0.3", + "mocha": "*" + }, + "directories": {}, + "dist": { + "shasum": "f87057e995b1a1f6ae6a4960664137bc56f039da", + "tarball": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz" + }, + "gitHead": "b38458422b5aa8aa6d286b10dfe427e8a67e2b35", + "homepage": "https://github.com/visionmedia/debug", + "keywords": [ + "debug", + "log", + "debugger" + ], + "license": "MIT", + "main": "./node.js", + "maintainers": [ + { + "name": "tjholowaychuk", + "email": "tj@vision-media.ca" + }, + { + "name": "tootallnate", + "email": "nathan@tootallnate.net" + } + ], + "name": "debug", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/visionmedia/debug.git" + }, + "scripts": {}, + "version": "2.2.0" +} diff --git a/node_modules/send/package.json b/node_modules/send/package.json new file mode 100644 index 0000000..3e16031 --- /dev/null +++ b/node_modules/send/package.json @@ -0,0 +1,130 @@ +{ + "_args": [ + [ + { + "raw": "send@0.14.2", + "scope": null, + "escapedName": "send", + "name": "send", + "rawSpec": "0.14.2", + "spec": "0.14.2", + "type": "version" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/express" + ] + ], + "_from": "send@0.14.2", + "_id": "send@0.14.2", + "_inCache": true, + "_location": "/send", + "_nodeVersion": "4.6.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/send-0.14.2.tgz_1485185381110_0.5022726391907781" + }, + "_npmUser": { + "name": "dougwilson", + "email": "doug@somethingdoug.com" + }, + "_npmVersion": "2.15.9", + "_phantomChildren": {}, + "_requested": { + "raw": "send@0.14.2", + "scope": null, + "escapedName": "send", + "name": "send", + "rawSpec": "0.14.2", + "spec": "0.14.2", + "type": "version" + }, + "_requiredBy": [ + "/express", + "/serve-static" + ], + "_resolved": "https://registry.npmjs.org/send/-/send-0.14.2.tgz", + "_shasum": "39b0438b3f510be5dc6f667a11f71689368cdeef", + "_shrinkwrap": null, + "_spec": "send@0.14.2", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/express", + "author": { + "name": "TJ Holowaychuk", + "email": "tj@vision-media.ca" + }, + "bugs": { + "url": "https://github.com/pillarjs/send/issues" + }, + "contributors": [ + { + "name": "Douglas Christopher Wilson", + "email": "doug@somethingdoug.com" + } + ], + "dependencies": { + "debug": "~2.2.0", + "depd": "~1.1.0", + "destroy": "~1.0.4", + "encodeurl": "~1.0.1", + "escape-html": "~1.0.3", + "etag": "~1.7.0", + "fresh": "0.3.0", + "http-errors": "~1.5.1", + "mime": "1.3.4", + "ms": "0.7.2", + "on-finished": "~2.3.0", + "range-parser": "~1.2.0", + "statuses": "~1.3.1" + }, + "description": "Better streaming static file server with Range and conditional-GET support", + "devDependencies": { + "after": "0.8.2", + "eslint": "2.11.1", + "eslint-config-standard": "5.3.1", + "eslint-plugin-promise": "1.3.1", + "eslint-plugin-standard": "1.3.2", + "istanbul": "0.4.5", + "mocha": "2.5.3", + "supertest": "1.1.0" + }, + "directories": {}, + "dist": { + "shasum": "39b0438b3f510be5dc6f667a11f71689368cdeef", + "tarball": "https://registry.npmjs.org/send/-/send-0.14.2.tgz" + }, + "engines": { + "node": ">= 0.8.0" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "README.md", + "index.js" + ], + "gitHead": "f3397bc0170fb9f2d84c45e81981dff6e58e102d", + "homepage": "https://github.com/pillarjs/send#readme", + "keywords": [ + "static", + "file", + "server" + ], + "license": "MIT", + "maintainers": [ + { + "name": "dougwilson", + "email": "doug@somethingdoug.com" + } + ], + "name": "send", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/pillarjs/send.git" + }, + "scripts": { + "lint": "eslint .", + "test": "mocha --check-leaks --reporter spec --bail", + "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --check-leaks --reporter spec", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --check-leaks --reporter dot" + }, + "version": "0.14.2" +} diff --git a/node_modules/sequelize-cli/.editorconfig b/node_modules/sequelize-cli/.editorconfig new file mode 100644 index 0000000..d2cc085 --- /dev/null +++ b/node_modules/sequelize-cli/.editorconfig @@ -0,0 +1,21 @@ +# EditorConfig helps developers define and maintain consistent +# coding styles between different editors and IDEs +# editorconfig.org + +root = true + +[*] + +# Change these settings to your own preference +indent_style = space +indent_size = 2 + +# We recommend you to keep these unchanged +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false +indent_size = 4 diff --git a/node_modules/sequelize-cli/.jscsrc b/node_modules/sequelize-cli/.jscsrc new file mode 100644 index 0000000..3e0e14f --- /dev/null +++ b/node_modules/sequelize-cli/.jscsrc @@ -0,0 +1,57 @@ +{ + "disallowEmptyBlocks": true, + "disallowKeywordsOnNewLine": ["else"], + "disallowKeywords": ["with"], + "disallowMixedSpacesAndTabs": true, + "disallowMultipleLineBreaks": true, + "disallowMultipleLineStrings": true, + "disallowMultipleVarDecl": "exceptUndefined", + "disallowNewlineBeforeBlockStatements": true, + "disallowPaddingNewlinesInBlocks": true, + "disallowSpaceAfterObjectKeys": true, + "disallowSpaceAfterPrefixUnaryOperators": true, + "disallowSpaceBeforePostfixUnaryOperators": true, + "disallowSpacesInCallExpression": true, + "disallowTrailingComma": true, + "disallowTrailingWhitespace": true, + "disallowYodaConditions": true, + "maximumLineLength": 100, + "requireBlocksOnNewline": true, + "requireCapitalizedConstructors": true, + "requireCurlyBraces": ["if", "else", "for", "while", "do", "try", "catch"], + "requireLineFeedAtFileEnd": true, + "requirePaddingNewlinesBeforeKeywords": [ + "do","for","if","switch","try","while","with" + ], + "requireParenthesesAroundIIFE": true, + "requireSpaceAfterBinaryOperators": true, + "requireSpaceAfterKeywords": true, + "requireSpaceAfterLineComment": true, + "requireSpaceBeforeBinaryOperators": true, + "requireSpaceBeforeBlockStatements": true, + "requireSpaceBeforeKeywords": [ + "else", "while", "catch" + ], + "requireSpaceBetweenArguments": true, + "requireSpaceBeforeObjectValues": true, + "requireSpacesInConditionalExpression": { + "afterTest": true, + "beforeConsequent": true, + "afterConsequent": true, + "beforeAlternate": true + }, + "requireSpacesInFunctionDeclaration": { + "beforeOpeningRoundBrace": true, + "beforeOpeningCurlyBrace": true + }, + "requireSpacesInFunctionExpression": { + "beforeOpeningRoundBrace": true, + "beforeOpeningCurlyBrace": true + }, + "validateIndentation": 2, + "validateLineBreaks": "LF", + "validateParameterSeparator": ", ", + "validateQuoteMarks": "'", + "requireSemicolons": true, + "requirePaddingNewLineAfterVariableDeclaration": true +} diff --git a/node_modules/sequelize-cli/.jshintrc b/node_modules/sequelize-cli/.jshintrc new file mode 100644 index 0000000..650fdb3 --- /dev/null +++ b/node_modules/sequelize-cli/.jshintrc @@ -0,0 +1,19 @@ +{ + "node": true, + "quotmark": "single", + "curly": true, + "eqeqeq": true, + "forin": true, + "indent": 2, + "immed": true, + "latedef": "nofunc", + "newcap": true, + "noempty": true, + "nonbsp": true, + "unused": true, + "strict": true, + "maxdepth": 3, + "maxlen": 100, + "nomen": true, + "trailing": true +} diff --git a/node_modules/sequelize-cli/.mention-bot b/node_modules/sequelize-cli/.mention-bot new file mode 100644 index 0000000..cf152b3 --- /dev/null +++ b/node_modules/sequelize-cli/.mention-bot @@ -0,0 +1,4 @@ +{ + "userBlacklist": ["sdepold"], + "userBlacklistForPR": ["greenkeeperio-bot"] +} diff --git a/node_modules/sequelize-cli/.npmignore b/node_modules/sequelize-cli/.npmignore new file mode 100644 index 0000000..e7a45c2 --- /dev/null +++ b/node_modules/sequelize-cli/.npmignore @@ -0,0 +1,30 @@ +# Logs +logs +*.log + +# Runtime data +pids +*.pid +*.seed + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Vagrant intermediate storage +var/vagrant/.vagrant + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directory +# Deployed apps should consider commenting this line out: +# see https://npmjs.org/doc/faq.html#Should-I-check-my-node_modules-folder-into-git +node_modules + +test/support/tmp diff --git a/node_modules/sequelize-cli/.travis.yml b/node_modules/sequelize-cli/.travis.yml new file mode 100644 index 0000000..9d62508 --- /dev/null +++ b/node_modules/sequelize-cli/.travis.yml @@ -0,0 +1,27 @@ +before_script: + - "mysql -e 'create database sequelize_test;'" + - "psql -c 'create database sequelize_test;' -U postgres" + - npm install js2coffee@$(echo $JS2COFFEE) + - npm install sequelize@$(echo $SEQUELIZE) + +script: + - travis_retry node_modules/.bin/gulp + +env: + - JS2COFFEE=2.0.0 DIALECT=mysql SEQUELIZE=3.30.2 + - JS2COFFEE=2.0.0 DIALECT=postgres SEQUELIZE=4.0.0-2 + +language: node_js + +node_js: + - "4.0" + - "6.0" + +sudo: false + +addons: + postgresql: "9.4" + +cache: + directories: + - node_modules diff --git a/node_modules/sequelize-cli/CHANGELOG.md b/node_modules/sequelize-cli/CHANGELOG.md new file mode 100644 index 0000000..ff2a2fb --- /dev/null +++ b/node_modules/sequelize-cli/CHANGELOG.md @@ -0,0 +1,280 @@ +# Change Log +All notable changes to this project will be documented in this file. + +## Upcoming + +## v2.7.0 - 2017-03-25 +### Added +- Named db:migrate:undo [#387](https://github.com/sequelize/cli/pull/387) + +### Changed +- Fixed promise warning in gulp-helper [#439](https://github.com/sequelize/cli/issues/439) + +## v2.6.0 - 2017-03-17 +### Added +- Async configuration support [#359](https://github.com/sequelize/cli/pull/359) + +### Changed +- Print error stack when reporting seeder errors [#411](https://github.com/sequelize/cli/pull/411) +- Fixed seed:undo:all with `none` storage [#433](https://github.com/sequelize/cli/pull/433) +- Updated dependencies + +## v2.5.0 - 2016-12-07 +### Added +- Add underscored option to generated model when created with --underscored [#380](https://github.com/sequelize/cli/issues/380) +- Add db:migrate:status [#385](https://github.com/sequelize/cli/issues/385) + +### Changed +- Make it possible to use ":" in passwords in a DSN [#334](https://github.com/sequelize/cli/issues/334) +- Catch error for db:migrate:undo[:all] [#353](https://github.com/sequelize/cli/issues/353) +- Example usage of raw sql in migration [#363](https://github.com/sequelize/cli/issues/363) +- Fixed typo: containts -> contains [#381](https://github.com/sequelize/cli/issues/381) +- Updated dependencies + +## v2.4.0 - 2016-04-25 +### Added +- Log filtering helper + +### Changed +- Fixed some promises that were not being returned +- Updated dependencies +- Migration and seed filenames now use UTC date instead of local date +- Output filtering + +## v2.3.1 - 2016-01-14 +### Changed +- Update lodash to 4.0.0 + +## v2.3.0 - 2016-01-11 +### Changed +- Default use of `seeder` memorizes nothing +- Update umzug to 1.8.0 + +## v2.2.1 - 2015-11-24 +### Fixed +- Filtering of js files in models/index.js + +## v2.2.0 - 2015-11-23 +### Changed +- Respect `url` property in configuration + +## v2.1.1 - 2015-11-19 +### Changed +- Respect `dialectOptions` property when instantiating sequelize + +## v2.1.0 - 2015-11-01 +### Added +- Option for usage of snake case timestamp columns in migrations (e.g. `sequelize model:create --underscored`) + +## v2.0.0 - 2015-10-14 +### Added +- Read configuration from config.js if available + +### Changed +- Replace deprecated fs.existsSync method + +## v1.9.2 - 2015-10-14 +### Changed +- Make options path process relative + +## v1.9.1 - 2015-09-08 +### Changed +- Move gulp path resolution to function +- Fix handling of duplicate CLI options +- Add options object to seed template + +## v1.9.0 - 2015-09-01 +### Added +- Seeding mechanism + +## v1.8.3 - 2015-08-28 +### Changed +- Cascade package resolution + +### Removed +- Duplicate reference to gulp + +## v1.8.2 - 2015-08-27 +### Changed +- Use node's native module resolution mechanism + +## v1.8.1 - 2015-08-27 +### Changed +- Filter password from parsed URL + +## v1.8.0 - 2015-08-27 +### Added +- Support for env variable usage in model/index.js + +## v1.7.4 - 2015-07-28 +### Changed +- Return exit code 1 when migrations failed + +## v1.7.3 - 2015-07-26 +### Changed +- Fix check of associate method + +## v1.7.2 - 2015-07-16 +### Added +- Sequelize v3 to build matrix + +### Changed +- Compatibility with Sequelize v3 + +## v1.7.1 - 2015-07-09 +### Added +- Documentation about env variable +- Test for use*env*variable + +### Changed +- Fix env variable use for sqlite +- Update available tasks + +## v1.7.0 - 2015-04-19 +### Added +- More gulp tasks + +### Changed +- Generate new migration style +- Adopt new JSHint/JSCS rules +- Update JSHint and JSCS rules + +## v1.6.0 - 2015-04-02 +### Added +- Possibility to use a different table name for the meta data + +## v1.5.0 - 2015-03-24 +### Added +- `sequelize db:migrate:undo:all` that rolls back all migrations. + +## v1.4.0 - 2015-03-13 +### Added +- Possibility to log executed migrations to a JSON file + +## v1.3.2 - 2015-03-13 +### Changed +- Fix gulp resolution for Windows + +## 1.3.1 +### Changed +- Update umzug to 1.6.0 + +## 1.3.0 +### Changed +- Add builds for different sequelize versions +- Fix raw queries in sequelize 2.0 + +## 1.2.0 +### Changed +- Add logging of statements and improve messages + +## 1.1.0 +### Changed +- Update dependencies + +## 1.0.8 +### Changed +- Fix usage of js2coffee 2.0 + +## 1.0.7 +### Changed +- Fix regexp application for non migration files. + +## 1.0.6 +### Changed +- Add support for more fine-granular harmony flags + +## 1.0.5 +### Changed +- Added support for auto-migrate from old schema [#82](https://github.com/sequelize/cli/issues/82) + +## 1.0.4 +### Changed +- Fix output filtering +- Fix EventEmitter deprecation warnings. + +## 1.0.3 +### Changed +- Use the url module to parse database URLs + +## 1.0.1 +### Changed +- Fix global installation of the CLI + +## 1.0.0 +### Changed +- Big migration refactoring which uses a new schema table and the umzug lib. + +## 0.3.3 +### Changed +- Fix for default attributes in generated migrations. +- Auto-generate coffee files with js2coffee. + +## 0.3.2 +### Changed +- Add default attributes to generated migrations. + +## 0.3.1 +### Changed +- Fix alignment of comment in generated model file +- Fix global installation + +## 0.3.0 +### Changed +- Add Node.JS version to the teaser +- Add dialect and the respective version to the teaser + +## 0.2.6 +### Changed +- Do not load lodash in `models/index.js`. + +## 0.2.5 +### Changed +- Prefer `--env` over the environment variable `NODE_ENV`. +- Search by default for a file called `.sequelizerc` and treat it as `--options-path`. + +## 0.2.4 +### Changed +- Fix unqualified sequelize instantiation which enforced the mysql module. + +## 0.2.3 +### Changed +- Fix `--migrations-path` for relative paths. + +## 0.2.2 +### Changed +- Fix for MS Windows. + +## 0.2.1 +### Changed +- Fix `_.includes`. + +## 0.2.0 +### Changed +- `sequelize model:create` creates a model and its respective migration file. + +## 0.1.1 +### Changed +- Fix illegal character. + +## 0.1.0 +### Changed +- `sequelize init` now creates a `models` folder and a `models/index.js` file. [#11](https://github.com/sequelize/cli/pull/11) + +## 0.0.4 +### Changed +- Fix --config flag. [#4](https://github.com/sequelize/cli/pull/4) +- Fix custom logging option. [#3](https://github.com/sequelize/cli/pull/3) + +## 0.0.3 +### Changed +- Fix conflict within projects that are already shipping gulp. [#2](https://github.com/sequelize/cli/pull/2) +- Add harmony support. [#6](https://github.com/sequelize/cli/pull/6) + +## 0.0.2 +### Changed +- Added the binary to the package.json + +## 0.0.1 +### Changed +- First working version diff --git a/node_modules/sequelize-cli/LICENSE b/node_modules/sequelize-cli/LICENSE new file mode 100644 index 0000000..0afb6c5 --- /dev/null +++ b/node_modules/sequelize-cli/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017 sequelize + +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. diff --git a/node_modules/sequelize-cli/README.md b/node_modules/sequelize-cli/README.md new file mode 100644 index 0000000..3de0046 --- /dev/null +++ b/node_modules/sequelize-cli/README.md @@ -0,0 +1,309 @@ +# sequelize/cli [![Build Status](https://travis-ci.org/sequelize/cli.svg?branch=master)](https://travis-ci.org/sequelize/cli) [![Code Climate](https://codeclimate.com/github/sequelize/cli.png)](https://codeclimate.com/github/sequelize/cli) + +The Sequelize Command Line Interface (CLI) + +## Installation + +Install this globally and you'll have access to the `sequelize` command anywhere on your system. + +``` +npm install -g sequelize-cli +``` + +or install it locally to your `node_modules` folder + +```bash +npm install --save sequelize-cli +``` +## Global Install Usage + +``` +$ sequelize [--HARMONY-FLAGS] +``` + + +``` +Sequelize [Node: 2.5.0, CLI: 1.8.3, ORM: 2.1.3] + +Usage + sequelize [task] + +Available tasks + db:migrate Run pending migrations. + db:migrate:old_schema Update legacy migration table + db:migrate:undo Revert the last migration run. + db:migrate:undo:all Revert all migrations ran. + db:seed Run seeders. + db:seed:undo Deletes data from the database. + db:seed:undo:all Deletes data from the database. + help Display this help text. Aliases: h + init Initializes the project. + init:config Initializes the configuration. + init:migrations Initializes the migrations. + init:models Initializes the models. + init:seeders Initializes the seeders. + migration:create Generates a new migration file. Aliases: migration:generate + model:create Generates a model and its migration. Aliases: model:generate + seed:create Generates a new seed file. Aliases: seed:generate + version Prints the version number. Aliases: v + +Available manuals + help:db:migrate The documentation for "sequelize db:migrate". + help:db:migrate:old_schema The documentation for "sequelize db:migrate:old_schema". + help:db:migrate:undo The documentation for "sequelize db:migrate:undo". + help:db:migrate:undo:all The documentation for "sequelize db:migrate:undo:all". + help:db:seed The documentation for "sequelize db:seed". + help:db:seed:undo The documentation for "sequelize db:seed:undo". + help:db:seed:undo:all The documentation for "sequelize db:seed:undo:all". + help:init The documentation for "sequelize init". + help:init:config The documentation for "sequelize init:config". + help:init:migrations The documentation for "sequelize init:migrations". + help:init:models The documentation for "sequelize init:models". + help:init:seeders The documentation for "sequelize init:seeders". + help:migration:create The documentation for "sequelize migration:create". + help:model:create The documentation for "sequelize model:create". + help:seed:create The documentation for "sequelize seed:create". + help:version The documentation for "sequelize version". +``` + +## Local Install Usage + +``` +$ node_modules/.bin/sequelize [--HARMONY-FLAGS] +``` + +## Options + +The manuals will show all the flags and options which are available for the respective tasks. +If you find yourself in a situation where you always define certain flags in order to +make the CLI compliant to your project, you can move those definitions also into a file called +`.sequelizerc`. The file will get `require`d if available and can therefore be either a JSON file +or a Node.JS script that exports a hash. + +### Example for a Node.JS script + +```javascript +var path = require('path') + +module.exports = { + 'config': path.resolve('config', 'database.json'), + 'migrations-path': path.resolve('db', 'migrate') +} +``` + +This will configure the CLI to always treat `config/database.json` as config file and +`db/migrate` as the directory for migrations. + +### CoffeeScript support + +The CLI is compatible with CoffeeScript. You can tell the CLI to enable that support via the `--coffee` +flag. Please note that you'll need to install `js2coffee` and `coffee-script` for full support. + +### Configuration file + +By default the CLI will try to use the file `config/config.js` and `config/config.json`. You can modify that path either via the `--config` flag or via the option mentioned earlier. Here is how a configuration file might look like (this is the one that `sequelize init` generates): + +```json +{ + "development": { + "username": "root", + "password": null, + "database": "database_development", + "host": "127.0.0.1", + "dialect": "mysql" + }, + "test": { + "username": "root", + "password": null, + "database": "database_test", + "host": "127.0.0.1", + "dialect": "mysql" + }, + "production": { + "username": "root", + "password": null, + "database": "database_production", + "host": "127.0.0.1", + "dialect": "mysql" + } +} +``` + +The properties can also be combined to a `url`: + +```json +{ + "development": { + "url": "mysql://root:password@mysql_host.com/database_name", + "dialect": "mysql" + } +} +``` + +In case of a JS file it obviously needs to `module.exports` the object. +Optionally, it's possible to put all the configuration to the `url` option. The format is explained in the section below. + +### Configuration Connection String + +As an alternative to the `--config` option with configuration files defining your database, you can +use the `--url` option to pass in a connection string. For example: + +`sequelize db:migrate --url 'mysql://root:password@mysql_host.com/database_name'` + +### Configuration Connection Environment Variable + +Another possibility is to store the URL in an environment variable and to tell +the CLI to lookup a certain variable during runtime. Let's assume you have an +environment variable called `DB_CONNECTION_STRING` which stores the value +`mysql://root:password@mysql_host.com/database_name`. In order to make the CLI +use it, you have to use declare it in your config file: + +``` +{ + "production": { + "use_env_variable": "DB_CONNECTION_STRING" + } +} +``` + +With v2.0.0 of the CLI you can also just directly access the environment variables inside the `config/config.js`: + +``` +module.exports = { + "production": { + "hostname": process.env.DB_HOSTNAME + } +} +``` + +### Storage + +There are three types of storage that you can use: `sequelize`, `json`, and `none`. + +- `sequelize` : stores migrations and seeds in a table on the sequelize database +- `json` : stores migrations and seeds on a json file +- `none` : does not store any migration/seed + + +#### Migration + +By default the CLI will create a table in your database called `SequelizeMeta` containing an entry +for each executed migration. To change this behavior, there are three options you can add to the +configuration file. Using `migrationStorage`, you can choose the type of storage to be used for +migrations. If you choose `json`, you can specify the path of the file using `migrationStoragePath` +or the CLI will write to the file `sequelize-meta.json`. If you want to keep the information in the +database, using `sequelize`, but want to use a different table, you can change the table name using +`migrationStorageTableName`. + +```js +{ + "development": { + "username": "root", + "password": null, + "database": "database_development", + "host": "127.0.0.1", + "dialect": "mysql", + + // Use a different storage type. Default: sequelize + "migrationStorage": "json", + + // Use a different file name. Default: sequelize-meta.json + "migrationStoragePath": "sequelizeMeta.json" + + // Use a different table name. Default: SequelizeMeta + "migrationStorageTableName": "sequelize_meta" + } +} +``` + +NOTE: The `none` storage is not recommended as a migration storage. If you decide to use it, be +aware of the implications of having no record of what migrations did or didn't run. + + +#### Seed + +By default the CLI will not save any seed that is executed. If you choose to change this behavior (!), +you can use `seederStorage` in the configuration file to change the storage type. If you choose `json`, +you can specify the path of the file using `seederStoragePath` or the CLI will write to the file +`sequelize-data.json`. If you want to keep the information in the database, using `sequelize`, you can +specify the table name using `seederStorageTableName`, or it will default to `SequelizeData`. + +```js +{ + "development": { + "username": "root", + "password": null, + "database": "database_development", + "host": "127.0.0.1", + "dialect": "mysql", + // Use a different storage. Default: none + "seederStorage": "json", + // Use a different file name. Default: sequelize-data.json + "seederStoragePath": "sequelizeData.json" + // Use a different table name. Default: SequelizeData + "seederStorageTableName": "sequelize_data" + } +} +``` + + +### Dialect specific options + +In order to pass options to the underlying database connectors, you can add the property `dialectOptions` +to your configuration like this: + +``` +var fs = require('fs'); + +module.exports = { + development: { + dialect: 'mysql', + dialectOptions: { + ssl: { + ca: fs.readFileSync(__dirname + '/mysql-ca.crt') + } + } + } +}; +``` + +### Schema migration + +Since v1.0.0 the CLI supports a new schema for saving the executed migrations. It will tell you about that +when you run a migration while having the old schema. You can opt-in for auto migrating the schema by adding a special property to your config file: + +```json +{ + "development": { + "autoMigrateOldSchema": true + } +} +``` + +### The migration schema + +The CLI uses [umzug](https://github.com/sequelize/umzug) and its migration schema. This means a migration has to look like this: + +```javascript +"use strict"; + +module.exports = { + up: function(queryInterface, Sequelize, done) { + done(); + }, + + down: function(queryInterface) { + return new Promise(function (resolve, reject) { + resolve(); + }); + } +}; +``` + +Please note that you can either return a Promise or call the third argument of the function once your asynchronous logic was executed. If you pass something to the callback function (the `done` function) it will be treated as erroneous execution. + +Additional note: If you need to access the sequelize instance, you can easily do that via `queryInterface.sequelize`. For example `queryInterface.sequelize.query('CREATE TABLE mytable();')`. + +## Help + +Read the manuals via `sequelize help:` for further information. diff --git a/node_modules/sequelize-cli/bin/get-env-matrix b/node_modules/sequelize-cli/bin/get-env-matrix new file mode 100755 index 0000000..ea28259 --- /dev/null +++ b/node_modules/sequelize-cli/bin/get-env-matrix @@ -0,0 +1,51 @@ +#!/usr/bin/env node + +'use strict'; + +// this produces a 2d array of combinations +function combinations (array) { + if (!array.length) { + return []; + } + + // wrap non-array values + // e.g. ['x',['y','z']] becomes [['x'],['y','z']] + array = array.map(function (item) { + return item instanceof Array ? item : [item]; + }); + + // internal recursive function + function combine (list) { + var prefixes, combinations; + + if (list.length === 1) { + return list[0]; + } + + prefixes = list[0]; + combinations = combine(list.slice(1)); // recurse + + // produce a flat list of each of the current + // set of values prepended to each combination + // of the remaining sets. + return prefixes.reduce(function (memo, prefix) { + return memo.concat(combinations.map(function (combination) { + return [prefix].concat(combination); + })); + }, []); + } + + return combine(array); +} + +var coffeeVersions = ['0.3.5', '2.0.0']; +var dialects = ['mysql', 'sqlite']; +var sequelizeVersions = ['1.7.11', '2.1.3', '3.22.0']; + +console.log('env:'); +combinations([coffeeVersions, dialects, sequelizeVersions]).forEach(function (combination) { + console.log( + ' - JS2COFFEE=' + combination[0] + ' DIALECT=' + + combination[1] + ' SEQUELIZE=' + combination[2] + ); +}); diff --git a/node_modules/sequelize-cli/bin/sequelize b/node_modules/sequelize-cli/bin/sequelize new file mode 100755 index 0000000..ea75e67 --- /dev/null +++ b/node_modules/sequelize-cli/bin/sequelize @@ -0,0 +1,101 @@ +#!/usr/bin/env node + +'use strict'; + +var spawn = require('child_process').spawn; +var path = require('path'); +var args = process.argv.slice(2); +var yargs = require('yargs'); +var argv = yargs.argv; +var _ = require('lodash'); +var helpers = require(path.resolve(__dirname, '..', 'lib', 'helpers')); + +if ((args[0] === '-v') || (args[0] === '-V')) { + args = ['version']; +} + +// Let's load additional options from a file and add it to the gulp call +(function (optionsPath) { + var rcFile = path.resolve(process.cwd(), '.sequelizerc'); + + if (!optionsPath && helpers.path.existsSync(rcFile)) { + optionsPath = rcFile; + } + + if (optionsPath) { + optionsPath = path.resolve(process.cwd(), optionsPath); + + var options = require(optionsPath); + var optionsKeys = Object.keys(options); + + optionsKeys = optionsKeys.filter(function (optionKey) { + return !argv[optionKey]; + }); + + optionsKeys.forEach(function (optionKey) { + var value = options[optionKey]; + + if (optionKey.indexOf('--') !== 0) { + optionKey = '--' + optionKey; + } + + args = args.concat([optionKey, value]); + }); + } +})(yargs.argv.optionsPath); + +args = args.concat([ + '--gulpfile', path.resolve(__dirname, '..', 'lib', 'gulpfile.js'), + '--cwd', process.cwd() +]); + +args.unshift(findGulpCliPath()); + +// Add harmony support +[ '--harmony-scoping', '--harmony-modules', '--harmony-proxies', + '--harmony-generators', '--harmony-numeric-literals', '--harmony-strings', + '--harmony-arrays', '--harmony-arrow-functions', '--harmony' +].forEach(function (harmonyFlag) { + if (_.includes(args, harmonyFlag)) { + args = _.without(args, harmonyFlag); + args.unshift(harmonyFlag); + } +}); + +var call = spawn(process.argv[0], args); + +helpers.view.teaser(); + +call.stdout.on('data', function (data) { + var output = helpers.log.parse(data); + + if (!!output) { + console.log(output); + } +}); + +call.stderr.on('data', function (data) { + process.stderr.write(data); +}); + +call.on('exit', function (code) { + process.exit(code); +}); + +function findGulpCliPath () { + var gulp = path.resolve(__dirname, '..', 'node_modules', 'gulp', 'bin', 'gulp.js'); + + if (!helpers.path.existsSync(gulp)) { + gulp = path.resolve(process.cwd(), 'node_modules', 'gulp', 'bin', 'gulp.js'); + } + + if (!helpers.path.existsSync(gulp)) { + gulp = require.resolve('gulp').replace('index.js', 'bin/gulp.js'); + } + + if (!helpers.path.existsSync(gulp)) { + throw new Error('Unable to find the `gulp` binary'); + } + + return gulp; +} diff --git a/node_modules/sequelize-cli/gulpfile.js b/node_modules/sequelize-cli/gulpfile.js new file mode 100644 index 0000000..5ebc445 --- /dev/null +++ b/node_modules/sequelize-cli/gulpfile.js @@ -0,0 +1,53 @@ +'use strict'; + +var args = require('yargs').argv; +var gulp = require('gulp'); +var jscs = require('gulp-jscs'); +var jshint = require('gulp-jshint'); +var mocha = require('gulp-mocha'); +var path = require('path'); +var runSequence = require('run-sequence'); + +gulp.task('default', function (done) { + runSequence('lint', 'test', done); +}); + +gulp.task('test', function (done) { + runSequence('test-unit', 'test-integration', done); +}); + +gulp.task('lint', function (done) { + runSequence('lint-code', done); +}); + +gulp.task('lint-code', function () { + return gulp + .src([ + './gulpfile.js', + './index.js', + './bin/**/*', + './lib/**/*.js', + '!./lib/assets/**/*.js', + './test/**/*.js', + '!./test/support/tmp/**/*.js' + ]) + .pipe(jscs()) + .pipe(jshint()) + .pipe(jshint.reporter('default')) + .pipe(jshint.reporter('fail')); +}); + +gulp.task('test-unit', function () { + // TODO +}); + +gulp.task('test-integration', function () { + gulp + .src(path.resolve(__dirname, 'test', '**', '*.test.js'), { read: false }) + .pipe(mocha({ + reporter: 'spec', + ignoreLeaks: true, + timeout: 30000, + grep: args.grep + })); +}); diff --git a/node_modules/sequelize-cli/lib/assets/migrations/create-table.js b/node_modules/sequelize-cli/lib/assets/migrations/create-table.js new file mode 100644 index 0000000..112f202 --- /dev/null +++ b/node_modules/sequelize-cli/lib/assets/migrations/create-table.js @@ -0,0 +1,35 @@ +'use strict'; + +module.exports = { + up: function (queryInterface, Sequelize) { + return queryInterface + .createTable('<%= tableName %>', { + id: { + allowNull: false, + autoIncrement: true, + primaryKey: true, + type: Sequelize.INTEGER + }, + + <% _.each(attributes, function (dataType, fieldName) { %> + <%= fieldName %>: { + type: Sequelize.<%= dataType.toUpperCase() %> + }, + <% }) %> + + <%= createdAt %>: { + allowNull: false, + type: Sequelize.DATE + }, + + <%= updatedAt %>: { + allowNull: false, + type: Sequelize.DATE + } + }); + }, + + down: function (queryInterface, Sequelize) { + return queryInterface.dropTable('<%= tableName %>'); + } +}; diff --git a/node_modules/sequelize-cli/lib/assets/migrations/skeleton.js b/node_modules/sequelize-cli/lib/assets/migrations/skeleton.js new file mode 100644 index 0000000..f9b590d --- /dev/null +++ b/node_modules/sequelize-cli/lib/assets/migrations/skeleton.js @@ -0,0 +1,23 @@ +'use strict'; + +module.exports = { + up: function (queryInterface, Sequelize) { + /* + Add altering commands here. + Return a promise to correctly handle asynchronicity. + + Example: + return queryInterface.createTable('users', { id: Sequelize.INTEGER }); + */ + }, + + down: function (queryInterface, Sequelize) { + /* + Add reverting commands here. + Return a promise to correctly handle asynchronicity. + + Example: + return queryInterface.dropTable('users'); + */ + } +}; diff --git a/node_modules/sequelize-cli/lib/assets/models/index.js b/node_modules/sequelize-cli/lib/assets/models/index.js new file mode 100644 index 0000000..d604207 --- /dev/null +++ b/node_modules/sequelize-cli/lib/assets/models/index.js @@ -0,0 +1,36 @@ +'use strict'; + +var fs = require('fs'); +var path = require('path'); +var Sequelize = require('sequelize'); +var basename = path.basename(module.filename); +var env = process.env.NODE_ENV || 'development'; +var config = require(<%= configFile %>)[env]; +var db = {}; + +if (config.use_env_variable) { + var sequelize = new Sequelize(process.env[config.use_env_variable]); +} else { + var sequelize = new Sequelize(config.database, config.username, config.password, config); +} + +fs + .readdirSync(__dirname) + .filter(function(file) { + return (file.indexOf('.') !== 0) && (file !== basename) && (file.slice(-3) === '.js'); + }) + .forEach(function(file) { + var model = sequelize['import'](path.join(__dirname, file)); + db[model.name] = model; + }); + +Object.keys(db).forEach(function(modelName) { + if (db[modelName].associate) { + db[modelName].associate(db); + } +}); + +db.sequelize = sequelize; +db.Sequelize = Sequelize; + +module.exports = db; diff --git a/node_modules/sequelize-cli/lib/assets/models/model.js b/node_modules/sequelize-cli/lib/assets/models/model.js new file mode 100644 index 0000000..a9b4eee --- /dev/null +++ b/node_modules/sequelize-cli/lib/assets/models/model.js @@ -0,0 +1,19 @@ +'use strict'; + +module.exports = function(sequelize, DataTypes) { + var <%= name %> = sequelize.define('<%= name %>', { + <% Object.keys(attributes).forEach(function(fieldName, index) { %> + <%= fieldName %>: DataTypes.<%= attributes[fieldName].toUpperCase() %> + <%= (Object.keys(attributes).length - 1) > index ? ',' : '' %> + <% }) %> + }, { + <%= underscored ? 'underscored: true,' : '' %> + classMethods: { + associate: function(models) { + // associations can be defined here + } + } + }); + + return <%= name %>; +}; diff --git a/node_modules/sequelize-cli/lib/assets/seeders/skeleton.js b/node_modules/sequelize-cli/lib/assets/seeders/skeleton.js new file mode 100644 index 0000000..4033d4d --- /dev/null +++ b/node_modules/sequelize-cli/lib/assets/seeders/skeleton.js @@ -0,0 +1,26 @@ +'use strict'; + +module.exports = { + up: function (queryInterface, Sequelize) { + /* + Add altering commands here. + Return a promise to correctly handle asynchronicity. + + Example: + return queryInterface.bulkInsert('Person', [{ + name: 'John Doe', + isBetaMember: false + }], {}); + */ + }, + + down: function (queryInterface, Sequelize) { + /* + Add reverting commands here. + Return a promise to correctly handle asynchronicity. + + Example: + return queryInterface.bulkDelete('Person', null, {}); + */ + } +}; diff --git a/node_modules/sequelize-cli/lib/gulpfile.js b/node_modules/sequelize-cli/lib/gulpfile.js new file mode 100644 index 0000000..b795933 --- /dev/null +++ b/node_modules/sequelize-cli/lib/gulpfile.js @@ -0,0 +1,26 @@ +'use strict'; + +var gulp = require('gulp'); +var path = require('path'); +var fs = require('fs'); +var helpers = require(path.resolve(__dirname, 'helpers')); + +require('gulp-help')(gulp, { + aliases: ['h'], + afterPrintCallback: helpers.gulp.printManuals +}); + +fs + .readdirSync(path.resolve(__dirname, 'tasks')) + .filter(function (file) { + return (file.indexOf('.') !== 0); + }) + .map(function (file) { + return require(path.resolve(__dirname, 'tasks', file)); + }) + .forEach(function (tasks) { + Object.keys(tasks).forEach(function (taskName) { + helpers.gulp.addTask(gulp, taskName, tasks[taskName]); + helpers.gulp.addHelp(gulp, taskName, tasks[taskName]); + }); + }); diff --git a/node_modules/sequelize-cli/lib/helpers/asset-helper.js b/node_modules/sequelize-cli/lib/helpers/asset-helper.js new file mode 100644 index 0000000..4631402 --- /dev/null +++ b/node_modules/sequelize-cli/lib/helpers/asset-helper.js @@ -0,0 +1,28 @@ +'use strict'; + +var fs = require('fs-extra'); +var path = require('path'); + +module.exports = { + copy: function (from, to) { + fs.copySync(path.resolve(__dirname, '..', 'assets', from), to); + }, + + read: function (assetPath) { + return fs.readFileSync(path.resolve(__dirname, '..', 'assets', assetPath)).toString(); + }, + + write: function (targetPath, content) { + fs.writeFileSync(targetPath, content); + }, + + inject: function (filePath, token, content) { + var fileContent = fs.readFileSync(filePath).toString(); + + fs.writeFileSync(filePath, fileContent.replace(token, content)); + }, + + injectConfigFilePath: function (filePath, configPath) { + this.inject(filePath, '__CONFIG_FILE__', configPath); + } +}; diff --git a/node_modules/sequelize-cli/lib/helpers/config-helper.js b/node_modules/sequelize-cli/lib/helpers/config-helper.js new file mode 100644 index 0000000..031354e --- /dev/null +++ b/node_modules/sequelize-cli/lib/helpers/config-helper.js @@ -0,0 +1,215 @@ +'use strict'; + +var args = require('yargs').argv; +var Bluebird = require('bluebird'); +var path = require('path'); +var fs = require('fs'); +var helpers = require(__dirname); +var url = require('url'); +var _ = require('lodash'); + +var api = { + config: undefined, + rawConfig: undefined, + error: undefined, + init: function () { + return Bluebird.resolve() + .then(function () { + var config; + + if (args.url) { + config = api.parseDbUrl(args.url); + } else { + try { + config = require(api.getConfigFile()); + } catch (e) { + api.error = e; + } + } + return config; + }) + .then(function (config) { + if (typeof config === 'object' || config === undefined) { + return config; + } else if (config.length === 1) { + return Bluebird.promisify(config)(); + } else { + return config(); + } + }) + .then(function (config) { + api.rawConfig = config; + }) + .then(function () { + // Always return the full config api + return api; + }); + }, + getConfigFile: function () { + if (args.config) { + return path.resolve(process.cwd(), args.config); + } + + var defaultPath = path.resolve(process.cwd(), 'config', 'config.json'); + var alternativePath = defaultPath.replace('.json', '.js'); + + return helpers.path.existsSync(alternativePath) ? alternativePath : defaultPath; + }, + + relativeConfigFile: function () { + return path.relative(process.cwd(), api.getConfigFile()); + }, + + configFileExists: function () { + return helpers.path.existsSync(api.getConfigFile()); + }, + + getDefaultConfig: function () { + return JSON.stringify({ + development: { + username: 'root', + password: null, + database: 'database_development', + host: '127.0.0.1', + dialect: 'mysql' + }, + test: { + username: 'root', + password: null, + database: 'database_test', + host: '127.0.0.1', + dialect: 'mysql' + }, + production: { + username: 'root', + password: null, + database: 'database_production', + host: '127.0.0.1', + dialect: 'mysql' + } + }, undefined, 2) + '\n'; + }, + + writeDefaultConfig: function () { + var configPath = path.dirname(api.getConfigFile()); + + if (!helpers.path.existsSync(configPath)) { + fs.mkdirSync(configPath); + } + + fs.writeFileSync(api.getConfigFile(), api.getDefaultConfig()); + }, + + readConfig: function () { + if (!api.config) { + var env = helpers.generic.getEnvironment(); + + if (api.rawConfig === undefined) { + throw new Error( + 'Error reading "' + + api.relativeConfigFile() + + '". Error: ' + api.error + ); + } + + if (typeof api.rawConfig !== 'object') { + throw new Error( + 'Config must be an object or a promise for an object: ' + + api.relativeConfigFile() + ); + } + + if (args.url) { + console.log('Parsed url ' + api.filteredUrl(args.url, api.rawConfig)); + } else { + console.log('Loaded configuration file "' + api.relativeConfigFile() + '".'); + } + + if (api.rawConfig[env]) { + console.log('Using environment "' + env + '".'); + + // The Sequelize library needs a function passed in to its logging option + if (api.rawConfig.logging && !_.isFunction(api.rawConfig.logging)) { + api.rawConfig.logging = console.log; + } + + api.rawConfig = api.rawConfig[env]; + } + + // in case url is present - we overwrite the configuration + if (api.rawConfig.url) { + api.rawConfig = _.merge(api.rawConfig, api.parseDbUrl(api.rawConfig.url)); + } + + api.config = api.rawConfig; + } + return api.config; + }, + + filteredUrl: function (url, config) { + var regExp = new RegExp(':?' + (config.password || '') + '@'); + + return url.replace(regExp, ':*****@'); + }, + + supportsCoffee: function (options) { + var config = null; + + options = _.assign({ + ignoreConfig: true + }, options || {}); + + try { + config = api.readConfig(); + } catch (e) { + if (options.ignoreConfig) { + config = {}; + } else { + throw e; + } + } + + return args.coffee || config.coffee; + }, + + urlStringToConfigHash: function (urlString) { + try { + var urlParts = url.parse(urlString); + var result = { + database: urlParts.path.replace(/^\//, ''), + dialect: urlParts.protocol, + host: urlParts.hostname, + port: urlParts.port + }; + + if (urlParts.auth) { + result = _.assign(result, { + username: urlParts.auth.split(':')[0], + password: urlParts.auth.split(':')[1] + }); + } + + return result; + } catch (e) { + throw new Error('Error parsing url: ' + urlString); + } + }, + + parseDbUrl: function (urlString) { + var config = api.urlStringToConfigHash(urlString); + + config = _.assign(config, { + dialect: config.dialect.replace(/:$/, '') + }); + + if (config.dialect === 'sqlite') { + config = _.assign(config, { + storage: '/' + config.database + }); + } + + return config; + } +}; + +module.exports = api; diff --git a/node_modules/sequelize-cli/lib/helpers/generic-helper.js b/node_modules/sequelize-cli/lib/helpers/generic-helper.js new file mode 100644 index 0000000..38e5434 --- /dev/null +++ b/node_modules/sequelize-cli/lib/helpers/generic-helper.js @@ -0,0 +1,58 @@ +'use strict'; + +var fs = require('fs'); +var args = require('yargs').argv; +var path = require('path'); +var resolve = require('resolve').sync; + +module.exports = { + mkdirp: function (path, root) { + var dirs = path.split('/'); + var dir = dirs.shift(); + + root = (root || '') + dir + '/'; + + try { + fs.mkdirSync(root); + } catch (e) { + // dir wasn't made, something went wrong + if (!fs.statSync(root).isDirectory()) { + throw new Error(e); + } + } + + return !dirs.length || this.mkdirp(dirs.join('/'), root); + }, + + getEnvironment: function () { + return args.env || process.env.NODE_ENV || 'development'; + }, + + getSequelize: function (file) { + var sequelizePath; + var resolvePath = file ? path.join('sequelize', file) : 'sequelize'; + var resolveOptions = { basedir: process.cwd() }; + + try { + sequelizePath = require.resolve(resolvePath, resolveOptions); + } catch (e) { + } + + try { + sequelizePath = sequelizePath || resolve(resolvePath, resolveOptions); + } catch (e) { + console.error('Unable to resolve sequelize package in ' + process.cwd()); + process.exit(1); + } + + return require(sequelizePath); + }, + + execQuery: function (sequelize, sql, options) { + if (sequelize.query.length === 2) { + return sequelize.query(sql, options); + } else { + return sequelize.query(sql, null, options); + } + } +}; diff --git a/node_modules/sequelize-cli/lib/helpers/gulp-helper.js b/node_modules/sequelize-cli/lib/helpers/gulp-helper.js new file mode 100644 index 0000000..70fe3f6 --- /dev/null +++ b/node_modules/sequelize-cli/lib/helpers/gulp-helper.js @@ -0,0 +1,129 @@ +'use strict'; + +var helpers = require(__dirname); +var _ = require('lodash'); +var clc = require('cli-color'); + +var config = helpers.config.init(); + +module.exports = { + addTask: function (gulp, taskName, task) { + gulp.task( + taskName, + task.descriptions.short, + task.dependencies || [], + function () { + return config.then(function () { + return task.task(); + }); + }, { + aliases: task.aliases || [] + } + ); + }, + + addHelp: function (gulp, taskName, task) { + var self = this; + + gulp.task( + 'help:' + taskName, + false, + function () { + return config.then(function () { + Object.keys(task.descriptions).forEach(function (description) { + if (typeof task.descriptions[description] === 'function') { + task.descriptions[description] = task.descriptions[description](); + } + }); + helpers.view.log(clc.bold('COMMANDS')); + + var commands = [ taskName ].concat(task.aliases || []); + var commandMargin = Math.max.apply(null, commands.map(function (c) { + return c.length; + })); + + commands.forEach(function (command) { + var s = [ + 'sequelize', command + (new Array(commandMargin - command.length + 1).join(' ')), + '--', task.descriptions.short + ].join(' '); + + helpers.view.log(' ' + s); + }); + helpers.view.log(); + + helpers.view.log(clc.bold('DESCRIPTION')); + + (task.descriptions.long || [task.descriptions.short]).forEach(function (line) { + helpers.view.log(' ' + line); + }); + + (function (options) { + if (options) { + var margin = Math.max.apply(null, Object.keys(options).map(function (o) { + return o.length; + })); + + helpers.view.log(); + helpers.view.log(clc.bold('OPTIONS')); + + Object.keys(options).forEach(function (option) { + var args = [' ', option]; + + args.push(new Array(margin - option.length + 1).join(' ')); + args.push(options[option]); + + helpers.view.log.apply(helpers.view, args); + }); + } + })(_.assign(self.getGlobalOptions(), task.descriptions.options)); + + helpers.view.log(); + }); + } + ); + }, + + getGlobalOptions: function () { + return { + '--env': 'The environment to run the command in. ' + + clc.blueBright('Default: development'), + '--coffee': 'Enables coffee script support. ' + + clc.blueBright('Default: false'), + '--config': 'The path to the config file. ' + + clc.blueBright('Default: config/config.json'), + '--options-path': 'The path to a JSON file with additional options. ' + + clc.blueBright('Default: none'), + '--migrations-path': 'The path to the migrations folder. ' + + clc.blueBright('Default: migrations'), + '--seeders-path': 'The path to the seeders folder. ' + + clc.blueBright('Default: seeders'), + '--models-path': 'The path to the models folder.' + + clc.blueBright('Default: models'), + '--url': 'The database connection string to use. Alternative to using --config files. ' + + clc.blueBright('Default: none') + }; + }, + + printManuals: function (tasks) { + var manuals = Object.keys(tasks).filter(function (name) { + return name.indexOf('help:') === 0; + }).sort(); + var margin = manuals.reduce(function (m, taskName) { + return (m > taskName.length) ? m : taskName.length; + }, 0); + + console.log('Available manuals'); + + manuals.forEach(function (name) { + var args = [' ', name]; + + args.push(new Array(margin - name.length + 1).join(' ')); + args.push('The documentation for "sequelize ' + name.replace('help:', '') + '".'); + + console.log.apply(console, args); + }); + + console.log(); + } +}; diff --git a/node_modules/sequelize-cli/lib/helpers/index.js b/node_modules/sequelize-cli/lib/helpers/index.js new file mode 100644 index 0000000..8062245 --- /dev/null +++ b/node_modules/sequelize-cli/lib/helpers/index.js @@ -0,0 +1,15 @@ +'use strict'; + +var path = require('path'); +var fs = require('fs'); + +module.exports = {}; + +fs + .readdirSync(__dirname) + .filter(function (file) { + return (file.indexOf('.') !== 0) && (file.indexOf('index.js') === -1); + }) + .forEach(function (file) { + module.exports[file.replace('-helper.js', '')] = require(path.resolve(__dirname, file)); + }); diff --git a/node_modules/sequelize-cli/lib/helpers/init-helper.js b/node_modules/sequelize-cli/lib/helpers/init-helper.js new file mode 100644 index 0000000..9215100 --- /dev/null +++ b/node_modules/sequelize-cli/lib/helpers/init-helper.js @@ -0,0 +1,83 @@ +'use strict'; + +var helpers = require(__dirname); +var path = require('path'); +var fs = require('fs'); +var clc = require('cli-color'); + +module.exports = { + notifyAboutExistingFile: function (file) { + helpers.view.log( + 'The file ' + clc.blueBright(file) + ' already exists. Run ' + + '"sequelize init --force" to overwrite it.' + ); + }, + + createFolder: function (folderName, folder, force) { + if (force) { + console.log('Deleting the ' + folderName + ' folder. (--force)'); + + try { + fs.readdirSync(folder).forEach(function (filename) { + fs.unlinkSync(path.resolve(folder, filename)); + }); + } catch (e) { + console.log(e); + } + + try { + fs.rmdirSync(folder); + console.log('Successfully deleted the ' + folderName + ' folder.'); + } catch (e) { + console.log(e); + } + } + + try { + helpers.generic.mkdirp(folder); + console.log('Successfully created ' + folderName + ' folder at "' + folder + '".'); + } catch (e) { + console.log(e); + } + }, + + createMigrationsFolder: function (force) { + this.createFolder('migrations', helpers.path.getPath('migration'), force); + }, + + createSeedersFolder: function (force) { + this.createFolder('seeders', helpers.path.getPath('seeder'), force); + }, + + createModelsFolder: function (force) { + this.createFolder('models', helpers.path.getModelsPath(), force); + }, + + createModelsIndexFile: function (force) { + var modelsPath = helpers.path.getModelsPath(); + var indexPath = path.resolve( + modelsPath, + helpers.path.addFileExtension('index') + ); + + if (!helpers.path.existsSync(modelsPath)) { + helpers.view.log('Models folder not available.'); + } else if (helpers.path.existsSync(indexPath) && !force) { + this.notifyAboutExistingFile(indexPath); + } else { + var relativeConfigPath = path.relative( + helpers.path.getModelsPath(), + helpers.config.getConfigFile() + ); + + helpers.asset.write( + indexPath, + helpers.template.render('models/index.js', { + configFile: '__dirname + \'/' + relativeConfigPath + '\'' + }, { + beautify: false + }) + ); + } + } +}; diff --git a/node_modules/sequelize-cli/lib/helpers/log-helper.js b/node_modules/sequelize-cli/lib/helpers/log-helper.js new file mode 100644 index 0000000..02454aa --- /dev/null +++ b/node_modules/sequelize-cli/lib/helpers/log-helper.js @@ -0,0 +1,44 @@ +'use strict'; + +var _ = require('lodash'); + +module.exports = { + parse: function (buffer) { + var lines = buffer.toString().split('\n'); + var result = lines.map(mapLine); + + return _.compact(result).join('\n'); + } +}; + +function mapLine (line) { + return filters().reduce(function (filteredLine, filter) { + if (!!filteredLine) { + return filter(filteredLine); + } + }, line); +} + +function filters () { + return [ + function filterTimestamps (l) { + if (!l.match(/\[\d{2}:\d{2}:\d{2}\]/)) { + return l; + } + }, + + function filterGulpfile (l) { + if (!l.match(/^Using\sgulpfile/) && !l.match(/^Starting|Finished\s/)) { + return l; + } + }, + + function parseProgramName (l) { + if (!l.match(/gulp \[TASK\]/)) { + return l; + } else { + return l.replace('gulp [TASK]', 'sequelize [task]'); + } + } + ]; +} diff --git a/node_modules/sequelize-cli/lib/helpers/migration-helper.js b/node_modules/sequelize-cli/lib/helpers/migration-helper.js new file mode 100644 index 0000000..e013955 --- /dev/null +++ b/node_modules/sequelize-cli/lib/helpers/migration-helper.js @@ -0,0 +1,31 @@ +'use strict'; + +var _ = require('lodash'); +var helpers = require(__dirname); +var Sequelize = helpers.generic.getSequelize(); + +module.exports = { + getTableName: function (modelName) { + return Sequelize.Utils.pluralize(modelName); + }, + + generateTableCreationFileContent: function (args) { + return helpers.template.render('migrations/create-table.js', { + tableName: this.getTableName(args.name), + attributes: helpers.model.transformAttributes(args.attributes), + createdAt: args.underscored ? 'created_at' : 'createdAt', + updatedAt: args.underscored ? 'updated_at' : 'updatedAt' + }); + }, + + generateMigrationName: function (args) { + return _.trimStart(_.kebabCase('create-' + args.name), '-'); + }, + + generateTableCreationFile: function (args) { + var migrationName = this.generateMigrationName(args); + var migrationPath = helpers.path.getMigrationPath(migrationName); + + helpers.asset.write(migrationPath, this.generateTableCreationFileContent(args)); + } +}; diff --git a/node_modules/sequelize-cli/lib/helpers/model-helper.js b/node_modules/sequelize-cli/lib/helpers/model-helper.js new file mode 100644 index 0000000..334db72 --- /dev/null +++ b/node_modules/sequelize-cli/lib/helpers/model-helper.js @@ -0,0 +1,51 @@ +'use strict'; + +var clc = require('cli-color'); +var helpers = require(__dirname); + +module.exports = { + notifyAboutExistingFile: function (file) { + helpers.view.error( + 'The file ' + clc.blueBright(file) + ' already exists. ' + + 'Run "sequelize model:create --force" to overwrite it.' + ); + }, + + transformAttributes: function (flag) { + /* + possible flag formats: + - first_name:string,last_name:string,bio:text + - 'first_name:string last_name:string bio:text' + - 'first_name:string, last_name:string, bio:text' + */ + + var set = flag.replace(/,/g, ' ').split(/\s+/); + var result = {}; + + set.forEach(function (pair) { + var split = pair.split(':'); + + result[split[0]] = split[1]; + }); + + return result; + }, + + generateFileContent: function (args) { + return helpers.template.render('models/model.js', { + name: args.name, + attributes: this.transformAttributes(args.attributes), + underscored: args.underscored + }); + }, + + generateFile: function (args) { + var modelPath = helpers.path.getModelPath(args.name); + + helpers.asset.write(modelPath, this.generateFileContent(args)); + }, + + modelFileExists: function (filePath) { + return helpers.path.existsSync(filePath); + } +}; diff --git a/node_modules/sequelize-cli/lib/helpers/path-helper.js b/node_modules/sequelize-cli/lib/helpers/path-helper.js new file mode 100644 index 0000000..6a2597b --- /dev/null +++ b/node_modules/sequelize-cli/lib/helpers/path-helper.js @@ -0,0 +1,88 @@ +'use strict'; + +var helpers = require(__dirname); +var args = require('yargs').argv; +var fs = require('fs'); +var path = require('path'); +var moment = require('moment'); +var resolve = require('resolve').sync; + +module.exports = { + getPath: function (type) { + type = type + 's'; + + var result = args[type + 'Path'] || path.resolve(process.cwd(), type); + + if (path.normalize(result) !== path.resolve(result)) { + // the path is relative + result = path.resolve(process.cwd(), result); + } + + return result; + }, + + getFileName: function (type, name, options) { + return this.addFileExtension( + [ + moment().utc().format('YYYYMMDDHHmmss'), + !!name ? name : 'unnamed-' + type + ].join('-'), + options + ); + }, + + getFileExtension: function (options) { + return helpers.config.supportsCoffee(options) ? 'coffee' : 'js'; + }, + + addFileExtension: function (basename, options) { + return [basename, this.getFileExtension(options)].join('.'); + }, + + getMigrationPath: function (migrationName) { + return path.resolve(this.getPath('migration'), this.getFileName('migration', migrationName)); + }, + + getSeederPath: function (seederName) { + return path.resolve(this.getPath('seeder'), this.getFileName('seeder', seederName)); + }, + + getModelsPath: function () { + return args.modelsPath || path.resolve(process.cwd(), 'models'); + }, + + getModelPath: function (modelName) { + return path.resolve( + this.getModelsPath(), + this.addFileExtension(modelName.toLowerCase()) + ); + }, + + resolve: function (packageName) { + var result; + + try { + result = resolve(packageName, { basedir: process.cwd() }); + result = require(result); + } catch (e) { + try { + result = require(packageName); + } catch (e) {} + } + + return result; + }, + + existsSync: function (path) { + if (fs.accessSync) { + try { + fs.accessSync(path, fs.R_OK); + return true; + } catch (e) { + return false; + } + } else { + return fs.existsSync(path); + } + } +}; diff --git a/node_modules/sequelize-cli/lib/helpers/template-helper.js b/node_modules/sequelize-cli/lib/helpers/template-helper.js new file mode 100644 index 0000000..0139ac6 --- /dev/null +++ b/node_modules/sequelize-cli/lib/helpers/template-helper.js @@ -0,0 +1,36 @@ +'use strict'; + +var _ = require('lodash'); +var beautify = require('js-beautify'); +var helpers = require(__dirname); + +module.exports = { + getCoffeeConverter: function () { + return helpers.path.resolve('js2coffee') || (function () { + console.log('Unable to find \'js2coffee\'. Please add it to your project.'); + process.exit(1); + })(); + }, + + render: function (path, locals, options) { + options = _.assign({ + beautify: true, + indent_size: 2, + preserve_newlines: false + }, options || {}); + + var template = helpers.asset.read(path); + var content = _.template(template)(locals || {}); + + if (options.beautify) { + content = beautify(content, options); + } + + if (helpers.config.supportsCoffee()) { + content = this.getCoffeeConverter().build(content); + content = content.code || content; + } + + return content; + } +}; diff --git a/node_modules/sequelize-cli/lib/helpers/umzug-helper.js b/node_modules/sequelize-cli/lib/helpers/umzug-helper.js new file mode 100644 index 0000000..a66f3fe --- /dev/null +++ b/node_modules/sequelize-cli/lib/helpers/umzug-helper.js @@ -0,0 +1,52 @@ +'use strict'; + +var path = require('path'); +var _ = require('lodash'); +var helpers = require(__dirname); + +var storage = { + migration: 'sequelize', + seeder: 'none' +}; +var storageTableName = { + migration: 'SequelizeMeta', + seeder: 'SequelizeData' +}; +var storageJsonName = { + migration: 'sequelize-meta.json', + seeder: 'sequelize-data.json' +}; + +module.exports = { + getStorageOption: function (property, fallback) { + return helpers.config.readConfig()[property] || fallback; + }, + + getStorage: function (type) { + return this.getStorageOption(type + 'Storage', storage[type]); + }, + + getStoragePath: function (type) { + var fallbackPath = path.join(process.cwd(), storageJsonName[type]); + + return this.getStorageOption(type + 'StoragePath', fallbackPath); + }, + + getTableName: function (type) { + return this.getStorageOption(type + 'StorageTableName', storageTableName[type]); + }, + + getStorageOptions: function (type, extraOptions) { + var options = {}; + + if (this.getStorage(type) === 'json') { + options.path = this.getStoragePath(type); + } else if (this.getStorage(type) === 'sequelize') { + options.tableName = this.getTableName(type); + } + + _.assign(options, extraOptions); + + return options; + } +}; diff --git a/node_modules/sequelize-cli/lib/helpers/version-helper.js b/node_modules/sequelize-cli/lib/helpers/version-helper.js new file mode 100644 index 0000000..38a6339 --- /dev/null +++ b/node_modules/sequelize-cli/lib/helpers/version-helper.js @@ -0,0 +1,58 @@ +'use strict'; + +var path = require('path'); +var packageJson = require(path.resolve(__dirname, '..', '..', 'package.json')); +var helpers = require(__dirname); +var findup = require('findup-sync'); + +module.exports = { + getCliVersion: function () { + return packageJson.version; + }, + + getOrmVersion: function () { + return helpers.generic.getSequelize('package.json').version; + }, + + getDialect: function () { + try { + return helpers.config.readConfig(); + } catch (e) { + return null; + } + }, + + getDialectVersion: function () { + var adapterName = this.getDialectName(); + + try { + if (adapterName) { + return require( + findup('package.json') + ).dependencies[adapterName]; + } + } catch (e) { + } + + return null; + }, + + getDialectName: function () { + var config = this.getDialect(); + + if (config) { + return { + 'sqlite': 'sqlite3', + 'postgres': 'pg', + 'mariadb': 'mariasql', + 'mysql': 'mysql' + }[config.dialect]; + } else { + return null; + } + }, + + getNodeVersion: function () { + return process.version.replace('v', ''); + } +}; diff --git a/node_modules/sequelize-cli/lib/helpers/view-helper.js b/node_modules/sequelize-cli/lib/helpers/view-helper.js new file mode 100644 index 0000000..9332c7d --- /dev/null +++ b/node_modules/sequelize-cli/lib/helpers/view-helper.js @@ -0,0 +1,46 @@ +'use strict'; + +var helpers = require(__dirname); +var clc = require('cli-color'); +var _ = require('lodash'); + +module.exports = { + teaser: function () { + var versions = [ + 'Node: ' + helpers.version.getNodeVersion(), + 'CLI: ' + helpers.version.getCliVersion(), + 'ORM: ' + helpers.version.getOrmVersion() + ]; + + if (helpers.version.getDialectName() && helpers.version.getDialectVersion()) { + versions.push( + helpers.version.getDialectName() + + ': ' + + helpers.version.getDialectVersion() + ); + } + + this.log(); + this.log(clc.underline('Sequelize [' + versions.join(', ') + ']')); + this.log(); + }, + + log: console.log, + error: console.error, + + pad: function (s, smth) { + var margin = smth; + + if (_.isObject(margin)) { + margin = Object.keys(margin); + } + + if (Array.isArray(margin)) { + margin = Math.max.apply(null, margin.map(function (o) { + return o.length; + })); + } + + return s + new Array(margin - s.length + 1).join(' '); + } +}; diff --git a/node_modules/sequelize-cli/lib/tasks/db.js b/node_modules/sequelize-cli/lib/tasks/db.js new file mode 100644 index 0000000..bbccdd1 --- /dev/null +++ b/node_modules/sequelize-cli/lib/tasks/db.js @@ -0,0 +1,521 @@ +'use strict'; + +var Bluebird = require('bluebird'); +var fs = require('fs'); +var path = require('path'); +var url = require('url'); +var helpers = require(path.resolve(__dirname, '..', 'helpers')); +var args = require('yargs').string('seed').argv; +var _ = require('lodash'); +var Sequelize = helpers.generic.getSequelize(); +var Umzug = require('umzug'); +var clc = require('cli-color'); + +module.exports = { + 'db:migrate': { + descriptions: { + 'short': 'Run pending migrations.', + 'long': [ + 'The command runs every not yet executed migration.' + ] + }, + + task: function () { + return getMigrator('migration').then(function (migrator) { + return ensureCurrentMetaSchema(migrator).then(function () { + return migrator.pending(); + }).then(function (migrations) { + if (migrations.length === 0) { + console.log('No migrations were executed, database schema was already up to date.'); + process.exit(0); + } + }).then(function () { + return migrator.up(); + }).then(function () { + process.exit(0); + }).catch(function (err) { + console.error(err); + process.exit(1); + }); + }); + } + }, + + 'db:seed': { + descriptions: { + 'short': 'Run specified seeder.', + 'long': [ + 'The command runs every existing seed file.' + ], + options: { + '--seed': 'List of seed files to run.' + } + }, + + preChecks: [ + ensureSeeds + ], + + task: function () { + this.preChecks.forEach(function (preCheck) { + preCheck(); + }); + + return getMigrator('seeder').then(function (migrator) { + return migrator.up(args.seed) + .then(function () { + process.exit(0); + }) + .catch(function (err) { + console.error('Seed file failed with error:', err.message, err.stack); + process.exit(1); + }); + }); + } + }, + + 'db:seed:all': { + descriptions: { + 'short': 'Run every seeder.', + 'long': [ + 'The command runs every existing seed file in alphabetical order.' + ] + }, + + task: function () { + return getMigrator('seeder').then(function (migrator) { + return migrator.pending() + .then(function (seeders) { + if (seeders.length === 0) { + console.log('No seeders found.'); + process.exit(0); + } + + return migrator.up({migrations: _.chain(seeders).map('file').value()}); + }).then(function () { + process.exit(0); + }) + .catch(function (err) { + console.error('Seed file failed with error:', err.message, err.stack); + process.exit(1); + }); + }); + } + }, + + 'db:seed:undo:all': { + descriptions: { + 'short': 'Deletes data from the database.', + 'long': [ + 'The command tries unseeding every existing seed.' + ] + }, + + task: function () { + return getMigrator('seeder').then(function (migrator) { + return ( + helpers.umzug.getStorage('seeder') === 'none' ? migrator.pending() : migrator.executed() + ) + .then(function (seeders) { + if (seeders.length === 0) { + console.log('No seeders found.'); + process.exit(0); + } + + return migrator.down({migrations: _.chain(seeders).map('file').reverse().value()}); + }).then(function () { + process.exit(0); + }) + .catch(function (err) { + console.error('Seed file failed with error:', err.message, err.stack); + process.exit(1); + }); + }); + } + }, + + 'db:seed:undo': { + descriptions: { + 'short': 'Deletes data from the database.', + 'long': [ + 'The command unseeds every existing seed.' + ], + options: { + '--seed': 'List of seed files to unseed.' + } + }, + + preChecks: [ + ensureSeeds + ], + + task: function () { + this.preChecks.forEach(function (preCheck) { + preCheck(); + }); + + return getMigrator('seeder').then(function (migrator) { + return migrator.down({migrations: args.seed}) + .then(function () { + process.exit(0); + }) + .catch(function (err) { + console.error('Seed file failed with error:', err.message, err.stack); + process.exit(1); + }); + }); + } + }, + + 'db:migrate:status': { + descriptions: { + 'short': 'List the status of all migrations' + }, + + task: function () { + return getMigrator('migration').then(function (migrator) { + return ensureCurrentMetaSchema(migrator).then(function () { + return migrator.executed(); + }).then(function (migrations) { + _.forEach(migrations, function (migration) { + console.log('up ', migration.file); + }); + }).then(function () { + return migrator.pending(); + }).then(function (migrations) { + _.forEach(migrations, function (migration) { + console.log('down', migration.file); + }); + }).then(function () { + process.exit(0); + }).catch(function (err) { + console.error(err); + process.exit(1); + }); + }); + } + }, + + 'db:migrate:undo': { + descriptions: { + 'short': 'Reverts a migration.', + options: { + '--name': 'Name of the migration to undo.' + } + }, + + task: function () { + return getMigrator('migration').then(function (migrator) { + return ensureCurrentMetaSchema(migrator).then(function () { + return migrator.executed(); + }).then(function (migrations) { + if (migrations.length === 0) { + console.log('No executed migrations found.'); + process.exit(0); + } + }).then(function () { + if (args.name) { + return migrator.down(args.name); + } else { + return migrator.down(); + } + }).then(function () { + process.exit(0); + }).catch(function (err) { + console.error(err); + process.exit(1); + }); + }); + } + }, + + 'db:migrate:undo:all': { + descriptions: { + 'short': 'Revert all migrations ran.' + }, + + task: function () { + return getMigrator('migration').then(function (migrator) { + return ensureCurrentMetaSchema(migrator).then(function () { + return migrator.executed(); + }).then(function (migrations) { + if (migrations.length === 0) { + console.log('No executed migrations found.'); + process.exit(0); + } + }).then(function () { + return migrator.down({to: 0}); + }).then(function () { + process.exit(0); + }).catch(function (err) { + console.error(err); + process.exit(1); + }); + }); + } + }, + + 'db:migrate:old_schema': { + descriptions: { + 'short': 'Update legacy migration table', + 'long': [ + 'This command updates the legacy structure of the SequelizeMeta table to', + 'the newer version which is shipped with the migrator engine "umzug" and', + 'which is the required structure of the CLI since version 1.0.0.', + '', + 'In details this means, that the previous structure (id:int, from:string,', + 'to:string) gets migrated to the new structure (name:string). As the old', + 'structure does not actually contain all single migration names but only', + 'certain ranges, the script will take a look at the migrations folder and', + 'generate the single migration names accordingly.', + '', + 'Please note that the script will create a backup of your old table schema', + 'table by renaming the original table to SequelizeMetaBackup.' + ] + }, + + task: function () { + tryToMigrateFromOldSchema() + .then(function (items) { + if (items) { + console.log('Successfully migrated ' + items.length + ' migrations.'); + } + + process.exit(0); + }, function (err) { + console.log(err.name); + process.exit(1); + }); + } + } +}; + +function ensureCurrentMetaSchema (migrator) { + var sequelize = migrator.options.storageOptions.sequelize; + var columnName = migrator.options.storageOptions.columnName; + var config = helpers.config.readConfig(); + + return sequelize.getQueryInterface() + .showAllTables() + .then(function (tables) { + if (tables.indexOf('SequelizeMeta') === -1) { + return; + } + + return sequelize.queryInterface + .describeTable('SequelizeMeta') + .then(function (table) { + var columns = Object.keys(table); + + if ((columns.length === 1) && (columns[0] === columnName)) { + return; + } else { + if (!config.autoMigrateOldSchema) { + console.error( + 'Database schema was not migrated. Please run ' + + '"sequelize db:migrate:old_schema" first.' + ); + process.exit(1); + } + + return tryToMigrateFromOldSchema(); + } + }); + }); +} + +function logMigrator (s) { + if (s.indexOf('Executing') !== 0) { + helpers.view.log(s); + } +} + +function getSequelizeInstance () { + var config = null; + var options = {}; + + try { + config = helpers.config.readConfig(); + } catch (e) { + console.log(e.message); + process.exit(1); + } + + _.forEach(config, function (value, key) { + if (['database', 'username', 'password'].indexOf(key) === -1) { + options[key] = value; + } + + if (key === 'use_env_variable' && process.env[value]) { + var dbUrl = url.parse(process.env[value]); + var protocol = dbUrl.protocol.split(':')[0]; + + config.database = dbUrl.pathname.substring(1); + + if (protocol === 'sqlite') { + options.storage = dbUrl.pathname; + } else if (dbUrl.auth) { + var authParts = dbUrl.auth.split(':'); + + config.username = authParts[0]; + + if (authParts.length > 1) { + config.password = authParts.slice(1).join(':'); + } + } + + options = _.assign(options, { + host: dbUrl.hostname, + port: dbUrl.port, + dialect: protocol, + protocol: protocol + }); + } + + if (key === 'dialectOptions') { + options = _.assign(options, { + dialectOptions: value + }); + } + }); + + options = _.assign({ logging: logMigrator }, options); + + try { + return new Sequelize(config.database, config.username, config.password, options); + } catch (e) { + console.warn(e); + throw e; + } +} + +function getMigrator (type) { + if (helpers.config.configFileExists() || args.url) { + var sequelize = getSequelizeInstance(); + var migrator = new Umzug({ + storage: helpers.umzug.getStorage(type), + storageOptions: helpers.umzug.getStorageOptions(type, { sequelize: sequelize }), + logging: console.log, + migrations: { + params: [ sequelize.getQueryInterface(), Sequelize ], + path: helpers.path.getPath(type), + pattern: helpers.config.supportsCoffee() ? /\.js$|\.coffee$/ : /\.js$/, + wrap: function (fun) { + if (fun.length === 3) { + return Bluebird.promisify(fun); + } else { + return fun; + } + } + } + }); + + return sequelize + .authenticate() + .then(function () { + return migrator; + }) + .catch(function (err) { + console.error('Unable to connect to database: ' + err); + process.exit(1); + }); + } else { + console.log( + 'Cannot find "' + helpers.config.getConfigFile() + + '". Have you run "sequelize init"?' + ); + process.exit(1); + } +} + +/** + * tryToMigrateFromOldSchema - migrates from old schema + * + * @return {Promise} + */ +function tryToMigrateFromOldSchema () { + var sequelize = getSequelizeInstance(); + var queryInterface = sequelize.getQueryInterface(); + + return queryInterface.showAllTables() + .then(function (tableNames) { + if (tableNames.indexOf('SequelizeMeta') === -1) { + throw new Error('No SequelizeMeta table found.'); + } + }) + .then(function () { + return queryInterface.describeTable('SequelizeMeta'); + }) + .then(function (table) { + if (JSON.stringify(Object.keys(table).sort()) === JSON.stringify(['id', 'from', 'to'])) { + return; + } + return queryInterface.renameTable('SequelizeMeta', 'SequelizeMetaBackup') + .then(function () { + var sql = queryInterface.QueryGenerator.selectQuery('SequelizeMetaBackup'); + + return helpers.generic.execQuery(sequelize, sql, { type: 'SELECT', raw: true }); + }) + .then(function (result) { + var timestamps = result.map(function (item) { + return item.to; + }); + var files = fs.readdirSync(helpers.path.getPath('migration')); + + return files.filter(function (file) { + var match = file.match(/(\d+)-?/); + + if (match) { + var timestamp = match[0].replace('-', ''); + + return timestamps.indexOf(timestamp) > -1; + } + }); + }) + .then(function (files) { + var SequelizeMeta = sequelize.define('SequelizeMeta', { + name: { + type: Sequelize.STRING, + allowNull: false, + unique: true, + primaryKey: true, + autoIncrement: false + } + }, { + tableName: 'SequelizeMeta', + timestamps: false + }); + + return SequelizeMeta.sync().then(function () { + return SequelizeMeta.bulkCreate( + files.map(function (file) { + return { name: file }; + }) + ); + }); + }); + }); +} + +/** + * ensureSeeds - checks that the `--seed` option exists + */ + +function ensureSeeds () { + if ( !args.seed ) { + helpers.view.error( + 'Unspecified flag ' + + clc.blueBright('"seed"') + + '. Check the manual for further details.' + ); + process.exit(1); + } + + if ( !_.isArray(args.seed) ) { + args.seed = [args.seed]; + } + + args.seed.forEach(function (file, ind) { + args.seed[ind] = path.basename(file); + }); +} diff --git a/node_modules/sequelize-cli/lib/tasks/init.js b/node_modules/sequelize-cli/lib/tasks/init.js new file mode 100644 index 0000000..616203d --- /dev/null +++ b/node_modules/sequelize-cli/lib/tasks/init.js @@ -0,0 +1,107 @@ +'use strict'; + +var path = require('path'); +var helpers = require(path.resolve(__dirname, '..', 'helpers')); +var args = require('yargs').argv; +var clc = require('cli-color'); +var _ = require('lodash'); + +module.exports = { + 'init': { + descriptions: { + 'short': 'Initializes the project.', + 'long': (function () { + var result = [ + 'The command will initialize the current directory.', + 'In detail this means, that you will find the following items afterwards:', + '' + ]; + + var items = { + 'config': 'A folder that contains the config files.', + 'config/config.json': 'A file that contains the configuration for the ORM.', + 'migrations': 'A folder that contains the migration files.', + 'seeders': 'A folder that contains the seed files.', + 'models': 'A folder that contains the model files.', + 'models/index.js': 'A file that can be required to load all the models.' + }; + + _.forEach(items, function (value, key) { + result.push([ + clc.blueBright(helpers.view.pad(key, items)), + value + ].join(' ')); + }); + + result = result.concat([ + '', + 'Most of the files and folders can be changed to fit custom folder structures.', + 'Check the options for further information.' + ]); + + return result; + })(), + + options: { + '--force': 'Will drop the existing config folder and re-create it. ' + + clc.blueBright('Default: false') + } + }, + + dependencies: [ + 'init:config', + 'init:migrations', + 'init:seeders', + 'init:models' + ], + + task: function () {} + }, + + 'init:config': { + descriptions: { + 'short': 'Initializes the configuration.' + }, + + task: function () { + if (!helpers.config.configFileExists() || !!args.force) { + helpers.config.writeDefaultConfig(); + console.log('Created "' + helpers.config.relativeConfigFile() + '"'); + } else { + helpers.init.notifyAboutExistingFile(helpers.config.relativeConfigFile()); + process.exit(1); + } + } + }, + + 'init:models': { + descriptions: { + 'short': 'Initializes the models.' + }, + + task: function () { + helpers.init.createModelsFolder(!!args.force); + helpers.init.createModelsIndexFile(!!args.force); + } + }, + + 'init:migrations': { + descriptions: { + 'short': 'Initializes the migrations.' + }, + + task: function () { + helpers.init.createMigrationsFolder(!!args.force); + } + }, + + 'init:seeders': { + descriptions: { + 'short': 'Initializes the seeders.' + }, + + task: function () { + helpers.init.createSeedersFolder(!!args.force); + } + } +}; diff --git a/node_modules/sequelize-cli/lib/tasks/migration.js b/node_modules/sequelize-cli/lib/tasks/migration.js new file mode 100644 index 0000000..f7505f7 --- /dev/null +++ b/node_modules/sequelize-cli/lib/tasks/migration.js @@ -0,0 +1,48 @@ +'use strict'; + +var path = require('path'); +var helpers = require(path.resolve(__dirname, '..', 'helpers')); +var args = require('yargs').argv; +var fs = require('fs'); +var clc = require('cli-color'); + +module.exports = { + 'migration:create': { + descriptions: { + 'short': 'Generates a new migration file.', + options: { + '--name': 'Defines the name of the migration. ' + + clc.blueBright('Default: unnamed-migration'), + '--underscored': 'Use snake case for the timestamp\'s attribute names' + } + }, + + aliases: [ 'migration:generate' ], + + task: function () { + var config = null; + + helpers.init.createMigrationsFolder(); + + try { + config = helpers.config.readConfig(); + } catch (e) { + console.log(e.message); + process.exit(1); + } + + fs.writeFileSync( + helpers.path.getMigrationPath(args.name), + helpers.template.render('migrations/skeleton.js', {}, { + beautify: false + }) + ); + + helpers.view.log( + 'New migration was created at', + clc.blueBright(helpers.path.getMigrationPath(args.name)), + '.' + ); + } + } +}; diff --git a/node_modules/sequelize-cli/lib/tasks/model.js b/node_modules/sequelize-cli/lib/tasks/model.js new file mode 100644 index 0000000..3a2d06a --- /dev/null +++ b/node_modules/sequelize-cli/lib/tasks/model.js @@ -0,0 +1,136 @@ +'use strict'; + +var path = require('path'); +var helpers = require(path.resolve(__dirname, '..', 'helpers')); +var args = require('yargs').argv; +var clc = require('cli-color'); + +module.exports = { + 'model:create': { + aliases: [ 'model:generate' ], + + descriptions: { + 'short': 'Generates a model and its migration.', + + 'long': function () { + var migrationFileName = helpers.path.getFileName( + 'migration', + helpers.migration.generateMigrationName({ name: 'User' }), + { ignoreConfig: true } + ); + + var result = [ + 'This task generates a model file and its respective migration.', + 'It is necessary to specify the name of the new model as well as', + 'the model\'s attributes.', + '', + 'The attributes can be specified as in the following (and semantically equal) examples:', + '', + 'sequelize model:create --name User --attributes ' + + 'first_name:string,last_name:string,bio:text', + 'sequelize model:create --name User --attributes ' + + '\'first_name:string last_name:string bio:text\'', + 'sequelize model:create --name User --attributes ' + + '\'first_name:string, last_name:string, bio:text\'', + '', + 'This command will generate a new migration and model definition:', + '', + '// the model file', + '// located under models/user.js' + ]; + + result = result.concat( + helpers.model.generateFileContent({ + name: 'User', + attributes: 'first_name:string,last_name:string,bio:text' + }).split('\n') + ); + + result = result.concat([ + '', + '// the migration file', + '// located under migrations/' + migrationFileName + ]); + + result = result.concat( + helpers.migration.generateTableCreationFileContent({ + name: 'User', + attributes: 'first_name:string,last_name:string,bio:text', + underscored: args.underscored + }).split('\n') + ); + + return result; + }, + + options: { + '--name': 'The name of the new model.', + '--attributes': 'A list of attributes.', + '--underscored': 'Set timestamps to snake_case' + } + }, + + preChecks: [ + function ensureAttributesFlag () { + if (!args.attributes) { + helpers.view.error( + 'Unspecified flag ' + + clc.blueBright('"attributes"') + + '. Check the manual for further details.' + ); + process.exit(1); + } + }, + + function ensureNameFlag () { + if (!args.name) { + helpers.view.error( + 'Unspecified flag ' + clc.blueBright('"name"') + + '. Check the manual for further details.' + ); + process.exit(1); + } + }, + + function ensureModelsFolder () { + if (!helpers.path.existsSync(helpers.path.getModelsPath())) { + helpers.view.error( + 'Unable to find models path (' + + helpers.path.getModelsPath() + + '). Did you run ' + clc.blueBright('sequelize init') + '?' + ); + process.exit(1); + } + }, + + function ensureMigrationsFolder () { + if (!helpers.path.existsSync(helpers.path.getPath('migration'))) { + helpers.view.error( + 'Unable to find migrations path (' + + helpers.path.getPath('migration') + + '). Did you run ' + clc.blueBright('sequelize init') + '?' + ); + process.exit(1); + } + }, + + function checkModelFileExistence () { + var modelPath = helpers.path.getModelPath(args.name); + + if (!args.force && helpers.model.modelFileExists(modelPath)) { + helpers.model.notifyAboutExistingFile(modelPath); + process.exit(1); + } + } + ], + + task: function () { + this.preChecks.forEach(function (preCheck) { + preCheck(); + }); + + helpers.model.generateFile(args); + helpers.migration.generateTableCreationFile(args); + } + } +}; diff --git a/node_modules/sequelize-cli/lib/tasks/seed.js b/node_modules/sequelize-cli/lib/tasks/seed.js new file mode 100644 index 0000000..13a1b9d --- /dev/null +++ b/node_modules/sequelize-cli/lib/tasks/seed.js @@ -0,0 +1,47 @@ +'use strict'; + +var path = require('path'); +var helpers = require(path.resolve(__dirname, '..', 'helpers')); +var args = require('yargs').argv; +var fs = require('fs'); +var clc = require('cli-color'); + +module.exports = { + 'seed:create': { + descriptions: { + 'short': 'Generates a new seed file.', + options: { + '--name': 'Defines the name of the seed. ' + + clc.blueBright('Default: unnamed-seed') + } + }, + + aliases: [ 'seed:generate' ], + + task: function () { + var config = null; + + helpers.init.createSeedersFolder(); + + try { + config = helpers.config.readConfig(); + } catch (e) { + console.log(e.message); + process.exit(1); + } + + fs.writeFileSync( + helpers.path.getSeederPath(args.name), + helpers.template.render('seeders/skeleton.js', {}, { + beautify: false + }) + ); + + helpers.view.log( + 'New seed was created at', + clc.blueBright(helpers.path.getSeederPath(args.name)), + '.' + ); + } + } +}; diff --git a/node_modules/sequelize-cli/lib/tasks/version.js b/node_modules/sequelize-cli/lib/tasks/version.js new file mode 100644 index 0000000..9db482c --- /dev/null +++ b/node_modules/sequelize-cli/lib/tasks/version.js @@ -0,0 +1,15 @@ +'use strict'; + +module.exports = { + 'version': { + descriptions: { + 'short': 'Prints the version number.', + 'long': [ 'Prints the version number.' ] + }, + + aliases: [ 'v' ], + + task: function () { + } + } +}; diff --git a/node_modules/sequelize-cli/node_modules/camelcase/index.js b/node_modules/sequelize-cli/node_modules/camelcase/index.js new file mode 100644 index 0000000..5670f73 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/camelcase/index.js @@ -0,0 +1,56 @@ +'use strict'; + +function preserveCamelCase(str) { + var isLastCharLower = false; + + for (var i = 0; i < str.length; i++) { + var c = str.charAt(i); + + if (isLastCharLower && (/[a-zA-Z]/).test(c) && c.toUpperCase() === c) { + str = str.substr(0, i) + '-' + str.substr(i); + isLastCharLower = false; + i++; + } else { + isLastCharLower = (c.toLowerCase() === c); + } + } + + return str; +} + +module.exports = function () { + var str = [].map.call(arguments, function (str) { + return str.trim(); + }).filter(function (str) { + return str.length; + }).join('-'); + + if (!str.length) { + return ''; + } + + if (str.length === 1) { + return str.toLowerCase(); + } + + if (!(/[_.\- ]+/).test(str)) { + if (str === str.toUpperCase()) { + return str.toLowerCase(); + } + + if (str[0] !== str[0].toLowerCase()) { + return str[0].toLowerCase() + str.slice(1); + } + + return str; + } + + str = preserveCamelCase(str); + + return str + .replace(/^[_.\- ]+/, '') + .toLowerCase() + .replace(/[_.\- ]+(\w|$)/g, function (m, p1) { + return p1.toUpperCase(); + }); +}; diff --git a/node_modules/sequelize-cli/node_modules/camelcase/license b/node_modules/sequelize-cli/node_modules/camelcase/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/camelcase/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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. diff --git a/node_modules/sequelize-cli/node_modules/camelcase/package.json b/node_modules/sequelize-cli/node_modules/camelcase/package.json new file mode 100644 index 0000000..8cc0bc1 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/camelcase/package.json @@ -0,0 +1,107 @@ +{ + "_args": [ + [ + { + "raw": "camelcase@^3.0.0", + "scope": null, + "escapedName": "camelcase", + "name": "camelcase", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/sequelize-cli/node_modules/yargs" + ] + ], + "_from": "camelcase@>=3.0.0 <4.0.0", + "_id": "camelcase@3.0.0", + "_inCache": true, + "_location": "/sequelize-cli/camelcase", + "_nodeVersion": "4.4.2", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/camelcase-3.0.0.tgz_1462383205197_0.03801905922591686" + }, + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "3.8.9", + "_phantomChildren": {}, + "_requested": { + "raw": "camelcase@^3.0.0", + "scope": null, + "escapedName": "camelcase", + "name": "camelcase", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/sequelize-cli/yargs" + ], + "_resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "_shasum": "32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a", + "_shrinkwrap": null, + "_spec": "camelcase@^3.0.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/sequelize-cli/node_modules/yargs", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/camelcase/issues" + }, + "dependencies": {}, + "description": "Convert a dash/dot/underscore/space separated string to camelCase: foo-bar → fooBar", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a", + "tarball": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "d4de0e37b625e38a880efc6517194917a5beda01", + "homepage": "https://github.com/sindresorhus/camelcase#readme", + "keywords": [ + "camelcase", + "camel-case", + "camel", + "case", + "dash", + "hyphen", + "dot", + "underscore", + "separator", + "string", + "text", + "convert" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "camelcase", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/camelcase.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "3.0.0" +} diff --git a/node_modules/sequelize-cli/node_modules/camelcase/readme.md b/node_modules/sequelize-cli/node_modules/camelcase/readme.md new file mode 100644 index 0000000..080b2a1 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/camelcase/readme.md @@ -0,0 +1,57 @@ +# camelcase [![Build Status](https://travis-ci.org/sindresorhus/camelcase.svg?branch=master)](https://travis-ci.org/sindresorhus/camelcase) + +> Convert a dash/dot/underscore/space separated string to camelCase: `foo-bar` → `fooBar` + + +## Install + +``` +$ npm install --save camelcase +``` + + +## Usage + +```js +const camelCase = require('camelcase'); + +camelCase('foo-bar'); +//=> 'fooBar' + +camelCase('foo_bar'); +//=> 'fooBar' + +camelCase('Foo-Bar'); +//=> 'fooBar' + +camelCase('--foo.bar'); +//=> 'fooBar' + +camelCase('__foo__bar__'); +//=> 'fooBar' + +camelCase('foo bar'); +//=> 'fooBar' + +console.log(process.argv[3]); +//=> '--foo-bar' +camelCase(process.argv[3]); +//=> 'fooBar' + +camelCase('foo', 'bar'); +//=> 'fooBar' + +camelCase('__foo__', '--bar'); +//=> 'fooBar' +``` + + +## Related + +- [decamelize](https://github.com/sindresorhus/decamelize) - The inverse of this module +- [uppercamelcase](https://github.com/SamVerschueren/uppercamelcase) - Like this module, but to PascalCase instead of camelCase + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/sequelize-cli/node_modules/cliui/CHANGELOG.md b/node_modules/sequelize-cli/node_modules/cliui/CHANGELOG.md new file mode 100644 index 0000000..ef6a35e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/cliui/CHANGELOG.md @@ -0,0 +1,15 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + + +# [3.2.0](https://github.com/yargs/cliui/compare/v3.1.2...v3.2.0) (2016-04-11) + + +### Bug Fixes + +* reduces tarball size ([acc6c33](https://github.com/yargs/cliui/commit/acc6c33)) + +### Features + +* adds standard-version for release management ([ff84e32](https://github.com/yargs/cliui/commit/ff84e32)) diff --git a/node_modules/sequelize-cli/node_modules/cliui/LICENSE.txt b/node_modules/sequelize-cli/node_modules/cliui/LICENSE.txt new file mode 100644 index 0000000..c7e2747 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/cliui/LICENSE.txt @@ -0,0 +1,14 @@ +Copyright (c) 2015, Contributors + +Permission to use, copy, modify, and/or distribute this software +for any purpose with or without fee is hereby granted, provided +that the above copyright notice and this permission notice +appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE +LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/sequelize-cli/node_modules/cliui/README.md b/node_modules/sequelize-cli/node_modules/cliui/README.md new file mode 100644 index 0000000..028392c --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/cliui/README.md @@ -0,0 +1,110 @@ +# cliui + +[![Build Status](https://travis-ci.org/yargs/cliui.svg)](https://travis-ci.org/yargs/cliui) +[![Coverage Status](https://coveralls.io/repos/yargs/cliui/badge.svg?branch=)](https://coveralls.io/r/yargs/cliui?branch=) +[![NPM version](https://img.shields.io/npm/v/cliui.svg)](https://www.npmjs.com/package/cliui) +[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) + +easily create complex multi-column command-line-interfaces. + +## Example + +```js +var ui = require('cliui')({ + width: 80 +}) + +ui.div('Usage: $0 [command] [options]') + +ui.div({ + text: 'Options:', + padding: [2, 0, 2, 0] +}) + +ui.div( + { + text: "-f, --file", + width: 20, + padding: [0, 4, 0, 4] + }, + { + text: "the file to load." + + chalk.green("(if this description is long it wraps).") + , + width: 20 + }, + { + text: chalk.red("[required]"), + align: 'right' + } +) + +console.log(ui.toString()) +``` + + + +## Layout DSL + +cliui exposes a simple layout DSL: + +If you create a single `ui.row`, passing a string rather than an +object: + +* `\n`: characters will be interpreted as new rows. +* `\t`: characters will be interpreted as new columns. +* `\s`: characters will be interpreted as padding. + +**as an example...** + +```js +var ui = require('./')({ + width: 60 +}) + +ui.div( + 'Usage: node ./bin/foo.js\n' + + ' \t provide a regex\n' + + ' \t provide a glob\t [required]' +) + +console.log(ui.toString()) +``` + +**will output:** + +```shell +Usage: node ./bin/foo.js + provide a regex + provide a glob [required] +``` + +## Methods + +```js +cliui = require('cliui') +``` + +### cliui({width: integer}) + +Specify the maximum width of the UI being generated. + +### cliui({wrap: boolean}) + +Enable or disable the wrapping of text in a column. + +### cliui.div(column, column, column) + +Create a row with any number of columns, a column +can either be a string, or an object with the following +options: + +* **width:** the width of a column. +* **align:** alignment, `right` or `center`. +* **padding:** `[top, right, bottom, left]`. +* **border:** should a border be placed around the div? + +### cliui.span(column, column, column) + +Similar to `div`, except the next row will be appended without +a new line being created. diff --git a/node_modules/sequelize-cli/node_modules/cliui/index.js b/node_modules/sequelize-cli/node_modules/cliui/index.js new file mode 100644 index 0000000..e501e78 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/cliui/index.js @@ -0,0 +1,316 @@ +var stringWidth = require('string-width') +var stripAnsi = require('strip-ansi') +var wrap = require('wrap-ansi') +var align = { + right: alignRight, + center: alignCenter +} +var top = 0 +var right = 1 +var bottom = 2 +var left = 3 + +function UI (opts) { + this.width = opts.width + this.wrap = opts.wrap + this.rows = [] +} + +UI.prototype.span = function () { + var cols = this.div.apply(this, arguments) + cols.span = true +} + +UI.prototype.div = function () { + if (arguments.length === 0) this.div('') + if (this.wrap && this._shouldApplyLayoutDSL.apply(this, arguments)) { + return this._applyLayoutDSL(arguments[0]) + } + + var cols = [] + + for (var i = 0, arg; (arg = arguments[i]) !== undefined; i++) { + if (typeof arg === 'string') cols.push(this._colFromString(arg)) + else cols.push(arg) + } + + this.rows.push(cols) + return cols +} + +UI.prototype._shouldApplyLayoutDSL = function () { + return arguments.length === 1 && typeof arguments[0] === 'string' && + /[\t\n]/.test(arguments[0]) +} + +UI.prototype._applyLayoutDSL = function (str) { + var _this = this + var rows = str.split('\n') + var leftColumnWidth = 0 + + // simple heuristic for layout, make sure the + // second column lines up along the left-hand. + // don't allow the first column to take up more + // than 50% of the screen. + rows.forEach(function (row) { + var columns = row.split('\t') + if (columns.length > 1 && stringWidth(columns[0]) > leftColumnWidth) { + leftColumnWidth = Math.min( + Math.floor(_this.width * 0.5), + stringWidth(columns[0]) + ) + } + }) + + // generate a table: + // replacing ' ' with padding calculations. + // using the algorithmically generated width. + rows.forEach(function (row) { + var columns = row.split('\t') + _this.div.apply(_this, columns.map(function (r, i) { + return { + text: r.trim(), + padding: _this._measurePadding(r), + width: (i === 0 && columns.length > 1) ? leftColumnWidth : undefined + } + })) + }) + + return this.rows[this.rows.length - 1] +} + +UI.prototype._colFromString = function (str) { + return { + text: str, + padding: this._measurePadding(str) + } +} + +UI.prototype._measurePadding = function (str) { + // measure padding without ansi escape codes + var noAnsi = stripAnsi(str) + return [0, noAnsi.match(/\s*$/)[0].length, 0, noAnsi.match(/^\s*/)[0].length] +} + +UI.prototype.toString = function () { + var _this = this + var lines = [] + + _this.rows.forEach(function (row, i) { + _this.rowToString(row, lines) + }) + + // don't display any lines with the + // hidden flag set. + lines = lines.filter(function (line) { + return !line.hidden + }) + + return lines.map(function (line) { + return line.text + }).join('\n') +} + +UI.prototype.rowToString = function (row, lines) { + var _this = this + var padding + var rrows = this._rasterize(row) + var str = '' + var ts + var width + var wrapWidth + + rrows.forEach(function (rrow, r) { + str = '' + rrow.forEach(function (col, c) { + ts = '' // temporary string used during alignment/padding. + width = row[c].width // the width with padding. + wrapWidth = _this._negatePadding(row[c]) // the width without padding. + + ts += col + + for (var i = 0; i < wrapWidth - stringWidth(col); i++) { + ts += ' ' + } + + // align the string within its column. + if (row[c].align && row[c].align !== 'left' && _this.wrap) { + ts = align[row[c].align](ts, wrapWidth) + if (stringWidth(ts) < wrapWidth) ts += new Array(width - stringWidth(ts)).join(' ') + } + + // apply border and padding to string. + padding = row[c].padding || [0, 0, 0, 0] + if (padding[left]) str += new Array(padding[left] + 1).join(' ') + str += addBorder(row[c], ts, '| ') + str += ts + str += addBorder(row[c], ts, ' |') + if (padding[right]) str += new Array(padding[right] + 1).join(' ') + + // if prior row is span, try to render the + // current row on the prior line. + if (r === 0 && lines.length > 0) { + str = _this._renderInline(str, lines[lines.length - 1]) + } + }) + + // remove trailing whitespace. + lines.push({ + text: str.replace(/ +$/, ''), + span: row.span + }) + }) + + return lines +} + +function addBorder (col, ts, style) { + if (col.border) { + if (/[.']-+[.']/.test(ts)) return '' + else if (ts.trim().length) return style + else return ' ' + } + return '' +} + +// if the full 'source' can render in +// the target line, do so. +UI.prototype._renderInline = function (source, previousLine) { + var leadingWhitespace = source.match(/^ */)[0].length + var target = previousLine.text + var targetTextWidth = stringWidth(target.trimRight()) + + if (!previousLine.span) return source + + // if we're not applying wrapping logic, + // just always append to the span. + if (!this.wrap) { + previousLine.hidden = true + return target + source + } + + if (leadingWhitespace < targetTextWidth) return source + + previousLine.hidden = true + + return target.trimRight() + new Array(leadingWhitespace - targetTextWidth + 1).join(' ') + source.trimLeft() +} + +UI.prototype._rasterize = function (row) { + var _this = this + var i + var rrow + var rrows = [] + var widths = this._columnWidths(row) + var wrapped + + // word wrap all columns, and create + // a data-structure that is easy to rasterize. + row.forEach(function (col, c) { + // leave room for left and right padding. + col.width = widths[c] + if (_this.wrap) wrapped = wrap(col.text, _this._negatePadding(col), {hard: true}).split('\n') + else wrapped = col.text.split('\n') + + if (col.border) { + wrapped.unshift('.' + new Array(_this._negatePadding(col) + 3).join('-') + '.') + wrapped.push("'" + new Array(_this._negatePadding(col) + 3).join('-') + "'") + } + + // add top and bottom padding. + if (col.padding) { + for (i = 0; i < (col.padding[top] || 0); i++) wrapped.unshift('') + for (i = 0; i < (col.padding[bottom] || 0); i++) wrapped.push('') + } + + wrapped.forEach(function (str, r) { + if (!rrows[r]) rrows.push([]) + + rrow = rrows[r] + + for (var i = 0; i < c; i++) { + if (rrow[i] === undefined) rrow.push('') + } + rrow.push(str) + }) + }) + + return rrows +} + +UI.prototype._negatePadding = function (col) { + var wrapWidth = col.width + if (col.padding) wrapWidth -= (col.padding[left] || 0) + (col.padding[right] || 0) + if (col.border) wrapWidth -= 4 + return wrapWidth +} + +UI.prototype._columnWidths = function (row) { + var _this = this + var widths = [] + var unset = row.length + var unsetWidth + var remainingWidth = this.width + + // column widths can be set in config. + row.forEach(function (col, i) { + if (col.width) { + unset-- + widths[i] = col.width + remainingWidth -= col.width + } else { + widths[i] = undefined + } + }) + + // any unset widths should be calculated. + if (unset) unsetWidth = Math.floor(remainingWidth / unset) + widths.forEach(function (w, i) { + if (!_this.wrap) widths[i] = row[i].width || stringWidth(row[i].text) + else if (w === undefined) widths[i] = Math.max(unsetWidth, _minWidth(row[i])) + }) + + return widths +} + +// calculates the minimum width of +// a column, based on padding preferences. +function _minWidth (col) { + var padding = col.padding || [] + var minWidth = 1 + (padding[left] || 0) + (padding[right] || 0) + if (col.border) minWidth += 4 + return minWidth +} + +function alignRight (str, width) { + str = str.trim() + var padding = '' + var strWidth = stringWidth(str) + + if (strWidth < width) { + padding = new Array(width - strWidth + 1).join(' ') + } + + return padding + str +} + +function alignCenter (str, width) { + str = str.trim() + var padding = '' + var strWidth = stringWidth(str.trim()) + + if (strWidth < width) { + padding = new Array(parseInt((width - strWidth) / 2, 10) + 1).join(' ') + } + + return padding + str +} + +module.exports = function (opts) { + opts = opts || {} + + return new UI({ + width: (opts || {}).width || 80, + wrap: typeof opts.wrap === 'boolean' ? opts.wrap : true + }) +} diff --git a/node_modules/sequelize-cli/node_modules/cliui/package.json b/node_modules/sequelize-cli/node_modules/cliui/package.json new file mode 100644 index 0000000..5165a6d --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/cliui/package.json @@ -0,0 +1,131 @@ +{ + "_args": [ + [ + { + "raw": "cliui@^3.2.0", + "scope": null, + "escapedName": "cliui", + "name": "cliui", + "rawSpec": "^3.2.0", + "spec": ">=3.2.0 <4.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/sequelize-cli/node_modules/yargs" + ] + ], + "_from": "cliui@>=3.2.0 <4.0.0", + "_id": "cliui@3.2.0", + "_inCache": true, + "_location": "/sequelize-cli/cliui", + "_nodeVersion": "5.1.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/cliui-3.2.0.tgz_1460342854008_0.8861493801232427" + }, + "_npmUser": { + "name": "bcoe", + "email": "ben@npmjs.com" + }, + "_npmVersion": "3.3.12", + "_phantomChildren": {}, + "_requested": { + "raw": "cliui@^3.2.0", + "scope": null, + "escapedName": "cliui", + "name": "cliui", + "rawSpec": "^3.2.0", + "spec": ">=3.2.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/sequelize-cli/yargs" + ], + "_resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "_shasum": "120601537a916d29940f934da3b48d585a39213d", + "_shrinkwrap": null, + "_spec": "cliui@^3.2.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/sequelize-cli/node_modules/yargs", + "author": { + "name": "Ben Coe", + "email": "ben@npmjs.com" + }, + "bugs": { + "url": "https://github.com/yargs/cliui/issues" + }, + "config": { + "blanket": { + "pattern": [ + "index.js" + ], + "data-cover-never": [ + "node_modules", + "test" + ], + "output-reporter": "spec" + } + }, + "dependencies": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + }, + "description": "easily create complex multi-column command-line-interfaces", + "devDependencies": { + "chai": "^3.5.0", + "chalk": "^1.1.2", + "coveralls": "^2.11.8", + "mocha": "^2.4.5", + "nyc": "^6.4.0", + "standard": "^6.0.8", + "standard-version": "^2.1.2" + }, + "directories": {}, + "dist": { + "shasum": "120601537a916d29940f934da3b48d585a39213d", + "tarball": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz" + }, + "files": [ + "index.js" + ], + "gitHead": "75d62e9dfa77a0e0a9c3ac3b96b02baa294142ce", + "homepage": "https://github.com/yargs/cliui#readme", + "keywords": [ + "cli", + "command-line", + "layout", + "design", + "console", + "wrap", + "table" + ], + "license": "ISC", + "main": "index.js", + "maintainers": [ + { + "name": "bcoe", + "email": "ben@npmjs.com" + } + ], + "name": "cliui", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/yargs/cliui.git" + }, + "scripts": { + "coverage": "nyc --reporter=text-lcov mocha | coveralls", + "pretest": "standard", + "test": "nyc mocha", + "version": "standard-version" + }, + "standard": { + "ignore": [ + "**/example/**" + ], + "globals": [ + "it" + ] + }, + "version": "3.2.0" +} diff --git a/node_modules/sequelize-cli/node_modules/lodash/LICENSE b/node_modules/sequelize-cli/node_modules/lodash/LICENSE new file mode 100644 index 0000000..c6f2f61 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/LICENSE @@ -0,0 +1,47 @@ +Copyright JS Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +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. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/node_modules/sequelize-cli/node_modules/lodash/README.md b/node_modules/sequelize-cli/node_modules/lodash/README.md new file mode 100644 index 0000000..acdd128 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/README.md @@ -0,0 +1,39 @@ +# lodash v4.17.4 + +The [Lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules. + +## Installation + +Using npm: +```shell +$ npm i -g npm +$ npm i --save lodash +``` + +In Node.js: +```js +// Load the full build. +var _ = require('lodash'); +// Load the core build. +var _ = require('lodash/core'); +// Load the FP build for immutable auto-curried iteratee-first data-last methods. +var fp = require('lodash/fp'); + +// Load method categories. +var array = require('lodash/array'); +var object = require('lodash/fp/object'); + +// Cherry-pick methods for smaller browserify/rollup/webpack bundles. +var at = require('lodash/at'); +var curryN = require('lodash/fp/curryN'); +``` + +See the [package source](https://github.com/lodash/lodash/tree/4.17.4-npm) for more details. + +**Note:**
    +Install [n_](https://www.npmjs.com/package/n_) for Lodash use in the Node.js < 6 REPL. + +## Support + +Tested in Chrome 54-55, Firefox 49-50, IE 11, Edge 14, Safari 9-10, Node.js 6-7, & PhantomJS 2.1.1.
    +Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available. diff --git a/node_modules/sequelize-cli/node_modules/lodash/_DataView.js b/node_modules/sequelize-cli/node_modules/lodash/_DataView.js new file mode 100644 index 0000000..ac2d57c --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_DataView.js @@ -0,0 +1,7 @@ +var getNative = require('./_getNative'), + root = require('./_root'); + +/* Built-in method references that are verified to be native. */ +var DataView = getNative(root, 'DataView'); + +module.exports = DataView; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_Hash.js b/node_modules/sequelize-cli/node_modules/lodash/_Hash.js new file mode 100644 index 0000000..b504fe3 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_Hash.js @@ -0,0 +1,32 @@ +var hashClear = require('./_hashClear'), + hashDelete = require('./_hashDelete'), + hashGet = require('./_hashGet'), + hashHas = require('./_hashHas'), + hashSet = require('./_hashSet'); + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; + +module.exports = Hash; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_LazyWrapper.js b/node_modules/sequelize-cli/node_modules/lodash/_LazyWrapper.js new file mode 100644 index 0000000..81786c7 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_LazyWrapper.js @@ -0,0 +1,28 @@ +var baseCreate = require('./_baseCreate'), + baseLodash = require('./_baseLodash'); + +/** Used as references for the maximum length and index of an array. */ +var MAX_ARRAY_LENGTH = 4294967295; + +/** + * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. + * + * @private + * @constructor + * @param {*} value The value to wrap. + */ +function LazyWrapper(value) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__dir__ = 1; + this.__filtered__ = false; + this.__iteratees__ = []; + this.__takeCount__ = MAX_ARRAY_LENGTH; + this.__views__ = []; +} + +// Ensure `LazyWrapper` is an instance of `baseLodash`. +LazyWrapper.prototype = baseCreate(baseLodash.prototype); +LazyWrapper.prototype.constructor = LazyWrapper; + +module.exports = LazyWrapper; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_ListCache.js b/node_modules/sequelize-cli/node_modules/lodash/_ListCache.js new file mode 100644 index 0000000..26895c3 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_ListCache.js @@ -0,0 +1,32 @@ +var listCacheClear = require('./_listCacheClear'), + listCacheDelete = require('./_listCacheDelete'), + listCacheGet = require('./_listCacheGet'), + listCacheHas = require('./_listCacheHas'), + listCacheSet = require('./_listCacheSet'); + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; + +module.exports = ListCache; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_LodashWrapper.js b/node_modules/sequelize-cli/node_modules/lodash/_LodashWrapper.js new file mode 100644 index 0000000..c1e4d9d --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_LodashWrapper.js @@ -0,0 +1,22 @@ +var baseCreate = require('./_baseCreate'), + baseLodash = require('./_baseLodash'); + +/** + * The base constructor for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable explicit method chain sequences. + */ +function LodashWrapper(value, chainAll) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__chain__ = !!chainAll; + this.__index__ = 0; + this.__values__ = undefined; +} + +LodashWrapper.prototype = baseCreate(baseLodash.prototype); +LodashWrapper.prototype.constructor = LodashWrapper; + +module.exports = LodashWrapper; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_Map.js b/node_modules/sequelize-cli/node_modules/lodash/_Map.js new file mode 100644 index 0000000..b73f29a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_Map.js @@ -0,0 +1,7 @@ +var getNative = require('./_getNative'), + root = require('./_root'); + +/* Built-in method references that are verified to be native. */ +var Map = getNative(root, 'Map'); + +module.exports = Map; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_MapCache.js b/node_modules/sequelize-cli/node_modules/lodash/_MapCache.js new file mode 100644 index 0000000..4a4eea7 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_MapCache.js @@ -0,0 +1,32 @@ +var mapCacheClear = require('./_mapCacheClear'), + mapCacheDelete = require('./_mapCacheDelete'), + mapCacheGet = require('./_mapCacheGet'), + mapCacheHas = require('./_mapCacheHas'), + mapCacheSet = require('./_mapCacheSet'); + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; + +module.exports = MapCache; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_Promise.js b/node_modules/sequelize-cli/node_modules/lodash/_Promise.js new file mode 100644 index 0000000..247b9e1 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_Promise.js @@ -0,0 +1,7 @@ +var getNative = require('./_getNative'), + root = require('./_root'); + +/* Built-in method references that are verified to be native. */ +var Promise = getNative(root, 'Promise'); + +module.exports = Promise; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_Set.js b/node_modules/sequelize-cli/node_modules/lodash/_Set.js new file mode 100644 index 0000000..b3c8dcb --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_Set.js @@ -0,0 +1,7 @@ +var getNative = require('./_getNative'), + root = require('./_root'); + +/* Built-in method references that are verified to be native. */ +var Set = getNative(root, 'Set'); + +module.exports = Set; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_SetCache.js b/node_modules/sequelize-cli/node_modules/lodash/_SetCache.js new file mode 100644 index 0000000..6468b06 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_SetCache.js @@ -0,0 +1,27 @@ +var MapCache = require('./_MapCache'), + setCacheAdd = require('./_setCacheAdd'), + setCacheHas = require('./_setCacheHas'); + +/** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ +function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new MapCache; + while (++index < length) { + this.add(values[index]); + } +} + +// Add methods to `SetCache`. +SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; +SetCache.prototype.has = setCacheHas; + +module.exports = SetCache; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_Stack.js b/node_modules/sequelize-cli/node_modules/lodash/_Stack.js new file mode 100644 index 0000000..80b2cf1 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_Stack.js @@ -0,0 +1,27 @@ +var ListCache = require('./_ListCache'), + stackClear = require('./_stackClear'), + stackDelete = require('./_stackDelete'), + stackGet = require('./_stackGet'), + stackHas = require('./_stackHas'), + stackSet = require('./_stackSet'); + +/** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; +} + +// Add methods to `Stack`. +Stack.prototype.clear = stackClear; +Stack.prototype['delete'] = stackDelete; +Stack.prototype.get = stackGet; +Stack.prototype.has = stackHas; +Stack.prototype.set = stackSet; + +module.exports = Stack; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_Symbol.js b/node_modules/sequelize-cli/node_modules/lodash/_Symbol.js new file mode 100644 index 0000000..a013f7c --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_Symbol.js @@ -0,0 +1,6 @@ +var root = require('./_root'); + +/** Built-in value references. */ +var Symbol = root.Symbol; + +module.exports = Symbol; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_Uint8Array.js b/node_modules/sequelize-cli/node_modules/lodash/_Uint8Array.js new file mode 100644 index 0000000..2fb30e1 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_Uint8Array.js @@ -0,0 +1,6 @@ +var root = require('./_root'); + +/** Built-in value references. */ +var Uint8Array = root.Uint8Array; + +module.exports = Uint8Array; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_WeakMap.js b/node_modules/sequelize-cli/node_modules/lodash/_WeakMap.js new file mode 100644 index 0000000..567f86c --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_WeakMap.js @@ -0,0 +1,7 @@ +var getNative = require('./_getNative'), + root = require('./_root'); + +/* Built-in method references that are verified to be native. */ +var WeakMap = getNative(root, 'WeakMap'); + +module.exports = WeakMap; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_addMapEntry.js b/node_modules/sequelize-cli/node_modules/lodash/_addMapEntry.js new file mode 100644 index 0000000..5a69212 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_addMapEntry.js @@ -0,0 +1,15 @@ +/** + * Adds the key-value `pair` to `map`. + * + * @private + * @param {Object} map The map to modify. + * @param {Array} pair The key-value pair to add. + * @returns {Object} Returns `map`. + */ +function addMapEntry(map, pair) { + // Don't return `map.set` because it's not chainable in IE 11. + map.set(pair[0], pair[1]); + return map; +} + +module.exports = addMapEntry; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_addSetEntry.js b/node_modules/sequelize-cli/node_modules/lodash/_addSetEntry.js new file mode 100644 index 0000000..1a07b70 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_addSetEntry.js @@ -0,0 +1,15 @@ +/** + * Adds `value` to `set`. + * + * @private + * @param {Object} set The set to modify. + * @param {*} value The value to add. + * @returns {Object} Returns `set`. + */ +function addSetEntry(set, value) { + // Don't return `set.add` because it's not chainable in IE 11. + set.add(value); + return set; +} + +module.exports = addSetEntry; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_apply.js b/node_modules/sequelize-cli/node_modules/lodash/_apply.js new file mode 100644 index 0000000..36436dd --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_apply.js @@ -0,0 +1,21 @@ +/** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ +function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); +} + +module.exports = apply; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_arrayAggregator.js b/node_modules/sequelize-cli/node_modules/lodash/_arrayAggregator.js new file mode 100644 index 0000000..d96c3ca --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_arrayAggregator.js @@ -0,0 +1,22 @@ +/** + * A specialized version of `baseAggregator` for arrays. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ +function arrayAggregator(array, setter, iteratee, accumulator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + var value = array[index]; + setter(accumulator, value, iteratee(value), array); + } + return accumulator; +} + +module.exports = arrayAggregator; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_arrayEach.js b/node_modules/sequelize-cli/node_modules/lodash/_arrayEach.js new file mode 100644 index 0000000..2c5f579 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_arrayEach.js @@ -0,0 +1,22 @@ +/** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; +} + +module.exports = arrayEach; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_arrayEachRight.js b/node_modules/sequelize-cli/node_modules/lodash/_arrayEachRight.js new file mode 100644 index 0000000..976ca5c --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_arrayEachRight.js @@ -0,0 +1,21 @@ +/** + * A specialized version of `_.forEachRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEachRight(array, iteratee) { + var length = array == null ? 0 : array.length; + + while (length--) { + if (iteratee(array[length], length, array) === false) { + break; + } + } + return array; +} + +module.exports = arrayEachRight; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_arrayEvery.js b/node_modules/sequelize-cli/node_modules/lodash/_arrayEvery.js new file mode 100644 index 0000000..e26a918 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_arrayEvery.js @@ -0,0 +1,23 @@ +/** + * A specialized version of `_.every` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + */ +function arrayEvery(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (!predicate(array[index], index, array)) { + return false; + } + } + return true; +} + +module.exports = arrayEvery; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_arrayFilter.js b/node_modules/sequelize-cli/node_modules/lodash/_arrayFilter.js new file mode 100644 index 0000000..75ea254 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_arrayFilter.js @@ -0,0 +1,25 @@ +/** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; +} + +module.exports = arrayFilter; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_arrayIncludes.js b/node_modules/sequelize-cli/node_modules/lodash/_arrayIncludes.js new file mode 100644 index 0000000..3737a6d --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_arrayIncludes.js @@ -0,0 +1,17 @@ +var baseIndexOf = require('./_baseIndexOf'); + +/** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; +} + +module.exports = arrayIncludes; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_arrayIncludesWith.js b/node_modules/sequelize-cli/node_modules/lodash/_arrayIncludesWith.js new file mode 100644 index 0000000..235fd97 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_arrayIncludesWith.js @@ -0,0 +1,22 @@ +/** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; +} + +module.exports = arrayIncludesWith; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_arrayLikeKeys.js b/node_modules/sequelize-cli/node_modules/lodash/_arrayLikeKeys.js new file mode 100644 index 0000000..b2ec9ce --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_arrayLikeKeys.js @@ -0,0 +1,49 @@ +var baseTimes = require('./_baseTimes'), + isArguments = require('./isArguments'), + isArray = require('./isArray'), + isBuffer = require('./isBuffer'), + isIndex = require('./_isIndex'), + isTypedArray = require('./isTypedArray'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ +function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length) + ))) { + result.push(key); + } + } + return result; +} + +module.exports = arrayLikeKeys; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_arrayMap.js b/node_modules/sequelize-cli/node_modules/lodash/_arrayMap.js new file mode 100644 index 0000000..22b2246 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_arrayMap.js @@ -0,0 +1,21 @@ +/** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; +} + +module.exports = arrayMap; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_arrayPush.js b/node_modules/sequelize-cli/node_modules/lodash/_arrayPush.js new file mode 100644 index 0000000..7d742b3 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_arrayPush.js @@ -0,0 +1,20 @@ +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} + +module.exports = arrayPush; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_arrayReduce.js b/node_modules/sequelize-cli/node_modules/lodash/_arrayReduce.js new file mode 100644 index 0000000..de8b79b --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_arrayReduce.js @@ -0,0 +1,26 @@ +/** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ +function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array == null ? 0 : array.length; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; +} + +module.exports = arrayReduce; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_arrayReduceRight.js b/node_modules/sequelize-cli/node_modules/lodash/_arrayReduceRight.js new file mode 100644 index 0000000..22d8976 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_arrayReduceRight.js @@ -0,0 +1,24 @@ +/** + * A specialized version of `_.reduceRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the last element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ +function arrayReduceRight(array, iteratee, accumulator, initAccum) { + var length = array == null ? 0 : array.length; + if (initAccum && length) { + accumulator = array[--length]; + } + while (length--) { + accumulator = iteratee(accumulator, array[length], length, array); + } + return accumulator; +} + +module.exports = arrayReduceRight; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_arraySample.js b/node_modules/sequelize-cli/node_modules/lodash/_arraySample.js new file mode 100644 index 0000000..fcab010 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_arraySample.js @@ -0,0 +1,15 @@ +var baseRandom = require('./_baseRandom'); + +/** + * A specialized version of `_.sample` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @returns {*} Returns the random element. + */ +function arraySample(array) { + var length = array.length; + return length ? array[baseRandom(0, length - 1)] : undefined; +} + +module.exports = arraySample; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_arraySampleSize.js b/node_modules/sequelize-cli/node_modules/lodash/_arraySampleSize.js new file mode 100644 index 0000000..8c7e364 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_arraySampleSize.js @@ -0,0 +1,17 @@ +var baseClamp = require('./_baseClamp'), + copyArray = require('./_copyArray'), + shuffleSelf = require('./_shuffleSelf'); + +/** + * A specialized version of `_.sampleSize` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ +function arraySampleSize(array, n) { + return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); +} + +module.exports = arraySampleSize; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_arrayShuffle.js b/node_modules/sequelize-cli/node_modules/lodash/_arrayShuffle.js new file mode 100644 index 0000000..46313a3 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_arrayShuffle.js @@ -0,0 +1,15 @@ +var copyArray = require('./_copyArray'), + shuffleSelf = require('./_shuffleSelf'); + +/** + * A specialized version of `_.shuffle` for arrays. + * + * @private + * @param {Array} array The array to shuffle. + * @returns {Array} Returns the new shuffled array. + */ +function arrayShuffle(array) { + return shuffleSelf(copyArray(array)); +} + +module.exports = arrayShuffle; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_arraySome.js b/node_modules/sequelize-cli/node_modules/lodash/_arraySome.js new file mode 100644 index 0000000..6fd02fd --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_arraySome.js @@ -0,0 +1,23 @@ +/** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ +function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; +} + +module.exports = arraySome; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_asciiSize.js b/node_modules/sequelize-cli/node_modules/lodash/_asciiSize.js new file mode 100644 index 0000000..11d29c3 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_asciiSize.js @@ -0,0 +1,12 @@ +var baseProperty = require('./_baseProperty'); + +/** + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ +var asciiSize = baseProperty('length'); + +module.exports = asciiSize; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_asciiToArray.js b/node_modules/sequelize-cli/node_modules/lodash/_asciiToArray.js new file mode 100644 index 0000000..8e3dd5b --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_asciiToArray.js @@ -0,0 +1,12 @@ +/** + * Converts an ASCII `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function asciiToArray(string) { + return string.split(''); +} + +module.exports = asciiToArray; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_asciiWords.js b/node_modules/sequelize-cli/node_modules/lodash/_asciiWords.js new file mode 100644 index 0000000..d765f0f --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_asciiWords.js @@ -0,0 +1,15 @@ +/** Used to match words composed of alphanumeric characters. */ +var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; + +/** + * Splits an ASCII `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ +function asciiWords(string) { + return string.match(reAsciiWord) || []; +} + +module.exports = asciiWords; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_assignMergeValue.js b/node_modules/sequelize-cli/node_modules/lodash/_assignMergeValue.js new file mode 100644 index 0000000..cb1185e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_assignMergeValue.js @@ -0,0 +1,20 @@ +var baseAssignValue = require('./_baseAssignValue'), + eq = require('./eq'); + +/** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignMergeValue(object, key, value) { + if ((value !== undefined && !eq(object[key], value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } +} + +module.exports = assignMergeValue; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_assignValue.js b/node_modules/sequelize-cli/node_modules/lodash/_assignValue.js new file mode 100644 index 0000000..4083957 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_assignValue.js @@ -0,0 +1,28 @@ +var baseAssignValue = require('./_baseAssignValue'), + eq = require('./eq'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } +} + +module.exports = assignValue; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_assocIndexOf.js b/node_modules/sequelize-cli/node_modules/lodash/_assocIndexOf.js new file mode 100644 index 0000000..5b77a2b --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_assocIndexOf.js @@ -0,0 +1,21 @@ +var eq = require('./eq'); + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; +} + +module.exports = assocIndexOf; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseAggregator.js b/node_modules/sequelize-cli/node_modules/lodash/_baseAggregator.js new file mode 100644 index 0000000..4bc9e91 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseAggregator.js @@ -0,0 +1,21 @@ +var baseEach = require('./_baseEach'); + +/** + * Aggregates elements of `collection` on `accumulator` with keys transformed + * by `iteratee` and values set by `setter`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ +function baseAggregator(collection, setter, iteratee, accumulator) { + baseEach(collection, function(value, key, collection) { + setter(accumulator, value, iteratee(value), collection); + }); + return accumulator; +} + +module.exports = baseAggregator; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseAssign.js b/node_modules/sequelize-cli/node_modules/lodash/_baseAssign.js new file mode 100644 index 0000000..e5c4a1a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseAssign.js @@ -0,0 +1,17 @@ +var copyObject = require('./_copyObject'), + keys = require('./keys'); + +/** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); +} + +module.exports = baseAssign; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseAssignIn.js b/node_modules/sequelize-cli/node_modules/lodash/_baseAssignIn.js new file mode 100644 index 0000000..6624f90 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseAssignIn.js @@ -0,0 +1,17 @@ +var copyObject = require('./_copyObject'), + keysIn = require('./keysIn'); + +/** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); +} + +module.exports = baseAssignIn; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseAssignValue.js b/node_modules/sequelize-cli/node_modules/lodash/_baseAssignValue.js new file mode 100644 index 0000000..d6f66ef --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseAssignValue.js @@ -0,0 +1,25 @@ +var defineProperty = require('./_defineProperty'); + +/** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } +} + +module.exports = baseAssignValue; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseAt.js b/node_modules/sequelize-cli/node_modules/lodash/_baseAt.js new file mode 100644 index 0000000..90e4237 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseAt.js @@ -0,0 +1,23 @@ +var get = require('./get'); + +/** + * The base implementation of `_.at` without support for individual paths. + * + * @private + * @param {Object} object The object to iterate over. + * @param {string[]} paths The property paths to pick. + * @returns {Array} Returns the picked elements. + */ +function baseAt(object, paths) { + var index = -1, + length = paths.length, + result = Array(length), + skip = object == null; + + while (++index < length) { + result[index] = skip ? undefined : get(object, paths[index]); + } + return result; +} + +module.exports = baseAt; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseClamp.js b/node_modules/sequelize-cli/node_modules/lodash/_baseClamp.js new file mode 100644 index 0000000..a1c5692 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseClamp.js @@ -0,0 +1,22 @@ +/** + * The base implementation of `_.clamp` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + */ +function baseClamp(number, lower, upper) { + if (number === number) { + if (upper !== undefined) { + number = number <= upper ? number : upper; + } + if (lower !== undefined) { + number = number >= lower ? number : lower; + } + } + return number; +} + +module.exports = baseClamp; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseClone.js b/node_modules/sequelize-cli/node_modules/lodash/_baseClone.js new file mode 100644 index 0000000..7c27a37 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseClone.js @@ -0,0 +1,153 @@ +var Stack = require('./_Stack'), + arrayEach = require('./_arrayEach'), + assignValue = require('./_assignValue'), + baseAssign = require('./_baseAssign'), + baseAssignIn = require('./_baseAssignIn'), + cloneBuffer = require('./_cloneBuffer'), + copyArray = require('./_copyArray'), + copySymbols = require('./_copySymbols'), + copySymbolsIn = require('./_copySymbolsIn'), + getAllKeys = require('./_getAllKeys'), + getAllKeysIn = require('./_getAllKeysIn'), + getTag = require('./_getTag'), + initCloneArray = require('./_initCloneArray'), + initCloneByTag = require('./_initCloneByTag'), + initCloneObject = require('./_initCloneObject'), + isArray = require('./isArray'), + isBuffer = require('./isBuffer'), + isObject = require('./isObject'), + keys = require('./keys'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values supported by `_.clone`. */ +var cloneableTags = {}; +cloneableTags[argsTag] = cloneableTags[arrayTag] = +cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = +cloneableTags[boolTag] = cloneableTags[dateTag] = +cloneableTags[float32Tag] = cloneableTags[float64Tag] = +cloneableTags[int8Tag] = cloneableTags[int16Tag] = +cloneableTags[int32Tag] = cloneableTags[mapTag] = +cloneableTags[numberTag] = cloneableTags[objectTag] = +cloneableTags[regexpTag] = cloneableTags[setTag] = +cloneableTags[stringTag] = cloneableTags[symbolTag] = +cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = +cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; +cloneableTags[errorTag] = cloneableTags[funcTag] = +cloneableTags[weakMapTag] = false; + +/** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ +function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; + + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; + + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = (isFlat || isFunc) ? {} : initCloneObject(value); + if (!isDeep) { + return isFlat + ? copySymbolsIn(value, baseAssignIn(result, value)) + : copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, baseClone, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + var keysFunc = isFull + ? (isFlat ? getAllKeysIn : getAllKeys) + : (isFlat ? keysIn : keys); + + var props = isArr ? undefined : keysFunc(value); + arrayEach(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; +} + +module.exports = baseClone; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseConforms.js b/node_modules/sequelize-cli/node_modules/lodash/_baseConforms.js new file mode 100644 index 0000000..947e20d --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseConforms.js @@ -0,0 +1,18 @@ +var baseConformsTo = require('./_baseConformsTo'), + keys = require('./keys'); + +/** + * The base implementation of `_.conforms` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + */ +function baseConforms(source) { + var props = keys(source); + return function(object) { + return baseConformsTo(object, source, props); + }; +} + +module.exports = baseConforms; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseConformsTo.js b/node_modules/sequelize-cli/node_modules/lodash/_baseConformsTo.js new file mode 100644 index 0000000..e449cb8 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseConformsTo.js @@ -0,0 +1,27 @@ +/** + * The base implementation of `_.conformsTo` which accepts `props` to check. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + */ +function baseConformsTo(object, source, props) { + var length = props.length; + if (object == null) { + return !length; + } + object = Object(object); + while (length--) { + var key = props[length], + predicate = source[key], + value = object[key]; + + if ((value === undefined && !(key in object)) || !predicate(value)) { + return false; + } + } + return true; +} + +module.exports = baseConformsTo; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseCreate.js b/node_modules/sequelize-cli/node_modules/lodash/_baseCreate.js new file mode 100644 index 0000000..ffa6a52 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseCreate.js @@ -0,0 +1,30 @@ +var isObject = require('./isObject'); + +/** Built-in value references. */ +var objectCreate = Object.create; + +/** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ +var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; +}()); + +module.exports = baseCreate; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseDelay.js b/node_modules/sequelize-cli/node_modules/lodash/_baseDelay.js new file mode 100644 index 0000000..1486d69 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseDelay.js @@ -0,0 +1,21 @@ +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {Array} args The arguments to provide to `func`. + * @returns {number|Object} Returns the timer id or timeout object. + */ +function baseDelay(func, wait, args) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return setTimeout(function() { func.apply(undefined, args); }, wait); +} + +module.exports = baseDelay; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseDifference.js b/node_modules/sequelize-cli/node_modules/lodash/_baseDifference.js new file mode 100644 index 0000000..343ac19 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseDifference.js @@ -0,0 +1,67 @@ +var SetCache = require('./_SetCache'), + arrayIncludes = require('./_arrayIncludes'), + arrayIncludesWith = require('./_arrayIncludesWith'), + arrayMap = require('./_arrayMap'), + baseUnary = require('./_baseUnary'), + cacheHas = require('./_cacheHas'); + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * The base implementation of methods like `_.difference` without support + * for excluding multiple arrays or iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Array} values The values to exclude. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + */ +function baseDifference(array, values, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + isCommon = true, + length = array.length, + result = [], + valuesLength = values.length; + + if (!length) { + return result; + } + if (iteratee) { + values = arrayMap(values, baseUnary(iteratee)); + } + if (comparator) { + includes = arrayIncludesWith; + isCommon = false; + } + else if (values.length >= LARGE_ARRAY_SIZE) { + includes = cacheHas; + isCommon = false; + values = new SetCache(values); + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee == null ? value : iteratee(value); + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === computed) { + continue outer; + } + } + result.push(value); + } + else if (!includes(values, computed, comparator)) { + result.push(value); + } + } + return result; +} + +module.exports = baseDifference; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseEach.js b/node_modules/sequelize-cli/node_modules/lodash/_baseEach.js new file mode 100644 index 0000000..512c067 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseEach.js @@ -0,0 +1,14 @@ +var baseForOwn = require('./_baseForOwn'), + createBaseEach = require('./_createBaseEach'); + +/** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ +var baseEach = createBaseEach(baseForOwn); + +module.exports = baseEach; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseEachRight.js b/node_modules/sequelize-cli/node_modules/lodash/_baseEachRight.js new file mode 100644 index 0000000..0a8feec --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseEachRight.js @@ -0,0 +1,14 @@ +var baseForOwnRight = require('./_baseForOwnRight'), + createBaseEach = require('./_createBaseEach'); + +/** + * The base implementation of `_.forEachRight` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ +var baseEachRight = createBaseEach(baseForOwnRight, true); + +module.exports = baseEachRight; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseEvery.js b/node_modules/sequelize-cli/node_modules/lodash/_baseEvery.js new file mode 100644 index 0000000..fa52f7b --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseEvery.js @@ -0,0 +1,21 @@ +var baseEach = require('./_baseEach'); + +/** + * The base implementation of `_.every` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ +function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function(value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; +} + +module.exports = baseEvery; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseExtremum.js b/node_modules/sequelize-cli/node_modules/lodash/_baseExtremum.js new file mode 100644 index 0000000..9d6aa77 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseExtremum.js @@ -0,0 +1,32 @@ +var isSymbol = require('./isSymbol'); + +/** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ +function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if (current != null && (computed === undefined + ? (current === current && !isSymbol(current)) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } + } + return result; +} + +module.exports = baseExtremum; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseFill.js b/node_modules/sequelize-cli/node_modules/lodash/_baseFill.js new file mode 100644 index 0000000..46ef9c7 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseFill.js @@ -0,0 +1,32 @@ +var toInteger = require('./toInteger'), + toLength = require('./toLength'); + +/** + * The base implementation of `_.fill` without an iteratee call guard. + * + * @private + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + */ +function baseFill(array, value, start, end) { + var length = array.length; + + start = toInteger(start); + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = (end === undefined || end > length) ? length : toInteger(end); + if (end < 0) { + end += length; + } + end = start > end ? 0 : toLength(end); + while (start < end) { + array[start++] = value; + } + return array; +} + +module.exports = baseFill; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseFilter.js b/node_modules/sequelize-cli/node_modules/lodash/_baseFilter.js new file mode 100644 index 0000000..4678477 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseFilter.js @@ -0,0 +1,21 @@ +var baseEach = require('./_baseEach'); + +/** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; +} + +module.exports = baseFilter; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseFindIndex.js b/node_modules/sequelize-cli/node_modules/lodash/_baseFindIndex.js new file mode 100644 index 0000000..e3f5d8a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseFindIndex.js @@ -0,0 +1,24 @@ +/** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; +} + +module.exports = baseFindIndex; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseFindKey.js b/node_modules/sequelize-cli/node_modules/lodash/_baseFindKey.js new file mode 100644 index 0000000..2e430f3 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseFindKey.js @@ -0,0 +1,23 @@ +/** + * The base implementation of methods like `_.findKey` and `_.findLastKey`, + * without support for iteratee shorthands, which iterates over `collection` + * using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the found element or its key, else `undefined`. + */ +function baseFindKey(collection, predicate, eachFunc) { + var result; + eachFunc(collection, function(value, key, collection) { + if (predicate(value, key, collection)) { + result = key; + return false; + } + }); + return result; +} + +module.exports = baseFindKey; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseFlatten.js b/node_modules/sequelize-cli/node_modules/lodash/_baseFlatten.js new file mode 100644 index 0000000..4b1e009 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseFlatten.js @@ -0,0 +1,38 @@ +var arrayPush = require('./_arrayPush'), + isFlattenable = require('./_isFlattenable'); + +/** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ +function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; +} + +module.exports = baseFlatten; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseFor.js b/node_modules/sequelize-cli/node_modules/lodash/_baseFor.js new file mode 100644 index 0000000..d946590 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseFor.js @@ -0,0 +1,16 @@ +var createBaseFor = require('./_createBaseFor'); + +/** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ +var baseFor = createBaseFor(); + +module.exports = baseFor; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseForOwn.js b/node_modules/sequelize-cli/node_modules/lodash/_baseForOwn.js new file mode 100644 index 0000000..503d523 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseForOwn.js @@ -0,0 +1,16 @@ +var baseFor = require('./_baseFor'), + keys = require('./keys'); + +/** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); +} + +module.exports = baseForOwn; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseForOwnRight.js b/node_modules/sequelize-cli/node_modules/lodash/_baseForOwnRight.js new file mode 100644 index 0000000..a4b10e6 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseForOwnRight.js @@ -0,0 +1,16 @@ +var baseForRight = require('./_baseForRight'), + keys = require('./keys'); + +/** + * The base implementation of `_.forOwnRight` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwnRight(object, iteratee) { + return object && baseForRight(object, iteratee, keys); +} + +module.exports = baseForOwnRight; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseForRight.js b/node_modules/sequelize-cli/node_modules/lodash/_baseForRight.js new file mode 100644 index 0000000..32842cd --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseForRight.js @@ -0,0 +1,15 @@ +var createBaseFor = require('./_createBaseFor'); + +/** + * This function is like `baseFor` except that it iterates over properties + * in the opposite order. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ +var baseForRight = createBaseFor(true); + +module.exports = baseForRight; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseFunctions.js b/node_modules/sequelize-cli/node_modules/lodash/_baseFunctions.js new file mode 100644 index 0000000..d23bc9b --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseFunctions.js @@ -0,0 +1,19 @@ +var arrayFilter = require('./_arrayFilter'), + isFunction = require('./isFunction'); + +/** + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from `props`. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the function names. + */ +function baseFunctions(object, props) { + return arrayFilter(props, function(key) { + return isFunction(object[key]); + }); +} + +module.exports = baseFunctions; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseGet.js b/node_modules/sequelize-cli/node_modules/lodash/_baseGet.js new file mode 100644 index 0000000..a194913 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseGet.js @@ -0,0 +1,24 @@ +var castPath = require('./_castPath'), + toKey = require('./_toKey'); + +/** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ +function baseGet(object, path) { + path = castPath(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return (index && index == length) ? object : undefined; +} + +module.exports = baseGet; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseGetAllKeys.js b/node_modules/sequelize-cli/node_modules/lodash/_baseGetAllKeys.js new file mode 100644 index 0000000..8ad204e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseGetAllKeys.js @@ -0,0 +1,20 @@ +var arrayPush = require('./_arrayPush'), + isArray = require('./isArray'); + +/** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ +function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); +} + +module.exports = baseGetAllKeys; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseGetTag.js b/node_modules/sequelize-cli/node_modules/lodash/_baseGetTag.js new file mode 100644 index 0000000..b927ccc --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseGetTag.js @@ -0,0 +1,28 @@ +var Symbol = require('./_Symbol'), + getRawTag = require('./_getRawTag'), + objectToString = require('./_objectToString'); + +/** `Object#toString` result references. */ +var nullTag = '[object Null]', + undefinedTag = '[object Undefined]'; + +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +/** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); +} + +module.exports = baseGetTag; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseGt.js b/node_modules/sequelize-cli/node_modules/lodash/_baseGt.js new file mode 100644 index 0000000..502d273 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseGt.js @@ -0,0 +1,14 @@ +/** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ +function baseGt(value, other) { + return value > other; +} + +module.exports = baseGt; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseHas.js b/node_modules/sequelize-cli/node_modules/lodash/_baseHas.js new file mode 100644 index 0000000..1b73032 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseHas.js @@ -0,0 +1,19 @@ +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.has` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHas(object, key) { + return object != null && hasOwnProperty.call(object, key); +} + +module.exports = baseHas; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseHasIn.js b/node_modules/sequelize-cli/node_modules/lodash/_baseHasIn.js new file mode 100644 index 0000000..2e0d042 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseHasIn.js @@ -0,0 +1,13 @@ +/** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHasIn(object, key) { + return object != null && key in Object(object); +} + +module.exports = baseHasIn; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseInRange.js b/node_modules/sequelize-cli/node_modules/lodash/_baseInRange.js new file mode 100644 index 0000000..ec95666 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseInRange.js @@ -0,0 +1,18 @@ +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * The base implementation of `_.inRange` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to check. + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + */ +function baseInRange(number, start, end) { + return number >= nativeMin(start, end) && number < nativeMax(start, end); +} + +module.exports = baseInRange; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseIndexOf.js b/node_modules/sequelize-cli/node_modules/lodash/_baseIndexOf.js new file mode 100644 index 0000000..167e706 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseIndexOf.js @@ -0,0 +1,20 @@ +var baseFindIndex = require('./_baseFindIndex'), + baseIsNaN = require('./_baseIsNaN'), + strictIndexOf = require('./_strictIndexOf'); + +/** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseIndexOf(array, value, fromIndex) { + return value === value + ? strictIndexOf(array, value, fromIndex) + : baseFindIndex(array, baseIsNaN, fromIndex); +} + +module.exports = baseIndexOf; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseIndexOfWith.js b/node_modules/sequelize-cli/node_modules/lodash/_baseIndexOfWith.js new file mode 100644 index 0000000..f815fe0 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseIndexOfWith.js @@ -0,0 +1,23 @@ +/** + * This function is like `baseIndexOf` except that it accepts a comparator. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @param {Function} comparator The comparator invoked per element. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseIndexOfWith(array, value, fromIndex, comparator) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (comparator(array[index], value)) { + return index; + } + } + return -1; +} + +module.exports = baseIndexOfWith; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseIntersection.js b/node_modules/sequelize-cli/node_modules/lodash/_baseIntersection.js new file mode 100644 index 0000000..c1d250c --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseIntersection.js @@ -0,0 +1,74 @@ +var SetCache = require('./_SetCache'), + arrayIncludes = require('./_arrayIncludes'), + arrayIncludesWith = require('./_arrayIncludesWith'), + arrayMap = require('./_arrayMap'), + baseUnary = require('./_baseUnary'), + cacheHas = require('./_cacheHas'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * The base implementation of methods like `_.intersection`, without support + * for iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of shared values. + */ +function baseIntersection(arrays, iteratee, comparator) { + var includes = comparator ? arrayIncludesWith : arrayIncludes, + length = arrays[0].length, + othLength = arrays.length, + othIndex = othLength, + caches = Array(othLength), + maxLength = Infinity, + result = []; + + while (othIndex--) { + var array = arrays[othIndex]; + if (othIndex && iteratee) { + array = arrayMap(array, baseUnary(iteratee)); + } + maxLength = nativeMin(array.length, maxLength); + caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) + ? new SetCache(othIndex && array) + : undefined; + } + array = arrays[0]; + + var index = -1, + seen = caches[0]; + + outer: + while (++index < length && result.length < maxLength) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (!(seen + ? cacheHas(seen, computed) + : includes(result, computed, comparator) + )) { + othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if (!(cache + ? cacheHas(cache, computed) + : includes(arrays[othIndex], computed, comparator)) + ) { + continue outer; + } + } + if (seen) { + seen.push(computed); + } + result.push(value); + } + } + return result; +} + +module.exports = baseIntersection; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseInverter.js b/node_modules/sequelize-cli/node_modules/lodash/_baseInverter.js new file mode 100644 index 0000000..fbc337f --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseInverter.js @@ -0,0 +1,21 @@ +var baseForOwn = require('./_baseForOwn'); + +/** + * The base implementation of `_.invert` and `_.invertBy` which inverts + * `object` with values transformed by `iteratee` and set by `setter`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform values. + * @param {Object} accumulator The initial inverted object. + * @returns {Function} Returns `accumulator`. + */ +function baseInverter(object, setter, iteratee, accumulator) { + baseForOwn(object, function(value, key, object) { + setter(accumulator, iteratee(value), key, object); + }); + return accumulator; +} + +module.exports = baseInverter; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseInvoke.js b/node_modules/sequelize-cli/node_modules/lodash/_baseInvoke.js new file mode 100644 index 0000000..49bcf3c --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseInvoke.js @@ -0,0 +1,24 @@ +var apply = require('./_apply'), + castPath = require('./_castPath'), + last = require('./last'), + parent = require('./_parent'), + toKey = require('./_toKey'); + +/** + * The base implementation of `_.invoke` without support for individual + * method arguments. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {Array} args The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + */ +function baseInvoke(object, path, args) { + path = castPath(path, object); + object = parent(object, path); + var func = object == null ? object : object[toKey(last(path))]; + return func == null ? undefined : apply(func, object, args); +} + +module.exports = baseInvoke; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseIsArguments.js b/node_modules/sequelize-cli/node_modules/lodash/_baseIsArguments.js new file mode 100644 index 0000000..b3562cc --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseIsArguments.js @@ -0,0 +1,18 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]'; + +/** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ +function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; +} + +module.exports = baseIsArguments; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseIsArrayBuffer.js b/node_modules/sequelize-cli/node_modules/lodash/_baseIsArrayBuffer.js new file mode 100644 index 0000000..a2c4f30 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseIsArrayBuffer.js @@ -0,0 +1,17 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +var arrayBufferTag = '[object ArrayBuffer]'; + +/** + * The base implementation of `_.isArrayBuffer` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + */ +function baseIsArrayBuffer(value) { + return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; +} + +module.exports = baseIsArrayBuffer; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseIsDate.js b/node_modules/sequelize-cli/node_modules/lodash/_baseIsDate.js new file mode 100644 index 0000000..ba67c78 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseIsDate.js @@ -0,0 +1,18 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var dateTag = '[object Date]'; + +/** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ +function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; +} + +module.exports = baseIsDate; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseIsEqual.js b/node_modules/sequelize-cli/node_modules/lodash/_baseIsEqual.js new file mode 100644 index 0000000..00a68a4 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseIsEqual.js @@ -0,0 +1,28 @@ +var baseIsEqualDeep = require('./_baseIsEqualDeep'), + isObjectLike = require('./isObjectLike'); + +/** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ +function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); +} + +module.exports = baseIsEqual; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseIsEqualDeep.js b/node_modules/sequelize-cli/node_modules/lodash/_baseIsEqualDeep.js new file mode 100644 index 0000000..e3cfd6a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseIsEqualDeep.js @@ -0,0 +1,83 @@ +var Stack = require('./_Stack'), + equalArrays = require('./_equalArrays'), + equalByTag = require('./_equalByTag'), + equalObjects = require('./_equalObjects'), + getTag = require('./_getTag'), + isArray = require('./isArray'), + isBuffer = require('./isBuffer'), + isTypedArray = require('./isTypedArray'); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + objectTag = '[object Object]'; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : getTag(object), + othTag = othIsArr ? arrayTag : getTag(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new Stack); + return (objIsArr || isTypedArray(object)) + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new Stack); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); +} + +module.exports = baseIsEqualDeep; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseIsMap.js b/node_modules/sequelize-cli/node_modules/lodash/_baseIsMap.js new file mode 100644 index 0000000..02a4021 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseIsMap.js @@ -0,0 +1,18 @@ +var getTag = require('./_getTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var mapTag = '[object Map]'; + +/** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ +function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; +} + +module.exports = baseIsMap; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseIsMatch.js b/node_modules/sequelize-cli/node_modules/lodash/_baseIsMatch.js new file mode 100644 index 0000000..72494be --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseIsMatch.js @@ -0,0 +1,62 @@ +var Stack = require('./_Stack'), + baseIsEqual = require('./_baseIsEqual'); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ +function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new Stack; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } + } + } + return true; +} + +module.exports = baseIsMatch; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseIsNaN.js b/node_modules/sequelize-cli/node_modules/lodash/_baseIsNaN.js new file mode 100644 index 0000000..316f1eb --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseIsNaN.js @@ -0,0 +1,12 @@ +/** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ +function baseIsNaN(value) { + return value !== value; +} + +module.exports = baseIsNaN; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseIsNative.js b/node_modules/sequelize-cli/node_modules/lodash/_baseIsNative.js new file mode 100644 index 0000000..8702330 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseIsNative.js @@ -0,0 +1,47 @@ +var isFunction = require('./isFunction'), + isMasked = require('./_isMasked'), + isObject = require('./isObject'), + toSource = require('./_toSource'); + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Used for built-in method references. */ +var funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} + +module.exports = baseIsNative; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseIsRegExp.js b/node_modules/sequelize-cli/node_modules/lodash/_baseIsRegExp.js new file mode 100644 index 0000000..6cd7c1a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseIsRegExp.js @@ -0,0 +1,18 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var regexpTag = '[object RegExp]'; + +/** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ +function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; +} + +module.exports = baseIsRegExp; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseIsSet.js b/node_modules/sequelize-cli/node_modules/lodash/_baseIsSet.js new file mode 100644 index 0000000..6dee367 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseIsSet.js @@ -0,0 +1,18 @@ +var getTag = require('./_getTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var setTag = '[object Set]'; + +/** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ +function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; +} + +module.exports = baseIsSet; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseIsTypedArray.js b/node_modules/sequelize-cli/node_modules/lodash/_baseIsTypedArray.js new file mode 100644 index 0000000..1edb32f --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseIsTypedArray.js @@ -0,0 +1,60 @@ +var baseGetTag = require('./_baseGetTag'), + isLength = require('./isLength'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values of typed arrays. */ +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = +typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = +typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = +typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = +typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag] = typedArrayTags[arrayTag] = +typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = +typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = +typedArrayTags[errorTag] = typedArrayTags[funcTag] = +typedArrayTags[mapTag] = typedArrayTags[numberTag] = +typedArrayTags[objectTag] = typedArrayTags[regexpTag] = +typedArrayTags[setTag] = typedArrayTags[stringTag] = +typedArrayTags[weakMapTag] = false; + +/** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ +function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; +} + +module.exports = baseIsTypedArray; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseIteratee.js b/node_modules/sequelize-cli/node_modules/lodash/_baseIteratee.js new file mode 100644 index 0000000..995c257 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseIteratee.js @@ -0,0 +1,31 @@ +var baseMatches = require('./_baseMatches'), + baseMatchesProperty = require('./_baseMatchesProperty'), + identity = require('./identity'), + isArray = require('./isArray'), + property = require('./property'); + +/** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ +function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity; + } + if (typeof value == 'object') { + return isArray(value) + ? baseMatchesProperty(value[0], value[1]) + : baseMatches(value); + } + return property(value); +} + +module.exports = baseIteratee; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseKeys.js b/node_modules/sequelize-cli/node_modules/lodash/_baseKeys.js new file mode 100644 index 0000000..45e9e6f --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseKeys.js @@ -0,0 +1,30 @@ +var isPrototype = require('./_isPrototype'), + nativeKeys = require('./_nativeKeys'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; +} + +module.exports = baseKeys; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseKeysIn.js b/node_modules/sequelize-cli/node_modules/lodash/_baseKeysIn.js new file mode 100644 index 0000000..ea8a0a1 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseKeysIn.js @@ -0,0 +1,33 @@ +var isObject = require('./isObject'), + isPrototype = require('./_isPrototype'), + nativeKeysIn = require('./_nativeKeysIn'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; +} + +module.exports = baseKeysIn; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseLodash.js b/node_modules/sequelize-cli/node_modules/lodash/_baseLodash.js new file mode 100644 index 0000000..f76c790 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseLodash.js @@ -0,0 +1,10 @@ +/** + * The function whose prototype chain sequence wrappers inherit from. + * + * @private + */ +function baseLodash() { + // No operation performed. +} + +module.exports = baseLodash; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseLt.js b/node_modules/sequelize-cli/node_modules/lodash/_baseLt.js new file mode 100644 index 0000000..8674d29 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseLt.js @@ -0,0 +1,14 @@ +/** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ +function baseLt(value, other) { + return value < other; +} + +module.exports = baseLt; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseMap.js b/node_modules/sequelize-cli/node_modules/lodash/_baseMap.js new file mode 100644 index 0000000..0bf5cea --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseMap.js @@ -0,0 +1,22 @@ +var baseEach = require('./_baseEach'), + isArrayLike = require('./isArrayLike'); + +/** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; +} + +module.exports = baseMap; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseMatches.js b/node_modules/sequelize-cli/node_modules/lodash/_baseMatches.js new file mode 100644 index 0000000..e56582a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseMatches.js @@ -0,0 +1,22 @@ +var baseIsMatch = require('./_baseIsMatch'), + getMatchData = require('./_getMatchData'), + matchesStrictComparable = require('./_matchesStrictComparable'); + +/** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || baseIsMatch(object, source, matchData); + }; +} + +module.exports = baseMatches; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseMatchesProperty.js b/node_modules/sequelize-cli/node_modules/lodash/_baseMatchesProperty.js new file mode 100644 index 0000000..24afd89 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseMatchesProperty.js @@ -0,0 +1,33 @@ +var baseIsEqual = require('./_baseIsEqual'), + get = require('./get'), + hasIn = require('./hasIn'), + isKey = require('./_isKey'), + isStrictComparable = require('./_isStrictComparable'), + matchesStrictComparable = require('./_matchesStrictComparable'), + toKey = require('./_toKey'); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); + } + return function(object) { + var objValue = get(object, path); + return (objValue === undefined && objValue === srcValue) + ? hasIn(object, path) + : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; +} + +module.exports = baseMatchesProperty; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseMean.js b/node_modules/sequelize-cli/node_modules/lodash/_baseMean.js new file mode 100644 index 0000000..fa9e00a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseMean.js @@ -0,0 +1,20 @@ +var baseSum = require('./_baseSum'); + +/** Used as references for various `Number` constants. */ +var NAN = 0 / 0; + +/** + * The base implementation of `_.mean` and `_.meanBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the mean. + */ +function baseMean(array, iteratee) { + var length = array == null ? 0 : array.length; + return length ? (baseSum(array, iteratee) / length) : NAN; +} + +module.exports = baseMean; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseMerge.js b/node_modules/sequelize-cli/node_modules/lodash/_baseMerge.js new file mode 100644 index 0000000..f4cb8c6 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseMerge.js @@ -0,0 +1,41 @@ +var Stack = require('./_Stack'), + assignMergeValue = require('./_assignMergeValue'), + baseFor = require('./_baseFor'), + baseMergeDeep = require('./_baseMergeDeep'), + isObject = require('./isObject'), + keysIn = require('./keysIn'); + +/** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + baseFor(source, function(srcValue, key) { + if (isObject(srcValue)) { + stack || (stack = new Stack); + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } + else { + var newValue = customizer + ? customizer(object[key], srcValue, (key + ''), object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }, keysIn); +} + +module.exports = baseMerge; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseMergeDeep.js b/node_modules/sequelize-cli/node_modules/lodash/_baseMergeDeep.js new file mode 100644 index 0000000..42b405a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseMergeDeep.js @@ -0,0 +1,93 @@ +var assignMergeValue = require('./_assignMergeValue'), + cloneBuffer = require('./_cloneBuffer'), + cloneTypedArray = require('./_cloneTypedArray'), + copyArray = require('./_copyArray'), + initCloneObject = require('./_initCloneObject'), + isArguments = require('./isArguments'), + isArray = require('./isArray'), + isArrayLikeObject = require('./isArrayLikeObject'), + isBuffer = require('./isBuffer'), + isFunction = require('./isFunction'), + isObject = require('./isObject'), + isPlainObject = require('./isPlainObject'), + isTypedArray = require('./isTypedArray'), + toPlainObject = require('./toPlainObject'); + +/** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = object[key], + srcValue = source[key], + stacked = stack.get(srcValue); + + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; + + var isCommon = newValue === undefined; + + if (isCommon) { + var isArr = isArray(srcValue), + isBuff = !isArr && isBuffer(srcValue), + isTyped = !isArr && !isBuff && isTypedArray(srcValue); + + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (isArray(objValue)) { + newValue = objValue; + } + else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } + else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } + else if (isTyped) { + isCommon = false; + newValue = cloneTypedArray(srcValue, true); + } + else { + newValue = []; + } + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } + else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { + newValue = initCloneObject(srcValue); + } + } + else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + assignMergeValue(object, key, newValue); +} + +module.exports = baseMergeDeep; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseNth.js b/node_modules/sequelize-cli/node_modules/lodash/_baseNth.js new file mode 100644 index 0000000..0403c2a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseNth.js @@ -0,0 +1,20 @@ +var isIndex = require('./_isIndex'); + +/** + * The base implementation of `_.nth` which doesn't coerce arguments. + * + * @private + * @param {Array} array The array to query. + * @param {number} n The index of the element to return. + * @returns {*} Returns the nth element of `array`. + */ +function baseNth(array, n) { + var length = array.length; + if (!length) { + return; + } + n += n < 0 ? length : 0; + return isIndex(n, length) ? array[n] : undefined; +} + +module.exports = baseNth; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseOrderBy.js b/node_modules/sequelize-cli/node_modules/lodash/_baseOrderBy.js new file mode 100644 index 0000000..d8a46ab --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseOrderBy.js @@ -0,0 +1,34 @@ +var arrayMap = require('./_arrayMap'), + baseIteratee = require('./_baseIteratee'), + baseMap = require('./_baseMap'), + baseSortBy = require('./_baseSortBy'), + baseUnary = require('./_baseUnary'), + compareMultiple = require('./_compareMultiple'), + identity = require('./identity'); + +/** + * The base implementation of `_.orderBy` without param guards. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ +function baseOrderBy(collection, iteratees, orders) { + var index = -1; + iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(baseIteratee)); + + var result = baseMap(collection, function(value, key, collection) { + var criteria = arrayMap(iteratees, function(iteratee) { + return iteratee(value); + }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); + + return baseSortBy(result, function(object, other) { + return compareMultiple(object, other, orders); + }); +} + +module.exports = baseOrderBy; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_basePick.js b/node_modules/sequelize-cli/node_modules/lodash/_basePick.js new file mode 100644 index 0000000..09b458a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_basePick.js @@ -0,0 +1,19 @@ +var basePickBy = require('./_basePickBy'), + hasIn = require('./hasIn'); + +/** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ +function basePick(object, paths) { + return basePickBy(object, paths, function(value, path) { + return hasIn(object, path); + }); +} + +module.exports = basePick; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_basePickBy.js b/node_modules/sequelize-cli/node_modules/lodash/_basePickBy.js new file mode 100644 index 0000000..85be68c --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_basePickBy.js @@ -0,0 +1,30 @@ +var baseGet = require('./_baseGet'), + baseSet = require('./_baseSet'), + castPath = require('./_castPath'); + +/** + * The base implementation of `_.pickBy` without support for iteratee shorthands. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @param {Function} predicate The function invoked per property. + * @returns {Object} Returns the new object. + */ +function basePickBy(object, paths, predicate) { + var index = -1, + length = paths.length, + result = {}; + + while (++index < length) { + var path = paths[index], + value = baseGet(object, path); + + if (predicate(value, path)) { + baseSet(result, castPath(path, object), value); + } + } + return result; +} + +module.exports = basePickBy; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseProperty.js b/node_modules/sequelize-cli/node_modules/lodash/_baseProperty.js new file mode 100644 index 0000000..496281e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseProperty.js @@ -0,0 +1,14 @@ +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; +} + +module.exports = baseProperty; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_basePropertyDeep.js b/node_modules/sequelize-cli/node_modules/lodash/_basePropertyDeep.js new file mode 100644 index 0000000..1e5aae5 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_basePropertyDeep.js @@ -0,0 +1,16 @@ +var baseGet = require('./_baseGet'); + +/** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function basePropertyDeep(path) { + return function(object) { + return baseGet(object, path); + }; +} + +module.exports = basePropertyDeep; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_basePropertyOf.js b/node_modules/sequelize-cli/node_modules/lodash/_basePropertyOf.js new file mode 100644 index 0000000..4617399 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_basePropertyOf.js @@ -0,0 +1,14 @@ +/** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ +function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; +} + +module.exports = basePropertyOf; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_basePullAll.js b/node_modules/sequelize-cli/node_modules/lodash/_basePullAll.js new file mode 100644 index 0000000..305720e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_basePullAll.js @@ -0,0 +1,51 @@ +var arrayMap = require('./_arrayMap'), + baseIndexOf = require('./_baseIndexOf'), + baseIndexOfWith = require('./_baseIndexOfWith'), + baseUnary = require('./_baseUnary'), + copyArray = require('./_copyArray'); + +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/** Built-in value references. */ +var splice = arrayProto.splice; + +/** + * The base implementation of `_.pullAllBy` without support for iteratee + * shorthands. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + */ +function basePullAll(array, values, iteratee, comparator) { + var indexOf = comparator ? baseIndexOfWith : baseIndexOf, + index = -1, + length = values.length, + seen = array; + + if (array === values) { + values = copyArray(values); + } + if (iteratee) { + seen = arrayMap(array, baseUnary(iteratee)); + } + while (++index < length) { + var fromIndex = 0, + value = values[index], + computed = iteratee ? iteratee(value) : value; + + while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { + if (seen !== array) { + splice.call(seen, fromIndex, 1); + } + splice.call(array, fromIndex, 1); + } + } + return array; +} + +module.exports = basePullAll; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_basePullAt.js b/node_modules/sequelize-cli/node_modules/lodash/_basePullAt.js new file mode 100644 index 0000000..c3e9e71 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_basePullAt.js @@ -0,0 +1,37 @@ +var baseUnset = require('./_baseUnset'), + isIndex = require('./_isIndex'); + +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/** Built-in value references. */ +var splice = arrayProto.splice; + +/** + * The base implementation of `_.pullAt` without support for individual + * indexes or capturing the removed elements. + * + * @private + * @param {Array} array The array to modify. + * @param {number[]} indexes The indexes of elements to remove. + * @returns {Array} Returns `array`. + */ +function basePullAt(array, indexes) { + var length = array ? indexes.length : 0, + lastIndex = length - 1; + + while (length--) { + var index = indexes[length]; + if (length == lastIndex || index !== previous) { + var previous = index; + if (isIndex(index)) { + splice.call(array, index, 1); + } else { + baseUnset(array, index); + } + } + } + return array; +} + +module.exports = basePullAt; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseRandom.js b/node_modules/sequelize-cli/node_modules/lodash/_baseRandom.js new file mode 100644 index 0000000..94f76a7 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseRandom.js @@ -0,0 +1,18 @@ +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeFloor = Math.floor, + nativeRandom = Math.random; + +/** + * The base implementation of `_.random` without support for returning + * floating-point numbers. + * + * @private + * @param {number} lower The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the random number. + */ +function baseRandom(lower, upper) { + return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); +} + +module.exports = baseRandom; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseRange.js b/node_modules/sequelize-cli/node_modules/lodash/_baseRange.js new file mode 100644 index 0000000..0fb8e41 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseRange.js @@ -0,0 +1,28 @@ +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil, + nativeMax = Math.max; + +/** + * The base implementation of `_.range` and `_.rangeRight` which doesn't + * coerce arguments. + * + * @private + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @param {number} step The value to increment or decrement by. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the range of numbers. + */ +function baseRange(start, end, step, fromRight) { + var index = -1, + length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), + result = Array(length); + + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; + } + return result; +} + +module.exports = baseRange; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseReduce.js b/node_modules/sequelize-cli/node_modules/lodash/_baseReduce.js new file mode 100644 index 0000000..5a1f8b5 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseReduce.js @@ -0,0 +1,23 @@ +/** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ +function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; +} + +module.exports = baseReduce; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseRepeat.js b/node_modules/sequelize-cli/node_modules/lodash/_baseRepeat.js new file mode 100644 index 0000000..ee44c31 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseRepeat.js @@ -0,0 +1,35 @@ +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeFloor = Math.floor; + +/** + * The base implementation of `_.repeat` which doesn't coerce arguments. + * + * @private + * @param {string} string The string to repeat. + * @param {number} n The number of times to repeat the string. + * @returns {string} Returns the repeated string. + */ +function baseRepeat(string, n) { + var result = ''; + if (!string || n < 1 || n > MAX_SAFE_INTEGER) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + if (n) { + string += string; + } + } while (n); + + return result; +} + +module.exports = baseRepeat; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseRest.js b/node_modules/sequelize-cli/node_modules/lodash/_baseRest.js new file mode 100644 index 0000000..d0dc4bd --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseRest.js @@ -0,0 +1,17 @@ +var identity = require('./identity'), + overRest = require('./_overRest'), + setToString = require('./_setToString'); + +/** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ +function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); +} + +module.exports = baseRest; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseSample.js b/node_modules/sequelize-cli/node_modules/lodash/_baseSample.js new file mode 100644 index 0000000..58582b9 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseSample.js @@ -0,0 +1,15 @@ +var arraySample = require('./_arraySample'), + values = require('./values'); + +/** + * The base implementation of `_.sample`. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + */ +function baseSample(collection) { + return arraySample(values(collection)); +} + +module.exports = baseSample; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseSampleSize.js b/node_modules/sequelize-cli/node_modules/lodash/_baseSampleSize.js new file mode 100644 index 0000000..5c90ec5 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseSampleSize.js @@ -0,0 +1,18 @@ +var baseClamp = require('./_baseClamp'), + shuffleSelf = require('./_shuffleSelf'), + values = require('./values'); + +/** + * The base implementation of `_.sampleSize` without param guards. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ +function baseSampleSize(collection, n) { + var array = values(collection); + return shuffleSelf(array, baseClamp(n, 0, array.length)); +} + +module.exports = baseSampleSize; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseSet.js b/node_modules/sequelize-cli/node_modules/lodash/_baseSet.js new file mode 100644 index 0000000..612a24c --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseSet.js @@ -0,0 +1,47 @@ +var assignValue = require('./_assignValue'), + castPath = require('./_castPath'), + isIndex = require('./_isIndex'), + isObject = require('./isObject'), + toKey = require('./_toKey'); + +/** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ +function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } + path = castPath(path, object); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = toKey(path[index]), + newValue = value; + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) + ? objValue + : (isIndex(path[index + 1]) ? [] : {}); + } + } + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; +} + +module.exports = baseSet; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseSetData.js b/node_modules/sequelize-cli/node_modules/lodash/_baseSetData.js new file mode 100644 index 0000000..c409947 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseSetData.js @@ -0,0 +1,17 @@ +var identity = require('./identity'), + metaMap = require('./_metaMap'); + +/** + * The base implementation of `setData` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ +var baseSetData = !metaMap ? identity : function(func, data) { + metaMap.set(func, data); + return func; +}; + +module.exports = baseSetData; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseSetToString.js b/node_modules/sequelize-cli/node_modules/lodash/_baseSetToString.js new file mode 100644 index 0000000..89eaca3 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseSetToString.js @@ -0,0 +1,22 @@ +var constant = require('./constant'), + defineProperty = require('./_defineProperty'), + identity = require('./identity'); + +/** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ +var baseSetToString = !defineProperty ? identity : function(func, string) { + return defineProperty(func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': constant(string), + 'writable': true + }); +}; + +module.exports = baseSetToString; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseShuffle.js b/node_modules/sequelize-cli/node_modules/lodash/_baseShuffle.js new file mode 100644 index 0000000..023077a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseShuffle.js @@ -0,0 +1,15 @@ +var shuffleSelf = require('./_shuffleSelf'), + values = require('./values'); + +/** + * The base implementation of `_.shuffle`. + * + * @private + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + */ +function baseShuffle(collection) { + return shuffleSelf(values(collection)); +} + +module.exports = baseShuffle; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseSlice.js b/node_modules/sequelize-cli/node_modules/lodash/_baseSlice.js new file mode 100644 index 0000000..786f6c9 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseSlice.js @@ -0,0 +1,31 @@ +/** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ +function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; +} + +module.exports = baseSlice; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseSome.js b/node_modules/sequelize-cli/node_modules/lodash/_baseSome.js new file mode 100644 index 0000000..58f3f44 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseSome.js @@ -0,0 +1,22 @@ +var baseEach = require('./_baseEach'); + +/** + * The base implementation of `_.some` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ +function baseSome(collection, predicate) { + var result; + + baseEach(collection, function(value, index, collection) { + result = predicate(value, index, collection); + return !result; + }); + return !!result; +} + +module.exports = baseSome; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseSortBy.js b/node_modules/sequelize-cli/node_modules/lodash/_baseSortBy.js new file mode 100644 index 0000000..a25c92e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseSortBy.js @@ -0,0 +1,21 @@ +/** + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ +function baseSortBy(array, comparer) { + var length = array.length; + + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; +} + +module.exports = baseSortBy; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseSortedIndex.js b/node_modules/sequelize-cli/node_modules/lodash/_baseSortedIndex.js new file mode 100644 index 0000000..638c366 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseSortedIndex.js @@ -0,0 +1,42 @@ +var baseSortedIndexBy = require('./_baseSortedIndexBy'), + identity = require('./identity'), + isSymbol = require('./isSymbol'); + +/** Used as references for the maximum length and index of an array. */ +var MAX_ARRAY_LENGTH = 4294967295, + HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; + +/** + * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which + * performs a binary search of `array` to determine the index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ +function baseSortedIndex(array, value, retHighest) { + var low = 0, + high = array == null ? low : array.length; + + if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { + while (low < high) { + var mid = (low + high) >>> 1, + computed = array[mid]; + + if (computed !== null && !isSymbol(computed) && + (retHighest ? (computed <= value) : (computed < value))) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + return baseSortedIndexBy(array, value, identity, retHighest); +} + +module.exports = baseSortedIndex; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseSortedIndexBy.js b/node_modules/sequelize-cli/node_modules/lodash/_baseSortedIndexBy.js new file mode 100644 index 0000000..bb22e36 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseSortedIndexBy.js @@ -0,0 +1,64 @@ +var isSymbol = require('./isSymbol'); + +/** Used as references for the maximum length and index of an array. */ +var MAX_ARRAY_LENGTH = 4294967295, + MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeFloor = Math.floor, + nativeMin = Math.min; + +/** + * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy` + * which invokes `iteratee` for `value` and each element of `array` to compute + * their sort ranking. The iteratee is invoked with one argument; (value). + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} iteratee The iteratee invoked per element. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ +function baseSortedIndexBy(array, value, iteratee, retHighest) { + value = iteratee(value); + + var low = 0, + high = array == null ? 0 : array.length, + valIsNaN = value !== value, + valIsNull = value === null, + valIsSymbol = isSymbol(value), + valIsUndefined = value === undefined; + + while (low < high) { + var mid = nativeFloor((low + high) / 2), + computed = iteratee(array[mid]), + othIsDefined = computed !== undefined, + othIsNull = computed === null, + othIsReflexive = computed === computed, + othIsSymbol = isSymbol(computed); + + if (valIsNaN) { + var setLow = retHighest || othIsReflexive; + } else if (valIsUndefined) { + setLow = othIsReflexive && (retHighest || othIsDefined); + } else if (valIsNull) { + setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); + } else if (valIsSymbol) { + setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); + } else if (othIsNull || othIsSymbol) { + setLow = false; + } else { + setLow = retHighest ? (computed <= value) : (computed < value); + } + if (setLow) { + low = mid + 1; + } else { + high = mid; + } + } + return nativeMin(high, MAX_ARRAY_INDEX); +} + +module.exports = baseSortedIndexBy; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseSortedUniq.js b/node_modules/sequelize-cli/node_modules/lodash/_baseSortedUniq.js new file mode 100644 index 0000000..802159a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseSortedUniq.js @@ -0,0 +1,30 @@ +var eq = require('./eq'); + +/** + * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ +function baseSortedUniq(array, iteratee) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + if (!index || !eq(computed, seen)) { + var seen = computed; + result[resIndex++] = value === 0 ? 0 : value; + } + } + return result; +} + +module.exports = baseSortedUniq; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseSum.js b/node_modules/sequelize-cli/node_modules/lodash/_baseSum.js new file mode 100644 index 0000000..a9e84c1 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseSum.js @@ -0,0 +1,24 @@ +/** + * The base implementation of `_.sum` and `_.sumBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the sum. + */ +function baseSum(array, iteratee) { + var result, + index = -1, + length = array.length; + + while (++index < length) { + var current = iteratee(array[index]); + if (current !== undefined) { + result = result === undefined ? current : (result + current); + } + } + return result; +} + +module.exports = baseSum; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseTimes.js b/node_modules/sequelize-cli/node_modules/lodash/_baseTimes.js new file mode 100644 index 0000000..0603fc3 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseTimes.js @@ -0,0 +1,20 @@ +/** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ +function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; +} + +module.exports = baseTimes; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseToNumber.js b/node_modules/sequelize-cli/node_modules/lodash/_baseToNumber.js new file mode 100644 index 0000000..04859f3 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseToNumber.js @@ -0,0 +1,24 @@ +var isSymbol = require('./isSymbol'); + +/** Used as references for various `Number` constants. */ +var NAN = 0 / 0; + +/** + * The base implementation of `_.toNumber` which doesn't ensure correct + * conversions of binary, hexadecimal, or octal string values. + * + * @private + * @param {*} value The value to process. + * @returns {number} Returns the number. + */ +function baseToNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + return +value; +} + +module.exports = baseToNumber; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseToPairs.js b/node_modules/sequelize-cli/node_modules/lodash/_baseToPairs.js new file mode 100644 index 0000000..bff1991 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseToPairs.js @@ -0,0 +1,18 @@ +var arrayMap = require('./_arrayMap'); + +/** + * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array + * of key-value pairs for `object` corresponding to the property names of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the key-value pairs. + */ +function baseToPairs(object, props) { + return arrayMap(props, function(key) { + return [key, object[key]]; + }); +} + +module.exports = baseToPairs; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseToString.js b/node_modules/sequelize-cli/node_modules/lodash/_baseToString.js new file mode 100644 index 0000000..ada6ad2 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseToString.js @@ -0,0 +1,37 @@ +var Symbol = require('./_Symbol'), + arrayMap = require('./_arrayMap'), + isArray = require('./isArray'), + isSymbol = require('./isSymbol'); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return arrayMap(value, baseToString) + ''; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +module.exports = baseToString; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseUnary.js b/node_modules/sequelize-cli/node_modules/lodash/_baseUnary.js new file mode 100644 index 0000000..98639e9 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseUnary.js @@ -0,0 +1,14 @@ +/** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ +function baseUnary(func) { + return function(value) { + return func(value); + }; +} + +module.exports = baseUnary; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseUniq.js b/node_modules/sequelize-cli/node_modules/lodash/_baseUniq.js new file mode 100644 index 0000000..aea459d --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseUniq.js @@ -0,0 +1,72 @@ +var SetCache = require('./_SetCache'), + arrayIncludes = require('./_arrayIncludes'), + arrayIncludesWith = require('./_arrayIncludesWith'), + cacheHas = require('./_cacheHas'), + createSet = require('./_createSet'), + setToArray = require('./_setToArray'); + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ +function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache; + } + else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; +} + +module.exports = baseUniq; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseUnset.js b/node_modules/sequelize-cli/node_modules/lodash/_baseUnset.js new file mode 100644 index 0000000..eefc6e3 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseUnset.js @@ -0,0 +1,20 @@ +var castPath = require('./_castPath'), + last = require('./last'), + parent = require('./_parent'), + toKey = require('./_toKey'); + +/** + * The base implementation of `_.unset`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The property path to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + */ +function baseUnset(object, path) { + path = castPath(path, object); + object = parent(object, path); + return object == null || delete object[toKey(last(path))]; +} + +module.exports = baseUnset; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseUpdate.js b/node_modules/sequelize-cli/node_modules/lodash/_baseUpdate.js new file mode 100644 index 0000000..92a6237 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseUpdate.js @@ -0,0 +1,18 @@ +var baseGet = require('./_baseGet'), + baseSet = require('./_baseSet'); + +/** + * The base implementation of `_.update`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to update. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ +function baseUpdate(object, path, updater, customizer) { + return baseSet(object, path, updater(baseGet(object, path)), customizer); +} + +module.exports = baseUpdate; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseValues.js b/node_modules/sequelize-cli/node_modules/lodash/_baseValues.js new file mode 100644 index 0000000..b95faad --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseValues.js @@ -0,0 +1,19 @@ +var arrayMap = require('./_arrayMap'); + +/** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ +function baseValues(object, props) { + return arrayMap(props, function(key) { + return object[key]; + }); +} + +module.exports = baseValues; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseWhile.js b/node_modules/sequelize-cli/node_modules/lodash/_baseWhile.js new file mode 100644 index 0000000..07eac61 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseWhile.js @@ -0,0 +1,26 @@ +var baseSlice = require('./_baseSlice'); + +/** + * The base implementation of methods like `_.dropWhile` and `_.takeWhile` + * without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to query. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [isDrop] Specify dropping elements instead of taking them. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the slice of `array`. + */ +function baseWhile(array, predicate, isDrop, fromRight) { + var length = array.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length) && + predicate(array[index], index, array)) {} + + return isDrop + ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) + : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); +} + +module.exports = baseWhile; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseWrapperValue.js b/node_modules/sequelize-cli/node_modules/lodash/_baseWrapperValue.js new file mode 100644 index 0000000..443e0df --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseWrapperValue.js @@ -0,0 +1,25 @@ +var LazyWrapper = require('./_LazyWrapper'), + arrayPush = require('./_arrayPush'), + arrayReduce = require('./_arrayReduce'); + +/** + * The base implementation of `wrapperValue` which returns the result of + * performing a sequence of actions on the unwrapped `value`, where each + * successive action is supplied the return value of the previous. + * + * @private + * @param {*} value The unwrapped value. + * @param {Array} actions Actions to perform to resolve the unwrapped value. + * @returns {*} Returns the resolved value. + */ +function baseWrapperValue(value, actions) { + var result = value; + if (result instanceof LazyWrapper) { + result = result.value(); + } + return arrayReduce(actions, function(result, action) { + return action.func.apply(action.thisArg, arrayPush([result], action.args)); + }, result); +} + +module.exports = baseWrapperValue; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseXor.js b/node_modules/sequelize-cli/node_modules/lodash/_baseXor.js new file mode 100644 index 0000000..8e69338 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseXor.js @@ -0,0 +1,36 @@ +var baseDifference = require('./_baseDifference'), + baseFlatten = require('./_baseFlatten'), + baseUniq = require('./_baseUniq'); + +/** + * The base implementation of methods like `_.xor`, without support for + * iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of values. + */ +function baseXor(arrays, iteratee, comparator) { + var length = arrays.length; + if (length < 2) { + return length ? baseUniq(arrays[0]) : []; + } + var index = -1, + result = Array(length); + + while (++index < length) { + var array = arrays[index], + othIndex = -1; + + while (++othIndex < length) { + if (othIndex != index) { + result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator); + } + } + } + return baseUniq(baseFlatten(result, 1), iteratee, comparator); +} + +module.exports = baseXor; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_baseZipObject.js b/node_modules/sequelize-cli/node_modules/lodash/_baseZipObject.js new file mode 100644 index 0000000..401f85b --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_baseZipObject.js @@ -0,0 +1,23 @@ +/** + * This base implementation of `_.zipObject` which assigns values using `assignFunc`. + * + * @private + * @param {Array} props The property identifiers. + * @param {Array} values The property values. + * @param {Function} assignFunc The function to assign values. + * @returns {Object} Returns the new object. + */ +function baseZipObject(props, values, assignFunc) { + var index = -1, + length = props.length, + valsLength = values.length, + result = {}; + + while (++index < length) { + var value = index < valsLength ? values[index] : undefined; + assignFunc(result, props[index], value); + } + return result; +} + +module.exports = baseZipObject; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_cacheHas.js b/node_modules/sequelize-cli/node_modules/lodash/_cacheHas.js new file mode 100644 index 0000000..2dec892 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_cacheHas.js @@ -0,0 +1,13 @@ +/** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function cacheHas(cache, key) { + return cache.has(key); +} + +module.exports = cacheHas; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_castArrayLikeObject.js b/node_modules/sequelize-cli/node_modules/lodash/_castArrayLikeObject.js new file mode 100644 index 0000000..92c75fa --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_castArrayLikeObject.js @@ -0,0 +1,14 @@ +var isArrayLikeObject = require('./isArrayLikeObject'); + +/** + * Casts `value` to an empty array if it's not an array like object. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array|Object} Returns the cast array-like object. + */ +function castArrayLikeObject(value) { + return isArrayLikeObject(value) ? value : []; +} + +module.exports = castArrayLikeObject; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_castFunction.js b/node_modules/sequelize-cli/node_modules/lodash/_castFunction.js new file mode 100644 index 0000000..98c91ae --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_castFunction.js @@ -0,0 +1,14 @@ +var identity = require('./identity'); + +/** + * Casts `value` to `identity` if it's not a function. + * + * @private + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. + */ +function castFunction(value) { + return typeof value == 'function' ? value : identity; +} + +module.exports = castFunction; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_castPath.js b/node_modules/sequelize-cli/node_modules/lodash/_castPath.js new file mode 100644 index 0000000..017e4c1 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_castPath.js @@ -0,0 +1,21 @@ +var isArray = require('./isArray'), + isKey = require('./_isKey'), + stringToPath = require('./_stringToPath'), + toString = require('./toString'); + +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath(toString(value)); +} + +module.exports = castPath; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_castRest.js b/node_modules/sequelize-cli/node_modules/lodash/_castRest.js new file mode 100644 index 0000000..213c66f --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_castRest.js @@ -0,0 +1,14 @@ +var baseRest = require('./_baseRest'); + +/** + * A `baseRest` alias which can be replaced with `identity` by module + * replacement plugins. + * + * @private + * @type {Function} + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ +var castRest = baseRest; + +module.exports = castRest; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_castSlice.js b/node_modules/sequelize-cli/node_modules/lodash/_castSlice.js new file mode 100644 index 0000000..071faeb --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_castSlice.js @@ -0,0 +1,18 @@ +var baseSlice = require('./_baseSlice'); + +/** + * Casts `array` to a slice if it's needed. + * + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. + */ +function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return (!start && end >= length) ? array : baseSlice(array, start, end); +} + +module.exports = castSlice; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_charsEndIndex.js b/node_modules/sequelize-cli/node_modules/lodash/_charsEndIndex.js new file mode 100644 index 0000000..07908ff --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_charsEndIndex.js @@ -0,0 +1,19 @@ +var baseIndexOf = require('./_baseIndexOf'); + +/** + * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the last unmatched string symbol. + */ +function charsEndIndex(strSymbols, chrSymbols) { + var index = strSymbols.length; + + while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; +} + +module.exports = charsEndIndex; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_charsStartIndex.js b/node_modules/sequelize-cli/node_modules/lodash/_charsStartIndex.js new file mode 100644 index 0000000..b17afd2 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_charsStartIndex.js @@ -0,0 +1,20 @@ +var baseIndexOf = require('./_baseIndexOf'); + +/** + * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the first unmatched string symbol. + */ +function charsStartIndex(strSymbols, chrSymbols) { + var index = -1, + length = strSymbols.length; + + while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; +} + +module.exports = charsStartIndex; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_cloneArrayBuffer.js b/node_modules/sequelize-cli/node_modules/lodash/_cloneArrayBuffer.js new file mode 100644 index 0000000..c3d8f6e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_cloneArrayBuffer.js @@ -0,0 +1,16 @@ +var Uint8Array = require('./_Uint8Array'); + +/** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ +function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; +} + +module.exports = cloneArrayBuffer; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_cloneBuffer.js b/node_modules/sequelize-cli/node_modules/lodash/_cloneBuffer.js new file mode 100644 index 0000000..27c4810 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_cloneBuffer.js @@ -0,0 +1,35 @@ +var root = require('./_root'); + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; + +/** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ +function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + + buffer.copy(result); + return result; +} + +module.exports = cloneBuffer; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_cloneDataView.js b/node_modules/sequelize-cli/node_modules/lodash/_cloneDataView.js new file mode 100644 index 0000000..9c9b7b0 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_cloneDataView.js @@ -0,0 +1,16 @@ +var cloneArrayBuffer = require('./_cloneArrayBuffer'); + +/** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ +function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); +} + +module.exports = cloneDataView; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_cloneMap.js b/node_modules/sequelize-cli/node_modules/lodash/_cloneMap.js new file mode 100644 index 0000000..334b73e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_cloneMap.js @@ -0,0 +1,22 @@ +var addMapEntry = require('./_addMapEntry'), + arrayReduce = require('./_arrayReduce'), + mapToArray = require('./_mapToArray'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1; + +/** + * Creates a clone of `map`. + * + * @private + * @param {Object} map The map to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned map. + */ +function cloneMap(map, isDeep, cloneFunc) { + var array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG) : mapToArray(map); + return arrayReduce(array, addMapEntry, new map.constructor); +} + +module.exports = cloneMap; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_cloneRegExp.js b/node_modules/sequelize-cli/node_modules/lodash/_cloneRegExp.js new file mode 100644 index 0000000..64a30df --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_cloneRegExp.js @@ -0,0 +1,17 @@ +/** Used to match `RegExp` flags from their coerced string values. */ +var reFlags = /\w*$/; + +/** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ +function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; +} + +module.exports = cloneRegExp; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_cloneSet.js b/node_modules/sequelize-cli/node_modules/lodash/_cloneSet.js new file mode 100644 index 0000000..713a2f7 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_cloneSet.js @@ -0,0 +1,22 @@ +var addSetEntry = require('./_addSetEntry'), + arrayReduce = require('./_arrayReduce'), + setToArray = require('./_setToArray'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1; + +/** + * Creates a clone of `set`. + * + * @private + * @param {Object} set The set to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned set. + */ +function cloneSet(set, isDeep, cloneFunc) { + var array = isDeep ? cloneFunc(setToArray(set), CLONE_DEEP_FLAG) : setToArray(set); + return arrayReduce(array, addSetEntry, new set.constructor); +} + +module.exports = cloneSet; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_cloneSymbol.js b/node_modules/sequelize-cli/node_modules/lodash/_cloneSymbol.js new file mode 100644 index 0000000..bede39f --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_cloneSymbol.js @@ -0,0 +1,18 @@ +var Symbol = require('./_Symbol'); + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ +function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; +} + +module.exports = cloneSymbol; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_cloneTypedArray.js b/node_modules/sequelize-cli/node_modules/lodash/_cloneTypedArray.js new file mode 100644 index 0000000..7aad84d --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_cloneTypedArray.js @@ -0,0 +1,16 @@ +var cloneArrayBuffer = require('./_cloneArrayBuffer'); + +/** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ +function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); +} + +module.exports = cloneTypedArray; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_compareAscending.js b/node_modules/sequelize-cli/node_modules/lodash/_compareAscending.js new file mode 100644 index 0000000..8dc2791 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_compareAscending.js @@ -0,0 +1,41 @@ +var isSymbol = require('./isSymbol'); + +/** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ +function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = isSymbol(value); + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = isSymbol(other); + + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { + return 1; + } + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { + return -1; + } + } + return 0; +} + +module.exports = compareAscending; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_compareMultiple.js b/node_modules/sequelize-cli/node_modules/lodash/_compareMultiple.js new file mode 100644 index 0000000..ad61f0f --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_compareMultiple.js @@ -0,0 +1,44 @@ +var compareAscending = require('./_compareAscending'); + +/** + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ +function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; +} + +module.exports = compareMultiple; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_composeArgs.js b/node_modules/sequelize-cli/node_modules/lodash/_composeArgs.js new file mode 100644 index 0000000..1ce40f4 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_composeArgs.js @@ -0,0 +1,39 @@ +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates an array that is the composition of partially applied arguments, + * placeholders, and provided arguments into a single array of arguments. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to prepend to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ +function composeArgs(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersLength = holders.length, + leftIndex = -1, + leftLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(leftLength + rangeLength), + isUncurried = !isCurried; + + while (++leftIndex < leftLength) { + result[leftIndex] = partials[leftIndex]; + } + while (++argsIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[holders[argsIndex]] = args[argsIndex]; + } + } + while (rangeLength--) { + result[leftIndex++] = args[argsIndex++]; + } + return result; +} + +module.exports = composeArgs; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_composeArgsRight.js b/node_modules/sequelize-cli/node_modules/lodash/_composeArgsRight.js new file mode 100644 index 0000000..8dc588d --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_composeArgsRight.js @@ -0,0 +1,41 @@ +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * This function is like `composeArgs` except that the arguments composition + * is tailored for `_.partialRight`. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to append to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ +function composeArgsRight(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersIndex = -1, + holdersLength = holders.length, + rightIndex = -1, + rightLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(rangeLength + rightLength), + isUncurried = !isCurried; + + while (++argsIndex < rangeLength) { + result[argsIndex] = args[argsIndex]; + } + var offset = argsIndex; + while (++rightIndex < rightLength) { + result[offset + rightIndex] = partials[rightIndex]; + } + while (++holdersIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[offset + holders[holdersIndex]] = args[argsIndex++]; + } + } + return result; +} + +module.exports = composeArgsRight; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_copyArray.js b/node_modules/sequelize-cli/node_modules/lodash/_copyArray.js new file mode 100644 index 0000000..cd94d5d --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_copyArray.js @@ -0,0 +1,20 @@ +/** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ +function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; +} + +module.exports = copyArray; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_copyObject.js b/node_modules/sequelize-cli/node_modules/lodash/_copyObject.js new file mode 100644 index 0000000..2f2a5c2 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_copyObject.js @@ -0,0 +1,40 @@ +var assignValue = require('./_assignValue'), + baseAssignValue = require('./_baseAssignValue'); + +/** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ +function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; +} + +module.exports = copyObject; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_copySymbols.js b/node_modules/sequelize-cli/node_modules/lodash/_copySymbols.js new file mode 100644 index 0000000..c35944a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_copySymbols.js @@ -0,0 +1,16 @@ +var copyObject = require('./_copyObject'), + getSymbols = require('./_getSymbols'); + +/** + * Copies own symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); +} + +module.exports = copySymbols; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_copySymbolsIn.js b/node_modules/sequelize-cli/node_modules/lodash/_copySymbolsIn.js new file mode 100644 index 0000000..fdf20a7 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_copySymbolsIn.js @@ -0,0 +1,16 @@ +var copyObject = require('./_copyObject'), + getSymbolsIn = require('./_getSymbolsIn'); + +/** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); +} + +module.exports = copySymbolsIn; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_coreJsData.js b/node_modules/sequelize-cli/node_modules/lodash/_coreJsData.js new file mode 100644 index 0000000..f8e5b4e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_coreJsData.js @@ -0,0 +1,6 @@ +var root = require('./_root'); + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +module.exports = coreJsData; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_countHolders.js b/node_modules/sequelize-cli/node_modules/lodash/_countHolders.js new file mode 100644 index 0000000..718fcda --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_countHolders.js @@ -0,0 +1,21 @@ +/** + * Gets the number of `placeholder` occurrences in `array`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} placeholder The placeholder to search for. + * @returns {number} Returns the placeholder count. + */ +function countHolders(array, placeholder) { + var length = array.length, + result = 0; + + while (length--) { + if (array[length] === placeholder) { + ++result; + } + } + return result; +} + +module.exports = countHolders; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_createAggregator.js b/node_modules/sequelize-cli/node_modules/lodash/_createAggregator.js new file mode 100644 index 0000000..0be42c4 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_createAggregator.js @@ -0,0 +1,23 @@ +var arrayAggregator = require('./_arrayAggregator'), + baseAggregator = require('./_baseAggregator'), + baseIteratee = require('./_baseIteratee'), + isArray = require('./isArray'); + +/** + * Creates a function like `_.groupBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} [initializer] The accumulator object initializer. + * @returns {Function} Returns the new aggregator function. + */ +function createAggregator(setter, initializer) { + return function(collection, iteratee) { + var func = isArray(collection) ? arrayAggregator : baseAggregator, + accumulator = initializer ? initializer() : {}; + + return func(collection, setter, baseIteratee(iteratee, 2), accumulator); + }; +} + +module.exports = createAggregator; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_createAssigner.js b/node_modules/sequelize-cli/node_modules/lodash/_createAssigner.js new file mode 100644 index 0000000..1f904c5 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_createAssigner.js @@ -0,0 +1,37 @@ +var baseRest = require('./_baseRest'), + isIterateeCall = require('./_isIterateeCall'); + +/** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ +function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); +} + +module.exports = createAssigner; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_createBaseEach.js b/node_modules/sequelize-cli/node_modules/lodash/_createBaseEach.js new file mode 100644 index 0000000..d24fdd1 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_createBaseEach.js @@ -0,0 +1,32 @@ +var isArrayLike = require('./isArrayLike'); + +/** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; +} + +module.exports = createBaseEach; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_createBaseFor.js b/node_modules/sequelize-cli/node_modules/lodash/_createBaseFor.js new file mode 100644 index 0000000..94cbf29 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_createBaseFor.js @@ -0,0 +1,25 @@ +/** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; +} + +module.exports = createBaseFor; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_createBind.js b/node_modules/sequelize-cli/node_modules/lodash/_createBind.js new file mode 100644 index 0000000..07cb99f --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_createBind.js @@ -0,0 +1,28 @@ +var createCtor = require('./_createCtor'), + root = require('./_root'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1; + +/** + * Creates a function that wraps `func` to invoke it with the optional `this` + * binding of `thisArg`. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @returns {Function} Returns the new wrapped function. + */ +function createBind(func, bitmask, thisArg) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return fn.apply(isBind ? thisArg : this, arguments); + } + return wrapper; +} + +module.exports = createBind; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_createCaseFirst.js b/node_modules/sequelize-cli/node_modules/lodash/_createCaseFirst.js new file mode 100644 index 0000000..fe8ea48 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_createCaseFirst.js @@ -0,0 +1,33 @@ +var castSlice = require('./_castSlice'), + hasUnicode = require('./_hasUnicode'), + stringToArray = require('./_stringToArray'), + toString = require('./toString'); + +/** + * Creates a function like `_.lowerFirst`. + * + * @private + * @param {string} methodName The name of the `String` case method to use. + * @returns {Function} Returns the new case function. + */ +function createCaseFirst(methodName) { + return function(string) { + string = toString(string); + + var strSymbols = hasUnicode(string) + ? stringToArray(string) + : undefined; + + var chr = strSymbols + ? strSymbols[0] + : string.charAt(0); + + var trailing = strSymbols + ? castSlice(strSymbols, 1).join('') + : string.slice(1); + + return chr[methodName]() + trailing; + }; +} + +module.exports = createCaseFirst; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_createCompounder.js b/node_modules/sequelize-cli/node_modules/lodash/_createCompounder.js new file mode 100644 index 0000000..8d4cee2 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_createCompounder.js @@ -0,0 +1,24 @@ +var arrayReduce = require('./_arrayReduce'), + deburr = require('./deburr'), + words = require('./words'); + +/** Used to compose unicode capture groups. */ +var rsApos = "['\u2019]"; + +/** Used to match apostrophes. */ +var reApos = RegExp(rsApos, 'g'); + +/** + * Creates a function like `_.camelCase`. + * + * @private + * @param {Function} callback The function to combine each word. + * @returns {Function} Returns the new compounder function. + */ +function createCompounder(callback) { + return function(string) { + return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); + }; +} + +module.exports = createCompounder; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_createCtor.js b/node_modules/sequelize-cli/node_modules/lodash/_createCtor.js new file mode 100644 index 0000000..9047aa5 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_createCtor.js @@ -0,0 +1,37 @@ +var baseCreate = require('./_baseCreate'), + isObject = require('./isObject'); + +/** + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. + */ +function createCtor(Ctor) { + return function() { + // Use a `switch` statement to work with class constructors. See + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + switch (args.length) { + case 0: return new Ctor; + case 1: return new Ctor(args[0]); + case 2: return new Ctor(args[0], args[1]); + case 3: return new Ctor(args[0], args[1], args[2]); + case 4: return new Ctor(args[0], args[1], args[2], args[3]); + case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); + case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); + case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); + } + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; +} + +module.exports = createCtor; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_createCurry.js b/node_modules/sequelize-cli/node_modules/lodash/_createCurry.js new file mode 100644 index 0000000..f06c2cd --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_createCurry.js @@ -0,0 +1,46 @@ +var apply = require('./_apply'), + createCtor = require('./_createCtor'), + createHybrid = require('./_createHybrid'), + createRecurry = require('./_createRecurry'), + getHolder = require('./_getHolder'), + replaceHolders = require('./_replaceHolders'), + root = require('./_root'); + +/** + * Creates a function that wraps `func` to enable currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {number} arity The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ +function createCurry(func, bitmask, arity) { + var Ctor = createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length, + placeholder = getHolder(wrapper); + + while (index--) { + args[index] = arguments[index]; + } + var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) + ? [] + : replaceHolders(args, placeholder); + + length -= holders.length; + if (length < arity) { + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, undefined, + args, holders, undefined, undefined, arity - length); + } + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return apply(fn, this, args); + } + return wrapper; +} + +module.exports = createCurry; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_createFind.js b/node_modules/sequelize-cli/node_modules/lodash/_createFind.js new file mode 100644 index 0000000..8859ff8 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_createFind.js @@ -0,0 +1,25 @@ +var baseIteratee = require('./_baseIteratee'), + isArrayLike = require('./isArrayLike'), + keys = require('./keys'); + +/** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ +function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = baseIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; +} + +module.exports = createFind; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_createFlow.js b/node_modules/sequelize-cli/node_modules/lodash/_createFlow.js new file mode 100644 index 0000000..baaddbf --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_createFlow.js @@ -0,0 +1,78 @@ +var LodashWrapper = require('./_LodashWrapper'), + flatRest = require('./_flatRest'), + getData = require('./_getData'), + getFuncName = require('./_getFuncName'), + isArray = require('./isArray'), + isLaziable = require('./_isLaziable'); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** Used to compose bitmasks for function metadata. */ +var WRAP_CURRY_FLAG = 8, + WRAP_PARTIAL_FLAG = 32, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256; + +/** + * Creates a `_.flow` or `_.flowRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new flow function. + */ +function createFlow(fromRight) { + return flatRest(function(funcs) { + var length = funcs.length, + index = length, + prereq = LodashWrapper.prototype.thru; + + if (fromRight) { + funcs.reverse(); + } + while (index--) { + var func = funcs[index]; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (prereq && !wrapper && getFuncName(func) == 'wrapper') { + var wrapper = new LodashWrapper([], true); + } + } + index = wrapper ? index : length; + while (++index < length) { + func = funcs[index]; + + var funcName = getFuncName(func), + data = funcName == 'wrapper' ? getData(func) : undefined; + + if (data && isLaziable(data[0]) && + data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && + !data[4].length && data[9] == 1 + ) { + wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); + } else { + wrapper = (func.length == 1 && isLaziable(func)) + ? wrapper[funcName]() + : wrapper.thru(func); + } + } + return function() { + var args = arguments, + value = args[0]; + + if (wrapper && args.length == 1 && isArray(value)) { + return wrapper.plant(value).value(); + } + var index = 0, + result = length ? funcs[index].apply(this, args) : value; + + while (++index < length) { + result = funcs[index].call(this, result); + } + return result; + }; + }); +} + +module.exports = createFlow; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_createHybrid.js b/node_modules/sequelize-cli/node_modules/lodash/_createHybrid.js new file mode 100644 index 0000000..b671bd1 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_createHybrid.js @@ -0,0 +1,92 @@ +var composeArgs = require('./_composeArgs'), + composeArgsRight = require('./_composeArgsRight'), + countHolders = require('./_countHolders'), + createCtor = require('./_createCtor'), + createRecurry = require('./_createRecurry'), + getHolder = require('./_getHolder'), + reorder = require('./_reorder'), + replaceHolders = require('./_replaceHolders'), + root = require('./_root'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_ARY_FLAG = 128, + WRAP_FLIP_FLAG = 512; + +/** + * Creates a function that wraps `func` to invoke it with optional `this` + * binding of `thisArg`, partial application, and currying. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [partialsRight] The arguments to append to those provided + * to the new function. + * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ +function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { + var isAry = bitmask & WRAP_ARY_FLAG, + isBind = bitmask & WRAP_BIND_FLAG, + isBindKey = bitmask & WRAP_BIND_KEY_FLAG, + isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), + isFlip = bitmask & WRAP_FLIP_FLAG, + Ctor = isBindKey ? undefined : createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length; + + while (index--) { + args[index] = arguments[index]; + } + if (isCurried) { + var placeholder = getHolder(wrapper), + holdersCount = countHolders(args, placeholder); + } + if (partials) { + args = composeArgs(args, partials, holders, isCurried); + } + if (partialsRight) { + args = composeArgsRight(args, partialsRight, holdersRight, isCurried); + } + length -= holdersCount; + if (isCurried && length < arity) { + var newHolders = replaceHolders(args, placeholder); + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, thisArg, + args, newHolders, argPos, ary, arity - length + ); + } + var thisBinding = isBind ? thisArg : this, + fn = isBindKey ? thisBinding[func] : func; + + length = args.length; + if (argPos) { + args = reorder(args, argPos); + } else if (isFlip && length > 1) { + args.reverse(); + } + if (isAry && ary < length) { + args.length = ary; + } + if (this && this !== root && this instanceof wrapper) { + fn = Ctor || createCtor(fn); + } + return fn.apply(thisBinding, args); + } + return wrapper; +} + +module.exports = createHybrid; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_createInverter.js b/node_modules/sequelize-cli/node_modules/lodash/_createInverter.js new file mode 100644 index 0000000..6c0c562 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_createInverter.js @@ -0,0 +1,17 @@ +var baseInverter = require('./_baseInverter'); + +/** + * Creates a function like `_.invertBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} toIteratee The function to resolve iteratees. + * @returns {Function} Returns the new inverter function. + */ +function createInverter(setter, toIteratee) { + return function(object, iteratee) { + return baseInverter(object, setter, toIteratee(iteratee), {}); + }; +} + +module.exports = createInverter; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_createMathOperation.js b/node_modules/sequelize-cli/node_modules/lodash/_createMathOperation.js new file mode 100644 index 0000000..f1e238a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_createMathOperation.js @@ -0,0 +1,38 @@ +var baseToNumber = require('./_baseToNumber'), + baseToString = require('./_baseToString'); + +/** + * Creates a function that performs a mathematical operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @param {number} [defaultValue] The value used for `undefined` arguments. + * @returns {Function} Returns the new mathematical operation function. + */ +function createMathOperation(operator, defaultValue) { + return function(value, other) { + var result; + if (value === undefined && other === undefined) { + return defaultValue; + } + if (value !== undefined) { + result = value; + } + if (other !== undefined) { + if (result === undefined) { + return other; + } + if (typeof value == 'string' || typeof other == 'string') { + value = baseToString(value); + other = baseToString(other); + } else { + value = baseToNumber(value); + other = baseToNumber(other); + } + result = operator(value, other); + } + return result; + }; +} + +module.exports = createMathOperation; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_createOver.js b/node_modules/sequelize-cli/node_modules/lodash/_createOver.js new file mode 100644 index 0000000..3b94551 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_createOver.js @@ -0,0 +1,27 @@ +var apply = require('./_apply'), + arrayMap = require('./_arrayMap'), + baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'), + baseUnary = require('./_baseUnary'), + flatRest = require('./_flatRest'); + +/** + * Creates a function like `_.over`. + * + * @private + * @param {Function} arrayFunc The function to iterate over iteratees. + * @returns {Function} Returns the new over function. + */ +function createOver(arrayFunc) { + return flatRest(function(iteratees) { + iteratees = arrayMap(iteratees, baseUnary(baseIteratee)); + return baseRest(function(args) { + var thisArg = this; + return arrayFunc(iteratees, function(iteratee) { + return apply(iteratee, thisArg, args); + }); + }); + }); +} + +module.exports = createOver; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_createPadding.js b/node_modules/sequelize-cli/node_modules/lodash/_createPadding.js new file mode 100644 index 0000000..2124612 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_createPadding.js @@ -0,0 +1,33 @@ +var baseRepeat = require('./_baseRepeat'), + baseToString = require('./_baseToString'), + castSlice = require('./_castSlice'), + hasUnicode = require('./_hasUnicode'), + stringSize = require('./_stringSize'), + stringToArray = require('./_stringToArray'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil; + +/** + * Creates the padding for `string` based on `length`. The `chars` string + * is truncated if the number of characters exceeds `length`. + * + * @private + * @param {number} length The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padding for `string`. + */ +function createPadding(length, chars) { + chars = chars === undefined ? ' ' : baseToString(chars); + + var charsLength = chars.length; + if (charsLength < 2) { + return charsLength ? baseRepeat(chars, length) : chars; + } + var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); + return hasUnicode(chars) + ? castSlice(stringToArray(result), 0, length).join('') + : result.slice(0, length); +} + +module.exports = createPadding; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_createPartial.js b/node_modules/sequelize-cli/node_modules/lodash/_createPartial.js new file mode 100644 index 0000000..e16c248 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_createPartial.js @@ -0,0 +1,43 @@ +var apply = require('./_apply'), + createCtor = require('./_createCtor'), + root = require('./_root'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1; + +/** + * Creates a function that wraps `func` to invoke it with the `this` binding + * of `thisArg` and `partials` prepended to the arguments it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} partials The arguments to prepend to those provided to + * the new function. + * @returns {Function} Returns the new wrapped function. + */ +function createPartial(func, bitmask, thisArg, partials) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var argsIndex = -1, + argsLength = arguments.length, + leftIndex = -1, + leftLength = partials.length, + args = Array(leftLength + argsLength), + fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + return apply(fn, isBind ? thisArg : this, args); + } + return wrapper; +} + +module.exports = createPartial; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_createRange.js b/node_modules/sequelize-cli/node_modules/lodash/_createRange.js new file mode 100644 index 0000000..9f52c77 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_createRange.js @@ -0,0 +1,30 @@ +var baseRange = require('./_baseRange'), + isIterateeCall = require('./_isIterateeCall'), + toFinite = require('./toFinite'); + +/** + * Creates a `_.range` or `_.rangeRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new range function. + */ +function createRange(fromRight) { + return function(start, end, step) { + if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { + end = step = undefined; + } + // Ensure the sign of `-0` is preserved. + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); + return baseRange(start, end, step, fromRight); + }; +} + +module.exports = createRange; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_createRecurry.js b/node_modules/sequelize-cli/node_modules/lodash/_createRecurry.js new file mode 100644 index 0000000..eb29fb2 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_createRecurry.js @@ -0,0 +1,56 @@ +var isLaziable = require('./_isLaziable'), + setData = require('./_setData'), + setWrapToString = require('./_setWrapToString'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_BOUND_FLAG = 4, + WRAP_CURRY_FLAG = 8, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64; + +/** + * Creates a function that wraps `func` to continue currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {Function} wrapFunc The function to create the `func` wrapper. + * @param {*} placeholder The placeholder value. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ +function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { + var isCurry = bitmask & WRAP_CURRY_FLAG, + newHolders = isCurry ? holders : undefined, + newHoldersRight = isCurry ? undefined : holders, + newPartials = isCurry ? partials : undefined, + newPartialsRight = isCurry ? undefined : partials; + + bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG); + bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); + + if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { + bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); + } + var newData = [ + func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, + newHoldersRight, argPos, ary, arity + ]; + + var result = wrapFunc.apply(undefined, newData); + if (isLaziable(func)) { + setData(result, newData); + } + result.placeholder = placeholder; + return setWrapToString(result, func, bitmask); +} + +module.exports = createRecurry; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_createRelationalOperation.js b/node_modules/sequelize-cli/node_modules/lodash/_createRelationalOperation.js new file mode 100644 index 0000000..a17c6b5 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_createRelationalOperation.js @@ -0,0 +1,20 @@ +var toNumber = require('./toNumber'); + +/** + * Creates a function that performs a relational operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @returns {Function} Returns the new relational operation function. + */ +function createRelationalOperation(operator) { + return function(value, other) { + if (!(typeof value == 'string' && typeof other == 'string')) { + value = toNumber(value); + other = toNumber(other); + } + return operator(value, other); + }; +} + +module.exports = createRelationalOperation; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_createRound.js b/node_modules/sequelize-cli/node_modules/lodash/_createRound.js new file mode 100644 index 0000000..bf9b713 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_createRound.js @@ -0,0 +1,33 @@ +var toInteger = require('./toInteger'), + toNumber = require('./toNumber'), + toString = require('./toString'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * Creates a function like `_.round`. + * + * @private + * @param {string} methodName The name of the `Math` method to use when rounding. + * @returns {Function} Returns the new round function. + */ +function createRound(methodName) { + var func = Math[methodName]; + return function(number, precision) { + number = toNumber(number); + precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); + if (precision) { + // Shift with exponential notation to avoid floating-point issues. + // See [MDN](https://mdn.io/round#Examples) for more details. + var pair = (toString(number) + 'e').split('e'), + value = func(pair[0] + 'e' + (+pair[1] + precision)); + + pair = (toString(value) + 'e').split('e'); + return +(pair[0] + 'e' + (+pair[1] - precision)); + } + return func(number); + }; +} + +module.exports = createRound; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_createSet.js b/node_modules/sequelize-cli/node_modules/lodash/_createSet.js new file mode 100644 index 0000000..0f644ee --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_createSet.js @@ -0,0 +1,19 @@ +var Set = require('./_Set'), + noop = require('./noop'), + setToArray = require('./_setToArray'); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ +var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { + return new Set(values); +}; + +module.exports = createSet; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_createToPairs.js b/node_modules/sequelize-cli/node_modules/lodash/_createToPairs.js new file mode 100644 index 0000000..568417a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_createToPairs.js @@ -0,0 +1,30 @@ +var baseToPairs = require('./_baseToPairs'), + getTag = require('./_getTag'), + mapToArray = require('./_mapToArray'), + setToPairs = require('./_setToPairs'); + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + setTag = '[object Set]'; + +/** + * Creates a `_.toPairs` or `_.toPairsIn` function. + * + * @private + * @param {Function} keysFunc The function to get the keys of a given object. + * @returns {Function} Returns the new pairs function. + */ +function createToPairs(keysFunc) { + return function(object) { + var tag = getTag(object); + if (tag == mapTag) { + return mapToArray(object); + } + if (tag == setTag) { + return setToPairs(object); + } + return baseToPairs(object, keysFunc(object)); + }; +} + +module.exports = createToPairs; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_createWrap.js b/node_modules/sequelize-cli/node_modules/lodash/_createWrap.js new file mode 100644 index 0000000..33f0633 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_createWrap.js @@ -0,0 +1,106 @@ +var baseSetData = require('./_baseSetData'), + createBind = require('./_createBind'), + createCurry = require('./_createCurry'), + createHybrid = require('./_createHybrid'), + createPartial = require('./_createPartial'), + getData = require('./_getData'), + mergeData = require('./_mergeData'), + setData = require('./_setData'), + setWrapToString = require('./_setWrapToString'), + toInteger = require('./toInteger'); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates a function that either curries or invokes `func` with optional + * `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` or `_.curryRight` of a bound function + * 8 - `_.curry` + * 16 - `_.curryRight` + * 32 - `_.partial` + * 64 - `_.partialRight` + * 128 - `_.rearg` + * 256 - `_.ary` + * 512 - `_.flip` + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to be partially applied. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ +function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { + var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; + if (!isBindKey && typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = partials ? partials.length : 0; + if (!length) { + bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); + partials = holders = undefined; + } + ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); + arity = arity === undefined ? arity : toInteger(arity); + length -= holders ? holders.length : 0; + + if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { + var partialsRight = partials, + holdersRight = holders; + + partials = holders = undefined; + } + var data = isBindKey ? undefined : getData(func); + + var newData = [ + func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, + argPos, ary, arity + ]; + + if (data) { + mergeData(newData, data); + } + func = newData[0]; + bitmask = newData[1]; + thisArg = newData[2]; + partials = newData[3]; + holders = newData[4]; + arity = newData[9] = newData[9] === undefined + ? (isBindKey ? 0 : func.length) + : nativeMax(newData[9] - length, 0); + + if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { + bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); + } + if (!bitmask || bitmask == WRAP_BIND_FLAG) { + var result = createBind(func, bitmask, thisArg); + } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { + result = createCurry(func, bitmask, arity); + } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { + result = createPartial(func, bitmask, thisArg, partials); + } else { + result = createHybrid.apply(undefined, newData); + } + var setter = data ? baseSetData : setData; + return setWrapToString(setter(result, newData), func, bitmask); +} + +module.exports = createWrap; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_customDefaultsAssignIn.js b/node_modules/sequelize-cli/node_modules/lodash/_customDefaultsAssignIn.js new file mode 100644 index 0000000..1f49e6f --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_customDefaultsAssignIn.js @@ -0,0 +1,29 @@ +var eq = require('./eq'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used by `_.defaults` to customize its `_.assignIn` use to assign properties + * of source objects to the destination object for all destination properties + * that resolve to `undefined`. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to assign. + * @param {Object} object The parent object of `objValue`. + * @returns {*} Returns the value to assign. + */ +function customDefaultsAssignIn(objValue, srcValue, key, object) { + if (objValue === undefined || + (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { + return srcValue; + } + return objValue; +} + +module.exports = customDefaultsAssignIn; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_customDefaultsMerge.js b/node_modules/sequelize-cli/node_modules/lodash/_customDefaultsMerge.js new file mode 100644 index 0000000..4cab317 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_customDefaultsMerge.js @@ -0,0 +1,28 @@ +var baseMerge = require('./_baseMerge'), + isObject = require('./isObject'); + +/** + * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source + * objects into destination objects that are passed thru. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to merge. + * @param {Object} object The parent object of `objValue`. + * @param {Object} source The parent object of `srcValue`. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + * @returns {*} Returns the value to assign. + */ +function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { + if (isObject(objValue) && isObject(srcValue)) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, objValue); + baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); + stack['delete'](srcValue); + } + return objValue; +} + +module.exports = customDefaultsMerge; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_customOmitClone.js b/node_modules/sequelize-cli/node_modules/lodash/_customOmitClone.js new file mode 100644 index 0000000..968db2e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_customOmitClone.js @@ -0,0 +1,16 @@ +var isPlainObject = require('./isPlainObject'); + +/** + * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain + * objects. + * + * @private + * @param {*} value The value to inspect. + * @param {string} key The key of the property to inspect. + * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. + */ +function customOmitClone(value) { + return isPlainObject(value) ? undefined : value; +} + +module.exports = customOmitClone; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_deburrLetter.js b/node_modules/sequelize-cli/node_modules/lodash/_deburrLetter.js new file mode 100644 index 0000000..3e531ed --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_deburrLetter.js @@ -0,0 +1,71 @@ +var basePropertyOf = require('./_basePropertyOf'); + +/** Used to map Latin Unicode letters to basic Latin letters. */ +var deburredLetters = { + // Latin-1 Supplement block. + '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', + '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', + '\xc7': 'C', '\xe7': 'c', + '\xd0': 'D', '\xf0': 'd', + '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', + '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', + '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', + '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', + '\xd1': 'N', '\xf1': 'n', + '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', + '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', + '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', + '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', + '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', + '\xc6': 'Ae', '\xe6': 'ae', + '\xde': 'Th', '\xfe': 'th', + '\xdf': 'ss', + // Latin Extended-A block. + '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', + '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', + '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', + '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', + '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', + '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', + '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', + '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', + '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', + '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', + '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', + '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', + '\u0134': 'J', '\u0135': 'j', + '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', + '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', + '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', + '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', + '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', + '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', + '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', + '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', + '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', + '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', + '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', + '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', + '\u0163': 't', '\u0165': 't', '\u0167': 't', + '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', + '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', + '\u0174': 'W', '\u0175': 'w', + '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', + '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', + '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', + '\u0132': 'IJ', '\u0133': 'ij', + '\u0152': 'Oe', '\u0153': 'oe', + '\u0149': "'n", '\u017f': 's' +}; + +/** + * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A + * letters to basic Latin letters. + * + * @private + * @param {string} letter The matched letter to deburr. + * @returns {string} Returns the deburred letter. + */ +var deburrLetter = basePropertyOf(deburredLetters); + +module.exports = deburrLetter; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_defineProperty.js b/node_modules/sequelize-cli/node_modules/lodash/_defineProperty.js new file mode 100644 index 0000000..b6116d9 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_defineProperty.js @@ -0,0 +1,11 @@ +var getNative = require('./_getNative'); + +var defineProperty = (function() { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} +}()); + +module.exports = defineProperty; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_equalArrays.js b/node_modules/sequelize-cli/node_modules/lodash/_equalArrays.js new file mode 100644 index 0000000..f6a3b7c --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_equalArrays.js @@ -0,0 +1,83 @@ +var SetCache = require('./_SetCache'), + arraySome = require('./_arraySome'), + cacheHas = require('./_cacheHas'); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ +function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(array); + if (stacked && stack.get(other)) { + return stacked == other; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!arraySome(other, function(othValue, othIndex) { + if (!cacheHas(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; +} + +module.exports = equalArrays; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_equalByTag.js b/node_modules/sequelize-cli/node_modules/lodash/_equalByTag.js new file mode 100644 index 0000000..71919e8 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_equalByTag.js @@ -0,0 +1,112 @@ +var Symbol = require('./_Symbol'), + Uint8Array = require('./_Uint8Array'), + eq = require('./eq'), + equalArrays = require('./_equalArrays'), + mapToArray = require('./_mapToArray'), + setToArray = require('./_setToArray'); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]'; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new Uint8Array(object), new Uint8Array(other))) { + return false; + } + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + case mapTag: + var convert = mapToArray; + + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; +} + +module.exports = equalByTag; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_equalObjects.js b/node_modules/sequelize-cli/node_modules/lodash/_equalObjects.js new file mode 100644 index 0000000..17421f3 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_equalObjects.js @@ -0,0 +1,89 @@ +var getAllKeys = require('./_getAllKeys'); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = getAllKeys(object), + objLength = objProps.length, + othProps = getAllKeys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked && stack.get(other)) { + return stacked == other; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; +} + +module.exports = equalObjects; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_escapeHtmlChar.js b/node_modules/sequelize-cli/node_modules/lodash/_escapeHtmlChar.js new file mode 100644 index 0000000..7ca68ee --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_escapeHtmlChar.js @@ -0,0 +1,21 @@ +var basePropertyOf = require('./_basePropertyOf'); + +/** Used to map characters to HTML entities. */ +var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' +}; + +/** + * Used by `_.escape` to convert characters to HTML entities. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ +var escapeHtmlChar = basePropertyOf(htmlEscapes); + +module.exports = escapeHtmlChar; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_escapeStringChar.js b/node_modules/sequelize-cli/node_modules/lodash/_escapeStringChar.js new file mode 100644 index 0000000..44eca96 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_escapeStringChar.js @@ -0,0 +1,22 @@ +/** Used to escape characters for inclusion in compiled string literals. */ +var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\u2028': 'u2028', + '\u2029': 'u2029' +}; + +/** + * Used by `_.template` to escape characters for inclusion in compiled string literals. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ +function escapeStringChar(chr) { + return '\\' + stringEscapes[chr]; +} + +module.exports = escapeStringChar; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_flatRest.js b/node_modules/sequelize-cli/node_modules/lodash/_flatRest.js new file mode 100644 index 0000000..94ab6cc --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_flatRest.js @@ -0,0 +1,16 @@ +var flatten = require('./flatten'), + overRest = require('./_overRest'), + setToString = require('./_setToString'); + +/** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ +function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); +} + +module.exports = flatRest; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_freeGlobal.js b/node_modules/sequelize-cli/node_modules/lodash/_freeGlobal.js new file mode 100644 index 0000000..bbec998 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_freeGlobal.js @@ -0,0 +1,4 @@ +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +module.exports = freeGlobal; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_getAllKeys.js b/node_modules/sequelize-cli/node_modules/lodash/_getAllKeys.js new file mode 100644 index 0000000..a9ce699 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_getAllKeys.js @@ -0,0 +1,16 @@ +var baseGetAllKeys = require('./_baseGetAllKeys'), + getSymbols = require('./_getSymbols'), + keys = require('./keys'); + +/** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); +} + +module.exports = getAllKeys; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_getAllKeysIn.js b/node_modules/sequelize-cli/node_modules/lodash/_getAllKeysIn.js new file mode 100644 index 0000000..1b46678 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_getAllKeysIn.js @@ -0,0 +1,17 @@ +var baseGetAllKeys = require('./_baseGetAllKeys'), + getSymbolsIn = require('./_getSymbolsIn'), + keysIn = require('./keysIn'); + +/** + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeysIn(object) { + return baseGetAllKeys(object, keysIn, getSymbolsIn); +} + +module.exports = getAllKeysIn; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_getData.js b/node_modules/sequelize-cli/node_modules/lodash/_getData.js new file mode 100644 index 0000000..a1fe7b7 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_getData.js @@ -0,0 +1,15 @@ +var metaMap = require('./_metaMap'), + noop = require('./noop'); + +/** + * Gets metadata for `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {*} Returns the metadata for `func`. + */ +var getData = !metaMap ? noop : function(func) { + return metaMap.get(func); +}; + +module.exports = getData; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_getFuncName.js b/node_modules/sequelize-cli/node_modules/lodash/_getFuncName.js new file mode 100644 index 0000000..21e15b3 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_getFuncName.js @@ -0,0 +1,31 @@ +var realNames = require('./_realNames'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Gets the name of `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {string} Returns the function name. + */ +function getFuncName(func) { + var result = (func.name + ''), + array = realNames[result], + length = hasOwnProperty.call(realNames, result) ? array.length : 0; + + while (length--) { + var data = array[length], + otherFunc = data.func; + if (otherFunc == null || otherFunc == func) { + return data.name; + } + } + return result; +} + +module.exports = getFuncName; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_getHolder.js b/node_modules/sequelize-cli/node_modules/lodash/_getHolder.js new file mode 100644 index 0000000..65e94b5 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_getHolder.js @@ -0,0 +1,13 @@ +/** + * Gets the argument placeholder value for `func`. + * + * @private + * @param {Function} func The function to inspect. + * @returns {*} Returns the placeholder value. + */ +function getHolder(func) { + var object = func; + return object.placeholder; +} + +module.exports = getHolder; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_getMapData.js b/node_modules/sequelize-cli/node_modules/lodash/_getMapData.js new file mode 100644 index 0000000..17f6303 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_getMapData.js @@ -0,0 +1,18 @@ +var isKeyable = require('./_isKeyable'); + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +module.exports = getMapData; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_getMatchData.js b/node_modules/sequelize-cli/node_modules/lodash/_getMatchData.js new file mode 100644 index 0000000..2cc70f9 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_getMatchData.js @@ -0,0 +1,24 @@ +var isStrictComparable = require('./_isStrictComparable'), + keys = require('./keys'); + +/** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ +function getMatchData(object) { + var result = keys(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, isStrictComparable(value)]; + } + return result; +} + +module.exports = getMatchData; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_getNative.js b/node_modules/sequelize-cli/node_modules/lodash/_getNative.js new file mode 100644 index 0000000..97a622b --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_getNative.js @@ -0,0 +1,17 @@ +var baseIsNative = require('./_baseIsNative'), + getValue = require('./_getValue'); + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} + +module.exports = getNative; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_getPrototype.js b/node_modules/sequelize-cli/node_modules/lodash/_getPrototype.js new file mode 100644 index 0000000..e808612 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_getPrototype.js @@ -0,0 +1,6 @@ +var overArg = require('./_overArg'); + +/** Built-in value references. */ +var getPrototype = overArg(Object.getPrototypeOf, Object); + +module.exports = getPrototype; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_getRawTag.js b/node_modules/sequelize-cli/node_modules/lodash/_getRawTag.js new file mode 100644 index 0000000..49a95c9 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_getRawTag.js @@ -0,0 +1,46 @@ +var Symbol = require('./_Symbol'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +/** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ +function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; +} + +module.exports = getRawTag; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_getSymbols.js b/node_modules/sequelize-cli/node_modules/lodash/_getSymbols.js new file mode 100644 index 0000000..7d6eafe --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_getSymbols.js @@ -0,0 +1,30 @@ +var arrayFilter = require('./_arrayFilter'), + stubArray = require('./stubArray'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbols = !nativeGetSymbols ? stubArray : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); +}; + +module.exports = getSymbols; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_getSymbolsIn.js b/node_modules/sequelize-cli/node_modules/lodash/_getSymbolsIn.js new file mode 100644 index 0000000..cec0855 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_getSymbolsIn.js @@ -0,0 +1,25 @@ +var arrayPush = require('./_arrayPush'), + getPrototype = require('./_getPrototype'), + getSymbols = require('./_getSymbols'), + stubArray = require('./stubArray'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own and inherited enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { + var result = []; + while (object) { + arrayPush(result, getSymbols(object)); + object = getPrototype(object); + } + return result; +}; + +module.exports = getSymbolsIn; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_getTag.js b/node_modules/sequelize-cli/node_modules/lodash/_getTag.js new file mode 100644 index 0000000..deaf89d --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_getTag.js @@ -0,0 +1,58 @@ +var DataView = require('./_DataView'), + Map = require('./_Map'), + Promise = require('./_Promise'), + Set = require('./_Set'), + WeakMap = require('./_WeakMap'), + baseGetTag = require('./_baseGetTag'), + toSource = require('./_toSource'); + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + setTag = '[object Set]', + weakMapTag = '[object WeakMap]'; + +var dataViewTag = '[object DataView]'; + +/** Used to detect maps, sets, and weakmaps. */ +var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + +/** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +var getTag = baseGetTag; + +// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. +if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function(value) { + var result = baseGetTag(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; +} + +module.exports = getTag; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_getValue.js b/node_modules/sequelize-cli/node_modules/lodash/_getValue.js new file mode 100644 index 0000000..5f7d773 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_getValue.js @@ -0,0 +1,13 @@ +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +module.exports = getValue; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_getView.js b/node_modules/sequelize-cli/node_modules/lodash/_getView.js new file mode 100644 index 0000000..df1e5d4 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_getView.js @@ -0,0 +1,33 @@ +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * Gets the view, applying any `transforms` to the `start` and `end` positions. + * + * @private + * @param {number} start The start of the view. + * @param {number} end The end of the view. + * @param {Array} transforms The transformations to apply to the view. + * @returns {Object} Returns an object containing the `start` and `end` + * positions of the view. + */ +function getView(start, end, transforms) { + var index = -1, + length = transforms.length; + + while (++index < length) { + var data = transforms[index], + size = data.size; + + switch (data.type) { + case 'drop': start += size; break; + case 'dropRight': end -= size; break; + case 'take': end = nativeMin(end, start + size); break; + case 'takeRight': start = nativeMax(start, end - size); break; + } + } + return { 'start': start, 'end': end }; +} + +module.exports = getView; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_getWrapDetails.js b/node_modules/sequelize-cli/node_modules/lodash/_getWrapDetails.js new file mode 100644 index 0000000..3bcc6e4 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_getWrapDetails.js @@ -0,0 +1,17 @@ +/** Used to match wrap detail comments. */ +var reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, + reSplitDetails = /,? & /; + +/** + * Extracts wrapper details from the `source` body comment. + * + * @private + * @param {string} source The source to inspect. + * @returns {Array} Returns the wrapper details. + */ +function getWrapDetails(source) { + var match = source.match(reWrapDetails); + return match ? match[1].split(reSplitDetails) : []; +} + +module.exports = getWrapDetails; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_hasPath.js b/node_modules/sequelize-cli/node_modules/lodash/_hasPath.js new file mode 100644 index 0000000..93dbde1 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_hasPath.js @@ -0,0 +1,39 @@ +var castPath = require('./_castPath'), + isArguments = require('./isArguments'), + isArray = require('./isArray'), + isIndex = require('./_isIndex'), + isLength = require('./isLength'), + toKey = require('./_toKey'); + +/** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ +function hasPath(object, path, hasFunc) { + path = castPath(path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && isLength(length) && isIndex(key, length) && + (isArray(object) || isArguments(object)); +} + +module.exports = hasPath; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_hasUnicode.js b/node_modules/sequelize-cli/node_modules/lodash/_hasUnicode.js new file mode 100644 index 0000000..cb6ca15 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_hasUnicode.js @@ -0,0 +1,26 @@ +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsZWJ = '\\u200d'; + +/** 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/). */ +var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); + +/** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ +function hasUnicode(string) { + return reHasUnicode.test(string); +} + +module.exports = hasUnicode; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_hasUnicodeWord.js b/node_modules/sequelize-cli/node_modules/lodash/_hasUnicodeWord.js new file mode 100644 index 0000000..a35d6e5 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_hasUnicodeWord.js @@ -0,0 +1,15 @@ +/** Used to detect strings that need a more robust regexp to match words. */ +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 ]/; + +/** + * Checks if `string` contains a word composed of Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a word is found, else `false`. + */ +function hasUnicodeWord(string) { + return reHasUnicodeWord.test(string); +} + +module.exports = hasUnicodeWord; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_hashClear.js b/node_modules/sequelize-cli/node_modules/lodash/_hashClear.js new file mode 100644 index 0000000..5d4b70c --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_hashClear.js @@ -0,0 +1,15 @@ +var nativeCreate = require('./_nativeCreate'); + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; +} + +module.exports = hashClear; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_hashDelete.js b/node_modules/sequelize-cli/node_modules/lodash/_hashDelete.js new file mode 100644 index 0000000..ea9dabf --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_hashDelete.js @@ -0,0 +1,17 @@ +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; +} + +module.exports = hashDelete; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_hashGet.js b/node_modules/sequelize-cli/node_modules/lodash/_hashGet.js new file mode 100644 index 0000000..1fc2f34 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_hashGet.js @@ -0,0 +1,30 @@ +var nativeCreate = require('./_nativeCreate'); + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} + +module.exports = hashGet; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_hashHas.js b/node_modules/sequelize-cli/node_modules/lodash/_hashHas.js new file mode 100644 index 0000000..281a551 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_hashHas.js @@ -0,0 +1,23 @@ +var nativeCreate = require('./_nativeCreate'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); +} + +module.exports = hashHas; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_hashSet.js b/node_modules/sequelize-cli/node_modules/lodash/_hashSet.js new file mode 100644 index 0000000..e105528 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_hashSet.js @@ -0,0 +1,23 @@ +var nativeCreate = require('./_nativeCreate'); + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +module.exports = hashSet; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_initCloneArray.js b/node_modules/sequelize-cli/node_modules/lodash/_initCloneArray.js new file mode 100644 index 0000000..aef0212 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_initCloneArray.js @@ -0,0 +1,26 @@ +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ +function initCloneArray(array) { + var length = array.length, + result = array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; +} + +module.exports = initCloneArray; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_initCloneByTag.js b/node_modules/sequelize-cli/node_modules/lodash/_initCloneByTag.js new file mode 100644 index 0000000..e7b77ed --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_initCloneByTag.js @@ -0,0 +1,80 @@ +var cloneArrayBuffer = require('./_cloneArrayBuffer'), + cloneDataView = require('./_cloneDataView'), + cloneMap = require('./_cloneMap'), + cloneRegExp = require('./_cloneRegExp'), + cloneSet = require('./_cloneSet'), + cloneSymbol = require('./_cloneSymbol'), + cloneTypedArray = require('./_cloneTypedArray'); + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneByTag(object, tag, cloneFunc, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return cloneDataView(object, isDeep); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return cloneTypedArray(object, isDeep); + + case mapTag: + return cloneMap(object, isDeep, cloneFunc); + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return cloneRegExp(object); + + case setTag: + return cloneSet(object, isDeep, cloneFunc); + + case symbolTag: + return cloneSymbol(object); + } +} + +module.exports = initCloneByTag; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_initCloneObject.js b/node_modules/sequelize-cli/node_modules/lodash/_initCloneObject.js new file mode 100644 index 0000000..5a13e64 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_initCloneObject.js @@ -0,0 +1,18 @@ +var baseCreate = require('./_baseCreate'), + getPrototype = require('./_getPrototype'), + isPrototype = require('./_isPrototype'); + +/** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneObject(object) { + return (typeof object.constructor == 'function' && !isPrototype(object)) + ? baseCreate(getPrototype(object)) + : {}; +} + +module.exports = initCloneObject; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_insertWrapDetails.js b/node_modules/sequelize-cli/node_modules/lodash/_insertWrapDetails.js new file mode 100644 index 0000000..e790808 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_insertWrapDetails.js @@ -0,0 +1,23 @@ +/** Used to match wrap detail comments. */ +var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/; + +/** + * Inserts wrapper `details` in a comment at the top of the `source` body. + * + * @private + * @param {string} source The source to modify. + * @returns {Array} details The details to insert. + * @returns {string} Returns the modified source. + */ +function insertWrapDetails(source, details) { + var length = details.length; + if (!length) { + return source; + } + var lastIndex = length - 1; + details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; + details = details.join(length > 2 ? ', ' : ' '); + return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); +} + +module.exports = insertWrapDetails; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_isFlattenable.js b/node_modules/sequelize-cli/node_modules/lodash/_isFlattenable.js new file mode 100644 index 0000000..4cc2c24 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_isFlattenable.js @@ -0,0 +1,20 @@ +var Symbol = require('./_Symbol'), + isArguments = require('./isArguments'), + isArray = require('./isArray'); + +/** Built-in value references. */ +var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined; + +/** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ +function isFlattenable(value) { + return isArray(value) || isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); +} + +module.exports = isFlattenable; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_isIndex.js b/node_modules/sequelize-cli/node_modules/lodash/_isIndex.js new file mode 100644 index 0000000..e123dde --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_isIndex.js @@ -0,0 +1,22 @@ +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** Used to detect unsigned integer values. */ +var reIsUint = /^(?:0|[1-9]\d*)$/; + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && + (typeof value == 'number' || reIsUint.test(value)) && + (value > -1 && value % 1 == 0 && value < length); +} + +module.exports = isIndex; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_isIterateeCall.js b/node_modules/sequelize-cli/node_modules/lodash/_isIterateeCall.js new file mode 100644 index 0000000..a0bb5a9 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_isIterateeCall.js @@ -0,0 +1,30 @@ +var eq = require('./eq'), + isArrayLike = require('./isArrayLike'), + isIndex = require('./_isIndex'), + isObject = require('./isObject'); + +/** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ +function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; +} + +module.exports = isIterateeCall; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_isKey.js b/node_modules/sequelize-cli/node_modules/lodash/_isKey.js new file mode 100644 index 0000000..ff08b06 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_isKey.js @@ -0,0 +1,29 @@ +var isArray = require('./isArray'), + isSymbol = require('./isSymbol'); + +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/; + +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); +} + +module.exports = isKey; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_isKeyable.js b/node_modules/sequelize-cli/node_modules/lodash/_isKeyable.js new file mode 100644 index 0000000..39f1828 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_isKeyable.js @@ -0,0 +1,15 @@ +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +module.exports = isKeyable; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_isLaziable.js b/node_modules/sequelize-cli/node_modules/lodash/_isLaziable.js new file mode 100644 index 0000000..a57c4f2 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_isLaziable.js @@ -0,0 +1,28 @@ +var LazyWrapper = require('./_LazyWrapper'), + getData = require('./_getData'), + getFuncName = require('./_getFuncName'), + lodash = require('./wrapperLodash'); + +/** + * Checks if `func` has a lazy counterpart. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` has a lazy counterpart, + * else `false`. + */ +function isLaziable(func) { + var funcName = getFuncName(func), + other = lodash[funcName]; + + if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { + return false; + } + if (func === other) { + return true; + } + var data = getData(other); + return !!data && func === data[0]; +} + +module.exports = isLaziable; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_isMaskable.js b/node_modules/sequelize-cli/node_modules/lodash/_isMaskable.js new file mode 100644 index 0000000..eb98d09 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_isMaskable.js @@ -0,0 +1,14 @@ +var coreJsData = require('./_coreJsData'), + isFunction = require('./isFunction'), + stubFalse = require('./stubFalse'); + +/** + * Checks if `func` is capable of being masked. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `func` is maskable, else `false`. + */ +var isMaskable = coreJsData ? isFunction : stubFalse; + +module.exports = isMaskable; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_isMasked.js b/node_modules/sequelize-cli/node_modules/lodash/_isMasked.js new file mode 100644 index 0000000..4b0f21b --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_isMasked.js @@ -0,0 +1,20 @@ +var coreJsData = require('./_coreJsData'); + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +module.exports = isMasked; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_isPrototype.js b/node_modules/sequelize-cli/node_modules/lodash/_isPrototype.js new file mode 100644 index 0000000..0f29498 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_isPrototype.js @@ -0,0 +1,18 @@ +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ +function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; +} + +module.exports = isPrototype; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_isStrictComparable.js b/node_modules/sequelize-cli/node_modules/lodash/_isStrictComparable.js new file mode 100644 index 0000000..b59f40b --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_isStrictComparable.js @@ -0,0 +1,15 @@ +var isObject = require('./isObject'); + +/** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ +function isStrictComparable(value) { + return value === value && !isObject(value); +} + +module.exports = isStrictComparable; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_iteratorToArray.js b/node_modules/sequelize-cli/node_modules/lodash/_iteratorToArray.js new file mode 100644 index 0000000..4768566 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_iteratorToArray.js @@ -0,0 +1,18 @@ +/** + * Converts `iterator` to an array. + * + * @private + * @param {Object} iterator The iterator to convert. + * @returns {Array} Returns the converted array. + */ +function iteratorToArray(iterator) { + var data, + result = []; + + while (!(data = iterator.next()).done) { + result.push(data.value); + } + return result; +} + +module.exports = iteratorToArray; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_lazyClone.js b/node_modules/sequelize-cli/node_modules/lodash/_lazyClone.js new file mode 100644 index 0000000..d8a51f8 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_lazyClone.js @@ -0,0 +1,23 @@ +var LazyWrapper = require('./_LazyWrapper'), + copyArray = require('./_copyArray'); + +/** + * Creates a clone of the lazy wrapper object. + * + * @private + * @name clone + * @memberOf LazyWrapper + * @returns {Object} Returns the cloned `LazyWrapper` object. + */ +function lazyClone() { + var result = new LazyWrapper(this.__wrapped__); + result.__actions__ = copyArray(this.__actions__); + result.__dir__ = this.__dir__; + result.__filtered__ = this.__filtered__; + result.__iteratees__ = copyArray(this.__iteratees__); + result.__takeCount__ = this.__takeCount__; + result.__views__ = copyArray(this.__views__); + return result; +} + +module.exports = lazyClone; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_lazyReverse.js b/node_modules/sequelize-cli/node_modules/lodash/_lazyReverse.js new file mode 100644 index 0000000..c5b5219 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_lazyReverse.js @@ -0,0 +1,23 @@ +var LazyWrapper = require('./_LazyWrapper'); + +/** + * Reverses the direction of lazy iteration. + * + * @private + * @name reverse + * @memberOf LazyWrapper + * @returns {Object} Returns the new reversed `LazyWrapper` object. + */ +function lazyReverse() { + if (this.__filtered__) { + var result = new LazyWrapper(this); + result.__dir__ = -1; + result.__filtered__ = true; + } else { + result = this.clone(); + result.__dir__ *= -1; + } + return result; +} + +module.exports = lazyReverse; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_lazyValue.js b/node_modules/sequelize-cli/node_modules/lodash/_lazyValue.js new file mode 100644 index 0000000..371ca8d --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_lazyValue.js @@ -0,0 +1,69 @@ +var baseWrapperValue = require('./_baseWrapperValue'), + getView = require('./_getView'), + isArray = require('./isArray'); + +/** Used to indicate the type of lazy iteratees. */ +var LAZY_FILTER_FLAG = 1, + LAZY_MAP_FLAG = 2; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * Extracts the unwrapped value from its lazy wrapper. + * + * @private + * @name value + * @memberOf LazyWrapper + * @returns {*} Returns the unwrapped value. + */ +function lazyValue() { + var array = this.__wrapped__.value(), + dir = this.__dir__, + isArr = isArray(array), + isRight = dir < 0, + arrLength = isArr ? array.length : 0, + view = getView(0, arrLength, this.__views__), + start = view.start, + end = view.end, + length = end - start, + index = isRight ? end : (start - 1), + iteratees = this.__iteratees__, + iterLength = iteratees.length, + resIndex = 0, + takeCount = nativeMin(length, this.__takeCount__); + + if (!isArr || (!isRight && arrLength == length && takeCount == length)) { + return baseWrapperValue(array, this.__actions__); + } + var result = []; + + outer: + while (length-- && resIndex < takeCount) { + index += dir; + + var iterIndex = -1, + value = array[index]; + + while (++iterIndex < iterLength) { + var data = iteratees[iterIndex], + iteratee = data.iteratee, + type = data.type, + computed = iteratee(value); + + if (type == LAZY_MAP_FLAG) { + value = computed; + } else if (!computed) { + if (type == LAZY_FILTER_FLAG) { + continue outer; + } else { + break outer; + } + } + } + result[resIndex++] = value; + } + return result; +} + +module.exports = lazyValue; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_listCacheClear.js b/node_modules/sequelize-cli/node_modules/lodash/_listCacheClear.js new file mode 100644 index 0000000..acbe39a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_listCacheClear.js @@ -0,0 +1,13 @@ +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; + this.size = 0; +} + +module.exports = listCacheClear; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_listCacheDelete.js b/node_modules/sequelize-cli/node_modules/lodash/_listCacheDelete.js new file mode 100644 index 0000000..b1384ad --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_listCacheDelete.js @@ -0,0 +1,35 @@ +var assocIndexOf = require('./_assocIndexOf'); + +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/** Built-in value references. */ +var splice = arrayProto.splice; + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; +} + +module.exports = listCacheDelete; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_listCacheGet.js b/node_modules/sequelize-cli/node_modules/lodash/_listCacheGet.js new file mode 100644 index 0000000..f8192fc --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_listCacheGet.js @@ -0,0 +1,19 @@ +var assocIndexOf = require('./_assocIndexOf'); + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +module.exports = listCacheGet; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_listCacheHas.js b/node_modules/sequelize-cli/node_modules/lodash/_listCacheHas.js new file mode 100644 index 0000000..2adf671 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_listCacheHas.js @@ -0,0 +1,16 @@ +var assocIndexOf = require('./_assocIndexOf'); + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} + +module.exports = listCacheHas; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_listCacheSet.js b/node_modules/sequelize-cli/node_modules/lodash/_listCacheSet.js new file mode 100644 index 0000000..5855c95 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_listCacheSet.js @@ -0,0 +1,26 @@ +var assocIndexOf = require('./_assocIndexOf'); + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +module.exports = listCacheSet; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_mapCacheClear.js b/node_modules/sequelize-cli/node_modules/lodash/_mapCacheClear.js new file mode 100644 index 0000000..bc9ca20 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_mapCacheClear.js @@ -0,0 +1,21 @@ +var Hash = require('./_Hash'), + ListCache = require('./_ListCache'), + Map = require('./_Map'); + +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; +} + +module.exports = mapCacheClear; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_mapCacheDelete.js b/node_modules/sequelize-cli/node_modules/lodash/_mapCacheDelete.js new file mode 100644 index 0000000..946ca3c --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_mapCacheDelete.js @@ -0,0 +1,18 @@ +var getMapData = require('./_getMapData'); + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; +} + +module.exports = mapCacheDelete; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_mapCacheGet.js b/node_modules/sequelize-cli/node_modules/lodash/_mapCacheGet.js new file mode 100644 index 0000000..f29f55c --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_mapCacheGet.js @@ -0,0 +1,16 @@ +var getMapData = require('./_getMapData'); + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} + +module.exports = mapCacheGet; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_mapCacheHas.js b/node_modules/sequelize-cli/node_modules/lodash/_mapCacheHas.js new file mode 100644 index 0000000..a1214c0 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_mapCacheHas.js @@ -0,0 +1,16 @@ +var getMapData = require('./_getMapData'); + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} + +module.exports = mapCacheHas; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_mapCacheSet.js b/node_modules/sequelize-cli/node_modules/lodash/_mapCacheSet.js new file mode 100644 index 0000000..7346849 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_mapCacheSet.js @@ -0,0 +1,22 @@ +var getMapData = require('./_getMapData'); + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; +} + +module.exports = mapCacheSet; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_mapToArray.js b/node_modules/sequelize-cli/node_modules/lodash/_mapToArray.js new file mode 100644 index 0000000..fe3dd53 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_mapToArray.js @@ -0,0 +1,18 @@ +/** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ +function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; +} + +module.exports = mapToArray; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_matchesStrictComparable.js b/node_modules/sequelize-cli/node_modules/lodash/_matchesStrictComparable.js new file mode 100644 index 0000000..f608af9 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_matchesStrictComparable.js @@ -0,0 +1,20 @@ +/** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; +} + +module.exports = matchesStrictComparable; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_memoizeCapped.js b/node_modules/sequelize-cli/node_modules/lodash/_memoizeCapped.js new file mode 100644 index 0000000..7f71c8f --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_memoizeCapped.js @@ -0,0 +1,26 @@ +var memoize = require('./memoize'); + +/** Used as the maximum memoize cache size. */ +var MAX_MEMOIZE_SIZE = 500; + +/** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ +function memoizeCapped(func) { + var result = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; +} + +module.exports = memoizeCapped; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_mergeData.js b/node_modules/sequelize-cli/node_modules/lodash/_mergeData.js new file mode 100644 index 0000000..cb570f9 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_mergeData.js @@ -0,0 +1,90 @@ +var composeArgs = require('./_composeArgs'), + composeArgsRight = require('./_composeArgsRight'), + replaceHolders = require('./_replaceHolders'); + +/** Used as the internal argument placeholder. */ +var PLACEHOLDER = '__lodash_placeholder__'; + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_BOUND_FLAG = 4, + WRAP_CURRY_FLAG = 8, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * Merges the function metadata of `source` into `data`. + * + * Merging metadata reduces the number of wrappers used to invoke a function. + * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` + * may be applied regardless of execution order. Methods like `_.ary` and + * `_.rearg` modify function arguments, making the order in which they are + * executed important, preventing the merging of metadata. However, we make + * an exception for a safe combined case where curried functions have `_.ary` + * and or `_.rearg` applied. + * + * @private + * @param {Array} data The destination metadata. + * @param {Array} source The source metadata. + * @returns {Array} Returns `data`. + */ +function mergeData(data, source) { + var bitmask = data[1], + srcBitmask = source[1], + newBitmask = bitmask | srcBitmask, + isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); + + var isCombo = + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) || + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) || + ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG)); + + // Exit early if metadata can't be merged. + if (!(isCommon || isCombo)) { + return data; + } + // Use source `thisArg` if available. + if (srcBitmask & WRAP_BIND_FLAG) { + data[2] = source[2]; + // Set when currying a bound function. + newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; + } + // Compose partial arguments. + var value = source[3]; + if (value) { + var partials = data[3]; + data[3] = partials ? composeArgs(partials, value, source[4]) : value; + data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; + } + // Compose partial right arguments. + value = source[5]; + if (value) { + partials = data[5]; + data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; + data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; + } + // Use source `argPos` if available. + value = source[7]; + if (value) { + data[7] = value; + } + // Use source `ary` if it's smaller. + if (srcBitmask & WRAP_ARY_FLAG) { + data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); + } + // Use source `arity` if one is not provided. + if (data[9] == null) { + data[9] = source[9]; + } + // Use source `func` and merge bitmasks. + data[0] = source[0]; + data[1] = newBitmask; + + return data; +} + +module.exports = mergeData; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_metaMap.js b/node_modules/sequelize-cli/node_modules/lodash/_metaMap.js new file mode 100644 index 0000000..0157a0b --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_metaMap.js @@ -0,0 +1,6 @@ +var WeakMap = require('./_WeakMap'); + +/** Used to store function metadata. */ +var metaMap = WeakMap && new WeakMap; + +module.exports = metaMap; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_nativeCreate.js b/node_modules/sequelize-cli/node_modules/lodash/_nativeCreate.js new file mode 100644 index 0000000..c7aede8 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_nativeCreate.js @@ -0,0 +1,6 @@ +var getNative = require('./_getNative'); + +/* Built-in method references that are verified to be native. */ +var nativeCreate = getNative(Object, 'create'); + +module.exports = nativeCreate; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_nativeKeys.js b/node_modules/sequelize-cli/node_modules/lodash/_nativeKeys.js new file mode 100644 index 0000000..479a104 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_nativeKeys.js @@ -0,0 +1,6 @@ +var overArg = require('./_overArg'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeKeys = overArg(Object.keys, Object); + +module.exports = nativeKeys; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_nativeKeysIn.js b/node_modules/sequelize-cli/node_modules/lodash/_nativeKeysIn.js new file mode 100644 index 0000000..00ee505 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_nativeKeysIn.js @@ -0,0 +1,20 @@ +/** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; +} + +module.exports = nativeKeysIn; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_nodeUtil.js b/node_modules/sequelize-cli/node_modules/lodash/_nodeUtil.js new file mode 100644 index 0000000..14e179f --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_nodeUtil.js @@ -0,0 +1,22 @@ +var freeGlobal = require('./_freeGlobal'); + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Detect free variable `process` from Node.js. */ +var freeProcess = moduleExports && freeGlobal.process; + +/** Used to access faster Node.js helpers. */ +var nodeUtil = (function() { + try { + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} +}()); + +module.exports = nodeUtil; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_objectToString.js b/node_modules/sequelize-cli/node_modules/lodash/_objectToString.js new file mode 100644 index 0000000..c614ec0 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_objectToString.js @@ -0,0 +1,22 @@ +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ +function objectToString(value) { + return nativeObjectToString.call(value); +} + +module.exports = objectToString; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_overArg.js b/node_modules/sequelize-cli/node_modules/lodash/_overArg.js new file mode 100644 index 0000000..651c5c5 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_overArg.js @@ -0,0 +1,15 @@ +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +module.exports = overArg; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_overRest.js b/node_modules/sequelize-cli/node_modules/lodash/_overRest.js new file mode 100644 index 0000000..c7cdef3 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_overRest.js @@ -0,0 +1,36 @@ +var apply = require('./_apply'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ +function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; +} + +module.exports = overRest; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_parent.js b/node_modules/sequelize-cli/node_modules/lodash/_parent.js new file mode 100644 index 0000000..f174328 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_parent.js @@ -0,0 +1,16 @@ +var baseGet = require('./_baseGet'), + baseSlice = require('./_baseSlice'); + +/** + * Gets the parent value at `path` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} path The path to get the parent value of. + * @returns {*} Returns the parent value. + */ +function parent(object, path) { + return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); +} + +module.exports = parent; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_reEscape.js b/node_modules/sequelize-cli/node_modules/lodash/_reEscape.js new file mode 100644 index 0000000..7f47eda --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_reEscape.js @@ -0,0 +1,4 @@ +/** Used to match template delimiters. */ +var reEscape = /<%-([\s\S]+?)%>/g; + +module.exports = reEscape; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_reEvaluate.js b/node_modules/sequelize-cli/node_modules/lodash/_reEvaluate.js new file mode 100644 index 0000000..6adfc31 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_reEvaluate.js @@ -0,0 +1,4 @@ +/** Used to match template delimiters. */ +var reEvaluate = /<%([\s\S]+?)%>/g; + +module.exports = reEvaluate; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_reInterpolate.js b/node_modules/sequelize-cli/node_modules/lodash/_reInterpolate.js new file mode 100644 index 0000000..d02ff0b --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_reInterpolate.js @@ -0,0 +1,4 @@ +/** Used to match template delimiters. */ +var reInterpolate = /<%=([\s\S]+?)%>/g; + +module.exports = reInterpolate; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_realNames.js b/node_modules/sequelize-cli/node_modules/lodash/_realNames.js new file mode 100644 index 0000000..aa0d529 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_realNames.js @@ -0,0 +1,4 @@ +/** Used to lookup unminified function names. */ +var realNames = {}; + +module.exports = realNames; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_reorder.js b/node_modules/sequelize-cli/node_modules/lodash/_reorder.js new file mode 100644 index 0000000..a3502b0 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_reorder.js @@ -0,0 +1,29 @@ +var copyArray = require('./_copyArray'), + isIndex = require('./_isIndex'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * Reorder `array` according to the specified indexes where the element at + * the first index is assigned as the first element, the element at + * the second index is assigned as the second element, and so on. + * + * @private + * @param {Array} array The array to reorder. + * @param {Array} indexes The arranged array indexes. + * @returns {Array} Returns `array`. + */ +function reorder(array, indexes) { + var arrLength = array.length, + length = nativeMin(indexes.length, arrLength), + oldArray = copyArray(array); + + while (length--) { + var index = indexes[length]; + array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; + } + return array; +} + +module.exports = reorder; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_replaceHolders.js b/node_modules/sequelize-cli/node_modules/lodash/_replaceHolders.js new file mode 100644 index 0000000..74360ec --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_replaceHolders.js @@ -0,0 +1,29 @@ +/** Used as the internal argument placeholder. */ +var PLACEHOLDER = '__lodash_placeholder__'; + +/** + * Replaces all `placeholder` elements in `array` with an internal placeholder + * and returns an array of their indexes. + * + * @private + * @param {Array} array The array to modify. + * @param {*} placeholder The placeholder to replace. + * @returns {Array} Returns the new array of placeholder indexes. + */ +function replaceHolders(array, placeholder) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value === placeholder || value === PLACEHOLDER) { + array[index] = PLACEHOLDER; + result[resIndex++] = index; + } + } + return result; +} + +module.exports = replaceHolders; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_root.js b/node_modules/sequelize-cli/node_modules/lodash/_root.js new file mode 100644 index 0000000..d2852be --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_root.js @@ -0,0 +1,9 @@ +var freeGlobal = require('./_freeGlobal'); + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +module.exports = root; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_setCacheAdd.js b/node_modules/sequelize-cli/node_modules/lodash/_setCacheAdd.js new file mode 100644 index 0000000..1081a74 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_setCacheAdd.js @@ -0,0 +1,19 @@ +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ +function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; +} + +module.exports = setCacheAdd; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_setCacheHas.js b/node_modules/sequelize-cli/node_modules/lodash/_setCacheHas.js new file mode 100644 index 0000000..9a49255 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_setCacheHas.js @@ -0,0 +1,14 @@ +/** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ +function setCacheHas(value) { + return this.__data__.has(value); +} + +module.exports = setCacheHas; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_setData.js b/node_modules/sequelize-cli/node_modules/lodash/_setData.js new file mode 100644 index 0000000..e5cf3eb --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_setData.js @@ -0,0 +1,20 @@ +var baseSetData = require('./_baseSetData'), + shortOut = require('./_shortOut'); + +/** + * Sets metadata for `func`. + * + * **Note:** If this function becomes hot, i.e. is invoked a lot in a short + * period of time, it will trip its breaker and transition to an identity + * function to avoid garbage collection pauses in V8. See + * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) + * for more details. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ +var setData = shortOut(baseSetData); + +module.exports = setData; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_setToArray.js b/node_modules/sequelize-cli/node_modules/lodash/_setToArray.js new file mode 100644 index 0000000..b87f074 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_setToArray.js @@ -0,0 +1,18 @@ +/** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ +function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} + +module.exports = setToArray; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_setToPairs.js b/node_modules/sequelize-cli/node_modules/lodash/_setToPairs.js new file mode 100644 index 0000000..36ad37a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_setToPairs.js @@ -0,0 +1,18 @@ +/** + * Converts `set` to its value-value pairs. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the value-value pairs. + */ +function setToPairs(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = [value, value]; + }); + return result; +} + +module.exports = setToPairs; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_setToString.js b/node_modules/sequelize-cli/node_modules/lodash/_setToString.js new file mode 100644 index 0000000..6ca8419 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_setToString.js @@ -0,0 +1,14 @@ +var baseSetToString = require('./_baseSetToString'), + shortOut = require('./_shortOut'); + +/** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ +var setToString = shortOut(baseSetToString); + +module.exports = setToString; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_setWrapToString.js b/node_modules/sequelize-cli/node_modules/lodash/_setWrapToString.js new file mode 100644 index 0000000..decdc44 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_setWrapToString.js @@ -0,0 +1,21 @@ +var getWrapDetails = require('./_getWrapDetails'), + insertWrapDetails = require('./_insertWrapDetails'), + setToString = require('./_setToString'), + updateWrapDetails = require('./_updateWrapDetails'); + +/** + * Sets the `toString` method of `wrapper` to mimic the source of `reference` + * with wrapper details in a comment at the top of the source body. + * + * @private + * @param {Function} wrapper The function to modify. + * @param {Function} reference The reference function. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Function} Returns `wrapper`. + */ +function setWrapToString(wrapper, reference, bitmask) { + var source = (reference + ''); + return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); +} + +module.exports = setWrapToString; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_shortOut.js b/node_modules/sequelize-cli/node_modules/lodash/_shortOut.js new file mode 100644 index 0000000..3300a07 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_shortOut.js @@ -0,0 +1,37 @@ +/** Used to detect hot functions by number of calls within a span of milliseconds. */ +var HOT_COUNT = 800, + HOT_SPAN = 16; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeNow = Date.now; + +/** + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. + * + * @private + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. + */ +function shortOut(func) { + var count = 0, + lastCalled = 0; + + return function() { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined, arguments); + }; +} + +module.exports = shortOut; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_shuffleSelf.js b/node_modules/sequelize-cli/node_modules/lodash/_shuffleSelf.js new file mode 100644 index 0000000..8bcc4f5 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_shuffleSelf.js @@ -0,0 +1,28 @@ +var baseRandom = require('./_baseRandom'); + +/** + * A specialized version of `_.shuffle` which mutates and sets the size of `array`. + * + * @private + * @param {Array} array The array to shuffle. + * @param {number} [size=array.length] The size of `array`. + * @returns {Array} Returns `array`. + */ +function shuffleSelf(array, size) { + var index = -1, + length = array.length, + lastIndex = length - 1; + + size = size === undefined ? length : size; + while (++index < size) { + var rand = baseRandom(index, lastIndex), + value = array[rand]; + + array[rand] = array[index]; + array[index] = value; + } + array.length = size; + return array; +} + +module.exports = shuffleSelf; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_stackClear.js b/node_modules/sequelize-cli/node_modules/lodash/_stackClear.js new file mode 100644 index 0000000..ce8e5a9 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_stackClear.js @@ -0,0 +1,15 @@ +var ListCache = require('./_ListCache'); + +/** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ +function stackClear() { + this.__data__ = new ListCache; + this.size = 0; +} + +module.exports = stackClear; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_stackDelete.js b/node_modules/sequelize-cli/node_modules/lodash/_stackDelete.js new file mode 100644 index 0000000..ff9887a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_stackDelete.js @@ -0,0 +1,18 @@ +/** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + + this.size = data.size; + return result; +} + +module.exports = stackDelete; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_stackGet.js b/node_modules/sequelize-cli/node_modules/lodash/_stackGet.js new file mode 100644 index 0000000..1cdf004 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_stackGet.js @@ -0,0 +1,14 @@ +/** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function stackGet(key) { + return this.__data__.get(key); +} + +module.exports = stackGet; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_stackHas.js b/node_modules/sequelize-cli/node_modules/lodash/_stackHas.js new file mode 100644 index 0000000..16a3ad1 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_stackHas.js @@ -0,0 +1,14 @@ +/** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function stackHas(key) { + return this.__data__.has(key); +} + +module.exports = stackHas; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_stackSet.js b/node_modules/sequelize-cli/node_modules/lodash/_stackSet.js new file mode 100644 index 0000000..b790ac5 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_stackSet.js @@ -0,0 +1,34 @@ +var ListCache = require('./_ListCache'), + Map = require('./_Map'), + MapCache = require('./_MapCache'); + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ +function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; +} + +module.exports = stackSet; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_strictIndexOf.js b/node_modules/sequelize-cli/node_modules/lodash/_strictIndexOf.js new file mode 100644 index 0000000..0486a49 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_strictIndexOf.js @@ -0,0 +1,23 @@ +/** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; +} + +module.exports = strictIndexOf; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_strictLastIndexOf.js b/node_modules/sequelize-cli/node_modules/lodash/_strictLastIndexOf.js new file mode 100644 index 0000000..d7310dc --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_strictLastIndexOf.js @@ -0,0 +1,21 @@ +/** + * A specialized version of `_.lastIndexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function strictLastIndexOf(array, value, fromIndex) { + var index = fromIndex + 1; + while (index--) { + if (array[index] === value) { + return index; + } + } + return index; +} + +module.exports = strictLastIndexOf; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_stringSize.js b/node_modules/sequelize-cli/node_modules/lodash/_stringSize.js new file mode 100644 index 0000000..17ef462 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_stringSize.js @@ -0,0 +1,18 @@ +var asciiSize = require('./_asciiSize'), + hasUnicode = require('./_hasUnicode'), + unicodeSize = require('./_unicodeSize'); + +/** + * Gets the number of symbols in `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the string size. + */ +function stringSize(string) { + return hasUnicode(string) + ? unicodeSize(string) + : asciiSize(string); +} + +module.exports = stringSize; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_stringToArray.js b/node_modules/sequelize-cli/node_modules/lodash/_stringToArray.js new file mode 100644 index 0000000..d161158 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_stringToArray.js @@ -0,0 +1,18 @@ +var asciiToArray = require('./_asciiToArray'), + hasUnicode = require('./_hasUnicode'), + unicodeToArray = require('./_unicodeToArray'); + +/** + * Converts `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function stringToArray(string) { + return hasUnicode(string) + ? unicodeToArray(string) + : asciiToArray(string); +} + +module.exports = stringToArray; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_stringToPath.js b/node_modules/sequelize-cli/node_modules/lodash/_stringToPath.js new file mode 100644 index 0000000..db7b0f7 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_stringToPath.js @@ -0,0 +1,28 @@ +var memoizeCapped = require('./_memoizeCapped'); + +/** Used to match property names within property paths. */ +var reLeadingDot = /^\./, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; + +/** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ +var stringToPath = memoizeCapped(function(string) { + var result = []; + if (reLeadingDot.test(string)) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, string) { + result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +}); + +module.exports = stringToPath; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_toKey.js b/node_modules/sequelize-cli/node_modules/lodash/_toKey.js new file mode 100644 index 0000000..c6d645c --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_toKey.js @@ -0,0 +1,21 @@ +var isSymbol = require('./isSymbol'); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +module.exports = toKey; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_toSource.js b/node_modules/sequelize-cli/node_modules/lodash/_toSource.js new file mode 100644 index 0000000..a020b38 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_toSource.js @@ -0,0 +1,26 @@ +/** Used for built-in method references. */ +var funcProto = Function.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +module.exports = toSource; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_unescapeHtmlChar.js b/node_modules/sequelize-cli/node_modules/lodash/_unescapeHtmlChar.js new file mode 100644 index 0000000..a71fecb --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_unescapeHtmlChar.js @@ -0,0 +1,21 @@ +var basePropertyOf = require('./_basePropertyOf'); + +/** Used to map HTML entities to characters. */ +var htmlUnescapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'" +}; + +/** + * Used by `_.unescape` to convert HTML entities to characters. + * + * @private + * @param {string} chr The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ +var unescapeHtmlChar = basePropertyOf(htmlUnescapes); + +module.exports = unescapeHtmlChar; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_unicodeSize.js b/node_modules/sequelize-cli/node_modules/lodash/_unicodeSize.js new file mode 100644 index 0000000..68137ec --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_unicodeSize.js @@ -0,0 +1,44 @@ +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsAstral = '[' + rsAstralRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsZWJ = '\\u200d'; + +/** Used to compose unicode regexes. */ +var reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + +/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ +var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + +/** + * Gets the size of a Unicode `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ +function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; + } + return result; +} + +module.exports = unicodeSize; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_unicodeToArray.js b/node_modules/sequelize-cli/node_modules/lodash/_unicodeToArray.js new file mode 100644 index 0000000..2a725c0 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_unicodeToArray.js @@ -0,0 +1,40 @@ +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsAstral = '[' + rsAstralRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsZWJ = '\\u200d'; + +/** Used to compose unicode regexes. */ +var reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + +/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ +var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + +/** + * Converts a Unicode `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function unicodeToArray(string) { + return string.match(reUnicode) || []; +} + +module.exports = unicodeToArray; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_unicodeWords.js b/node_modules/sequelize-cli/node_modules/lodash/_unicodeWords.js new file mode 100644 index 0000000..d8b822a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_unicodeWords.js @@ -0,0 +1,69 @@ +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsDingbatRange = '\\u2700-\\u27bf', + rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', + rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', + rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', + rsPunctuationRange = '\\u2000-\\u206f', + 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', + rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', + rsVarRange = '\\ufe0e\\ufe0f', + rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; + +/** Used to compose unicode capture groups. */ +var rsApos = "['\u2019]", + rsBreak = '[' + rsBreakRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsDigits = '\\d+', + rsDingbat = '[' + rsDingbatRange + ']', + rsLower = '[' + rsLowerRange + ']', + rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsUpper = '[' + rsUpperRange + ']', + rsZWJ = '\\u200d'; + +/** Used to compose unicode regexes. */ +var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', + rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', + rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', + rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', + reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsOrdLower = '\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)', + rsOrdUpper = '\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq; + +/** Used to match complex or compound words. */ +var reUnicodeWord = RegExp([ + rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', + rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', + rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, + rsUpper + '+' + rsOptContrUpper, + rsOrdUpper, + rsOrdLower, + rsDigits, + rsEmoji +].join('|'), 'g'); + +/** + * Splits a Unicode `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ +function unicodeWords(string) { + return string.match(reUnicodeWord) || []; +} + +module.exports = unicodeWords; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_updateWrapDetails.js b/node_modules/sequelize-cli/node_modules/lodash/_updateWrapDetails.js new file mode 100644 index 0000000..8759fbd --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_updateWrapDetails.js @@ -0,0 +1,46 @@ +var arrayEach = require('./_arrayEach'), + arrayIncludes = require('./_arrayIncludes'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256, + WRAP_FLIP_FLAG = 512; + +/** Used to associate wrap methods with their bit flags. */ +var wrapFlags = [ + ['ary', WRAP_ARY_FLAG], + ['bind', WRAP_BIND_FLAG], + ['bindKey', WRAP_BIND_KEY_FLAG], + ['curry', WRAP_CURRY_FLAG], + ['curryRight', WRAP_CURRY_RIGHT_FLAG], + ['flip', WRAP_FLIP_FLAG], + ['partial', WRAP_PARTIAL_FLAG], + ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], + ['rearg', WRAP_REARG_FLAG] +]; + +/** + * Updates wrapper `details` based on `bitmask` flags. + * + * @private + * @returns {Array} details The details to modify. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Array} Returns `details`. + */ +function updateWrapDetails(details, bitmask) { + arrayEach(wrapFlags, function(pair) { + var value = '_.' + pair[0]; + if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { + details.push(value); + } + }); + return details.sort(); +} + +module.exports = updateWrapDetails; diff --git a/node_modules/sequelize-cli/node_modules/lodash/_wrapperClone.js b/node_modules/sequelize-cli/node_modules/lodash/_wrapperClone.js new file mode 100644 index 0000000..7bb58a2 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/_wrapperClone.js @@ -0,0 +1,23 @@ +var LazyWrapper = require('./_LazyWrapper'), + LodashWrapper = require('./_LodashWrapper'), + copyArray = require('./_copyArray'); + +/** + * Creates a clone of `wrapper`. + * + * @private + * @param {Object} wrapper The wrapper to clone. + * @returns {Object} Returns the cloned wrapper. + */ +function wrapperClone(wrapper) { + if (wrapper instanceof LazyWrapper) { + return wrapper.clone(); + } + var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); + result.__actions__ = copyArray(wrapper.__actions__); + result.__index__ = wrapper.__index__; + result.__values__ = wrapper.__values__; + return result; +} + +module.exports = wrapperClone; diff --git a/node_modules/sequelize-cli/node_modules/lodash/add.js b/node_modules/sequelize-cli/node_modules/lodash/add.js new file mode 100644 index 0000000..f069515 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/add.js @@ -0,0 +1,22 @@ +var createMathOperation = require('./_createMathOperation'); + +/** + * Adds two numbers. + * + * @static + * @memberOf _ + * @since 3.4.0 + * @category Math + * @param {number} augend The first number in an addition. + * @param {number} addend The second number in an addition. + * @returns {number} Returns the total. + * @example + * + * _.add(6, 4); + * // => 10 + */ +var add = createMathOperation(function(augend, addend) { + return augend + addend; +}, 0); + +module.exports = add; diff --git a/node_modules/sequelize-cli/node_modules/lodash/after.js b/node_modules/sequelize-cli/node_modules/lodash/after.js new file mode 100644 index 0000000..3900c97 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/after.js @@ -0,0 +1,42 @@ +var toInteger = require('./toInteger'); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * The opposite of `_.before`; this method creates a function that invokes + * `func` once it's called `n` or more times. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {number} n The number of calls before `func` is invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => Logs 'done saving!' after the two async saves have completed. + */ +function after(n, func) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; +} + +module.exports = after; diff --git a/node_modules/sequelize-cli/node_modules/lodash/array.js b/node_modules/sequelize-cli/node_modules/lodash/array.js new file mode 100644 index 0000000..af688d3 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/array.js @@ -0,0 +1,67 @@ +module.exports = { + 'chunk': require('./chunk'), + 'compact': require('./compact'), + 'concat': require('./concat'), + 'difference': require('./difference'), + 'differenceBy': require('./differenceBy'), + 'differenceWith': require('./differenceWith'), + 'drop': require('./drop'), + 'dropRight': require('./dropRight'), + 'dropRightWhile': require('./dropRightWhile'), + 'dropWhile': require('./dropWhile'), + 'fill': require('./fill'), + 'findIndex': require('./findIndex'), + 'findLastIndex': require('./findLastIndex'), + 'first': require('./first'), + 'flatten': require('./flatten'), + 'flattenDeep': require('./flattenDeep'), + 'flattenDepth': require('./flattenDepth'), + 'fromPairs': require('./fromPairs'), + 'head': require('./head'), + 'indexOf': require('./indexOf'), + 'initial': require('./initial'), + 'intersection': require('./intersection'), + 'intersectionBy': require('./intersectionBy'), + 'intersectionWith': require('./intersectionWith'), + 'join': require('./join'), + 'last': require('./last'), + 'lastIndexOf': require('./lastIndexOf'), + 'nth': require('./nth'), + 'pull': require('./pull'), + 'pullAll': require('./pullAll'), + 'pullAllBy': require('./pullAllBy'), + 'pullAllWith': require('./pullAllWith'), + 'pullAt': require('./pullAt'), + 'remove': require('./remove'), + 'reverse': require('./reverse'), + 'slice': require('./slice'), + 'sortedIndex': require('./sortedIndex'), + 'sortedIndexBy': require('./sortedIndexBy'), + 'sortedIndexOf': require('./sortedIndexOf'), + 'sortedLastIndex': require('./sortedLastIndex'), + 'sortedLastIndexBy': require('./sortedLastIndexBy'), + 'sortedLastIndexOf': require('./sortedLastIndexOf'), + 'sortedUniq': require('./sortedUniq'), + 'sortedUniqBy': require('./sortedUniqBy'), + 'tail': require('./tail'), + 'take': require('./take'), + 'takeRight': require('./takeRight'), + 'takeRightWhile': require('./takeRightWhile'), + 'takeWhile': require('./takeWhile'), + 'union': require('./union'), + 'unionBy': require('./unionBy'), + 'unionWith': require('./unionWith'), + 'uniq': require('./uniq'), + 'uniqBy': require('./uniqBy'), + 'uniqWith': require('./uniqWith'), + 'unzip': require('./unzip'), + 'unzipWith': require('./unzipWith'), + 'without': require('./without'), + 'xor': require('./xor'), + 'xorBy': require('./xorBy'), + 'xorWith': require('./xorWith'), + 'zip': require('./zip'), + 'zipObject': require('./zipObject'), + 'zipObjectDeep': require('./zipObjectDeep'), + 'zipWith': require('./zipWith') +}; diff --git a/node_modules/sequelize-cli/node_modules/lodash/ary.js b/node_modules/sequelize-cli/node_modules/lodash/ary.js new file mode 100644 index 0000000..70c87d0 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/ary.js @@ -0,0 +1,29 @@ +var createWrap = require('./_createWrap'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_ARY_FLAG = 128; + +/** + * Creates a function that invokes `func`, with up to `n` arguments, + * ignoring any additional arguments. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @param {number} [n=func.length] The arity cap. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.ary(parseInt, 1)); + * // => [6, 8, 10] + */ +function ary(func, n, guard) { + n = guard ? undefined : n; + n = (func && n == null) ? func.length : n; + return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); +} + +module.exports = ary; diff --git a/node_modules/sequelize-cli/node_modules/lodash/assign.js b/node_modules/sequelize-cli/node_modules/lodash/assign.js new file mode 100644 index 0000000..909db26 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/assign.js @@ -0,0 +1,58 @@ +var assignValue = require('./_assignValue'), + copyObject = require('./_copyObject'), + createAssigner = require('./_createAssigner'), + isArrayLike = require('./isArrayLike'), + isPrototype = require('./_isPrototype'), + keys = require('./keys'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Assigns own enumerable string keyed properties of source objects to the + * destination object. Source objects are applied from left to right. + * Subsequent sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assignIn + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } + */ +var assign = createAssigner(function(object, source) { + if (isPrototype(source) || isArrayLike(source)) { + copyObject(source, keys(source), object); + return; + } + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + assignValue(object, key, source[key]); + } + } +}); + +module.exports = assign; diff --git a/node_modules/sequelize-cli/node_modules/lodash/assignIn.js b/node_modules/sequelize-cli/node_modules/lodash/assignIn.js new file mode 100644 index 0000000..e663473 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/assignIn.js @@ -0,0 +1,40 @@ +var copyObject = require('./_copyObject'), + createAssigner = require('./_createAssigner'), + keysIn = require('./keysIn'); + +/** + * This method is like `_.assign` except that it iterates over own and + * inherited source properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assign + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } + */ +var assignIn = createAssigner(function(object, source) { + copyObject(source, keysIn(source), object); +}); + +module.exports = assignIn; diff --git a/node_modules/sequelize-cli/node_modules/lodash/assignInWith.js b/node_modules/sequelize-cli/node_modules/lodash/assignInWith.js new file mode 100644 index 0000000..68fcc0b --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/assignInWith.js @@ -0,0 +1,38 @@ +var copyObject = require('./_copyObject'), + createAssigner = require('./_createAssigner'), + keysIn = require('./keysIn'); + +/** + * This method is like `_.assignIn` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extendWith + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignInWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ +var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keysIn(source), object, customizer); +}); + +module.exports = assignInWith; diff --git a/node_modules/sequelize-cli/node_modules/lodash/assignWith.js b/node_modules/sequelize-cli/node_modules/lodash/assignWith.js new file mode 100644 index 0000000..7dc6c76 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/assignWith.js @@ -0,0 +1,37 @@ +var copyObject = require('./_copyObject'), + createAssigner = require('./_createAssigner'), + keys = require('./keys'); + +/** + * This method is like `_.assign` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignInWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ +var assignWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keys(source), object, customizer); +}); + +module.exports = assignWith; diff --git a/node_modules/sequelize-cli/node_modules/lodash/at.js b/node_modules/sequelize-cli/node_modules/lodash/at.js new file mode 100644 index 0000000..781ee9e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/at.js @@ -0,0 +1,23 @@ +var baseAt = require('./_baseAt'), + flatRest = require('./_flatRest'); + +/** + * Creates an array of values corresponding to `paths` of `object`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Array} Returns the picked values. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _.at(object, ['a[0].b.c', 'a[1]']); + * // => [3, 4] + */ +var at = flatRest(baseAt); + +module.exports = at; diff --git a/node_modules/sequelize-cli/node_modules/lodash/attempt.js b/node_modules/sequelize-cli/node_modules/lodash/attempt.js new file mode 100644 index 0000000..624d015 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/attempt.js @@ -0,0 +1,35 @@ +var apply = require('./_apply'), + baseRest = require('./_baseRest'), + isError = require('./isError'); + +/** + * Attempts to invoke `func`, returning either the result or the caught error + * object. Any additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {Function} func The function to attempt. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {*} Returns the `func` result or error object. + * @example + * + * // Avoid throwing errors for invalid selectors. + * var elements = _.attempt(function(selector) { + * return document.querySelectorAll(selector); + * }, '>_>'); + * + * if (_.isError(elements)) { + * elements = []; + * } + */ +var attempt = baseRest(function(func, args) { + try { + return apply(func, undefined, args); + } catch (e) { + return isError(e) ? e : new Error(e); + } +}); + +module.exports = attempt; diff --git a/node_modules/sequelize-cli/node_modules/lodash/before.js b/node_modules/sequelize-cli/node_modules/lodash/before.js new file mode 100644 index 0000000..a3e0a16 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/before.js @@ -0,0 +1,40 @@ +var toInteger = require('./toInteger'); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it's called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery(element).on('click', _.before(5, addContactToList)); + * // => Allows adding up to 4 contacts to the list. + */ +function before(n, func) { + var result; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; +} + +module.exports = before; diff --git a/node_modules/sequelize-cli/node_modules/lodash/bind.js b/node_modules/sequelize-cli/node_modules/lodash/bind.js new file mode 100644 index 0000000..b1076e9 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/bind.js @@ -0,0 +1,57 @@ +var baseRest = require('./_baseRest'), + createWrap = require('./_createWrap'), + getHolder = require('./_getHolder'), + replaceHolders = require('./_replaceHolders'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_PARTIAL_FLAG = 32; + +/** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and `partials` prepended to the arguments it receives. + * + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * function greet(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // Bound with placeholders. + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ +var bind = baseRest(function(func, thisArg, partials) { + var bitmask = WRAP_BIND_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bind)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(func, bitmask, thisArg, partials, holders); +}); + +// Assign default placeholders. +bind.placeholder = {}; + +module.exports = bind; diff --git a/node_modules/sequelize-cli/node_modules/lodash/bindAll.js b/node_modules/sequelize-cli/node_modules/lodash/bindAll.js new file mode 100644 index 0000000..a35706d --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/bindAll.js @@ -0,0 +1,41 @@ +var arrayEach = require('./_arrayEach'), + baseAssignValue = require('./_baseAssignValue'), + bind = require('./bind'), + flatRest = require('./_flatRest'), + toKey = require('./_toKey'); + +/** + * Binds methods of an object to the object itself, overwriting the existing + * method. + * + * **Note:** This method doesn't set the "length" property of bound functions. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {Object} object The object to bind and assign the bound methods to. + * @param {...(string|string[])} methodNames The object method names to bind. + * @returns {Object} Returns `object`. + * @example + * + * var view = { + * 'label': 'docs', + * 'click': function() { + * console.log('clicked ' + this.label); + * } + * }; + * + * _.bindAll(view, ['click']); + * jQuery(element).on('click', view.click); + * // => Logs 'clicked docs' when clicked. + */ +var bindAll = flatRest(function(object, methodNames) { + arrayEach(methodNames, function(key) { + key = toKey(key); + baseAssignValue(object, key, bind(object[key], object)); + }); + return object; +}); + +module.exports = bindAll; diff --git a/node_modules/sequelize-cli/node_modules/lodash/bindKey.js b/node_modules/sequelize-cli/node_modules/lodash/bindKey.js new file mode 100644 index 0000000..f7fd64c --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/bindKey.js @@ -0,0 +1,68 @@ +var baseRest = require('./_baseRest'), + createWrap = require('./_createWrap'), + getHolder = require('./_getHolder'), + replaceHolders = require('./_replaceHolders'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_PARTIAL_FLAG = 32; + +/** + * Creates a function that invokes the method at `object[key]` with `partials` + * prepended to the arguments it receives. + * + * This method differs from `_.bind` by allowing bound functions to reference + * methods that may be redefined or don't yet exist. See + * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) + * for more details. + * + * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Function + * @param {Object} object The object to invoke the method on. + * @param {string} key The key of the method. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'user': 'fred', + * 'greet': function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * }; + * + * var bound = _.bindKey(object, 'greet', 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * object.greet = function(greeting, punctuation) { + * return greeting + 'ya ' + this.user + punctuation; + * }; + * + * bound('!'); + * // => 'hiya fred!' + * + * // Bound with placeholders. + * var bound = _.bindKey(object, 'greet', _, '!'); + * bound('hi'); + * // => 'hiya fred!' + */ +var bindKey = baseRest(function(object, key, partials) { + var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bindKey)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(key, bitmask, object, partials, holders); +}); + +// Assign default placeholders. +bindKey.placeholder = {}; + +module.exports = bindKey; diff --git a/node_modules/sequelize-cli/node_modules/lodash/camelCase.js b/node_modules/sequelize-cli/node_modules/lodash/camelCase.js new file mode 100644 index 0000000..d7390de --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/camelCase.js @@ -0,0 +1,29 @@ +var capitalize = require('./capitalize'), + createCompounder = require('./_createCompounder'); + +/** + * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the camel cased string. + * @example + * + * _.camelCase('Foo Bar'); + * // => 'fooBar' + * + * _.camelCase('--foo-bar--'); + * // => 'fooBar' + * + * _.camelCase('__FOO_BAR__'); + * // => 'fooBar' + */ +var camelCase = createCompounder(function(result, word, index) { + word = word.toLowerCase(); + return result + (index ? capitalize(word) : word); +}); + +module.exports = camelCase; diff --git a/node_modules/sequelize-cli/node_modules/lodash/capitalize.js b/node_modules/sequelize-cli/node_modules/lodash/capitalize.js new file mode 100644 index 0000000..3e1600e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/capitalize.js @@ -0,0 +1,23 @@ +var toString = require('./toString'), + upperFirst = require('./upperFirst'); + +/** + * Converts the first character of `string` to upper case and the remaining + * to lower case. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to capitalize. + * @returns {string} Returns the capitalized string. + * @example + * + * _.capitalize('FRED'); + * // => 'Fred' + */ +function capitalize(string) { + return upperFirst(toString(string).toLowerCase()); +} + +module.exports = capitalize; diff --git a/node_modules/sequelize-cli/node_modules/lodash/castArray.js b/node_modules/sequelize-cli/node_modules/lodash/castArray.js new file mode 100644 index 0000000..e470bdb --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/castArray.js @@ -0,0 +1,44 @@ +var isArray = require('./isArray'); + +/** + * Casts `value` as an array if it's not one. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Lang + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast array. + * @example + * + * _.castArray(1); + * // => [1] + * + * _.castArray({ 'a': 1 }); + * // => [{ 'a': 1 }] + * + * _.castArray('abc'); + * // => ['abc'] + * + * _.castArray(null); + * // => [null] + * + * _.castArray(undefined); + * // => [undefined] + * + * _.castArray(); + * // => [] + * + * var array = [1, 2, 3]; + * console.log(_.castArray(array) === array); + * // => true + */ +function castArray() { + if (!arguments.length) { + return []; + } + var value = arguments[0]; + return isArray(value) ? value : [value]; +} + +module.exports = castArray; diff --git a/node_modules/sequelize-cli/node_modules/lodash/ceil.js b/node_modules/sequelize-cli/node_modules/lodash/ceil.js new file mode 100644 index 0000000..56c8722 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/ceil.js @@ -0,0 +1,26 @@ +var createRound = require('./_createRound'); + +/** + * Computes `number` rounded up to `precision`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Math + * @param {number} number The number to round up. + * @param {number} [precision=0] The precision to round up to. + * @returns {number} Returns the rounded up number. + * @example + * + * _.ceil(4.006); + * // => 5 + * + * _.ceil(6.004, 2); + * // => 6.01 + * + * _.ceil(6040, -2); + * // => 6100 + */ +var ceil = createRound('ceil'); + +module.exports = ceil; diff --git a/node_modules/sequelize-cli/node_modules/lodash/chain.js b/node_modules/sequelize-cli/node_modules/lodash/chain.js new file mode 100644 index 0000000..f6cd647 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/chain.js @@ -0,0 +1,38 @@ +var lodash = require('./wrapperLodash'); + +/** + * Creates a `lodash` wrapper instance that wraps `value` with explicit method + * chain sequences enabled. The result of such sequences must be unwrapped + * with `_#value`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Seq + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _ + * .chain(users) + * .sortBy('age') + * .map(function(o) { + * return o.user + ' is ' + o.age; + * }) + * .head() + * .value(); + * // => 'pebbles is 1' + */ +function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; +} + +module.exports = chain; diff --git a/node_modules/sequelize-cli/node_modules/lodash/chunk.js b/node_modules/sequelize-cli/node_modules/lodash/chunk.js new file mode 100644 index 0000000..5b562fe --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/chunk.js @@ -0,0 +1,50 @@ +var baseSlice = require('./_baseSlice'), + isIterateeCall = require('./_isIterateeCall'), + toInteger = require('./toInteger'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil, + nativeMax = Math.max; + +/** + * Creates an array of elements split into groups the length of `size`. + * If `array` can't be split evenly, the final chunk will be the remaining + * elements. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to process. + * @param {number} [size=1] The length of each chunk + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the new array of chunks. + * @example + * + * _.chunk(['a', 'b', 'c', 'd'], 2); + * // => [['a', 'b'], ['c', 'd']] + * + * _.chunk(['a', 'b', 'c', 'd'], 3); + * // => [['a', 'b', 'c'], ['d']] + */ +function chunk(array, size, guard) { + if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) { + size = 1; + } else { + size = nativeMax(toInteger(size), 0); + } + var length = array == null ? 0 : array.length; + if (!length || size < 1) { + return []; + } + var index = 0, + resIndex = 0, + result = Array(nativeCeil(length / size)); + + while (index < length) { + result[resIndex++] = baseSlice(array, index, (index += size)); + } + return result; +} + +module.exports = chunk; diff --git a/node_modules/sequelize-cli/node_modules/lodash/clamp.js b/node_modules/sequelize-cli/node_modules/lodash/clamp.js new file mode 100644 index 0000000..91a72c9 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/clamp.js @@ -0,0 +1,39 @@ +var baseClamp = require('./_baseClamp'), + toNumber = require('./toNumber'); + +/** + * Clamps `number` within the inclusive `lower` and `upper` bounds. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Number + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + * @example + * + * _.clamp(-10, -5, 5); + * // => -5 + * + * _.clamp(10, -5, 5); + * // => 5 + */ +function clamp(number, lower, upper) { + if (upper === undefined) { + upper = lower; + lower = undefined; + } + if (upper !== undefined) { + upper = toNumber(upper); + upper = upper === upper ? upper : 0; + } + if (lower !== undefined) { + lower = toNumber(lower); + lower = lower === lower ? lower : 0; + } + return baseClamp(toNumber(number), lower, upper); +} + +module.exports = clamp; diff --git a/node_modules/sequelize-cli/node_modules/lodash/clone.js b/node_modules/sequelize-cli/node_modules/lodash/clone.js new file mode 100644 index 0000000..dd439d6 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/clone.js @@ -0,0 +1,36 @@ +var baseClone = require('./_baseClone'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_SYMBOLS_FLAG = 4; + +/** + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true + */ +function clone(value) { + return baseClone(value, CLONE_SYMBOLS_FLAG); +} + +module.exports = clone; diff --git a/node_modules/sequelize-cli/node_modules/lodash/cloneDeep.js b/node_modules/sequelize-cli/node_modules/lodash/cloneDeep.js new file mode 100644 index 0000000..4425fbe --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/cloneDeep.js @@ -0,0 +1,29 @@ +var baseClone = require('./_baseClone'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_SYMBOLS_FLAG = 4; + +/** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ +function cloneDeep(value) { + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); +} + +module.exports = cloneDeep; diff --git a/node_modules/sequelize-cli/node_modules/lodash/cloneDeepWith.js b/node_modules/sequelize-cli/node_modules/lodash/cloneDeepWith.js new file mode 100644 index 0000000..fd9c6c0 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/cloneDeepWith.js @@ -0,0 +1,40 @@ +var baseClone = require('./_baseClone'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_SYMBOLS_FLAG = 4; + +/** + * This method is like `_.cloneWith` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the deep cloned value. + * @see _.cloneWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(true); + * } + * } + * + * var el = _.cloneDeepWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 20 + */ +function cloneDeepWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); +} + +module.exports = cloneDeepWith; diff --git a/node_modules/sequelize-cli/node_modules/lodash/cloneWith.js b/node_modules/sequelize-cli/node_modules/lodash/cloneWith.js new file mode 100644 index 0000000..d2f4e75 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/cloneWith.js @@ -0,0 +1,42 @@ +var baseClone = require('./_baseClone'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_SYMBOLS_FLAG = 4; + +/** + * This method is like `_.clone` except that it accepts `customizer` which + * is invoked to produce the cloned value. If `customizer` returns `undefined`, + * cloning is handled by the method instead. The `customizer` is invoked with + * up to four arguments; (value [, index|key, object, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the cloned value. + * @see _.cloneDeepWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(false); + * } + * } + * + * var el = _.cloneWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 0 + */ +function cloneWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); +} + +module.exports = cloneWith; diff --git a/node_modules/sequelize-cli/node_modules/lodash/collection.js b/node_modules/sequelize-cli/node_modules/lodash/collection.js new file mode 100644 index 0000000..77fe837 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/collection.js @@ -0,0 +1,30 @@ +module.exports = { + 'countBy': require('./countBy'), + 'each': require('./each'), + 'eachRight': require('./eachRight'), + 'every': require('./every'), + 'filter': require('./filter'), + 'find': require('./find'), + 'findLast': require('./findLast'), + 'flatMap': require('./flatMap'), + 'flatMapDeep': require('./flatMapDeep'), + 'flatMapDepth': require('./flatMapDepth'), + 'forEach': require('./forEach'), + 'forEachRight': require('./forEachRight'), + 'groupBy': require('./groupBy'), + 'includes': require('./includes'), + 'invokeMap': require('./invokeMap'), + 'keyBy': require('./keyBy'), + 'map': require('./map'), + 'orderBy': require('./orderBy'), + 'partition': require('./partition'), + 'reduce': require('./reduce'), + 'reduceRight': require('./reduceRight'), + 'reject': require('./reject'), + 'sample': require('./sample'), + 'sampleSize': require('./sampleSize'), + 'shuffle': require('./shuffle'), + 'size': require('./size'), + 'some': require('./some'), + 'sortBy': require('./sortBy') +}; diff --git a/node_modules/sequelize-cli/node_modules/lodash/commit.js b/node_modules/sequelize-cli/node_modules/lodash/commit.js new file mode 100644 index 0000000..fe4db71 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/commit.js @@ -0,0 +1,33 @@ +var LodashWrapper = require('./_LodashWrapper'); + +/** + * Executes the chain sequence and returns the wrapped result. + * + * @name commit + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).push(3); + * + * console.log(array); + * // => [1, 2] + * + * wrapped = wrapped.commit(); + * console.log(array); + * // => [1, 2, 3] + * + * wrapped.last(); + * // => 3 + * + * console.log(array); + * // => [1, 2, 3] + */ +function wrapperCommit() { + return new LodashWrapper(this.value(), this.__chain__); +} + +module.exports = wrapperCommit; diff --git a/node_modules/sequelize-cli/node_modules/lodash/compact.js b/node_modules/sequelize-cli/node_modules/lodash/compact.js new file mode 100644 index 0000000..031fab4 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/compact.js @@ -0,0 +1,31 @@ +/** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ +function compact(array) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result[resIndex++] = value; + } + } + return result; +} + +module.exports = compact; diff --git a/node_modules/sequelize-cli/node_modules/lodash/concat.js b/node_modules/sequelize-cli/node_modules/lodash/concat.js new file mode 100644 index 0000000..1da48a4 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/concat.js @@ -0,0 +1,43 @@ +var arrayPush = require('./_arrayPush'), + baseFlatten = require('./_baseFlatten'), + copyArray = require('./_copyArray'), + isArray = require('./isArray'); + +/** + * Creates a new array concatenating `array` with any additional arrays + * and/or values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to concatenate. + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var other = _.concat(array, 2, [3], [[4]]); + * + * console.log(other); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ +function concat() { + var length = arguments.length; + if (!length) { + return []; + } + var args = Array(length - 1), + array = arguments[0], + index = length; + + while (index--) { + args[index - 1] = arguments[index]; + } + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); +} + +module.exports = concat; diff --git a/node_modules/sequelize-cli/node_modules/lodash/cond.js b/node_modules/sequelize-cli/node_modules/lodash/cond.js new file mode 100644 index 0000000..6455598 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/cond.js @@ -0,0 +1,60 @@ +var apply = require('./_apply'), + arrayMap = require('./_arrayMap'), + baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that iterates over `pairs` and invokes the corresponding + * function of the first predicate to return truthy. The predicate-function + * pairs are invoked with the `this` binding and arguments of the created + * function. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {Array} pairs The predicate-function pairs. + * @returns {Function} Returns the new composite function. + * @example + * + * var func = _.cond([ + * [_.matches({ 'a': 1 }), _.constant('matches A')], + * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')], + * [_.stubTrue, _.constant('no match')] + * ]); + * + * func({ 'a': 1, 'b': 2 }); + * // => 'matches A' + * + * func({ 'a': 0, 'b': 1 }); + * // => 'matches B' + * + * func({ 'a': '1', 'b': '2' }); + * // => 'no match' + */ +function cond(pairs) { + var length = pairs == null ? 0 : pairs.length, + toIteratee = baseIteratee; + + pairs = !length ? [] : arrayMap(pairs, function(pair) { + if (typeof pair[1] != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return [toIteratee(pair[0]), pair[1]]; + }); + + return baseRest(function(args) { + var index = -1; + while (++index < length) { + var pair = pairs[index]; + if (apply(pair[0], this, args)) { + return apply(pair[1], this, args); + } + } + }); +} + +module.exports = cond; diff --git a/node_modules/sequelize-cli/node_modules/lodash/conforms.js b/node_modules/sequelize-cli/node_modules/lodash/conforms.js new file mode 100644 index 0000000..5501a94 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/conforms.js @@ -0,0 +1,35 @@ +var baseClone = require('./_baseClone'), + baseConforms = require('./_baseConforms'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1; + +/** + * Creates a function that invokes the predicate properties of `source` with + * the corresponding property values of a given object, returning `true` if + * all predicates return truthy, else `false`. + * + * **Note:** The created function is equivalent to `_.conformsTo` with + * `source` partially applied. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + * @example + * + * var objects = [ + * { 'a': 2, 'b': 1 }, + * { 'a': 1, 'b': 2 } + * ]; + * + * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } })); + * // => [{ 'a': 1, 'b': 2 }] + */ +function conforms(source) { + return baseConforms(baseClone(source, CLONE_DEEP_FLAG)); +} + +module.exports = conforms; diff --git a/node_modules/sequelize-cli/node_modules/lodash/conformsTo.js b/node_modules/sequelize-cli/node_modules/lodash/conformsTo.js new file mode 100644 index 0000000..b8a93eb --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/conformsTo.js @@ -0,0 +1,32 @@ +var baseConformsTo = require('./_baseConformsTo'), + keys = require('./keys'); + +/** + * Checks if `object` conforms to `source` by invoking the predicate + * properties of `source` with the corresponding property values of `object`. + * + * **Note:** This method is equivalent to `_.conforms` when `source` is + * partially applied. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); + * // => true + * + * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); + * // => false + */ +function conformsTo(object, source) { + return source == null || baseConformsTo(object, source, keys(source)); +} + +module.exports = conformsTo; diff --git a/node_modules/sequelize-cli/node_modules/lodash/constant.js b/node_modules/sequelize-cli/node_modules/lodash/constant.js new file mode 100644 index 0000000..655ece3 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/constant.js @@ -0,0 +1,26 @@ +/** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new constant function. + * @example + * + * var objects = _.times(2, _.constant({ 'a': 1 })); + * + * console.log(objects); + * // => [{ 'a': 1 }, { 'a': 1 }] + * + * console.log(objects[0] === objects[1]); + * // => true + */ +function constant(value) { + return function() { + return value; + }; +} + +module.exports = constant; diff --git a/node_modules/sequelize-cli/node_modules/lodash/core.js b/node_modules/sequelize-cli/node_modules/lodash/core.js new file mode 100644 index 0000000..88c263f --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/core.js @@ -0,0 +1,3836 @@ +/** + * @license + * Lodash (Custom Build) + * Build: `lodash core -o ./dist/lodash.core.js` + * Copyright JS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ +;(function() { + + /** Used as a safe reference for `undefined` in pre-ES5 environments. */ + var undefined; + + /** Used as the semantic version number. */ + var VERSION = '4.17.4'; + + /** Error message constants. */ + var FUNC_ERROR_TEXT = 'Expected a function'; + + /** Used to compose bitmasks for value comparisons. */ + var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + + /** Used to compose bitmasks for function metadata. */ + var WRAP_BIND_FLAG = 1, + WRAP_PARTIAL_FLAG = 32; + + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + numberTag = '[object Number]', + objectTag = '[object Object]', + proxyTag = '[object Proxy]', + regexpTag = '[object RegExp]', + stringTag = '[object String]'; + + /** Used to match HTML entities and HTML characters. */ + var reUnescapedHtml = /[&<>"']/g, + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + + /** Used to map characters to HTML entities. */ + var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' + }; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); + + /** Detect free variable `exports`. */ + var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + + /** Detect free variable `module`. */ + var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + + /*--------------------------------------------------------------------------*/ + + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + array.push.apply(array, values); + return array; + } + + /** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ + function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ + function baseValues(object, props) { + return baseMap(props, function(key) { + return object[key]; + }); + } + + /** + * Used by `_.escape` to convert characters to HTML entities. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + var escapeHtmlChar = basePropertyOf(htmlEscapes); + + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + + /*--------------------------------------------------------------------------*/ + + /** Used for built-in method references. */ + var arrayProto = Array.prototype, + objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to generate unique IDs. */ + var idCounter = 0; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** Used to restore the original `_` reference in `_.noConflict`. */ + var oldDash = root._; + + /** Built-in value references. */ + var objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeIsFinite = root.isFinite, + nativeKeys = overArg(Object.keys, Object), + nativeMax = Math.max; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object which wraps `value` to enable implicit method + * chain sequences. Methods that operate on and return arrays, collections, + * and functions can be chained together. Methods that retrieve a single value + * or may return a primitive value will automatically end the chain sequence + * and return the unwrapped value. Otherwise, the value must be unwrapped + * with `_#value`. + * + * Explicit chain sequences, which must be unwrapped with `_#value`, may be + * enabled using `_.chain`. + * + * The execution of chained methods is lazy, that is, it's deferred until + * `_#value` is implicitly or explicitly called. + * + * Lazy evaluation allows several methods to support shortcut fusion. + * Shortcut fusion is an optimization to merge iteratee calls; this avoids + * the creation of intermediate arrays and can greatly reduce the number of + * iteratee executions. Sections of a chain sequence qualify for shortcut + * fusion if the section is applied to an array and iteratees accept only + * one argument. The heuristic for whether a section qualifies for shortcut + * fusion is subject to change. + * + * Chaining is supported in custom builds as long as the `_#value` method is + * directly or indirectly included in the build. + * + * In addition to lodash methods, wrappers have `Array` and `String` methods. + * + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` + * + * The wrapper methods that support shortcut fusion are: + * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, + * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, + * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` + * + * The chainable wrapper methods are: + * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, + * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, + * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, + * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, + * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, + * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, + * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, + * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, + * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, + * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, + * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, + * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, + * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, + * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, + * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, + * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, + * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, + * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, + * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, + * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, + * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, + * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, + * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, + * `zipObject`, `zipObjectDeep`, and `zipWith` + * + * The wrapper methods that are **not** chainable by default are: + * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, + * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, + * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, + * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, + * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, + * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, + * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, + * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, + * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, + * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, + * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, + * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, + * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, + * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, + * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, + * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, + * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, + * `upperFirst`, `value`, and `words` + * + * @name _ + * @constructor + * @category Seq + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2, 3]); + * + * // Returns an unwrapped value. + * wrapped.reduce(_.add); + * // => 6 + * + * // Returns a wrapped value. + * var squares = wrapped.map(square); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ + function lodash(value) { + return value instanceof LodashWrapper + ? value + : new LodashWrapper(value); + } + + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ + var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; + }()); + + /** + * The base constructor for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable explicit method chain sequences. + */ + function LodashWrapper(value, chainAll) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__chain__ = !!chainAll; + } + + LodashWrapper.prototype = baseCreate(lodash.prototype); + LodashWrapper.prototype.constructor = LodashWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } + } + + /** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function baseAssignValue(object, key, value) { + object[key] = value; + } + + /** + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {Array} args The arguments to provide to `func`. + * @returns {number|Object} Returns the timer id or timeout object. + */ + function baseDelay(func, wait, args) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return setTimeout(function() { func.apply(undefined, args); }, wait); + } + + /** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEach = createBaseEach(baseForOwn); + + /** + * The base implementation of `_.every` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ + function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function(value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; + } + + /** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ + function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if (current != null && (computed === undefined + ? (current === current && !false) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } + } + return result; + } + + /** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; + } + + /** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ + function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + + /** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseFor = createBaseFor(); + + /** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); + } + + /** + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from `props`. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the function names. + */ + function baseFunctions(object, props) { + return baseFilter(props, function(key) { + return isFunction(object[key]); + }); + } + + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + return objectToString(value); + } + + /** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ + function baseGt(value, other) { + return value > other; + } + + /** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ + var baseIsArguments = noop; + + /** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ + function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; + } + + /** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); + } + + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : baseGetTag(object), + othTag = othIsArr ? arrayTag : baseGetTag(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + stack || (stack = []); + var objStack = find(stack, function(entry) { + return entry[0] == object; + }); + var othStack = find(stack, function(entry) { + return entry[0] == other; + }); + if (objStack && othStack) { + return objStack[1] == other; + } + stack.push([object, other]); + stack.push([other, object]); + if (isSameTag && !objIsObj) { + var result = (objIsArr) + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + stack.pop(); + return result; + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + var result = equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + stack.pop(); + return result; + } + } + if (!isSameTag) { + return false; + } + var result = equalObjects(object, other, bitmask, customizer, equalFunc, stack); + stack.pop(); + return result; + } + + /** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ + function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; + } + + /** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ + function baseIteratee(func) { + if (typeof func == 'function') { + return func; + } + if (func == null) { + return identity; + } + return (typeof func == 'object' ? baseMatches : baseProperty)(func); + } + + /** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ + function baseLt(value, other) { + return value < other; + } + + /** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; + } + + /** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatches(source) { + var props = nativeKeys(source); + return function(object) { + var length = props.length; + if (object == null) { + return !length; + } + object = Object(object); + while (length--) { + var key = props[length]; + if (!(key in object && + baseIsEqual(source[key], object[key], COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG) + )) { + return false; + } + } + return true; + }; + } + + /** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ + function basePick(object, props) { + object = Object(object); + return reduce(props, function(result, key) { + if (key in object) { + result[key] = object[key]; + } + return result; + }, {}); + } + + /** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ + function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); + } + + /** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; + } + + /** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ + function copyArray(source) { + return baseSlice(source, 0, source.length); + } + + /** + * The base implementation of `_.some` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function baseSome(collection, predicate) { + var result; + + baseEach(collection, function(value, index, collection) { + result = predicate(value, index, collection); + return !result; + }); + return !!result; + } + + /** + * The base implementation of `wrapperValue` which returns the result of + * performing a sequence of actions on the unwrapped `value`, where each + * successive action is supplied the return value of the previous. + * + * @private + * @param {*} value The unwrapped value. + * @param {Array} actions Actions to perform to resolve the unwrapped value. + * @returns {*} Returns the resolved value. + */ + function baseWrapperValue(value, actions) { + var result = value; + return reduce(actions, function(result, action) { + return action.func.apply(action.thisArg, arrayPush([result], action.args)); + }, result); + } + + /** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ + function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = false; + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = false; + + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { + return 1; + } + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { + return -1; + } + } + return 0; + } + + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ + function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; + } + + /** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ + function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); + } + + /** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; + } + + /** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + + /** + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. + */ + function createCtor(Ctor) { + return function() { + // Use a `switch` statement to work with class constructors. See + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; + } + + /** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ + function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = baseIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; + } + + /** + * Creates a function that wraps `func` to invoke it with the `this` binding + * of `thisArg` and `partials` prepended to the arguments it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} partials The arguments to prepend to those provided to + * the new function. + * @returns {Function} Returns the new wrapped function. + */ + function createPartial(func, bitmask, thisArg, partials) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var argsIndex = -1, + argsLength = arguments.length, + leftIndex = -1, + leftLength = partials.length, + args = Array(leftLength + argsLength), + fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + return fn.apply(isBind ? thisArg : this, args); + } + return wrapper; + } + + /** + * Used by `_.defaults` to customize its `_.assignIn` use to assign properties + * of source objects to the destination object for all destination properties + * that resolve to `undefined`. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to assign. + * @param {Object} object The parent object of `objValue`. + * @returns {*} Returns the value to assign. + */ + function customDefaultsAssignIn(objValue, srcValue, key, object) { + if (objValue === undefined || + (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { + return srcValue; + } + return objValue; + } + + /** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? [] : undefined; + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + var compared; + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!baseSome(other, function(othValue, othIndex) { + if (!indexOf(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + return result; + } + + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + } + return false; + } + + /** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = keys(object), + objLength = objProps.length, + othProps = keys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + var result = true; + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + var compared; + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + return result; + } + + /** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); + } + + /** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ + function isFlattenable(value) { + return isArray(value) || isArguments(value); + } + + /** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; + } + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString.call(value); + } + + /** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ + function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return func.apply(this, otherArgs); + }; + } + + /** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var setToString = identity; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ + function compact(array) { + return baseFilter(array, Boolean); + } + + /** + * Creates a new array concatenating `array` with any additional arrays + * and/or values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to concatenate. + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var other = _.concat(array, 2, [3], [[4]]); + * + * console.log(other); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ + function concat() { + var length = arguments.length; + if (!length) { + return []; + } + var args = Array(length - 1), + array = arguments[0], + index = length; + + while (index--) { + args[index - 1] = arguments[index]; + } + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); + } + + /** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ + function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, baseIteratee(predicate, 3), index); + } + + /** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ + function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; + } + + /** + * Recursively flattens `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, [3, [4]], 5]]); + * // => [1, 2, 3, 4, 5] + */ + function flattenDeep(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, INFINITY) : []; + } + + /** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias first + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.head([1, 2, 3]); + * // => 1 + * + * _.head([]); + * // => undefined + */ + function head(array) { + return (array && array.length) ? array[0] : undefined; + } + + /** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the + * offset from the end of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // Search from the `fromIndex`. + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + */ + function indexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (typeof fromIndex == 'number') { + fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex; + } else { + fromIndex = 0; + } + var index = (fromIndex || 0) - 1, + isReflexive = value === value; + + while (++index < length) { + var other = array[index]; + if ((isReflexive ? other === value : other !== other)) { + return index; + } + } + return -1; + } + + /** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ + function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; + } + + /** + * Creates a slice of `array` from `start` up to, but not including, `end`. + * + * **Note:** This method is used instead of + * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are + * returned. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function slice(array, start, end) { + var length = array == null ? 0 : array.length; + start = start == null ? 0 : +start; + end = end === undefined ? length : +end; + return length ? baseSlice(array, start, end) : []; + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` wrapper instance that wraps `value` with explicit method + * chain sequences enabled. The result of such sequences must be unwrapped + * with `_#value`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Seq + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _ + * .chain(users) + * .sortBy('age') + * .map(function(o) { + * return o.user + ' is ' + o.age; + * }) + * .head() + * .value(); + * // => 'pebbles is 1' + */ + function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; + } + + /** + * This method invokes `interceptor` and returns `value`. The interceptor + * is invoked with one argument; (value). The purpose of this method is to + * "tap into" a method chain sequence in order to modify intermediate results. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns `value`. + * @example + * + * _([1, 2, 3]) + * .tap(function(array) { + * // Mutate input array. + * array.pop(); + * }) + * .reverse() + * .value(); + * // => [2, 1] + */ + function tap(value, interceptor) { + interceptor(value); + return value; + } + + /** + * This method is like `_.tap` except that it returns the result of `interceptor`. + * The purpose of this method is to "pass thru" values replacing intermediate + * results in a method chain sequence. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns the result of `interceptor`. + * @example + * + * _(' abc ') + * .chain() + * .trim() + * .thru(function(value) { + * return [value]; + * }) + * .value(); + * // => ['abc'] + */ + function thru(value, interceptor) { + return interceptor(value); + } + + /** + * Creates a `lodash` wrapper instance with explicit method chain sequences enabled. + * + * @name chain + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * // A sequence without explicit chaining. + * _(users).head(); + * // => { 'user': 'barney', 'age': 36 } + * + * // A sequence with explicit chaining. + * _(users) + * .chain() + * .head() + * .pick('user') + * .value(); + * // => { 'user': 'barney' } + */ + function wrapperChain() { + return chain(this); + } + + /** + * Executes the chain sequence to resolve the unwrapped value. + * + * @name value + * @memberOf _ + * @since 0.1.0 + * @alias toJSON, valueOf + * @category Seq + * @returns {*} Returns the resolved unwrapped value. + * @example + * + * _([1, 2, 3]).value(); + * // => [1, 2, 3] + */ + function wrapperValue() { + return baseWrapperValue(this.__wrapped__, this.__actions__); + } + + /*------------------------------------------------------------------------*/ + + /** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * Iteration is stopped once `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.every(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.every(users, 'active'); + * // => false + */ + function every(collection, predicate, guard) { + predicate = guard ? undefined : predicate; + return baseEvery(collection, baseIteratee(predicate)); + } + + /** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + */ + function filter(collection, predicate) { + return baseFilter(collection, baseIteratee(predicate)); + } + + /** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ + var find = createFind(findIndex); + + /** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forEach(collection, iteratee) { + return baseEach(collection, baseIteratee(iteratee)); + } + + /** + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ + function map(collection, iteratee) { + return baseMap(collection, baseIteratee(iteratee)); + } + + /** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` thru `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not given, the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduceRight + * @example + * + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) + */ + function reduce(collection, iteratee, accumulator) { + return baseReduce(collection, baseIteratee(iteratee), accumulator, arguments.length < 3, baseEach); + } + + /** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable string keyed properties for objects. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the collection size. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ + function size(collection) { + if (collection == null) { + return 0; + } + collection = isArrayLike(collection) ? collection : nativeKeys(collection); + return collection.length; + } + + /** + * Checks if `predicate` returns truthy for **any** element of `collection`. + * Iteration is stopped once `predicate` returns truthy. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.some(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.some(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.some(users, 'active'); + * // => true + */ + function some(collection, predicate, guard) { + predicate = guard ? undefined : predicate; + return baseSome(collection, baseIteratee(predicate)); + } + + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection thru each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] + */ + function sortBy(collection, iteratee) { + var index = 0; + iteratee = baseIteratee(iteratee); + + return baseMap(baseMap(collection, function(value, key, collection) { + return { 'value': value, 'index': index++, 'criteria': iteratee(value, key, collection) }; + }).sort(function(object, other) { + return compareAscending(object.criteria, other.criteria) || (object.index - other.index); + }), baseProperty('value')); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it's called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery(element).on('click', _.before(5, addContactToList)); + * // => Allows adding up to 4 contacts to the list. + */ + function before(n, func) { + var result; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; + } + + /** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and `partials` prepended to the arguments it receives. + * + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * function greet(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // Bound with placeholders. + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ + var bind = baseRest(function(func, thisArg, partials) { + return createPartial(func, WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG, thisArg, partials); + }); + + /** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // => Logs 'deferred' after one millisecond. + */ + var defer = baseRest(function(func, args) { + return baseDelay(func, 1, args); + }); + + /** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => Logs 'later' after one second. + */ + var delay = baseRest(function(func, wait, args) { + return baseDelay(func, toNumber(wait) || 0, args); + }); + + /** + * Creates a function that negates the result of the predicate `func`. The + * `func` predicate is invoked with the `this` binding and arguments of the + * created function. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} predicate The predicate to negate. + * @returns {Function} Returns the new negated function. + * @example + * + * function isEven(n) { + * return n % 2 == 0; + * } + * + * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); + * // => [1, 3, 5] + */ + function negate(predicate) { + if (typeof predicate != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function() { + var args = arguments; + return !predicate.apply(this, args); + }; + } + + /** + * Creates a function that is restricted to invoking `func` once. Repeat calls + * to the function return the value of the first invocation. The `func` is + * invoked with the `this` binding and arguments of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // => `createApplication` is invoked once + */ + function once(func) { + return before(2, func); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true + */ + function clone(value) { + if (!isObject(value)) { + return value; + } + return isArray(value) ? copyArray(value) : copyObject(value, nativeKeys(value)); + } + + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + function eq(value, other) { + return value === other || (value !== value && other !== other); + } + + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); + }; + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + var isArray = Array.isArray; + + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + + /** + * Checks if `value` is classified as a boolean primitive or object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. + * @example + * + * _.isBoolean(false); + * // => true + * + * _.isBoolean(null); + * // => false + */ + function isBoolean(value) { + return value === true || value === false || + (isObjectLike(value) && baseGetTag(value) == boolTag); + } + + /** + * Checks if `value` is classified as a `Date` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + * + * _.isDate('Mon April 23 2012'); + * // => false + */ + var isDate = baseIsDate; + + /** + * Checks if `value` is an empty object, collection, map, or set. + * + * Objects are considered empty if they have no own enumerable string keyed + * properties. + * + * Array-like values such as `arguments` objects, arrays, buffers, strings, or + * jQuery-like collections are considered empty if they have a `length` of `0`. + * Similarly, maps and sets are considered empty if they have a `size` of `0`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ + function isEmpty(value) { + if (isArrayLike(value) && + (isArray(value) || isString(value) || + isFunction(value.splice) || isArguments(value))) { + return !value.length; + } + return !nativeKeys(value).length; + } + + /** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are compared by strict equality, i.e. `===`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ + function isEqual(value, other) { + return baseIsEqual(value, other); + } + + /** + * Checks if `value` is a finite primitive number. + * + * **Note:** This method is based on + * [`Number.isFinite`](https://mdn.io/Number/isFinite). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. + * @example + * + * _.isFinite(3); + * // => true + * + * _.isFinite(Number.MIN_VALUE); + * // => true + * + * _.isFinite(Infinity); + * // => false + * + * _.isFinite('3'); + * // => false + */ + function isFinite(value) { + return typeof value == 'number' && nativeIsFinite(value); + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + + /** + * Checks if `value` is `NaN`. + * + * **Note:** This method is based on + * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as + * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for + * `undefined` and other non-number values. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ + function isNaN(value) { + // An `NaN` primitive is the only value that is not equal to itself. + // Perform the `toStringTag` check first to avoid errors with some + // ActiveX objects in IE. + return isNumber(value) && value != +value; + } + + /** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(void 0); + * // => false + */ + function isNull(value) { + return value === null; + } + + /** + * Checks if `value` is classified as a `Number` primitive or object. + * + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are + * classified as numbers, use the `_.isFinite` method. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. + * @example + * + * _.isNumber(3); + * // => true + * + * _.isNumber(Number.MIN_VALUE); + * // => true + * + * _.isNumber(Infinity); + * // => true + * + * _.isNumber('3'); + * // => false + */ + function isNumber(value) { + return typeof value == 'number' || + (isObjectLike(value) && baseGetTag(value) == numberTag); + } + + /** + * Checks if `value` is classified as a `RegExp` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + * @example + * + * _.isRegExp(/abc/); + * // => true + * + * _.isRegExp('/abc/'); + * // => false + */ + var isRegExp = baseIsRegExp; + + /** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ + function isString(value) { + return typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); + } + + /** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ + function isUndefined(value) { + return value === undefined; + } + + /** + * Converts `value` to an array. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {Array} Returns the converted array. + * @example + * + * _.toArray({ 'a': 1, 'b': 2 }); + * // => [1, 2] + * + * _.toArray('abc'); + * // => ['a', 'b', 'c'] + * + * _.toArray(1); + * // => [] + * + * _.toArray(null); + * // => [] + */ + function toArray(value) { + if (!isArrayLike(value)) { + return values(value); + } + return value.length ? copyArray(value) : []; + } + + /** + * Converts `value` to an integer. + * + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ + var toInteger = Number; + + /** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ + var toNumber = Number; + + /** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ + function toString(value) { + if (typeof value == 'string') { + return value; + } + return value == null ? '' : (value + ''); + } + + /*------------------------------------------------------------------------*/ + + /** + * Assigns own enumerable string keyed properties of source objects to the + * destination object. Source objects are applied from left to right. + * Subsequent sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assignIn + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } + */ + var assign = createAssigner(function(object, source) { + copyObject(source, nativeKeys(source), object); + }); + + /** + * This method is like `_.assign` except that it iterates over own and + * inherited source properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assign + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } + */ + var assignIn = createAssigner(function(object, source) { + copyObject(source, nativeKeysIn(source), object); + }); + + /** + * This method is like `_.assignIn` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extendWith + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignInWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keysIn(source), object, customizer); + }); + + /** + * Creates an object that inherits from the `prototype` object. If a + * `properties` object is given, its own enumerable string keyed properties + * are assigned to the created object. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ + function create(prototype, properties) { + var result = baseCreate(prototype); + return properties == null ? result : assign(result, properties); + } + + /** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var defaults = baseRest(function(args) { + args.push(undefined, customDefaultsAssignIn); + return assignInWith.apply(undefined, args); + }); + + /** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ + function has(object, path) { + return object != null && hasOwnProperty.call(object, path); + } + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + var keys = nativeKeys; + + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + var keysIn = nativeKeysIn; + + /** + * Creates an object composed of the picked `object` properties. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ + var pick = flatRest(function(object, paths) { + return object == null ? {} : basePick(object, paths); + }); + + /** + * This method is like `_.get` except that if the resolved value is a + * function it's invoked with the `this` binding of its parent object and + * its result is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to resolve. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; + * + * _.result(object, 'a[0].b.c1'); + * // => 3 + * + * _.result(object, 'a[0].b.c2'); + * // => 4 + * + * _.result(object, 'a[0].b.c3', 'default'); + * // => 'default' + * + * _.result(object, 'a[0].b.c3', _.constant('default')); + * // => 'default' + */ + function result(object, path, defaultValue) { + var value = object == null ? undefined : object[path]; + if (value === undefined) { + value = defaultValue; + } + return isFunction(value) ? value.call(object) : value; + } + + /** + * Creates an array of the own enumerable string keyed property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ + function values(object) { + return object == null ? [] : baseValues(object, keys(object)); + } + + /*------------------------------------------------------------------------*/ + + /** + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. + * + * **Note:** No other characters are escaped. To escape additional + * characters use a third-party library like [_he_](https://mths.be/he). + * + * Though the ">" character is escaped for symmetry, characters like + * ">" and "/" don't need escaping in HTML and have no special meaning + * unless they're part of a tag or unquoted attribute value. See + * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) + * (under "semi-related fun fact") for more details. + * + * When working with HTML you should always + * [quote attribute values](http://wonko.com/post/html-escaping) to reduce + * XSS vectors. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ + function escape(string) { + string = toString(string); + return (string && reHasUnescapedHtml.test(string)) + ? string.replace(reUnescapedHtml, escapeHtmlChar) + : string; + } + + /*------------------------------------------------------------------------*/ + + /** + * This method returns the first argument it receives. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'a': 1 }; + * + * console.log(_.identity(object) === object); + * // => true + */ + function identity(value) { + return value; + } + + /** + * Creates a function that invokes `func` with the arguments of the created + * function. If `func` is a property name, the created function returns the + * property value for a given element. If `func` is an array or object, the + * created function returns `true` for elements that contain the equivalent + * source properties, otherwise it returns `false`. + * + * @static + * @since 4.0.0 + * @memberOf _ + * @category Util + * @param {*} [func=_.identity] The value to convert to a callback. + * @returns {Function} Returns the callback. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true })); + * // => [{ 'user': 'barney', 'age': 36, 'active': true }] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, _.iteratee(['user', 'fred'])); + * // => [{ 'user': 'fred', 'age': 40 }] + * + * // The `_.property` iteratee shorthand. + * _.map(users, _.iteratee('user')); + * // => ['barney', 'fred'] + * + * // Create custom iteratee shorthands. + * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) { + * return !_.isRegExp(func) ? iteratee(func) : function(string) { + * return func.test(string); + * }; + * }); + * + * _.filter(['abc', 'def'], /ef/); + * // => ['def'] + */ + var iteratee = baseIteratee; + + /** + * Creates a function that performs a partial deep comparison between a given + * object and `source`, returning `true` if the given object has equivalent + * property values, else `false`. + * + * **Note:** The created function is equivalent to `_.isMatch` with `source` + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + * @example + * + * var objects = [ + * { 'a': 1, 'b': 2, 'c': 3 }, + * { 'a': 4, 'b': 5, 'c': 6 } + * ]; + * + * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); + * // => [{ 'a': 4, 'b': 5, 'c': 6 }] + */ + function matches(source) { + return baseMatches(assign({}, source)); + } + + /** + * Adds all own enumerable string keyed function properties of a source + * object to the destination object. If `object` is a function, then methods + * are added to its prototype as well. + * + * **Note:** Use `_.runInContext` to create a pristine `lodash` function to + * avoid conflicts caused by modifying the original. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {Function|Object} [object=lodash] The destination object. + * @param {Object} source The object of functions to add. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.chain=true] Specify whether mixins are chainable. + * @returns {Function|Object} Returns `object`. + * @example + * + * function vowels(string) { + * return _.filter(string, function(v) { + * return /[aeiou]/i.test(v); + * }); + * } + * + * _.mixin({ 'vowels': vowels }); + * _.vowels('fred'); + * // => ['e'] + * + * _('fred').vowels().value(); + * // => ['e'] + * + * _.mixin({ 'vowels': vowels }, { 'chain': false }); + * _('fred').vowels(); + * // => ['e'] + */ + function mixin(object, source, options) { + var props = keys(source), + methodNames = baseFunctions(source, props); + + if (options == null && + !(isObject(source) && (methodNames.length || !props.length))) { + options = source; + source = object; + object = this; + methodNames = baseFunctions(source, keys(source)); + } + var chain = !(isObject(options) && 'chain' in options) || !!options.chain, + isFunc = isFunction(object); + + baseEach(methodNames, function(methodName) { + var func = source[methodName]; + object[methodName] = func; + if (isFunc) { + object.prototype[methodName] = function() { + var chainAll = this.__chain__; + if (chain || chainAll) { + var result = object(this.__wrapped__), + actions = result.__actions__ = copyArray(this.__actions__); + + actions.push({ 'func': func, 'args': arguments, 'thisArg': object }); + result.__chain__ = chainAll; + return result; + } + return func.apply(object, arrayPush([this.value()], arguments)); + }; + } + }); + + return object; + } + + /** + * Reverts the `_` variable to its previous value and returns a reference to + * the `lodash` function. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @returns {Function} Returns the `lodash` function. + * @example + * + * var lodash = _.noConflict(); + */ + function noConflict() { + if (root._ === this) { + root._ = oldDash; + } + return this; + } + + /** + * This method returns `undefined`. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] + */ + function noop() { + // No operation performed. + } + + /** + * Generates a unique ID. If `prefix` is given, the ID is appended to it. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {string} [prefix=''] The value to prefix the ID with. + * @returns {string} Returns the unique ID. + * @example + * + * _.uniqueId('contact_'); + * // => 'contact_104' + * + * _.uniqueId(); + * // => '105' + */ + function uniqueId(prefix) { + var id = ++idCounter; + return toString(prefix) + id; + } + + /*------------------------------------------------------------------------*/ + + /** + * Computes the maximum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the maximum value. + * @example + * + * _.max([4, 2, 8, 6]); + * // => 8 + * + * _.max([]); + * // => undefined + */ + function max(array) { + return (array && array.length) + ? baseExtremum(array, identity, baseGt) + : undefined; + } + + /** + * Computes the minimum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the minimum value. + * @example + * + * _.min([4, 2, 8, 6]); + * // => 2 + * + * _.min([]); + * // => undefined + */ + function min(array) { + return (array && array.length) + ? baseExtremum(array, identity, baseLt) + : undefined; + } + + /*------------------------------------------------------------------------*/ + + // Add methods that return wrapped values in chain sequences. + lodash.assignIn = assignIn; + lodash.before = before; + lodash.bind = bind; + lodash.chain = chain; + lodash.compact = compact; + lodash.concat = concat; + lodash.create = create; + lodash.defaults = defaults; + lodash.defer = defer; + lodash.delay = delay; + lodash.filter = filter; + lodash.flatten = flatten; + lodash.flattenDeep = flattenDeep; + lodash.iteratee = iteratee; + lodash.keys = keys; + lodash.map = map; + lodash.matches = matches; + lodash.mixin = mixin; + lodash.negate = negate; + lodash.once = once; + lodash.pick = pick; + lodash.slice = slice; + lodash.sortBy = sortBy; + lodash.tap = tap; + lodash.thru = thru; + lodash.toArray = toArray; + lodash.values = values; + + // Add aliases. + lodash.extend = assignIn; + + // Add methods to `lodash.prototype`. + mixin(lodash, lodash); + + /*------------------------------------------------------------------------*/ + + // Add methods that return unwrapped values in chain sequences. + lodash.clone = clone; + lodash.escape = escape; + lodash.every = every; + lodash.find = find; + lodash.forEach = forEach; + lodash.has = has; + lodash.head = head; + lodash.identity = identity; + lodash.indexOf = indexOf; + lodash.isArguments = isArguments; + lodash.isArray = isArray; + lodash.isBoolean = isBoolean; + lodash.isDate = isDate; + lodash.isEmpty = isEmpty; + lodash.isEqual = isEqual; + lodash.isFinite = isFinite; + lodash.isFunction = isFunction; + lodash.isNaN = isNaN; + lodash.isNull = isNull; + lodash.isNumber = isNumber; + lodash.isObject = isObject; + lodash.isRegExp = isRegExp; + lodash.isString = isString; + lodash.isUndefined = isUndefined; + lodash.last = last; + lodash.max = max; + lodash.min = min; + lodash.noConflict = noConflict; + lodash.noop = noop; + lodash.reduce = reduce; + lodash.result = result; + lodash.size = size; + lodash.some = some; + lodash.uniqueId = uniqueId; + + // Add aliases. + lodash.each = forEach; + lodash.first = head; + + mixin(lodash, (function() { + var source = {}; + baseForOwn(lodash, function(func, methodName) { + if (!hasOwnProperty.call(lodash.prototype, methodName)) { + source[methodName] = func; + } + }); + return source; + }()), { 'chain': false }); + + /*------------------------------------------------------------------------*/ + + /** + * The semantic version number. + * + * @static + * @memberOf _ + * @type {string} + */ + lodash.VERSION = VERSION; + + // Add `Array` methods to `lodash.prototype`. + baseEach(['pop', 'join', 'replace', 'reverse', 'split', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) { + var func = (/^(?:replace|split)$/.test(methodName) ? String.prototype : arrayProto)[methodName], + chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru', + retUnwrapped = /^(?:pop|join|replace|shift)$/.test(methodName); + + lodash.prototype[methodName] = function() { + var args = arguments; + if (retUnwrapped && !this.__chain__) { + var value = this.value(); + return func.apply(isArray(value) ? value : [], args); + } + return this[chainName](function(value) { + return func.apply(isArray(value) ? value : [], args); + }); + }; + }); + + // Add chain sequence methods to the `lodash` wrapper. + lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue; + + /*--------------------------------------------------------------------------*/ + + // Some AMD build optimizers, like r.js, check for condition patterns like: + if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) { + // Expose Lodash on the global object to prevent errors when Lodash is + // loaded by a script tag in the presence of an AMD loader. + // See http://requirejs.org/docs/errors.html#mismatch for more details. + // Use `_.noConflict` to remove Lodash from the global object. + root._ = lodash; + + // Define as an anonymous module so, through path mapping, it can be + // referenced as the "underscore" module. + define(function() { + return lodash; + }); + } + // Check for `exports` after `define` in case a build optimizer adds it. + else if (freeModule) { + // Export for Node.js. + (freeModule.exports = lodash)._ = lodash; + // Export for CommonJS support. + freeExports._ = lodash; + } + else { + // Export to the global object. + root._ = lodash; + } +}.call(this)); diff --git a/node_modules/sequelize-cli/node_modules/lodash/core.min.js b/node_modules/sequelize-cli/node_modules/lodash/core.min.js new file mode 100644 index 0000000..b909d31 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/core.min.js @@ -0,0 +1,29 @@ +/** + * @license + * Lodash (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE + * Build: `lodash core -o ./dist/lodash.core.js` + */ +;(function(){function n(n){return K(n)&&pn.call(n,"callee")&&!bn.call(n,"callee")}function t(n,t){return n.push.apply(n,t),n}function r(n){return function(t){return null==t?nn:t[n]}}function e(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function u(n,t){return j(t,function(t){return n[t]})}function o(n){return n instanceof i?n:new i(n)}function i(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function c(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function"); +return setTimeout(function(){n.apply(nn,r)},t)}function f(n,t){var r=true;return mn(n,function(n,e,u){return r=!!t(n,e,u)}),r}function a(n,t,r){for(var e=-1,u=n.length;++et}function y(n,t,r,e,u){return n===t||(null==n||null==t||!K(n)&&!K(t)?n!==n&&t!==t:b(n,t,r,e,y,u))}function b(n,t,r,e,u,o){var i=Nn(n),c=Nn(t),f=i?"[object Array]":hn.call(n),a=c?"[object Array]":hn.call(t),f="[object Arguments]"==f?"[object Object]":f,a="[object Arguments]"==a?"[object Object]":a,l="[object Object]"==f,c="[object Object]"==a,a=f==a;o||(o=[]);var p=An(o,function(t){return t[0]==n}),s=An(o,function(n){ +return n[0]==t});if(p&&s)return p[1]==t;if(o.push([n,t]),o.push([t,n]),a&&!l){if(i)r=B(n,t,r,e,u,o);else n:{switch(f){case"[object Boolean]":case"[object Date]":case"[object Number]":r=M(+n,+t);break n;case"[object Error]":r=n.name==t.name&&n.message==t.message;break n;case"[object RegExp]":case"[object String]":r=n==t+"";break n}r=false}return o.pop(),r}return 1&r||(i=l&&pn.call(n,"__wrapped__"),f=c&&pn.call(t,"__wrapped__"),!i&&!f)?!!a&&(r=R(n,t,r,e,u,o),o.pop(),r):(i=i?n.value():n,f=f?t.value():t, +r=u(i,f,r,e,o),o.pop(),r)}function g(n){return typeof n=="function"?n:null==n?Y:(typeof n=="object"?d:r)(n)}function _(n,t){return nt&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++ei))return false;for(var c=-1,f=true,a=2&r?[]:nn;++cr?jn(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++rarguments.length,mn)}function J(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Fn(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=nn),r}}function M(n,t){return n===t||n!==n&&t!==t}function U(n){var t;return(t=null!=n)&&(t=n.length,t=typeof t=="number"&&-1=t),t&&!V(n)}function V(n){return!!H(n)&&(n=hn.call(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n); +}function H(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function K(n){return null!=n&&typeof n=="object"}function L(n){return typeof n=="number"||K(n)&&"[object Number]"==hn.call(n)}function Q(n){return typeof n=="string"||!Nn(n)&&K(n)&&"[object String]"==hn.call(n)}function W(n){return typeof n=="string"?n:null==n?"":n+""}function X(n){return null==n?[]:u(n,In(n))}function Y(n){return n}function Z(n,r,e){var u=In(r),o=h(r,u);null!=e||H(r)&&(o.length||!u.length)||(e=r,r=n,n=this,o=h(r,In(r))); +var i=!(H(e)&&"chain"in e&&!e.chain),c=V(n);return mn(o,function(e){var u=r[e];n[e]=u,c&&(n.prototype[e]=function(){var r=this.__chain__;if(i||r){var e=n(this.__wrapped__);return(e.__actions__=A(this.__actions__)).push({func:u,args:arguments,thisArg:n}),e.__chain__=r,e}return u.apply(n,t([this.value()],arguments))})}),n}var nn,tn=1/0,rn=/[&<>"']/g,en=RegExp(rn.source),un=typeof self=="object"&&self&&self.Object===Object&&self,on=typeof global=="object"&&global&&global.Object===Object&&global||un||Function("return this")(),cn=(un=typeof exports=="object"&&exports&&!exports.nodeType&&exports)&&typeof module=="object"&&module&&!module.nodeType&&module,fn=function(n){ +return function(t){return null==n?nn:n[t]}}({"&":"&","<":"<",">":">",'"':""","'":"'"}),an=Array.prototype,ln=Object.prototype,pn=ln.hasOwnProperty,sn=0,hn=ln.toString,vn=on._,yn=Object.create,bn=ln.propertyIsEnumerable,gn=on.isFinite,_n=function(n,t){return function(r){return n(t(r))}}(Object.keys,Object),jn=Math.max,dn=function(){function n(){}return function(t){return H(t)?yn?yn(t):(n.prototype=t,t=new n,n.prototype=nn,t):{}}}();i.prototype=dn(o.prototype),i.prototype.constructor=i; +var mn=function(n,t){return function(r,e){if(null==r)return r;if(!U(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++or&&(r=jn(e+r,0));n:{for(t=g(t),e=n.length,r+=-1;++re||o&&c&&a||!u&&a||!i){r=1;break n}if(!o&&r { '4': 1, '6': 2 } + * + * // The `_.property` iteratee shorthand. + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ +var countBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + ++result[key]; + } else { + baseAssignValue(result, key, 1); + } +}); + +module.exports = countBy; diff --git a/node_modules/sequelize-cli/node_modules/lodash/create.js b/node_modules/sequelize-cli/node_modules/lodash/create.js new file mode 100644 index 0000000..919edb8 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/create.js @@ -0,0 +1,43 @@ +var baseAssign = require('./_baseAssign'), + baseCreate = require('./_baseCreate'); + +/** + * Creates an object that inherits from the `prototype` object. If a + * `properties` object is given, its own enumerable string keyed properties + * are assigned to the created object. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ +function create(prototype, properties) { + var result = baseCreate(prototype); + return properties == null ? result : baseAssign(result, properties); +} + +module.exports = create; diff --git a/node_modules/sequelize-cli/node_modules/lodash/curry.js b/node_modules/sequelize-cli/node_modules/lodash/curry.js new file mode 100644 index 0000000..918db1a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/curry.js @@ -0,0 +1,57 @@ +var createWrap = require('./_createWrap'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_CURRY_FLAG = 8; + +/** + * Creates a function that accepts arguments of `func` and either invokes + * `func` returning its result, if at least `arity` number of arguments have + * been provided, or returns a function that accepts the remaining `func` + * arguments, and so on. The arity of `func` may be specified if `func.length` + * is not sufficient. + * + * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curry(abc); + * + * curried(1)(2)(3); + * // => [1, 2, 3] + * + * curried(1, 2)(3); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(1)(_, 3)(2); + * // => [1, 2, 3] + */ +function curry(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curry.placeholder; + return result; +} + +// Assign default placeholders. +curry.placeholder = {}; + +module.exports = curry; diff --git a/node_modules/sequelize-cli/node_modules/lodash/curryRight.js b/node_modules/sequelize-cli/node_modules/lodash/curryRight.js new file mode 100644 index 0000000..c85b6f3 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/curryRight.js @@ -0,0 +1,54 @@ +var createWrap = require('./_createWrap'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_CURRY_RIGHT_FLAG = 16; + +/** + * This method is like `_.curry` except that arguments are applied to `func` + * in the manner of `_.partialRight` instead of `_.partial`. + * + * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curryRight(abc); + * + * curried(3)(2)(1); + * // => [1, 2, 3] + * + * curried(2, 3)(1); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(3)(1, _)(2); + * // => [1, 2, 3] + */ +function curryRight(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curryRight.placeholder; + return result; +} + +// Assign default placeholders. +curryRight.placeholder = {}; + +module.exports = curryRight; diff --git a/node_modules/sequelize-cli/node_modules/lodash/date.js b/node_modules/sequelize-cli/node_modules/lodash/date.js new file mode 100644 index 0000000..cbf5b41 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/date.js @@ -0,0 +1,3 @@ +module.exports = { + 'now': require('./now') +}; diff --git a/node_modules/sequelize-cli/node_modules/lodash/debounce.js b/node_modules/sequelize-cli/node_modules/lodash/debounce.js new file mode 100644 index 0000000..04d7dfd --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/debounce.js @@ -0,0 +1,188 @@ +var isObject = require('./isObject'), + now = require('./now'), + toNumber = require('./toNumber'); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ +function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + result = wait - timeSinceLastCall; + + return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; +} + +module.exports = debounce; diff --git a/node_modules/sequelize-cli/node_modules/lodash/deburr.js b/node_modules/sequelize-cli/node_modules/lodash/deburr.js new file mode 100644 index 0000000..f85e314 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/deburr.js @@ -0,0 +1,45 @@ +var deburrLetter = require('./_deburrLetter'), + toString = require('./toString'); + +/** Used to match Latin Unicode letters (excluding mathematical operators). */ +var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; + +/** Used to compose unicode character classes. */ +var rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange; + +/** Used to compose unicode capture groups. */ +var rsCombo = '[' + rsComboRange + ']'; + +/** + * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and + * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). + */ +var reComboMark = RegExp(rsCombo, 'g'); + +/** + * Deburrs `string` by converting + * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) + * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) + * letters to basic Latin letters and removing + * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to deburr. + * @returns {string} Returns the deburred string. + * @example + * + * _.deburr('déjà vu'); + * // => 'deja vu' + */ +function deburr(string) { + string = toString(string); + return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); +} + +module.exports = deburr; diff --git a/node_modules/sequelize-cli/node_modules/lodash/defaultTo.js b/node_modules/sequelize-cli/node_modules/lodash/defaultTo.js new file mode 100644 index 0000000..5b33359 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/defaultTo.js @@ -0,0 +1,25 @@ +/** + * Checks `value` to determine whether a default value should be returned in + * its place. The `defaultValue` is returned if `value` is `NaN`, `null`, + * or `undefined`. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Util + * @param {*} value The value to check. + * @param {*} defaultValue The default value. + * @returns {*} Returns the resolved value. + * @example + * + * _.defaultTo(1, 10); + * // => 1 + * + * _.defaultTo(undefined, 10); + * // => 10 + */ +function defaultTo(value, defaultValue) { + return (value == null || value !== value) ? defaultValue : value; +} + +module.exports = defaultTo; diff --git a/node_modules/sequelize-cli/node_modules/lodash/defaults.js b/node_modules/sequelize-cli/node_modules/lodash/defaults.js new file mode 100644 index 0000000..6b75ee0 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/defaults.js @@ -0,0 +1,32 @@ +var apply = require('./_apply'), + assignInWith = require('./assignInWith'), + baseRest = require('./_baseRest'), + customDefaultsAssignIn = require('./_customDefaultsAssignIn'); + +/** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ +var defaults = baseRest(function(args) { + args.push(undefined, customDefaultsAssignIn); + return apply(assignInWith, undefined, args); +}); + +module.exports = defaults; diff --git a/node_modules/sequelize-cli/node_modules/lodash/defaultsDeep.js b/node_modules/sequelize-cli/node_modules/lodash/defaultsDeep.js new file mode 100644 index 0000000..9b5fa3e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/defaultsDeep.js @@ -0,0 +1,30 @@ +var apply = require('./_apply'), + baseRest = require('./_baseRest'), + customDefaultsMerge = require('./_customDefaultsMerge'), + mergeWith = require('./mergeWith'); + +/** + * This method is like `_.defaults` except that it recursively assigns + * default properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaults + * @example + * + * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); + * // => { 'a': { 'b': 2, 'c': 3 } } + */ +var defaultsDeep = baseRest(function(args) { + args.push(undefined, customDefaultsMerge); + return apply(mergeWith, undefined, args); +}); + +module.exports = defaultsDeep; diff --git a/node_modules/sequelize-cli/node_modules/lodash/defer.js b/node_modules/sequelize-cli/node_modules/lodash/defer.js new file mode 100644 index 0000000..f6d6c6f --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/defer.js @@ -0,0 +1,26 @@ +var baseDelay = require('./_baseDelay'), + baseRest = require('./_baseRest'); + +/** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // => Logs 'deferred' after one millisecond. + */ +var defer = baseRest(function(func, args) { + return baseDelay(func, 1, args); +}); + +module.exports = defer; diff --git a/node_modules/sequelize-cli/node_modules/lodash/delay.js b/node_modules/sequelize-cli/node_modules/lodash/delay.js new file mode 100644 index 0000000..bd55479 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/delay.js @@ -0,0 +1,28 @@ +var baseDelay = require('./_baseDelay'), + baseRest = require('./_baseRest'), + toNumber = require('./toNumber'); + +/** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => Logs 'later' after one second. + */ +var delay = baseRest(function(func, wait, args) { + return baseDelay(func, toNumber(wait) || 0, args); +}); + +module.exports = delay; diff --git a/node_modules/sequelize-cli/node_modules/lodash/difference.js b/node_modules/sequelize-cli/node_modules/lodash/difference.js new file mode 100644 index 0000000..fa28bb3 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/difference.js @@ -0,0 +1,33 @@ +var baseDifference = require('./_baseDifference'), + baseFlatten = require('./_baseFlatten'), + baseRest = require('./_baseRest'), + isArrayLikeObject = require('./isArrayLikeObject'); + +/** + * Creates an array of `array` values not included in the other given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * **Note:** Unlike `_.pullAll`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.without, _.xor + * @example + * + * _.difference([2, 1], [2, 3]); + * // => [1] + */ +var difference = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) + : []; +}); + +module.exports = difference; diff --git a/node_modules/sequelize-cli/node_modules/lodash/differenceBy.js b/node_modules/sequelize-cli/node_modules/lodash/differenceBy.js new file mode 100644 index 0000000..2cd63e7 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/differenceBy.js @@ -0,0 +1,44 @@ +var baseDifference = require('./_baseDifference'), + baseFlatten = require('./_baseFlatten'), + baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'), + isArrayLikeObject = require('./isArrayLikeObject'), + last = require('./last'); + +/** + * This method is like `_.difference` except that it accepts `iteratee` which + * is invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * **Note:** Unlike `_.pullAllBy`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2] + * + * // The `_.property` iteratee shorthand. + * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ +var differenceBy = baseRest(function(array, values) { + var iteratee = last(values); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), baseIteratee(iteratee, 2)) + : []; +}); + +module.exports = differenceBy; diff --git a/node_modules/sequelize-cli/node_modules/lodash/differenceWith.js b/node_modules/sequelize-cli/node_modules/lodash/differenceWith.js new file mode 100644 index 0000000..c0233f4 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/differenceWith.js @@ -0,0 +1,40 @@ +var baseDifference = require('./_baseDifference'), + baseFlatten = require('./_baseFlatten'), + baseRest = require('./_baseRest'), + isArrayLikeObject = require('./isArrayLikeObject'), + last = require('./last'); + +/** + * This method is like `_.difference` except that it accepts `comparator` + * which is invoked to compare elements of `array` to `values`. The order and + * references of result values are determined by the first array. The comparator + * is invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.pullAllWith`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * + * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); + * // => [{ 'x': 2, 'y': 1 }] + */ +var differenceWith = baseRest(function(array, values) { + var comparator = last(values); + if (isArrayLikeObject(comparator)) { + comparator = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator) + : []; +}); + +module.exports = differenceWith; diff --git a/node_modules/sequelize-cli/node_modules/lodash/divide.js b/node_modules/sequelize-cli/node_modules/lodash/divide.js new file mode 100644 index 0000000..8cae0cd --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/divide.js @@ -0,0 +1,22 @@ +var createMathOperation = require('./_createMathOperation'); + +/** + * Divide two numbers. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Math + * @param {number} dividend The first number in a division. + * @param {number} divisor The second number in a division. + * @returns {number} Returns the quotient. + * @example + * + * _.divide(6, 4); + * // => 1.5 + */ +var divide = createMathOperation(function(dividend, divisor) { + return dividend / divisor; +}, 1); + +module.exports = divide; diff --git a/node_modules/sequelize-cli/node_modules/lodash/drop.js b/node_modules/sequelize-cli/node_modules/lodash/drop.js new file mode 100644 index 0000000..d5c3cba --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/drop.js @@ -0,0 +1,38 @@ +var baseSlice = require('./_baseSlice'), + toInteger = require('./toInteger'); + +/** + * Creates a slice of `array` with `n` elements dropped from the beginning. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.drop([1, 2, 3]); + * // => [2, 3] + * + * _.drop([1, 2, 3], 2); + * // => [3] + * + * _.drop([1, 2, 3], 5); + * // => [] + * + * _.drop([1, 2, 3], 0); + * // => [1, 2, 3] + */ +function drop(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, n < 0 ? 0 : n, length); +} + +module.exports = drop; diff --git a/node_modules/sequelize-cli/node_modules/lodash/dropRight.js b/node_modules/sequelize-cli/node_modules/lodash/dropRight.js new file mode 100644 index 0000000..441fe99 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/dropRight.js @@ -0,0 +1,39 @@ +var baseSlice = require('./_baseSlice'), + toInteger = require('./toInteger'); + +/** + * Creates a slice of `array` with `n` elements dropped from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRight([1, 2, 3]); + * // => [1, 2] + * + * _.dropRight([1, 2, 3], 2); + * // => [1] + * + * _.dropRight([1, 2, 3], 5); + * // => [] + * + * _.dropRight([1, 2, 3], 0); + * // => [1, 2, 3] + */ +function dropRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, 0, n < 0 ? 0 : n); +} + +module.exports = dropRight; diff --git a/node_modules/sequelize-cli/node_modules/lodash/dropRightWhile.js b/node_modules/sequelize-cli/node_modules/lodash/dropRightWhile.js new file mode 100644 index 0000000..9ad36a0 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/dropRightWhile.js @@ -0,0 +1,45 @@ +var baseIteratee = require('./_baseIteratee'), + baseWhile = require('./_baseWhile'); + +/** + * Creates a slice of `array` excluding elements dropped from the end. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.dropRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney'] + * + * // The `_.matches` iteratee shorthand. + * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropRightWhile(users, ['active', false]); + * // => objects for ['barney'] + * + * // The `_.property` iteratee shorthand. + * _.dropRightWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ +function dropRightWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, baseIteratee(predicate, 3), true, true) + : []; +} + +module.exports = dropRightWhile; diff --git a/node_modules/sequelize-cli/node_modules/lodash/dropWhile.js b/node_modules/sequelize-cli/node_modules/lodash/dropWhile.js new file mode 100644 index 0000000..903ef56 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/dropWhile.js @@ -0,0 +1,45 @@ +var baseIteratee = require('./_baseIteratee'), + baseWhile = require('./_baseWhile'); + +/** + * Creates a slice of `array` excluding elements dropped from the beginning. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.dropWhile(users, function(o) { return !o.active; }); + * // => objects for ['pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.dropWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropWhile(users, ['active', false]); + * // => objects for ['pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.dropWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ +function dropWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, baseIteratee(predicate, 3), true) + : []; +} + +module.exports = dropWhile; diff --git a/node_modules/sequelize-cli/node_modules/lodash/each.js b/node_modules/sequelize-cli/node_modules/lodash/each.js new file mode 100644 index 0000000..8800f42 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/each.js @@ -0,0 +1 @@ +module.exports = require('./forEach'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/eachRight.js b/node_modules/sequelize-cli/node_modules/lodash/eachRight.js new file mode 100644 index 0000000..3252b2a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/eachRight.js @@ -0,0 +1 @@ +module.exports = require('./forEachRight'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/endsWith.js b/node_modules/sequelize-cli/node_modules/lodash/endsWith.js new file mode 100644 index 0000000..76fc866 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/endsWith.js @@ -0,0 +1,43 @@ +var baseClamp = require('./_baseClamp'), + baseToString = require('./_baseToString'), + toInteger = require('./toInteger'), + toString = require('./toString'); + +/** + * Checks if `string` ends with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=string.length] The position to search up to. + * @returns {boolean} Returns `true` if `string` ends with `target`, + * else `false`. + * @example + * + * _.endsWith('abc', 'c'); + * // => true + * + * _.endsWith('abc', 'b'); + * // => false + * + * _.endsWith('abc', 'b', 2); + * // => true + */ +function endsWith(string, target, position) { + string = toString(string); + target = baseToString(target); + + var length = string.length; + position = position === undefined + ? length + : baseClamp(toInteger(position), 0, length); + + var end = position; + position -= target.length; + return position >= 0 && string.slice(position, end) == target; +} + +module.exports = endsWith; diff --git a/node_modules/sequelize-cli/node_modules/lodash/entries.js b/node_modules/sequelize-cli/node_modules/lodash/entries.js new file mode 100644 index 0000000..7a88df2 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/entries.js @@ -0,0 +1 @@ +module.exports = require('./toPairs'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/entriesIn.js b/node_modules/sequelize-cli/node_modules/lodash/entriesIn.js new file mode 100644 index 0000000..f6c6331 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/entriesIn.js @@ -0,0 +1 @@ +module.exports = require('./toPairsIn'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/eq.js b/node_modules/sequelize-cli/node_modules/lodash/eq.js new file mode 100644 index 0000000..a940688 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/eq.js @@ -0,0 +1,37 @@ +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +module.exports = eq; diff --git a/node_modules/sequelize-cli/node_modules/lodash/escape.js b/node_modules/sequelize-cli/node_modules/lodash/escape.js new file mode 100644 index 0000000..9247e00 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/escape.js @@ -0,0 +1,43 @@ +var escapeHtmlChar = require('./_escapeHtmlChar'), + toString = require('./toString'); + +/** Used to match HTML entities and HTML characters. */ +var reUnescapedHtml = /[&<>"']/g, + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + +/** + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. + * + * **Note:** No other characters are escaped. To escape additional + * characters use a third-party library like [_he_](https://mths.be/he). + * + * Though the ">" character is escaped for symmetry, characters like + * ">" and "/" don't need escaping in HTML and have no special meaning + * unless they're part of a tag or unquoted attribute value. See + * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) + * (under "semi-related fun fact") for more details. + * + * When working with HTML you should always + * [quote attribute values](http://wonko.com/post/html-escaping) to reduce + * XSS vectors. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ +function escape(string) { + string = toString(string); + return (string && reHasUnescapedHtml.test(string)) + ? string.replace(reUnescapedHtml, escapeHtmlChar) + : string; +} + +module.exports = escape; diff --git a/node_modules/sequelize-cli/node_modules/lodash/escapeRegExp.js b/node_modules/sequelize-cli/node_modules/lodash/escapeRegExp.js new file mode 100644 index 0000000..0a58c69 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/escapeRegExp.js @@ -0,0 +1,32 @@ +var toString = require('./toString'); + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, + reHasRegExpChar = RegExp(reRegExpChar.source); + +/** + * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", + * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escapeRegExp('[lodash](https://lodash.com/)'); + * // => '\[lodash\]\(https://lodash\.com/\)' + */ +function escapeRegExp(string) { + string = toString(string); + return (string && reHasRegExpChar.test(string)) + ? string.replace(reRegExpChar, '\\$&') + : string; +} + +module.exports = escapeRegExp; diff --git a/node_modules/sequelize-cli/node_modules/lodash/every.js b/node_modules/sequelize-cli/node_modules/lodash/every.js new file mode 100644 index 0000000..25080da --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/every.js @@ -0,0 +1,56 @@ +var arrayEvery = require('./_arrayEvery'), + baseEvery = require('./_baseEvery'), + baseIteratee = require('./_baseIteratee'), + isArray = require('./isArray'), + isIterateeCall = require('./_isIterateeCall'); + +/** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * Iteration is stopped once `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.every(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.every(users, 'active'); + * // => false + */ +function every(collection, predicate, guard) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, baseIteratee(predicate, 3)); +} + +module.exports = every; diff --git a/node_modules/sequelize-cli/node_modules/lodash/extend.js b/node_modules/sequelize-cli/node_modules/lodash/extend.js new file mode 100644 index 0000000..e00166c --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/extend.js @@ -0,0 +1 @@ +module.exports = require('./assignIn'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/extendWith.js b/node_modules/sequelize-cli/node_modules/lodash/extendWith.js new file mode 100644 index 0000000..dbdcb3b --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/extendWith.js @@ -0,0 +1 @@ +module.exports = require('./assignInWith'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fill.js b/node_modules/sequelize-cli/node_modules/lodash/fill.js new file mode 100644 index 0000000..ae13aa1 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fill.js @@ -0,0 +1,45 @@ +var baseFill = require('./_baseFill'), + isIterateeCall = require('./_isIterateeCall'); + +/** + * Fills elements of `array` with `value` from `start` up to, but not + * including, `end`. + * + * **Note:** This method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Array + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.fill(array, 'a'); + * console.log(array); + * // => ['a', 'a', 'a'] + * + * _.fill(Array(3), 2); + * // => [2, 2, 2] + * + * _.fill([4, 6, 8, 10], '*', 1, 3); + * // => [4, '*', '*', 10] + */ +function fill(array, value, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { + start = 0; + end = length; + } + return baseFill(array, value, start, end); +} + +module.exports = fill; diff --git a/node_modules/sequelize-cli/node_modules/lodash/filter.js b/node_modules/sequelize-cli/node_modules/lodash/filter.js new file mode 100644 index 0000000..52616be --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/filter.js @@ -0,0 +1,48 @@ +var arrayFilter = require('./_arrayFilter'), + baseFilter = require('./_baseFilter'), + baseIteratee = require('./_baseIteratee'), + isArray = require('./isArray'); + +/** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + */ +function filter(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, baseIteratee(predicate, 3)); +} + +module.exports = filter; diff --git a/node_modules/sequelize-cli/node_modules/lodash/find.js b/node_modules/sequelize-cli/node_modules/lodash/find.js new file mode 100644 index 0000000..de732cc --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/find.js @@ -0,0 +1,42 @@ +var createFind = require('./_createFind'), + findIndex = require('./findIndex'); + +/** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ +var find = createFind(findIndex); + +module.exports = find; diff --git a/node_modules/sequelize-cli/node_modules/lodash/findIndex.js b/node_modules/sequelize-cli/node_modules/lodash/findIndex.js new file mode 100644 index 0000000..4689069 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/findIndex.js @@ -0,0 +1,55 @@ +var baseFindIndex = require('./_baseFindIndex'), + baseIteratee = require('./_baseIteratee'), + toInteger = require('./toInteger'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ +function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, baseIteratee(predicate, 3), index); +} + +module.exports = findIndex; diff --git a/node_modules/sequelize-cli/node_modules/lodash/findKey.js b/node_modules/sequelize-cli/node_modules/lodash/findKey.js new file mode 100644 index 0000000..cac0248 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/findKey.js @@ -0,0 +1,44 @@ +var baseFindKey = require('./_baseFindKey'), + baseForOwn = require('./_baseForOwn'), + baseIteratee = require('./_baseIteratee'); + +/** + * This method is like `_.find` except that it returns the key of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findKey(users, function(o) { return o.age < 40; }); + * // => 'barney' (iteration order is not guaranteed) + * + * // The `_.matches` iteratee shorthand. + * _.findKey(users, { 'age': 1, 'active': true }); + * // => 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findKey(users, 'active'); + * // => 'barney' + */ +function findKey(object, predicate) { + return baseFindKey(object, baseIteratee(predicate, 3), baseForOwn); +} + +module.exports = findKey; diff --git a/node_modules/sequelize-cli/node_modules/lodash/findLast.js b/node_modules/sequelize-cli/node_modules/lodash/findLast.js new file mode 100644 index 0000000..70b4271 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/findLast.js @@ -0,0 +1,25 @@ +var createFind = require('./_createFind'), + findLastIndex = require('./findLastIndex'); + +/** + * This method is like `_.find` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=collection.length-1] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(n) { + * return n % 2 == 1; + * }); + * // => 3 + */ +var findLast = createFind(findLastIndex); + +module.exports = findLast; diff --git a/node_modules/sequelize-cli/node_modules/lodash/findLastIndex.js b/node_modules/sequelize-cli/node_modules/lodash/findLastIndex.js new file mode 100644 index 0000000..7da3431 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/findLastIndex.js @@ -0,0 +1,59 @@ +var baseFindIndex = require('./_baseFindIndex'), + baseIteratee = require('./_baseIteratee'), + toInteger = require('./toInteger'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * This method is like `_.findIndex` except that it iterates over elements + * of `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); + * // => 2 + * + * // The `_.matches` iteratee shorthand. + * _.findLastIndex(users, { 'user': 'barney', 'active': true }); + * // => 0 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastIndex(users, ['active', false]); + * // => 2 + * + * // The `_.property` iteratee shorthand. + * _.findLastIndex(users, 'active'); + * // => 0 + */ +function findLastIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length - 1; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = fromIndex < 0 + ? nativeMax(length + index, 0) + : nativeMin(index, length - 1); + } + return baseFindIndex(array, baseIteratee(predicate, 3), index, true); +} + +module.exports = findLastIndex; diff --git a/node_modules/sequelize-cli/node_modules/lodash/findLastKey.js b/node_modules/sequelize-cli/node_modules/lodash/findLastKey.js new file mode 100644 index 0000000..66fb9fb --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/findLastKey.js @@ -0,0 +1,44 @@ +var baseFindKey = require('./_baseFindKey'), + baseForOwnRight = require('./_baseForOwnRight'), + baseIteratee = require('./_baseIteratee'); + +/** + * This method is like `_.findKey` except that it iterates over elements of + * a collection in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findLastKey(users, function(o) { return o.age < 40; }); + * // => returns 'pebbles' assuming `_.findKey` returns 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.findLastKey(users, { 'age': 36, 'active': true }); + * // => 'barney' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findLastKey(users, 'active'); + * // => 'pebbles' + */ +function findLastKey(object, predicate) { + return baseFindKey(object, baseIteratee(predicate, 3), baseForOwnRight); +} + +module.exports = findLastKey; diff --git a/node_modules/sequelize-cli/node_modules/lodash/first.js b/node_modules/sequelize-cli/node_modules/lodash/first.js new file mode 100644 index 0000000..53f4ad1 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/first.js @@ -0,0 +1 @@ +module.exports = require('./head'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/flatMap.js b/node_modules/sequelize-cli/node_modules/lodash/flatMap.js new file mode 100644 index 0000000..e668506 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/flatMap.js @@ -0,0 +1,29 @@ +var baseFlatten = require('./_baseFlatten'), + map = require('./map'); + +/** + * Creates a flattened array of values by running each element in `collection` + * thru `iteratee` and flattening the mapped results. The iteratee is invoked + * with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [n, n]; + * } + * + * _.flatMap([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ +function flatMap(collection, iteratee) { + return baseFlatten(map(collection, iteratee), 1); +} + +module.exports = flatMap; diff --git a/node_modules/sequelize-cli/node_modules/lodash/flatMapDeep.js b/node_modules/sequelize-cli/node_modules/lodash/flatMapDeep.js new file mode 100644 index 0000000..4653d60 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/flatMapDeep.js @@ -0,0 +1,31 @@ +var baseFlatten = require('./_baseFlatten'), + map = require('./map'); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDeep([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ +function flatMapDeep(collection, iteratee) { + return baseFlatten(map(collection, iteratee), INFINITY); +} + +module.exports = flatMapDeep; diff --git a/node_modules/sequelize-cli/node_modules/lodash/flatMapDepth.js b/node_modules/sequelize-cli/node_modules/lodash/flatMapDepth.js new file mode 100644 index 0000000..6d72005 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/flatMapDepth.js @@ -0,0 +1,31 @@ +var baseFlatten = require('./_baseFlatten'), + map = require('./map'), + toInteger = require('./toInteger'); + +/** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDepth([1, 2], duplicate, 2); + * // => [[1, 1], [2, 2]] + */ +function flatMapDepth(collection, iteratee, depth) { + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(map(collection, iteratee), depth); +} + +module.exports = flatMapDepth; diff --git a/node_modules/sequelize-cli/node_modules/lodash/flatten.js b/node_modules/sequelize-cli/node_modules/lodash/flatten.js new file mode 100644 index 0000000..3f09f7f --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/flatten.js @@ -0,0 +1,22 @@ +var baseFlatten = require('./_baseFlatten'); + +/** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ +function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; +} + +module.exports = flatten; diff --git a/node_modules/sequelize-cli/node_modules/lodash/flattenDeep.js b/node_modules/sequelize-cli/node_modules/lodash/flattenDeep.js new file mode 100644 index 0000000..8ad585c --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/flattenDeep.js @@ -0,0 +1,25 @@ +var baseFlatten = require('./_baseFlatten'); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Recursively flattens `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, [3, [4]], 5]]); + * // => [1, 2, 3, 4, 5] + */ +function flattenDeep(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, INFINITY) : []; +} + +module.exports = flattenDeep; diff --git a/node_modules/sequelize-cli/node_modules/lodash/flattenDepth.js b/node_modules/sequelize-cli/node_modules/lodash/flattenDepth.js new file mode 100644 index 0000000..441fdcc --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/flattenDepth.js @@ -0,0 +1,33 @@ +var baseFlatten = require('./_baseFlatten'), + toInteger = require('./toInteger'); + +/** + * Recursively flatten `array` up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Array + * @param {Array} array The array to flatten. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * var array = [1, [2, [3, [4]], 5]]; + * + * _.flattenDepth(array, 1); + * // => [1, 2, [3, [4]], 5] + * + * _.flattenDepth(array, 2); + * // => [1, 2, 3, [4], 5] + */ +function flattenDepth(array, depth) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(array, depth); +} + +module.exports = flattenDepth; diff --git a/node_modules/sequelize-cli/node_modules/lodash/flip.js b/node_modules/sequelize-cli/node_modules/lodash/flip.js new file mode 100644 index 0000000..c28dd78 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/flip.js @@ -0,0 +1,28 @@ +var createWrap = require('./_createWrap'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_FLIP_FLAG = 512; + +/** + * Creates a function that invokes `func` with arguments reversed. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to flip arguments for. + * @returns {Function} Returns the new flipped function. + * @example + * + * var flipped = _.flip(function() { + * return _.toArray(arguments); + * }); + * + * flipped('a', 'b', 'c', 'd'); + * // => ['d', 'c', 'b', 'a'] + */ +function flip(func) { + return createWrap(func, WRAP_FLIP_FLAG); +} + +module.exports = flip; diff --git a/node_modules/sequelize-cli/node_modules/lodash/floor.js b/node_modules/sequelize-cli/node_modules/lodash/floor.js new file mode 100644 index 0000000..ab6dfa2 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/floor.js @@ -0,0 +1,26 @@ +var createRound = require('./_createRound'); + +/** + * Computes `number` rounded down to `precision`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Math + * @param {number} number The number to round down. + * @param {number} [precision=0] The precision to round down to. + * @returns {number} Returns the rounded down number. + * @example + * + * _.floor(4.006); + * // => 4 + * + * _.floor(0.046, 2); + * // => 0.04 + * + * _.floor(4060, -2); + * // => 4000 + */ +var floor = createRound('floor'); + +module.exports = floor; diff --git a/node_modules/sequelize-cli/node_modules/lodash/flow.js b/node_modules/sequelize-cli/node_modules/lodash/flow.js new file mode 100644 index 0000000..74b6b62 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/flow.js @@ -0,0 +1,27 @@ +var createFlow = require('./_createFlow'); + +/** + * Creates a function that returns the result of invoking the given functions + * with the `this` binding of the created function, where each successive + * invocation is supplied the return value of the previous. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {...(Function|Function[])} [funcs] The functions to invoke. + * @returns {Function} Returns the new composite function. + * @see _.flowRight + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flow([_.add, square]); + * addSquare(1, 2); + * // => 9 + */ +var flow = createFlow(); + +module.exports = flow; diff --git a/node_modules/sequelize-cli/node_modules/lodash/flowRight.js b/node_modules/sequelize-cli/node_modules/lodash/flowRight.js new file mode 100644 index 0000000..1146141 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/flowRight.js @@ -0,0 +1,26 @@ +var createFlow = require('./_createFlow'); + +/** + * This method is like `_.flow` except that it creates a function that + * invokes the given functions from right to left. + * + * @static + * @since 3.0.0 + * @memberOf _ + * @category Util + * @param {...(Function|Function[])} [funcs] The functions to invoke. + * @returns {Function} Returns the new composite function. + * @see _.flow + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flowRight([square, _.add]); + * addSquare(1, 2); + * // => 9 + */ +var flowRight = createFlow(true); + +module.exports = flowRight; diff --git a/node_modules/sequelize-cli/node_modules/lodash/forEach.js b/node_modules/sequelize-cli/node_modules/lodash/forEach.js new file mode 100644 index 0000000..c64eaa7 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/forEach.js @@ -0,0 +1,41 @@ +var arrayEach = require('./_arrayEach'), + baseEach = require('./_baseEach'), + castFunction = require('./_castFunction'), + isArray = require('./isArray'); + +/** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ +function forEach(collection, iteratee) { + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, castFunction(iteratee)); +} + +module.exports = forEach; diff --git a/node_modules/sequelize-cli/node_modules/lodash/forEachRight.js b/node_modules/sequelize-cli/node_modules/lodash/forEachRight.js new file mode 100644 index 0000000..7390eba --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/forEachRight.js @@ -0,0 +1,31 @@ +var arrayEachRight = require('./_arrayEachRight'), + baseEachRight = require('./_baseEachRight'), + castFunction = require('./_castFunction'), + isArray = require('./isArray'); + +/** + * This method is like `_.forEach` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @alias eachRight + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEach + * @example + * + * _.forEachRight([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `2` then `1`. + */ +function forEachRight(collection, iteratee) { + var func = isArray(collection) ? arrayEachRight : baseEachRight; + return func(collection, castFunction(iteratee)); +} + +module.exports = forEachRight; diff --git a/node_modules/sequelize-cli/node_modules/lodash/forIn.js b/node_modules/sequelize-cli/node_modules/lodash/forIn.js new file mode 100644 index 0000000..583a596 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/forIn.js @@ -0,0 +1,39 @@ +var baseFor = require('./_baseFor'), + castFunction = require('./_castFunction'), + keysIn = require('./keysIn'); + +/** + * Iterates over own and inherited enumerable string keyed properties of an + * object and invokes `iteratee` for each property. The iteratee is invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forInRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). + */ +function forIn(object, iteratee) { + return object == null + ? object + : baseFor(object, castFunction(iteratee), keysIn); +} + +module.exports = forIn; diff --git a/node_modules/sequelize-cli/node_modules/lodash/forInRight.js b/node_modules/sequelize-cli/node_modules/lodash/forInRight.js new file mode 100644 index 0000000..4aedf58 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/forInRight.js @@ -0,0 +1,37 @@ +var baseForRight = require('./_baseForRight'), + castFunction = require('./_castFunction'), + keysIn = require('./keysIn'); + +/** + * This method is like `_.forIn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forIn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forInRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'. + */ +function forInRight(object, iteratee) { + return object == null + ? object + : baseForRight(object, castFunction(iteratee), keysIn); +} + +module.exports = forInRight; diff --git a/node_modules/sequelize-cli/node_modules/lodash/forOwn.js b/node_modules/sequelize-cli/node_modules/lodash/forOwn.js new file mode 100644 index 0000000..94eed84 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/forOwn.js @@ -0,0 +1,36 @@ +var baseForOwn = require('./_baseForOwn'), + castFunction = require('./_castFunction'); + +/** + * Iterates over own enumerable string keyed properties of an object and + * invokes `iteratee` for each property. The iteratee is invoked with three + * arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwnRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ +function forOwn(object, iteratee) { + return object && baseForOwn(object, castFunction(iteratee)); +} + +module.exports = forOwn; diff --git a/node_modules/sequelize-cli/node_modules/lodash/forOwnRight.js b/node_modules/sequelize-cli/node_modules/lodash/forOwnRight.js new file mode 100644 index 0000000..86f338f --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/forOwnRight.js @@ -0,0 +1,34 @@ +var baseForOwnRight = require('./_baseForOwnRight'), + castFunction = require('./_castFunction'); + +/** + * This method is like `_.forOwn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwnRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. + */ +function forOwnRight(object, iteratee) { + return object && baseForOwnRight(object, castFunction(iteratee)); +} + +module.exports = forOwnRight; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp.js b/node_modules/sequelize-cli/node_modules/lodash/fp.js new file mode 100644 index 0000000..e372dbb --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp.js @@ -0,0 +1,2 @@ +var _ = require('./lodash.min').runInContext(); +module.exports = require('./fp/_baseConvert')(_, _); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/F.js b/node_modules/sequelize-cli/node_modules/lodash/fp/F.js new file mode 100644 index 0000000..a05a63a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/F.js @@ -0,0 +1 @@ +module.exports = require('./stubFalse'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/T.js b/node_modules/sequelize-cli/node_modules/lodash/fp/T.js new file mode 100644 index 0000000..e2ba8ea --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/T.js @@ -0,0 +1 @@ +module.exports = require('./stubTrue'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/__.js b/node_modules/sequelize-cli/node_modules/lodash/fp/__.js new file mode 100644 index 0000000..4af98de --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/__.js @@ -0,0 +1 @@ +module.exports = require('./placeholder'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/_baseConvert.js b/node_modules/sequelize-cli/node_modules/lodash/fp/_baseConvert.js new file mode 100644 index 0000000..7af2765 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/_baseConvert.js @@ -0,0 +1,568 @@ +var mapping = require('./_mapping'), + fallbackHolder = require('./placeholder'); + +/** Built-in value reference. */ +var push = Array.prototype.push; + +/** + * Creates a function, with an arity of `n`, that invokes `func` with the + * arguments it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} n The arity of the new function. + * @returns {Function} Returns the new function. + */ +function baseArity(func, n) { + return n == 2 + ? function(a, b) { return func.apply(undefined, arguments); } + : function(a) { return func.apply(undefined, arguments); }; +} + +/** + * Creates a function that invokes `func`, with up to `n` arguments, ignoring + * any additional arguments. + * + * @private + * @param {Function} func The function to cap arguments for. + * @param {number} n The arity cap. + * @returns {Function} Returns the new function. + */ +function baseAry(func, n) { + return n == 2 + ? function(a, b) { return func(a, b); } + : function(a) { return func(a); }; +} + +/** + * Creates a clone of `array`. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the cloned array. + */ +function cloneArray(array) { + var length = array ? array.length : 0, + result = Array(length); + + while (length--) { + result[length] = array[length]; + } + return result; +} + +/** + * Creates a function that clones a given object using the assignment `func`. + * + * @private + * @param {Function} func The assignment function. + * @returns {Function} Returns the new cloner function. + */ +function createCloner(func) { + return function(object) { + return func({}, object); + }; +} + +/** + * A specialized version of `_.spread` which flattens the spread array into + * the arguments of the invoked `func`. + * + * @private + * @param {Function} func The function to spread arguments over. + * @param {number} start The start position of the spread. + * @returns {Function} Returns the new function. + */ +function flatSpread(func, start) { + return function() { + var length = arguments.length, + lastIndex = length - 1, + args = Array(length); + + while (length--) { + args[length] = arguments[length]; + } + var array = args[start], + otherArgs = args.slice(0, start); + + if (array) { + push.apply(otherArgs, array); + } + if (start != lastIndex) { + push.apply(otherArgs, args.slice(start + 1)); + } + return func.apply(this, otherArgs); + }; +} + +/** + * Creates a function that wraps `func` and uses `cloner` to clone the first + * argument it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} cloner The function to clone arguments. + * @returns {Function} Returns the new immutable function. + */ +function wrapImmutable(func, cloner) { + return function() { + var length = arguments.length; + if (!length) { + return; + } + var args = Array(length); + while (length--) { + args[length] = arguments[length]; + } + var result = args[0] = cloner.apply(undefined, args); + func.apply(undefined, args); + return result; + }; +} + +/** + * The base implementation of `convert` which accepts a `util` object of methods + * required to perform conversions. + * + * @param {Object} util The util object. + * @param {string} name The name of the function to convert. + * @param {Function} func The function to convert. + * @param {Object} [options] The options object. + * @param {boolean} [options.cap=true] Specify capping iteratee arguments. + * @param {boolean} [options.curry=true] Specify currying. + * @param {boolean} [options.fixed=true] Specify fixed arity. + * @param {boolean} [options.immutable=true] Specify immutable operations. + * @param {boolean} [options.rearg=true] Specify rearranging arguments. + * @returns {Function|Object} Returns the converted function or object. + */ +function baseConvert(util, name, func, options) { + var setPlaceholder, + isLib = typeof name == 'function', + isObj = name === Object(name); + + if (isObj) { + options = func; + func = name; + name = undefined; + } + if (func == null) { + throw new TypeError; + } + options || (options = {}); + + var config = { + 'cap': 'cap' in options ? options.cap : true, + 'curry': 'curry' in options ? options.curry : true, + 'fixed': 'fixed' in options ? options.fixed : true, + 'immutable': 'immutable' in options ? options.immutable : true, + 'rearg': 'rearg' in options ? options.rearg : true + }; + + var forceCurry = ('curry' in options) && options.curry, + forceFixed = ('fixed' in options) && options.fixed, + forceRearg = ('rearg' in options) && options.rearg, + placeholder = isLib ? func : fallbackHolder, + pristine = isLib ? func.runInContext() : undefined; + + var helpers = isLib ? func : { + 'ary': util.ary, + 'assign': util.assign, + 'clone': util.clone, + 'curry': util.curry, + 'forEach': util.forEach, + 'isArray': util.isArray, + 'isFunction': util.isFunction, + 'iteratee': util.iteratee, + 'keys': util.keys, + 'rearg': util.rearg, + 'toInteger': util.toInteger, + 'toPath': util.toPath + }; + + var ary = helpers.ary, + assign = helpers.assign, + clone = helpers.clone, + curry = helpers.curry, + each = helpers.forEach, + isArray = helpers.isArray, + isFunction = helpers.isFunction, + keys = helpers.keys, + rearg = helpers.rearg, + toInteger = helpers.toInteger, + toPath = helpers.toPath; + + var aryMethodKeys = keys(mapping.aryMethod); + + var wrappers = { + 'castArray': function(castArray) { + return function() { + var value = arguments[0]; + return isArray(value) + ? castArray(cloneArray(value)) + : castArray.apply(undefined, arguments); + }; + }, + 'iteratee': function(iteratee) { + return function() { + var func = arguments[0], + arity = arguments[1], + result = iteratee(func, arity), + length = result.length; + + if (config.cap && typeof arity == 'number') { + arity = arity > 2 ? (arity - 2) : 1; + return (length && length <= arity) ? result : baseAry(result, arity); + } + return result; + }; + }, + 'mixin': function(mixin) { + return function(source) { + var func = this; + if (!isFunction(func)) { + return mixin(func, Object(source)); + } + var pairs = []; + each(keys(source), function(key) { + if (isFunction(source[key])) { + pairs.push([key, func.prototype[key]]); + } + }); + + mixin(func, Object(source)); + + each(pairs, function(pair) { + var value = pair[1]; + if (isFunction(value)) { + func.prototype[pair[0]] = value; + } else { + delete func.prototype[pair[0]]; + } + }); + return func; + }; + }, + 'nthArg': function(nthArg) { + return function(n) { + var arity = n < 0 ? 1 : (toInteger(n) + 1); + return curry(nthArg(n), arity); + }; + }, + 'rearg': function(rearg) { + return function(func, indexes) { + var arity = indexes ? indexes.length : 0; + return curry(rearg(func, indexes), arity); + }; + }, + 'runInContext': function(runInContext) { + return function(context) { + return baseConvert(util, runInContext(context), options); + }; + } + }; + + /*--------------------------------------------------------------------------*/ + + /** + * Casts `func` to a function with an arity capped iteratee if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @returns {Function} Returns the cast function. + */ + function castCap(name, func) { + if (config.cap) { + var indexes = mapping.iterateeRearg[name]; + if (indexes) { + return iterateeRearg(func, indexes); + } + var n = !isLib && mapping.iterateeAry[name]; + if (n) { + return iterateeAry(func, n); + } + } + return func; + } + + /** + * Casts `func` to a curried function if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @param {number} n The arity of `func`. + * @returns {Function} Returns the cast function. + */ + function castCurry(name, func, n) { + return (forceCurry || (config.curry && n > 1)) + ? curry(func, n) + : func; + } + + /** + * Casts `func` to a fixed arity function if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @param {number} n The arity cap. + * @returns {Function} Returns the cast function. + */ + function castFixed(name, func, n) { + if (config.fixed && (forceFixed || !mapping.skipFixed[name])) { + var data = mapping.methodSpread[name], + start = data && data.start; + + return start === undefined ? ary(func, n) : flatSpread(func, start); + } + return func; + } + + /** + * Casts `func` to an rearged function if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @param {number} n The arity of `func`. + * @returns {Function} Returns the cast function. + */ + function castRearg(name, func, n) { + return (config.rearg && n > 1 && (forceRearg || !mapping.skipRearg[name])) + ? rearg(func, mapping.methodRearg[name] || mapping.aryRearg[n]) + : func; + } + + /** + * Creates a clone of `object` by `path`. + * + * @private + * @param {Object} object The object to clone. + * @param {Array|string} path The path to clone by. + * @returns {Object} Returns the cloned object. + */ + function cloneByPath(object, path) { + path = toPath(path); + + var index = -1, + length = path.length, + lastIndex = length - 1, + result = clone(Object(object)), + nested = result; + + while (nested != null && ++index < length) { + var key = path[index], + value = nested[key]; + + if (value != null) { + nested[path[index]] = clone(index == lastIndex ? value : Object(value)); + } + nested = nested[key]; + } + return result; + } + + /** + * Converts `lodash` to an immutable auto-curried iteratee-first data-last + * version with conversion `options` applied. + * + * @param {Object} [options] The options object. See `baseConvert` for more details. + * @returns {Function} Returns the converted `lodash`. + */ + function convertLib(options) { + return _.runInContext.convert(options)(undefined); + } + + /** + * Create a converter function for `func` of `name`. + * + * @param {string} name The name of the function to convert. + * @param {Function} func The function to convert. + * @returns {Function} Returns the new converter function. + */ + function createConverter(name, func) { + var realName = mapping.aliasToReal[name] || name, + methodName = mapping.remap[realName] || realName, + oldOptions = options; + + return function(options) { + var newUtil = isLib ? pristine : helpers, + newFunc = isLib ? pristine[methodName] : func, + newOptions = assign(assign({}, oldOptions), options); + + return baseConvert(newUtil, realName, newFunc, newOptions); + }; + } + + /** + * Creates a function that wraps `func` to invoke its iteratee, with up to `n` + * arguments, ignoring any additional arguments. + * + * @private + * @param {Function} func The function to cap iteratee arguments for. + * @param {number} n The arity cap. + * @returns {Function} Returns the new function. + */ + function iterateeAry(func, n) { + return overArg(func, function(func) { + return typeof func == 'function' ? baseAry(func, n) : func; + }); + } + + /** + * Creates a function that wraps `func` to invoke its iteratee with arguments + * arranged according to the specified `indexes` where the argument value at + * the first index is provided as the first argument, the argument value at + * the second index is provided as the second argument, and so on. + * + * @private + * @param {Function} func The function to rearrange iteratee arguments for. + * @param {number[]} indexes The arranged argument indexes. + * @returns {Function} Returns the new function. + */ + function iterateeRearg(func, indexes) { + return overArg(func, function(func) { + var n = indexes.length; + return baseArity(rearg(baseAry(func, n), indexes), n); + }); + } + + /** + * Creates a function that invokes `func` with its first argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function() { + var length = arguments.length; + if (!length) { + return func(); + } + var args = Array(length); + while (length--) { + args[length] = arguments[length]; + } + var index = config.rearg ? 0 : (length - 1); + args[index] = transform(args[index]); + return func.apply(undefined, args); + }; + } + + /** + * Creates a function that wraps `func` and applys the conversions + * rules by `name`. + * + * @private + * @param {string} name The name of the function to wrap. + * @param {Function} func The function to wrap. + * @returns {Function} Returns the converted function. + */ + function wrap(name, func) { + var result, + realName = mapping.aliasToReal[name] || name, + wrapped = func, + wrapper = wrappers[realName]; + + if (wrapper) { + wrapped = wrapper(func); + } + else if (config.immutable) { + if (mapping.mutate.array[realName]) { + wrapped = wrapImmutable(func, cloneArray); + } + else if (mapping.mutate.object[realName]) { + wrapped = wrapImmutable(func, createCloner(func)); + } + else if (mapping.mutate.set[realName]) { + wrapped = wrapImmutable(func, cloneByPath); + } + } + each(aryMethodKeys, function(aryKey) { + each(mapping.aryMethod[aryKey], function(otherName) { + if (realName == otherName) { + var data = mapping.methodSpread[realName], + afterRearg = data && data.afterRearg; + + result = afterRearg + ? castFixed(realName, castRearg(realName, wrapped, aryKey), aryKey) + : castRearg(realName, castFixed(realName, wrapped, aryKey), aryKey); + + result = castCap(realName, result); + result = castCurry(realName, result, aryKey); + return false; + } + }); + return !result; + }); + + result || (result = wrapped); + if (result == func) { + result = forceCurry ? curry(result, 1) : function() { + return func.apply(this, arguments); + }; + } + result.convert = createConverter(realName, func); + if (mapping.placeholder[realName]) { + setPlaceholder = true; + result.placeholder = func.placeholder = placeholder; + } + return result; + } + + /*--------------------------------------------------------------------------*/ + + if (!isObj) { + return wrap(name, func); + } + var _ = func; + + // Convert methods by ary cap. + var pairs = []; + each(aryMethodKeys, function(aryKey) { + each(mapping.aryMethod[aryKey], function(key) { + var func = _[mapping.remap[key] || key]; + if (func) { + pairs.push([key, wrap(key, func)]); + } + }); + }); + + // Convert remaining methods. + each(keys(_), function(key) { + var func = _[key]; + if (typeof func == 'function') { + var length = pairs.length; + while (length--) { + if (pairs[length][0] == key) { + return; + } + } + func.convert = createConverter(key, func); + pairs.push([key, func]); + } + }); + + // Assign to `_` leaving `_.prototype` unchanged to allow chaining. + each(pairs, function(pair) { + _[pair[0]] = pair[1]; + }); + + _.convert = convertLib; + if (setPlaceholder) { + _.placeholder = placeholder; + } + // Assign aliases. + each(keys(_), function(key) { + each(mapping.realToAlias[key] || [], function(alias) { + _[alias] = _[key]; + }); + }); + + return _; +} + +module.exports = baseConvert; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/_convertBrowser.js b/node_modules/sequelize-cli/node_modules/lodash/fp/_convertBrowser.js new file mode 100644 index 0000000..bde030d --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/_convertBrowser.js @@ -0,0 +1,18 @@ +var baseConvert = require('./_baseConvert'); + +/** + * Converts `lodash` to an immutable auto-curried iteratee-first data-last + * version with conversion `options` applied. + * + * @param {Function} lodash The lodash function to convert. + * @param {Object} [options] The options object. See `baseConvert` for more details. + * @returns {Function} Returns the converted `lodash`. + */ +function browserConvert(lodash, options) { + return baseConvert(lodash, lodash, options); +} + +if (typeof _ == 'function' && typeof _.runInContext == 'function') { + _ = browserConvert(_.runInContext()); +} +module.exports = browserConvert; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/_falseOptions.js b/node_modules/sequelize-cli/node_modules/lodash/fp/_falseOptions.js new file mode 100644 index 0000000..773235e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/_falseOptions.js @@ -0,0 +1,7 @@ +module.exports = { + 'cap': false, + 'curry': false, + 'fixed': false, + 'immutable': false, + 'rearg': false +}; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/_mapping.js b/node_modules/sequelize-cli/node_modules/lodash/fp/_mapping.js new file mode 100644 index 0000000..8f5ddf2 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/_mapping.js @@ -0,0 +1,368 @@ +/** Used to map aliases to their real names. */ +exports.aliasToReal = { + + // Lodash aliases. + 'each': 'forEach', + 'eachRight': 'forEachRight', + 'entries': 'toPairs', + 'entriesIn': 'toPairsIn', + 'extend': 'assignIn', + 'extendAll': 'assignInAll', + 'extendAllWith': 'assignInAllWith', + 'extendWith': 'assignInWith', + 'first': 'head', + + // Methods that are curried variants of others. + 'conforms': 'conformsTo', + 'matches': 'isMatch', + 'property': 'get', + + // Ramda aliases. + '__': 'placeholder', + 'F': 'stubFalse', + 'T': 'stubTrue', + 'all': 'every', + 'allPass': 'overEvery', + 'always': 'constant', + 'any': 'some', + 'anyPass': 'overSome', + 'apply': 'spread', + 'assoc': 'set', + 'assocPath': 'set', + 'complement': 'negate', + 'compose': 'flowRight', + 'contains': 'includes', + 'dissoc': 'unset', + 'dissocPath': 'unset', + 'dropLast': 'dropRight', + 'dropLastWhile': 'dropRightWhile', + 'equals': 'isEqual', + 'identical': 'eq', + 'indexBy': 'keyBy', + 'init': 'initial', + 'invertObj': 'invert', + 'juxt': 'over', + 'omitAll': 'omit', + 'nAry': 'ary', + 'path': 'get', + 'pathEq': 'matchesProperty', + 'pathOr': 'getOr', + 'paths': 'at', + 'pickAll': 'pick', + 'pipe': 'flow', + 'pluck': 'map', + 'prop': 'get', + 'propEq': 'matchesProperty', + 'propOr': 'getOr', + 'props': 'at', + 'symmetricDifference': 'xor', + 'symmetricDifferenceBy': 'xorBy', + 'symmetricDifferenceWith': 'xorWith', + 'takeLast': 'takeRight', + 'takeLastWhile': 'takeRightWhile', + 'unapply': 'rest', + 'unnest': 'flatten', + 'useWith': 'overArgs', + 'where': 'conformsTo', + 'whereEq': 'isMatch', + 'zipObj': 'zipObject' +}; + +/** Used to map ary to method names. */ +exports.aryMethod = { + '1': [ + 'assignAll', 'assignInAll', 'attempt', 'castArray', 'ceil', 'create', + 'curry', 'curryRight', 'defaultsAll', 'defaultsDeepAll', 'floor', 'flow', + 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', 'mergeAll', + 'methodOf', 'mixin', 'nthArg', 'over', 'overEvery', 'overSome','rest', 'reverse', + 'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart', + 'uniqueId', 'words', 'zipAll' + ], + '2': [ + 'add', 'after', 'ary', 'assign', 'assignAllWith', 'assignIn', 'assignInAllWith', + 'at', 'before', 'bind', 'bindAll', 'bindKey', 'chunk', 'cloneDeepWith', + 'cloneWith', 'concat', 'conformsTo', 'countBy', 'curryN', 'curryRightN', + 'debounce', 'defaults', 'defaultsDeep', 'defaultTo', 'delay', 'difference', + 'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq', + 'every', 'filter', 'find', 'findIndex', 'findKey', 'findLast', 'findLastIndex', + 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth', 'forEach', + 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight', 'get', + 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf', 'intersection', + 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch', 'join', 'keyBy', + 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues', 'matchesProperty', + 'maxBy', 'meanBy', 'merge', 'mergeAllWith', 'minBy', 'multiply', 'nth', 'omit', + 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial', + 'partialRight', 'partition', 'pick', 'pickBy', 'propertyOf', 'pull', 'pullAll', + 'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove', + 'repeat', 'restFrom', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex', + 'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy', + 'split', 'spreadFrom', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight', + 'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', 'times', 'trimChars', + 'trimCharsEnd', 'trimCharsStart', 'truncate', 'union', 'uniqBy', 'uniqWith', + 'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject', + 'zipObjectDeep' + ], + '3': [ + 'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith', + 'findFrom', 'findIndexFrom', 'findLastFrom', 'findLastIndexFrom', 'getOr', + 'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith', + 'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth', + 'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd', + 'padCharsStart', 'pullAllBy', 'pullAllWith', 'rangeStep', 'rangeStepRight', + 'reduce', 'reduceRight', 'replace', 'set', 'slice', 'sortedIndexBy', + 'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith', 'update', 'xorBy', + 'xorWith', 'zipWith' + ], + '4': [ + 'fill', 'setWith', 'updateWith' + ] +}; + +/** Used to map ary to rearg configs. */ +exports.aryRearg = { + '2': [1, 0], + '3': [2, 0, 1], + '4': [3, 2, 0, 1] +}; + +/** Used to map method names to their iteratee ary. */ +exports.iterateeAry = { + 'dropRightWhile': 1, + 'dropWhile': 1, + 'every': 1, + 'filter': 1, + 'find': 1, + 'findFrom': 1, + 'findIndex': 1, + 'findIndexFrom': 1, + 'findKey': 1, + 'findLast': 1, + 'findLastFrom': 1, + 'findLastIndex': 1, + 'findLastIndexFrom': 1, + 'findLastKey': 1, + 'flatMap': 1, + 'flatMapDeep': 1, + 'flatMapDepth': 1, + 'forEach': 1, + 'forEachRight': 1, + 'forIn': 1, + 'forInRight': 1, + 'forOwn': 1, + 'forOwnRight': 1, + 'map': 1, + 'mapKeys': 1, + 'mapValues': 1, + 'partition': 1, + 'reduce': 2, + 'reduceRight': 2, + 'reject': 1, + 'remove': 1, + 'some': 1, + 'takeRightWhile': 1, + 'takeWhile': 1, + 'times': 1, + 'transform': 2 +}; + +/** Used to map method names to iteratee rearg configs. */ +exports.iterateeRearg = { + 'mapKeys': [1], + 'reduceRight': [1, 0] +}; + +/** Used to map method names to rearg configs. */ +exports.methodRearg = { + 'assignInAllWith': [1, 0], + 'assignInWith': [1, 2, 0], + 'assignAllWith': [1, 0], + 'assignWith': [1, 2, 0], + 'differenceBy': [1, 2, 0], + 'differenceWith': [1, 2, 0], + 'getOr': [2, 1, 0], + 'intersectionBy': [1, 2, 0], + 'intersectionWith': [1, 2, 0], + 'isEqualWith': [1, 2, 0], + 'isMatchWith': [2, 1, 0], + 'mergeAllWith': [1, 0], + 'mergeWith': [1, 2, 0], + 'padChars': [2, 1, 0], + 'padCharsEnd': [2, 1, 0], + 'padCharsStart': [2, 1, 0], + 'pullAllBy': [2, 1, 0], + 'pullAllWith': [2, 1, 0], + 'rangeStep': [1, 2, 0], + 'rangeStepRight': [1, 2, 0], + 'setWith': [3, 1, 2, 0], + 'sortedIndexBy': [2, 1, 0], + 'sortedLastIndexBy': [2, 1, 0], + 'unionBy': [1, 2, 0], + 'unionWith': [1, 2, 0], + 'updateWith': [3, 1, 2, 0], + 'xorBy': [1, 2, 0], + 'xorWith': [1, 2, 0], + 'zipWith': [1, 2, 0] +}; + +/** Used to map method names to spread configs. */ +exports.methodSpread = { + 'assignAll': { 'start': 0 }, + 'assignAllWith': { 'start': 0 }, + 'assignInAll': { 'start': 0 }, + 'assignInAllWith': { 'start': 0 }, + 'defaultsAll': { 'start': 0 }, + 'defaultsDeepAll': { 'start': 0 }, + 'invokeArgs': { 'start': 2 }, + 'invokeArgsMap': { 'start': 2 }, + 'mergeAll': { 'start': 0 }, + 'mergeAllWith': { 'start': 0 }, + 'partial': { 'start': 1 }, + 'partialRight': { 'start': 1 }, + 'without': { 'start': 1 }, + 'zipAll': { 'start': 0 } +}; + +/** Used to identify methods which mutate arrays or objects. */ +exports.mutate = { + 'array': { + 'fill': true, + 'pull': true, + 'pullAll': true, + 'pullAllBy': true, + 'pullAllWith': true, + 'pullAt': true, + 'remove': true, + 'reverse': true + }, + 'object': { + 'assign': true, + 'assignAll': true, + 'assignAllWith': true, + 'assignIn': true, + 'assignInAll': true, + 'assignInAllWith': true, + 'assignInWith': true, + 'assignWith': true, + 'defaults': true, + 'defaultsAll': true, + 'defaultsDeep': true, + 'defaultsDeepAll': true, + 'merge': true, + 'mergeAll': true, + 'mergeAllWith': true, + 'mergeWith': true, + }, + 'set': { + 'set': true, + 'setWith': true, + 'unset': true, + 'update': true, + 'updateWith': true + } +}; + +/** Used to track methods with placeholder support */ +exports.placeholder = { + 'bind': true, + 'bindKey': true, + 'curry': true, + 'curryRight': true, + 'partial': true, + 'partialRight': true +}; + +/** Used to map real names to their aliases. */ +exports.realToAlias = (function() { + var hasOwnProperty = Object.prototype.hasOwnProperty, + object = exports.aliasToReal, + result = {}; + + for (var key in object) { + var value = object[key]; + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } + } + return result; +}()); + +/** Used to map method names to other names. */ +exports.remap = { + 'assignAll': 'assign', + 'assignAllWith': 'assignWith', + 'assignInAll': 'assignIn', + 'assignInAllWith': 'assignInWith', + 'curryN': 'curry', + 'curryRightN': 'curryRight', + 'defaultsAll': 'defaults', + 'defaultsDeepAll': 'defaultsDeep', + 'findFrom': 'find', + 'findIndexFrom': 'findIndex', + 'findLastFrom': 'findLast', + 'findLastIndexFrom': 'findLastIndex', + 'getOr': 'get', + 'includesFrom': 'includes', + 'indexOfFrom': 'indexOf', + 'invokeArgs': 'invoke', + 'invokeArgsMap': 'invokeMap', + 'lastIndexOfFrom': 'lastIndexOf', + 'mergeAll': 'merge', + 'mergeAllWith': 'mergeWith', + 'padChars': 'pad', + 'padCharsEnd': 'padEnd', + 'padCharsStart': 'padStart', + 'propertyOf': 'get', + 'rangeStep': 'range', + 'rangeStepRight': 'rangeRight', + 'restFrom': 'rest', + 'spreadFrom': 'spread', + 'trimChars': 'trim', + 'trimCharsEnd': 'trimEnd', + 'trimCharsStart': 'trimStart', + 'zipAll': 'zip' +}; + +/** Used to track methods that skip fixing their arity. */ +exports.skipFixed = { + 'castArray': true, + 'flow': true, + 'flowRight': true, + 'iteratee': true, + 'mixin': true, + 'rearg': true, + 'runInContext': true +}; + +/** Used to track methods that skip rearranging arguments. */ +exports.skipRearg = { + 'add': true, + 'assign': true, + 'assignIn': true, + 'bind': true, + 'bindKey': true, + 'concat': true, + 'difference': true, + 'divide': true, + 'eq': true, + 'gt': true, + 'gte': true, + 'isEqual': true, + 'lt': true, + 'lte': true, + 'matchesProperty': true, + 'merge': true, + 'multiply': true, + 'overArgs': true, + 'partial': true, + 'partialRight': true, + 'propertyOf': true, + 'random': true, + 'range': true, + 'rangeRight': true, + 'subtract': true, + 'zip': true, + 'zipObject': true, + 'zipObjectDeep': true +}; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/_util.js b/node_modules/sequelize-cli/node_modules/lodash/fp/_util.js new file mode 100644 index 0000000..7084463 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/_util.js @@ -0,0 +1,14 @@ +module.exports = { + 'ary': require('../ary'), + 'assign': require('../_baseAssign'), + 'clone': require('../clone'), + 'curry': require('../curry'), + 'forEach': require('../_arrayEach'), + 'isArray': require('../isArray'), + 'isFunction': require('../isFunction'), + 'iteratee': require('../iteratee'), + 'keys': require('../_baseKeys'), + 'rearg': require('../rearg'), + 'toInteger': require('../toInteger'), + 'toPath': require('../toPath') +}; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/add.js b/node_modules/sequelize-cli/node_modules/lodash/fp/add.js new file mode 100644 index 0000000..816eeec --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/add.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('add', require('../add')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/after.js b/node_modules/sequelize-cli/node_modules/lodash/fp/after.js new file mode 100644 index 0000000..21a0167 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/after.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('after', require('../after')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/all.js b/node_modules/sequelize-cli/node_modules/lodash/fp/all.js new file mode 100644 index 0000000..d0839f7 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/all.js @@ -0,0 +1 @@ +module.exports = require('./every'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/allPass.js b/node_modules/sequelize-cli/node_modules/lodash/fp/allPass.js new file mode 100644 index 0000000..79b73ef --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/allPass.js @@ -0,0 +1 @@ +module.exports = require('./overEvery'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/always.js b/node_modules/sequelize-cli/node_modules/lodash/fp/always.js new file mode 100644 index 0000000..9887703 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/always.js @@ -0,0 +1 @@ +module.exports = require('./constant'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/any.js b/node_modules/sequelize-cli/node_modules/lodash/fp/any.js new file mode 100644 index 0000000..900ac25 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/any.js @@ -0,0 +1 @@ +module.exports = require('./some'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/anyPass.js b/node_modules/sequelize-cli/node_modules/lodash/fp/anyPass.js new file mode 100644 index 0000000..2774ab3 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/anyPass.js @@ -0,0 +1 @@ +module.exports = require('./overSome'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/apply.js b/node_modules/sequelize-cli/node_modules/lodash/fp/apply.js new file mode 100644 index 0000000..2b75712 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/apply.js @@ -0,0 +1 @@ +module.exports = require('./spread'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/array.js b/node_modules/sequelize-cli/node_modules/lodash/fp/array.js new file mode 100644 index 0000000..fe939c2 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/array.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../array')); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/ary.js b/node_modules/sequelize-cli/node_modules/lodash/fp/ary.js new file mode 100644 index 0000000..8edf187 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/ary.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('ary', require('../ary')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/assign.js b/node_modules/sequelize-cli/node_modules/lodash/fp/assign.js new file mode 100644 index 0000000..23f47af --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/assign.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assign', require('../assign')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/assignAll.js b/node_modules/sequelize-cli/node_modules/lodash/fp/assignAll.js new file mode 100644 index 0000000..b1d36c7 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/assignAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignAll', require('../assign')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/assignAllWith.js b/node_modules/sequelize-cli/node_modules/lodash/fp/assignAllWith.js new file mode 100644 index 0000000..21e836e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/assignAllWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignAllWith', require('../assignWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/assignIn.js b/node_modules/sequelize-cli/node_modules/lodash/fp/assignIn.js new file mode 100644 index 0000000..6e7c65f --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/assignIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignIn', require('../assignIn')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/assignInAll.js b/node_modules/sequelize-cli/node_modules/lodash/fp/assignInAll.js new file mode 100644 index 0000000..7ba75db --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/assignInAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignInAll', require('../assignIn')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/assignInAllWith.js b/node_modules/sequelize-cli/node_modules/lodash/fp/assignInAllWith.js new file mode 100644 index 0000000..e766903 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/assignInAllWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignInAllWith', require('../assignInWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/assignInWith.js b/node_modules/sequelize-cli/node_modules/lodash/fp/assignInWith.js new file mode 100644 index 0000000..acb5923 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/assignInWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignInWith', require('../assignInWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/assignWith.js b/node_modules/sequelize-cli/node_modules/lodash/fp/assignWith.js new file mode 100644 index 0000000..eb92521 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/assignWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignWith', require('../assignWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/assoc.js b/node_modules/sequelize-cli/node_modules/lodash/fp/assoc.js new file mode 100644 index 0000000..7648820 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/assoc.js @@ -0,0 +1 @@ +module.exports = require('./set'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/assocPath.js b/node_modules/sequelize-cli/node_modules/lodash/fp/assocPath.js new file mode 100644 index 0000000..7648820 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/assocPath.js @@ -0,0 +1 @@ +module.exports = require('./set'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/at.js b/node_modules/sequelize-cli/node_modules/lodash/fp/at.js new file mode 100644 index 0000000..cc39d25 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/at.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('at', require('../at')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/attempt.js b/node_modules/sequelize-cli/node_modules/lodash/fp/attempt.js new file mode 100644 index 0000000..26ca42e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/attempt.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('attempt', require('../attempt')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/before.js b/node_modules/sequelize-cli/node_modules/lodash/fp/before.js new file mode 100644 index 0000000..7a2de65 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/before.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('before', require('../before')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/bind.js b/node_modules/sequelize-cli/node_modules/lodash/fp/bind.js new file mode 100644 index 0000000..5cbe4f3 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/bind.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('bind', require('../bind')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/bindAll.js b/node_modules/sequelize-cli/node_modules/lodash/fp/bindAll.js new file mode 100644 index 0000000..6b4a4a0 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/bindAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('bindAll', require('../bindAll')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/bindKey.js b/node_modules/sequelize-cli/node_modules/lodash/fp/bindKey.js new file mode 100644 index 0000000..6a46c6b --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/bindKey.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('bindKey', require('../bindKey')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/camelCase.js b/node_modules/sequelize-cli/node_modules/lodash/fp/camelCase.js new file mode 100644 index 0000000..87b77b4 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/camelCase.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('camelCase', require('../camelCase'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/capitalize.js b/node_modules/sequelize-cli/node_modules/lodash/fp/capitalize.js new file mode 100644 index 0000000..cac74e1 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/capitalize.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('capitalize', require('../capitalize'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/castArray.js b/node_modules/sequelize-cli/node_modules/lodash/fp/castArray.js new file mode 100644 index 0000000..8681c09 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/castArray.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('castArray', require('../castArray')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/ceil.js b/node_modules/sequelize-cli/node_modules/lodash/fp/ceil.js new file mode 100644 index 0000000..f416b72 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/ceil.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('ceil', require('../ceil')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/chain.js b/node_modules/sequelize-cli/node_modules/lodash/fp/chain.js new file mode 100644 index 0000000..604fe39 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/chain.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('chain', require('../chain'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/chunk.js b/node_modules/sequelize-cli/node_modules/lodash/fp/chunk.js new file mode 100644 index 0000000..871ab08 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/chunk.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('chunk', require('../chunk')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/clamp.js b/node_modules/sequelize-cli/node_modules/lodash/fp/clamp.js new file mode 100644 index 0000000..3b06c01 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/clamp.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('clamp', require('../clamp')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/clone.js b/node_modules/sequelize-cli/node_modules/lodash/fp/clone.js new file mode 100644 index 0000000..cadb59c --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/clone.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('clone', require('../clone'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/cloneDeep.js b/node_modules/sequelize-cli/node_modules/lodash/fp/cloneDeep.js new file mode 100644 index 0000000..a6107aa --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/cloneDeep.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('cloneDeep', require('../cloneDeep'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/cloneDeepWith.js b/node_modules/sequelize-cli/node_modules/lodash/fp/cloneDeepWith.js new file mode 100644 index 0000000..6f01e44 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/cloneDeepWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('cloneDeepWith', require('../cloneDeepWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/cloneWith.js b/node_modules/sequelize-cli/node_modules/lodash/fp/cloneWith.js new file mode 100644 index 0000000..aa88578 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/cloneWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('cloneWith', require('../cloneWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/collection.js b/node_modules/sequelize-cli/node_modules/lodash/fp/collection.js new file mode 100644 index 0000000..fc8b328 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/collection.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../collection')); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/commit.js b/node_modules/sequelize-cli/node_modules/lodash/fp/commit.js new file mode 100644 index 0000000..130a894 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/commit.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('commit', require('../commit'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/compact.js b/node_modules/sequelize-cli/node_modules/lodash/fp/compact.js new file mode 100644 index 0000000..ce8f7a1 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/compact.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('compact', require('../compact'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/complement.js b/node_modules/sequelize-cli/node_modules/lodash/fp/complement.js new file mode 100644 index 0000000..93eb462 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/complement.js @@ -0,0 +1 @@ +module.exports = require('./negate'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/compose.js b/node_modules/sequelize-cli/node_modules/lodash/fp/compose.js new file mode 100644 index 0000000..1954e94 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/compose.js @@ -0,0 +1 @@ +module.exports = require('./flowRight'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/concat.js b/node_modules/sequelize-cli/node_modules/lodash/fp/concat.js new file mode 100644 index 0000000..e59346a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/concat.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('concat', require('../concat')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/cond.js b/node_modules/sequelize-cli/node_modules/lodash/fp/cond.js new file mode 100644 index 0000000..6a0120e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/cond.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('cond', require('../cond'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/conforms.js b/node_modules/sequelize-cli/node_modules/lodash/fp/conforms.js new file mode 100644 index 0000000..3247f64 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/conforms.js @@ -0,0 +1 @@ +module.exports = require('./conformsTo'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/conformsTo.js b/node_modules/sequelize-cli/node_modules/lodash/fp/conformsTo.js new file mode 100644 index 0000000..aa7f41e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/conformsTo.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('conformsTo', require('../conformsTo')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/constant.js b/node_modules/sequelize-cli/node_modules/lodash/fp/constant.js new file mode 100644 index 0000000..9e406fc --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/constant.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('constant', require('../constant'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/contains.js b/node_modules/sequelize-cli/node_modules/lodash/fp/contains.js new file mode 100644 index 0000000..594722a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/contains.js @@ -0,0 +1 @@ +module.exports = require('./includes'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/convert.js b/node_modules/sequelize-cli/node_modules/lodash/fp/convert.js new file mode 100644 index 0000000..4795dc4 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/convert.js @@ -0,0 +1,18 @@ +var baseConvert = require('./_baseConvert'), + util = require('./_util'); + +/** + * Converts `func` of `name` to an immutable auto-curried iteratee-first data-last + * version with conversion `options` applied. If `name` is an object its methods + * will be converted. + * + * @param {string} name The name of the function to wrap. + * @param {Function} [func] The function to wrap. + * @param {Object} [options] The options object. See `baseConvert` for more details. + * @returns {Function|Object} Returns the converted function or object. + */ +function convert(name, func, options) { + return baseConvert(util, name, func, options); +} + +module.exports = convert; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/countBy.js b/node_modules/sequelize-cli/node_modules/lodash/fp/countBy.js new file mode 100644 index 0000000..dfa4643 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/countBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('countBy', require('../countBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/create.js b/node_modules/sequelize-cli/node_modules/lodash/fp/create.js new file mode 100644 index 0000000..752025f --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/create.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('create', require('../create')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/curry.js b/node_modules/sequelize-cli/node_modules/lodash/fp/curry.js new file mode 100644 index 0000000..b0b4168 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/curry.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('curry', require('../curry')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/curryN.js b/node_modules/sequelize-cli/node_modules/lodash/fp/curryN.js new file mode 100644 index 0000000..2ae7d00 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/curryN.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('curryN', require('../curry')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/curryRight.js b/node_modules/sequelize-cli/node_modules/lodash/fp/curryRight.js new file mode 100644 index 0000000..cb619eb --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/curryRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('curryRight', require('../curryRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/curryRightN.js b/node_modules/sequelize-cli/node_modules/lodash/fp/curryRightN.js new file mode 100644 index 0000000..2495afc --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/curryRightN.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('curryRightN', require('../curryRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/date.js b/node_modules/sequelize-cli/node_modules/lodash/fp/date.js new file mode 100644 index 0000000..82cb952 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/date.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../date')); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/debounce.js b/node_modules/sequelize-cli/node_modules/lodash/fp/debounce.js new file mode 100644 index 0000000..2612229 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/debounce.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('debounce', require('../debounce')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/deburr.js b/node_modules/sequelize-cli/node_modules/lodash/fp/deburr.js new file mode 100644 index 0000000..96463ab --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/deburr.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('deburr', require('../deburr'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/defaultTo.js b/node_modules/sequelize-cli/node_modules/lodash/fp/defaultTo.js new file mode 100644 index 0000000..d6b52a4 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/defaultTo.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defaultTo', require('../defaultTo')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/defaults.js b/node_modules/sequelize-cli/node_modules/lodash/fp/defaults.js new file mode 100644 index 0000000..e1a8e6e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/defaults.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defaults', require('../defaults')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/defaultsAll.js b/node_modules/sequelize-cli/node_modules/lodash/fp/defaultsAll.js new file mode 100644 index 0000000..238fcc3 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/defaultsAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defaultsAll', require('../defaults')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/defaultsDeep.js b/node_modules/sequelize-cli/node_modules/lodash/fp/defaultsDeep.js new file mode 100644 index 0000000..1f172ff --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/defaultsDeep.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defaultsDeep', require('../defaultsDeep')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/defaultsDeepAll.js b/node_modules/sequelize-cli/node_modules/lodash/fp/defaultsDeepAll.js new file mode 100644 index 0000000..6835f2f --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/defaultsDeepAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defaultsDeepAll', require('../defaultsDeep')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/defer.js b/node_modules/sequelize-cli/node_modules/lodash/fp/defer.js new file mode 100644 index 0000000..ec7990f --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/defer.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defer', require('../defer'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/delay.js b/node_modules/sequelize-cli/node_modules/lodash/fp/delay.js new file mode 100644 index 0000000..556dbd5 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/delay.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('delay', require('../delay')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/difference.js b/node_modules/sequelize-cli/node_modules/lodash/fp/difference.js new file mode 100644 index 0000000..2d03765 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/difference.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('difference', require('../difference')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/differenceBy.js b/node_modules/sequelize-cli/node_modules/lodash/fp/differenceBy.js new file mode 100644 index 0000000..2f91491 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/differenceBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('differenceBy', require('../differenceBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/differenceWith.js b/node_modules/sequelize-cli/node_modules/lodash/fp/differenceWith.js new file mode 100644 index 0000000..bcf5ad2 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/differenceWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('differenceWith', require('../differenceWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/dissoc.js b/node_modules/sequelize-cli/node_modules/lodash/fp/dissoc.js new file mode 100644 index 0000000..7ec7be1 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/dissoc.js @@ -0,0 +1 @@ +module.exports = require('./unset'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/dissocPath.js b/node_modules/sequelize-cli/node_modules/lodash/fp/dissocPath.js new file mode 100644 index 0000000..7ec7be1 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/dissocPath.js @@ -0,0 +1 @@ +module.exports = require('./unset'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/divide.js b/node_modules/sequelize-cli/node_modules/lodash/fp/divide.js new file mode 100644 index 0000000..82048c5 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/divide.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('divide', require('../divide')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/drop.js b/node_modules/sequelize-cli/node_modules/lodash/fp/drop.js new file mode 100644 index 0000000..2fa9b4f --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/drop.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('drop', require('../drop')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/dropLast.js b/node_modules/sequelize-cli/node_modules/lodash/fp/dropLast.js new file mode 100644 index 0000000..174e525 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/dropLast.js @@ -0,0 +1 @@ +module.exports = require('./dropRight'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/dropLastWhile.js b/node_modules/sequelize-cli/node_modules/lodash/fp/dropLastWhile.js new file mode 100644 index 0000000..be2a9d2 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/dropLastWhile.js @@ -0,0 +1 @@ +module.exports = require('./dropRightWhile'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/dropRight.js b/node_modules/sequelize-cli/node_modules/lodash/fp/dropRight.js new file mode 100644 index 0000000..e98881f --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/dropRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('dropRight', require('../dropRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/dropRightWhile.js b/node_modules/sequelize-cli/node_modules/lodash/fp/dropRightWhile.js new file mode 100644 index 0000000..cacaa70 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/dropRightWhile.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('dropRightWhile', require('../dropRightWhile')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/dropWhile.js b/node_modules/sequelize-cli/node_modules/lodash/fp/dropWhile.js new file mode 100644 index 0000000..285f864 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/dropWhile.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('dropWhile', require('../dropWhile')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/each.js b/node_modules/sequelize-cli/node_modules/lodash/fp/each.js new file mode 100644 index 0000000..8800f42 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/each.js @@ -0,0 +1 @@ +module.exports = require('./forEach'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/eachRight.js b/node_modules/sequelize-cli/node_modules/lodash/fp/eachRight.js new file mode 100644 index 0000000..3252b2a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/eachRight.js @@ -0,0 +1 @@ +module.exports = require('./forEachRight'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/endsWith.js b/node_modules/sequelize-cli/node_modules/lodash/fp/endsWith.js new file mode 100644 index 0000000..17dc2a4 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/endsWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('endsWith', require('../endsWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/entries.js b/node_modules/sequelize-cli/node_modules/lodash/fp/entries.js new file mode 100644 index 0000000..7a88df2 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/entries.js @@ -0,0 +1 @@ +module.exports = require('./toPairs'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/entriesIn.js b/node_modules/sequelize-cli/node_modules/lodash/fp/entriesIn.js new file mode 100644 index 0000000..f6c6331 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/entriesIn.js @@ -0,0 +1 @@ +module.exports = require('./toPairsIn'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/eq.js b/node_modules/sequelize-cli/node_modules/lodash/fp/eq.js new file mode 100644 index 0000000..9a3d21b --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/eq.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('eq', require('../eq')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/equals.js b/node_modules/sequelize-cli/node_modules/lodash/fp/equals.js new file mode 100644 index 0000000..e6a5ce0 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/equals.js @@ -0,0 +1 @@ +module.exports = require('./isEqual'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/escape.js b/node_modules/sequelize-cli/node_modules/lodash/fp/escape.js new file mode 100644 index 0000000..52c1fbb --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/escape.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('escape', require('../escape'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/escapeRegExp.js b/node_modules/sequelize-cli/node_modules/lodash/fp/escapeRegExp.js new file mode 100644 index 0000000..369b2ef --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/escapeRegExp.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('escapeRegExp', require('../escapeRegExp'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/every.js b/node_modules/sequelize-cli/node_modules/lodash/fp/every.js new file mode 100644 index 0000000..95c2776 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/every.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('every', require('../every')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/extend.js b/node_modules/sequelize-cli/node_modules/lodash/fp/extend.js new file mode 100644 index 0000000..e00166c --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/extend.js @@ -0,0 +1 @@ +module.exports = require('./assignIn'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/extendAll.js b/node_modules/sequelize-cli/node_modules/lodash/fp/extendAll.js new file mode 100644 index 0000000..cc55b64 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/extendAll.js @@ -0,0 +1 @@ +module.exports = require('./assignInAll'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/extendAllWith.js b/node_modules/sequelize-cli/node_modules/lodash/fp/extendAllWith.js new file mode 100644 index 0000000..6679d20 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/extendAllWith.js @@ -0,0 +1 @@ +module.exports = require('./assignInAllWith'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/extendWith.js b/node_modules/sequelize-cli/node_modules/lodash/fp/extendWith.js new file mode 100644 index 0000000..dbdcb3b --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/extendWith.js @@ -0,0 +1 @@ +module.exports = require('./assignInWith'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/fill.js b/node_modules/sequelize-cli/node_modules/lodash/fp/fill.js new file mode 100644 index 0000000..b2d47e8 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/fill.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('fill', require('../fill')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/filter.js b/node_modules/sequelize-cli/node_modules/lodash/fp/filter.js new file mode 100644 index 0000000..796d501 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/filter.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('filter', require('../filter')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/find.js b/node_modules/sequelize-cli/node_modules/lodash/fp/find.js new file mode 100644 index 0000000..f805d33 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/find.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('find', require('../find')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/findFrom.js b/node_modules/sequelize-cli/node_modules/lodash/fp/findFrom.js new file mode 100644 index 0000000..da8275e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/findFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findFrom', require('../find')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/findIndex.js b/node_modules/sequelize-cli/node_modules/lodash/fp/findIndex.js new file mode 100644 index 0000000..8c15fd1 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/findIndex.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findIndex', require('../findIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/findIndexFrom.js b/node_modules/sequelize-cli/node_modules/lodash/fp/findIndexFrom.js new file mode 100644 index 0000000..32e98cb --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/findIndexFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findIndexFrom', require('../findIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/findKey.js b/node_modules/sequelize-cli/node_modules/lodash/fp/findKey.js new file mode 100644 index 0000000..475bcfa --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/findKey.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findKey', require('../findKey')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/findLast.js b/node_modules/sequelize-cli/node_modules/lodash/fp/findLast.js new file mode 100644 index 0000000..093fe94 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/findLast.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findLast', require('../findLast')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/findLastFrom.js b/node_modules/sequelize-cli/node_modules/lodash/fp/findLastFrom.js new file mode 100644 index 0000000..76c38fb --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/findLastFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findLastFrom', require('../findLast')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/findLastIndex.js b/node_modules/sequelize-cli/node_modules/lodash/fp/findLastIndex.js new file mode 100644 index 0000000..36986df --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/findLastIndex.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findLastIndex', require('../findLastIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/findLastIndexFrom.js b/node_modules/sequelize-cli/node_modules/lodash/fp/findLastIndexFrom.js new file mode 100644 index 0000000..34c8176 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/findLastIndexFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findLastIndexFrom', require('../findLastIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/findLastKey.js b/node_modules/sequelize-cli/node_modules/lodash/fp/findLastKey.js new file mode 100644 index 0000000..5f81b60 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/findLastKey.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findLastKey', require('../findLastKey')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/first.js b/node_modules/sequelize-cli/node_modules/lodash/fp/first.js new file mode 100644 index 0000000..53f4ad1 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/first.js @@ -0,0 +1 @@ +module.exports = require('./head'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/flatMap.js b/node_modules/sequelize-cli/node_modules/lodash/fp/flatMap.js new file mode 100644 index 0000000..d01dc4d --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/flatMap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flatMap', require('../flatMap')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/flatMapDeep.js b/node_modules/sequelize-cli/node_modules/lodash/fp/flatMapDeep.js new file mode 100644 index 0000000..569c42e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/flatMapDeep.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flatMapDeep', require('../flatMapDeep')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/flatMapDepth.js b/node_modules/sequelize-cli/node_modules/lodash/fp/flatMapDepth.js new file mode 100644 index 0000000..6eb68fd --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/flatMapDepth.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flatMapDepth', require('../flatMapDepth')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/flatten.js b/node_modules/sequelize-cli/node_modules/lodash/fp/flatten.js new file mode 100644 index 0000000..30425d8 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/flatten.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flatten', require('../flatten'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/flattenDeep.js b/node_modules/sequelize-cli/node_modules/lodash/fp/flattenDeep.js new file mode 100644 index 0000000..aed5db2 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/flattenDeep.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flattenDeep', require('../flattenDeep'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/flattenDepth.js b/node_modules/sequelize-cli/node_modules/lodash/fp/flattenDepth.js new file mode 100644 index 0000000..ad65e37 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/flattenDepth.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flattenDepth', require('../flattenDepth')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/flip.js b/node_modules/sequelize-cli/node_modules/lodash/fp/flip.js new file mode 100644 index 0000000..0547e7b --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/flip.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flip', require('../flip'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/floor.js b/node_modules/sequelize-cli/node_modules/lodash/fp/floor.js new file mode 100644 index 0000000..a6cf335 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/floor.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('floor', require('../floor')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/flow.js b/node_modules/sequelize-cli/node_modules/lodash/fp/flow.js new file mode 100644 index 0000000..cd83677 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/flow.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flow', require('../flow')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/flowRight.js b/node_modules/sequelize-cli/node_modules/lodash/fp/flowRight.js new file mode 100644 index 0000000..972a5b9 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/flowRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flowRight', require('../flowRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/forEach.js b/node_modules/sequelize-cli/node_modules/lodash/fp/forEach.js new file mode 100644 index 0000000..2f49452 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/forEach.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('forEach', require('../forEach')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/forEachRight.js b/node_modules/sequelize-cli/node_modules/lodash/fp/forEachRight.js new file mode 100644 index 0000000..3ff9733 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/forEachRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('forEachRight', require('../forEachRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/forIn.js b/node_modules/sequelize-cli/node_modules/lodash/fp/forIn.js new file mode 100644 index 0000000..9341749 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/forIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('forIn', require('../forIn')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/forInRight.js b/node_modules/sequelize-cli/node_modules/lodash/fp/forInRight.js new file mode 100644 index 0000000..cecf8bb --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/forInRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('forInRight', require('../forInRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/forOwn.js b/node_modules/sequelize-cli/node_modules/lodash/fp/forOwn.js new file mode 100644 index 0000000..246449e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/forOwn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('forOwn', require('../forOwn')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/forOwnRight.js b/node_modules/sequelize-cli/node_modules/lodash/fp/forOwnRight.js new file mode 100644 index 0000000..c5e826e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/forOwnRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('forOwnRight', require('../forOwnRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/fromPairs.js b/node_modules/sequelize-cli/node_modules/lodash/fp/fromPairs.js new file mode 100644 index 0000000..f8cc596 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/fromPairs.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('fromPairs', require('../fromPairs')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/function.js b/node_modules/sequelize-cli/node_modules/lodash/fp/function.js new file mode 100644 index 0000000..dfe69b1 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/function.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../function')); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/functions.js b/node_modules/sequelize-cli/node_modules/lodash/fp/functions.js new file mode 100644 index 0000000..09d1bb1 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/functions.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('functions', require('../functions'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/functionsIn.js b/node_modules/sequelize-cli/node_modules/lodash/fp/functionsIn.js new file mode 100644 index 0000000..2cfeb83 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/functionsIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('functionsIn', require('../functionsIn'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/get.js b/node_modules/sequelize-cli/node_modules/lodash/fp/get.js new file mode 100644 index 0000000..6d3a328 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/get.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('get', require('../get')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/getOr.js b/node_modules/sequelize-cli/node_modules/lodash/fp/getOr.js new file mode 100644 index 0000000..7dbf771 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/getOr.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('getOr', require('../get')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/groupBy.js b/node_modules/sequelize-cli/node_modules/lodash/fp/groupBy.js new file mode 100644 index 0000000..fc0bc78 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/groupBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('groupBy', require('../groupBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/gt.js b/node_modules/sequelize-cli/node_modules/lodash/fp/gt.js new file mode 100644 index 0000000..9e57c80 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/gt.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('gt', require('../gt')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/gte.js b/node_modules/sequelize-cli/node_modules/lodash/fp/gte.js new file mode 100644 index 0000000..4584786 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/gte.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('gte', require('../gte')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/has.js b/node_modules/sequelize-cli/node_modules/lodash/fp/has.js new file mode 100644 index 0000000..b901298 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/has.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('has', require('../has')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/hasIn.js b/node_modules/sequelize-cli/node_modules/lodash/fp/hasIn.js new file mode 100644 index 0000000..b3c3d1a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/hasIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('hasIn', require('../hasIn')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/head.js b/node_modules/sequelize-cli/node_modules/lodash/fp/head.js new file mode 100644 index 0000000..2694f0a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/head.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('head', require('../head'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/identical.js b/node_modules/sequelize-cli/node_modules/lodash/fp/identical.js new file mode 100644 index 0000000..85563f4 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/identical.js @@ -0,0 +1 @@ +module.exports = require('./eq'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/identity.js b/node_modules/sequelize-cli/node_modules/lodash/fp/identity.js new file mode 100644 index 0000000..096415a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/identity.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('identity', require('../identity'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/inRange.js b/node_modules/sequelize-cli/node_modules/lodash/fp/inRange.js new file mode 100644 index 0000000..202d940 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/inRange.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('inRange', require('../inRange')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/includes.js b/node_modules/sequelize-cli/node_modules/lodash/fp/includes.js new file mode 100644 index 0000000..1146780 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/includes.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('includes', require('../includes')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/includesFrom.js b/node_modules/sequelize-cli/node_modules/lodash/fp/includesFrom.js new file mode 100644 index 0000000..683afdb --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/includesFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('includesFrom', require('../includes')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/indexBy.js b/node_modules/sequelize-cli/node_modules/lodash/fp/indexBy.js new file mode 100644 index 0000000..7e64bc0 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/indexBy.js @@ -0,0 +1 @@ +module.exports = require('./keyBy'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/indexOf.js b/node_modules/sequelize-cli/node_modules/lodash/fp/indexOf.js new file mode 100644 index 0000000..524658e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/indexOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('indexOf', require('../indexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/indexOfFrom.js b/node_modules/sequelize-cli/node_modules/lodash/fp/indexOfFrom.js new file mode 100644 index 0000000..d99c822 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/indexOfFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('indexOfFrom', require('../indexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/init.js b/node_modules/sequelize-cli/node_modules/lodash/fp/init.js new file mode 100644 index 0000000..2f88d8b --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/init.js @@ -0,0 +1 @@ +module.exports = require('./initial'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/initial.js b/node_modules/sequelize-cli/node_modules/lodash/fp/initial.js new file mode 100644 index 0000000..b732ba0 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/initial.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('initial', require('../initial'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/intersection.js b/node_modules/sequelize-cli/node_modules/lodash/fp/intersection.js new file mode 100644 index 0000000..52936d5 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/intersection.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('intersection', require('../intersection')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/intersectionBy.js b/node_modules/sequelize-cli/node_modules/lodash/fp/intersectionBy.js new file mode 100644 index 0000000..72629f2 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/intersectionBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('intersectionBy', require('../intersectionBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/intersectionWith.js b/node_modules/sequelize-cli/node_modules/lodash/fp/intersectionWith.js new file mode 100644 index 0000000..e064f40 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/intersectionWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('intersectionWith', require('../intersectionWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/invert.js b/node_modules/sequelize-cli/node_modules/lodash/fp/invert.js new file mode 100644 index 0000000..2d5d1f0 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/invert.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('invert', require('../invert')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/invertBy.js b/node_modules/sequelize-cli/node_modules/lodash/fp/invertBy.js new file mode 100644 index 0000000..63ca97e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/invertBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('invertBy', require('../invertBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/invertObj.js b/node_modules/sequelize-cli/node_modules/lodash/fp/invertObj.js new file mode 100644 index 0000000..f1d842e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/invertObj.js @@ -0,0 +1 @@ +module.exports = require('./invert'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/invoke.js b/node_modules/sequelize-cli/node_modules/lodash/fp/invoke.js new file mode 100644 index 0000000..fcf17f0 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/invoke.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('invoke', require('../invoke')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/invokeArgs.js b/node_modules/sequelize-cli/node_modules/lodash/fp/invokeArgs.js new file mode 100644 index 0000000..d3f2953 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/invokeArgs.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('invokeArgs', require('../invoke')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/invokeArgsMap.js b/node_modules/sequelize-cli/node_modules/lodash/fp/invokeArgsMap.js new file mode 100644 index 0000000..eaa9f84 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/invokeArgsMap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('invokeArgsMap', require('../invokeMap')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/invokeMap.js b/node_modules/sequelize-cli/node_modules/lodash/fp/invokeMap.js new file mode 100644 index 0000000..6515fd7 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/invokeMap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('invokeMap', require('../invokeMap')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/isArguments.js b/node_modules/sequelize-cli/node_modules/lodash/fp/isArguments.js new file mode 100644 index 0000000..1d93c9e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/isArguments.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isArguments', require('../isArguments'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/isArray.js b/node_modules/sequelize-cli/node_modules/lodash/fp/isArray.js new file mode 100644 index 0000000..ba7ade8 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/isArray.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isArray', require('../isArray'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/isArrayBuffer.js b/node_modules/sequelize-cli/node_modules/lodash/fp/isArrayBuffer.js new file mode 100644 index 0000000..5088513 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/isArrayBuffer.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isArrayBuffer', require('../isArrayBuffer'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/isArrayLike.js b/node_modules/sequelize-cli/node_modules/lodash/fp/isArrayLike.js new file mode 100644 index 0000000..8f1856b --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/isArrayLike.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isArrayLike', require('../isArrayLike'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/isArrayLikeObject.js b/node_modules/sequelize-cli/node_modules/lodash/fp/isArrayLikeObject.js new file mode 100644 index 0000000..2108498 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/isArrayLikeObject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isArrayLikeObject', require('../isArrayLikeObject'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/isBoolean.js b/node_modules/sequelize-cli/node_modules/lodash/fp/isBoolean.js new file mode 100644 index 0000000..9339f75 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/isBoolean.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isBoolean', require('../isBoolean'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/isBuffer.js b/node_modules/sequelize-cli/node_modules/lodash/fp/isBuffer.js new file mode 100644 index 0000000..e60b123 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/isBuffer.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isBuffer', require('../isBuffer'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/isDate.js b/node_modules/sequelize-cli/node_modules/lodash/fp/isDate.js new file mode 100644 index 0000000..dc41d08 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/isDate.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isDate', require('../isDate'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/isElement.js b/node_modules/sequelize-cli/node_modules/lodash/fp/isElement.js new file mode 100644 index 0000000..18ee039 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/isElement.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isElement', require('../isElement'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/isEmpty.js b/node_modules/sequelize-cli/node_modules/lodash/fp/isEmpty.js new file mode 100644 index 0000000..0f4ae84 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/isEmpty.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isEmpty', require('../isEmpty'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/isEqual.js b/node_modules/sequelize-cli/node_modules/lodash/fp/isEqual.js new file mode 100644 index 0000000..4138386 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/isEqual.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isEqual', require('../isEqual')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/isEqualWith.js b/node_modules/sequelize-cli/node_modules/lodash/fp/isEqualWith.js new file mode 100644 index 0000000..029ff5c --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/isEqualWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isEqualWith', require('../isEqualWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/isError.js b/node_modules/sequelize-cli/node_modules/lodash/fp/isError.js new file mode 100644 index 0000000..3dfd81c --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/isError.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isError', require('../isError'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/isFinite.js b/node_modules/sequelize-cli/node_modules/lodash/fp/isFinite.js new file mode 100644 index 0000000..0b647b8 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/isFinite.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isFinite', require('../isFinite'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/isFunction.js b/node_modules/sequelize-cli/node_modules/lodash/fp/isFunction.js new file mode 100644 index 0000000..ff8e5c4 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/isFunction.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isFunction', require('../isFunction'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/isInteger.js b/node_modules/sequelize-cli/node_modules/lodash/fp/isInteger.js new file mode 100644 index 0000000..67af4ff --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/isInteger.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isInteger', require('../isInteger'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/isLength.js b/node_modules/sequelize-cli/node_modules/lodash/fp/isLength.js new file mode 100644 index 0000000..fc101c5 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/isLength.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isLength', require('../isLength'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/isMap.js b/node_modules/sequelize-cli/node_modules/lodash/fp/isMap.js new file mode 100644 index 0000000..a209aa6 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/isMap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isMap', require('../isMap'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/isMatch.js b/node_modules/sequelize-cli/node_modules/lodash/fp/isMatch.js new file mode 100644 index 0000000..6264ca1 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/isMatch.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isMatch', require('../isMatch')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/isMatchWith.js b/node_modules/sequelize-cli/node_modules/lodash/fp/isMatchWith.js new file mode 100644 index 0000000..d95f319 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/isMatchWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isMatchWith', require('../isMatchWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/isNaN.js b/node_modules/sequelize-cli/node_modules/lodash/fp/isNaN.js new file mode 100644 index 0000000..66a978f --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/isNaN.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isNaN', require('../isNaN'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/isNative.js b/node_modules/sequelize-cli/node_modules/lodash/fp/isNative.js new file mode 100644 index 0000000..3d775ba --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/isNative.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isNative', require('../isNative'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/isNil.js b/node_modules/sequelize-cli/node_modules/lodash/fp/isNil.js new file mode 100644 index 0000000..5952c02 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/isNil.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isNil', require('../isNil'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/isNull.js b/node_modules/sequelize-cli/node_modules/lodash/fp/isNull.js new file mode 100644 index 0000000..f201a35 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/isNull.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isNull', require('../isNull'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/isNumber.js b/node_modules/sequelize-cli/node_modules/lodash/fp/isNumber.js new file mode 100644 index 0000000..a2b5fa0 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/isNumber.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isNumber', require('../isNumber'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/isObject.js b/node_modules/sequelize-cli/node_modules/lodash/fp/isObject.js new file mode 100644 index 0000000..231ace0 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/isObject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isObject', require('../isObject'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/isObjectLike.js b/node_modules/sequelize-cli/node_modules/lodash/fp/isObjectLike.js new file mode 100644 index 0000000..f16082e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/isObjectLike.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isObjectLike', require('../isObjectLike'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/isPlainObject.js b/node_modules/sequelize-cli/node_modules/lodash/fp/isPlainObject.js new file mode 100644 index 0000000..b5bea90 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/isPlainObject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isPlainObject', require('../isPlainObject'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/isRegExp.js b/node_modules/sequelize-cli/node_modules/lodash/fp/isRegExp.js new file mode 100644 index 0000000..12a1a3d --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/isRegExp.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isRegExp', require('../isRegExp'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/isSafeInteger.js b/node_modules/sequelize-cli/node_modules/lodash/fp/isSafeInteger.js new file mode 100644 index 0000000..7230f55 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/isSafeInteger.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isSafeInteger', require('../isSafeInteger'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/isSet.js b/node_modules/sequelize-cli/node_modules/lodash/fp/isSet.js new file mode 100644 index 0000000..35c01f6 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/isSet.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isSet', require('../isSet'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/isString.js b/node_modules/sequelize-cli/node_modules/lodash/fp/isString.js new file mode 100644 index 0000000..1fd0679 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/isString.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isString', require('../isString'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/isSymbol.js b/node_modules/sequelize-cli/node_modules/lodash/fp/isSymbol.js new file mode 100644 index 0000000..3867695 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/isSymbol.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isSymbol', require('../isSymbol'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/isTypedArray.js b/node_modules/sequelize-cli/node_modules/lodash/fp/isTypedArray.js new file mode 100644 index 0000000..8567953 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/isTypedArray.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isTypedArray', require('../isTypedArray'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/isUndefined.js b/node_modules/sequelize-cli/node_modules/lodash/fp/isUndefined.js new file mode 100644 index 0000000..ddbca31 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/isUndefined.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isUndefined', require('../isUndefined'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/isWeakMap.js b/node_modules/sequelize-cli/node_modules/lodash/fp/isWeakMap.js new file mode 100644 index 0000000..ef60c61 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/isWeakMap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isWeakMap', require('../isWeakMap'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/isWeakSet.js b/node_modules/sequelize-cli/node_modules/lodash/fp/isWeakSet.js new file mode 100644 index 0000000..c99bfaa --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/isWeakSet.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isWeakSet', require('../isWeakSet'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/iteratee.js b/node_modules/sequelize-cli/node_modules/lodash/fp/iteratee.js new file mode 100644 index 0000000..9f0f717 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/iteratee.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('iteratee', require('../iteratee')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/join.js b/node_modules/sequelize-cli/node_modules/lodash/fp/join.js new file mode 100644 index 0000000..a220e00 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/join.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('join', require('../join')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/juxt.js b/node_modules/sequelize-cli/node_modules/lodash/fp/juxt.js new file mode 100644 index 0000000..f71e04e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/juxt.js @@ -0,0 +1 @@ +module.exports = require('./over'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/kebabCase.js b/node_modules/sequelize-cli/node_modules/lodash/fp/kebabCase.js new file mode 100644 index 0000000..60737f1 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/kebabCase.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('kebabCase', require('../kebabCase'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/keyBy.js b/node_modules/sequelize-cli/node_modules/lodash/fp/keyBy.js new file mode 100644 index 0000000..9a6a85d --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/keyBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('keyBy', require('../keyBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/keys.js b/node_modules/sequelize-cli/node_modules/lodash/fp/keys.js new file mode 100644 index 0000000..e12bb07 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/keys.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('keys', require('../keys'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/keysIn.js b/node_modules/sequelize-cli/node_modules/lodash/fp/keysIn.js new file mode 100644 index 0000000..f3eb36a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/keysIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('keysIn', require('../keysIn'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/lang.js b/node_modules/sequelize-cli/node_modules/lodash/fp/lang.js new file mode 100644 index 0000000..08cc9c1 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/lang.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../lang')); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/last.js b/node_modules/sequelize-cli/node_modules/lodash/fp/last.js new file mode 100644 index 0000000..0f71699 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/last.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('last', require('../last'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/lastIndexOf.js b/node_modules/sequelize-cli/node_modules/lodash/fp/lastIndexOf.js new file mode 100644 index 0000000..ddf39c3 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/lastIndexOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('lastIndexOf', require('../lastIndexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/lastIndexOfFrom.js b/node_modules/sequelize-cli/node_modules/lodash/fp/lastIndexOfFrom.js new file mode 100644 index 0000000..1ff6a0b --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/lastIndexOfFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('lastIndexOfFrom', require('../lastIndexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/lowerCase.js b/node_modules/sequelize-cli/node_modules/lodash/fp/lowerCase.js new file mode 100644 index 0000000..ea64bc1 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/lowerCase.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('lowerCase', require('../lowerCase'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/lowerFirst.js b/node_modules/sequelize-cli/node_modules/lodash/fp/lowerFirst.js new file mode 100644 index 0000000..539720a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/lowerFirst.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('lowerFirst', require('../lowerFirst'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/lt.js b/node_modules/sequelize-cli/node_modules/lodash/fp/lt.js new file mode 100644 index 0000000..a31d21e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/lt.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('lt', require('../lt')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/lte.js b/node_modules/sequelize-cli/node_modules/lodash/fp/lte.js new file mode 100644 index 0000000..d795d10 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/lte.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('lte', require('../lte')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/map.js b/node_modules/sequelize-cli/node_modules/lodash/fp/map.js new file mode 100644 index 0000000..cf98794 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/map.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('map', require('../map')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/mapKeys.js b/node_modules/sequelize-cli/node_modules/lodash/fp/mapKeys.js new file mode 100644 index 0000000..1684587 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/mapKeys.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mapKeys', require('../mapKeys')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/mapValues.js b/node_modules/sequelize-cli/node_modules/lodash/fp/mapValues.js new file mode 100644 index 0000000..4004972 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/mapValues.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mapValues', require('../mapValues')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/matches.js b/node_modules/sequelize-cli/node_modules/lodash/fp/matches.js new file mode 100644 index 0000000..29d1e1e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/matches.js @@ -0,0 +1 @@ +module.exports = require('./isMatch'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/matchesProperty.js b/node_modules/sequelize-cli/node_modules/lodash/fp/matchesProperty.js new file mode 100644 index 0000000..4575bd2 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/matchesProperty.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('matchesProperty', require('../matchesProperty')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/math.js b/node_modules/sequelize-cli/node_modules/lodash/fp/math.js new file mode 100644 index 0000000..e8f50f7 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/math.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../math')); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/max.js b/node_modules/sequelize-cli/node_modules/lodash/fp/max.js new file mode 100644 index 0000000..a66acac --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/max.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('max', require('../max'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/maxBy.js b/node_modules/sequelize-cli/node_modules/lodash/fp/maxBy.js new file mode 100644 index 0000000..d083fd6 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/maxBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('maxBy', require('../maxBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/mean.js b/node_modules/sequelize-cli/node_modules/lodash/fp/mean.js new file mode 100644 index 0000000..3117246 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/mean.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mean', require('../mean'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/meanBy.js b/node_modules/sequelize-cli/node_modules/lodash/fp/meanBy.js new file mode 100644 index 0000000..556f25e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/meanBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('meanBy', require('../meanBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/memoize.js b/node_modules/sequelize-cli/node_modules/lodash/fp/memoize.js new file mode 100644 index 0000000..638eec6 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/memoize.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('memoize', require('../memoize')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/merge.js b/node_modules/sequelize-cli/node_modules/lodash/fp/merge.js new file mode 100644 index 0000000..ac66add --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/merge.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('merge', require('../merge')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/mergeAll.js b/node_modules/sequelize-cli/node_modules/lodash/fp/mergeAll.js new file mode 100644 index 0000000..a3674d6 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/mergeAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mergeAll', require('../merge')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/mergeAllWith.js b/node_modules/sequelize-cli/node_modules/lodash/fp/mergeAllWith.js new file mode 100644 index 0000000..4bd4206 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/mergeAllWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mergeAllWith', require('../mergeWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/mergeWith.js b/node_modules/sequelize-cli/node_modules/lodash/fp/mergeWith.js new file mode 100644 index 0000000..00d44d5 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/mergeWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mergeWith', require('../mergeWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/method.js b/node_modules/sequelize-cli/node_modules/lodash/fp/method.js new file mode 100644 index 0000000..f4060c6 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/method.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('method', require('../method')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/methodOf.js b/node_modules/sequelize-cli/node_modules/lodash/fp/methodOf.js new file mode 100644 index 0000000..6139905 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/methodOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('methodOf', require('../methodOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/min.js b/node_modules/sequelize-cli/node_modules/lodash/fp/min.js new file mode 100644 index 0000000..d12c6b4 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/min.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('min', require('../min'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/minBy.js b/node_modules/sequelize-cli/node_modules/lodash/fp/minBy.js new file mode 100644 index 0000000..fdb9e24 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/minBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('minBy', require('../minBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/mixin.js b/node_modules/sequelize-cli/node_modules/lodash/fp/mixin.js new file mode 100644 index 0000000..332e6fb --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/mixin.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mixin', require('../mixin')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/multiply.js b/node_modules/sequelize-cli/node_modules/lodash/fp/multiply.js new file mode 100644 index 0000000..4dcf0b0 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/multiply.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('multiply', require('../multiply')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/nAry.js b/node_modules/sequelize-cli/node_modules/lodash/fp/nAry.js new file mode 100644 index 0000000..f262a76 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/nAry.js @@ -0,0 +1 @@ +module.exports = require('./ary'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/negate.js b/node_modules/sequelize-cli/node_modules/lodash/fp/negate.js new file mode 100644 index 0000000..8b6dc7c --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/negate.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('negate', require('../negate'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/next.js b/node_modules/sequelize-cli/node_modules/lodash/fp/next.js new file mode 100644 index 0000000..140155e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/next.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('next', require('../next'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/noop.js b/node_modules/sequelize-cli/node_modules/lodash/fp/noop.js new file mode 100644 index 0000000..b9e32cc --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/noop.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('noop', require('../noop'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/now.js b/node_modules/sequelize-cli/node_modules/lodash/fp/now.js new file mode 100644 index 0000000..6de2068 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/now.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('now', require('../now'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/nth.js b/node_modules/sequelize-cli/node_modules/lodash/fp/nth.js new file mode 100644 index 0000000..da4fda7 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/nth.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('nth', require('../nth')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/nthArg.js b/node_modules/sequelize-cli/node_modules/lodash/fp/nthArg.js new file mode 100644 index 0000000..fce3165 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/nthArg.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('nthArg', require('../nthArg')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/number.js b/node_modules/sequelize-cli/node_modules/lodash/fp/number.js new file mode 100644 index 0000000..5c10b88 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/number.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../number')); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/object.js b/node_modules/sequelize-cli/node_modules/lodash/fp/object.js new file mode 100644 index 0000000..ae39a13 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/object.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../object')); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/omit.js b/node_modules/sequelize-cli/node_modules/lodash/fp/omit.js new file mode 100644 index 0000000..fd68529 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/omit.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('omit', require('../omit')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/omitAll.js b/node_modules/sequelize-cli/node_modules/lodash/fp/omitAll.js new file mode 100644 index 0000000..144cf4b --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/omitAll.js @@ -0,0 +1 @@ +module.exports = require('./omit'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/omitBy.js b/node_modules/sequelize-cli/node_modules/lodash/fp/omitBy.js new file mode 100644 index 0000000..90df738 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/omitBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('omitBy', require('../omitBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/once.js b/node_modules/sequelize-cli/node_modules/lodash/fp/once.js new file mode 100644 index 0000000..f8f0a5c --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/once.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('once', require('../once'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/orderBy.js b/node_modules/sequelize-cli/node_modules/lodash/fp/orderBy.js new file mode 100644 index 0000000..848e210 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/orderBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('orderBy', require('../orderBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/over.js b/node_modules/sequelize-cli/node_modules/lodash/fp/over.js new file mode 100644 index 0000000..01eba7b --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/over.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('over', require('../over')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/overArgs.js b/node_modules/sequelize-cli/node_modules/lodash/fp/overArgs.js new file mode 100644 index 0000000..738556f --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/overArgs.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('overArgs', require('../overArgs')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/overEvery.js b/node_modules/sequelize-cli/node_modules/lodash/fp/overEvery.js new file mode 100644 index 0000000..9f5a032 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/overEvery.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('overEvery', require('../overEvery')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/overSome.js b/node_modules/sequelize-cli/node_modules/lodash/fp/overSome.js new file mode 100644 index 0000000..15939d5 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/overSome.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('overSome', require('../overSome')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/pad.js b/node_modules/sequelize-cli/node_modules/lodash/fp/pad.js new file mode 100644 index 0000000..f1dea4a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/pad.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pad', require('../pad')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/padChars.js b/node_modules/sequelize-cli/node_modules/lodash/fp/padChars.js new file mode 100644 index 0000000..d6e0804 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/padChars.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('padChars', require('../pad')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/padCharsEnd.js b/node_modules/sequelize-cli/node_modules/lodash/fp/padCharsEnd.js new file mode 100644 index 0000000..d4ab79a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/padCharsEnd.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('padCharsEnd', require('../padEnd')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/padCharsStart.js b/node_modules/sequelize-cli/node_modules/lodash/fp/padCharsStart.js new file mode 100644 index 0000000..a08a300 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/padCharsStart.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('padCharsStart', require('../padStart')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/padEnd.js b/node_modules/sequelize-cli/node_modules/lodash/fp/padEnd.js new file mode 100644 index 0000000..a8522ec --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/padEnd.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('padEnd', require('../padEnd')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/padStart.js b/node_modules/sequelize-cli/node_modules/lodash/fp/padStart.js new file mode 100644 index 0000000..f4ca79d --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/padStart.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('padStart', require('../padStart')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/parseInt.js b/node_modules/sequelize-cli/node_modules/lodash/fp/parseInt.js new file mode 100644 index 0000000..27314cc --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/parseInt.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('parseInt', require('../parseInt')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/partial.js b/node_modules/sequelize-cli/node_modules/lodash/fp/partial.js new file mode 100644 index 0000000..5d46015 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/partial.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('partial', require('../partial')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/partialRight.js b/node_modules/sequelize-cli/node_modules/lodash/fp/partialRight.js new file mode 100644 index 0000000..7f05fed --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/partialRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('partialRight', require('../partialRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/partition.js b/node_modules/sequelize-cli/node_modules/lodash/fp/partition.js new file mode 100644 index 0000000..2ebcacc --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/partition.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('partition', require('../partition')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/path.js b/node_modules/sequelize-cli/node_modules/lodash/fp/path.js new file mode 100644 index 0000000..b29cfb2 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/path.js @@ -0,0 +1 @@ +module.exports = require('./get'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/pathEq.js b/node_modules/sequelize-cli/node_modules/lodash/fp/pathEq.js new file mode 100644 index 0000000..36c027a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/pathEq.js @@ -0,0 +1 @@ +module.exports = require('./matchesProperty'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/pathOr.js b/node_modules/sequelize-cli/node_modules/lodash/fp/pathOr.js new file mode 100644 index 0000000..4ab5820 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/pathOr.js @@ -0,0 +1 @@ +module.exports = require('./getOr'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/paths.js b/node_modules/sequelize-cli/node_modules/lodash/fp/paths.js new file mode 100644 index 0000000..1eb7950 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/paths.js @@ -0,0 +1 @@ +module.exports = require('./at'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/pick.js b/node_modules/sequelize-cli/node_modules/lodash/fp/pick.js new file mode 100644 index 0000000..197393d --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/pick.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pick', require('../pick')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/pickAll.js b/node_modules/sequelize-cli/node_modules/lodash/fp/pickAll.js new file mode 100644 index 0000000..a8ecd46 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/pickAll.js @@ -0,0 +1 @@ +module.exports = require('./pick'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/pickBy.js b/node_modules/sequelize-cli/node_modules/lodash/fp/pickBy.js new file mode 100644 index 0000000..d832d16 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/pickBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pickBy', require('../pickBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/pipe.js b/node_modules/sequelize-cli/node_modules/lodash/fp/pipe.js new file mode 100644 index 0000000..b2e1e2c --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/pipe.js @@ -0,0 +1 @@ +module.exports = require('./flow'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/placeholder.js b/node_modules/sequelize-cli/node_modules/lodash/fp/placeholder.js new file mode 100644 index 0000000..1ce1739 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/placeholder.js @@ -0,0 +1,6 @@ +/** + * The default argument placeholder value for methods. + * + * @type {Object} + */ +module.exports = {}; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/plant.js b/node_modules/sequelize-cli/node_modules/lodash/fp/plant.js new file mode 100644 index 0000000..eca8f32 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/plant.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('plant', require('../plant'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/pluck.js b/node_modules/sequelize-cli/node_modules/lodash/fp/pluck.js new file mode 100644 index 0000000..0d1e1ab --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/pluck.js @@ -0,0 +1 @@ +module.exports = require('./map'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/prop.js b/node_modules/sequelize-cli/node_modules/lodash/fp/prop.js new file mode 100644 index 0000000..b29cfb2 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/prop.js @@ -0,0 +1 @@ +module.exports = require('./get'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/propEq.js b/node_modules/sequelize-cli/node_modules/lodash/fp/propEq.js new file mode 100644 index 0000000..36c027a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/propEq.js @@ -0,0 +1 @@ +module.exports = require('./matchesProperty'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/propOr.js b/node_modules/sequelize-cli/node_modules/lodash/fp/propOr.js new file mode 100644 index 0000000..4ab5820 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/propOr.js @@ -0,0 +1 @@ +module.exports = require('./getOr'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/property.js b/node_modules/sequelize-cli/node_modules/lodash/fp/property.js new file mode 100644 index 0000000..b29cfb2 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/property.js @@ -0,0 +1 @@ +module.exports = require('./get'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/propertyOf.js b/node_modules/sequelize-cli/node_modules/lodash/fp/propertyOf.js new file mode 100644 index 0000000..f6273ee --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/propertyOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('propertyOf', require('../get')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/props.js b/node_modules/sequelize-cli/node_modules/lodash/fp/props.js new file mode 100644 index 0000000..1eb7950 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/props.js @@ -0,0 +1 @@ +module.exports = require('./at'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/pull.js b/node_modules/sequelize-cli/node_modules/lodash/fp/pull.js new file mode 100644 index 0000000..8d7084f --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/pull.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pull', require('../pull')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/pullAll.js b/node_modules/sequelize-cli/node_modules/lodash/fp/pullAll.js new file mode 100644 index 0000000..98d5c9a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/pullAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pullAll', require('../pullAll')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/pullAllBy.js b/node_modules/sequelize-cli/node_modules/lodash/fp/pullAllBy.js new file mode 100644 index 0000000..876bc3b --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/pullAllBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pullAllBy', require('../pullAllBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/pullAllWith.js b/node_modules/sequelize-cli/node_modules/lodash/fp/pullAllWith.js new file mode 100644 index 0000000..f71ba4d --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/pullAllWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pullAllWith', require('../pullAllWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/pullAt.js b/node_modules/sequelize-cli/node_modules/lodash/fp/pullAt.js new file mode 100644 index 0000000..e8b3bb6 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/pullAt.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pullAt', require('../pullAt')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/random.js b/node_modules/sequelize-cli/node_modules/lodash/fp/random.js new file mode 100644 index 0000000..99d852e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/random.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('random', require('../random')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/range.js b/node_modules/sequelize-cli/node_modules/lodash/fp/range.js new file mode 100644 index 0000000..a6bb591 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/range.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('range', require('../range')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/rangeRight.js b/node_modules/sequelize-cli/node_modules/lodash/fp/rangeRight.js new file mode 100644 index 0000000..fdb712f --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/rangeRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('rangeRight', require('../rangeRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/rangeStep.js b/node_modules/sequelize-cli/node_modules/lodash/fp/rangeStep.js new file mode 100644 index 0000000..d72dfc2 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/rangeStep.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('rangeStep', require('../range')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/rangeStepRight.js b/node_modules/sequelize-cli/node_modules/lodash/fp/rangeStepRight.js new file mode 100644 index 0000000..8b2a67b --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/rangeStepRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('rangeStepRight', require('../rangeRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/rearg.js b/node_modules/sequelize-cli/node_modules/lodash/fp/rearg.js new file mode 100644 index 0000000..678e02a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/rearg.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('rearg', require('../rearg')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/reduce.js b/node_modules/sequelize-cli/node_modules/lodash/fp/reduce.js new file mode 100644 index 0000000..4cef0a0 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/reduce.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('reduce', require('../reduce')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/reduceRight.js b/node_modules/sequelize-cli/node_modules/lodash/fp/reduceRight.js new file mode 100644 index 0000000..caf5bb5 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/reduceRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('reduceRight', require('../reduceRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/reject.js b/node_modules/sequelize-cli/node_modules/lodash/fp/reject.js new file mode 100644 index 0000000..c163273 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/reject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('reject', require('../reject')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/remove.js b/node_modules/sequelize-cli/node_modules/lodash/fp/remove.js new file mode 100644 index 0000000..e9d1327 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/remove.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('remove', require('../remove')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/repeat.js b/node_modules/sequelize-cli/node_modules/lodash/fp/repeat.js new file mode 100644 index 0000000..08470f2 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/repeat.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('repeat', require('../repeat')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/replace.js b/node_modules/sequelize-cli/node_modules/lodash/fp/replace.js new file mode 100644 index 0000000..2227db6 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/replace.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('replace', require('../replace')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/rest.js b/node_modules/sequelize-cli/node_modules/lodash/fp/rest.js new file mode 100644 index 0000000..c1f3d64 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/rest.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('rest', require('../rest')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/restFrom.js b/node_modules/sequelize-cli/node_modules/lodash/fp/restFrom.js new file mode 100644 index 0000000..714e42b --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/restFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('restFrom', require('../rest')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/result.js b/node_modules/sequelize-cli/node_modules/lodash/fp/result.js new file mode 100644 index 0000000..f86ce07 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/result.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('result', require('../result')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/reverse.js b/node_modules/sequelize-cli/node_modules/lodash/fp/reverse.js new file mode 100644 index 0000000..07c9f5e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/reverse.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('reverse', require('../reverse')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/round.js b/node_modules/sequelize-cli/node_modules/lodash/fp/round.js new file mode 100644 index 0000000..4c0e5c8 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/round.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('round', require('../round')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/sample.js b/node_modules/sequelize-cli/node_modules/lodash/fp/sample.js new file mode 100644 index 0000000..6bea125 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/sample.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sample', require('../sample'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/sampleSize.js b/node_modules/sequelize-cli/node_modules/lodash/fp/sampleSize.js new file mode 100644 index 0000000..359ed6f --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/sampleSize.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sampleSize', require('../sampleSize')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/seq.js b/node_modules/sequelize-cli/node_modules/lodash/fp/seq.js new file mode 100644 index 0000000..d8f42b0 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/seq.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../seq')); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/set.js b/node_modules/sequelize-cli/node_modules/lodash/fp/set.js new file mode 100644 index 0000000..0b56a56 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/set.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('set', require('../set')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/setWith.js b/node_modules/sequelize-cli/node_modules/lodash/fp/setWith.js new file mode 100644 index 0000000..0b58495 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/setWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('setWith', require('../setWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/shuffle.js b/node_modules/sequelize-cli/node_modules/lodash/fp/shuffle.js new file mode 100644 index 0000000..aa3a1ca --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/shuffle.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('shuffle', require('../shuffle'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/size.js b/node_modules/sequelize-cli/node_modules/lodash/fp/size.js new file mode 100644 index 0000000..7490136 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/size.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('size', require('../size'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/slice.js b/node_modules/sequelize-cli/node_modules/lodash/fp/slice.js new file mode 100644 index 0000000..15945d3 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/slice.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('slice', require('../slice')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/snakeCase.js b/node_modules/sequelize-cli/node_modules/lodash/fp/snakeCase.js new file mode 100644 index 0000000..a0ff780 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/snakeCase.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('snakeCase', require('../snakeCase'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/some.js b/node_modules/sequelize-cli/node_modules/lodash/fp/some.js new file mode 100644 index 0000000..a4fa2d0 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/some.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('some', require('../some')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/sortBy.js b/node_modules/sequelize-cli/node_modules/lodash/fp/sortBy.js new file mode 100644 index 0000000..e0790ad --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/sortBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortBy', require('../sortBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/sortedIndex.js b/node_modules/sequelize-cli/node_modules/lodash/fp/sortedIndex.js new file mode 100644 index 0000000..364a054 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/sortedIndex.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedIndex', require('../sortedIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/sortedIndexBy.js b/node_modules/sequelize-cli/node_modules/lodash/fp/sortedIndexBy.js new file mode 100644 index 0000000..9593dbd --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/sortedIndexBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedIndexBy', require('../sortedIndexBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/sortedIndexOf.js b/node_modules/sequelize-cli/node_modules/lodash/fp/sortedIndexOf.js new file mode 100644 index 0000000..c9084ca --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/sortedIndexOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedIndexOf', require('../sortedIndexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/sortedLastIndex.js b/node_modules/sequelize-cli/node_modules/lodash/fp/sortedLastIndex.js new file mode 100644 index 0000000..47fe241 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/sortedLastIndex.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedLastIndex', require('../sortedLastIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/sortedLastIndexBy.js b/node_modules/sequelize-cli/node_modules/lodash/fp/sortedLastIndexBy.js new file mode 100644 index 0000000..0f9a347 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/sortedLastIndexBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedLastIndexBy', require('../sortedLastIndexBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/sortedLastIndexOf.js b/node_modules/sequelize-cli/node_modules/lodash/fp/sortedLastIndexOf.js new file mode 100644 index 0000000..0d4d932 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/sortedLastIndexOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedLastIndexOf', require('../sortedLastIndexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/sortedUniq.js b/node_modules/sequelize-cli/node_modules/lodash/fp/sortedUniq.js new file mode 100644 index 0000000..882d283 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/sortedUniq.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedUniq', require('../sortedUniq'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/sortedUniqBy.js b/node_modules/sequelize-cli/node_modules/lodash/fp/sortedUniqBy.js new file mode 100644 index 0000000..033db91 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/sortedUniqBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedUniqBy', require('../sortedUniqBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/split.js b/node_modules/sequelize-cli/node_modules/lodash/fp/split.js new file mode 100644 index 0000000..14de1a7 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/split.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('split', require('../split')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/spread.js b/node_modules/sequelize-cli/node_modules/lodash/fp/spread.js new file mode 100644 index 0000000..2d11b70 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/spread.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('spread', require('../spread')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/spreadFrom.js b/node_modules/sequelize-cli/node_modules/lodash/fp/spreadFrom.js new file mode 100644 index 0000000..0b630df --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/spreadFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('spreadFrom', require('../spread')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/startCase.js b/node_modules/sequelize-cli/node_modules/lodash/fp/startCase.js new file mode 100644 index 0000000..ada98c9 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/startCase.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('startCase', require('../startCase'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/startsWith.js b/node_modules/sequelize-cli/node_modules/lodash/fp/startsWith.js new file mode 100644 index 0000000..985e2f2 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/startsWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('startsWith', require('../startsWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/string.js b/node_modules/sequelize-cli/node_modules/lodash/fp/string.js new file mode 100644 index 0000000..773b037 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/string.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../string')); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/stubArray.js b/node_modules/sequelize-cli/node_modules/lodash/fp/stubArray.js new file mode 100644 index 0000000..cd604cb --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/stubArray.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubArray', require('../stubArray'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/stubFalse.js b/node_modules/sequelize-cli/node_modules/lodash/fp/stubFalse.js new file mode 100644 index 0000000..3296664 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/stubFalse.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubFalse', require('../stubFalse'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/stubObject.js b/node_modules/sequelize-cli/node_modules/lodash/fp/stubObject.js new file mode 100644 index 0000000..c6c8ec4 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/stubObject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubObject', require('../stubObject'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/stubString.js b/node_modules/sequelize-cli/node_modules/lodash/fp/stubString.js new file mode 100644 index 0000000..701051e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/stubString.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubString', require('../stubString'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/stubTrue.js b/node_modules/sequelize-cli/node_modules/lodash/fp/stubTrue.js new file mode 100644 index 0000000..9249082 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/stubTrue.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubTrue', require('../stubTrue'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/subtract.js b/node_modules/sequelize-cli/node_modules/lodash/fp/subtract.js new file mode 100644 index 0000000..d32b16d --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/subtract.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('subtract', require('../subtract')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/sum.js b/node_modules/sequelize-cli/node_modules/lodash/fp/sum.js new file mode 100644 index 0000000..5cce12b --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/sum.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sum', require('../sum'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/sumBy.js b/node_modules/sequelize-cli/node_modules/lodash/fp/sumBy.js new file mode 100644 index 0000000..c882656 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/sumBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sumBy', require('../sumBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/symmetricDifference.js b/node_modules/sequelize-cli/node_modules/lodash/fp/symmetricDifference.js new file mode 100644 index 0000000..78c16ad --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/symmetricDifference.js @@ -0,0 +1 @@ +module.exports = require('./xor'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/symmetricDifferenceBy.js b/node_modules/sequelize-cli/node_modules/lodash/fp/symmetricDifferenceBy.js new file mode 100644 index 0000000..298fc7f --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/symmetricDifferenceBy.js @@ -0,0 +1 @@ +module.exports = require('./xorBy'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/symmetricDifferenceWith.js b/node_modules/sequelize-cli/node_modules/lodash/fp/symmetricDifferenceWith.js new file mode 100644 index 0000000..70bc6fa --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/symmetricDifferenceWith.js @@ -0,0 +1 @@ +module.exports = require('./xorWith'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/tail.js b/node_modules/sequelize-cli/node_modules/lodash/fp/tail.js new file mode 100644 index 0000000..f122f0a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/tail.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('tail', require('../tail'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/take.js b/node_modules/sequelize-cli/node_modules/lodash/fp/take.js new file mode 100644 index 0000000..9af98a7 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/take.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('take', require('../take')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/takeLast.js b/node_modules/sequelize-cli/node_modules/lodash/fp/takeLast.js new file mode 100644 index 0000000..e98c84a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/takeLast.js @@ -0,0 +1 @@ +module.exports = require('./takeRight'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/takeLastWhile.js b/node_modules/sequelize-cli/node_modules/lodash/fp/takeLastWhile.js new file mode 100644 index 0000000..5367968 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/takeLastWhile.js @@ -0,0 +1 @@ +module.exports = require('./takeRightWhile'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/takeRight.js b/node_modules/sequelize-cli/node_modules/lodash/fp/takeRight.js new file mode 100644 index 0000000..b82950a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/takeRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('takeRight', require('../takeRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/takeRightWhile.js b/node_modules/sequelize-cli/node_modules/lodash/fp/takeRightWhile.js new file mode 100644 index 0000000..8ffb0a2 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/takeRightWhile.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('takeRightWhile', require('../takeRightWhile')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/takeWhile.js b/node_modules/sequelize-cli/node_modules/lodash/fp/takeWhile.js new file mode 100644 index 0000000..2813664 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/takeWhile.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('takeWhile', require('../takeWhile')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/tap.js b/node_modules/sequelize-cli/node_modules/lodash/fp/tap.js new file mode 100644 index 0000000..d33ad6e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/tap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('tap', require('../tap')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/template.js b/node_modules/sequelize-cli/node_modules/lodash/fp/template.js new file mode 100644 index 0000000..74857e1 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/template.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('template', require('../template')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/templateSettings.js b/node_modules/sequelize-cli/node_modules/lodash/fp/templateSettings.js new file mode 100644 index 0000000..7bcc0a8 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/templateSettings.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('templateSettings', require('../templateSettings'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/throttle.js b/node_modules/sequelize-cli/node_modules/lodash/fp/throttle.js new file mode 100644 index 0000000..77fff14 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/throttle.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('throttle', require('../throttle')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/thru.js b/node_modules/sequelize-cli/node_modules/lodash/fp/thru.js new file mode 100644 index 0000000..d42b3b1 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/thru.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('thru', require('../thru')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/times.js b/node_modules/sequelize-cli/node_modules/lodash/fp/times.js new file mode 100644 index 0000000..0dab06d --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/times.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('times', require('../times')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/toArray.js b/node_modules/sequelize-cli/node_modules/lodash/fp/toArray.js new file mode 100644 index 0000000..f0c360a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/toArray.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toArray', require('../toArray'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/toFinite.js b/node_modules/sequelize-cli/node_modules/lodash/fp/toFinite.js new file mode 100644 index 0000000..3a47687 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/toFinite.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toFinite', require('../toFinite'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/toInteger.js b/node_modules/sequelize-cli/node_modules/lodash/fp/toInteger.js new file mode 100644 index 0000000..e0af6a7 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/toInteger.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toInteger', require('../toInteger'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/toIterator.js b/node_modules/sequelize-cli/node_modules/lodash/fp/toIterator.js new file mode 100644 index 0000000..65e6baa --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/toIterator.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toIterator', require('../toIterator'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/toJSON.js b/node_modules/sequelize-cli/node_modules/lodash/fp/toJSON.js new file mode 100644 index 0000000..2d718d0 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/toJSON.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toJSON', require('../toJSON'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/toLength.js b/node_modules/sequelize-cli/node_modules/lodash/fp/toLength.js new file mode 100644 index 0000000..b97cdd9 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/toLength.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toLength', require('../toLength'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/toLower.js b/node_modules/sequelize-cli/node_modules/lodash/fp/toLower.js new file mode 100644 index 0000000..616ef36 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/toLower.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toLower', require('../toLower'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/toNumber.js b/node_modules/sequelize-cli/node_modules/lodash/fp/toNumber.js new file mode 100644 index 0000000..d0c6f4d --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/toNumber.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toNumber', require('../toNumber'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/toPairs.js b/node_modules/sequelize-cli/node_modules/lodash/fp/toPairs.js new file mode 100644 index 0000000..af78378 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/toPairs.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toPairs', require('../toPairs'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/toPairsIn.js b/node_modules/sequelize-cli/node_modules/lodash/fp/toPairsIn.js new file mode 100644 index 0000000..66504ab --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/toPairsIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toPairsIn', require('../toPairsIn'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/toPath.js b/node_modules/sequelize-cli/node_modules/lodash/fp/toPath.js new file mode 100644 index 0000000..b4d5e50 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/toPath.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toPath', require('../toPath'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/toPlainObject.js b/node_modules/sequelize-cli/node_modules/lodash/fp/toPlainObject.js new file mode 100644 index 0000000..278bb86 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/toPlainObject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toPlainObject', require('../toPlainObject'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/toSafeInteger.js b/node_modules/sequelize-cli/node_modules/lodash/fp/toSafeInteger.js new file mode 100644 index 0000000..367a26f --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/toSafeInteger.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toSafeInteger', require('../toSafeInteger'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/toString.js b/node_modules/sequelize-cli/node_modules/lodash/fp/toString.js new file mode 100644 index 0000000..cec4f8e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/toString.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toString', require('../toString'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/toUpper.js b/node_modules/sequelize-cli/node_modules/lodash/fp/toUpper.js new file mode 100644 index 0000000..54f9a56 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/toUpper.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toUpper', require('../toUpper'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/transform.js b/node_modules/sequelize-cli/node_modules/lodash/fp/transform.js new file mode 100644 index 0000000..759d088 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/transform.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('transform', require('../transform')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/trim.js b/node_modules/sequelize-cli/node_modules/lodash/fp/trim.js new file mode 100644 index 0000000..e6319a7 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/trim.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('trim', require('../trim')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/trimChars.js b/node_modules/sequelize-cli/node_modules/lodash/fp/trimChars.js new file mode 100644 index 0000000..c9294de --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/trimChars.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('trimChars', require('../trim')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/trimCharsEnd.js b/node_modules/sequelize-cli/node_modules/lodash/fp/trimCharsEnd.js new file mode 100644 index 0000000..284bc2f --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/trimCharsEnd.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('trimCharsEnd', require('../trimEnd')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/trimCharsStart.js b/node_modules/sequelize-cli/node_modules/lodash/fp/trimCharsStart.js new file mode 100644 index 0000000..ff0ee65 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/trimCharsStart.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('trimCharsStart', require('../trimStart')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/trimEnd.js b/node_modules/sequelize-cli/node_modules/lodash/fp/trimEnd.js new file mode 100644 index 0000000..7190880 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/trimEnd.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('trimEnd', require('../trimEnd')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/trimStart.js b/node_modules/sequelize-cli/node_modules/lodash/fp/trimStart.js new file mode 100644 index 0000000..fda902c --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/trimStart.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('trimStart', require('../trimStart')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/truncate.js b/node_modules/sequelize-cli/node_modules/lodash/fp/truncate.js new file mode 100644 index 0000000..d265c1d --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/truncate.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('truncate', require('../truncate')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/unapply.js b/node_modules/sequelize-cli/node_modules/lodash/fp/unapply.js new file mode 100644 index 0000000..c5dfe77 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/unapply.js @@ -0,0 +1 @@ +module.exports = require('./rest'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/unary.js b/node_modules/sequelize-cli/node_modules/lodash/fp/unary.js new file mode 100644 index 0000000..286c945 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/unary.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unary', require('../unary'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/unescape.js b/node_modules/sequelize-cli/node_modules/lodash/fp/unescape.js new file mode 100644 index 0000000..fddcb46 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/unescape.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unescape', require('../unescape'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/union.js b/node_modules/sequelize-cli/node_modules/lodash/fp/union.js new file mode 100644 index 0000000..ef8228d --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/union.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('union', require('../union')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/unionBy.js b/node_modules/sequelize-cli/node_modules/lodash/fp/unionBy.js new file mode 100644 index 0000000..603687a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/unionBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unionBy', require('../unionBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/unionWith.js b/node_modules/sequelize-cli/node_modules/lodash/fp/unionWith.js new file mode 100644 index 0000000..65bb3a7 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/unionWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unionWith', require('../unionWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/uniq.js b/node_modules/sequelize-cli/node_modules/lodash/fp/uniq.js new file mode 100644 index 0000000..bc18524 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/uniq.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('uniq', require('../uniq'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/uniqBy.js b/node_modules/sequelize-cli/node_modules/lodash/fp/uniqBy.js new file mode 100644 index 0000000..634c6a8 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/uniqBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('uniqBy', require('../uniqBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/uniqWith.js b/node_modules/sequelize-cli/node_modules/lodash/fp/uniqWith.js new file mode 100644 index 0000000..0ec601a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/uniqWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('uniqWith', require('../uniqWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/uniqueId.js b/node_modules/sequelize-cli/node_modules/lodash/fp/uniqueId.js new file mode 100644 index 0000000..aa8fc2f --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/uniqueId.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('uniqueId', require('../uniqueId')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/unnest.js b/node_modules/sequelize-cli/node_modules/lodash/fp/unnest.js new file mode 100644 index 0000000..5d34060 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/unnest.js @@ -0,0 +1 @@ +module.exports = require('./flatten'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/unset.js b/node_modules/sequelize-cli/node_modules/lodash/fp/unset.js new file mode 100644 index 0000000..ea203a0 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/unset.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unset', require('../unset')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/unzip.js b/node_modules/sequelize-cli/node_modules/lodash/fp/unzip.js new file mode 100644 index 0000000..cc364b3 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/unzip.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unzip', require('../unzip'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/unzipWith.js b/node_modules/sequelize-cli/node_modules/lodash/fp/unzipWith.js new file mode 100644 index 0000000..182eaa1 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/unzipWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unzipWith', require('../unzipWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/update.js b/node_modules/sequelize-cli/node_modules/lodash/fp/update.js new file mode 100644 index 0000000..b8ce2cc --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/update.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('update', require('../update')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/updateWith.js b/node_modules/sequelize-cli/node_modules/lodash/fp/updateWith.js new file mode 100644 index 0000000..d5e8282 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/updateWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('updateWith', require('../updateWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/upperCase.js b/node_modules/sequelize-cli/node_modules/lodash/fp/upperCase.js new file mode 100644 index 0000000..c886f20 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/upperCase.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('upperCase', require('../upperCase'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/upperFirst.js b/node_modules/sequelize-cli/node_modules/lodash/fp/upperFirst.js new file mode 100644 index 0000000..d8c04df --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/upperFirst.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('upperFirst', require('../upperFirst'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/useWith.js b/node_modules/sequelize-cli/node_modules/lodash/fp/useWith.js new file mode 100644 index 0000000..d8b3df5 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/useWith.js @@ -0,0 +1 @@ +module.exports = require('./overArgs'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/util.js b/node_modules/sequelize-cli/node_modules/lodash/fp/util.js new file mode 100644 index 0000000..18c00ba --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/util.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../util')); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/value.js b/node_modules/sequelize-cli/node_modules/lodash/fp/value.js new file mode 100644 index 0000000..555eec7 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/value.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('value', require('../value'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/valueOf.js b/node_modules/sequelize-cli/node_modules/lodash/fp/valueOf.js new file mode 100644 index 0000000..f968807 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/valueOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('valueOf', require('../valueOf'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/values.js b/node_modules/sequelize-cli/node_modules/lodash/fp/values.js new file mode 100644 index 0000000..2dfc561 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/values.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('values', require('../values'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/valuesIn.js b/node_modules/sequelize-cli/node_modules/lodash/fp/valuesIn.js new file mode 100644 index 0000000..a1b2bb8 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/valuesIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('valuesIn', require('../valuesIn'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/where.js b/node_modules/sequelize-cli/node_modules/lodash/fp/where.js new file mode 100644 index 0000000..3247f64 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/where.js @@ -0,0 +1 @@ +module.exports = require('./conformsTo'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/whereEq.js b/node_modules/sequelize-cli/node_modules/lodash/fp/whereEq.js new file mode 100644 index 0000000..29d1e1e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/whereEq.js @@ -0,0 +1 @@ +module.exports = require('./isMatch'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/without.js b/node_modules/sequelize-cli/node_modules/lodash/fp/without.js new file mode 100644 index 0000000..bad9e12 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/without.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('without', require('../without')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/words.js b/node_modules/sequelize-cli/node_modules/lodash/fp/words.js new file mode 100644 index 0000000..4a90141 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/words.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('words', require('../words')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/wrap.js b/node_modules/sequelize-cli/node_modules/lodash/fp/wrap.js new file mode 100644 index 0000000..e93bd8a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/wrap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('wrap', require('../wrap')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/wrapperAt.js b/node_modules/sequelize-cli/node_modules/lodash/fp/wrapperAt.js new file mode 100644 index 0000000..8f0a310 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/wrapperAt.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('wrapperAt', require('../wrapperAt'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/wrapperChain.js b/node_modules/sequelize-cli/node_modules/lodash/fp/wrapperChain.js new file mode 100644 index 0000000..2a48ea2 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/wrapperChain.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('wrapperChain', require('../wrapperChain'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/wrapperLodash.js b/node_modules/sequelize-cli/node_modules/lodash/fp/wrapperLodash.js new file mode 100644 index 0000000..a7162d0 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/wrapperLodash.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('wrapperLodash', require('../wrapperLodash'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/wrapperReverse.js b/node_modules/sequelize-cli/node_modules/lodash/fp/wrapperReverse.js new file mode 100644 index 0000000..e1481aa --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/wrapperReverse.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('wrapperReverse', require('../wrapperReverse'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/wrapperValue.js b/node_modules/sequelize-cli/node_modules/lodash/fp/wrapperValue.js new file mode 100644 index 0000000..8eb9112 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/wrapperValue.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('wrapperValue', require('../wrapperValue'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/xor.js b/node_modules/sequelize-cli/node_modules/lodash/fp/xor.js new file mode 100644 index 0000000..29e2819 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/xor.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('xor', require('../xor')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/xorBy.js b/node_modules/sequelize-cli/node_modules/lodash/fp/xorBy.js new file mode 100644 index 0000000..b355686 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/xorBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('xorBy', require('../xorBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/xorWith.js b/node_modules/sequelize-cli/node_modules/lodash/fp/xorWith.js new file mode 100644 index 0000000..8e05739 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/xorWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('xorWith', require('../xorWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/zip.js b/node_modules/sequelize-cli/node_modules/lodash/fp/zip.js new file mode 100644 index 0000000..69e147a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/zip.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('zip', require('../zip')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/zipAll.js b/node_modules/sequelize-cli/node_modules/lodash/fp/zipAll.js new file mode 100644 index 0000000..efa8ccb --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/zipAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('zipAll', require('../zip')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/zipObj.js b/node_modules/sequelize-cli/node_modules/lodash/fp/zipObj.js new file mode 100644 index 0000000..f4a3453 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/zipObj.js @@ -0,0 +1 @@ +module.exports = require('./zipObject'); diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/zipObject.js b/node_modules/sequelize-cli/node_modules/lodash/fp/zipObject.js new file mode 100644 index 0000000..462dbb6 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/zipObject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('zipObject', require('../zipObject')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/zipObjectDeep.js b/node_modules/sequelize-cli/node_modules/lodash/fp/zipObjectDeep.js new file mode 100644 index 0000000..53a5d33 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/zipObjectDeep.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('zipObjectDeep', require('../zipObjectDeep')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fp/zipWith.js b/node_modules/sequelize-cli/node_modules/lodash/fp/zipWith.js new file mode 100644 index 0000000..c5cf9e2 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fp/zipWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('zipWith', require('../zipWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/sequelize-cli/node_modules/lodash/fromPairs.js b/node_modules/sequelize-cli/node_modules/lodash/fromPairs.js new file mode 100644 index 0000000..ee7940d --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/fromPairs.js @@ -0,0 +1,28 @@ +/** + * The inverse of `_.toPairs`; this method returns an object composed + * from key-value `pairs`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} pairs The key-value pairs. + * @returns {Object} Returns the new object. + * @example + * + * _.fromPairs([['a', 1], ['b', 2]]); + * // => { 'a': 1, 'b': 2 } + */ +function fromPairs(pairs) { + var index = -1, + length = pairs == null ? 0 : pairs.length, + result = {}; + + while (++index < length) { + var pair = pairs[index]; + result[pair[0]] = pair[1]; + } + return result; +} + +module.exports = fromPairs; diff --git a/node_modules/sequelize-cli/node_modules/lodash/function.js b/node_modules/sequelize-cli/node_modules/lodash/function.js new file mode 100644 index 0000000..b0fc6d9 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/function.js @@ -0,0 +1,25 @@ +module.exports = { + 'after': require('./after'), + 'ary': require('./ary'), + 'before': require('./before'), + 'bind': require('./bind'), + 'bindKey': require('./bindKey'), + 'curry': require('./curry'), + 'curryRight': require('./curryRight'), + 'debounce': require('./debounce'), + 'defer': require('./defer'), + 'delay': require('./delay'), + 'flip': require('./flip'), + 'memoize': require('./memoize'), + 'negate': require('./negate'), + 'once': require('./once'), + 'overArgs': require('./overArgs'), + 'partial': require('./partial'), + 'partialRight': require('./partialRight'), + 'rearg': require('./rearg'), + 'rest': require('./rest'), + 'spread': require('./spread'), + 'throttle': require('./throttle'), + 'unary': require('./unary'), + 'wrap': require('./wrap') +}; diff --git a/node_modules/sequelize-cli/node_modules/lodash/functions.js b/node_modules/sequelize-cli/node_modules/lodash/functions.js new file mode 100644 index 0000000..9722928 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/functions.js @@ -0,0 +1,31 @@ +var baseFunctions = require('./_baseFunctions'), + keys = require('./keys'); + +/** + * Creates an array of function property names from own enumerable properties + * of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functionsIn + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functions(new Foo); + * // => ['a', 'b'] + */ +function functions(object) { + return object == null ? [] : baseFunctions(object, keys(object)); +} + +module.exports = functions; diff --git a/node_modules/sequelize-cli/node_modules/lodash/functionsIn.js b/node_modules/sequelize-cli/node_modules/lodash/functionsIn.js new file mode 100644 index 0000000..f00345d --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/functionsIn.js @@ -0,0 +1,31 @@ +var baseFunctions = require('./_baseFunctions'), + keysIn = require('./keysIn'); + +/** + * Creates an array of function property names from own and inherited + * enumerable properties of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functions + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functionsIn(new Foo); + * // => ['a', 'b', 'c'] + */ +function functionsIn(object) { + return object == null ? [] : baseFunctions(object, keysIn(object)); +} + +module.exports = functionsIn; diff --git a/node_modules/sequelize-cli/node_modules/lodash/get.js b/node_modules/sequelize-cli/node_modules/lodash/get.js new file mode 100644 index 0000000..8805ff9 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/get.js @@ -0,0 +1,33 @@ +var baseGet = require('./_baseGet'); + +/** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ +function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, path); + return result === undefined ? defaultValue : result; +} + +module.exports = get; diff --git a/node_modules/sequelize-cli/node_modules/lodash/groupBy.js b/node_modules/sequelize-cli/node_modules/lodash/groupBy.js new file mode 100644 index 0000000..babf4f6 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/groupBy.js @@ -0,0 +1,41 @@ +var baseAssignValue = require('./_baseAssignValue'), + createAggregator = require('./_createAggregator'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The order of grouped values + * is determined by the order they occur in `collection`. The corresponding + * value of each key is an array of elements responsible for generating the + * key. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': [4.2], '6': [6.1, 6.3] } + * + * // The `_.property` iteratee shorthand. + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ +var groupBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + result[key].push(value); + } else { + baseAssignValue(result, key, [value]); + } +}); + +module.exports = groupBy; diff --git a/node_modules/sequelize-cli/node_modules/lodash/gt.js b/node_modules/sequelize-cli/node_modules/lodash/gt.js new file mode 100644 index 0000000..3a66282 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/gt.js @@ -0,0 +1,29 @@ +var baseGt = require('./_baseGt'), + createRelationalOperation = require('./_createRelationalOperation'); + +/** + * Checks if `value` is greater than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + * @see _.lt + * @example + * + * _.gt(3, 1); + * // => true + * + * _.gt(3, 3); + * // => false + * + * _.gt(1, 3); + * // => false + */ +var gt = createRelationalOperation(baseGt); + +module.exports = gt; diff --git a/node_modules/sequelize-cli/node_modules/lodash/gte.js b/node_modules/sequelize-cli/node_modules/lodash/gte.js new file mode 100644 index 0000000..4180a68 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/gte.js @@ -0,0 +1,30 @@ +var createRelationalOperation = require('./_createRelationalOperation'); + +/** + * Checks if `value` is greater than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than or equal to + * `other`, else `false`. + * @see _.lte + * @example + * + * _.gte(3, 1); + * // => true + * + * _.gte(3, 3); + * // => true + * + * _.gte(1, 3); + * // => false + */ +var gte = createRelationalOperation(function(value, other) { + return value >= other; +}); + +module.exports = gte; diff --git a/node_modules/sequelize-cli/node_modules/lodash/has.js b/node_modules/sequelize-cli/node_modules/lodash/has.js new file mode 100644 index 0000000..34df55e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/has.js @@ -0,0 +1,35 @@ +var baseHas = require('./_baseHas'), + hasPath = require('./_hasPath'); + +/** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ +function has(object, path) { + return object != null && hasPath(object, path, baseHas); +} + +module.exports = has; diff --git a/node_modules/sequelize-cli/node_modules/lodash/hasIn.js b/node_modules/sequelize-cli/node_modules/lodash/hasIn.js new file mode 100644 index 0000000..06a3686 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/hasIn.js @@ -0,0 +1,34 @@ +var baseHasIn = require('./_baseHasIn'), + hasPath = require('./_hasPath'); + +/** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ +function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); +} + +module.exports = hasIn; diff --git a/node_modules/sequelize-cli/node_modules/lodash/head.js b/node_modules/sequelize-cli/node_modules/lodash/head.js new file mode 100644 index 0000000..dee9d1f --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/head.js @@ -0,0 +1,23 @@ +/** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias first + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.head([1, 2, 3]); + * // => 1 + * + * _.head([]); + * // => undefined + */ +function head(array) { + return (array && array.length) ? array[0] : undefined; +} + +module.exports = head; diff --git a/node_modules/sequelize-cli/node_modules/lodash/identity.js b/node_modules/sequelize-cli/node_modules/lodash/identity.js new file mode 100644 index 0000000..2d5d963 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/identity.js @@ -0,0 +1,21 @@ +/** + * This method returns the first argument it receives. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'a': 1 }; + * + * console.log(_.identity(object) === object); + * // => true + */ +function identity(value) { + return value; +} + +module.exports = identity; diff --git a/node_modules/sequelize-cli/node_modules/lodash/inRange.js b/node_modules/sequelize-cli/node_modules/lodash/inRange.js new file mode 100644 index 0000000..f20728d --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/inRange.js @@ -0,0 +1,55 @@ +var baseInRange = require('./_baseInRange'), + toFinite = require('./toFinite'), + toNumber = require('./toNumber'); + +/** + * Checks if `n` is between `start` and up to, but not including, `end`. If + * `end` is not specified, it's set to `start` with `start` then set to `0`. + * If `start` is greater than `end` the params are swapped to support + * negative ranges. + * + * @static + * @memberOf _ + * @since 3.3.0 + * @category Number + * @param {number} number The number to check. + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + * @see _.range, _.rangeRight + * @example + * + * _.inRange(3, 2, 4); + * // => true + * + * _.inRange(4, 8); + * // => true + * + * _.inRange(4, 2); + * // => false + * + * _.inRange(2, 2); + * // => false + * + * _.inRange(1.2, 2); + * // => true + * + * _.inRange(5.2, 4); + * // => false + * + * _.inRange(-3, -2, -6); + * // => true + */ +function inRange(number, start, end) { + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + number = toNumber(number); + return baseInRange(number, start, end); +} + +module.exports = inRange; diff --git a/node_modules/sequelize-cli/node_modules/lodash/includes.js b/node_modules/sequelize-cli/node_modules/lodash/includes.js new file mode 100644 index 0000000..ae0deed --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/includes.js @@ -0,0 +1,53 @@ +var baseIndexOf = require('./_baseIndexOf'), + isArrayLike = require('./isArrayLike'), + isString = require('./isString'), + toInteger = require('./toInteger'), + values = require('./values'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Checks if `value` is in `collection`. If `collection` is a string, it's + * checked for a substring of `value`, otherwise + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * is used for equality comparisons. If `fromIndex` is negative, it's used as + * the offset from the end of `collection`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {boolean} Returns `true` if `value` is found, else `false`. + * @example + * + * _.includes([1, 2, 3], 1); + * // => true + * + * _.includes([1, 2, 3], 1, 2); + * // => false + * + * _.includes({ 'a': 1, 'b': 2 }, 1); + * // => true + * + * _.includes('abcd', 'bc'); + * // => true + */ +function includes(collection, value, fromIndex, guard) { + collection = isArrayLike(collection) ? collection : values(collection); + fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; + + var length = collection.length; + if (fromIndex < 0) { + fromIndex = nativeMax(length + fromIndex, 0); + } + return isString(collection) + ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) + : (!!length && baseIndexOf(collection, value, fromIndex) > -1); +} + +module.exports = includes; diff --git a/node_modules/sequelize-cli/node_modules/lodash/index.js b/node_modules/sequelize-cli/node_modules/lodash/index.js new file mode 100644 index 0000000..5d063e2 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/index.js @@ -0,0 +1 @@ +module.exports = require('./lodash'); \ No newline at end of file diff --git a/node_modules/sequelize-cli/node_modules/lodash/indexOf.js b/node_modules/sequelize-cli/node_modules/lodash/indexOf.js new file mode 100644 index 0000000..3c644af --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/indexOf.js @@ -0,0 +1,42 @@ +var baseIndexOf = require('./_baseIndexOf'), + toInteger = require('./toInteger'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the + * offset from the end of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // Search from the `fromIndex`. + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + */ +function indexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseIndexOf(array, value, index); +} + +module.exports = indexOf; diff --git a/node_modules/sequelize-cli/node_modules/lodash/initial.js b/node_modules/sequelize-cli/node_modules/lodash/initial.js new file mode 100644 index 0000000..f47fc50 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/initial.js @@ -0,0 +1,22 @@ +var baseSlice = require('./_baseSlice'); + +/** + * Gets all but the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + */ +function initial(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 0, -1) : []; +} + +module.exports = initial; diff --git a/node_modules/sequelize-cli/node_modules/lodash/intersection.js b/node_modules/sequelize-cli/node_modules/lodash/intersection.js new file mode 100644 index 0000000..a94c135 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/intersection.js @@ -0,0 +1,30 @@ +var arrayMap = require('./_arrayMap'), + baseIntersection = require('./_baseIntersection'), + baseRest = require('./_baseRest'), + castArrayLikeObject = require('./_castArrayLikeObject'); + +/** + * Creates an array of unique values that are included in all given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersection([2, 1], [2, 3]); + * // => [2] + */ +var intersection = baseRest(function(arrays) { + var mapped = arrayMap(arrays, castArrayLikeObject); + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped) + : []; +}); + +module.exports = intersection; diff --git a/node_modules/sequelize-cli/node_modules/lodash/intersectionBy.js b/node_modules/sequelize-cli/node_modules/lodash/intersectionBy.js new file mode 100644 index 0000000..31461aa --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/intersectionBy.js @@ -0,0 +1,45 @@ +var arrayMap = require('./_arrayMap'), + baseIntersection = require('./_baseIntersection'), + baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'), + castArrayLikeObject = require('./_castArrayLikeObject'), + last = require('./last'); + +/** + * This method is like `_.intersection` except that it accepts `iteratee` + * which is invoked for each element of each `arrays` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [2.1] + * + * // The `_.property` iteratee shorthand. + * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }] + */ +var intersectionBy = baseRest(function(arrays) { + var iteratee = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + if (iteratee === last(mapped)) { + iteratee = undefined; + } else { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, baseIteratee(iteratee, 2)) + : []; +}); + +module.exports = intersectionBy; diff --git a/node_modules/sequelize-cli/node_modules/lodash/intersectionWith.js b/node_modules/sequelize-cli/node_modules/lodash/intersectionWith.js new file mode 100644 index 0000000..63cabfa --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/intersectionWith.js @@ -0,0 +1,41 @@ +var arrayMap = require('./_arrayMap'), + baseIntersection = require('./_baseIntersection'), + baseRest = require('./_baseRest'), + castArrayLikeObject = require('./_castArrayLikeObject'), + last = require('./last'); + +/** + * This method is like `_.intersection` except that it accepts `comparator` + * which is invoked to compare elements of `arrays`. The order and references + * of result values are determined by the first array. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.intersectionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }] + */ +var intersectionWith = baseRest(function(arrays) { + var comparator = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + comparator = typeof comparator == 'function' ? comparator : undefined; + if (comparator) { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, undefined, comparator) + : []; +}); + +module.exports = intersectionWith; diff --git a/node_modules/sequelize-cli/node_modules/lodash/invert.js b/node_modules/sequelize-cli/node_modules/lodash/invert.js new file mode 100644 index 0000000..21d10ab --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/invert.js @@ -0,0 +1,27 @@ +var constant = require('./constant'), + createInverter = require('./_createInverter'), + identity = require('./identity'); + +/** + * Creates an object composed of the inverted keys and values of `object`. + * If `object` contains duplicate values, subsequent values overwrite + * property assignments of previous values. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Object + * @param {Object} object The object to invert. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invert(object); + * // => { '1': 'c', '2': 'b' } + */ +var invert = createInverter(function(result, value, key) { + result[value] = key; +}, constant(identity)); + +module.exports = invert; diff --git a/node_modules/sequelize-cli/node_modules/lodash/invertBy.js b/node_modules/sequelize-cli/node_modules/lodash/invertBy.js new file mode 100644 index 0000000..e5ba0f7 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/invertBy.js @@ -0,0 +1,44 @@ +var baseIteratee = require('./_baseIteratee'), + createInverter = require('./_createInverter'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * This method is like `_.invert` except that the inverted object is generated + * from the results of running each element of `object` thru `iteratee`. The + * corresponding inverted value of each inverted key is an array of keys + * responsible for generating the inverted value. The iteratee is invoked + * with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Object + * @param {Object} object The object to invert. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invertBy(object); + * // => { '1': ['a', 'c'], '2': ['b'] } + * + * _.invertBy(object, function(value) { + * return 'group' + value; + * }); + * // => { 'group1': ['a', 'c'], 'group2': ['b'] } + */ +var invertBy = createInverter(function(result, value, key) { + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } +}, baseIteratee); + +module.exports = invertBy; diff --git a/node_modules/sequelize-cli/node_modules/lodash/invoke.js b/node_modules/sequelize-cli/node_modules/lodash/invoke.js new file mode 100644 index 0000000..97d51eb --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/invoke.js @@ -0,0 +1,24 @@ +var baseInvoke = require('./_baseInvoke'), + baseRest = require('./_baseRest'); + +/** + * Invokes the method at `path` of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + * @example + * + * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }; + * + * _.invoke(object, 'a[0].b.c.slice', 1, 3); + * // => [2, 3] + */ +var invoke = baseRest(baseInvoke); + +module.exports = invoke; diff --git a/node_modules/sequelize-cli/node_modules/lodash/invokeMap.js b/node_modules/sequelize-cli/node_modules/lodash/invokeMap.js new file mode 100644 index 0000000..8da5126 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/invokeMap.js @@ -0,0 +1,41 @@ +var apply = require('./_apply'), + baseEach = require('./_baseEach'), + baseInvoke = require('./_baseInvoke'), + baseRest = require('./_baseRest'), + isArrayLike = require('./isArrayLike'); + +/** + * Invokes the method at `path` of each element in `collection`, returning + * an array of the results of each invoked method. Any additional arguments + * are provided to each invoked method. If `path` is a function, it's invoked + * for, and `this` bound to, each element in `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array|Function|string} path The path of the method to invoke or + * the function invoked per iteration. + * @param {...*} [args] The arguments to invoke each method with. + * @returns {Array} Returns the array of results. + * @example + * + * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invokeMap([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ +var invokeMap = baseRest(function(collection, path, args) { + var index = -1, + isFunc = typeof path == 'function', + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value) { + result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); + }); + return result; +}); + +module.exports = invokeMap; diff --git a/node_modules/sequelize-cli/node_modules/lodash/isArguments.js b/node_modules/sequelize-cli/node_modules/lodash/isArguments.js new file mode 100644 index 0000000..8b9ed66 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/isArguments.js @@ -0,0 +1,36 @@ +var baseIsArguments = require('./_baseIsArguments'), + isObjectLike = require('./isObjectLike'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); +}; + +module.exports = isArguments; diff --git a/node_modules/sequelize-cli/node_modules/lodash/isArray.js b/node_modules/sequelize-cli/node_modules/lodash/isArray.js new file mode 100644 index 0000000..88ab55f --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/isArray.js @@ -0,0 +1,26 @@ +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +module.exports = isArray; diff --git a/node_modules/sequelize-cli/node_modules/lodash/isArrayBuffer.js b/node_modules/sequelize-cli/node_modules/lodash/isArrayBuffer.js new file mode 100644 index 0000000..12904a6 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/isArrayBuffer.js @@ -0,0 +1,27 @@ +var baseIsArrayBuffer = require('./_baseIsArrayBuffer'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer; + +/** + * Checks if `value` is classified as an `ArrayBuffer` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + * @example + * + * _.isArrayBuffer(new ArrayBuffer(2)); + * // => true + * + * _.isArrayBuffer(new Array(2)); + * // => false + */ +var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; + +module.exports = isArrayBuffer; diff --git a/node_modules/sequelize-cli/node_modules/lodash/isArrayLike.js b/node_modules/sequelize-cli/node_modules/lodash/isArrayLike.js new file mode 100644 index 0000000..0f96680 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/isArrayLike.js @@ -0,0 +1,33 @@ +var isFunction = require('./isFunction'), + isLength = require('./isLength'); + +/** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ +function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); +} + +module.exports = isArrayLike; diff --git a/node_modules/sequelize-cli/node_modules/lodash/isArrayLikeObject.js b/node_modules/sequelize-cli/node_modules/lodash/isArrayLikeObject.js new file mode 100644 index 0000000..6c4812a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/isArrayLikeObject.js @@ -0,0 +1,33 @@ +var isArrayLike = require('./isArrayLike'), + isObjectLike = require('./isObjectLike'); + +/** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ +function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); +} + +module.exports = isArrayLikeObject; diff --git a/node_modules/sequelize-cli/node_modules/lodash/isBoolean.js b/node_modules/sequelize-cli/node_modules/lodash/isBoolean.js new file mode 100644 index 0000000..a43ed4b --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/isBoolean.js @@ -0,0 +1,29 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]'; + +/** + * Checks if `value` is classified as a boolean primitive or object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. + * @example + * + * _.isBoolean(false); + * // => true + * + * _.isBoolean(null); + * // => false + */ +function isBoolean(value) { + return value === true || value === false || + (isObjectLike(value) && baseGetTag(value) == boolTag); +} + +module.exports = isBoolean; diff --git a/node_modules/sequelize-cli/node_modules/lodash/isBuffer.js b/node_modules/sequelize-cli/node_modules/lodash/isBuffer.js new file mode 100644 index 0000000..c103cc7 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/isBuffer.js @@ -0,0 +1,38 @@ +var root = require('./_root'), + stubFalse = require('./stubFalse'); + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; + +/** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ +var isBuffer = nativeIsBuffer || stubFalse; + +module.exports = isBuffer; diff --git a/node_modules/sequelize-cli/node_modules/lodash/isDate.js b/node_modules/sequelize-cli/node_modules/lodash/isDate.js new file mode 100644 index 0000000..7f0209f --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/isDate.js @@ -0,0 +1,27 @@ +var baseIsDate = require('./_baseIsDate'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsDate = nodeUtil && nodeUtil.isDate; + +/** + * Checks if `value` is classified as a `Date` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + * + * _.isDate('Mon April 23 2012'); + * // => false + */ +var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; + +module.exports = isDate; diff --git a/node_modules/sequelize-cli/node_modules/lodash/isElement.js b/node_modules/sequelize-cli/node_modules/lodash/isElement.js new file mode 100644 index 0000000..76ae29c --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/isElement.js @@ -0,0 +1,25 @@ +var isObjectLike = require('./isObjectLike'), + isPlainObject = require('./isPlainObject'); + +/** + * Checks if `value` is likely a DOM element. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. + * @example + * + * _.isElement(document.body); + * // => true + * + * _.isElement(''); + * // => false + */ +function isElement(value) { + return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); +} + +module.exports = isElement; diff --git a/node_modules/sequelize-cli/node_modules/lodash/isEmpty.js b/node_modules/sequelize-cli/node_modules/lodash/isEmpty.js new file mode 100644 index 0000000..3597294 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/isEmpty.js @@ -0,0 +1,77 @@ +var baseKeys = require('./_baseKeys'), + getTag = require('./_getTag'), + isArguments = require('./isArguments'), + isArray = require('./isArray'), + isArrayLike = require('./isArrayLike'), + isBuffer = require('./isBuffer'), + isPrototype = require('./_isPrototype'), + isTypedArray = require('./isTypedArray'); + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + setTag = '[object Set]'; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Checks if `value` is an empty object, collection, map, or set. + * + * Objects are considered empty if they have no own enumerable string keyed + * properties. + * + * Array-like values such as `arguments` objects, arrays, buffers, strings, or + * jQuery-like collections are considered empty if they have a `length` of `0`. + * Similarly, maps and sets are considered empty if they have a `size` of `0`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ +function isEmpty(value) { + if (value == null) { + return true; + } + if (isArrayLike(value) && + (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || + isBuffer(value) || isTypedArray(value) || isArguments(value))) { + return !value.length; + } + var tag = getTag(value); + if (tag == mapTag || tag == setTag) { + return !value.size; + } + if (isPrototype(value)) { + return !baseKeys(value).length; + } + for (var key in value) { + if (hasOwnProperty.call(value, key)) { + return false; + } + } + return true; +} + +module.exports = isEmpty; diff --git a/node_modules/sequelize-cli/node_modules/lodash/isEqual.js b/node_modules/sequelize-cli/node_modules/lodash/isEqual.js new file mode 100644 index 0000000..5e23e76 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/isEqual.js @@ -0,0 +1,35 @@ +var baseIsEqual = require('./_baseIsEqual'); + +/** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are compared by strict equality, i.e. `===`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ +function isEqual(value, other) { + return baseIsEqual(value, other); +} + +module.exports = isEqual; diff --git a/node_modules/sequelize-cli/node_modules/lodash/isEqualWith.js b/node_modules/sequelize-cli/node_modules/lodash/isEqualWith.js new file mode 100644 index 0000000..21bdc7f --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/isEqualWith.js @@ -0,0 +1,41 @@ +var baseIsEqual = require('./_baseIsEqual'); + +/** + * This method is like `_.isEqual` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with up to + * six arguments: (objValue, othValue [, index|key, object, other, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, othValue) { + * if (isGreeting(objValue) && isGreeting(othValue)) { + * return true; + * } + * } + * + * var array = ['hello', 'goodbye']; + * var other = ['hi', 'goodbye']; + * + * _.isEqualWith(array, other, customizer); + * // => true + */ +function isEqualWith(value, other, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + var result = customizer ? customizer(value, other) : undefined; + return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; +} + +module.exports = isEqualWith; diff --git a/node_modules/sequelize-cli/node_modules/lodash/isError.js b/node_modules/sequelize-cli/node_modules/lodash/isError.js new file mode 100644 index 0000000..b4f41e0 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/isError.js @@ -0,0 +1,36 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'), + isPlainObject = require('./isPlainObject'); + +/** `Object#toString` result references. */ +var domExcTag = '[object DOMException]', + errorTag = '[object Error]'; + +/** + * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, + * `SyntaxError`, `TypeError`, or `URIError` object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an error object, else `false`. + * @example + * + * _.isError(new Error); + * // => true + * + * _.isError(Error); + * // => false + */ +function isError(value) { + if (!isObjectLike(value)) { + return false; + } + var tag = baseGetTag(value); + return tag == errorTag || tag == domExcTag || + (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)); +} + +module.exports = isError; diff --git a/node_modules/sequelize-cli/node_modules/lodash/isFinite.js b/node_modules/sequelize-cli/node_modules/lodash/isFinite.js new file mode 100644 index 0000000..601842b --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/isFinite.js @@ -0,0 +1,36 @@ +var root = require('./_root'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsFinite = root.isFinite; + +/** + * Checks if `value` is a finite primitive number. + * + * **Note:** This method is based on + * [`Number.isFinite`](https://mdn.io/Number/isFinite). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. + * @example + * + * _.isFinite(3); + * // => true + * + * _.isFinite(Number.MIN_VALUE); + * // => true + * + * _.isFinite(Infinity); + * // => false + * + * _.isFinite('3'); + * // => false + */ +function isFinite(value) { + return typeof value == 'number' && nativeIsFinite(value); +} + +module.exports = isFinite; diff --git a/node_modules/sequelize-cli/node_modules/lodash/isFunction.js b/node_modules/sequelize-cli/node_modules/lodash/isFunction.js new file mode 100644 index 0000000..907a8cd --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/isFunction.js @@ -0,0 +1,37 @@ +var baseGetTag = require('./_baseGetTag'), + isObject = require('./isObject'); + +/** `Object#toString` result references. */ +var asyncTag = '[object AsyncFunction]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + proxyTag = '[object Proxy]'; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; +} + +module.exports = isFunction; diff --git a/node_modules/sequelize-cli/node_modules/lodash/isInteger.js b/node_modules/sequelize-cli/node_modules/lodash/isInteger.js new file mode 100644 index 0000000..66aa87d --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/isInteger.js @@ -0,0 +1,33 @@ +var toInteger = require('./toInteger'); + +/** + * Checks if `value` is an integer. + * + * **Note:** This method is based on + * [`Number.isInteger`](https://mdn.io/Number/isInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an integer, else `false`. + * @example + * + * _.isInteger(3); + * // => true + * + * _.isInteger(Number.MIN_VALUE); + * // => false + * + * _.isInteger(Infinity); + * // => false + * + * _.isInteger('3'); + * // => false + */ +function isInteger(value) { + return typeof value == 'number' && value == toInteger(value); +} + +module.exports = isInteger; diff --git a/node_modules/sequelize-cli/node_modules/lodash/isLength.js b/node_modules/sequelize-cli/node_modules/lodash/isLength.js new file mode 100644 index 0000000..3a95caa --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/isLength.js @@ -0,0 +1,35 @@ +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +module.exports = isLength; diff --git a/node_modules/sequelize-cli/node_modules/lodash/isMap.js b/node_modules/sequelize-cli/node_modules/lodash/isMap.js new file mode 100644 index 0000000..44f8517 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/isMap.js @@ -0,0 +1,27 @@ +var baseIsMap = require('./_baseIsMap'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsMap = nodeUtil && nodeUtil.isMap; + +/** + * Checks if `value` is classified as a `Map` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @example + * + * _.isMap(new Map); + * // => true + * + * _.isMap(new WeakMap); + * // => false + */ +var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; + +module.exports = isMap; diff --git a/node_modules/sequelize-cli/node_modules/lodash/isMatch.js b/node_modules/sequelize-cli/node_modules/lodash/isMatch.js new file mode 100644 index 0000000..9773a18 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/isMatch.js @@ -0,0 +1,36 @@ +var baseIsMatch = require('./_baseIsMatch'), + getMatchData = require('./_getMatchData'); + +/** + * Performs a partial deep comparison between `object` and `source` to + * determine if `object` contains equivalent property values. + * + * **Note:** This method is equivalent to `_.matches` when `source` is + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.isMatch(object, { 'b': 2 }); + * // => true + * + * _.isMatch(object, { 'b': 1 }); + * // => false + */ +function isMatch(object, source) { + return object === source || baseIsMatch(object, source, getMatchData(source)); +} + +module.exports = isMatch; diff --git a/node_modules/sequelize-cli/node_modules/lodash/isMatchWith.js b/node_modules/sequelize-cli/node_modules/lodash/isMatchWith.js new file mode 100644 index 0000000..187b6a6 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/isMatchWith.js @@ -0,0 +1,41 @@ +var baseIsMatch = require('./_baseIsMatch'), + getMatchData = require('./_getMatchData'); + +/** + * This method is like `_.isMatch` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with five + * arguments: (objValue, srcValue, index|key, object, source). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, srcValue) { + * if (isGreeting(objValue) && isGreeting(srcValue)) { + * return true; + * } + * } + * + * var object = { 'greeting': 'hello' }; + * var source = { 'greeting': 'hi' }; + * + * _.isMatchWith(object, source, customizer); + * // => true + */ +function isMatchWith(object, source, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseIsMatch(object, source, getMatchData(source), customizer); +} + +module.exports = isMatchWith; diff --git a/node_modules/sequelize-cli/node_modules/lodash/isNaN.js b/node_modules/sequelize-cli/node_modules/lodash/isNaN.js new file mode 100644 index 0000000..7d0d783 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/isNaN.js @@ -0,0 +1,38 @@ +var isNumber = require('./isNumber'); + +/** + * Checks if `value` is `NaN`. + * + * **Note:** This method is based on + * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as + * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for + * `undefined` and other non-number values. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ +function isNaN(value) { + // An `NaN` primitive is the only value that is not equal to itself. + // Perform the `toStringTag` check first to avoid errors with some + // ActiveX objects in IE. + return isNumber(value) && value != +value; +} + +module.exports = isNaN; diff --git a/node_modules/sequelize-cli/node_modules/lodash/isNative.js b/node_modules/sequelize-cli/node_modules/lodash/isNative.js new file mode 100644 index 0000000..f0cb8d5 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/isNative.js @@ -0,0 +1,40 @@ +var baseIsNative = require('./_baseIsNative'), + isMaskable = require('./_isMaskable'); + +/** Error message constants. */ +var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.'; + +/** + * Checks if `value` is a pristine native function. + * + * **Note:** This method can't reliably detect native functions in the presence + * of the core-js package because core-js circumvents this kind of detection. + * Despite multiple requests, the core-js maintainer has made it clear: any + * attempt to fix the detection will be obstructed. As a result, we're left + * with little choice but to throw an error. Unfortunately, this also affects + * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), + * which rely on core-js. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ +function isNative(value) { + if (isMaskable(value)) { + throw new Error(CORE_ERROR_TEXT); + } + return baseIsNative(value); +} + +module.exports = isNative; diff --git a/node_modules/sequelize-cli/node_modules/lodash/isNil.js b/node_modules/sequelize-cli/node_modules/lodash/isNil.js new file mode 100644 index 0000000..79f0505 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/isNil.js @@ -0,0 +1,25 @@ +/** + * Checks if `value` is `null` or `undefined`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is nullish, else `false`. + * @example + * + * _.isNil(null); + * // => true + * + * _.isNil(void 0); + * // => true + * + * _.isNil(NaN); + * // => false + */ +function isNil(value) { + return value == null; +} + +module.exports = isNil; diff --git a/node_modules/sequelize-cli/node_modules/lodash/isNull.js b/node_modules/sequelize-cli/node_modules/lodash/isNull.js new file mode 100644 index 0000000..c0a374d --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/isNull.js @@ -0,0 +1,22 @@ +/** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(void 0); + * // => false + */ +function isNull(value) { + return value === null; +} + +module.exports = isNull; diff --git a/node_modules/sequelize-cli/node_modules/lodash/isNumber.js b/node_modules/sequelize-cli/node_modules/lodash/isNumber.js new file mode 100644 index 0000000..cd34ee4 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/isNumber.js @@ -0,0 +1,38 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var numberTag = '[object Number]'; + +/** + * Checks if `value` is classified as a `Number` primitive or object. + * + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are + * classified as numbers, use the `_.isFinite` method. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. + * @example + * + * _.isNumber(3); + * // => true + * + * _.isNumber(Number.MIN_VALUE); + * // => true + * + * _.isNumber(Infinity); + * // => true + * + * _.isNumber('3'); + * // => false + */ +function isNumber(value) { + return typeof value == 'number' || + (isObjectLike(value) && baseGetTag(value) == numberTag); +} + +module.exports = isNumber; diff --git a/node_modules/sequelize-cli/node_modules/lodash/isObject.js b/node_modules/sequelize-cli/node_modules/lodash/isObject.js new file mode 100644 index 0000000..1dc8939 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/isObject.js @@ -0,0 +1,31 @@ +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); +} + +module.exports = isObject; diff --git a/node_modules/sequelize-cli/node_modules/lodash/isObjectLike.js b/node_modules/sequelize-cli/node_modules/lodash/isObjectLike.js new file mode 100644 index 0000000..301716b --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/isObjectLike.js @@ -0,0 +1,29 @@ +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return value != null && typeof value == 'object'; +} + +module.exports = isObjectLike; diff --git a/node_modules/sequelize-cli/node_modules/lodash/isPlainObject.js b/node_modules/sequelize-cli/node_modules/lodash/isPlainObject.js new file mode 100644 index 0000000..2387373 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/isPlainObject.js @@ -0,0 +1,62 @@ +var baseGetTag = require('./_baseGetTag'), + getPrototype = require('./_getPrototype'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var objectTag = '[object Object]'; + +/** Used for built-in method references. */ +var funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to infer the `Object` constructor. */ +var objectCtorString = funcToString.call(Object); + +/** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ +function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; +} + +module.exports = isPlainObject; diff --git a/node_modules/sequelize-cli/node_modules/lodash/isRegExp.js b/node_modules/sequelize-cli/node_modules/lodash/isRegExp.js new file mode 100644 index 0000000..76c9b6e --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/isRegExp.js @@ -0,0 +1,27 @@ +var baseIsRegExp = require('./_baseIsRegExp'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsRegExp = nodeUtil && nodeUtil.isRegExp; + +/** + * Checks if `value` is classified as a `RegExp` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + * @example + * + * _.isRegExp(/abc/); + * // => true + * + * _.isRegExp('/abc/'); + * // => false + */ +var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; + +module.exports = isRegExp; diff --git a/node_modules/sequelize-cli/node_modules/lodash/isSafeInteger.js b/node_modules/sequelize-cli/node_modules/lodash/isSafeInteger.js new file mode 100644 index 0000000..2a48526 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/isSafeInteger.js @@ -0,0 +1,37 @@ +var isInteger = require('./isInteger'); + +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 + * double precision number which isn't the result of a rounded unsafe integer. + * + * **Note:** This method is based on + * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. + * @example + * + * _.isSafeInteger(3); + * // => true + * + * _.isSafeInteger(Number.MIN_VALUE); + * // => false + * + * _.isSafeInteger(Infinity); + * // => false + * + * _.isSafeInteger('3'); + * // => false + */ +function isSafeInteger(value) { + return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; +} + +module.exports = isSafeInteger; diff --git a/node_modules/sequelize-cli/node_modules/lodash/isSet.js b/node_modules/sequelize-cli/node_modules/lodash/isSet.js new file mode 100644 index 0000000..ab88bdf --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/isSet.js @@ -0,0 +1,27 @@ +var baseIsSet = require('./_baseIsSet'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsSet = nodeUtil && nodeUtil.isSet; + +/** + * Checks if `value` is classified as a `Set` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @example + * + * _.isSet(new Set); + * // => true + * + * _.isSet(new WeakSet); + * // => false + */ +var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; + +module.exports = isSet; diff --git a/node_modules/sequelize-cli/node_modules/lodash/isString.js b/node_modules/sequelize-cli/node_modules/lodash/isString.js new file mode 100644 index 0000000..627eb9c --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/isString.js @@ -0,0 +1,30 @@ +var baseGetTag = require('./_baseGetTag'), + isArray = require('./isArray'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var stringTag = '[object String]'; + +/** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ +function isString(value) { + return typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); +} + +module.exports = isString; diff --git a/node_modules/sequelize-cli/node_modules/lodash/isSymbol.js b/node_modules/sequelize-cli/node_modules/lodash/isSymbol.js new file mode 100644 index 0000000..dfb60b9 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/isSymbol.js @@ -0,0 +1,29 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && baseGetTag(value) == symbolTag); +} + +module.exports = isSymbol; diff --git a/node_modules/sequelize-cli/node_modules/lodash/isTypedArray.js b/node_modules/sequelize-cli/node_modules/lodash/isTypedArray.js new file mode 100644 index 0000000..da3f8dd --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/isTypedArray.js @@ -0,0 +1,27 @@ +var baseIsTypedArray = require('./_baseIsTypedArray'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + +/** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ +var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + +module.exports = isTypedArray; diff --git a/node_modules/sequelize-cli/node_modules/lodash/isUndefined.js b/node_modules/sequelize-cli/node_modules/lodash/isUndefined.js new file mode 100644 index 0000000..377d121 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/isUndefined.js @@ -0,0 +1,22 @@ +/** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ +function isUndefined(value) { + return value === undefined; +} + +module.exports = isUndefined; diff --git a/node_modules/sequelize-cli/node_modules/lodash/isWeakMap.js b/node_modules/sequelize-cli/node_modules/lodash/isWeakMap.js new file mode 100644 index 0000000..8d36f66 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/isWeakMap.js @@ -0,0 +1,28 @@ +var getTag = require('./_getTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var weakMapTag = '[object WeakMap]'; + +/** + * Checks if `value` is classified as a `WeakMap` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. + * @example + * + * _.isWeakMap(new WeakMap); + * // => true + * + * _.isWeakMap(new Map); + * // => false + */ +function isWeakMap(value) { + return isObjectLike(value) && getTag(value) == weakMapTag; +} + +module.exports = isWeakMap; diff --git a/node_modules/sequelize-cli/node_modules/lodash/isWeakSet.js b/node_modules/sequelize-cli/node_modules/lodash/isWeakSet.js new file mode 100644 index 0000000..e628b26 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/isWeakSet.js @@ -0,0 +1,28 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var weakSetTag = '[object WeakSet]'; + +/** + * Checks if `value` is classified as a `WeakSet` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. + * @example + * + * _.isWeakSet(new WeakSet); + * // => true + * + * _.isWeakSet(new Set); + * // => false + */ +function isWeakSet(value) { + return isObjectLike(value) && baseGetTag(value) == weakSetTag; +} + +module.exports = isWeakSet; diff --git a/node_modules/sequelize-cli/node_modules/lodash/iteratee.js b/node_modules/sequelize-cli/node_modules/lodash/iteratee.js new file mode 100644 index 0000000..61b73a8 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/iteratee.js @@ -0,0 +1,53 @@ +var baseClone = require('./_baseClone'), + baseIteratee = require('./_baseIteratee'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1; + +/** + * Creates a function that invokes `func` with the arguments of the created + * function. If `func` is a property name, the created function returns the + * property value for a given element. If `func` is an array or object, the + * created function returns `true` for elements that contain the equivalent + * source properties, otherwise it returns `false`. + * + * @static + * @since 4.0.0 + * @memberOf _ + * @category Util + * @param {*} [func=_.identity] The value to convert to a callback. + * @returns {Function} Returns the callback. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true })); + * // => [{ 'user': 'barney', 'age': 36, 'active': true }] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, _.iteratee(['user', 'fred'])); + * // => [{ 'user': 'fred', 'age': 40 }] + * + * // The `_.property` iteratee shorthand. + * _.map(users, _.iteratee('user')); + * // => ['barney', 'fred'] + * + * // Create custom iteratee shorthands. + * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) { + * return !_.isRegExp(func) ? iteratee(func) : function(string) { + * return func.test(string); + * }; + * }); + * + * _.filter(['abc', 'def'], /ef/); + * // => ['def'] + */ +function iteratee(func) { + return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG)); +} + +module.exports = iteratee; diff --git a/node_modules/sequelize-cli/node_modules/lodash/join.js b/node_modules/sequelize-cli/node_modules/lodash/join.js new file mode 100644 index 0000000..45de079 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/join.js @@ -0,0 +1,26 @@ +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeJoin = arrayProto.join; + +/** + * Converts all elements in `array` into a string separated by `separator`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to convert. + * @param {string} [separator=','] The element separator. + * @returns {string} Returns the joined string. + * @example + * + * _.join(['a', 'b', 'c'], '~'); + * // => 'a~b~c' + */ +function join(array, separator) { + return array == null ? '' : nativeJoin.call(array, separator); +} + +module.exports = join; diff --git a/node_modules/sequelize-cli/node_modules/lodash/kebabCase.js b/node_modules/sequelize-cli/node_modules/lodash/kebabCase.js new file mode 100644 index 0000000..8a52be6 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/kebabCase.js @@ -0,0 +1,28 @@ +var createCompounder = require('./_createCompounder'); + +/** + * Converts `string` to + * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the kebab cased string. + * @example + * + * _.kebabCase('Foo Bar'); + * // => 'foo-bar' + * + * _.kebabCase('fooBar'); + * // => 'foo-bar' + * + * _.kebabCase('__FOO_BAR__'); + * // => 'foo-bar' + */ +var kebabCase = createCompounder(function(result, word, index) { + return result + (index ? '-' : '') + word.toLowerCase(); +}); + +module.exports = kebabCase; diff --git a/node_modules/sequelize-cli/node_modules/lodash/keyBy.js b/node_modules/sequelize-cli/node_modules/lodash/keyBy.js new file mode 100644 index 0000000..acc007a --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/keyBy.js @@ -0,0 +1,36 @@ +var baseAssignValue = require('./_baseAssignValue'), + createAggregator = require('./_createAggregator'); + +/** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the last element responsible for generating the key. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var array = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.keyBy(array, function(o) { + * return String.fromCharCode(o.code); + * }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.keyBy(array, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + */ +var keyBy = createAggregator(function(result, value, key) { + baseAssignValue(result, key, value); +}); + +module.exports = keyBy; diff --git a/node_modules/sequelize-cli/node_modules/lodash/keys.js b/node_modules/sequelize-cli/node_modules/lodash/keys.js new file mode 100644 index 0000000..d143c71 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/keys.js @@ -0,0 +1,37 @@ +var arrayLikeKeys = require('./_arrayLikeKeys'), + baseKeys = require('./_baseKeys'), + isArrayLike = require('./isArrayLike'); + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); +} + +module.exports = keys; diff --git a/node_modules/sequelize-cli/node_modules/lodash/keysIn.js b/node_modules/sequelize-cli/node_modules/lodash/keysIn.js new file mode 100644 index 0000000..a62308f --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/keysIn.js @@ -0,0 +1,32 @@ +var arrayLikeKeys = require('./_arrayLikeKeys'), + baseKeysIn = require('./_baseKeysIn'), + isArrayLike = require('./isArrayLike'); + +/** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ +function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); +} + +module.exports = keysIn; diff --git a/node_modules/sequelize-cli/node_modules/lodash/lang.js b/node_modules/sequelize-cli/node_modules/lodash/lang.js new file mode 100644 index 0000000..a396216 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/lang.js @@ -0,0 +1,58 @@ +module.exports = { + 'castArray': require('./castArray'), + 'clone': require('./clone'), + 'cloneDeep': require('./cloneDeep'), + 'cloneDeepWith': require('./cloneDeepWith'), + 'cloneWith': require('./cloneWith'), + 'conformsTo': require('./conformsTo'), + 'eq': require('./eq'), + 'gt': require('./gt'), + 'gte': require('./gte'), + 'isArguments': require('./isArguments'), + 'isArray': require('./isArray'), + 'isArrayBuffer': require('./isArrayBuffer'), + 'isArrayLike': require('./isArrayLike'), + 'isArrayLikeObject': require('./isArrayLikeObject'), + 'isBoolean': require('./isBoolean'), + 'isBuffer': require('./isBuffer'), + 'isDate': require('./isDate'), + 'isElement': require('./isElement'), + 'isEmpty': require('./isEmpty'), + 'isEqual': require('./isEqual'), + 'isEqualWith': require('./isEqualWith'), + 'isError': require('./isError'), + 'isFinite': require('./isFinite'), + 'isFunction': require('./isFunction'), + 'isInteger': require('./isInteger'), + 'isLength': require('./isLength'), + 'isMap': require('./isMap'), + 'isMatch': require('./isMatch'), + 'isMatchWith': require('./isMatchWith'), + 'isNaN': require('./isNaN'), + 'isNative': require('./isNative'), + 'isNil': require('./isNil'), + 'isNull': require('./isNull'), + 'isNumber': require('./isNumber'), + 'isObject': require('./isObject'), + 'isObjectLike': require('./isObjectLike'), + 'isPlainObject': require('./isPlainObject'), + 'isRegExp': require('./isRegExp'), + 'isSafeInteger': require('./isSafeInteger'), + 'isSet': require('./isSet'), + 'isString': require('./isString'), + 'isSymbol': require('./isSymbol'), + 'isTypedArray': require('./isTypedArray'), + 'isUndefined': require('./isUndefined'), + 'isWeakMap': require('./isWeakMap'), + 'isWeakSet': require('./isWeakSet'), + 'lt': require('./lt'), + 'lte': require('./lte'), + 'toArray': require('./toArray'), + 'toFinite': require('./toFinite'), + 'toInteger': require('./toInteger'), + 'toLength': require('./toLength'), + 'toNumber': require('./toNumber'), + 'toPlainObject': require('./toPlainObject'), + 'toSafeInteger': require('./toSafeInteger'), + 'toString': require('./toString') +}; diff --git a/node_modules/sequelize-cli/node_modules/lodash/last.js b/node_modules/sequelize-cli/node_modules/lodash/last.js new file mode 100644 index 0000000..cad1eaf --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/last.js @@ -0,0 +1,20 @@ +/** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ +function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; +} + +module.exports = last; diff --git a/node_modules/sequelize-cli/node_modules/lodash/lastIndexOf.js b/node_modules/sequelize-cli/node_modules/lodash/lastIndexOf.js new file mode 100644 index 0000000..dabfb61 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/lastIndexOf.js @@ -0,0 +1,46 @@ +var baseFindIndex = require('./_baseFindIndex'), + baseIsNaN = require('./_baseIsNaN'), + strictLastIndexOf = require('./_strictLastIndexOf'), + toInteger = require('./toInteger'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * This method is like `_.indexOf` except that it iterates over elements of + * `array` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.lastIndexOf([1, 2, 1, 2], 2); + * // => 3 + * + * // Search from the `fromIndex`. + * _.lastIndexOf([1, 2, 1, 2], 2, 2); + * // => 1 + */ +function lastIndexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); + } + return value === value + ? strictLastIndexOf(array, value, index) + : baseFindIndex(array, baseIsNaN, index, true); +} + +module.exports = lastIndexOf; diff --git a/node_modules/sequelize-cli/node_modules/lodash/lodash.js b/node_modules/sequelize-cli/node_modules/lodash/lodash.js new file mode 100644 index 0000000..b39ddce --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/lodash/lodash.js @@ -0,0 +1,17084 @@ +/** + * @license + * Lodash + * Copyright JS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ +;(function() { + + /** Used as a safe reference for `undefined` in pre-ES5 environments. */ + var undefined; + + /** Used as the semantic version number. */ + var VERSION = '4.17.4'; + + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + + /** Error message constants. */ + var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.', + FUNC_ERROR_TEXT = 'Expected a function'; + + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED = '__lodash_hash_undefined__'; + + /** Used as the maximum memoize cache size. */ + var MAX_MEMOIZE_SIZE = 500; + + /** Used as the internal argument placeholder. */ + var PLACEHOLDER = '__lodash_placeholder__'; + + /** Used to compose bitmasks for cloning. */ + var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; + + /** Used to compose bitmasks for value comparisons. */ + var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + + /** Used to compose bitmasks for function metadata. */ + var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_BOUND_FLAG = 4, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256, + WRAP_FLIP_FLAG = 512; + + /** Used as default options for `_.truncate`. */ + var DEFAULT_TRUNC_LENGTH = 30, + DEFAULT_TRUNC_OMISSION = '...'; + + /** Used to detect hot functions by number of calls within a span of milliseconds. */ + var HOT_COUNT = 800, + HOT_SPAN = 16; + + /** Used to indicate the type of lazy iteratees. */ + var LAZY_FILTER_FLAG = 1, + LAZY_MAP_FLAG = 2, + LAZY_WHILE_FLAG = 3; + + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991, + MAX_INTEGER = 1.7976931348623157e+308, + NAN = 0 / 0; + + /** Used as references for the maximum length and index of an array. */ + var MAX_ARRAY_LENGTH = 4294967295, + MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, + HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; + + /** Used to associate wrap methods with their bit flags. */ + var wrapFlags = [ + ['ary', WRAP_ARY_FLAG], + ['bind', WRAP_BIND_FLAG], + ['bindKey', WRAP_BIND_KEY_FLAG], + ['curry', WRAP_CURRY_FLAG], + ['curryRight', WRAP_CURRY_RIGHT_FLAG], + ['flip', WRAP_FLIP_FLAG], + ['partial', WRAP_PARTIAL_FLAG], + ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], + ['rearg', WRAP_REARG_FLAG] + ]; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + domExcTag = '[object DOMException]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + nullTag = '[object Null]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + proxyTag = '[object Proxy]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + undefinedTag = '[object Undefined]', + weakMapTag = '[object WeakMap]', + weakSetTag = '[object WeakSet]'; + + var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + + /** Used to match empty string literals in compiled template source. */ + var reEmptyStringLeading = /\b__p \+= '';/g, + reEmptyStringMiddle = /\b(__p \+=) '' \+/g, + reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; + + /** Used to match HTML entities and HTML characters. */ + var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, + reUnescapedHtml = /[&<>"']/g, + reHasEscapedHtml = RegExp(reEscapedHtml.source), + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + + /** Used to match template delimiters. */ + var reEscape = /<%-([\s\S]+?)%>/g, + reEvaluate = /<%([\s\S]+?)%>/g, + reInterpolate = /<%=([\s\S]+?)%>/g; + + /** Used to match property names within property paths. */ + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/, + reLeadingDot = /^\./, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + + /** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, + reHasRegExpChar = RegExp(reRegExpChar.source); + + /** Used to match leading and trailing whitespace. */ + var reTrim = /^\s+|\s+$/g, + reTrimStart = /^\s+/, + reTrimEnd = /\s+$/; + + /** Used to match wrap detail comments. */ + var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, + reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, + reSplitDetails = /,? & /; + + /** Used to match words composed of alphanumeric characters. */ + var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; + + /** Used to match backslashes in property paths. */ + var reEscapeChar = /\\(\\)?/g; + + /** + * Used to match + * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components). + */ + var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; + + /** Used to match `RegExp` flags from their coerced string values. */ + var reFlags = /\w*$/; + + /** Used to detect bad signed hexadecimal string values. */ + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + + /** Used to detect binary string values. */ + var reIsBinary = /^0b[01]+$/i; + + /** Used to detect host constructors (Safari). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** Used to detect octal string values. */ + var reIsOctal = /^0o[0-7]+$/i; + + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; + + /** Used to match Latin Unicode letters (excluding mathematical operators). */ + var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; + + /** Used to ensure capturing order of template delimiters. */ + var reNoMatch = /($^)/; + + /** Used to match unescaped characters in compiled string literals. */ + var reUnescapedString = /['\n\r\u2028\u2029\\]/g; + + /** Used to compose unicode character classes. */ + var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsDingbatRange = '\\u2700-\\u27bf', + rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', + rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', + rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', + rsPunctuationRange = '\\u2000-\\u206f', + 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', + rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', + rsVarRange = '\\ufe0e\\ufe0f', + rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; + + /** Used to compose unicode capture groups. */ + var rsApos = "['\u2019]", + rsAstral = '[' + rsAstralRange + ']', + rsBreak = '[' + rsBreakRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsDigits = '\\d+', + rsDingbat = '[' + rsDingbatRange + ']', + rsLower = '[' + rsLowerRange + ']', + rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsUpper = '[' + rsUpperRange + ']', + rsZWJ = '\\u200d'; + + /** Used to compose unicode regexes. */ + var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', + rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', + rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', + rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', + reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsOrdLower = '\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)', + rsOrdUpper = '\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + + /** Used to match apostrophes. */ + var reApos = RegExp(rsApos, 'g'); + + /** + * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and + * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). + */ + var reComboMark = RegExp(rsCombo, 'g'); + + /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ + var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + + /** Used to match complex or compound words. */ + var reUnicodeWord = RegExp([ + rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', + rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', + rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, + rsUpper + '+' + rsOptContrUpper, + rsOrdUpper, + rsOrdLower, + rsDigits, + rsEmoji + ].join('|'), 'g'); + + /** 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/). */ + var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); + + /** Used to detect strings that need a more robust regexp to match words. */ + 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 ]/; + + /** Used to assign default `context` object properties. */ + var contextProps = [ + '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' + ]; + + /** Used to make template sourceURLs easier to identify. */ + var templateCounter = -1; + + /** Used to identify `toStringTag` values of typed arrays. */ + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = + typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = + typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = + typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = + typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = + typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = + typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = + typedArrayTags[errorTag] = typedArrayTags[funcTag] = + typedArrayTags[mapTag] = typedArrayTags[numberTag] = + typedArrayTags[objectTag] = typedArrayTags[regexpTag] = + typedArrayTags[setTag] = typedArrayTags[stringTag] = + typedArrayTags[weakMapTag] = false; + + /** Used to identify `toStringTag` values supported by `_.clone`. */ + var cloneableTags = {}; + cloneableTags[argsTag] = cloneableTags[arrayTag] = + cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = + cloneableTags[boolTag] = cloneableTags[dateTag] = + cloneableTags[float32Tag] = cloneableTags[float64Tag] = + cloneableTags[int8Tag] = cloneableTags[int16Tag] = + cloneableTags[int32Tag] = cloneableTags[mapTag] = + cloneableTags[numberTag] = cloneableTags[objectTag] = + cloneableTags[regexpTag] = cloneableTags[setTag] = + cloneableTags[stringTag] = cloneableTags[symbolTag] = + cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = + cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; + cloneableTags[errorTag] = cloneableTags[funcTag] = + cloneableTags[weakMapTag] = false; + + /** Used to map Latin Unicode letters to basic Latin letters. */ + var deburredLetters = { + // Latin-1 Supplement block. + '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', + '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', + '\xc7': 'C', '\xe7': 'c', + '\xd0': 'D', '\xf0': 'd', + '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', + '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', + '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', + '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', + '\xd1': 'N', '\xf1': 'n', + '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', + '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', + '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', + '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', + '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', + '\xc6': 'Ae', '\xe6': 'ae', + '\xde': 'Th', '\xfe': 'th', + '\xdf': 'ss', + // Latin Extended-A block. + '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', + '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', + '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', + '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', + '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', + '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', + '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', + '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', + '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', + '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', + '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', + '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', + '\u0134': 'J', '\u0135': 'j', + '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', + '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', + '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', + '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', + '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', + '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', + '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', + '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', + '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', + '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', + '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', + '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', + '\u0163': 't', '\u0165': 't', '\u0167': 't', + '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', + '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', + '\u0174': 'W', '\u0175': 'w', + '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', + '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', + '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', + '\u0132': 'IJ', '\u0133': 'ij', + '\u0152': 'Oe', '\u0153': 'oe', + '\u0149': "'n", '\u017f': 's' + }; + + /** Used to map characters to HTML entities. */ + var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' + }; + + /** Used to map HTML entities to characters. */ + var htmlUnescapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'" + }; + + /** Used to escape characters for inclusion in compiled string literals. */ + var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\u2028': 'u2028', + '\u2029': 'u2029' + }; + + /** Built-in method references without a dependency on `root`. */ + var freeParseFloat = parseFloat, + freeParseInt = parseInt; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); + + /** Detect free variable `exports`. */ + var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + + /** Detect free variable `module`. */ + var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = freeModule && freeModule.exports === freeExports; + + /** Detect free variable `process` from Node.js. */ + var freeProcess = moduleExports && freeGlobal.process; + + /** Used to access faster Node.js helpers. */ + var nodeUtil = (function() { + try { + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} + }()); + + /* Node.js helper references. */ + var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, + nodeIsDate = nodeUtil && nodeUtil.isDate, + nodeIsMap = nodeUtil && nodeUtil.isMap, + nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, + nodeIsSet = nodeUtil && nodeUtil.isSet, + nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + + /*--------------------------------------------------------------------------*/ + + /** + * Adds the key-value `pair` to `map`. + * + * @private + * @param {Object} map The map to modify. + * @param {Array} pair The key-value pair to add. + * @returns {Object} Returns `map`. + */ + function addMapEntry(map, pair) { + // Don't return `map.set` because it's not chainable in IE 11. + map.set(pair[0], pair[1]); + return map; + } + + /** + * Adds `value` to `set`. + * + * @private + * @param {Object} set The set to modify. + * @param {*} value The value to add. + * @returns {Object} Returns `set`. + */ + function addSetEntry(set, value) { + // Don't return `set.add` because it's not chainable in IE 11. + set.add(value); + return set; + } + + /** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ + function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); + } + + /** + * A specialized version of `baseAggregator` for arrays. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function arrayAggregator(array, setter, iteratee, accumulator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + var value = array[index]; + setter(accumulator, value, iteratee(value), array); + } + return accumulator; + } + + /** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.forEachRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEachRight(array, iteratee) { + var length = array == null ? 0 : array.length; + + while (length--) { + if (iteratee(array[length], length, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.every` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + */ + function arrayEvery(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (!predicate(array[index], index, array)) { + return false; + } + } + return true; + } + + /** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; + } + + /** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; + } + + /** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; + } + + /** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; + } + + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + + /** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array == null ? 0 : array.length; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; + } + + /** + * A specialized version of `_.reduceRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the last element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduceRight(array, iteratee, accumulator, initAccum) { + var length = array == null ? 0 : array.length; + if (initAccum && length) { + accumulator = array[--length]; + } + while (length--) { + accumulator = iteratee(accumulator, array[length], length, array); + } + return accumulator; + } + + /** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; + } + + /** + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + var asciiSize = baseProperty('length'); + + /** + * Converts an ASCII `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function asciiToArray(string) { + return string.split(''); + } + + /** + * Splits an ASCII `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function asciiWords(string) { + return string.match(reAsciiWord) || []; + } + + /** + * The base implementation of methods like `_.findKey` and `_.findLastKey`, + * without support for iteratee shorthands, which iterates over `collection` + * using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the found element or its key, else `undefined`. + */ + function baseFindKey(collection, predicate, eachFunc) { + var result; + eachFunc(collection, function(value, key, collection) { + if (predicate(value, key, collection)) { + result = key; + return false; + } + }); + return result; + } + + /** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOf(array, value, fromIndex) { + return value === value + ? strictIndexOf(array, value, fromIndex) + : baseFindIndex(array, baseIsNaN, fromIndex); + } + + /** + * This function is like `baseIndexOf` except that it accepts a comparator. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @param {Function} comparator The comparator invoked per element. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOfWith(array, value, fromIndex, comparator) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (comparator(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ + function baseIsNaN(value) { + return value !== value; + } + + /** + * The base implementation of `_.mean` and `_.meanBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the mean. + */ + function baseMean(array, iteratee) { + var length = array == null ? 0 : array.length; + return length ? (baseSum(array, iteratee) / length) : NAN; + } + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ + function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ + function baseSortBy(array, comparer) { + var length = array.length; + + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; + } + + /** + * The base implementation of `_.sum` and `_.sumBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the sum. + */ + function baseSum(array, iteratee) { + var result, + index = -1, + length = array.length; + + while (++index < length) { + var current = iteratee(array[index]); + if (current !== undefined) { + result = result === undefined ? current : (result + current); + } + } + return result; + } + + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + + /** + * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array + * of key-value pairs for `object` corresponding to the property names of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the key-value pairs. + */ + function baseToPairs(object, props) { + return arrayMap(props, function(key) { + return [key, object[key]]; + }); + } + + /** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ + function baseUnary(func) { + return function(value) { + return func(value); + }; + } + + /** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ + function baseValues(object, props) { + return arrayMap(props, function(key) { + return object[key]; + }); + } + + /** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function cacheHas(cache, key) { + return cache.has(key); + } + + /** + * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the first unmatched string symbol. + */ + function charsStartIndex(strSymbols, chrSymbols) { + var index = -1, + length = strSymbols.length; + + while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } + + /** + * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the last unmatched string symbol. + */ + function charsEndIndex(strSymbols, chrSymbols) { + var index = strSymbols.length; + + while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } + + /** + * Gets the number of `placeholder` occurrences in `array`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} placeholder The placeholder to search for. + * @returns {number} Returns the placeholder count. + */ + function countHolders(array, placeholder) { + var length = array.length, + result = 0; + + while (length--) { + if (array[length] === placeholder) { + ++result; + } + } + return result; + } + + /** + * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A + * letters to basic Latin letters. + * + * @private + * @param {string} letter The matched letter to deburr. + * @returns {string} Returns the deburred letter. + */ + var deburrLetter = basePropertyOf(deburredLetters); + + /** + * Used by `_.escape` to convert characters to HTML entities. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + var escapeHtmlChar = basePropertyOf(htmlEscapes); + + /** + * Used by `_.template` to escape characters for inclusion in compiled string literals. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + function escapeStringChar(chr) { + return '\\' + stringEscapes[chr]; + } + + /** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function getValue(object, key) { + return object == null ? undefined : object[key]; + } + + /** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ + function hasUnicode(string) { + return reHasUnicode.test(string); + } + + /** + * Checks if `string` contains a word composed of Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a word is found, else `false`. + */ + function hasUnicodeWord(string) { + return reHasUnicodeWord.test(string); + } + + /** + * Converts `iterator` to an array. + * + * @private + * @param {Object} iterator The iterator to convert. + * @returns {Array} Returns the converted array. + */ + function iteratorToArray(iterator) { + var data, + result = []; + + while (!(data = iterator.next()).done) { + result.push(data.value); + } + return result; + } + + /** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ + function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; + } + + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + + /** + * Replaces all `placeholder` elements in `array` with an internal placeholder + * and returns an array of their indexes. + * + * @private + * @param {Array} array The array to modify. + * @param {*} placeholder The placeholder to replace. + * @returns {Array} Returns the new array of placeholder indexes. + */ + function replaceHolders(array, placeholder) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value === placeholder || value === PLACEHOLDER) { + array[index] = PLACEHOLDER; + result[resIndex++] = index; + } + } + return result; + } + + /** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ + function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; + } + + /** + * Converts `set` to its value-value pairs. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the value-value pairs. + */ + function setToPairs(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = [value, value]; + }); + return result; + } + + /** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * A specialized version of `_.lastIndexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictLastIndexOf(array, value, fromIndex) { + var index = fromIndex + 1; + while (index--) { + if (array[index] === value) { + return index; + } + } + return index; + } + + /** + * Gets the number of symbols in `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the string size. + */ + function stringSize(string) { + return hasUnicode(string) + ? unicodeSize(string) + : asciiSize(string); + } + + /** + * Converts `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function stringToArray(string) { + return hasUnicode(string) + ? unicodeToArray(string) + : asciiToArray(string); + } + + /** + * Used by `_.unescape` to convert HTML entities to characters. + * + * @private + * @param {string} chr The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ + var unescapeHtmlChar = basePropertyOf(htmlUnescapes); + + /** + * Gets the size of a Unicode `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; + } + return result; + } + + /** + * Converts a Unicode `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function unicodeToArray(string) { + return string.match(reUnicode) || []; + } + + /** + * Splits a Unicode `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function unicodeWords(string) { + return string.match(reUnicodeWord) || []; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Create a new pristine `lodash` function using the `context` object. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Util + * @param {Object} [context=root] The context object. + * @returns {Function} Returns a new `lodash` function. + * @example + * + * _.mixin({ 'foo': _.constant('foo') }); + * + * var lodash = _.runInContext(); + * lodash.mixin({ 'bar': lodash.constant('bar') }); + * + * _.isFunction(_.foo); + * // => true + * _.isFunction(_.bar); + * // => false + * + * lodash.isFunction(lodash.foo); + * // => false + * lodash.isFunction(lodash.bar); + * // => true + * + * // Create a suped-up `defer` in Node.js. + * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; + */ + var runInContext = (function runInContext(context) { + context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps)); + + /** Built-in constructor references. */ + var Array = context.Array, + Date = context.Date, + Error = context.Error, + Function = context.Function, + Math = context.Math, + Object = context.Object, + RegExp = context.RegExp, + String = context.String, + TypeError = context.TypeError; + + /** Used for built-in method references. */ + var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + + /** Used to detect overreaching core-js shims. */ + var coreJsData = context['__core-js_shared__']; + + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to generate unique IDs. */ + var idCounter = 0; + + /** Used to detect methods masquerading as native. */ + var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; + }()); + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** Used to infer the `Object` constructor. */ + var objectCtorString = funcToString.call(Object); + + /** Used to restore the original `_` reference in `_.noConflict`. */ + var oldDash = root._; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); + + /** Built-in value references. */ + var Buffer = moduleExports ? context.Buffer : undefined, + Symbol = context.Symbol, + Uint8Array = context.Uint8Array, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined, + getPrototype = overArg(Object.getPrototypeOf, Object), + objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice, + spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined, + symIterator = Symbol ? Symbol.iterator : undefined, + symToStringTag = Symbol ? Symbol.toStringTag : undefined; + + var defineProperty = (function() { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} + }()); + + /** Mocked built-ins. */ + var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, + ctxNow = Date && Date.now !== root.Date.now && Date.now, + ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeCeil = Math.ceil, + nativeFloor = Math.floor, + nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeIsFinite = context.isFinite, + nativeJoin = arrayProto.join, + nativeKeys = overArg(Object.keys, Object), + nativeMax = Math.max, + nativeMin = Math.min, + nativeNow = Date.now, + nativeParseInt = context.parseInt, + nativeRandom = Math.random, + nativeReverse = arrayProto.reverse; + + /* Built-in method references that are verified to be native. */ + var DataView = getNative(context, 'DataView'), + Map = getNative(context, 'Map'), + Promise = getNative(context, 'Promise'), + Set = getNative(context, 'Set'), + WeakMap = getNative(context, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); + + /** Used to store function metadata. */ + var metaMap = WeakMap && new WeakMap; + + /** Used to lookup unminified function names. */ + var realNames = {}; + + /** Used to detect maps, sets, and weakmaps. */ + var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + + /** Used to convert symbols to primitives and strings. */ + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object which wraps `value` to enable implicit method + * chain sequences. Methods that operate on and return arrays, collections, + * and functions can be chained together. Methods that retrieve a single value + * or may return a primitive value will automatically end the chain sequence + * and return the unwrapped value. Otherwise, the value must be unwrapped + * with `_#value`. + * + * Explicit chain sequences, which must be unwrapped with `_#value`, may be + * enabled using `_.chain`. + * + * The execution of chained methods is lazy, that is, it's deferred until + * `_#value` is implicitly or explicitly called. + * + * Lazy evaluation allows several methods to support shortcut fusion. + * Shortcut fusion is an optimization to merge iteratee calls; this avoids + * the creation of intermediate arrays and can greatly reduce the number of + * iteratee executions. Sections of a chain sequence qualify for shortcut + * fusion if the section is applied to an array and iteratees accept only + * one argument. The heuristic for whether a section qualifies for shortcut + * fusion is subject to change. + * + * Chaining is supported in custom builds as long as the `_#value` method is + * directly or indirectly included in the build. + * + * In addition to lodash methods, wrappers have `Array` and `String` methods. + * + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` + * + * The wrapper methods that support shortcut fusion are: + * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, + * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, + * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` + * + * The chainable wrapper methods are: + * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, + * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, + * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, + * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, + * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, + * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, + * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, + * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, + * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, + * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, + * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, + * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, + * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, + * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, + * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, + * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, + * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, + * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, + * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, + * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, + * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, + * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, + * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, + * `zipObject`, `zipObjectDeep`, and `zipWith` + * + * The wrapper methods that are **not** chainable by default are: + * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, + * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, + * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, + * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, + * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, + * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, + * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, + * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, + * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, + * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, + * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, + * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, + * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, + * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, + * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, + * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, + * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, + * `upperFirst`, `value`, and `words` + * + * @name _ + * @constructor + * @category Seq + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2, 3]); + * + * // Returns an unwrapped value. + * wrapped.reduce(_.add); + * // => 6 + * + * // Returns a wrapped value. + * var squares = wrapped.map(square); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ + function lodash(value) { + if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { + if (value instanceof LodashWrapper) { + return value; + } + if (hasOwnProperty.call(value, '__wrapped__')) { + return wrapperClone(value); + } + } + return new LodashWrapper(value); + } + + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ + var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; + }()); + + /** + * The function whose prototype chain sequence wrappers inherit from. + * + * @private + */ + function baseLodash() { + // No operation performed. + } + + /** + * The base constructor for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable explicit method chain sequences. + */ + function LodashWrapper(value, chainAll) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__chain__ = !!chainAll; + this.__index__ = 0; + this.__values__ = undefined; + } + + /** + * By default, the template delimiters used by lodash are like those in + * embedded Ruby (ERB) as well as ES2015 template strings. Change the + * following template settings to use alternative delimiters. + * + * @static + * @memberOf _ + * @type {Object} + */ + lodash.templateSettings = { + + /** + * Used to detect `data` property values to be HTML-escaped. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'escape': reEscape, + + /** + * Used to detect code to be evaluated. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'evaluate': reEvaluate, + + /** + * Used to detect `data` property values to inject. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'interpolate': reInterpolate, + + /** + * Used to reference the data object in the template text. + * + * @memberOf _.templateSettings + * @type {string} + */ + 'variable': '', + + /** + * Used to import variables into the compiled template. + * + * @memberOf _.templateSettings + * @type {Object} + */ + 'imports': { + + /** + * A reference to the `lodash` function. + * + * @memberOf _.templateSettings.imports + * @type {Function} + */ + '_': lodash + } + }; + + // Ensure wrappers are instances of `baseLodash`. + lodash.prototype = baseLodash.prototype; + lodash.prototype.constructor = lodash; + + LodashWrapper.prototype = baseCreate(baseLodash.prototype); + LodashWrapper.prototype.constructor = LodashWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. + * + * @private + * @constructor + * @param {*} value The value to wrap. + */ + function LazyWrapper(value) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__dir__ = 1; + this.__filtered__ = false; + this.__iteratees__ = []; + this.__takeCount__ = MAX_ARRAY_LENGTH; + this.__views__ = []; + } + + /** + * Creates a clone of the lazy wrapper object. + * + * @private + * @name clone + * @memberOf LazyWrapper + * @returns {Object} Returns the cloned `LazyWrapper` object. + */ + function lazyClone() { + var result = new LazyWrapper(this.__wrapped__); + result.__actions__ = copyArray(this.__actions__); + result.__dir__ = this.__dir__; + result.__filtered__ = this.__filtered__; + result.__iteratees__ = copyArray(this.__iteratees__); + result.__takeCount__ = this.__takeCount__; + result.__views__ = copyArray(this.__views__); + return result; + } + + /** + * Reverses the direction of lazy iteration. + * + * @private + * @name reverse + * @memberOf LazyWrapper + * @returns {Object} Returns the new reversed `LazyWrapper` object. + */ + function lazyReverse() { + if (this.__filtered__) { + var result = new LazyWrapper(this); + result.__dir__ = -1; + result.__filtered__ = true; + } else { + result = this.clone(); + result.__dir__ *= -1; + } + return result; + } + + /** + * Extracts the unwrapped value from its lazy wrapper. + * + * @private + * @name value + * @memberOf LazyWrapper + * @returns {*} Returns the unwrapped value. + */ + function lazyValue() { + var array = this.__wrapped__.value(), + dir = this.__dir__, + isArr = isArray(array), + isRight = dir < 0, + arrLength = isArr ? array.length : 0, + view = getView(0, arrLength, this.__views__), + start = view.start, + end = view.end, + length = end - start, + index = isRight ? end : (start - 1), + iteratees = this.__iteratees__, + iterLength = iteratees.length, + resIndex = 0, + takeCount = nativeMin(length, this.__takeCount__); + + if (!isArr || (!isRight && arrLength == length && takeCount == length)) { + return baseWrapperValue(array, this.__actions__); + } + var result = []; + + outer: + while (length-- && resIndex < takeCount) { + index += dir; + + var iterIndex = -1, + value = array[index]; + + while (++iterIndex < iterLength) { + var data = iteratees[iterIndex], + iteratee = data.iteratee, + type = data.type, + computed = iteratee(value); + + if (type == LAZY_MAP_FLAG) { + value = computed; + } else if (!computed) { + if (type == LAZY_FILTER_FLAG) { + continue outer; + } else { + break outer; + } + } + } + result[resIndex++] = value; + } + return result; + } + + // Ensure `LazyWrapper` is an instance of `baseLodash`. + LazyWrapper.prototype = baseCreate(baseLodash.prototype); + LazyWrapper.prototype.constructor = LazyWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; + } + + /** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; + } + + /** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; + } + + /** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); + } + + /** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; + } + + // Add methods to `Hash`. + Hash.prototype.clear = hashClear; + Hash.prototype['delete'] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + + /** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; + } + + /** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; + } + + /** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + + /** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ + function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + + // Add methods to `ListCache`. + ListCache.prototype.clear = listCacheClear; + ListCache.prototype['delete'] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ + function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; + } + + /** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; + } + + /** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + + /** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + + /** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ + function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; + } + + // Add methods to `MapCache`. + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype['delete'] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + + /*------------------------------------------------------------------------*/ + + /** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ + function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new MapCache; + while (++index < length) { + this.add(values[index]); + } + } + + /** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; + } + + /** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ + function setCacheHas(value) { + return this.__data__.has(value); + } + + // Add methods to `SetCache`. + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; + } + + /** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ + function stackClear() { + this.__data__ = new ListCache; + this.size = 0; + } + + /** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + + this.size = data.size; + return result; + } + + /** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function stackGet(key) { + return this.__data__.get(key); + } + + /** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function stackHas(key) { + return this.__data__.has(key); + } + + /** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ + function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; + } + + // Add methods to `Stack`. + Stack.prototype.clear = stackClear; + Stack.prototype['delete'] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ + function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length) + ))) { + result.push(key); + } + } + return result; + } + + /** + * A specialized version of `_.sample` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @returns {*} Returns the random element. + */ + function arraySample(array) { + var length = array.length; + return length ? array[baseRandom(0, length - 1)] : undefined; + } + + /** + * A specialized version of `_.sampleSize` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function arraySampleSize(array, n) { + return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); + } + + /** + * A specialized version of `_.shuffle` for arrays. + * + * @private + * @param {Array} array The array to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function arrayShuffle(array) { + return shuffleSelf(copyArray(array)); + } + + /** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignMergeValue(object, key, value) { + if ((value !== undefined && !eq(object[key], value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } + } + + /** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } + } + + /** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + + /** + * Aggregates elements of `collection` on `accumulator` with keys transformed + * by `iteratee` and values set by `setter`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function baseAggregator(collection, setter, iteratee, accumulator) { + baseEach(collection, function(value, key, collection) { + setter(accumulator, value, iteratee(value), collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); + } + + /** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); + } + + /** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } + } + + /** + * The base implementation of `_.at` without support for individual paths. + * + * @private + * @param {Object} object The object to iterate over. + * @param {string[]} paths The property paths to pick. + * @returns {Array} Returns the picked elements. + */ + function baseAt(object, paths) { + var index = -1, + length = paths.length, + result = Array(length), + skip = object == null; + + while (++index < length) { + result[index] = skip ? undefined : get(object, paths[index]); + } + return result; + } + + /** + * The base implementation of `_.clamp` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + */ + function baseClamp(number, lower, upper) { + if (number === number) { + if (upper !== undefined) { + number = number <= upper ? number : upper; + } + if (lower !== undefined) { + number = number >= lower ? number : lower; + } + } + return number; + } + + /** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ + function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; + + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; + + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = (isFlat || isFunc) ? {} : initCloneObject(value); + if (!isDeep) { + return isFlat + ? copySymbolsIn(value, baseAssignIn(result, value)) + : copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, baseClone, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + var keysFunc = isFull + ? (isFlat ? getAllKeysIn : getAllKeys) + : (isFlat ? keysIn : keys); + + var props = isArr ? undefined : keysFunc(value); + arrayEach(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; + } + + /** + * The base implementation of `_.conforms` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + */ + function baseConforms(source) { + var props = keys(source); + return function(object) { + return baseConformsTo(object, source, props); + }; + } + + /** + * The base implementation of `_.conformsTo` which accepts `props` to check. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + */ + function baseConformsTo(object, source, props) { + var length = props.length; + if (object == null) { + return !length; + } + object = Object(object); + while (length--) { + var key = props[length], + predicate = source[key], + value = object[key]; + + if ((value === undefined && !(key in object)) || !predicate(value)) { + return false; + } + } + return true; + } + + /** + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {Array} args The arguments to provide to `func`. + * @returns {number|Object} Returns the timer id or timeout object. + */ + function baseDelay(func, wait, args) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return setTimeout(function() { func.apply(undefined, args); }, wait); + } + + /** + * The base implementation of methods like `_.difference` without support + * for excluding multiple arrays or iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Array} values The values to exclude. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + */ + function baseDifference(array, values, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + isCommon = true, + length = array.length, + result = [], + valuesLength = values.length; + + if (!length) { + return result; + } + if (iteratee) { + values = arrayMap(values, baseUnary(iteratee)); + } + if (comparator) { + includes = arrayIncludesWith; + isCommon = false; + } + else if (values.length >= LARGE_ARRAY_SIZE) { + includes = cacheHas; + isCommon = false; + values = new SetCache(values); + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee == null ? value : iteratee(value); + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === computed) { + continue outer; + } + } + result.push(value); + } + else if (!includes(values, computed, comparator)) { + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEach = createBaseEach(baseForOwn); + + /** + * The base implementation of `_.forEachRight` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEachRight = createBaseEach(baseForOwnRight, true); + + /** + * The base implementation of `_.every` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ + function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function(value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; + } + + /** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ + function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if (current != null && (computed === undefined + ? (current === current && !isSymbol(current)) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } + } + return result; + } + + /** + * The base implementation of `_.fill` without an iteratee call guard. + * + * @private + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + */ + function baseFill(array, value, start, end) { + var length = array.length; + + start = toInteger(start); + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = (end === undefined || end > length) ? length : toInteger(end); + if (end < 0) { + end += length; + } + end = start > end ? 0 : toLength(end); + while (start < end) { + array[start++] = value; + } + return array; + } + + /** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; + } + + /** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ + function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + + /** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseFor = createBaseFor(); + + /** + * This function is like `baseFor` except that it iterates over properties + * in the opposite order. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseForRight = createBaseFor(true); + + /** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); + } + + /** + * The base implementation of `_.forOwnRight` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwnRight(object, iteratee) { + return object && baseForRight(object, iteratee, keys); + } + + /** + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from `props`. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the function names. + */ + function baseFunctions(object, props) { + return arrayFilter(props, function(key) { + return isFunction(object[key]); + }); + } + + /** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ + function baseGet(object, path) { + path = castPath(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return (index && index == length) ? object : undefined; + } + + /** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); + } + + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); + } + + /** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ + function baseGt(value, other) { + return value > other; + } + + /** + * The base implementation of `_.has` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHas(object, key) { + return object != null && hasOwnProperty.call(object, key); + } + + /** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHasIn(object, key) { + return object != null && key in Object(object); + } + + /** + * The base implementation of `_.inRange` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to check. + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + */ + function baseInRange(number, start, end) { + return number >= nativeMin(start, end) && number < nativeMax(start, end); + } + + /** + * The base implementation of methods like `_.intersection`, without support + * for iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of shared values. + */ + function baseIntersection(arrays, iteratee, comparator) { + var includes = comparator ? arrayIncludesWith : arrayIncludes, + length = arrays[0].length, + othLength = arrays.length, + othIndex = othLength, + caches = Array(othLength), + maxLength = Infinity, + result = []; + + while (othIndex--) { + var array = arrays[othIndex]; + if (othIndex && iteratee) { + array = arrayMap(array, baseUnary(iteratee)); + } + maxLength = nativeMin(array.length, maxLength); + caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) + ? new SetCache(othIndex && array) + : undefined; + } + array = arrays[0]; + + var index = -1, + seen = caches[0]; + + outer: + while (++index < length && result.length < maxLength) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (!(seen + ? cacheHas(seen, computed) + : includes(result, computed, comparator) + )) { + othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if (!(cache + ? cacheHas(cache, computed) + : includes(arrays[othIndex], computed, comparator)) + ) { + continue outer; + } + } + if (seen) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.invert` and `_.invertBy` which inverts + * `object` with values transformed by `iteratee` and set by `setter`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform values. + * @param {Object} accumulator The initial inverted object. + * @returns {Function} Returns `accumulator`. + */ + function baseInverter(object, setter, iteratee, accumulator) { + baseForOwn(object, function(value, key, object) { + setter(accumulator, iteratee(value), key, object); + }); + return accumulator; + } + + /** + * The base implementation of `_.invoke` without support for individual + * method arguments. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {Array} args The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + */ + function baseInvoke(object, path, args) { + path = castPath(path, object); + object = parent(object, path); + var func = object == null ? object : object[toKey(last(path))]; + return func == null ? undefined : apply(func, object, args); + } + + /** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; + } + + /** + * The base implementation of `_.isArrayBuffer` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + */ + function baseIsArrayBuffer(value) { + return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; + } + + /** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ + function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; + } + + /** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); + } + + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : getTag(object), + othTag = othIsArr ? arrayTag : getTag(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new Stack); + return (objIsArr || isTypedArray(object)) + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new Stack); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); + } + + /** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ + function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; + } + + /** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ + function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new Stack; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } + } + } + return true; + } + + /** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + + /** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ + function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; + } + + /** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ + function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; + } + + /** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ + function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; + } + + /** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ + function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity; + } + if (typeof value == 'object') { + return isArray(value) + ? baseMatchesProperty(value[0], value[1]) + : baseMatches(value); + } + return property(value); + } + + /** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; + } + + /** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; + } + + /** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ + function baseLt(value, other) { + return value < other; + } + + /** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; + } + + /** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || baseIsMatch(object, source, matchData); + }; + } + + /** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); + } + return function(object) { + var objValue = get(object, path); + return (objValue === undefined && objValue === srcValue) + ? hasIn(object, path) + : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; + } + + /** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ + function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + baseFor(source, function(srcValue, key) { + if (isObject(srcValue)) { + stack || (stack = new Stack); + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } + else { + var newValue = customizer + ? customizer(object[key], srcValue, (key + ''), object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }, keysIn); + } + + /** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ + function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = object[key], + srcValue = source[key], + stacked = stack.get(srcValue); + + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; + + var isCommon = newValue === undefined; + + if (isCommon) { + var isArr = isArray(srcValue), + isBuff = !isArr && isBuffer(srcValue), + isTyped = !isArr && !isBuff && isTypedArray(srcValue); + + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (isArray(objValue)) { + newValue = objValue; + } + else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } + else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } + else if (isTyped) { + isCommon = false; + newValue = cloneTypedArray(srcValue, true); + } + else { + newValue = []; + } + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } + else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { + newValue = initCloneObject(srcValue); + } + } + else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + assignMergeValue(object, key, newValue); + } + + /** + * The base implementation of `_.nth` which doesn't coerce arguments. + * + * @private + * @param {Array} array The array to query. + * @param {number} n The index of the element to return. + * @returns {*} Returns the nth element of `array`. + */ + function baseNth(array, n) { + var length = array.length; + if (!length) { + return; + } + n += n < 0 ? length : 0; + return isIndex(n, length) ? array[n] : undefined; + } + + /** + * The base implementation of `_.orderBy` without param guards. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ + function baseOrderBy(collection, iteratees, orders) { + var index = -1; + iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee())); + + var result = baseMap(collection, function(value, key, collection) { + var criteria = arrayMap(iteratees, function(iteratee) { + return iteratee(value); + }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); + + return baseSortBy(result, function(object, other) { + return compareMultiple(object, other, orders); + }); + } + + /** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ + function basePick(object, paths) { + return basePickBy(object, paths, function(value, path) { + return hasIn(object, path); + }); + } + + /** + * The base implementation of `_.pickBy` without support for iteratee shorthands. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @param {Function} predicate The function invoked per property. + * @returns {Object} Returns the new object. + */ + function basePickBy(object, paths, predicate) { + var index = -1, + length = paths.length, + result = {}; + + while (++index < length) { + var path = paths[index], + value = baseGet(object, path); + + if (predicate(value, path)) { + baseSet(result, castPath(path, object), value); + } + } + return result; + } + + /** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyDeep(path) { + return function(object) { + return baseGet(object, path); + }; + } + + /** + * The base implementation of `_.pullAllBy` without support for iteratee + * shorthands. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + */ + function basePullAll(array, values, iteratee, comparator) { + var indexOf = comparator ? baseIndexOfWith : baseIndexOf, + index = -1, + length = values.length, + seen = array; + + if (array === values) { + values = copyArray(values); + } + if (iteratee) { + seen = arrayMap(array, baseUnary(iteratee)); + } + while (++index < length) { + var fromIndex = 0, + value = values[index], + computed = iteratee ? iteratee(value) : value; + + while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { + if (seen !== array) { + splice.call(seen, fromIndex, 1); + } + splice.call(array, fromIndex, 1); + } + } + return array; + } + + /** + * The base implementation of `_.pullAt` without support for individual + * indexes or capturing the removed elements. + * + * @private + * @param {Array} array The array to modify. + * @param {number[]} indexes The indexes of elements to remove. + * @returns {Array} Returns `array`. + */ + function basePullAt(array, indexes) { + var length = array ? indexes.length : 0, + lastIndex = length - 1; + + while (length--) { + var index = indexes[length]; + if (length == lastIndex || index !== previous) { + var previous = index; + if (isIndex(index)) { + splice.call(array, index, 1); + } else { + baseUnset(array, index); + } + } + } + return array; + } + + /** + * The base implementation of `_.random` without support for returning + * floating-point numbers. + * + * @private + * @param {number} lower The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the random number. + */ + function baseRandom(lower, upper) { + return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); + } + + /** + * The base implementation of `_.range` and `_.rangeRight` which doesn't + * coerce arguments. + * + * @private + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @param {number} step The value to increment or decrement by. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the range of numbers. + */ + function baseRange(start, end, step, fromRight) { + var index = -1, + length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), + result = Array(length); + + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; + } + return result; + } + + /** + * The base implementation of `_.repeat` which doesn't coerce arguments. + * + * @private + * @param {string} string The string to repeat. + * @param {number} n The number of times to repeat the string. + * @returns {string} Returns the repeated string. + */ + function baseRepeat(string, n) { + var result = ''; + if (!string || n < 1 || n > MAX_SAFE_INTEGER) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + if (n) { + string += string; + } + } while (n); + + return result; + } + + /** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ + function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); + } + + /** + * The base implementation of `_.sample`. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + */ + function baseSample(collection) { + return arraySample(values(collection)); + } + + /** + * The base implementation of `_.sampleSize` without param guards. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function baseSampleSize(collection, n) { + var array = values(collection); + return shuffleSelf(array, baseClamp(n, 0, array.length)); + } + + /** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } + path = castPath(path, object); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = toKey(path[index]), + newValue = value; + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) + ? objValue + : (isIndex(path[index + 1]) ? [] : {}); + } + } + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; + } + + /** + * The base implementation of `setData` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var baseSetData = !metaMap ? identity : function(func, data) { + metaMap.set(func, data); + return func; + }; + + /** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var baseSetToString = !defineProperty ? identity : function(func, string) { + return defineProperty(func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': constant(string), + 'writable': true + }); + }; + + /** + * The base implementation of `_.shuffle`. + * + * @private + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function baseShuffle(collection) { + return shuffleSelf(values(collection)); + } + + /** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; + } + + /** + * The base implementation of `_.some` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function baseSome(collection, predicate) { + var result; + + baseEach(collection, function(value, index, collection) { + result = predicate(value, index, collection); + return !result; + }); + return !!result; + } + + /** + * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which + * performs a binary search of `array` to determine the index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function baseSortedIndex(array, value, retHighest) { + var low = 0, + high = array == null ? low : array.length; + + if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { + while (low < high) { + var mid = (low + high) >>> 1, + computed = array[mid]; + + if (computed !== null && !isSymbol(computed) && + (retHighest ? (computed <= value) : (computed < value))) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + return baseSortedIndexBy(array, value, identity, retHighest); + } + + /** + * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy` + * which invokes `iteratee` for `value` and each element of `array` to compute + * their sort ranking. The iteratee is invoked with one argument; (value). + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} iteratee The iteratee invoked per element. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function baseSortedIndexBy(array, value, iteratee, retHighest) { + value = iteratee(value); + + var low = 0, + high = array == null ? 0 : array.length, + valIsNaN = value !== value, + valIsNull = value === null, + valIsSymbol = isSymbol(value), + valIsUndefined = value === undefined; + + while (low < high) { + var mid = nativeFloor((low + high) / 2), + computed = iteratee(array[mid]), + othIsDefined = computed !== undefined, + othIsNull = computed === null, + othIsReflexive = computed === computed, + othIsSymbol = isSymbol(computed); + + if (valIsNaN) { + var setLow = retHighest || othIsReflexive; + } else if (valIsUndefined) { + setLow = othIsReflexive && (retHighest || othIsDefined); + } else if (valIsNull) { + setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); + } else if (valIsSymbol) { + setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); + } else if (othIsNull || othIsSymbol) { + setLow = false; + } else { + setLow = retHighest ? (computed <= value) : (computed < value); + } + if (setLow) { + low = mid + 1; + } else { + high = mid; + } + } + return nativeMin(high, MAX_ARRAY_INDEX); + } + + /** + * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ + function baseSortedUniq(array, iteratee) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + if (!index || !eq(computed, seen)) { + var seen = computed; + result[resIndex++] = value === 0 ? 0 : value; + } + } + return result; + } + + /** + * The base implementation of `_.toNumber` which doesn't ensure correct + * conversions of binary, hexadecimal, or octal string values. + * + * @private + * @param {*} value The value to process. + * @returns {number} Returns the number. + */ + function baseToNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + return +value; + } + + /** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ + function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return arrayMap(value, baseToString) + ''; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + } + + /** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ + function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache; + } + else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.unset`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The property path to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + */ + function baseUnset(object, path) { + path = castPath(path, object); + object = parent(object, path); + return object == null || delete object[toKey(last(path))]; + } + + /** + * The base implementation of `_.update`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to update. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseUpdate(object, path, updater, customizer) { + return baseSet(object, path, updater(baseGet(object, path)), customizer); + } + + /** + * The base implementation of methods like `_.dropWhile` and `_.takeWhile` + * without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to query. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [isDrop] Specify dropping elements instead of taking them. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the slice of `array`. + */ + function baseWhile(array, predicate, isDrop, fromRight) { + var length = array.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length) && + predicate(array[index], index, array)) {} + + return isDrop + ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) + : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); + } + + /** + * The base implementation of `wrapperValue` which returns the result of + * performing a sequence of actions on the unwrapped `value`, where each + * successive action is supplied the return value of the previous. + * + * @private + * @param {*} value The unwrapped value. + * @param {Array} actions Actions to perform to resolve the unwrapped value. + * @returns {*} Returns the resolved value. + */ + function baseWrapperValue(value, actions) { + var result = value; + if (result instanceof LazyWrapper) { + result = result.value(); + } + return arrayReduce(actions, function(result, action) { + return action.func.apply(action.thisArg, arrayPush([result], action.args)); + }, result); + } + + /** + * The base implementation of methods like `_.xor`, without support for + * iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of values. + */ + function baseXor(arrays, iteratee, comparator) { + var length = arrays.length; + if (length < 2) { + return length ? baseUniq(arrays[0]) : []; + } + var index = -1, + result = Array(length); + + while (++index < length) { + var array = arrays[index], + othIndex = -1; + + while (++othIndex < length) { + if (othIndex != index) { + result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator); + } + } + } + return baseUniq(baseFlatten(result, 1), iteratee, comparator); + } + + /** + * This base implementation of `_.zipObject` which assigns values using `assignFunc`. + * + * @private + * @param {Array} props The property identifiers. + * @param {Array} values The property values. + * @param {Function} assignFunc The function to assign values. + * @returns {Object} Returns the new object. + */ + function baseZipObject(props, values, assignFunc) { + var index = -1, + length = props.length, + valsLength = values.length, + result = {}; + + while (++index < length) { + var value = index < valsLength ? values[index] : undefined; + assignFunc(result, props[index], value); + } + return result; + } + + /** + * Casts `value` to an empty array if it's not an array like object. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array|Object} Returns the cast array-like object. + */ + function castArrayLikeObject(value) { + return isArrayLikeObject(value) ? value : []; + } + + /** + * Casts `value` to `identity` if it's not a function. + * + * @private + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. + */ + function castFunction(value) { + return typeof value == 'function' ? value : identity; + } + + /** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ + function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath(toString(value)); + } + + /** + * A `baseRest` alias which can be replaced with `identity` by module + * replacement plugins. + * + * @private + * @type {Function} + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + var castRest = baseRest; + + /** + * Casts `array` to a slice if it's needed. + * + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. + */ + function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return (!start && end >= length) ? array : baseSlice(array, start, end); + } + + /** + * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout). + * + * @private + * @param {number|Object} id The timer id or timeout object of the timer to clear. + */ + var clearTimeout = ctxClearTimeout || function(id) { + return root.clearTimeout(id); + }; + + /** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ + function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + + buffer.copy(result); + return result; + } + + /** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ + function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; + } + + /** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ + function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); + } + + /** + * Creates a clone of `map`. + * + * @private + * @param {Object} map The map to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned map. + */ + function cloneMap(map, isDeep, cloneFunc) { + var array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG) : mapToArray(map); + return arrayReduce(array, addMapEntry, new map.constructor); + } + + /** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ + function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; + } + + /** + * Creates a clone of `set`. + * + * @private + * @param {Object} set The set to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned set. + */ + function cloneSet(set, isDeep, cloneFunc) { + var array = isDeep ? cloneFunc(setToArray(set), CLONE_DEEP_FLAG) : setToArray(set); + return arrayReduce(array, addSetEntry, new set.constructor); + } + + /** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ + function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; + } + + /** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ + function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); + } + + /** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ + function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = isSymbol(value); + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = isSymbol(other); + + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { + return 1; + } + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { + return -1; + } + } + return 0; + } + + /** + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ + function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; + } + + /** + * Creates an array that is the composition of partially applied arguments, + * placeholders, and provided arguments into a single array of arguments. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to prepend to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgs(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersLength = holders.length, + leftIndex = -1, + leftLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(leftLength + rangeLength), + isUncurried = !isCurried; + + while (++leftIndex < leftLength) { + result[leftIndex] = partials[leftIndex]; + } + while (++argsIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[holders[argsIndex]] = args[argsIndex]; + } + } + while (rangeLength--) { + result[leftIndex++] = args[argsIndex++]; + } + return result; + } + + /** + * This function is like `composeArgs` except that the arguments composition + * is tailored for `_.partialRight`. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to append to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgsRight(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersIndex = -1, + holdersLength = holders.length, + rightIndex = -1, + rightLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(rangeLength + rightLength), + isUncurried = !isCurried; + + while (++argsIndex < rangeLength) { + result[argsIndex] = args[argsIndex]; + } + var offset = argsIndex; + while (++rightIndex < rightLength) { + result[offset + rightIndex] = partials[rightIndex]; + } + while (++holdersIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[offset + holders[holdersIndex]] = args[argsIndex++]; + } + } + return result; + } + + /** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ + function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; + } + + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ + function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; + } + + /** + * Copies own symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); + } + + /** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); + } + + /** + * Creates a function like `_.groupBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} [initializer] The accumulator object initializer. + * @returns {Function} Returns the new aggregator function. + */ + function createAggregator(setter, initializer) { + return function(collection, iteratee) { + var func = isArray(collection) ? arrayAggregator : baseAggregator, + accumulator = initializer ? initializer() : {}; + + return func(collection, setter, getIteratee(iteratee, 2), accumulator); + }; + } + + /** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ + function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); + } + + /** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; + } + + /** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + + /** + * Creates a function that wraps `func` to invoke it with the optional `this` + * binding of `thisArg`. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createBind(func, bitmask, thisArg) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return fn.apply(isBind ? thisArg : this, arguments); + } + return wrapper; + } + + /** + * Creates a function like `_.lowerFirst`. + * + * @private + * @param {string} methodName The name of the `String` case method to use. + * @returns {Function} Returns the new case function. + */ + function createCaseFirst(methodName) { + return function(string) { + string = toString(string); + + var strSymbols = hasUnicode(string) + ? stringToArray(string) + : undefined; + + var chr = strSymbols + ? strSymbols[0] + : string.charAt(0); + + var trailing = strSymbols + ? castSlice(strSymbols, 1).join('') + : string.slice(1); + + return chr[methodName]() + trailing; + }; + } + + /** + * Creates a function like `_.camelCase`. + * + * @private + * @param {Function} callback The function to combine each word. + * @returns {Function} Returns the new compounder function. + */ + function createCompounder(callback) { + return function(string) { + return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); + }; + } + + /** + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. + */ + function createCtor(Ctor) { + return function() { + // Use a `switch` statement to work with class constructors. See + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + switch (args.length) { + case 0: return new Ctor; + case 1: return new Ctor(args[0]); + case 2: return new Ctor(args[0], args[1]); + case 3: return new Ctor(args[0], args[1], args[2]); + case 4: return new Ctor(args[0], args[1], args[2], args[3]); + case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); + case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); + case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); + } + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; + } + + /** + * Creates a function that wraps `func` to enable currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {number} arity The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createCurry(func, bitmask, arity) { + var Ctor = createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length, + placeholder = getHolder(wrapper); + + while (index--) { + args[index] = arguments[index]; + } + var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) + ? [] + : replaceHolders(args, placeholder); + + length -= holders.length; + if (length < arity) { + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, undefined, + args, holders, undefined, undefined, arity - length); + } + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return apply(fn, this, args); + } + return wrapper; + } + + /** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ + function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = getIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; + } + + /** + * Creates a `_.flow` or `_.flowRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new flow function. + */ + function createFlow(fromRight) { + return flatRest(function(funcs) { + var length = funcs.length, + index = length, + prereq = LodashWrapper.prototype.thru; + + if (fromRight) { + funcs.reverse(); + } + while (index--) { + var func = funcs[index]; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (prereq && !wrapper && getFuncName(func) == 'wrapper') { + var wrapper = new LodashWrapper([], true); + } + } + index = wrapper ? index : length; + while (++index < length) { + func = funcs[index]; + + var funcName = getFuncName(func), + data = funcName == 'wrapper' ? getData(func) : undefined; + + if (data && isLaziable(data[0]) && + data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && + !data[4].length && data[9] == 1 + ) { + wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); + } else { + wrapper = (func.length == 1 && isLaziable(func)) + ? wrapper[funcName]() + : wrapper.thru(func); + } + } + return function() { + var args = arguments, + value = args[0]; + + if (wrapper && args.length == 1 && isArray(value)) { + return wrapper.plant(value).value(); + } + var index = 0, + result = length ? funcs[index].apply(this, args) : value; + + while (++index < length) { + result = funcs[index].call(this, result); + } + return result; + }; + }); + } + + /** + * Creates a function that wraps `func` to invoke it with optional `this` + * binding of `thisArg`, partial application, and currying. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [partialsRight] The arguments to append to those provided + * to the new function. + * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { + var isAry = bitmask & WRAP_ARY_FLAG, + isBind = bitmask & WRAP_BIND_FLAG, + isBindKey = bitmask & WRAP_BIND_KEY_FLAG, + isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), + isFlip = bitmask & WRAP_FLIP_FLAG, + Ctor = isBindKey ? undefined : createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length; + + while (index--) { + args[index] = arguments[index]; + } + if (isCurried) { + var placeholder = getHolder(wrapper), + holdersCount = countHolders(args, placeholder); + } + if (partials) { + args = composeArgs(args, partials, holders, isCurried); + } + if (partialsRight) { + args = composeArgsRight(args, partialsRight, holdersRight, isCurried); + } + length -= holdersCount; + if (isCurried && length < arity) { + var newHolders = replaceHolders(args, placeholder); + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, thisArg, + args, newHolders, argPos, ary, arity - length + ); + } + var thisBinding = isBind ? thisArg : this, + fn = isBindKey ? thisBinding[func] : func; + + length = args.length; + if (argPos) { + args = reorder(args, argPos); + } else if (isFlip && length > 1) { + args.reverse(); + } + if (isAry && ary < length) { + args.length = ary; + } + if (this && this !== root && this instanceof wrapper) { + fn = Ctor || createCtor(fn); + } + return fn.apply(thisBinding, args); + } + return wrapper; + } + + /** + * Creates a function like `_.invertBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} toIteratee The function to resolve iteratees. + * @returns {Function} Returns the new inverter function. + */ + function createInverter(setter, toIteratee) { + return function(object, iteratee) { + return baseInverter(object, setter, toIteratee(iteratee), {}); + }; + } + + /** + * Creates a function that performs a mathematical operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @param {number} [defaultValue] The value used for `undefined` arguments. + * @returns {Function} Returns the new mathematical operation function. + */ + function createMathOperation(operator, defaultValue) { + return function(value, other) { + var result; + if (value === undefined && other === undefined) { + return defaultValue; + } + if (value !== undefined) { + result = value; + } + if (other !== undefined) { + if (result === undefined) { + return other; + } + if (typeof value == 'string' || typeof other == 'string') { + value = baseToString(value); + other = baseToString(other); + } else { + value = baseToNumber(value); + other = baseToNumber(other); + } + result = operator(value, other); + } + return result; + }; + } + + /** + * Creates a function like `_.over`. + * + * @private + * @param {Function} arrayFunc The function to iterate over iteratees. + * @returns {Function} Returns the new over function. + */ + function createOver(arrayFunc) { + return flatRest(function(iteratees) { + iteratees = arrayMap(iteratees, baseUnary(getIteratee())); + return baseRest(function(args) { + var thisArg = this; + return arrayFunc(iteratees, function(iteratee) { + return apply(iteratee, thisArg, args); + }); + }); + }); + } + + /** + * Creates the padding for `string` based on `length`. The `chars` string + * is truncated if the number of characters exceeds `length`. + * + * @private + * @param {number} length The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padding for `string`. + */ + function createPadding(length, chars) { + chars = chars === undefined ? ' ' : baseToString(chars); + + var charsLength = chars.length; + if (charsLength < 2) { + return charsLength ? baseRepeat(chars, length) : chars; + } + var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); + return hasUnicode(chars) + ? castSlice(stringToArray(result), 0, length).join('') + : result.slice(0, length); + } + + /** + * Creates a function that wraps `func` to invoke it with the `this` binding + * of `thisArg` and `partials` prepended to the arguments it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} partials The arguments to prepend to those provided to + * the new function. + * @returns {Function} Returns the new wrapped function. + */ + function createPartial(func, bitmask, thisArg, partials) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var argsIndex = -1, + argsLength = arguments.length, + leftIndex = -1, + leftLength = partials.length, + args = Array(leftLength + argsLength), + fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + return apply(fn, isBind ? thisArg : this, args); + } + return wrapper; + } + + /** + * Creates a `_.range` or `_.rangeRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new range function. + */ + function createRange(fromRight) { + return function(start, end, step) { + if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { + end = step = undefined; + } + // Ensure the sign of `-0` is preserved. + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); + return baseRange(start, end, step, fromRight); + }; + } + + /** + * Creates a function that performs a relational operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @returns {Function} Returns the new relational operation function. + */ + function createRelationalOperation(operator) { + return function(value, other) { + if (!(typeof value == 'string' && typeof other == 'string')) { + value = toNumber(value); + other = toNumber(other); + } + return operator(value, other); + }; + } + + /** + * Creates a function that wraps `func` to continue currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {Function} wrapFunc The function to create the `func` wrapper. + * @param {*} placeholder The placeholder value. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { + var isCurry = bitmask & WRAP_CURRY_FLAG, + newHolders = isCurry ? holders : undefined, + newHoldersRight = isCurry ? undefined : holders, + newPartials = isCurry ? partials : undefined, + newPartialsRight = isCurry ? undefined : partials; + + bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG); + bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); + + if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { + bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); + } + var newData = [ + func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, + newHoldersRight, argPos, ary, arity + ]; + + var result = wrapFunc.apply(undefined, newData); + if (isLaziable(func)) { + setData(result, newData); + } + result.placeholder = placeholder; + return setWrapToString(result, func, bitmask); + } + + /** + * Creates a function like `_.round`. + * + * @private + * @param {string} methodName The name of the `Math` method to use when rounding. + * @returns {Function} Returns the new round function. + */ + function createRound(methodName) { + var func = Math[methodName]; + return function(number, precision) { + number = toNumber(number); + precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); + if (precision) { + // Shift with exponential notation to avoid floating-point issues. + // See [MDN](https://mdn.io/round#Examples) for more details. + var pair = (toString(number) + 'e').split('e'), + value = func(pair[0] + 'e' + (+pair[1] + precision)); + + pair = (toString(value) + 'e').split('e'); + return +(pair[0] + 'e' + (+pair[1] - precision)); + } + return func(number); + }; + } + + /** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ + var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { + return new Set(values); + }; + + /** + * Creates a `_.toPairs` or `_.toPairsIn` function. + * + * @private + * @param {Function} keysFunc The function to get the keys of a given object. + * @returns {Function} Returns the new pairs function. + */ + function createToPairs(keysFunc) { + return function(object) { + var tag = getTag(object); + if (tag == mapTag) { + return mapToArray(object); + } + if (tag == setTag) { + return setToPairs(object); + } + return baseToPairs(object, keysFunc(object)); + }; + } + + /** + * Creates a function that either curries or invokes `func` with optional + * `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` or `_.curryRight` of a bound function + * 8 - `_.curry` + * 16 - `_.curryRight` + * 32 - `_.partial` + * 64 - `_.partialRight` + * 128 - `_.rearg` + * 256 - `_.ary` + * 512 - `_.flip` + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to be partially applied. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { + var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; + if (!isBindKey && typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = partials ? partials.length : 0; + if (!length) { + bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); + partials = holders = undefined; + } + ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); + arity = arity === undefined ? arity : toInteger(arity); + length -= holders ? holders.length : 0; + + if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { + var partialsRight = partials, + holdersRight = holders; + + partials = holders = undefined; + } + var data = isBindKey ? undefined : getData(func); + + var newData = [ + func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, + argPos, ary, arity + ]; + + if (data) { + mergeData(newData, data); + } + func = newData[0]; + bitmask = newData[1]; + thisArg = newData[2]; + partials = newData[3]; + holders = newData[4]; + arity = newData[9] = newData[9] === undefined + ? (isBindKey ? 0 : func.length) + : nativeMax(newData[9] - length, 0); + + if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { + bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); + } + if (!bitmask || bitmask == WRAP_BIND_FLAG) { + var result = createBind(func, bitmask, thisArg); + } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { + result = createCurry(func, bitmask, arity); + } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { + result = createPartial(func, bitmask, thisArg, partials); + } else { + result = createHybrid.apply(undefined, newData); + } + var setter = data ? baseSetData : setData; + return setWrapToString(setter(result, newData), func, bitmask); + } + + /** + * Used by `_.defaults` to customize its `_.assignIn` use to assign properties + * of source objects to the destination object for all destination properties + * that resolve to `undefined`. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to assign. + * @param {Object} object The parent object of `objValue`. + * @returns {*} Returns the value to assign. + */ + function customDefaultsAssignIn(objValue, srcValue, key, object) { + if (objValue === undefined || + (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { + return srcValue; + } + return objValue; + } + + /** + * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source + * objects into destination objects that are passed thru. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to merge. + * @param {Object} object The parent object of `objValue`. + * @param {Object} source The parent object of `srcValue`. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + * @returns {*} Returns the value to assign. + */ + function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { + if (isObject(objValue) && isObject(srcValue)) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, objValue); + baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); + stack['delete'](srcValue); + } + return objValue; + } + + /** + * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain + * objects. + * + * @private + * @param {*} value The value to inspect. + * @param {string} key The key of the property to inspect. + * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. + */ + function customOmitClone(value) { + return isPlainObject(value) ? undefined : value; + } + + /** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(array); + if (stacked && stack.get(other)) { + return stacked == other; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!arraySome(other, function(othValue, othIndex) { + if (!cacheHas(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; + } + + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new Uint8Array(object), new Uint8Array(other))) { + return false; + } + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + case mapTag: + var convert = mapToArray; + + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; + } + + /** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = getAllKeys(object), + objLength = objProps.length, + othProps = getAllKeys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked && stack.get(other)) { + return stacked == other; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; + } + + /** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); + } + + /** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); + } + + /** + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeysIn(object) { + return baseGetAllKeys(object, keysIn, getSymbolsIn); + } + + /** + * Gets metadata for `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {*} Returns the metadata for `func`. + */ + var getData = !metaMap ? noop : function(func) { + return metaMap.get(func); + }; + + /** + * Gets the name of `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {string} Returns the function name. + */ + function getFuncName(func) { + var result = (func.name + ''), + array = realNames[result], + length = hasOwnProperty.call(realNames, result) ? array.length : 0; + + while (length--) { + var data = array[length], + otherFunc = data.func; + if (otherFunc == null || otherFunc == func) { + return data.name; + } + } + return result; + } + + /** + * Gets the argument placeholder value for `func`. + * + * @private + * @param {Function} func The function to inspect. + * @returns {*} Returns the placeholder value. + */ + function getHolder(func) { + var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func; + return object.placeholder; + } + + /** + * Gets the appropriate "iteratee" function. If `_.iteratee` is customized, + * this function returns the custom method, otherwise it returns `baseIteratee`. + * If arguments are provided, the chosen function is invoked with them and + * its result is returned. + * + * @private + * @param {*} [value] The value to convert to an iteratee. + * @param {number} [arity] The arity of the created iteratee. + * @returns {Function} Returns the chosen function or its result. + */ + function getIteratee() { + var result = lodash.iteratee || iteratee; + result = result === iteratee ? baseIteratee : result; + return arguments.length ? result(arguments[0], arguments[1]) : result; + } + + /** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; + } + + /** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ + function getMatchData(object) { + var result = keys(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, isStrictComparable(value)]; + } + return result; + } + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; + } + + /** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; + } + + /** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbols = !nativeGetSymbols ? stubArray : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); + }; + + /** + * Creates an array of the own and inherited enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { + var result = []; + while (object) { + arrayPush(result, getSymbols(object)); + object = getPrototype(object); + } + return result; + }; + + /** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + var getTag = baseGetTag; + + // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. + if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function(value) { + var result = baseGetTag(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; + } + + /** + * Gets the view, applying any `transforms` to the `start` and `end` positions. + * + * @private + * @param {number} start The start of the view. + * @param {number} end The end of the view. + * @param {Array} transforms The transformations to apply to the view. + * @returns {Object} Returns an object containing the `start` and `end` + * positions of the view. + */ + function getView(start, end, transforms) { + var index = -1, + length = transforms.length; + + while (++index < length) { + var data = transforms[index], + size = data.size; + + switch (data.type) { + case 'drop': start += size; break; + case 'dropRight': end -= size; break; + case 'take': end = nativeMin(end, start + size); break; + case 'takeRight': start = nativeMax(start, end - size); break; + } + } + return { 'start': start, 'end': end }; + } + + /** + * Extracts wrapper details from the `source` body comment. + * + * @private + * @param {string} source The source to inspect. + * @returns {Array} Returns the wrapper details. + */ + function getWrapDetails(source) { + var match = source.match(reWrapDetails); + return match ? match[1].split(reSplitDetails) : []; + } + + /** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ + function hasPath(object, path, hasFunc) { + path = castPath(path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && isLength(length) && isIndex(key, length) && + (isArray(object) || isArguments(object)); + } + + /** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ + function initCloneArray(array) { + var length = array.length, + result = array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; + } + + /** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneObject(object) { + return (typeof object.constructor == 'function' && !isPrototype(object)) + ? baseCreate(getPrototype(object)) + : {}; + } + + /** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneByTag(object, tag, cloneFunc, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return cloneDataView(object, isDeep); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return cloneTypedArray(object, isDeep); + + case mapTag: + return cloneMap(object, isDeep, cloneFunc); + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return cloneRegExp(object); + + case setTag: + return cloneSet(object, isDeep, cloneFunc); + + case symbolTag: + return cloneSymbol(object); + } + } + + /** + * Inserts wrapper `details` in a comment at the top of the `source` body. + * + * @private + * @param {string} source The source to modify. + * @returns {Array} details The details to insert. + * @returns {string} Returns the modified source. + */ + function insertWrapDetails(source, details) { + var length = details.length; + if (!length) { + return source; + } + var lastIndex = length - 1; + details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; + details = details.join(length > 2 ? ', ' : ' '); + return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); + } + + /** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ + function isFlattenable(value) { + return isArray(value) || isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); + } + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && + (typeof value == 'number' || reIsUint.test(value)) && + (value > -1 && value % 1 == 0 && value < length); + } + + /** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; + } + + /** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ + function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); + } + + /** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ + function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); + } + + /** + * Checks if `func` has a lazy counterpart. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` has a lazy counterpart, + * else `false`. + */ + function isLaziable(func) { + var funcName = getFuncName(func), + other = lodash[funcName]; + + if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { + return false; + } + if (func === other) { + return true; + } + var data = getData(other); + return !!data && func === data[0]; + } + + /** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ + function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); + } + + /** + * Checks if `func` is capable of being masked. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `func` is maskable, else `false`. + */ + var isMaskable = coreJsData ? isFunction : stubFalse; + + /** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; + } + + /** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ + function isStrictComparable(value) { + return value === value && !isObject(value); + } + + /** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; + } + + /** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ + function memoizeCapped(func) { + var result = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; + } + + /** + * Merges the function metadata of `source` into `data`. + * + * Merging metadata reduces the number of wrappers used to invoke a function. + * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` + * may be applied regardless of execution order. Methods like `_.ary` and + * `_.rearg` modify function arguments, making the order in which they are + * executed important, preventing the merging of metadata. However, we make + * an exception for a safe combined case where curried functions have `_.ary` + * and or `_.rearg` applied. + * + * @private + * @param {Array} data The destination metadata. + * @param {Array} source The source metadata. + * @returns {Array} Returns `data`. + */ + function mergeData(data, source) { + var bitmask = data[1], + srcBitmask = source[1], + newBitmask = bitmask | srcBitmask, + isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); + + var isCombo = + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) || + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) || + ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG)); + + // Exit early if metadata can't be merged. + if (!(isCommon || isCombo)) { + return data; + } + // Use source `thisArg` if available. + if (srcBitmask & WRAP_BIND_FLAG) { + data[2] = source[2]; + // Set when currying a bound function. + newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; + } + // Compose partial arguments. + var value = source[3]; + if (value) { + var partials = data[3]; + data[3] = partials ? composeArgs(partials, value, source[4]) : value; + data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; + } + // Compose partial right arguments. + value = source[5]; + if (value) { + partials = data[5]; + data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; + data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; + } + // Use source `argPos` if available. + value = source[7]; + if (value) { + data[7] = value; + } + // Use source `ary` if it's smaller. + if (srcBitmask & WRAP_ARY_FLAG) { + data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); + } + // Use source `arity` if one is not provided. + if (data[9] == null) { + data[9] = source[9]; + } + // Use source `func` and merge bitmasks. + data[0] = source[0]; + data[1] = newBitmask; + + return data; + } + + /** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; + } + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString.call(value); + } + + /** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ + function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; + } + + /** + * Gets the parent value at `path` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} path The path to get the parent value of. + * @returns {*} Returns the parent value. + */ + function parent(object, path) { + return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); + } + + /** + * Reorder `array` according to the specified indexes where the element at + * the first index is assigned as the first element, the element at + * the second index is assigned as the second element, and so on. + * + * @private + * @param {Array} array The array to reorder. + * @param {Array} indexes The arranged array indexes. + * @returns {Array} Returns `array`. + */ + function reorder(array, indexes) { + var arrLength = array.length, + length = nativeMin(indexes.length, arrLength), + oldArray = copyArray(array); + + while (length--) { + var index = indexes[length]; + array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; + } + return array; + } + + /** + * Sets metadata for `func`. + * + * **Note:** If this function becomes hot, i.e. is invoked a lot in a short + * period of time, it will trip its breaker and transition to an identity + * function to avoid garbage collection pauses in V8. See + * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) + * for more details. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var setData = shortOut(baseSetData); + + /** + * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout). + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @returns {number|Object} Returns the timer id or timeout object. + */ + var setTimeout = ctxSetTimeout || function(func, wait) { + return root.setTimeout(func, wait); + }; + + /** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var setToString = shortOut(baseSetToString); + + /** + * Sets the `toString` method of `wrapper` to mimic the source of `reference` + * with wrapper details in a comment at the top of the source body. + * + * @private + * @param {Function} wrapper The function to modify. + * @param {Function} reference The reference function. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Function} Returns `wrapper`. + */ + function setWrapToString(wrapper, reference, bitmask) { + var source = (reference + ''); + return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); + } + + /** + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. + * + * @private + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. + */ + function shortOut(func) { + var count = 0, + lastCalled = 0; + + return function() { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined, arguments); + }; + } + + /** + * A specialized version of `_.shuffle` which mutates and sets the size of `array`. + * + * @private + * @param {Array} array The array to shuffle. + * @param {number} [size=array.length] The size of `array`. + * @returns {Array} Returns `array`. + */ + function shuffleSelf(array, size) { + var index = -1, + length = array.length, + lastIndex = length - 1; + + size = size === undefined ? length : size; + while (++index < size) { + var rand = baseRandom(index, lastIndex), + value = array[rand]; + + array[rand] = array[index]; + array[index] = value; + } + array.length = size; + return array; + } + + /** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ + var stringToPath = memoizeCapped(function(string) { + var result = []; + if (reLeadingDot.test(string)) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, string) { + result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; + }); + + /** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ + function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + } + + /** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; + } + + /** + * Updates wrapper `details` based on `bitmask` flags. + * + * @private + * @returns {Array} details The details to modify. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Array} Returns `details`. + */ + function updateWrapDetails(details, bitmask) { + arrayEach(wrapFlags, function(pair) { + var value = '_.' + pair[0]; + if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { + details.push(value); + } + }); + return details.sort(); + } + + /** + * Creates a clone of `wrapper`. + * + * @private + * @param {Object} wrapper The wrapper to clone. + * @returns {Object} Returns the cloned wrapper. + */ + function wrapperClone(wrapper) { + if (wrapper instanceof LazyWrapper) { + return wrapper.clone(); + } + var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); + result.__actions__ = copyArray(wrapper.__actions__); + result.__index__ = wrapper.__index__; + result.__values__ = wrapper.__values__; + return result; + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of elements split into groups the length of `size`. + * If `array` can't be split evenly, the final chunk will be the remaining + * elements. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to process. + * @param {number} [size=1] The length of each chunk + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the new array of chunks. + * @example + * + * _.chunk(['a', 'b', 'c', 'd'], 2); + * // => [['a', 'b'], ['c', 'd']] + * + * _.chunk(['a', 'b', 'c', 'd'], 3); + * // => [['a', 'b', 'c'], ['d']] + */ + function chunk(array, size, guard) { + if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) { + size = 1; + } else { + size = nativeMax(toInteger(size), 0); + } + var length = array == null ? 0 : array.length; + if (!length || size < 1) { + return []; + } + var index = 0, + resIndex = 0, + result = Array(nativeCeil(length / size)); + + while (index < length) { + result[resIndex++] = baseSlice(array, index, (index += size)); + } + return result; + } + + /** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ + function compact(array) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result[resIndex++] = value; + } + } + return result; + } + + /** + * Creates a new array concatenating `array` with any additional arrays + * and/or values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to concatenate. + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var other = _.concat(array, 2, [3], [[4]]); + * + * console.log(other); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ + function concat() { + var length = arguments.length; + if (!length) { + return []; + } + var args = Array(length - 1), + array = arguments[0], + index = length; + + while (index--) { + args[index - 1] = arguments[index]; + } + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); + } + + /** + * Creates an array of `array` values not included in the other given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * **Note:** Unlike `_.pullAll`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.without, _.xor + * @example + * + * _.difference([2, 1], [2, 3]); + * // => [1] + */ + var difference = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) + : []; + }); + + /** + * This method is like `_.difference` except that it accepts `iteratee` which + * is invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * **Note:** Unlike `_.pullAllBy`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2] + * + * // The `_.property` iteratee shorthand. + * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + var differenceBy = baseRest(function(array, values) { + var iteratee = last(values); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)) + : []; + }); + + /** + * This method is like `_.difference` except that it accepts `comparator` + * which is invoked to compare elements of `array` to `values`. The order and + * references of result values are determined by the first array. The comparator + * is invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.pullAllWith`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * + * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); + * // => [{ 'x': 2, 'y': 1 }] + */ + var differenceWith = baseRest(function(array, values) { + var comparator = last(values); + if (isArrayLikeObject(comparator)) { + comparator = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator) + : []; + }); + + /** + * Creates a slice of `array` with `n` elements dropped from the beginning. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.drop([1, 2, 3]); + * // => [2, 3] + * + * _.drop([1, 2, 3], 2); + * // => [3] + * + * _.drop([1, 2, 3], 5); + * // => [] + * + * _.drop([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function drop(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, n < 0 ? 0 : n, length); + } + + /** + * Creates a slice of `array` with `n` elements dropped from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRight([1, 2, 3]); + * // => [1, 2] + * + * _.dropRight([1, 2, 3], 2); + * // => [1] + * + * _.dropRight([1, 2, 3], 5); + * // => [] + * + * _.dropRight([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function dropRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` excluding elements dropped from the end. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.dropRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney'] + * + * // The `_.matches` iteratee shorthand. + * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropRightWhile(users, ['active', false]); + * // => objects for ['barney'] + * + * // The `_.property` iteratee shorthand. + * _.dropRightWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ + function dropRightWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), true, true) + : []; + } + + /** + * Creates a slice of `array` excluding elements dropped from the beginning. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.dropWhile(users, function(o) { return !o.active; }); + * // => objects for ['pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.dropWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropWhile(users, ['active', false]); + * // => objects for ['pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.dropWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ + function dropWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), true) + : []; + } + + /** + * Fills elements of `array` with `value` from `start` up to, but not + * including, `end`. + * + * **Note:** This method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Array + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.fill(array, 'a'); + * console.log(array); + * // => ['a', 'a', 'a'] + * + * _.fill(Array(3), 2); + * // => [2, 2, 2] + * + * _.fill([4, 6, 8, 10], '*', 1, 3); + * // => [4, '*', '*', 10] + */ + function fill(array, value, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { + start = 0; + end = length; + } + return baseFill(array, value, start, end); + } + + /** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ + function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, getIteratee(predicate, 3), index); + } + + /** + * This method is like `_.findIndex` except that it iterates over elements + * of `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); + * // => 2 + * + * // The `_.matches` iteratee shorthand. + * _.findLastIndex(users, { 'user': 'barney', 'active': true }); + * // => 0 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastIndex(users, ['active', false]); + * // => 2 + * + * // The `_.property` iteratee shorthand. + * _.findLastIndex(users, 'active'); + * // => 0 + */ + function findLastIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length - 1; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = fromIndex < 0 + ? nativeMax(length + index, 0) + : nativeMin(index, length - 1); + } + return baseFindIndex(array, getIteratee(predicate, 3), index, true); + } + + /** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ + function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; + } + + /** + * Recursively flattens `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, [3, [4]], 5]]); + * // => [1, 2, 3, 4, 5] + */ + function flattenDeep(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, INFINITY) : []; + } + + /** + * Recursively flatten `array` up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Array + * @param {Array} array The array to flatten. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * var array = [1, [2, [3, [4]], 5]]; + * + * _.flattenDepth(array, 1); + * // => [1, 2, [3, [4]], 5] + * + * _.flattenDepth(array, 2); + * // => [1, 2, 3, [4], 5] + */ + function flattenDepth(array, depth) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(array, depth); + } + + /** + * The inverse of `_.toPairs`; this method returns an object composed + * from key-value `pairs`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} pairs The key-value pairs. + * @returns {Object} Returns the new object. + * @example + * + * _.fromPairs([['a', 1], ['b', 2]]); + * // => { 'a': 1, 'b': 2 } + */ + function fromPairs(pairs) { + var index = -1, + length = pairs == null ? 0 : pairs.length, + result = {}; + + while (++index < length) { + var pair = pairs[index]; + result[pair[0]] = pair[1]; + } + return result; + } + + /** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias first + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.head([1, 2, 3]); + * // => 1 + * + * _.head([]); + * // => undefined + */ + function head(array) { + return (array && array.length) ? array[0] : undefined; + } + + /** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the + * offset from the end of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // Search from the `fromIndex`. + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + */ + function indexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseIndexOf(array, value, index); + } + + /** + * Gets all but the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + */ + function initial(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 0, -1) : []; + } + + /** + * Creates an array of unique values that are included in all given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersection([2, 1], [2, 3]); + * // => [2] + */ + var intersection = baseRest(function(arrays) { + var mapped = arrayMap(arrays, castArrayLikeObject); + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped) + : []; + }); + + /** + * This method is like `_.intersection` except that it accepts `iteratee` + * which is invoked for each element of each `arrays` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [2.1] + * + * // The `_.property` iteratee shorthand. + * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }] + */ + var intersectionBy = baseRest(function(arrays) { + var iteratee = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + if (iteratee === last(mapped)) { + iteratee = undefined; + } else { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, getIteratee(iteratee, 2)) + : []; + }); + + /** + * This method is like `_.intersection` except that it accepts `comparator` + * which is invoked to compare elements of `arrays`. The order and references + * of result values are determined by the first array. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.intersectionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }] + */ + var intersectionWith = baseRest(function(arrays) { + var comparator = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + comparator = typeof comparator == 'function' ? comparator : undefined; + if (comparator) { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, undefined, comparator) + : []; + }); + + /** + * Converts all elements in `array` into a string separated by `separator`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to convert. + * @param {string} [separator=','] The element separator. + * @returns {string} Returns the joined string. + * @example + * + * _.join(['a', 'b', 'c'], '~'); + * // => 'a~b~c' + */ + function join(array, separator) { + return array == null ? '' : nativeJoin.call(array, separator); + } + + /** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ + function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; + } + + /** + * This method is like `_.indexOf` except that it iterates over elements of + * `array` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.lastIndexOf([1, 2, 1, 2], 2); + * // => 3 + * + * // Search from the `fromIndex`. + * _.lastIndexOf([1, 2, 1, 2], 2, 2); + * // => 1 + */ + function lastIndexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); + } + return value === value + ? strictLastIndexOf(array, value, index) + : baseFindIndex(array, baseIsNaN, index, true); + } + + /** + * Gets the element at index `n` of `array`. If `n` is negative, the nth + * element from the end is returned. + * + * @static + * @memberOf _ + * @since 4.11.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=0] The index of the element to return. + * @returns {*} Returns the nth element of `array`. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * + * _.nth(array, 1); + * // => 'b' + * + * _.nth(array, -2); + * // => 'c'; + */ + function nth(array, n) { + return (array && array.length) ? baseNth(array, toInteger(n)) : undefined; + } + + /** + * Removes all given values from `array` using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove` + * to remove elements from an array by predicate. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...*} [values] The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pull(array, 'a', 'c'); + * console.log(array); + * // => ['b', 'b'] + */ + var pull = baseRest(pullAll); + + /** + * This method is like `_.pull` except that it accepts an array of values to remove. + * + * **Note:** Unlike `_.difference`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pullAll(array, ['a', 'c']); + * console.log(array); + * // => ['b', 'b'] + */ + function pullAll(array, values) { + return (array && array.length && values && values.length) + ? basePullAll(array, values) + : array; + } + + /** + * This method is like `_.pullAll` except that it accepts `iteratee` which is + * invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The iteratee is invoked with one argument: (value). + * + * **Note:** Unlike `_.differenceBy`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; + * + * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x'); + * console.log(array); + * // => [{ 'x': 2 }] + */ + function pullAllBy(array, values, iteratee) { + return (array && array.length && values && values.length) + ? basePullAll(array, values, getIteratee(iteratee, 2)) + : array; + } + + /** + * This method is like `_.pullAll` except that it accepts `comparator` which + * is invoked to compare elements of `array` to `values`. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.differenceWith`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }]; + * + * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual); + * console.log(array); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }] + */ + function pullAllWith(array, values, comparator) { + return (array && array.length && values && values.length) + ? basePullAll(array, values, undefined, comparator) + : array; + } + + /** + * Removes elements from `array` corresponding to `indexes` and returns an + * array of removed elements. + * + * **Note:** Unlike `_.at`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...(number|number[])} [indexes] The indexes of elements to remove. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * var pulled = _.pullAt(array, [1, 3]); + * + * console.log(array); + * // => ['a', 'c'] + * + * console.log(pulled); + * // => ['b', 'd'] + */ + var pullAt = flatRest(function(array, indexes) { + var length = array == null ? 0 : array.length, + result = baseAt(array, indexes); + + basePullAt(array, arrayMap(indexes, function(index) { + return isIndex(index, length) ? +index : index; + }).sort(compareAscending)); + + return result; + }); + + /** + * Removes all elements from `array` that `predicate` returns truthy for + * and returns an array of the removed elements. The predicate is invoked + * with three arguments: (value, index, array). + * + * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull` + * to pull elements from an array by value. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = [1, 2, 3, 4]; + * var evens = _.remove(array, function(n) { + * return n % 2 == 0; + * }); + * + * console.log(array); + * // => [1, 3] + * + * console.log(evens); + * // => [2, 4] + */ + function remove(array, predicate) { + var result = []; + if (!(array && array.length)) { + return result; + } + var index = -1, + indexes = [], + length = array.length; + + predicate = getIteratee(predicate, 3); + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result.push(value); + indexes.push(index); + } + } + basePullAt(array, indexes); + return result; + } + + /** + * Reverses `array` so that the first element becomes the last, the second + * element becomes the second to last, and so on. + * + * **Note:** This method mutates `array` and is based on + * [`Array#reverse`](https://mdn.io/Array/reverse). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.reverse(array); + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function reverse(array) { + return array == null ? array : nativeReverse.call(array); + } + + /** + * Creates a slice of `array` from `start` up to, but not including, `end`. + * + * **Note:** This method is used instead of + * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are + * returned. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function slice(array, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { + start = 0; + end = length; + } + else { + start = start == null ? 0 : toInteger(start); + end = end === undefined ? length : toInteger(end); + } + return baseSlice(array, start, end); + } + + /** + * Uses a binary search to determine the lowest index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedIndex([30, 50], 40); + * // => 1 + */ + function sortedIndex(array, value) { + return baseSortedIndex(array, value); + } + + /** + * This method is like `_.sortedIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.sortedIndexBy(objects, { 'x': 4 }, 'x'); + * // => 0 + */ + function sortedIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2)); + } + + /** + * This method is like `_.indexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedIndexOf([4, 5, 5, 5, 6], 5); + * // => 1 + */ + function sortedIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value); + if (index < length && eq(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.sortedIndex` except that it returns the highest + * index at which `value` should be inserted into `array` in order to + * maintain its sort order. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedLastIndex([4, 5, 5, 5, 6], 5); + * // => 4 + */ + function sortedLastIndex(array, value) { + return baseSortedIndex(array, value, true); + } + + /** + * This method is like `_.sortedLastIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 1 + * + * // The `_.property` iteratee shorthand. + * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x'); + * // => 1 + */ + function sortedLastIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true); + } + + /** + * This method is like `_.lastIndexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5); + * // => 3 + */ + function sortedLastIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value, true) - 1; + if (eq(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.uniq` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniq([1, 1, 2]); + * // => [1, 2] + */ + function sortedUniq(array) { + return (array && array.length) + ? baseSortedUniq(array) + : []; + } + + /** + * This method is like `_.uniqBy` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); + * // => [1.1, 2.3] + */ + function sortedUniqBy(array, iteratee) { + return (array && array.length) + ? baseSortedUniq(array, getIteratee(iteratee, 2)) + : []; + } + + /** + * Gets all but the first element of `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.tail([1, 2, 3]); + * // => [2, 3] + */ + function tail(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 1, length) : []; + } + + /** + * Creates a slice of `array` with `n` elements taken from the beginning. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.take([1, 2, 3]); + * // => [1] + * + * _.take([1, 2, 3], 2); + * // => [1, 2] + * + * _.take([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.take([1, 2, 3], 0); + * // => [] + */ + function take(array, n, guard) { + if (!(array && array.length)) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` with `n` elements taken from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeRight([1, 2, 3]); + * // => [3] + * + * _.takeRight([1, 2, 3], 2); + * // => [2, 3] + * + * _.takeRight([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.takeRight([1, 2, 3], 0); + * // => [] + */ + function takeRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, n < 0 ? 0 : n, length); + } + + /** + * Creates a slice of `array` with elements taken from the end. Elements are + * taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.takeRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeRightWhile(users, ['active', false]); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.takeRightWhile(users, 'active'); + * // => [] + */ + function takeRightWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), false, true) + : []; + } + + /** + * Creates a slice of `array` with elements taken from the beginning. Elements + * are taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.takeWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matches` iteratee shorthand. + * _.takeWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeWhile(users, ['active', false]); + * // => objects for ['barney', 'fred'] + * + * // The `_.property` iteratee shorthand. + * _.takeWhile(users, 'active'); + * // => [] + */ + function takeWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3)) + : []; + } + + /** + * Creates an array of unique values, in order, from all given arrays using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.union([2], [1, 2]); + * // => [2, 1] + */ + var union = baseRest(function(arrays) { + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); + }); + + /** + * This method is like `_.union` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which uniqueness is computed. Result values are chosen from the first + * array in which the value occurs. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.unionBy([2.1], [1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + var unionBy = baseRest(function(arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)); + }); + + /** + * This method is like `_.union` except that it accepts `comparator` which + * is invoked to compare elements of `arrays`. Result values are chosen from + * the first array in which the value occurs. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.unionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + var unionWith = baseRest(function(arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator); + }); + + /** + * Creates a duplicate-free version of an array, using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurrence of each element + * is kept. The order of result values is determined by the order they occur + * in the array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniq([2, 1, 2]); + * // => [2, 1] + */ + function uniq(array) { + return (array && array.length) ? baseUniq(array) : []; + } + + /** + * This method is like `_.uniq` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * uniqueness is computed. The order of result values is determined by the + * order they occur in the array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniqBy([2.1, 1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + function uniqBy(array, iteratee) { + return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : []; + } + + /** + * This method is like `_.uniq` except that it accepts `comparator` which + * is invoked to compare elements of `array`. The order of result values is + * determined by the order they occur in the array.The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.uniqWith(objects, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] + */ + function uniqWith(array, comparator) { + comparator = typeof comparator == 'function' ? comparator : undefined; + return (array && array.length) ? baseUniq(array, undefined, comparator) : []; + } + + /** + * This method is like `_.zip` except that it accepts an array of grouped + * elements and creates an array regrouping the elements to their pre-zip + * configuration. + * + * @static + * @memberOf _ + * @since 1.2.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + * + * _.unzip(zipped); + * // => [['a', 'b'], [1, 2], [true, false]] + */ + function unzip(array) { + if (!(array && array.length)) { + return []; + } + var length = 0; + array = arrayFilter(array, function(group) { + if (isArrayLikeObject(group)) { + length = nativeMax(group.length, length); + return true; + } + }); + return baseTimes(length, function(index) { + return arrayMap(array, baseProperty(index)); + }); + } + + /** + * This method is like `_.unzip` except that it accepts `iteratee` to specify + * how regrouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @param {Function} [iteratee=_.identity] The function to combine + * regrouped values. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip([1, 2], [10, 20], [100, 200]); + * // => [[1, 10, 100], [2, 20, 200]] + * + * _.unzipWith(zipped, _.add); + * // => [3, 30, 300] + */ + function unzipWith(array, iteratee) { + if (!(array && array.length)) { + return []; + } + var result = unzip(array); + if (iteratee == null) { + return result; + } + return arrayMap(result, function(group) { + return apply(iteratee, undefined, group); + }); + } + + /** + * Creates an array excluding all given values using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.pull`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...*} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.xor + * @example + * + * _.without([2, 1, 2, 3], 1, 2); + * // => [3] + */ + var without = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, values) + : []; + }); + + /** + * Creates an array of unique values that is the + * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) + * of the given arrays. The order of result values is determined by the order + * they occur in the arrays. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.without + * @example + * + * _.xor([2, 1], [2, 3]); + * // => [1, 3] + */ + var xor = baseRest(function(arrays) { + return baseXor(arrayFilter(arrays, isArrayLikeObject)); + }); + + /** + * This method is like `_.xor` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which by which they're compared. The order of result values is determined + * by the order they occur in the arrays. The iteratee is invoked with one + * argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2, 3.4] + * + * // The `_.property` iteratee shorthand. + * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + var xorBy = baseRest(function(arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2)); + }); + + /** + * This method is like `_.xor` except that it accepts `comparator` which is + * invoked to compare elements of `arrays`. The order of result values is + * determined by the order they occur in the arrays. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.xorWith(objects, others, _.isEqual); + * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + var xorWith = baseRest(function(arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator); + }); + + /** + * Creates an array of grouped elements, the first of which contains the + * first elements of the given arrays, the second of which contains the + * second elements of the given arrays, and so on. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + */ + var zip = baseRest(unzip); + + /** + * This method is like `_.fromPairs` except that it accepts two arrays, + * one of property identifiers and one of corresponding values. + * + * @static + * @memberOf _ + * @since 0.4.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObject(['a', 'b'], [1, 2]); + * // => { 'a': 1, 'b': 2 } + */ + function zipObject(props, values) { + return baseZipObject(props || [], values || [], assignValue); + } + + /** + * This method is like `_.zipObject` except that it supports property paths. + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]); + * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } } + */ + function zipObjectDeep(props, values) { + return baseZipObject(props || [], values || [], baseSet); + } + + /** + * This method is like `_.zip` except that it accepts `iteratee` to specify + * how grouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @param {Function} [iteratee=_.identity] The function to combine + * grouped values. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) { + * return a + b + c; + * }); + * // => [111, 222] + */ + var zipWith = baseRest(function(arrays) { + var length = arrays.length, + iteratee = length > 1 ? arrays[length - 1] : undefined; + + iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined; + return unzipWith(arrays, iteratee); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` wrapper instance that wraps `value` with explicit method + * chain sequences enabled. The result of such sequences must be unwrapped + * with `_#value`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Seq + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _ + * .chain(users) + * .sortBy('age') + * .map(function(o) { + * return o.user + ' is ' + o.age; + * }) + * .head() + * .value(); + * // => 'pebbles is 1' + */ + function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; + } + + /** + * This method invokes `interceptor` and returns `value`. The interceptor + * is invoked with one argument; (value). The purpose of this method is to + * "tap into" a method chain sequence in order to modify intermediate results. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns `value`. + * @example + * + * _([1, 2, 3]) + * .tap(function(array) { + * // Mutate input array. + * array.pop(); + * }) + * .reverse() + * .value(); + * // => [2, 1] + */ + function tap(value, interceptor) { + interceptor(value); + return value; + } + + /** + * This method is like `_.tap` except that it returns the result of `interceptor`. + * The purpose of this method is to "pass thru" values replacing intermediate + * results in a method chain sequence. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns the result of `interceptor`. + * @example + * + * _(' abc ') + * .chain() + * .trim() + * .thru(function(value) { + * return [value]; + * }) + * .value(); + * // => ['abc'] + */ + function thru(value, interceptor) { + return interceptor(value); + } + + /** + * This method is the wrapper version of `_.at`. + * + * @name at + * @memberOf _ + * @since 1.0.0 + * @category Seq + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _(object).at(['a[0].b.c', 'a[1]']).value(); + * // => [3, 4] + */ + var wrapperAt = flatRest(function(paths) { + var length = paths.length, + start = length ? paths[0] : 0, + value = this.__wrapped__, + interceptor = function(object) { return baseAt(object, paths); }; + + if (length > 1 || this.__actions__.length || + !(value instanceof LazyWrapper) || !isIndex(start)) { + return this.thru(interceptor); + } + value = value.slice(start, +start + (length ? 1 : 0)); + value.__actions__.push({ + 'func': thru, + 'args': [interceptor], + 'thisArg': undefined + }); + return new LodashWrapper(value, this.__chain__).thru(function(array) { + if (length && !array.length) { + array.push(undefined); + } + return array; + }); + }); + + /** + * Creates a `lodash` wrapper instance with explicit method chain sequences enabled. + * + * @name chain + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * // A sequence without explicit chaining. + * _(users).head(); + * // => { 'user': 'barney', 'age': 36 } + * + * // A sequence with explicit chaining. + * _(users) + * .chain() + * .head() + * .pick('user') + * .value(); + * // => { 'user': 'barney' } + */ + function wrapperChain() { + return chain(this); + } + + /** + * Executes the chain sequence and returns the wrapped result. + * + * @name commit + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).push(3); + * + * console.log(array); + * // => [1, 2] + * + * wrapped = wrapped.commit(); + * console.log(array); + * // => [1, 2, 3] + * + * wrapped.last(); + * // => 3 + * + * console.log(array); + * // => [1, 2, 3] + */ + function wrapperCommit() { + return new LodashWrapper(this.value(), this.__chain__); + } + + /** + * Gets the next value on a wrapped object following the + * [iterator protocol](https://mdn.io/iteration_protocols#iterator). + * + * @name next + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the next iterator value. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped.next(); + * // => { 'done': false, 'value': 1 } + * + * wrapped.next(); + * // => { 'done': false, 'value': 2 } + * + * wrapped.next(); + * // => { 'done': true, 'value': undefined } + */ + function wrapperNext() { + if (this.__values__ === undefined) { + this.__values__ = toArray(this.value()); + } + var done = this.__index__ >= this.__values__.length, + value = done ? undefined : this.__values__[this.__index__++]; + + return { 'done': done, 'value': value }; + } + + /** + * Enables the wrapper to be iterable. + * + * @name Symbol.iterator + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the wrapper object. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped[Symbol.iterator]() === wrapped; + * // => true + * + * Array.from(wrapped); + * // => [1, 2] + */ + function wrapperToIterator() { + return this; + } + + /** + * Creates a clone of the chain sequence planting `value` as the wrapped value. + * + * @name plant + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @param {*} value The value to plant. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2]).map(square); + * var other = wrapped.plant([3, 4]); + * + * other.value(); + * // => [9, 16] + * + * wrapped.value(); + * // => [1, 4] + */ + function wrapperPlant(value) { + var result, + parent = this; + + while (parent instanceof baseLodash) { + var clone = wrapperClone(parent); + clone.__index__ = 0; + clone.__values__ = undefined; + if (result) { + previous.__wrapped__ = clone; + } else { + result = clone; + } + var previous = clone; + parent = parent.__wrapped__; + } + previous.__wrapped__ = value; + return result; + } + + /** + * This method is the wrapper version of `_.reverse`. + * + * **Note:** This method mutates the wrapped array. + * + * @name reverse + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2, 3]; + * + * _(array).reverse().value() + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function wrapperReverse() { + var value = this.__wrapped__; + if (value instanceof LazyWrapper) { + var wrapped = value; + if (this.__actions__.length) { + wrapped = new LazyWrapper(this); + } + wrapped = wrapped.reverse(); + wrapped.__actions__.push({ + 'func': thru, + 'args': [reverse], + 'thisArg': undefined + }); + return new LodashWrapper(wrapped, this.__chain__); + } + return this.thru(reverse); + } + + /** + * Executes the chain sequence to resolve the unwrapped value. + * + * @name value + * @memberOf _ + * @since 0.1.0 + * @alias toJSON, valueOf + * @category Seq + * @returns {*} Returns the resolved unwrapped value. + * @example + * + * _([1, 2, 3]).value(); + * // => [1, 2, 3] + */ + function wrapperValue() { + return baseWrapperValue(this.__wrapped__, this.__actions__); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the number of times the key was returned by `iteratee`. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.countBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': 1, '6': 2 } + * + * // The `_.property` iteratee shorthand. + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ + var countBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + ++result[key]; + } else { + baseAssignValue(result, key, 1); + } + }); + + /** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * Iteration is stopped once `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.every(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.every(users, 'active'); + * // => false + */ + function every(collection, predicate, guard) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + */ + function filter(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ + var find = createFind(findIndex); + + /** + * This method is like `_.find` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=collection.length-1] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(n) { + * return n % 2 == 1; + * }); + * // => 3 + */ + var findLast = createFind(findLastIndex); + + /** + * Creates a flattened array of values by running each element in `collection` + * thru `iteratee` and flattening the mapped results. The iteratee is invoked + * with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [n, n]; + * } + * + * _.flatMap([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ + function flatMap(collection, iteratee) { + return baseFlatten(map(collection, iteratee), 1); + } + + /** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDeep([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ + function flatMapDeep(collection, iteratee) { + return baseFlatten(map(collection, iteratee), INFINITY); + } + + /** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDepth([1, 2], duplicate, 2); + * // => [[1, 1], [2, 2]] + */ + function flatMapDepth(collection, iteratee, depth) { + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(map(collection, iteratee), depth); + } + + /** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forEach(collection, iteratee) { + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.forEach` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @alias eachRight + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEach + * @example + * + * _.forEachRight([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `2` then `1`. + */ + function forEachRight(collection, iteratee) { + var func = isArray(collection) ? arrayEachRight : baseEachRight; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The order of grouped values + * is determined by the order they occur in `collection`. The corresponding + * value of each key is an array of elements responsible for generating the + * key. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': [4.2], '6': [6.1, 6.3] } + * + * // The `_.property` iteratee shorthand. + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ + var groupBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + result[key].push(value); + } else { + baseAssignValue(result, key, [value]); + } + }); + + /** + * Checks if `value` is in `collection`. If `collection` is a string, it's + * checked for a substring of `value`, otherwise + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * is used for equality comparisons. If `fromIndex` is negative, it's used as + * the offset from the end of `collection`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {boolean} Returns `true` if `value` is found, else `false`. + * @example + * + * _.includes([1, 2, 3], 1); + * // => true + * + * _.includes([1, 2, 3], 1, 2); + * // => false + * + * _.includes({ 'a': 1, 'b': 2 }, 1); + * // => true + * + * _.includes('abcd', 'bc'); + * // => true + */ + function includes(collection, value, fromIndex, guard) { + collection = isArrayLike(collection) ? collection : values(collection); + fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; + + var length = collection.length; + if (fromIndex < 0) { + fromIndex = nativeMax(length + fromIndex, 0); + } + return isString(collection) + ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) + : (!!length && baseIndexOf(collection, value, fromIndex) > -1); + } + + /** + * Invokes the method at `path` of each element in `collection`, returning + * an array of the results of each invoked method. Any additional arguments + * are provided to each invoked method. If `path` is a function, it's invoked + * for, and `this` bound to, each element in `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array|Function|string} path The path of the method to invoke or + * the function invoked per iteration. + * @param {...*} [args] The arguments to invoke each method with. + * @returns {Array} Returns the array of results. + * @example + * + * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invokeMap([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ + var invokeMap = baseRest(function(collection, path, args) { + var index = -1, + isFunc = typeof path == 'function', + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value) { + result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); + }); + return result; + }); + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the last element responsible for generating the key. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var array = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.keyBy(array, function(o) { + * return String.fromCharCode(o.code); + * }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.keyBy(array, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + */ + var keyBy = createAggregator(function(result, value, key) { + baseAssignValue(result, key, value); + }); + + /** + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ + function map(collection, iteratee) { + var func = isArray(collection) ? arrayMap : baseMap; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.sortBy` except that it allows specifying the sort + * orders of the iteratees to sort by. If `orders` is unspecified, all values + * are sorted in ascending order. Otherwise, specify an order of "desc" for + * descending or "asc" for ascending sort order of corresponding values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]] + * The iteratees to sort by. + * @param {string[]} [orders] The sort orders of `iteratees`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 34 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 36 } + * ]; + * + * // Sort by `user` in ascending order and by `age` in descending order. + * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + */ + function orderBy(collection, iteratees, orders, guard) { + if (collection == null) { + return []; + } + if (!isArray(iteratees)) { + iteratees = iteratees == null ? [] : [iteratees]; + } + orders = guard ? undefined : orders; + if (!isArray(orders)) { + orders = orders == null ? [] : [orders]; + } + return baseOrderBy(collection, iteratees, orders); + } + + /** + * Creates an array of elements split into two groups, the first of which + * contains elements `predicate` returns truthy for, the second of which + * contains elements `predicate` returns falsey for. The predicate is + * invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the array of grouped elements. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true }, + * { 'user': 'pebbles', 'age': 1, 'active': false } + * ]; + * + * _.partition(users, function(o) { return o.active; }); + * // => objects for [['fred'], ['barney', 'pebbles']] + * + * // The `_.matches` iteratee shorthand. + * _.partition(users, { 'age': 1, 'active': false }); + * // => objects for [['pebbles'], ['barney', 'fred']] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.partition(users, ['active', false]); + * // => objects for [['barney', 'pebbles'], ['fred']] + * + * // The `_.property` iteratee shorthand. + * _.partition(users, 'active'); + * // => objects for [['fred'], ['barney', 'pebbles']] + */ + var partition = createAggregator(function(result, value, key) { + result[key ? 0 : 1].push(value); + }, function() { return [[], []]; }); + + /** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` thru `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not given, the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduceRight + * @example + * + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) + */ + function reduce(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduce : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach); + } + + /** + * This method is like `_.reduce` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduce + * @example + * + * var array = [[0, 1], [2, 3], [4, 5]]; + * + * _.reduceRight(array, function(flattened, other) { + * return flattened.concat(other); + * }, []); + * // => [4, 5, 2, 3, 0, 1] + */ + function reduceRight(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduceRight : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight); + } + + /** + * The opposite of `_.filter`; this method returns the elements of `collection` + * that `predicate` does **not** return truthy for. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.filter + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true } + * ]; + * + * _.reject(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.reject(users, { 'age': 40, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.reject(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.reject(users, 'active'); + * // => objects for ['barney'] + */ + function reject(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, negate(getIteratee(predicate, 3))); + } + + /** + * Gets a random element from `collection`. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + * @example + * + * _.sample([1, 2, 3, 4]); + * // => 2 + */ + function sample(collection) { + var func = isArray(collection) ? arraySample : baseSample; + return func(collection); + } + + /** + * Gets `n` random elements at unique keys from `collection` up to the + * size of `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @param {number} [n=1] The number of elements to sample. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the random elements. + * @example + * + * _.sampleSize([1, 2, 3], 2); + * // => [3, 1] + * + * _.sampleSize([1, 2, 3], 4); + * // => [2, 3, 1] + */ + function sampleSize(collection, n, guard) { + if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) { + n = 1; + } else { + n = toInteger(n); + } + var func = isArray(collection) ? arraySampleSize : baseSampleSize; + return func(collection, n); + } + + /** + * Creates an array of shuffled values, using a version of the + * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + * @example + * + * _.shuffle([1, 2, 3, 4]); + * // => [4, 1, 3, 2] + */ + function shuffle(collection) { + var func = isArray(collection) ? arrayShuffle : baseShuffle; + return func(collection); + } + + /** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable string keyed properties for objects. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the collection size. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ + function size(collection) { + if (collection == null) { + return 0; + } + if (isArrayLike(collection)) { + return isString(collection) ? stringSize(collection) : collection.length; + } + var tag = getTag(collection); + if (tag == mapTag || tag == setTag) { + return collection.size; + } + return baseKeys(collection).length; + } + + /** + * Checks if `predicate` returns truthy for **any** element of `collection`. + * Iteration is stopped once `predicate` returns truthy. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.some(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.some(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.some(users, 'active'); + * // => true + */ + function some(collection, predicate, guard) { + var func = isArray(collection) ? arraySome : baseSome; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection thru each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] + */ + var sortBy = baseRest(function(collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { + iteratees = [iteratees[0]]; + } + return baseOrderBy(collection, baseFlatten(iteratees, 1), []); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ + var now = ctxNow || function() { + return root.Date.now(); + }; + + /*------------------------------------------------------------------------*/ + + /** + * The opposite of `_.before`; this method creates a function that invokes + * `func` once it's called `n` or more times. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {number} n The number of calls before `func` is invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => Logs 'done saving!' after the two async saves have completed. + */ + function after(n, func) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; + } + + /** + * Creates a function that invokes `func`, with up to `n` arguments, + * ignoring any additional arguments. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @param {number} [n=func.length] The arity cap. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.ary(parseInt, 1)); + * // => [6, 8, 10] + */ + function ary(func, n, guard) { + n = guard ? undefined : n; + n = (func && n == null) ? func.length : n; + return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); + } + + /** + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it's called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery(element).on('click', _.before(5, addContactToList)); + * // => Allows adding up to 4 contacts to the list. + */ + function before(n, func) { + var result; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; + } + + /** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and `partials` prepended to the arguments it receives. + * + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * function greet(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // Bound with placeholders. + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ + var bind = baseRest(function(func, thisArg, partials) { + var bitmask = WRAP_BIND_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bind)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(func, bitmask, thisArg, partials, holders); + }); + + /** + * Creates a function that invokes the method at `object[key]` with `partials` + * prepended to the arguments it receives. + * + * This method differs from `_.bind` by allowing bound functions to reference + * methods that may be redefined or don't yet exist. See + * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) + * for more details. + * + * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Function + * @param {Object} object The object to invoke the method on. + * @param {string} key The key of the method. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'user': 'fred', + * 'greet': function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * }; + * + * var bound = _.bindKey(object, 'greet', 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * object.greet = function(greeting, punctuation) { + * return greeting + 'ya ' + this.user + punctuation; + * }; + * + * bound('!'); + * // => 'hiya fred!' + * + * // Bound with placeholders. + * var bound = _.bindKey(object, 'greet', _, '!'); + * bound('hi'); + * // => 'hiya fred!' + */ + var bindKey = baseRest(function(object, key, partials) { + var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bindKey)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(key, bitmask, object, partials, holders); + }); + + /** + * Creates a function that accepts arguments of `func` and either invokes + * `func` returning its result, if at least `arity` number of arguments have + * been provided, or returns a function that accepts the remaining `func` + * arguments, and so on. The arity of `func` may be specified if `func.length` + * is not sufficient. + * + * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curry(abc); + * + * curried(1)(2)(3); + * // => [1, 2, 3] + * + * curried(1, 2)(3); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(1)(_, 3)(2); + * // => [1, 2, 3] + */ + function curry(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curry.placeholder; + return result; + } + + /** + * This method is like `_.curry` except that arguments are applied to `func` + * in the manner of `_.partialRight` instead of `_.partial`. + * + * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curryRight(abc); + * + * curried(3)(2)(1); + * // => [1, 2, 3] + * + * curried(2, 3)(1); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(3)(1, _)(2); + * // => [1, 2, 3] + */ + function curryRight(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curryRight.placeholder; + return result; + } + + /** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ + function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + result = wait - timeSinceLastCall; + + return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; + } + + /** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // => Logs 'deferred' after one millisecond. + */ + var defer = baseRest(function(func, args) { + return baseDelay(func, 1, args); + }); + + /** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => Logs 'later' after one second. + */ + var delay = baseRest(function(func, wait, args) { + return baseDelay(func, toNumber(wait) || 0, args); + }); + + /** + * Creates a function that invokes `func` with arguments reversed. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to flip arguments for. + * @returns {Function} Returns the new flipped function. + * @example + * + * var flipped = _.flip(function() { + * return _.toArray(arguments); + * }); + * + * flipped('a', 'b', 'c', 'd'); + * // => ['d', 'c', 'b', 'a'] + */ + function flip(func) { + return createWrap(func, WRAP_FLIP_FLAG); + } + + /** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `clear`, `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ + function memoize(func, resolver) { + if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || MapCache); + return memoized; + } + + // Expose `MapCache`. + memoize.Cache = MapCache; + + /** + * Creates a function that negates the result of the predicate `func`. The + * `func` predicate is invoked with the `this` binding and arguments of the + * created function. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} predicate The predicate to negate. + * @returns {Function} Returns the new negated function. + * @example + * + * function isEven(n) { + * return n % 2 == 0; + * } + * + * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); + * // => [1, 3, 5] + */ + function negate(predicate) { + if (typeof predicate != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function() { + var args = arguments; + switch (args.length) { + case 0: return !predicate.call(this); + case 1: return !predicate.call(this, args[0]); + case 2: return !predicate.call(this, args[0], args[1]); + case 3: return !predicate.call(this, args[0], args[1], args[2]); + } + return !predicate.apply(this, args); + }; + } + + /** + * Creates a function that is restricted to invoking `func` once. Repeat calls + * to the function return the value of the first invocation. The `func` is + * invoked with the `this` binding and arguments of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // => `createApplication` is invoked once + */ + function once(func) { + return before(2, func); + } + + /** + * Creates a function that invokes `func` with its arguments transformed. + * + * @static + * @since 4.0.0 + * @memberOf _ + * @category Function + * @param {Function} func The function to wrap. + * @param {...(Function|Function[])} [transforms=[_.identity]] + * The argument transforms. + * @returns {Function} Returns the new function. + * @example + * + * function doubled(n) { + * return n * 2; + * } + * + * function square(n) { + * return n * n; + * } + * + * var func = _.overArgs(function(x, y) { + * return [x, y]; + * }, [square, doubled]); + * + * func(9, 3); + * // => [81, 6] + * + * func(10, 5); + * // => [100, 10] + */ + var overArgs = castRest(function(func, transforms) { + transforms = (transforms.length == 1 && isArray(transforms[0])) + ? arrayMap(transforms[0], baseUnary(getIteratee())) + : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee())); + + var funcsLength = transforms.length; + return baseRest(function(args) { + var index = -1, + length = nativeMin(args.length, funcsLength); + + while (++index < length) { + args[index] = transforms[index].call(this, args[index]); + } + return apply(func, this, args); + }); + }); + + /** + * Creates a function that invokes `func` with `partials` prepended to the + * arguments it receives. This method is like `_.bind` except it does **not** + * alter the `this` binding. + * + * The `_.partial.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 0.2.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var sayHelloTo = _.partial(greet, 'hello'); + * sayHelloTo('fred'); + * // => 'hello fred' + * + * // Partially applied with placeholders. + * var greetFred = _.partial(greet, _, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + */ + var partial = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partial)); + return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders); + }); + + /** + * This method is like `_.partial` except that partially applied arguments + * are appended to the arguments it receives. + * + * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var greetFred = _.partialRight(greet, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + * + * // Partially applied with placeholders. + * var sayHelloTo = _.partialRight(greet, 'hello', _); + * sayHelloTo('fred'); + * // => 'hello fred' + */ + var partialRight = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partialRight)); + return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders); + }); + + /** + * Creates a function that invokes `func` with arguments arranged according + * to the specified `indexes` where the argument value at the first index is + * provided as the first argument, the argument value at the second index is + * provided as the second argument, and so on. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to rearrange arguments for. + * @param {...(number|number[])} indexes The arranged argument indexes. + * @returns {Function} Returns the new function. + * @example + * + * var rearged = _.rearg(function(a, b, c) { + * return [a, b, c]; + * }, [2, 0, 1]); + * + * rearged('b', 'c', 'a') + * // => ['a', 'b', 'c'] + */ + var rearg = flatRest(function(func, indexes) { + return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes); + }); + + /** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as + * an array. + * + * **Note:** This method is based on the + * [rest parameter](https://mdn.io/rest_parameters). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.rest(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ + function rest(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start === undefined ? start : toInteger(start); + return baseRest(func, start); + } + + /** + * Creates a function that invokes `func` with the `this` binding of the + * create function and an array of arguments much like + * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply). + * + * **Note:** This method is based on the + * [spread operator](https://mdn.io/spread_operator). + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Function + * @param {Function} func The function to spread arguments over. + * @param {number} [start=0] The start position of the spread. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.spread(function(who, what) { + * return who + ' says ' + what; + * }); + * + * say(['fred', 'hello']); + * // => 'fred says hello' + * + * var numbers = Promise.all([ + * Promise.resolve(40), + * Promise.resolve(36) + * ]); + * + * numbers.then(_.spread(function(x, y) { + * return x + y; + * })); + * // => a Promise of 76 + */ + function spread(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start == null ? 0 : nativeMax(toInteger(start), 0); + return baseRest(function(args) { + var array = args[start], + otherArgs = castSlice(args, 0, start); + + if (array) { + arrayPush(otherArgs, array); + } + return apply(func, this, otherArgs); + }); + } + + /** + * Creates a throttled function that only invokes `func` at most once per + * every `wait` milliseconds. The throttled function comes with a `cancel` + * method to cancel delayed `func` invocations and a `flush` method to + * immediately invoke them. Provide `options` to indicate whether `func` + * should be invoked on the leading and/or trailing edge of the `wait` + * timeout. The `func` is invoked with the last arguments provided to the + * throttled function. Subsequent calls to the throttled function return the + * result of the last `func` invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the throttled function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.throttle` and `_.debounce`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to throttle. + * @param {number} [wait=0] The number of milliseconds to throttle invocations to. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=true] + * Specify invoking on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // Avoid excessively updating the position while scrolling. + * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); + * + * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. + * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); + * jQuery(element).on('click', throttled); + * + * // Cancel the trailing throttled invocation. + * jQuery(window).on('popstate', throttled.cancel); + */ + function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (isObject(options)) { + leading = 'leading' in options ? !!options.leading : leading; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + return debounce(func, wait, { + 'leading': leading, + 'maxWait': wait, + 'trailing': trailing + }); + } + + /** + * Creates a function that accepts up to one argument, ignoring any + * additional arguments. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.unary(parseInt)); + * // => [6, 8, 10] + */ + function unary(func) { + return ary(func, 1); + } + + /** + * Creates a function that provides `value` to `wrapper` as its first + * argument. Any additional arguments provided to the function are appended + * to those provided to the `wrapper`. The wrapper is invoked with the `this` + * binding of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {*} value The value to wrap. + * @param {Function} [wrapper=identity] The wrapper function. + * @returns {Function} Returns the new function. + * @example + * + * var p = _.wrap(_.escape, function(func, text) { + * return '

    ' + func(text) + '

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

    fred, barney, & pebbles

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

    + all files __root__/ +

    +
    +
    + 78.64% + Statements + 405/515 +
    +
    + 74.38% + Branches + 209/281 +
    +
    + 65.31% + Functions + 32/49 +
    +
    + 79.17% + Lines + 399/504 +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FileStatementsBranchesFunctionsLines
    terraformer-wkt-parser.js
    78.64%405/51574.38%209/28165.31%32/4979.17%399/504
    +
    +
    + + + + + + + diff --git a/node_modules/terraformer-wkt-parser/coverage/__root__/terraformer-wkt-parser.js.html b/node_modules/terraformer-wkt-parser/coverage/__root__/terraformer-wkt-parser.js.html new file mode 100644 index 0000000..bca77d8 --- /dev/null +++ b/node_modules/terraformer-wkt-parser/coverage/__root__/terraformer-wkt-parser.js.html @@ -0,0 +1,2348 @@ + + + + Code coverage report for terraformer-wkt-parser.js + + + + + + + +
    +
    +

    + all files / __root__/ terraformer-wkt-parser.js +

    +
    +
    + 78.64% + Statements + 405/515 +
    +
    + 74.38% + Branches + 209/281 +
    +
    + 65.31% + Functions + 32/49 +
    +
    + 79.17% + Lines + 399/504 +
    +
    +
    +
    +
    
    +
    +
    1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 +295 +296 +297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307 +308 +309 +310 +311 +312 +313 +314 +315 +316 +317 +318 +319 +320 +321 +322 +323 +324 +325 +326 +327 +328 +329 +330 +331 +332 +333 +334 +335 +336 +337 +338 +339 +340 +341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 +370 +371 +372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 +397 +398 +399 +400 +401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 +412 +413 +414 +415 +416 +417 +418 +419 +420 +421 +422 +423 +424 +425 +426 +427 +428 +429 +430 +431 +432 +433 +434 +435 +436 +437 +438 +439 +440 +441 +442 +443 +444 +445 +446 +447 +448 +449 +450 +451 +452 +453 +454 +455 +456 +457 +458 +459 +460 +461 +462 +463 +464 +465 +466 +467 +468 +469 +470 +471 +472 +473 +474 +475 +476 +477 +478 +479 +480 +481 +482 +483 +484 +485 +486 +487 +488 +489 +490 +491 +492 +493 +494 +495 +496 +497 +498 +499 +500 +501 +502 +503 +504 +505 +506 +507 +508 +509 +510 +511 +512 +513 +514 +515 +516 +517 +518 +519 +520 +521 +522 +523 +524 +525 +526 +527 +528 +529 +530 +531 +532 +533 +534 +535 +536 +537 +538 +539 +540 +541 +542 +543 +544 +545 +546 +547 +548 +549 +550 +551 +552 +553 +554 +555 +556 +557 +558 +559 +560 +561 +562 +563 +564 +565 +566 +567 +568 +569 +570 +571 +572 +573 +574 +575 +576 +577 +578 +579 +580 +581 +582 +583 +584 +585 +586 +587 +588 +589 +590 +591 +592 +593 +594 +595 +596 +597 +598 +599 +600 +601 +602 +603 +604 +605 +606 +607 +608 +609 +610 +611 +612 +613 +614 +615 +616 +617 +618 +619 +620 +621 +622 +623 +624 +625 +626 +627 +628 +629 +630 +631 +632 +633 +634 +635 +636 +637 +638 +639 +640 +641 +642 +643 +644 +645 +646 +647 +648 +649 +650 +651 +652 +653 +654 +655 +656 +657 +658 +659 +660 +661 +662 +663 +664 +665 +666 +667 +668 +669 +670 +671 +672 +673 +674 +675 +676 +677 +678 +679 +680 +681 +682 +683 +684 +685 +686 +687 +688 +689 +690 +691 +692 +693 +694 +695 +696 +697 +698 +699 +700 +701 +702 +703 +704 +705 +706 +707 +708 +709 +710 +711 +712 +713 +714 +715 +716 +717 +718 +719 +720 +721 +722 +723 +724 +725 +726 +727 +728 +729 +730 +731 +732 +733 +734 +735 +736 +737 +738 +739 +740 +741 +742 +743 +744 +745 +746 +747 +748 +749 +750 +751 +752 +753 +754 +755 +756 +757 +758 +759 +760 +761 +762 +  +  + +  + +  + +  +  + +  +  +  + +  +  + + +  +  +  +  +  +  +  +500× +500× + +  + +  + +  + +  + +  + +  +71× +71× +56× +56× +29× +29× +82× +82× +30× +30× + + +19× +19× +25× +25× + + + + + + + + + + +28× +28× +16× +16× + + + + +10× +10× +32× +32× +12× +12× + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +  +  +  +  +  +  +  +  +37× +37× +37× +37× +37× +37× +  +37× +37× +37× +37× +  + +  +  +  +  + +816× +816× +816× +  +  +816× +  +37× +37× +1316× +1316× +74× +  +1242× +816× +  +1242× +  +1316× +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1316× +  +  +1316× +  +816× +816× +816× +816× +816× +816× +816× +816× +816× +816× +816× +  +  +  +  +  +816× +  +500× +500× +500× +500× +  +  +500× +500× +37× +  +463× +463× +463× +463× +  +463× +463× +463× +463× +463× +463× +  +  +  +  +  +  +  + + + +  +  +  +  +  +  +  +  +37× +37× +37× +37× +37× +37× +37× +37× +37× +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1258× +  +  +1258× +  +1258× +  +  +  +  +  +1258× +1258× +1258× +  +1258× +1258× +5168× +5168× +1258× +1258× +1258× +  +  +1258× +1258× +1258× +1258× +  +  +  +1258× +1258× +1258× +1258× +1258× +  +  +1258× +1258× +1258× +1258× +1258× +1258× +442× +  +  +  +  +  +  +  +  +  +1258× +1258× +816× +  +442× +  +  +  +  +  +  +  +  +  +1258× +  +  +  +  +  +  +  + + +  +  +1258× +1258× +  +442× +82× +  +82× +  +426× +  + +  + +  + +  + +  + +  + +  +125× +  + +  + +  + +  + +  +37× +  +  +  +  +  + + + + + + +  +  + +156× +156× +  +  + +114× +114× +  +  +  +  +114× +  +  + +  +  +  + +25× +25× +  +  + +25× +  +25× +107× +  +  +25× +  +  + +19× +19× +  +  + + +  + +  +  + +19× +  +19× +25× +  +  +19× +13× +  + +  +  +  + + + +  +  + + +  + +  +  + + +  + +10× +  +  + +  +  + +  +  +  + +37× +  +37× +37× +  +  +  +  +37× +  +  + +28× +  +28× +108× +  +  +28× +  +28× +  +  +  + + +  + + +  + + +  + + +  + +  + +  + +  +  +  + +  + +  +  + + +  + + +  + + + + +  + +  + + +  +  + +  + +  +  + + +  + + +  + + + + +  + +  + + +  +  + + + + +  +  + + +  + +  +  + + +  + + +  + + + + +  + +  + + +  +  + +  + +  +  + + +  + + +  + + + + +  + +  + + +  +  + + + + +  +  + + +  + +  +  + + +  + + +  + + + + +  + +  + + +  +  + + + + + + +12× +  +  + + +  + +  +  + + +  + +  +  + +31× +  + +  + +  + +  + +  + +  + +  + +  +  +  +  +  + + + + +  + +  + 
    (function (root, factory) {
    + 
    +  // Node.
    +  Iif(typeof module === 'object' && typeof module.exports === 'object') {
    +    exports = module.exports = factory(require("terraformer"));
    +  } else Eif(typeof navigator === "object") {
    +    // Browser Global.
    +    Iif (!root.Terraformer){
    +      throw new Error("Terraformer.WKT requires the core Terraformer library. http://github.com/esri/terraformer")
    +    }
    +    root.Terraformer.WKT = factory(root.Terraformer);
    +  }
    + 
    +}(this, function(Terraformer) {
    +  var exports = { };
    + 
    +  /* Jison generated parser */
    +var parser = (function(){
    +var parser = {trace: function trace() { },
    +yy: {},
    +symbols_: {"error":2,"expressions":3,"point":4,"EOF":5,"linestring":6,"polygon":7,"multipoint":8,"multilinestring":9,"multipolygon":10,"coordinate":11,"DOUBLE_TOK":12,"ptarray":13,"COMMA":14,"ring_list":15,"ring":16,"(":17,")":18,"POINT":19,"Z":20,"ZM":21,"M":22,"EMPTY":23,"point_untagged":24,"polygon_list":25,"polygon_untagged":26,"point_list":27,"LINESTRING":28,"POLYGON":29,"MULTIPOINT":30,"MULTILINESTRING":31,"MULTIPOLYGON":32,"$accept":0,"$end":1},
    +terminals_: {2:"error",5:"EOF",12:"DOUBLE_TOK",14:"COMMA",17:"(",18:")",19:"POINT",20:"Z",21:"ZM",22:"M",23:"EMPTY",28:"LINESTRING",29:"POLYGON",30:"MULTIPOINT",31:"MULTILINESTRING",32:"MULTIPOLYGON"},
    +productions_: [0,[3,2],[3,2],[3,2],[3,2],[3,2],[3,2],[11,2],[11,3],[11,4],[13,3],[13,1],[15,3],[15,1],[16,3],[4,4],[4,5],[4,5],[4,5],[4,2],[24,1],[24,3],[25,3],[25,1],[26,3],[27,3],[27,1],[6,4],[6,5],[6,5],[6,5],[6,2],[7,4],[7,5],[7,5],[7,5],[7,2],[8,4],[8,5],[8,5],[8,5],[8,2],[9,4],[9,5],[9,5],[9,5],[9,2],[10,4],[10,5],[10,5],[10,5],[10,2]],
    +performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$,_$
    +/**/) {
    + 
    +var $0 = $.length - 1;
    +switch (yystate) {
    +case 1: return $[$0-1]; 
    +break;
    +case 2: return $[$0-1]; 
    +break;
    +case 3: return $[$0-1]; 
    +break;
    +case 4: return $[$0-1]; 
    +break;
    +case 5: return $[$0-1]; 
    +break;
    +case 6: return $[$0-1]; 
    +break;
    +case 7: this.$ = new PointArray([ Number($[$0-1]), Number($[$0]) ]); 
    +break;
    +case 8: this.$ = new PointArray([ Number($[$0-2]), Number($[$0-1]), Number($[$0]) ]); 
    +break;
    +case 9: this.$ = new PointArray([ Number($[$0-3]), Number($[$0-2]), Number($[$0-1]), Number($[$0]) ]); 
    +break;
    +case 10: this.$ = $[$0-2].addPoint($[$0]); 
    +break;
    +case 11: this.$ = $[$0]; 
    +break;
    +case 12: this.$ = $[$0-2].addRing($[$0]); 
    +break;
    +case 13: this.$ = new RingList($[$0]); 
    +break;
    +case 14: this.$ = new Ring($[$0-1]); 
    +break;
    +case 15: this.$ = { "type": "Point", "coordinates": $[$0-1].data[0] }; 
    +break;
    +case 16: this.$ = { "type": "Point", "coordinates": $[$0-1].data[0], "properties": { z: true } }; 
    +break;
    +case 17: this.$ = { "type": "Point", "coordinates": $[$0-1].data[0], "properties": { z: true, m: true } }; 
    +break;
    +case 18: this.$ = { "type": "Point", "coordinates": $[$0-1].data[0], "properties": { m: true } }; 
    +break;
    +case 19: this.$ = { "type": "Point", "coordinates": [ ] }; 
    +break;
    +case 20: this.$ = $[$0]; 
    +break;
    +case 21: this.$ = $[$0-1]; 
    +break;
    +case 22: this.$ = $[$0-2].addPolygon($[$0]); 
    +break;
    +case 23: this.$ = new PolygonList($[$0]); 
    +break;
    +case 24: this.$ = $[$0-1]; 
    +break;
    +case 25: this.$ = $[$0-2].addPoint($[$0]); 
    +break;
    +case 26: this.$ = $[$0]; 
    +break;
    +case 27: this.$ = { "type": "LineString", "coordinates": $[$0-1].data }; 
    +break;
    +case 28: this.$ = { "type": "LineString", "coordinates": $[$0-1].data, "properties": { z: true } }; 
    +break;
    +case 29: this.$ = { "type": "LineString", "coordinates": $[$0-1].data, "properties": { m: true } }; 
    +break;
    +case 30: this.$ = { "type": "LineString", "coordinates": $[$0-1].data, "properties": { z: true, m: true } }; 
    +break;
    +case 31: this.$ = { "type": "LineString", "coordinates": [ ] }; 
    +break;
    +case 32: this.$ = { "type": "Polygon", "coordinates": $[$0-1].toJSON() }; 
    +break;
    +case 33: this.$ = { "type": "Polygon", "coordinates": $[$0-1].toJSON(), "properties": { z: true } }; 
    +break;
    +case 34: this.$ = { "type": "Polygon", "coordinates": $[$0-1].toJSON(), "properties": { m: true } }; 
    +break;
    +case 35: this.$ = { "type": "Polygon", "coordinates": $[$0-1].toJSON(), "properties": { z: true, m: true } }; 
    +break;
    +case 36: this.$ = { "type": "Polygon", "coordinates": [ ] }; 
    +break;
    +case 37: this.$ = { "type": "MultiPoint", "coordinates": $[$0-1].data }; 
    +break;
    +case 38: this.$ = { "type": "MultiPoint", "coordinates": $[$0-1].data, "properties": { z: true } }; 
    +break;
    +case 39: this.$ = { "type": "MultiPoint", "coordinates": $[$0-1].data, "properties": { m: true } }; 
    +break;
    +case 40: this.$ = { "type": "MultiPoint", "coordinates": $[$0-1].data, "properties": { z: true, m: true } }; 
    +break;
    +case 41: this.$ = { "type": "MultiPoint", "coordinates": [ ] } 
    +break;
    +case 42: this.$ = { "type": "MultiLineString", "coordinates": $[$0-1].toJSON() }; 
    +break;
    +case 43: this.$ = { "type": "MultiLineString", "coordinates": $[$0-1].toJSON(), "properties": { z: true } }; 
    +break;
    +case 44: this.$ = { "type": "MultiLineString", "coordinates": $[$0-1].toJSON(), "properties": { m: true } }; 
    +break;
    +case 45: this.$ = { "type": "MultiLineString", "coordinates": $[$0-1].toJSON(), "properties": { z: true, m: true } }; 
    +break;
    +case 46: this.$ = { "type": "MultiLineString", "coordinates": [ ] }; 
    +break;
    +case 47: this.$ = { "type": "MultiPolygon", "coordinates": $[$0-1].toJSON() }; 
    +break;
    +case 48: this.$ = { "type": "MultiPolygon", "coordinates": $[$0-1].toJSON(), "properties": { z: true } }; 
    +break;
    +case 49: this.$ = { "type": "MultiPolygon", "coordinates": $[$0-1].toJSON(), "properties": { m: true } }; 
    +break;
    +case 50: this.$ = { "type": "MultiPolygon", "coordinates": $[$0-1].toJSON(), "properties": { z: true, m: true } }; 
    +break;
    +case 51: this.$ = { "type": "MultiPolygon", "coordinates": [ ] }; 
    +break;
    +}
    +},
    +table: [{3:1,4:2,6:3,7:4,8:5,9:6,10:7,19:[1,8],28:[1,9],29:[1,10],30:[1,11],31:[1,12],32:[1,13]},{1:[3]},{5:[1,14]},{5:[1,15]},{5:[1,16]},{5:[1,17]},{5:[1,18]},{5:[1,19]},{17:[1,20],20:[1,21],21:[1,22],22:[1,23],23:[1,24]},{17:[1,25],20:[1,26],21:[1,28],22:[1,27],23:[1,29]},{17:[1,30],20:[1,31],21:[1,33],22:[1,32],23:[1,34]},{17:[1,35],20:[1,36],21:[1,38],22:[1,37],23:[1,39]},{17:[1,40],20:[1,41],21:[1,43],22:[1,42],23:[1,44]},{17:[1,45],20:[1,46],21:[1,48],22:[1,47],23:[1,49]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{11:51,12:[1,52],13:50},{17:[1,53]},{17:[1,54]},{17:[1,55]},{5:[2,19]},{11:58,12:[1,52],17:[1,59],24:57,27:56},{17:[1,60]},{17:[1,61]},{17:[1,62]},{5:[2,31]},{15:63,16:64,17:[1,65]},{17:[1,66]},{17:[1,67]},{17:[1,68]},{5:[2,36]},{11:58,12:[1,52],17:[1,59],24:57,27:69},{17:[1,70]},{17:[1,71]},{17:[1,72]},{5:[2,41]},{15:73,16:64,17:[1,65]},{17:[1,74]},{17:[1,75]},{17:[1,76]},{5:[2,46]},{17:[1,79],25:77,26:78},{17:[1,80]},{17:[1,81]},{17:[1,82]},{5:[2,51]},{14:[1,84],18:[1,83]},{14:[2,11],18:[2,11]},{12:[1,85]},{11:51,12:[1,52],13:86},{11:51,12:[1,52],13:87},{11:51,12:[1,52],13:88},{14:[1,90],18:[1,89]},{14:[2,26],18:[2,26]},{14:[2,20],18:[2,20]},{11:91,12:[1,52]},{11:58,12:[1,52],17:[1,59],24:57,27:92},{11:58,12:[1,52],17:[1,59],24:57,27:93},{11:58,12:[1,52],17:[1,59],24:57,27:94},{14:[1,96],18:[1,95]},{14:[2,13],18:[2,13]},{11:51,12:[1,52],13:97},{15:98,16:64,17:[1,65]},{15:99,16:64,17:[1,65]},{15:100,16:64,17:[1,65]},{14:[1,90],18:[1,101]},{11:58,12:[1,52],17:[1,59],24:57,27:102},{11:58,12:[1,52],17:[1,59],24:57,27:103},{11:58,12:[1,52],17:[1,59],24:57,27:104},{14:[1,96],18:[1,105]},{15:106,16:64,17:[1,65]},{15:107,16:64,17:[1,65]},{15:108,16:64,17:[1,65]},{14:[1,110],18:[1,109]},{14:[2,23],18:[2,23]},{15:111,16:64,17:[1,65]},{17:[1,79],25:112,26:78},{17:[1,79],25:113,26:78},{17:[1,79],25:114,26:78},{5:[2,15]},{11:115,12:[1,52]},{12:[1,116],14:[2,7],18:[2,7]},{14:[1,84],18:[1,117]},{14:[1,84],18:[1,118]},{14:[1,84],18:[1,119]},{5:[2,27]},{11:58,12:[1,52],17:[1,59],24:120},{18:[1,121]},{14:[1,90],18:[1,122]},{14:[1,90],18:[1,123]},{14:[1,90],18:[1,124]},{5:[2,32]},{16:125,17:[1,65]},{14:[1,84],18:[1,126]},{14:[1,96],18:[1,127]},{14:[1,96],18:[1,128]},{14:[1,96],18:[1,129]},{5:[2,37]},{14:[1,90],18:[1,130]},{14:[1,90],18:[1,131]},{14:[1,90],18:[1,132]},{5:[2,42]},{14:[1,96],18:[1,133]},{14:[1,96],18:[1,134]},{14:[1,96],18:[1,135]},{5:[2,47]},{17:[1,79],26:136},{14:[1,96],18:[1,137]},{14:[1,110],18:[1,138]},{14:[1,110],18:[1,139]},{14:[1,110],18:[1,140]},{14:[2,10],18:[2,10]},{12:[1,141],14:[2,8],18:[2,8]},{5:[2,16]},{5:[2,17]},{5:[2,18]},{14:[2,25],18:[2,25]},{14:[2,21],18:[2,21]},{5:[2,28]},{5:[2,29]},{5:[2,30]},{14:[2,12],18:[2,12]},{14:[2,14],18:[2,14]},{5:[2,33]},{5:[2,34]},{5:[2,35]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,43]},{5:[2,44]},{5:[2,45]},{14:[2,22],18:[2,22]},{14:[2,24],18:[2,24]},{5:[2,48]},{5:[2,49]},{5:[2,50]},{14:[2,9],18:[2,9]}],
    +defaultActions: {14:[2,1],15:[2,2],16:[2,3],17:[2,4],18:[2,5],19:[2,6],24:[2,19],29:[2,31],34:[2,36],39:[2,41],44:[2,46],49:[2,51],83:[2,15],89:[2,27],95:[2,32],101:[2,37],105:[2,42],109:[2,47],117:[2,16],118:[2,17],119:[2,18],122:[2,28],123:[2,29],124:[2,30],127:[2,33],128:[2,34],129:[2,35],130:[2,38],131:[2,39],132:[2,40],133:[2,43],134:[2,44],135:[2,45],138:[2,48],139:[2,49],140:[2,50]},
    +parseError: function parseError(str, hash) {
    +    throw new Error(str);
    +},
    +parse: function parse(input) {
    +    var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
    +    this.lexer.setInput(input);
    +    this.lexer.yy = this.yy;
    +    this.yy.lexer = this.lexer;
    +    this.yy.parser = this;
    +    Iif (typeof this.lexer.yylloc == "undefined")
    +        this.lexer.yylloc = {};
    +    var yyloc = this.lexer.yylloc;
    +    lstack.push(yyloc);
    +    var ranges = this.lexer.options && this.lexer.options.ranges;
    +    Iif (typeof this.yy.parseError === "function")
    +        this.parseError = this.yy.parseError;
    +    function popStack(n) {
    +        stack.length = stack.length - 2 * n;
    +        vstack.length = vstack.length - n;
    +        lstack.length = lstack.length - n;
    +    }
    +    function lex() {
    +        var token;
    +        token = self.lexer.lex() || 1;
    +        Iif (typeof token !== "number") {
    +            token = self.symbols_[token] || token;
    +        }
    +        return token;
    +    }
    +    var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
    +    while (true) {
    +        state = stack[stack.length - 1];
    +        if (this.defaultActions[state]) {
    +            action = this.defaultActions[state];
    +        } else {
    +            if (symbol === null || typeof symbol == "undefined") {
    +                symbol = lex();
    +            }
    +            action = table[state] && table[state][symbol];
    +        }
    +        Iif (typeof action === "undefined" || !action.length || !action[0]) {
    +            var errStr = "";
    +            if (!recovering) {
    +                expected = [];
    +                for (p in table[state])
    +                    if (this.terminals_[p] && p > 2) {
    +                        expected.push("'" + this.terminals_[p] + "'");
    +                    }
    +                if (this.lexer.showPosition) {
    +                    errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
    +                } else {
    +                    errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1?"end of input":"'" + (this.terminals_[symbol] || symbol) + "'");
    +                }
    +                this.parseError(errStr, {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected});
    +            }
    +        }
    +        Iif (action[0] instanceof Array && action.length > 1) {
    +            throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
    +        }
    +        switch (action[0]) {
    +        case 1:
    +            stack.push(symbol);
    +            vstack.push(this.lexer.yytext);
    +            lstack.push(this.lexer.yylloc);
    +            stack.push(action[1]);
    +            symbol = null;
    +            Eif (!preErrorSymbol) {
    +                yyleng = this.lexer.yyleng;
    +                yytext = this.lexer.yytext;
    +                yylineno = this.lexer.yylineno;
    +                yyloc = this.lexer.yylloc;
    +                Iif (recovering > 0)
    +                    recovering--;
    +            } else {
    +                symbol = preErrorSymbol;
    +                preErrorSymbol = null;
    +            }
    +            break;
    +        case 2:
    +            len = this.productions_[action[1]][1];
    +            yyval.$ = vstack[vstack.length - len];
    +            yyval._$ = {first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column};
    +            Iif (ranges) {
    +                yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
    +            }
    +            r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);
    +            if (typeof r !== "undefined") {
    +                return r;
    +            }
    +            Eif (len) {
    +                stack = stack.slice(0, -1 * len * 2);
    +                vstack = vstack.slice(0, -1 * len);
    +                lstack = lstack.slice(0, -1 * len);
    +            }
    +            stack.push(this.productions_[action[1]][0]);
    +            vstack.push(yyval.$);
    +            lstack.push(yyval._$);
    +            newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
    +            stack.push(newState);
    +            break;
    +        case 3:
    +            return true;
    +        }
    +    }
    +    return true;
    +}
    +};
    +undefined/* Jison generated lexer */
    +var lexer = (function(){
    +var lexer = ({EOF:1,
    +parseError:function parseError(str, hash) {
    +        if (this.yy.parser) {
    +            this.yy.parser.parseError(str, hash);
    +        } else {
    +            throw new Error(str);
    +        }
    +    },
    +setInput:function (input) {
    +        this._input = input;
    +        this._more = this._less = this.done = false;
    +        this.yylineno = this.yyleng = 0;
    +        this.yytext = this.matched = this.match = '';
    +        this.conditionStack = ['INITIAL'];
    +        this.yylloc = {first_line:1,first_column:0,last_line:1,last_column:0};
    +        Iif (this.options.ranges) this.yylloc.range = [0,0];
    +        this.offset = 0;
    +        return this;
    +    },
    +input:function () {
    +        var ch = this._input[0];
    +        this.yytext += ch;
    +        this.yyleng++;
    +        this.offset++;
    +        this.match += ch;
    +        this.matched += ch;
    +        var lines = ch.match(/(?:\r\n?|\n).*/g);
    +        if (lines) {
    +            this.yylineno++;
    +            this.yylloc.last_line++;
    +        } else {
    +            this.yylloc.last_column++;
    +        }
    +        if (this.options.ranges) this.yylloc.range[1]++;
    + 
    +        this._input = this._input.slice(1);
    +        return ch;
    +    },
    +unput:function (ch) {
    +        var len = ch.length;
    +        var lines = ch.split(/(?:\r\n?|\n)/g);
    + 
    +        this._input = ch + this._input;
    +        this.yytext = this.yytext.substr(0, this.yytext.length-len-1);
    +        //this.yyleng -= len;
    +        this.offset -= len;
    +        var oldLines = this.match.split(/(?:\r\n?|\n)/g);
    +        this.match = this.match.substr(0, this.match.length-1);
    +        this.matched = this.matched.substr(0, this.matched.length-1);
    + 
    +        if (lines.length-1) this.yylineno -= lines.length-1;
    +        var r = this.yylloc.range;
    + 
    +        this.yylloc = {first_line: this.yylloc.first_line,
    +          last_line: this.yylineno+1,
    +          first_column: this.yylloc.first_column,
    +          last_column: lines ?
    +              (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length:
    +              this.yylloc.first_column - len
    +          };
    + 
    +        if (this.options.ranges) {
    +            this.yylloc.range = [r[0], r[0] + this.yyleng - len];
    +        }
    +        return this;
    +    },
    +more:function () {
    +        this._more = true;
    +        return this;
    +    },
    +less:function (n) {
    +        this.unput(this.match.slice(n));
    +    },
    +pastInput:function () {
    +        var past = this.matched.substr(0, this.matched.length - this.match.length);
    +        return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
    +    },
    +upcomingInput:function () {
    +        var next = this.match;
    +        if (next.length < 20) {
    +            next += this._input.substr(0, 20-next.length);
    +        }
    +        return (next.substr(0,20)+(next.length > 20 ? '...':'')).replace(/\n/g, "");
    +    },
    +showPosition:function () {
    +        var pre = this.pastInput();
    +        var c = new Array(pre.length + 1).join("-");
    +        return pre + this.upcomingInput() + "\n" + c+"^";
    +    },
    +next:function () {
    +        Iif (this.done) {
    +            return this.EOF;
    +        }
    +        if (!this._input) this.done = true;
    + 
    +        var token,
    +            match,
    +            tempMatch,
    +            index,
    +            col,
    +            lines;
    +        Eif (!this._more) {
    +            this.yytext = '';
    +            this.match = '';
    +        }
    +        var rules = this._currentRules();
    +        for (var i=0;i < rules.length; i++) {
    +            tempMatch = this._input.match(this.rules[rules[i]]);
    +            if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
    +                match = tempMatch;
    +                index = i;
    +                Eif (!this.options.flex) break;
    +            }
    +        }
    +        Eif (match) {
    +            lines = match[0].match(/(?:\r\n?|\n).*/g);
    +            Iif (lines) this.yylineno += lines.length;
    +            this.yylloc = {first_line: this.yylloc.last_line,
    +                           last_line: this.yylineno+1,
    +                           first_column: this.yylloc.last_column,
    +                           last_column: lines ? lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length};
    +            this.yytext += match[0];
    +            this.match += match[0];
    +            this.matches = match;
    +            this.yyleng = this.yytext.length;
    +            Iif (this.options.ranges) {
    +                this.yylloc.range = [this.offset, this.offset += this.yyleng];
    +            }
    +            this._more = false;
    +            this._input = this._input.slice(match[0].length);
    +            this.matched += match[0];
    +            token = this.performAction.call(this, this.yy, this, rules[index],this.conditionStack[this.conditionStack.length-1]);
    +            Iif (this.done && this._input) this.done = false;
    +            if (token) return token;
    +            else return;
    +        }
    +        if (this._input === "") {
    +            return this.EOF;
    +        } else {
    +            return this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\n'+this.showPosition(),
    +                    {text: "", token: null, line: this.yylineno});
    +        }
    +    },
    +lex:function lex() {
    +        var r = this.next();
    +        if (typeof r !== 'undefined') {
    +            return r;
    +        } else {
    +            return this.lex();
    +        }
    +    },
    +begin:function begin(condition) {
    +        this.conditionStack.push(condition);
    +    },
    +popState:function popState() {
    +        return this.conditionStack.pop();
    +    },
    +_currentRules:function _currentRules() {
    +        return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;
    +    },
    +topState:function () {
    +        return this.conditionStack[this.conditionStack.length-2];
    +    },
    +pushState:function begin(condition) {
    +        this.begin(condition);
    +    }});
    +lexer.options = {};
    +lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START
    +/**/) {
    + 
    +var YYSTATE=YY_START
    +switch($avoiding_name_collisions) {
    +case 0:// ignore
    +break;
    +case 1:return 17
    +break;
    +case 2:return 18
    +break;
    +case 3:return 12
    +break;
    +case 4:return 19
    +break;
    +case 5:return 28
    +break;
    +case 6:return 29
    +break;
    +case 7:return 30
    +break;
    +case 8:return 31
    +break;
    +case 9:return 32
    +break;
    +case 10:return 14
    +break;
    +case 11:return 23
    +break;
    +case 12:return 22
    +break;
    +case 13:return 20
    +break;
    +case 14:return 21
    +break;
    +case 15:return 5
    +break;
    +case 16:return "INVALID"
    +break;
    +}
    +};
    +lexer.rules = [/^(?:\s+)/,/^(?:\()/,/^(?:\))/,/^(?:-?[0-9]+(\.[0-9]+)?([eE][\-\+]?[0-9]+)?)/,/^(?:POINT\b)/,/^(?:LINESTRING\b)/,/^(?:POLYGON\b)/,/^(?:MULTIPOINT\b)/,/^(?:MULTILINESTRING\b)/,/^(?:MULTIPOLYGON\b)/,/^(?:,)/,/^(?:EMPTY\b)/,/^(?:M\b)/,/^(?:Z\b)/,/^(?:ZM\b)/,/^(?:$)/,/^(?:.)/];
    +lexer.conditions = {"INITIAL":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],"inclusive":true}};
    +return lexer;})()
    +parser.lexer = lexer;
    +function Parser () { this.yy = {}; }Parser.prototype = parser;parser.Parser = Parser;
    +return new Parser;
    +})();
    + 
    +  function PointArray (point) {
    +    this.data = [ point ];
    +    this.type = 'PointArray';
    +  }
    + 
    +  PointArray.prototype.addPoint = function (point) {
    +    Eif (point.type === 'PointArray') {
    +      this.data = this.data.concat(point.data);
    +    } else {
    +      this.data.push(point);
    +    }
    + 
    +    return this;
    +  };
    + 
    +  PointArray.prototype.toJSON = function () {
    +    return this.data;
    +  };
    + 
    +  function Ring (point) {
    +    this.data = point;
    +    this.type = 'Ring';
    +  }
    + 
    +  Ring.prototype.toJSON = function () {
    +    var data = [ ];
    + 
    +    for (var i = 0; i < this.data.data.length; i++) {
    +      data.push(this.data.data[i]);
    +    }
    + 
    +    return data;
    +  };
    + 
    +  function RingList (ring) {
    +    this.data = [ ring ];
    +    this.type = 'RingList';
    +  }
    + 
    +  RingList.prototype.addRing = function (ring) {
    +    this.data.push(ring);
    + 
    +    return this;
    +  };
    + 
    +  RingList.prototype.toJSON = function () {
    +    var data = [ ];
    + 
    +    for (var i = 0; i < this.data.length; i++) {
    +      data.push(this.data[i].toJSON());
    +    }
    + 
    +    if (data.length === 1) {
    +      return data;
    +    } else {
    +      return data;
    +    }
    +  };
    + 
    +  function PolygonList (polygon) {
    +    this.data = [ polygon ];
    +    this.type = 'PolygonList';
    +  }
    + 
    +  PolygonList.prototype.addPolygon = function (polygon) {
    +    this.data.push(polygon);
    + 
    +    return this;
    +  };
    + 
    +  PolygonList.prototype.toJSON = function () {
    +    var data = [ ];
    + 
    +    for (var i = 0; i < this.data.length; i++) {
    +      data = data.concat( [ this.data[i].toJSON() ] );
    +    }
    + 
    +    return data;
    +  };
    + 
    +  function _parse () {
    +    return parser.parse.apply(parser, arguments);
    +  }
    + 
    +  function parse (element) {
    +    var res, primitive;
    + 
    +    try {
    +      res = parser.parse(element);
    +    } catch (err) {
    +      throw Error("Unable to parse: " + err);
    +    }
    + 
    +    return Terraformer.Primitive(res);
    +  }
    + 
    +  function arrayToRing (arr) {
    +    var parts = [ ], ret = '';
    + 
    +    for (var i = 0; i < arr.length; i++) {
    +      parts.push(arr[i].join(' '));
    +    }
    + 
    +    ret += '(' + parts.join(', ') + ')';
    + 
    +    return ret;
    + 
    +  }
    + 
    +  function pointToWKTPoint (primitive) {
    +    var ret = 'POINT ';
    + 
    +    if (primitive.coordinates === undefined || primitive.coordinates.length === 0) {
    +      ret += 'EMPTY';
    + 
    +      return ret;
    +    } else if (primitive.coordinates.length === 3) {
    +      // 3d or time? default to 3d
    +      if (primitive.properties && primitive.properties.m === true) {
    +        ret += 'M ';
    +      } else {
    +        ret += 'Z ';
    +      }
    +    } else if (primitive.coordinates.length === 4) {
    +      // 3d and time
    +      ret += 'ZM ';
    +    }
    + 
    +    // include coordinates
    +    ret += '(' + primitive.coordinates.join(' ') + ')';
    + 
    +    return ret;
    +  }
    + 
    +  function lineStringToWKTLineString (primitive) {
    +    var ret = 'LINESTRING ';
    + 
    +    if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) {
    +      ret += 'EMPTY';
    + 
    +      return ret;
    +    } else if (primitive.coordinates[0].length === 3) {
    +      if (primitive.properties && primitive.properties.m === true) {
    +        ret += 'M ';
    +      } else {
    +        ret += 'Z ';
    +      }
    +    } else if (primitive.coordinates[0].length === 4) {
    +      ret += 'ZM ';
    +    }
    + 
    +    ret += arrayToRing(primitive.coordinates);
    + 
    +    return ret;
    +  }
    + 
    +  function polygonToWKTPolygon (primitive) {
    +    var ret = 'POLYGON ';
    + 
    +    if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) {
    +      ret += 'EMPTY';
    + 
    +      return ret;
    +    } else if (primitive.coordinates[0][0].length === 3) {
    +      if (primitive.properties && primitive.properties.m === true) {
    +        ret += 'M ';
    +      } else {
    +        ret += 'Z ';
    +      }
    +    } else if (primitive.coordinates[0][0].length === 4) {
    +      ret += 'ZM ';
    +    }
    + 
    +    ret += '(';
    +    var parts = [ ];
    +    for (var i = 0; i < primitive.coordinates.length; i++) {
    +      parts.push(arrayToRing(primitive.coordinates[i]));
    +    }
    + 
    +    ret += parts.join(', ');
    +    ret += ')';
    + 
    +    return ret;
    +  }
    + 
    +  function multiPointToWKTMultiPoint (primitive) {
    +    var ret = 'MULTIPOINT ';
    + 
    +    if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) {
    +      ret += 'EMPTY';
    + 
    +      return ret;
    +    } else if (primitive.coordinates[0].length === 3) {
    +      if (primitive.properties && primitive.properties.m === true) {
    +        ret += 'M ';
    +      } else {
    +        ret += 'Z ';
    +      }
    +    } else if (primitive.coordinates[0].length === 4) {
    +      ret += 'ZM ';
    +    }
    + 
    +    ret += arrayToRing(primitive.coordinates);
    + 
    +    return ret;
    +  }
    + 
    +  function multiLineStringToWKTMultiLineString (primitive) {
    +    var ret = 'MULTILINESTRING ';
    + 
    +    if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) {
    +      ret += 'EMPTY';
    + 
    +      return ret;
    +    } else if (primitive.coordinates[0][0].length === 3) {
    +      if (primitive.properties && primitive.properties.m === true) {
    +        ret += 'M ';
    +      } else {
    +        ret += 'Z ';
    +      }
    +    } else if (primitive.coordinates[0][0].length === 4) {
    +      ret += 'ZM ';
    +    }
    + 
    +    ret += '(';
    +    var parts = [ ];
    +    for (var i = 0; i < primitive.coordinates.length; i++) {
    +      parts.push(arrayToRing(primitive.coordinates[i]));
    +    }
    + 
    +    ret += parts.join(', ');
    +    ret += ')';
    + 
    +    return ret;
    +  }
    + 
    +  function multiPolygonToWKTMultiPolygon (primitive) {
    +    var ret = 'MULTIPOLYGON ';
    + 
    +    if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) {
    +      ret += 'EMPTY';
    + 
    +      return ret;
    +    } else if (primitive.coordinates[0][0][0].length === 3) {
    +      if (primitive.properties && primitive.properties.m === true) {
    +        ret += 'M ';
    +      } else {
    +        ret += 'Z ';
    +      }
    +    } else if (primitive.coordinates[0][0][0].length === 4) {
    +      ret += 'ZM ';
    +    }
    + 
    +    ret += '(';
    +    var inner = [ ];
    +    for (var c = 0; c < primitive.coordinates.length; c++) {
    +      var it = '(';
    +      var parts = [ ];
    +      for (var i = 0; i < primitive.coordinates[c].length; i++) {
    +        parts.push(arrayToRing(primitive.coordinates[c][i]));
    +      }
    + 
    +      it += parts.join(', ');
    +      it += ')';
    + 
    +      inner.push(it);
    +    }
    + 
    +    ret += inner.join(', ');
    +    ret += ')';
    + 
    +    return ret;
    +  }
    + 
    +  function convert (primitive) {
    +    switch (primitive.type) {
    +      case 'Point':
    +        return pointToWKTPoint(primitive);
    +      case 'LineString':
    +        return lineStringToWKTLineString(primitive);
    +      case 'Polygon':
    +        return polygonToWKTPolygon(primitive);
    +      case 'MultiPoint':
    +        return multiPointToWKTMultiPoint(primitive);
    +      case 'MultiLineString':
    +        return multiLineStringToWKTMultiLineString(primitive);
    +      case 'MultiPolygon':
    +        return multiPolygonToWKTMultiPolygon(primitive);
    +      default:
    +        throw Error ("Unknown Type: " + primitive.type);
    +    }
    +  }
    + 
    + 
    + 
    +  exports.parser  = parser;
    +  exports.Parser  = parser.Parser;
    +  exports.parse   = parse;
    +  exports.convert = convert;
    + 
    +  return exports;
    +}));
    + 
    +
    +
    + + + + + + + diff --git a/node_modules/terraformer-wkt-parser/coverage/base.css b/node_modules/terraformer-wkt-parser/coverage/base.css new file mode 100644 index 0000000..29737bc --- /dev/null +++ b/node_modules/terraformer-wkt-parser/coverage/base.css @@ -0,0 +1,213 @@ +body, html { + margin:0; padding: 0; + height: 100%; +} +body { + font-family: Helvetica Neue, Helvetica, Arial; + font-size: 14px; + color:#333; +} +.small { font-size: 12px; } +*, *:after, *:before { + -webkit-box-sizing:border-box; + -moz-box-sizing:border-box; + box-sizing:border-box; + } +h1 { font-size: 20px; margin: 0;} +h2 { font-size: 14px; } +pre { + font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace; + margin: 0; + padding: 0; + -moz-tab-size: 2; + -o-tab-size: 2; + tab-size: 2; +} +a { color:#0074D9; text-decoration:none; } +a:hover { text-decoration:underline; } +.strong { font-weight: bold; } +.space-top1 { padding: 10px 0 0 0; } +.pad2y { padding: 20px 0; } +.pad1y { padding: 10px 0; } +.pad2x { padding: 0 20px; } +.pad2 { padding: 20px; } +.pad1 { padding: 10px; } +.space-left2 { padding-left:55px; } +.space-right2 { padding-right:20px; } +.center { text-align:center; } +.clearfix { display:block; } +.clearfix:after { + content:''; + display:block; + height:0; + clear:both; + visibility:hidden; + } +.fl { float: left; } +@media only screen and (max-width:640px) { + .col3 { width:100%; max-width:100%; } + .hide-mobile { display:none!important; } +} + +.quiet { + color: #7f7f7f; + color: rgba(0,0,0,0.5); +} +.quiet a { opacity: 0.7; } + +.fraction { + font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; + font-size: 10px; + color: #555; + background: #E8E8E8; + padding: 4px 5px; + border-radius: 3px; + vertical-align: middle; +} + +div.path a:link, div.path a:visited { color: #333; } +table.coverage { + border-collapse: collapse; + margin: 10px 0 0 0; + padding: 0; +} + +table.coverage td { + margin: 0; + padding: 0; + vertical-align: top; +} +table.coverage td.line-count { + text-align: right; + padding: 0 5px 0 20px; +} +table.coverage td.line-coverage { + text-align: right; + padding-right: 10px; + min-width:20px; +} + +table.coverage td span.cline-any { + display: inline-block; + padding: 0 5px; + width: 100%; +} +.missing-if-branch { + display: inline-block; + margin-right: 5px; + border-radius: 3px; + position: relative; + padding: 0 4px; + background: #333; + color: yellow; +} + +.skip-if-branch { + display: none; + margin-right: 10px; + position: relative; + padding: 0 4px; + background: #ccc; + color: white; +} +.missing-if-branch .typ, .skip-if-branch .typ { + color: inherit !important; +} +.coverage-summary { + border-collapse: collapse; + width: 100%; +} +.coverage-summary tr { border-bottom: 1px solid #bbb; } +.keyline-all { border: 1px solid #ddd; } +.coverage-summary td, .coverage-summary th { padding: 10px; } +.coverage-summary tbody { border: 1px solid #bbb; } +.coverage-summary td { border-right: 1px solid #bbb; } +.coverage-summary td:last-child { border-right: none; } +.coverage-summary th { + text-align: left; + font-weight: normal; + white-space: nowrap; +} +.coverage-summary th.file { border-right: none !important; } +.coverage-summary th.pct { } +.coverage-summary th.pic, +.coverage-summary th.abs, +.coverage-summary td.pct, +.coverage-summary td.abs { text-align: right; } +.coverage-summary td.file { white-space: nowrap; } +.coverage-summary td.pic { min-width: 120px !important; } +.coverage-summary tfoot td { } + +.coverage-summary .sorter { + height: 10px; + width: 7px; + display: inline-block; + margin-left: 0.5em; + background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent; +} +.coverage-summary .sorted .sorter { + background-position: 0 -20px; +} +.coverage-summary .sorted-desc .sorter { + background-position: 0 -10px; +} +.status-line { height: 10px; } +/* dark red */ +.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 } +.low .chart { border:1px solid #C21F39 } +/* medium red */ +.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE } +/* light red */ +.low, .cline-no { background:#FCE1E5 } +/* light green */ +.high, .cline-yes { background:rgb(230,245,208) } +/* medium green */ +.cstat-yes { background:rgb(161,215,106) } +/* dark green */ +.status-line.high, .high .cover-fill { background:rgb(77,146,33) } +.high .chart { border:1px solid rgb(77,146,33) } +/* dark yellow (gold) */ +.medium .chart { border:1px solid #f9cd0b; } +.status-line.medium, .medium .cover-fill { background: #f9cd0b; } +/* light yellow */ +.medium { background: #fff4c2; } +/* light gray */ +span.cline-neutral { background: #eaeaea; } + +.cbranch-no { background: yellow !important; color: #111; } + +.cstat-skip { background: #ddd; color: #111; } +.fstat-skip { background: #ddd; color: #111 !important; } +.cbranch-skip { background: #ddd !important; color: #111; } + + +.cover-fill, .cover-empty { + display:inline-block; + height: 12px; +} +.chart { + line-height: 0; +} +.cover-empty { + background: white; +} +.cover-full { + border-right: none !important; +} +pre.prettyprint { + border: none !important; + padding: 0 !important; + margin: 0 !important; +} +.com { color: #999 !important; } +.ignore-none { color: #999; font-weight: normal; } + +.wrapper { + min-height: 100%; + height: auto !important; + height: 100%; + margin: 0 auto -48px; +} +.footer, .push { + height: 48px; +} diff --git a/node_modules/terraformer-wkt-parser/coverage/coverage.json b/node_modules/terraformer-wkt-parser/coverage/coverage.json new file mode 100644 index 0000000..32c80c0 --- /dev/null +++ b/node_modules/terraformer-wkt-parser/coverage/coverage.json @@ -0,0 +1 @@ +{"./terraformer-wkt-parser.js":{"path":"./terraformer-wkt-parser.js","s":{"1":1,"2":1,"3":0,"4":1,"5":1,"6":0,"7":1,"8":1,"9":1,"10":1,"11":500,"12":500,"13":6,"14":0,"15":5,"16":0,"17":6,"18":0,"19":9,"20":0,"21":5,"22":0,"23":6,"24":0,"25":71,"26":71,"27":56,"28":56,"29":29,"30":29,"31":82,"32":82,"33":30,"34":30,"35":6,"36":6,"37":19,"38":19,"39":25,"40":25,"41":2,"42":2,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":28,"52":28,"53":16,"54":16,"55":5,"56":5,"57":5,"58":5,"59":10,"60":10,"61":32,"62":32,"63":12,"64":12,"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":1,"74":1,"75":2,"76":2,"77":1,"78":1,"79":1,"80":1,"81":1,"82":1,"83":1,"84":1,"85":2,"86":2,"87":2,"88":2,"89":2,"90":2,"91":2,"92":2,"93":1,"94":1,"95":1,"96":1,"97":1,"98":1,"99":1,"100":1,"101":1,"102":1,"103":1,"104":1,"105":2,"106":2,"107":1,"108":1,"109":1,"110":1,"111":1,"112":1,"113":1,"114":1,"115":0,"116":37,"117":37,"118":37,"119":37,"120":37,"121":37,"122":0,"123":37,"124":37,"125":37,"126":37,"127":0,"128":1,"129":0,"130":0,"131":0,"132":1,"133":816,"134":816,"135":816,"136":0,"137":816,"138":37,"139":37,"140":1316,"141":1316,"142":74,"143":1242,"144":816,"145":1242,"146":1316,"147":0,"148":0,"149":0,"150":0,"151":0,"152":0,"153":0,"154":0,"155":0,"156":0,"157":1316,"158":0,"159":1316,"160":816,"161":816,"162":816,"163":816,"164":816,"165":816,"166":816,"167":816,"168":816,"169":816,"170":816,"171":0,"172":0,"173":0,"174":816,"175":500,"176":500,"177":500,"178":500,"179":0,"180":500,"181":500,"182":37,"183":463,"184":463,"185":463,"186":463,"187":463,"188":463,"189":463,"190":463,"191":463,"192":463,"193":0,"194":0,"195":1,"196":1,"197":1,"198":0,"199":0,"200":0,"201":37,"202":37,"203":37,"204":37,"205":37,"206":37,"207":37,"208":0,"209":37,"210":37,"211":0,"212":0,"213":0,"214":0,"215":0,"216":0,"217":0,"218":0,"219":0,"220":0,"221":0,"222":0,"223":0,"224":0,"225":0,"226":0,"227":0,"228":0,"229":0,"230":0,"231":0,"232":0,"233":0,"234":0,"235":0,"236":0,"237":0,"238":0,"239":0,"240":0,"241":0,"242":0,"243":0,"244":0,"245":0,"246":0,"247":0,"248":0,"249":0,"250":0,"251":0,"252":0,"253":1258,"254":0,"255":1258,"256":37,"257":1258,"258":1258,"259":1258,"260":1258,"261":1258,"262":1258,"263":5168,"264":5168,"265":1258,"266":1258,"267":1258,"268":1258,"269":1258,"270":1258,"271":1258,"272":0,"273":1258,"274":1258,"275":1258,"276":1258,"277":1258,"278":1258,"279":0,"280":1258,"281":1258,"282":1258,"283":1258,"284":1258,"285":0,"286":1258,"287":816,"288":442,"289":0,"290":0,"291":0,"292":1258,"293":1258,"294":816,"295":442,"296":0,"297":0,"298":1258,"299":0,"300":0,"301":1,"302":1,"303":1258,"304":1258,"305":442,"306":82,"307":0,"308":82,"309":0,"310":426,"311":0,"312":6,"313":0,"314":5,"315":0,"316":6,"317":0,"318":9,"319":0,"320":5,"321":0,"322":6,"323":0,"324":125,"325":0,"326":6,"327":0,"328":7,"329":0,"330":7,"331":0,"332":7,"333":0,"334":37,"335":0,"336":0,"337":0,"338":1,"339":1,"340":1,"341":1,"342":1,"343":1,"344":1,"345":1,"346":1,"347":1,"348":156,"349":156,"350":1,"351":114,"352":114,"353":0,"354":114,"355":1,"356":0,"357":1,"358":25,"359":25,"360":1,"361":25,"362":25,"363":107,"364":25,"365":1,"366":19,"367":19,"368":1,"369":6,"370":6,"371":1,"372":19,"373":19,"374":25,"375":19,"376":13,"377":6,"378":1,"379":5,"380":5,"381":1,"382":5,"383":5,"384":1,"385":5,"386":5,"387":10,"388":5,"389":1,"390":0,"391":1,"392":37,"393":37,"394":37,"395":0,"396":37,"397":1,"398":28,"399":28,"400":108,"401":28,"402":28,"403":1,"404":5,"405":5,"406":1,"407":1,"408":4,"409":2,"410":1,"411":1,"412":2,"413":1,"414":4,"415":4,"416":1,"417":5,"418":5,"419":1,"420":1,"421":4,"422":2,"423":1,"424":1,"425":2,"426":1,"427":4,"428":4,"429":1,"430":5,"431":5,"432":1,"433":1,"434":4,"435":2,"436":1,"437":1,"438":2,"439":1,"440":4,"441":4,"442":4,"443":4,"444":4,"445":4,"446":4,"447":1,"448":5,"449":5,"450":1,"451":1,"452":4,"453":2,"454":1,"455":1,"456":2,"457":1,"458":4,"459":4,"460":1,"461":5,"462":5,"463":1,"464":1,"465":4,"466":2,"467":1,"468":1,"469":2,"470":1,"471":4,"472":4,"473":4,"474":4,"475":4,"476":4,"477":4,"478":1,"479":5,"480":5,"481":1,"482":1,"483":4,"484":2,"485":1,"486":1,"487":2,"488":1,"489":4,"490":4,"491":4,"492":8,"493":8,"494":8,"495":12,"496":8,"497":8,"498":8,"499":4,"500":4,"501":4,"502":1,"503":31,"504":5,"505":5,"506":5,"507":5,"508":5,"509":5,"510":1,"511":1,"512":1,"513":1,"514":1,"515":1},"b":{"1":[0,1],"2":[1,0],"3":[1,0],"4":[0,1],"5":[6,5,6,9,5,6,71,56,29,82,30,6,19,25,2,1,1,1,1,28,16,5,5,10,32,12,1,1,1,1,1,2,1,1,1,1,2,2,2,2,1,1,1,1,1,1,2,1,1,1,1],"6":[0,37],"7":[37,37],"8":[0,37],"9":[816,0],"10":[0,816],"11":[0,0],"12":[74,1242],"13":[816,426],"14":[1242,463],"15":[1242,1242],"16":[0,1316],"17":[1316,1316,1316],"18":[0,0],"19":[0,0],"20":[0,0],"21":[0,0],"22":[0,0],"23":[0,0],"24":[0,0],"25":[0,0],"26":[0,1316],"27":[1316,0],"28":[816,500,0],"29":[816,0],"30":[0,816],"31":[500,0],"32":[500,0],"33":[0,500],"34":[0,0],"35":[37,463],"36":[463,0],"37":[0,0],"38":[0,37],"39":[0,0],"40":[0,0],"41":[0,0],"42":[0,0],"43":[0,0],"44":[0,0],"45":[0,0],"46":[0,0],"47":[0,0],"48":[0,1258],"49":[37,1221],"50":[1258,0],"51":[1258,3910],"52":[5168,1258,0],"53":[1258,0],"54":[1258,0],"55":[0,1258],"56":[0,1258],"57":[0,1258],"58":[0,1258],"59":[1258,37],"60":[816,442],"61":[0,0],"62":[816,442],"63":[442,82,82,426,6,5,6,9,5,6,125,6,7,7,7,37,0],"64":[114,0],"65":[13,6],"66":[1,4],"67":[5,5],"68":[2,2],"69":[1,1],"70":[2,1],"71":[1,1],"72":[1,4],"73":[5,5,4],"74":[2,2],"75":[1,1],"76":[2,1],"77":[1,1],"78":[1,4],"79":[5,5,4],"80":[2,2],"81":[1,1],"82":[2,1],"83":[1,1],"84":[1,4],"85":[5,5,4],"86":[2,2],"87":[1,1],"88":[2,1],"89":[1,1],"90":[1,4],"91":[5,5,4],"92":[2,2],"93":[1,1],"94":[2,1],"95":[1,1],"96":[1,4],"97":[5,5,4],"98":[2,2],"99":[1,1],"100":[2,1],"101":[1,1],"102":[5,5,5,5,5,5,1]},"f":{"1":1,"2":1,"3":1,"4":0,"5":500,"6":0,"7":37,"8":0,"9":816,"10":1,"11":0,"12":37,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":1258,"21":1258,"22":0,"23":0,"24":1258,"25":0,"26":0,"27":1258,"28":1,"29":156,"30":114,"31":0,"32":25,"33":25,"34":19,"35":6,"36":19,"37":5,"38":5,"39":5,"40":0,"41":37,"42":28,"43":5,"44":5,"45":5,"46":5,"47":5,"48":5,"49":31},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":1},"end":{"line":1,"column":26}}},"2":{"name":"(anonymous_2)","line":14,"loc":{"start":{"line":14,"column":8},"end":{"line":14,"column":30}}},"3":{"name":"(anonymous_3)","line":18,"loc":{"start":{"line":18,"column":14},"end":{"line":18,"column":24}}},"4":{"name":"trace","line":19,"loc":{"start":{"line":19,"column":21},"end":{"line":19,"column":38}}},"5":{"name":"anonymous","line":24,"loc":{"start":{"line":24,"column":15},"end":{"line":25,"column":6}}},"6":{"name":"parseError","line":135,"loc":{"start":{"line":135,"column":12},"end":{"line":135,"column":43}}},"7":{"name":"parse","line":138,"loc":{"start":{"line":138,"column":7},"end":{"line":138,"column":29}}},"8":{"name":"popStack","line":151,"loc":{"start":{"line":151,"column":4},"end":{"line":151,"column":25}}},"9":{"name":"lex","line":156,"loc":{"start":{"line":156,"column":4},"end":{"line":156,"column":19}}},"10":{"name":"(anonymous_10)","line":243,"loc":{"start":{"line":243,"column":13},"end":{"line":243,"column":23}}},"11":{"name":"parseError","line":245,"loc":{"start":{"line":245,"column":11},"end":{"line":245,"column":42}}},"12":{"name":"(anonymous_12)","line":252,"loc":{"start":{"line":252,"column":9},"end":{"line":252,"column":26}}},"13":{"name":"(anonymous_13)","line":263,"loc":{"start":{"line":263,"column":6},"end":{"line":263,"column":18}}},"14":{"name":"(anonymous_14)","line":282,"loc":{"start":{"line":282,"column":6},"end":{"line":282,"column":20}}},"15":{"name":"(anonymous_15)","line":310,"loc":{"start":{"line":310,"column":5},"end":{"line":310,"column":17}}},"16":{"name":"(anonymous_16)","line":314,"loc":{"start":{"line":314,"column":5},"end":{"line":314,"column":18}}},"17":{"name":"(anonymous_17)","line":317,"loc":{"start":{"line":317,"column":10},"end":{"line":317,"column":22}}},"18":{"name":"(anonymous_18)","line":321,"loc":{"start":{"line":321,"column":14},"end":{"line":321,"column":26}}},"19":{"name":"(anonymous_19)","line":328,"loc":{"start":{"line":328,"column":13},"end":{"line":328,"column":25}}},"20":{"name":"(anonymous_20)","line":333,"loc":{"start":{"line":333,"column":5},"end":{"line":333,"column":17}}},"21":{"name":"lex","line":387,"loc":{"start":{"line":387,"column":4},"end":{"line":387,"column":19}}},"22":{"name":"begin","line":395,"loc":{"start":{"line":395,"column":6},"end":{"line":395,"column":32}}},"23":{"name":"popState","line":398,"loc":{"start":{"line":398,"column":9},"end":{"line":398,"column":29}}},"24":{"name":"_currentRules","line":401,"loc":{"start":{"line":401,"column":14},"end":{"line":401,"column":39}}},"25":{"name":"(anonymous_25)","line":404,"loc":{"start":{"line":404,"column":9},"end":{"line":404,"column":21}}},"26":{"name":"begin","line":407,"loc":{"start":{"line":407,"column":10},"end":{"line":407,"column":36}}},"27":{"name":"anonymous","line":411,"loc":{"start":{"line":411,"column":22},"end":{"line":412,"column":6}}},"28":{"name":"Parser","line":456,"loc":{"start":{"line":456,"column":0},"end":{"line":456,"column":19}}},"29":{"name":"PointArray","line":460,"loc":{"start":{"line":460,"column":2},"end":{"line":460,"column":30}}},"30":{"name":"(anonymous_30)","line":465,"loc":{"start":{"line":465,"column":34},"end":{"line":465,"column":51}}},"31":{"name":"(anonymous_31)","line":475,"loc":{"start":{"line":475,"column":32},"end":{"line":475,"column":44}}},"32":{"name":"Ring","line":479,"loc":{"start":{"line":479,"column":2},"end":{"line":479,"column":24}}},"33":{"name":"(anonymous_33)","line":484,"loc":{"start":{"line":484,"column":26},"end":{"line":484,"column":38}}},"34":{"name":"RingList","line":494,"loc":{"start":{"line":494,"column":2},"end":{"line":494,"column":27}}},"35":{"name":"(anonymous_35)","line":499,"loc":{"start":{"line":499,"column":31},"end":{"line":499,"column":47}}},"36":{"name":"(anonymous_36)","line":505,"loc":{"start":{"line":505,"column":30},"end":{"line":505,"column":42}}},"37":{"name":"PolygonList","line":519,"loc":{"start":{"line":519,"column":2},"end":{"line":519,"column":33}}},"38":{"name":"(anonymous_38)","line":524,"loc":{"start":{"line":524,"column":37},"end":{"line":524,"column":56}}},"39":{"name":"(anonymous_39)","line":530,"loc":{"start":{"line":530,"column":33},"end":{"line":530,"column":45}}},"40":{"name":"_parse","line":540,"loc":{"start":{"line":540,"column":2},"end":{"line":540,"column":21}}},"41":{"name":"parse","line":544,"loc":{"start":{"line":544,"column":2},"end":{"line":544,"column":27}}},"42":{"name":"arrayToRing","line":556,"loc":{"start":{"line":556,"column":2},"end":{"line":556,"column":29}}},"43":{"name":"pointToWKTPoint","line":569,"loc":{"start":{"line":569,"column":2},"end":{"line":569,"column":39}}},"44":{"name":"lineStringToWKTLineString","line":594,"loc":{"start":{"line":594,"column":2},"end":{"line":594,"column":49}}},"45":{"name":"polygonToWKTPolygon","line":616,"loc":{"start":{"line":616,"column":2},"end":{"line":616,"column":43}}},"46":{"name":"multiPointToWKTMultiPoint","line":645,"loc":{"start":{"line":645,"column":2},"end":{"line":645,"column":49}}},"47":{"name":"multiLineStringToWKTMultiLineString","line":667,"loc":{"start":{"line":667,"column":2},"end":{"line":667,"column":59}}},"48":{"name":"multiPolygonToWKTMultiPolygon","line":696,"loc":{"start":{"line":696,"column":2},"end":{"line":696,"column":53}}},"49":{"name":"convert","line":734,"loc":{"start":{"line":734,"column":2},"end":{"line":734,"column":31}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":761,"column":4}},"2":{"start":{"line":4,"column":2},"end":{"line":12,"column":3}},"3":{"start":{"line":5,"column":4},"end":{"line":5,"column":63}},"4":{"start":{"line":6,"column":9},"end":{"line":12,"column":3}},"5":{"start":{"line":8,"column":4},"end":{"line":10,"column":5}},"6":{"start":{"line":9,"column":6},"end":{"line":9,"column":114}},"7":{"start":{"line":11,"column":4},"end":{"line":11,"column":53}},"8":{"start":{"line":15,"column":2},"end":{"line":15,"column":20}},"9":{"start":{"line":18,"column":0},"end":{"line":458,"column":5}},"10":{"start":{"line":19,"column":0},"end":{"line":241,"column":2}},"11":{"start":{"line":27,"column":0},"end":{"line":27,"column":22}},"12":{"start":{"line":28,"column":0},"end":{"line":131,"column":1}},"13":{"start":{"line":29,"column":8},"end":{"line":29,"column":23}},"14":{"start":{"line":30,"column":0},"end":{"line":30,"column":6}},"15":{"start":{"line":31,"column":8},"end":{"line":31,"column":23}},"16":{"start":{"line":32,"column":0},"end":{"line":32,"column":6}},"17":{"start":{"line":33,"column":8},"end":{"line":33,"column":23}},"18":{"start":{"line":34,"column":0},"end":{"line":34,"column":6}},"19":{"start":{"line":35,"column":8},"end":{"line":35,"column":23}},"20":{"start":{"line":36,"column":0},"end":{"line":36,"column":6}},"21":{"start":{"line":37,"column":8},"end":{"line":37,"column":23}},"22":{"start":{"line":38,"column":0},"end":{"line":38,"column":6}},"23":{"start":{"line":39,"column":8},"end":{"line":39,"column":23}},"24":{"start":{"line":40,"column":0},"end":{"line":40,"column":6}},"25":{"start":{"line":41,"column":8},"end":{"line":41,"column":68}},"26":{"start":{"line":42,"column":0},"end":{"line":42,"column":6}},"27":{"start":{"line":43,"column":8},"end":{"line":43,"column":85}},"28":{"start":{"line":44,"column":0},"end":{"line":44,"column":6}},"29":{"start":{"line":45,"column":8},"end":{"line":45,"column":102}},"30":{"start":{"line":46,"column":0},"end":{"line":46,"column":6}},"31":{"start":{"line":47,"column":9},"end":{"line":47,"column":42}},"32":{"start":{"line":48,"column":0},"end":{"line":48,"column":6}},"33":{"start":{"line":49,"column":9},"end":{"line":49,"column":24}},"34":{"start":{"line":50,"column":0},"end":{"line":50,"column":6}},"35":{"start":{"line":51,"column":9},"end":{"line":51,"column":41}},"36":{"start":{"line":52,"column":0},"end":{"line":52,"column":6}},"37":{"start":{"line":53,"column":9},"end":{"line":53,"column":38}},"38":{"start":{"line":54,"column":0},"end":{"line":54,"column":6}},"39":{"start":{"line":55,"column":9},"end":{"line":55,"column":36}},"40":{"start":{"line":56,"column":0},"end":{"line":56,"column":6}},"41":{"start":{"line":57,"column":9},"end":{"line":57,"column":70}},"42":{"start":{"line":58,"column":0},"end":{"line":58,"column":6}},"43":{"start":{"line":59,"column":9},"end":{"line":59,"column":97}},"44":{"start":{"line":60,"column":0},"end":{"line":60,"column":6}},"45":{"start":{"line":61,"column":9},"end":{"line":61,"column":106}},"46":{"start":{"line":62,"column":0},"end":{"line":62,"column":6}},"47":{"start":{"line":63,"column":9},"end":{"line":63,"column":97}},"48":{"start":{"line":64,"column":0},"end":{"line":64,"column":6}},"49":{"start":{"line":65,"column":9},"end":{"line":65,"column":58}},"50":{"start":{"line":66,"column":0},"end":{"line":66,"column":6}},"51":{"start":{"line":67,"column":9},"end":{"line":67,"column":24}},"52":{"start":{"line":68,"column":0},"end":{"line":68,"column":6}},"53":{"start":{"line":69,"column":9},"end":{"line":69,"column":26}},"54":{"start":{"line":70,"column":0},"end":{"line":70,"column":6}},"55":{"start":{"line":71,"column":9},"end":{"line":71,"column":44}},"56":{"start":{"line":72,"column":0},"end":{"line":72,"column":6}},"57":{"start":{"line":73,"column":9},"end":{"line":73,"column":41}},"58":{"start":{"line":74,"column":0},"end":{"line":74,"column":6}},"59":{"start":{"line":75,"column":9},"end":{"line":75,"column":26}},"60":{"start":{"line":76,"column":0},"end":{"line":76,"column":6}},"61":{"start":{"line":77,"column":9},"end":{"line":77,"column":42}},"62":{"start":{"line":78,"column":0},"end":{"line":78,"column":6}},"63":{"start":{"line":79,"column":9},"end":{"line":79,"column":24}},"64":{"start":{"line":80,"column":0},"end":{"line":80,"column":6}},"65":{"start":{"line":81,"column":9},"end":{"line":81,"column":72}},"66":{"start":{"line":82,"column":0},"end":{"line":82,"column":6}},"67":{"start":{"line":83,"column":9},"end":{"line":83,"column":99}},"68":{"start":{"line":84,"column":0},"end":{"line":84,"column":6}},"69":{"start":{"line":85,"column":9},"end":{"line":85,"column":99}},"70":{"start":{"line":86,"column":0},"end":{"line":86,"column":6}},"71":{"start":{"line":87,"column":9},"end":{"line":87,"column":108}},"72":{"start":{"line":88,"column":0},"end":{"line":88,"column":6}},"73":{"start":{"line":89,"column":9},"end":{"line":89,"column":63}},"74":{"start":{"line":90,"column":0},"end":{"line":90,"column":6}},"75":{"start":{"line":91,"column":9},"end":{"line":91,"column":73}},"76":{"start":{"line":92,"column":0},"end":{"line":92,"column":6}},"77":{"start":{"line":93,"column":9},"end":{"line":93,"column":100}},"78":{"start":{"line":94,"column":0},"end":{"line":94,"column":6}},"79":{"start":{"line":95,"column":9},"end":{"line":95,"column":100}},"80":{"start":{"line":96,"column":0},"end":{"line":96,"column":6}},"81":{"start":{"line":97,"column":9},"end":{"line":97,"column":109}},"82":{"start":{"line":98,"column":0},"end":{"line":98,"column":6}},"83":{"start":{"line":99,"column":9},"end":{"line":99,"column":60}},"84":{"start":{"line":100,"column":0},"end":{"line":100,"column":6}},"85":{"start":{"line":101,"column":9},"end":{"line":101,"column":72}},"86":{"start":{"line":102,"column":0},"end":{"line":102,"column":6}},"87":{"start":{"line":103,"column":9},"end":{"line":103,"column":99}},"88":{"start":{"line":104,"column":0},"end":{"line":104,"column":6}},"89":{"start":{"line":105,"column":9},"end":{"line":105,"column":99}},"90":{"start":{"line":106,"column":0},"end":{"line":106,"column":6}},"91":{"start":{"line":107,"column":9},"end":{"line":107,"column":108}},"92":{"start":{"line":108,"column":0},"end":{"line":108,"column":6}},"93":{"start":{"line":109,"column":9},"end":{"line":109,"column":62}},"94":{"start":{"line":110,"column":0},"end":{"line":110,"column":6}},"95":{"start":{"line":111,"column":9},"end":{"line":111,"column":81}},"96":{"start":{"line":112,"column":0},"end":{"line":112,"column":6}},"97":{"start":{"line":113,"column":9},"end":{"line":113,"column":108}},"98":{"start":{"line":114,"column":0},"end":{"line":114,"column":6}},"99":{"start":{"line":115,"column":9},"end":{"line":115,"column":108}},"100":{"start":{"line":116,"column":0},"end":{"line":116,"column":6}},"101":{"start":{"line":117,"column":9},"end":{"line":117,"column":117}},"102":{"start":{"line":118,"column":0},"end":{"line":118,"column":6}},"103":{"start":{"line":119,"column":9},"end":{"line":119,"column":68}},"104":{"start":{"line":120,"column":0},"end":{"line":120,"column":6}},"105":{"start":{"line":121,"column":9},"end":{"line":121,"column":78}},"106":{"start":{"line":122,"column":0},"end":{"line":122,"column":6}},"107":{"start":{"line":123,"column":9},"end":{"line":123,"column":105}},"108":{"start":{"line":124,"column":0},"end":{"line":124,"column":6}},"109":{"start":{"line":125,"column":9},"end":{"line":125,"column":105}},"110":{"start":{"line":126,"column":0},"end":{"line":126,"column":6}},"111":{"start":{"line":127,"column":9},"end":{"line":127,"column":114}},"112":{"start":{"line":128,"column":0},"end":{"line":128,"column":6}},"113":{"start":{"line":129,"column":9},"end":{"line":129,"column":65}},"114":{"start":{"line":130,"column":0},"end":{"line":130,"column":6}},"115":{"start":{"line":136,"column":4},"end":{"line":136,"column":25}},"116":{"start":{"line":139,"column":4},"end":{"line":139,"column":159}},"117":{"start":{"line":140,"column":4},"end":{"line":140,"column":31}},"118":{"start":{"line":141,"column":4},"end":{"line":141,"column":28}},"119":{"start":{"line":142,"column":4},"end":{"line":142,"column":31}},"120":{"start":{"line":143,"column":4},"end":{"line":143,"column":26}},"121":{"start":{"line":144,"column":4},"end":{"line":145,"column":31}},"122":{"start":{"line":145,"column":8},"end":{"line":145,"column":31}},"123":{"start":{"line":146,"column":4},"end":{"line":146,"column":34}},"124":{"start":{"line":147,"column":4},"end":{"line":147,"column":23}},"125":{"start":{"line":148,"column":4},"end":{"line":148,"column":65}},"126":{"start":{"line":149,"column":4},"end":{"line":150,"column":45}},"127":{"start":{"line":150,"column":8},"end":{"line":150,"column":45}},"128":{"start":{"line":151,"column":4},"end":{"line":155,"column":5}},"129":{"start":{"line":152,"column":8},"end":{"line":152,"column":44}},"130":{"start":{"line":153,"column":8},"end":{"line":153,"column":42}},"131":{"start":{"line":154,"column":8},"end":{"line":154,"column":42}},"132":{"start":{"line":156,"column":4},"end":{"line":163,"column":5}},"133":{"start":{"line":157,"column":8},"end":{"line":157,"column":18}},"134":{"start":{"line":158,"column":8},"end":{"line":158,"column":38}},"135":{"start":{"line":159,"column":8},"end":{"line":161,"column":9}},"136":{"start":{"line":160,"column":12},"end":{"line":160,"column":50}},"137":{"start":{"line":162,"column":8},"end":{"line":162,"column":21}},"138":{"start":{"line":164,"column":4},"end":{"line":164,"column":92}},"139":{"start":{"line":165,"column":4},"end":{"line":238,"column":5}},"140":{"start":{"line":166,"column":8},"end":{"line":166,"column":40}},"141":{"start":{"line":167,"column":8},"end":{"line":174,"column":9}},"142":{"start":{"line":168,"column":12},"end":{"line":168,"column":48}},"143":{"start":{"line":170,"column":12},"end":{"line":172,"column":13}},"144":{"start":{"line":171,"column":16},"end":{"line":171,"column":31}},"145":{"start":{"line":173,"column":12},"end":{"line":173,"column":58}},"146":{"start":{"line":175,"column":8},"end":{"line":190,"column":9}},"147":{"start":{"line":176,"column":12},"end":{"line":176,"column":28}},"148":{"start":{"line":177,"column":12},"end":{"line":189,"column":13}},"149":{"start":{"line":178,"column":16},"end":{"line":178,"column":30}},"150":{"start":{"line":179,"column":16},"end":{"line":182,"column":21}},"151":{"start":{"line":180,"column":20},"end":{"line":182,"column":21}},"152":{"start":{"line":181,"column":24},"end":{"line":181,"column":70}},"153":{"start":{"line":183,"column":16},"end":{"line":187,"column":17}},"154":{"start":{"line":184,"column":20},"end":{"line":184,"column":200}},"155":{"start":{"line":186,"column":20},"end":{"line":186,"column":166}},"156":{"start":{"line":188,"column":16},"end":{"line":188,"column":167}},"157":{"start":{"line":191,"column":8},"end":{"line":193,"column":9}},"158":{"start":{"line":192,"column":12},"end":{"line":192,"column":112}},"159":{"start":{"line":194,"column":8},"end":{"line":237,"column":9}},"160":{"start":{"line":196,"column":12},"end":{"line":196,"column":31}},"161":{"start":{"line":197,"column":12},"end":{"line":197,"column":43}},"162":{"start":{"line":198,"column":12},"end":{"line":198,"column":43}},"163":{"start":{"line":199,"column":12},"end":{"line":199,"column":34}},"164":{"start":{"line":200,"column":12},"end":{"line":200,"column":26}},"165":{"start":{"line":201,"column":12},"end":{"line":211,"column":13}},"166":{"start":{"line":202,"column":16},"end":{"line":202,"column":43}},"167":{"start":{"line":203,"column":16},"end":{"line":203,"column":43}},"168":{"start":{"line":204,"column":16},"end":{"line":204,"column":47}},"169":{"start":{"line":205,"column":16},"end":{"line":205,"column":42}},"170":{"start":{"line":206,"column":16},"end":{"line":207,"column":33}},"171":{"start":{"line":207,"column":20},"end":{"line":207,"column":33}},"172":{"start":{"line":209,"column":16},"end":{"line":209,"column":40}},"173":{"start":{"line":210,"column":16},"end":{"line":210,"column":38}},"174":{"start":{"line":212,"column":12},"end":{"line":212,"column":18}},"175":{"start":{"line":214,"column":12},"end":{"line":214,"column":50}},"176":{"start":{"line":215,"column":12},"end":{"line":215,"column":50}},"177":{"start":{"line":216,"column":12},"end":{"line":216,"column":246}},"178":{"start":{"line":217,"column":12},"end":{"line":219,"column":13}},"179":{"start":{"line":218,"column":16},"end":{"line":218,"column":115}},"180":{"start":{"line":220,"column":12},"end":{"line":220,"column":109}},"181":{"start":{"line":221,"column":12},"end":{"line":223,"column":13}},"182":{"start":{"line":222,"column":16},"end":{"line":222,"column":25}},"183":{"start":{"line":224,"column":12},"end":{"line":228,"column":13}},"184":{"start":{"line":225,"column":16},"end":{"line":225,"column":53}},"185":{"start":{"line":226,"column":16},"end":{"line":226,"column":51}},"186":{"start":{"line":227,"column":16},"end":{"line":227,"column":51}},"187":{"start":{"line":229,"column":12},"end":{"line":229,"column":56}},"188":{"start":{"line":230,"column":12},"end":{"line":230,"column":33}},"189":{"start":{"line":231,"column":12},"end":{"line":231,"column":34}},"190":{"start":{"line":232,"column":12},"end":{"line":232,"column":79}},"191":{"start":{"line":233,"column":12},"end":{"line":233,"column":33}},"192":{"start":{"line":234,"column":12},"end":{"line":234,"column":18}},"193":{"start":{"line":236,"column":12},"end":{"line":236,"column":24}},"194":{"start":{"line":239,"column":4},"end":{"line":239,"column":16}},"195":{"start":{"line":242,"column":0},"end":{"line":242,"column":9}},"196":{"start":{"line":243,"column":0},"end":{"line":454,"column":17}},"197":{"start":{"line":244,"column":0},"end":{"line":409,"column":8}},"198":{"start":{"line":246,"column":8},"end":{"line":250,"column":9}},"199":{"start":{"line":247,"column":12},"end":{"line":247,"column":49}},"200":{"start":{"line":249,"column":12},"end":{"line":249,"column":33}},"201":{"start":{"line":253,"column":8},"end":{"line":253,"column":28}},"202":{"start":{"line":254,"column":8},"end":{"line":254,"column":52}},"203":{"start":{"line":255,"column":8},"end":{"line":255,"column":40}},"204":{"start":{"line":256,"column":8},"end":{"line":256,"column":53}},"205":{"start":{"line":257,"column":8},"end":{"line":257,"column":42}},"206":{"start":{"line":258,"column":8},"end":{"line":258,"column":78}},"207":{"start":{"line":259,"column":8},"end":{"line":259,"column":59}},"208":{"start":{"line":259,"column":33},"end":{"line":259,"column":59}},"209":{"start":{"line":260,"column":8},"end":{"line":260,"column":24}},"210":{"start":{"line":261,"column":8},"end":{"line":261,"column":20}},"211":{"start":{"line":264,"column":8},"end":{"line":264,"column":32}},"212":{"start":{"line":265,"column":8},"end":{"line":265,"column":26}},"213":{"start":{"line":266,"column":8},"end":{"line":266,"column":22}},"214":{"start":{"line":267,"column":8},"end":{"line":267,"column":22}},"215":{"start":{"line":268,"column":8},"end":{"line":268,"column":25}},"216":{"start":{"line":269,"column":8},"end":{"line":269,"column":27}},"217":{"start":{"line":270,"column":8},"end":{"line":270,"column":48}},"218":{"start":{"line":271,"column":8},"end":{"line":276,"column":9}},"219":{"start":{"line":272,"column":12},"end":{"line":272,"column":28}},"220":{"start":{"line":273,"column":12},"end":{"line":273,"column":36}},"221":{"start":{"line":275,"column":12},"end":{"line":275,"column":38}},"222":{"start":{"line":277,"column":8},"end":{"line":277,"column":56}},"223":{"start":{"line":277,"column":33},"end":{"line":277,"column":56}},"224":{"start":{"line":279,"column":8},"end":{"line":279,"column":43}},"225":{"start":{"line":280,"column":8},"end":{"line":280,"column":18}},"226":{"start":{"line":283,"column":8},"end":{"line":283,"column":28}},"227":{"start":{"line":284,"column":8},"end":{"line":284,"column":46}},"228":{"start":{"line":286,"column":8},"end":{"line":286,"column":39}},"229":{"start":{"line":287,"column":8},"end":{"line":287,"column":70}},"230":{"start":{"line":289,"column":8},"end":{"line":289,"column":27}},"231":{"start":{"line":290,"column":8},"end":{"line":290,"column":57}},"232":{"start":{"line":291,"column":8},"end":{"line":291,"column":63}},"233":{"start":{"line":292,"column":8},"end":{"line":292,"column":69}},"234":{"start":{"line":294,"column":8},"end":{"line":294,"column":60}},"235":{"start":{"line":294,"column":28},"end":{"line":294,"column":60}},"236":{"start":{"line":295,"column":8},"end":{"line":295,"column":34}},"237":{"start":{"line":297,"column":8},"end":{"line":303,"column":12}},"238":{"start":{"line":305,"column":8},"end":{"line":307,"column":9}},"239":{"start":{"line":306,"column":12},"end":{"line":306,"column":65}},"240":{"start":{"line":308,"column":8},"end":{"line":308,"column":20}},"241":{"start":{"line":311,"column":8},"end":{"line":311,"column":26}},"242":{"start":{"line":312,"column":8},"end":{"line":312,"column":20}},"243":{"start":{"line":315,"column":8},"end":{"line":315,"column":40}},"244":{"start":{"line":318,"column":8},"end":{"line":318,"column":83}},"245":{"start":{"line":319,"column":8},"end":{"line":319,"column":83}},"246":{"start":{"line":322,"column":8},"end":{"line":322,"column":30}},"247":{"start":{"line":323,"column":8},"end":{"line":325,"column":9}},"248":{"start":{"line":324,"column":12},"end":{"line":324,"column":58}},"249":{"start":{"line":326,"column":8},"end":{"line":326,"column":84}},"250":{"start":{"line":329,"column":8},"end":{"line":329,"column":35}},"251":{"start":{"line":330,"column":8},"end":{"line":330,"column":52}},"252":{"start":{"line":331,"column":8},"end":{"line":331,"column":57}},"253":{"start":{"line":334,"column":8},"end":{"line":336,"column":9}},"254":{"start":{"line":335,"column":12},"end":{"line":335,"column":28}},"255":{"start":{"line":337,"column":8},"end":{"line":337,"column":43}},"256":{"start":{"line":337,"column":26},"end":{"line":337,"column":43}},"257":{"start":{"line":339,"column":8},"end":{"line":344,"column":18}},"258":{"start":{"line":345,"column":8},"end":{"line":348,"column":9}},"259":{"start":{"line":346,"column":12},"end":{"line":346,"column":29}},"260":{"start":{"line":347,"column":12},"end":{"line":347,"column":28}},"261":{"start":{"line":349,"column":8},"end":{"line":349,"column":41}},"262":{"start":{"line":350,"column":8},"end":{"line":357,"column":9}},"263":{"start":{"line":351,"column":12},"end":{"line":351,"column":64}},"264":{"start":{"line":352,"column":12},"end":{"line":356,"column":13}},"265":{"start":{"line":353,"column":16},"end":{"line":353,"column":34}},"266":{"start":{"line":354,"column":16},"end":{"line":354,"column":26}},"267":{"start":{"line":355,"column":16},"end":{"line":355,"column":46}},"268":{"start":{"line":355,"column":40},"end":{"line":355,"column":46}},"269":{"start":{"line":358,"column":8},"end":{"line":379,"column":9}},"270":{"start":{"line":359,"column":12},"end":{"line":359,"column":54}},"271":{"start":{"line":360,"column":12},"end":{"line":360,"column":53}},"272":{"start":{"line":360,"column":23},"end":{"line":360,"column":53}},"273":{"start":{"line":361,"column":12},"end":{"line":364,"column":170}},"274":{"start":{"line":365,"column":12},"end":{"line":365,"column":36}},"275":{"start":{"line":366,"column":12},"end":{"line":366,"column":35}},"276":{"start":{"line":367,"column":12},"end":{"line":367,"column":33}},"277":{"start":{"line":368,"column":12},"end":{"line":368,"column":45}},"278":{"start":{"line":369,"column":12},"end":{"line":371,"column":13}},"279":{"start":{"line":370,"column":16},"end":{"line":370,"column":78}},"280":{"start":{"line":372,"column":12},"end":{"line":372,"column":31}},"281":{"start":{"line":373,"column":12},"end":{"line":373,"column":61}},"282":{"start":{"line":374,"column":12},"end":{"line":374,"column":37}},"283":{"start":{"line":375,"column":12},"end":{"line":375,"column":129}},"284":{"start":{"line":376,"column":12},"end":{"line":376,"column":60}},"285":{"start":{"line":376,"column":42},"end":{"line":376,"column":60}},"286":{"start":{"line":377,"column":12},"end":{"line":378,"column":24}},"287":{"start":{"line":377,"column":23},"end":{"line":377,"column":36}},"288":{"start":{"line":378,"column":17},"end":{"line":378,"column":24}},"289":{"start":{"line":380,"column":8},"end":{"line":385,"column":9}},"290":{"start":{"line":381,"column":12},"end":{"line":381,"column":28}},"291":{"start":{"line":383,"column":12},"end":{"line":384,"column":66}},"292":{"start":{"line":388,"column":8},"end":{"line":388,"column":28}},"293":{"start":{"line":389,"column":8},"end":{"line":393,"column":9}},"294":{"start":{"line":390,"column":12},"end":{"line":390,"column":21}},"295":{"start":{"line":392,"column":12},"end":{"line":392,"column":30}},"296":{"start":{"line":396,"column":8},"end":{"line":396,"column":44}},"297":{"start":{"line":399,"column":8},"end":{"line":399,"column":41}},"298":{"start":{"line":402,"column":8},"end":{"line":402,"column":88}},"299":{"start":{"line":405,"column":8},"end":{"line":405,"column":65}},"300":{"start":{"line":408,"column":8},"end":{"line":408,"column":30}},"301":{"start":{"line":410,"column":0},"end":{"line":410,"column":19}},"302":{"start":{"line":411,"column":0},"end":{"line":451,"column":2}},"303":{"start":{"line":414,"column":0},"end":{"line":414,"column":20}},"304":{"start":{"line":415,"column":0},"end":{"line":450,"column":1}},"305":{"start":{"line":417,"column":0},"end":{"line":417,"column":6}},"306":{"start":{"line":418,"column":7},"end":{"line":418,"column":16}},"307":{"start":{"line":419,"column":0},"end":{"line":419,"column":6}},"308":{"start":{"line":420,"column":7},"end":{"line":420,"column":16}},"309":{"start":{"line":421,"column":0},"end":{"line":421,"column":6}},"310":{"start":{"line":422,"column":7},"end":{"line":422,"column":16}},"311":{"start":{"line":423,"column":0},"end":{"line":423,"column":6}},"312":{"start":{"line":424,"column":7},"end":{"line":424,"column":16}},"313":{"start":{"line":425,"column":0},"end":{"line":425,"column":6}},"314":{"start":{"line":426,"column":7},"end":{"line":426,"column":16}},"315":{"start":{"line":427,"column":0},"end":{"line":427,"column":6}},"316":{"start":{"line":428,"column":7},"end":{"line":428,"column":16}},"317":{"start":{"line":429,"column":0},"end":{"line":429,"column":6}},"318":{"start":{"line":430,"column":7},"end":{"line":430,"column":16}},"319":{"start":{"line":431,"column":0},"end":{"line":431,"column":6}},"320":{"start":{"line":432,"column":7},"end":{"line":432,"column":16}},"321":{"start":{"line":433,"column":0},"end":{"line":433,"column":6}},"322":{"start":{"line":434,"column":7},"end":{"line":434,"column":16}},"323":{"start":{"line":435,"column":0},"end":{"line":435,"column":6}},"324":{"start":{"line":436,"column":8},"end":{"line":436,"column":17}},"325":{"start":{"line":437,"column":0},"end":{"line":437,"column":6}},"326":{"start":{"line":438,"column":8},"end":{"line":438,"column":17}},"327":{"start":{"line":439,"column":0},"end":{"line":439,"column":6}},"328":{"start":{"line":440,"column":8},"end":{"line":440,"column":17}},"329":{"start":{"line":441,"column":0},"end":{"line":441,"column":6}},"330":{"start":{"line":442,"column":8},"end":{"line":442,"column":17}},"331":{"start":{"line":443,"column":0},"end":{"line":443,"column":6}},"332":{"start":{"line":444,"column":8},"end":{"line":444,"column":17}},"333":{"start":{"line":445,"column":0},"end":{"line":445,"column":6}},"334":{"start":{"line":446,"column":8},"end":{"line":446,"column":16}},"335":{"start":{"line":447,"column":0},"end":{"line":447,"column":6}},"336":{"start":{"line":448,"column":8},"end":{"line":448,"column":24}},"337":{"start":{"line":449,"column":0},"end":{"line":449,"column":6}},"338":{"start":{"line":452,"column":0},"end":{"line":452,"column":289}},"339":{"start":{"line":453,"column":0},"end":{"line":453,"column":101}},"340":{"start":{"line":454,"column":0},"end":{"line":454,"column":13}},"341":{"start":{"line":455,"column":0},"end":{"line":455,"column":21}},"342":{"start":{"line":456,"column":0},"end":{"line":456,"column":36}},"343":{"start":{"line":456,"column":21},"end":{"line":456,"column":34}},"344":{"start":{"line":456,"column":36},"end":{"line":456,"column":62}},"345":{"start":{"line":456,"column":62},"end":{"line":456,"column":85}},"346":{"start":{"line":457,"column":0},"end":{"line":457,"column":18}},"347":{"start":{"line":460,"column":2},"end":{"line":463,"column":3}},"348":{"start":{"line":461,"column":4},"end":{"line":461,"column":26}},"349":{"start":{"line":462,"column":4},"end":{"line":462,"column":29}},"350":{"start":{"line":465,"column":2},"end":{"line":473,"column":4}},"351":{"start":{"line":466,"column":4},"end":{"line":470,"column":5}},"352":{"start":{"line":467,"column":6},"end":{"line":467,"column":47}},"353":{"start":{"line":469,"column":6},"end":{"line":469,"column":28}},"354":{"start":{"line":472,"column":4},"end":{"line":472,"column":16}},"355":{"start":{"line":475,"column":2},"end":{"line":477,"column":4}},"356":{"start":{"line":476,"column":4},"end":{"line":476,"column":21}},"357":{"start":{"line":479,"column":2},"end":{"line":482,"column":3}},"358":{"start":{"line":480,"column":4},"end":{"line":480,"column":22}},"359":{"start":{"line":481,"column":4},"end":{"line":481,"column":23}},"360":{"start":{"line":484,"column":2},"end":{"line":492,"column":4}},"361":{"start":{"line":485,"column":4},"end":{"line":485,"column":19}},"362":{"start":{"line":487,"column":4},"end":{"line":489,"column":5}},"363":{"start":{"line":488,"column":6},"end":{"line":488,"column":35}},"364":{"start":{"line":491,"column":4},"end":{"line":491,"column":16}},"365":{"start":{"line":494,"column":2},"end":{"line":497,"column":3}},"366":{"start":{"line":495,"column":4},"end":{"line":495,"column":25}},"367":{"start":{"line":496,"column":4},"end":{"line":496,"column":27}},"368":{"start":{"line":499,"column":2},"end":{"line":503,"column":4}},"369":{"start":{"line":500,"column":4},"end":{"line":500,"column":25}},"370":{"start":{"line":502,"column":4},"end":{"line":502,"column":16}},"371":{"start":{"line":505,"column":2},"end":{"line":517,"column":4}},"372":{"start":{"line":506,"column":4},"end":{"line":506,"column":19}},"373":{"start":{"line":508,"column":4},"end":{"line":510,"column":5}},"374":{"start":{"line":509,"column":6},"end":{"line":509,"column":39}},"375":{"start":{"line":512,"column":4},"end":{"line":516,"column":5}},"376":{"start":{"line":513,"column":6},"end":{"line":513,"column":18}},"377":{"start":{"line":515,"column":6},"end":{"line":515,"column":18}},"378":{"start":{"line":519,"column":2},"end":{"line":522,"column":3}},"379":{"start":{"line":520,"column":4},"end":{"line":520,"column":28}},"380":{"start":{"line":521,"column":4},"end":{"line":521,"column":30}},"381":{"start":{"line":524,"column":2},"end":{"line":528,"column":4}},"382":{"start":{"line":525,"column":4},"end":{"line":525,"column":28}},"383":{"start":{"line":527,"column":4},"end":{"line":527,"column":16}},"384":{"start":{"line":530,"column":2},"end":{"line":538,"column":4}},"385":{"start":{"line":531,"column":4},"end":{"line":531,"column":19}},"386":{"start":{"line":533,"column":4},"end":{"line":535,"column":5}},"387":{"start":{"line":534,"column":6},"end":{"line":534,"column":54}},"388":{"start":{"line":537,"column":4},"end":{"line":537,"column":16}},"389":{"start":{"line":540,"column":2},"end":{"line":542,"column":3}},"390":{"start":{"line":541,"column":4},"end":{"line":541,"column":49}},"391":{"start":{"line":544,"column":2},"end":{"line":554,"column":3}},"392":{"start":{"line":545,"column":4},"end":{"line":545,"column":23}},"393":{"start":{"line":547,"column":4},"end":{"line":551,"column":5}},"394":{"start":{"line":548,"column":6},"end":{"line":548,"column":34}},"395":{"start":{"line":550,"column":6},"end":{"line":550,"column":45}},"396":{"start":{"line":553,"column":4},"end":{"line":553,"column":38}},"397":{"start":{"line":556,"column":2},"end":{"line":567,"column":3}},"398":{"start":{"line":557,"column":4},"end":{"line":557,"column":30}},"399":{"start":{"line":559,"column":4},"end":{"line":561,"column":5}},"400":{"start":{"line":560,"column":6},"end":{"line":560,"column":35}},"401":{"start":{"line":563,"column":4},"end":{"line":563,"column":40}},"402":{"start":{"line":565,"column":4},"end":{"line":565,"column":15}},"403":{"start":{"line":569,"column":2},"end":{"line":592,"column":3}},"404":{"start":{"line":570,"column":4},"end":{"line":570,"column":23}},"405":{"start":{"line":572,"column":4},"end":{"line":586,"column":5}},"406":{"start":{"line":573,"column":6},"end":{"line":573,"column":21}},"407":{"start":{"line":575,"column":6},"end":{"line":575,"column":17}},"408":{"start":{"line":576,"column":11},"end":{"line":586,"column":5}},"409":{"start":{"line":578,"column":6},"end":{"line":582,"column":7}},"410":{"start":{"line":579,"column":8},"end":{"line":579,"column":20}},"411":{"start":{"line":581,"column":8},"end":{"line":581,"column":20}},"412":{"start":{"line":583,"column":11},"end":{"line":586,"column":5}},"413":{"start":{"line":585,"column":6},"end":{"line":585,"column":19}},"414":{"start":{"line":589,"column":4},"end":{"line":589,"column":55}},"415":{"start":{"line":591,"column":4},"end":{"line":591,"column":15}},"416":{"start":{"line":594,"column":2},"end":{"line":614,"column":3}},"417":{"start":{"line":595,"column":4},"end":{"line":595,"column":28}},"418":{"start":{"line":597,"column":4},"end":{"line":609,"column":5}},"419":{"start":{"line":598,"column":6},"end":{"line":598,"column":21}},"420":{"start":{"line":600,"column":6},"end":{"line":600,"column":17}},"421":{"start":{"line":601,"column":11},"end":{"line":609,"column":5}},"422":{"start":{"line":602,"column":6},"end":{"line":606,"column":7}},"423":{"start":{"line":603,"column":8},"end":{"line":603,"column":20}},"424":{"start":{"line":605,"column":8},"end":{"line":605,"column":20}},"425":{"start":{"line":607,"column":11},"end":{"line":609,"column":5}},"426":{"start":{"line":608,"column":6},"end":{"line":608,"column":19}},"427":{"start":{"line":611,"column":4},"end":{"line":611,"column":46}},"428":{"start":{"line":613,"column":4},"end":{"line":613,"column":15}},"429":{"start":{"line":616,"column":2},"end":{"line":643,"column":3}},"430":{"start":{"line":617,"column":4},"end":{"line":617,"column":25}},"431":{"start":{"line":619,"column":4},"end":{"line":631,"column":5}},"432":{"start":{"line":620,"column":6},"end":{"line":620,"column":21}},"433":{"start":{"line":622,"column":6},"end":{"line":622,"column":17}},"434":{"start":{"line":623,"column":11},"end":{"line":631,"column":5}},"435":{"start":{"line":624,"column":6},"end":{"line":628,"column":7}},"436":{"start":{"line":625,"column":8},"end":{"line":625,"column":20}},"437":{"start":{"line":627,"column":8},"end":{"line":627,"column":20}},"438":{"start":{"line":629,"column":11},"end":{"line":631,"column":5}},"439":{"start":{"line":630,"column":6},"end":{"line":630,"column":19}},"440":{"start":{"line":633,"column":4},"end":{"line":633,"column":15}},"441":{"start":{"line":634,"column":4},"end":{"line":634,"column":20}},"442":{"start":{"line":635,"column":4},"end":{"line":637,"column":5}},"443":{"start":{"line":636,"column":6},"end":{"line":636,"column":56}},"444":{"start":{"line":639,"column":4},"end":{"line":639,"column":28}},"445":{"start":{"line":640,"column":4},"end":{"line":640,"column":15}},"446":{"start":{"line":642,"column":4},"end":{"line":642,"column":15}},"447":{"start":{"line":645,"column":2},"end":{"line":665,"column":3}},"448":{"start":{"line":646,"column":4},"end":{"line":646,"column":28}},"449":{"start":{"line":648,"column":4},"end":{"line":660,"column":5}},"450":{"start":{"line":649,"column":6},"end":{"line":649,"column":21}},"451":{"start":{"line":651,"column":6},"end":{"line":651,"column":17}},"452":{"start":{"line":652,"column":11},"end":{"line":660,"column":5}},"453":{"start":{"line":653,"column":6},"end":{"line":657,"column":7}},"454":{"start":{"line":654,"column":8},"end":{"line":654,"column":20}},"455":{"start":{"line":656,"column":8},"end":{"line":656,"column":20}},"456":{"start":{"line":658,"column":11},"end":{"line":660,"column":5}},"457":{"start":{"line":659,"column":6},"end":{"line":659,"column":19}},"458":{"start":{"line":662,"column":4},"end":{"line":662,"column":46}},"459":{"start":{"line":664,"column":4},"end":{"line":664,"column":15}},"460":{"start":{"line":667,"column":2},"end":{"line":694,"column":3}},"461":{"start":{"line":668,"column":4},"end":{"line":668,"column":33}},"462":{"start":{"line":670,"column":4},"end":{"line":682,"column":5}},"463":{"start":{"line":671,"column":6},"end":{"line":671,"column":21}},"464":{"start":{"line":673,"column":6},"end":{"line":673,"column":17}},"465":{"start":{"line":674,"column":11},"end":{"line":682,"column":5}},"466":{"start":{"line":675,"column":6},"end":{"line":679,"column":7}},"467":{"start":{"line":676,"column":8},"end":{"line":676,"column":20}},"468":{"start":{"line":678,"column":8},"end":{"line":678,"column":20}},"469":{"start":{"line":680,"column":11},"end":{"line":682,"column":5}},"470":{"start":{"line":681,"column":6},"end":{"line":681,"column":19}},"471":{"start":{"line":684,"column":4},"end":{"line":684,"column":15}},"472":{"start":{"line":685,"column":4},"end":{"line":685,"column":20}},"473":{"start":{"line":686,"column":4},"end":{"line":688,"column":5}},"474":{"start":{"line":687,"column":6},"end":{"line":687,"column":56}},"475":{"start":{"line":690,"column":4},"end":{"line":690,"column":28}},"476":{"start":{"line":691,"column":4},"end":{"line":691,"column":15}},"477":{"start":{"line":693,"column":4},"end":{"line":693,"column":15}},"478":{"start":{"line":696,"column":2},"end":{"line":732,"column":3}},"479":{"start":{"line":697,"column":4},"end":{"line":697,"column":30}},"480":{"start":{"line":699,"column":4},"end":{"line":711,"column":5}},"481":{"start":{"line":700,"column":6},"end":{"line":700,"column":21}},"482":{"start":{"line":702,"column":6},"end":{"line":702,"column":17}},"483":{"start":{"line":703,"column":11},"end":{"line":711,"column":5}},"484":{"start":{"line":704,"column":6},"end":{"line":708,"column":7}},"485":{"start":{"line":705,"column":8},"end":{"line":705,"column":20}},"486":{"start":{"line":707,"column":8},"end":{"line":707,"column":20}},"487":{"start":{"line":709,"column":11},"end":{"line":711,"column":5}},"488":{"start":{"line":710,"column":6},"end":{"line":710,"column":19}},"489":{"start":{"line":713,"column":4},"end":{"line":713,"column":15}},"490":{"start":{"line":714,"column":4},"end":{"line":714,"column":20}},"491":{"start":{"line":715,"column":4},"end":{"line":726,"column":5}},"492":{"start":{"line":716,"column":6},"end":{"line":716,"column":19}},"493":{"start":{"line":717,"column":6},"end":{"line":717,"column":22}},"494":{"start":{"line":718,"column":6},"end":{"line":720,"column":7}},"495":{"start":{"line":719,"column":8},"end":{"line":719,"column":61}},"496":{"start":{"line":722,"column":6},"end":{"line":722,"column":29}},"497":{"start":{"line":723,"column":6},"end":{"line":723,"column":16}},"498":{"start":{"line":725,"column":6},"end":{"line":725,"column":21}},"499":{"start":{"line":728,"column":4},"end":{"line":728,"column":28}},"500":{"start":{"line":729,"column":4},"end":{"line":729,"column":15}},"501":{"start":{"line":731,"column":4},"end":{"line":731,"column":15}},"502":{"start":{"line":734,"column":2},"end":{"line":751,"column":3}},"503":{"start":{"line":735,"column":4},"end":{"line":750,"column":5}},"504":{"start":{"line":737,"column":8},"end":{"line":737,"column":42}},"505":{"start":{"line":739,"column":8},"end":{"line":739,"column":52}},"506":{"start":{"line":741,"column":8},"end":{"line":741,"column":46}},"507":{"start":{"line":743,"column":8},"end":{"line":743,"column":52}},"508":{"start":{"line":745,"column":8},"end":{"line":745,"column":62}},"509":{"start":{"line":747,"column":8},"end":{"line":747,"column":56}},"510":{"start":{"line":749,"column":8},"end":{"line":749,"column":56}},"511":{"start":{"line":755,"column":2},"end":{"line":755,"column":27}},"512":{"start":{"line":756,"column":2},"end":{"line":756,"column":34}},"513":{"start":{"line":757,"column":2},"end":{"line":757,"column":26}},"514":{"start":{"line":758,"column":2},"end":{"line":758,"column":28}},"515":{"start":{"line":760,"column":2},"end":{"line":760,"column":17}}},"branchMap":{"1":{"line":4,"type":"if","locations":[{"start":{"line":4,"column":2},"end":{"line":4,"column":2}},{"start":{"line":4,"column":2},"end":{"line":4,"column":2}}]},"2":{"line":4,"type":"binary-expr","locations":[{"start":{"line":4,"column":5},"end":{"line":4,"column":31}},{"start":{"line":4,"column":35},"end":{"line":4,"column":69}}]},"3":{"line":6,"type":"if","locations":[{"start":{"line":6,"column":9},"end":{"line":6,"column":9}},{"start":{"line":6,"column":9},"end":{"line":6,"column":9}}]},"4":{"line":8,"type":"if","locations":[{"start":{"line":8,"column":4},"end":{"line":8,"column":4}},{"start":{"line":8,"column":4},"end":{"line":8,"column":4}}]},"5":{"line":28,"type":"switch","locations":[{"start":{"line":29,"column":0},"end":{"line":30,"column":6}},{"start":{"line":31,"column":0},"end":{"line":32,"column":6}},{"start":{"line":33,"column":0},"end":{"line":34,"column":6}},{"start":{"line":35,"column":0},"end":{"line":36,"column":6}},{"start":{"line":37,"column":0},"end":{"line":38,"column":6}},{"start":{"line":39,"column":0},"end":{"line":40,"column":6}},{"start":{"line":41,"column":0},"end":{"line":42,"column":6}},{"start":{"line":43,"column":0},"end":{"line":44,"column":6}},{"start":{"line":45,"column":0},"end":{"line":46,"column":6}},{"start":{"line":47,"column":0},"end":{"line":48,"column":6}},{"start":{"line":49,"column":0},"end":{"line":50,"column":6}},{"start":{"line":51,"column":0},"end":{"line":52,"column":6}},{"start":{"line":53,"column":0},"end":{"line":54,"column":6}},{"start":{"line":55,"column":0},"end":{"line":56,"column":6}},{"start":{"line":57,"column":0},"end":{"line":58,"column":6}},{"start":{"line":59,"column":0},"end":{"line":60,"column":6}},{"start":{"line":61,"column":0},"end":{"line":62,"column":6}},{"start":{"line":63,"column":0},"end":{"line":64,"column":6}},{"start":{"line":65,"column":0},"end":{"line":66,"column":6}},{"start":{"line":67,"column":0},"end":{"line":68,"column":6}},{"start":{"line":69,"column":0},"end":{"line":70,"column":6}},{"start":{"line":71,"column":0},"end":{"line":72,"column":6}},{"start":{"line":73,"column":0},"end":{"line":74,"column":6}},{"start":{"line":75,"column":0},"end":{"line":76,"column":6}},{"start":{"line":77,"column":0},"end":{"line":78,"column":6}},{"start":{"line":79,"column":0},"end":{"line":80,"column":6}},{"start":{"line":81,"column":0},"end":{"line":82,"column":6}},{"start":{"line":83,"column":0},"end":{"line":84,"column":6}},{"start":{"line":85,"column":0},"end":{"line":86,"column":6}},{"start":{"line":87,"column":0},"end":{"line":88,"column":6}},{"start":{"line":89,"column":0},"end":{"line":90,"column":6}},{"start":{"line":91,"column":0},"end":{"line":92,"column":6}},{"start":{"line":93,"column":0},"end":{"line":94,"column":6}},{"start":{"line":95,"column":0},"end":{"line":96,"column":6}},{"start":{"line":97,"column":0},"end":{"line":98,"column":6}},{"start":{"line":99,"column":0},"end":{"line":100,"column":6}},{"start":{"line":101,"column":0},"end":{"line":102,"column":6}},{"start":{"line":103,"column":0},"end":{"line":104,"column":6}},{"start":{"line":105,"column":0},"end":{"line":106,"column":6}},{"start":{"line":107,"column":0},"end":{"line":108,"column":6}},{"start":{"line":109,"column":0},"end":{"line":110,"column":6}},{"start":{"line":111,"column":0},"end":{"line":112,"column":6}},{"start":{"line":113,"column":0},"end":{"line":114,"column":6}},{"start":{"line":115,"column":0},"end":{"line":116,"column":6}},{"start":{"line":117,"column":0},"end":{"line":118,"column":6}},{"start":{"line":119,"column":0},"end":{"line":120,"column":6}},{"start":{"line":121,"column":0},"end":{"line":122,"column":6}},{"start":{"line":123,"column":0},"end":{"line":124,"column":6}},{"start":{"line":125,"column":0},"end":{"line":126,"column":6}},{"start":{"line":127,"column":0},"end":{"line":128,"column":6}},{"start":{"line":129,"column":0},"end":{"line":130,"column":6}}]},"6":{"line":144,"type":"if","locations":[{"start":{"line":144,"column":4},"end":{"line":144,"column":4}},{"start":{"line":144,"column":4},"end":{"line":144,"column":4}}]},"7":{"line":148,"type":"binary-expr","locations":[{"start":{"line":148,"column":17},"end":{"line":148,"column":35}},{"start":{"line":148,"column":39},"end":{"line":148,"column":64}}]},"8":{"line":149,"type":"if","locations":[{"start":{"line":149,"column":4},"end":{"line":149,"column":4}},{"start":{"line":149,"column":4},"end":{"line":149,"column":4}}]},"9":{"line":158,"type":"binary-expr","locations":[{"start":{"line":158,"column":16},"end":{"line":158,"column":32}},{"start":{"line":158,"column":36},"end":{"line":158,"column":37}}]},"10":{"line":159,"type":"if","locations":[{"start":{"line":159,"column":8},"end":{"line":159,"column":8}},{"start":{"line":159,"column":8},"end":{"line":159,"column":8}}]},"11":{"line":160,"type":"binary-expr","locations":[{"start":{"line":160,"column":20},"end":{"line":160,"column":40}},{"start":{"line":160,"column":44},"end":{"line":160,"column":49}}]},"12":{"line":167,"type":"if","locations":[{"start":{"line":167,"column":8},"end":{"line":167,"column":8}},{"start":{"line":167,"column":8},"end":{"line":167,"column":8}}]},"13":{"line":170,"type":"if","locations":[{"start":{"line":170,"column":12},"end":{"line":170,"column":12}},{"start":{"line":170,"column":12},"end":{"line":170,"column":12}}]},"14":{"line":170,"type":"binary-expr","locations":[{"start":{"line":170,"column":16},"end":{"line":170,"column":31}},{"start":{"line":170,"column":35},"end":{"line":170,"column":63}}]},"15":{"line":173,"type":"binary-expr","locations":[{"start":{"line":173,"column":21},"end":{"line":173,"column":33}},{"start":{"line":173,"column":37},"end":{"line":173,"column":57}}]},"16":{"line":175,"type":"if","locations":[{"start":{"line":175,"column":8},"end":{"line":175,"column":8}},{"start":{"line":175,"column":8},"end":{"line":175,"column":8}}]},"17":{"line":175,"type":"binary-expr","locations":[{"start":{"line":175,"column":12},"end":{"line":175,"column":41}},{"start":{"line":175,"column":45},"end":{"line":175,"column":59}},{"start":{"line":175,"column":63},"end":{"line":175,"column":73}}]},"18":{"line":177,"type":"if","locations":[{"start":{"line":177,"column":12},"end":{"line":177,"column":12}},{"start":{"line":177,"column":12},"end":{"line":177,"column":12}}]},"19":{"line":180,"type":"if","locations":[{"start":{"line":180,"column":20},"end":{"line":180,"column":20}},{"start":{"line":180,"column":20},"end":{"line":180,"column":20}}]},"20":{"line":180,"type":"binary-expr","locations":[{"start":{"line":180,"column":24},"end":{"line":180,"column":42}},{"start":{"line":180,"column":46},"end":{"line":180,"column":51}}]},"21":{"line":183,"type":"if","locations":[{"start":{"line":183,"column":16},"end":{"line":183,"column":16}},{"start":{"line":183,"column":16},"end":{"line":183,"column":16}}]},"22":{"line":184,"type":"binary-expr","locations":[{"start":{"line":184,"column":159},"end":{"line":184,"column":182}},{"start":{"line":184,"column":186},"end":{"line":184,"column":192}}]},"23":{"line":186,"type":"cond-expr","locations":[{"start":{"line":186,"column":102},"end":{"line":186,"column":116}},{"start":{"line":186,"column":117},"end":{"line":186,"column":164}}]},"24":{"line":186,"type":"binary-expr","locations":[{"start":{"line":186,"column":124},"end":{"line":186,"column":147}},{"start":{"line":186,"column":151},"end":{"line":186,"column":157}}]},"25":{"line":188,"type":"binary-expr","locations":[{"start":{"line":188,"column":72},"end":{"line":188,"column":95}},{"start":{"line":188,"column":99},"end":{"line":188,"column":105}}]},"26":{"line":191,"type":"if","locations":[{"start":{"line":191,"column":8},"end":{"line":191,"column":8}},{"start":{"line":191,"column":8},"end":{"line":191,"column":8}}]},"27":{"line":191,"type":"binary-expr","locations":[{"start":{"line":191,"column":12},"end":{"line":191,"column":38}},{"start":{"line":191,"column":42},"end":{"line":191,"column":59}}]},"28":{"line":194,"type":"switch","locations":[{"start":{"line":195,"column":8},"end":{"line":212,"column":18}},{"start":{"line":213,"column":8},"end":{"line":234,"column":18}},{"start":{"line":235,"column":8},"end":{"line":236,"column":24}}]},"29":{"line":201,"type":"if","locations":[{"start":{"line":201,"column":12},"end":{"line":201,"column":12}},{"start":{"line":201,"column":12},"end":{"line":201,"column":12}}]},"30":{"line":206,"type":"if","locations":[{"start":{"line":206,"column":16},"end":{"line":206,"column":16}},{"start":{"line":206,"column":16},"end":{"line":206,"column":16}}]},"31":{"line":216,"type":"binary-expr","locations":[{"start":{"line":216,"column":60},"end":{"line":216,"column":63}},{"start":{"line":216,"column":67},"end":{"line":216,"column":68}}]},"32":{"line":216,"type":"binary-expr","locations":[{"start":{"line":216,"column":169},"end":{"line":216,"column":172}},{"start":{"line":216,"column":176},"end":{"line":216,"column":177}}]},"33":{"line":217,"type":"if","locations":[{"start":{"line":217,"column":12},"end":{"line":217,"column":12}},{"start":{"line":217,"column":12},"end":{"line":217,"column":12}}]},"34":{"line":218,"type":"binary-expr","locations":[{"start":{"line":218,"column":58},"end":{"line":218,"column":61}},{"start":{"line":218,"column":65},"end":{"line":218,"column":66}}]},"35":{"line":221,"type":"if","locations":[{"start":{"line":221,"column":12},"end":{"line":221,"column":12}},{"start":{"line":221,"column":12},"end":{"line":221,"column":12}}]},"36":{"line":224,"type":"if","locations":[{"start":{"line":224,"column":12},"end":{"line":224,"column":12}},{"start":{"line":224,"column":12},"end":{"line":224,"column":12}}]},"37":{"line":246,"type":"if","locations":[{"start":{"line":246,"column":8},"end":{"line":246,"column":8}},{"start":{"line":246,"column":8},"end":{"line":246,"column":8}}]},"38":{"line":259,"type":"if","locations":[{"start":{"line":259,"column":8},"end":{"line":259,"column":8}},{"start":{"line":259,"column":8},"end":{"line":259,"column":8}}]},"39":{"line":271,"type":"if","locations":[{"start":{"line":271,"column":8},"end":{"line":271,"column":8}},{"start":{"line":271,"column":8},"end":{"line":271,"column":8}}]},"40":{"line":277,"type":"if","locations":[{"start":{"line":277,"column":8},"end":{"line":277,"column":8}},{"start":{"line":277,"column":8},"end":{"line":277,"column":8}}]},"41":{"line":294,"type":"if","locations":[{"start":{"line":294,"column":8},"end":{"line":294,"column":8}},{"start":{"line":294,"column":8},"end":{"line":294,"column":8}}]},"42":{"line":300,"type":"cond-expr","locations":[{"start":{"line":301,"column":14},"end":{"line":301,"column":147}},{"start":{"line":302,"column":14},"end":{"line":302,"column":44}}]},"43":{"line":301,"type":"cond-expr","locations":[{"start":{"line":301,"column":50},"end":{"line":301,"column":74}},{"start":{"line":301,"column":77},"end":{"line":301,"column":78}}]},"44":{"line":305,"type":"if","locations":[{"start":{"line":305,"column":8},"end":{"line":305,"column":8}},{"start":{"line":305,"column":8},"end":{"line":305,"column":8}}]},"45":{"line":319,"type":"cond-expr","locations":[{"start":{"line":319,"column":35},"end":{"line":319,"column":40}},{"start":{"line":319,"column":41},"end":{"line":319,"column":43}}]},"46":{"line":323,"type":"if","locations":[{"start":{"line":323,"column":8},"end":{"line":323,"column":8}},{"start":{"line":323,"column":8},"end":{"line":323,"column":8}}]},"47":{"line":326,"type":"cond-expr","locations":[{"start":{"line":326,"column":54},"end":{"line":326,"column":59}},{"start":{"line":326,"column":60},"end":{"line":326,"column":62}}]},"48":{"line":334,"type":"if","locations":[{"start":{"line":334,"column":8},"end":{"line":334,"column":8}},{"start":{"line":334,"column":8},"end":{"line":334,"column":8}}]},"49":{"line":337,"type":"if","locations":[{"start":{"line":337,"column":8},"end":{"line":337,"column":8}},{"start":{"line":337,"column":8},"end":{"line":337,"column":8}}]},"50":{"line":345,"type":"if","locations":[{"start":{"line":345,"column":8},"end":{"line":345,"column":8}},{"start":{"line":345,"column":8},"end":{"line":345,"column":8}}]},"51":{"line":352,"type":"if","locations":[{"start":{"line":352,"column":12},"end":{"line":352,"column":12}},{"start":{"line":352,"column":12},"end":{"line":352,"column":12}}]},"52":{"line":352,"type":"binary-expr","locations":[{"start":{"line":352,"column":16},"end":{"line":352,"column":25}},{"start":{"line":352,"column":30},"end":{"line":352,"column":36}},{"start":{"line":352,"column":40},"end":{"line":352,"column":77}}]},"53":{"line":355,"type":"if","locations":[{"start":{"line":355,"column":16},"end":{"line":355,"column":16}},{"start":{"line":355,"column":16},"end":{"line":355,"column":16}}]},"54":{"line":358,"type":"if","locations":[{"start":{"line":358,"column":8},"end":{"line":358,"column":8}},{"start":{"line":358,"column":8},"end":{"line":358,"column":8}}]},"55":{"line":360,"type":"if","locations":[{"start":{"line":360,"column":12},"end":{"line":360,"column":12}},{"start":{"line":360,"column":12},"end":{"line":360,"column":12}}]},"56":{"line":364,"type":"cond-expr","locations":[{"start":{"line":364,"column":48},"end":{"line":364,"column":124}},{"start":{"line":364,"column":127},"end":{"line":364,"column":168}}]},"57":{"line":369,"type":"if","locations":[{"start":{"line":369,"column":12},"end":{"line":369,"column":12}},{"start":{"line":369,"column":12},"end":{"line":369,"column":12}}]},"58":{"line":376,"type":"if","locations":[{"start":{"line":376,"column":12},"end":{"line":376,"column":12}},{"start":{"line":376,"column":12},"end":{"line":376,"column":12}}]},"59":{"line":376,"type":"binary-expr","locations":[{"start":{"line":376,"column":16},"end":{"line":376,"column":25}},{"start":{"line":376,"column":29},"end":{"line":376,"column":40}}]},"60":{"line":377,"type":"if","locations":[{"start":{"line":377,"column":12},"end":{"line":377,"column":12}},{"start":{"line":377,"column":12},"end":{"line":377,"column":12}}]},"61":{"line":380,"type":"if","locations":[{"start":{"line":380,"column":8},"end":{"line":380,"column":8}},{"start":{"line":380,"column":8},"end":{"line":380,"column":8}}]},"62":{"line":389,"type":"if","locations":[{"start":{"line":389,"column":8},"end":{"line":389,"column":8}},{"start":{"line":389,"column":8},"end":{"line":389,"column":8}}]},"63":{"line":415,"type":"switch","locations":[{"start":{"line":416,"column":0},"end":{"line":417,"column":6}},{"start":{"line":418,"column":0},"end":{"line":419,"column":6}},{"start":{"line":420,"column":0},"end":{"line":421,"column":6}},{"start":{"line":422,"column":0},"end":{"line":423,"column":6}},{"start":{"line":424,"column":0},"end":{"line":425,"column":6}},{"start":{"line":426,"column":0},"end":{"line":427,"column":6}},{"start":{"line":428,"column":0},"end":{"line":429,"column":6}},{"start":{"line":430,"column":0},"end":{"line":431,"column":6}},{"start":{"line":432,"column":0},"end":{"line":433,"column":6}},{"start":{"line":434,"column":0},"end":{"line":435,"column":6}},{"start":{"line":436,"column":0},"end":{"line":437,"column":6}},{"start":{"line":438,"column":0},"end":{"line":439,"column":6}},{"start":{"line":440,"column":0},"end":{"line":441,"column":6}},{"start":{"line":442,"column":0},"end":{"line":443,"column":6}},{"start":{"line":444,"column":0},"end":{"line":445,"column":6}},{"start":{"line":446,"column":0},"end":{"line":447,"column":6}},{"start":{"line":448,"column":0},"end":{"line":449,"column":6}}]},"64":{"line":466,"type":"if","locations":[{"start":{"line":466,"column":4},"end":{"line":466,"column":4}},{"start":{"line":466,"column":4},"end":{"line":466,"column":4}}]},"65":{"line":512,"type":"if","locations":[{"start":{"line":512,"column":4},"end":{"line":512,"column":4}},{"start":{"line":512,"column":4},"end":{"line":512,"column":4}}]},"66":{"line":572,"type":"if","locations":[{"start":{"line":572,"column":4},"end":{"line":572,"column":4}},{"start":{"line":572,"column":4},"end":{"line":572,"column":4}}]},"67":{"line":572,"type":"binary-expr","locations":[{"start":{"line":572,"column":8},"end":{"line":572,"column":43}},{"start":{"line":572,"column":47},"end":{"line":572,"column":81}}]},"68":{"line":576,"type":"if","locations":[{"start":{"line":576,"column":11},"end":{"line":576,"column":11}},{"start":{"line":576,"column":11},"end":{"line":576,"column":11}}]},"69":{"line":578,"type":"if","locations":[{"start":{"line":578,"column":6},"end":{"line":578,"column":6}},{"start":{"line":578,"column":6},"end":{"line":578,"column":6}}]},"70":{"line":578,"type":"binary-expr","locations":[{"start":{"line":578,"column":10},"end":{"line":578,"column":30}},{"start":{"line":578,"column":34},"end":{"line":578,"column":65}}]},"71":{"line":583,"type":"if","locations":[{"start":{"line":583,"column":11},"end":{"line":583,"column":11}},{"start":{"line":583,"column":11},"end":{"line":583,"column":11}}]},"72":{"line":597,"type":"if","locations":[{"start":{"line":597,"column":4},"end":{"line":597,"column":4}},{"start":{"line":597,"column":4},"end":{"line":597,"column":4}}]},"73":{"line":597,"type":"binary-expr","locations":[{"start":{"line":597,"column":8},"end":{"line":597,"column":43}},{"start":{"line":597,"column":47},"end":{"line":597,"column":81}},{"start":{"line":597,"column":85},"end":{"line":597,"column":122}}]},"74":{"line":601,"type":"if","locations":[{"start":{"line":601,"column":11},"end":{"line":601,"column":11}},{"start":{"line":601,"column":11},"end":{"line":601,"column":11}}]},"75":{"line":602,"type":"if","locations":[{"start":{"line":602,"column":6},"end":{"line":602,"column":6}},{"start":{"line":602,"column":6},"end":{"line":602,"column":6}}]},"76":{"line":602,"type":"binary-expr","locations":[{"start":{"line":602,"column":10},"end":{"line":602,"column":30}},{"start":{"line":602,"column":34},"end":{"line":602,"column":65}}]},"77":{"line":607,"type":"if","locations":[{"start":{"line":607,"column":11},"end":{"line":607,"column":11}},{"start":{"line":607,"column":11},"end":{"line":607,"column":11}}]},"78":{"line":619,"type":"if","locations":[{"start":{"line":619,"column":4},"end":{"line":619,"column":4}},{"start":{"line":619,"column":4},"end":{"line":619,"column":4}}]},"79":{"line":619,"type":"binary-expr","locations":[{"start":{"line":619,"column":8},"end":{"line":619,"column":43}},{"start":{"line":619,"column":47},"end":{"line":619,"column":81}},{"start":{"line":619,"column":85},"end":{"line":619,"column":122}}]},"80":{"line":623,"type":"if","locations":[{"start":{"line":623,"column":11},"end":{"line":623,"column":11}},{"start":{"line":623,"column":11},"end":{"line":623,"column":11}}]},"81":{"line":624,"type":"if","locations":[{"start":{"line":624,"column":6},"end":{"line":624,"column":6}},{"start":{"line":624,"column":6},"end":{"line":624,"column":6}}]},"82":{"line":624,"type":"binary-expr","locations":[{"start":{"line":624,"column":10},"end":{"line":624,"column":30}},{"start":{"line":624,"column":34},"end":{"line":624,"column":65}}]},"83":{"line":629,"type":"if","locations":[{"start":{"line":629,"column":11},"end":{"line":629,"column":11}},{"start":{"line":629,"column":11},"end":{"line":629,"column":11}}]},"84":{"line":648,"type":"if","locations":[{"start":{"line":648,"column":4},"end":{"line":648,"column":4}},{"start":{"line":648,"column":4},"end":{"line":648,"column":4}}]},"85":{"line":648,"type":"binary-expr","locations":[{"start":{"line":648,"column":8},"end":{"line":648,"column":43}},{"start":{"line":648,"column":47},"end":{"line":648,"column":81}},{"start":{"line":648,"column":85},"end":{"line":648,"column":122}}]},"86":{"line":652,"type":"if","locations":[{"start":{"line":652,"column":11},"end":{"line":652,"column":11}},{"start":{"line":652,"column":11},"end":{"line":652,"column":11}}]},"87":{"line":653,"type":"if","locations":[{"start":{"line":653,"column":6},"end":{"line":653,"column":6}},{"start":{"line":653,"column":6},"end":{"line":653,"column":6}}]},"88":{"line":653,"type":"binary-expr","locations":[{"start":{"line":653,"column":10},"end":{"line":653,"column":30}},{"start":{"line":653,"column":34},"end":{"line":653,"column":65}}]},"89":{"line":658,"type":"if","locations":[{"start":{"line":658,"column":11},"end":{"line":658,"column":11}},{"start":{"line":658,"column":11},"end":{"line":658,"column":11}}]},"90":{"line":670,"type":"if","locations":[{"start":{"line":670,"column":4},"end":{"line":670,"column":4}},{"start":{"line":670,"column":4},"end":{"line":670,"column":4}}]},"91":{"line":670,"type":"binary-expr","locations":[{"start":{"line":670,"column":8},"end":{"line":670,"column":43}},{"start":{"line":670,"column":47},"end":{"line":670,"column":81}},{"start":{"line":670,"column":85},"end":{"line":670,"column":122}}]},"92":{"line":674,"type":"if","locations":[{"start":{"line":674,"column":11},"end":{"line":674,"column":11}},{"start":{"line":674,"column":11},"end":{"line":674,"column":11}}]},"93":{"line":675,"type":"if","locations":[{"start":{"line":675,"column":6},"end":{"line":675,"column":6}},{"start":{"line":675,"column":6},"end":{"line":675,"column":6}}]},"94":{"line":675,"type":"binary-expr","locations":[{"start":{"line":675,"column":10},"end":{"line":675,"column":30}},{"start":{"line":675,"column":34},"end":{"line":675,"column":65}}]},"95":{"line":680,"type":"if","locations":[{"start":{"line":680,"column":11},"end":{"line":680,"column":11}},{"start":{"line":680,"column":11},"end":{"line":680,"column":11}}]},"96":{"line":699,"type":"if","locations":[{"start":{"line":699,"column":4},"end":{"line":699,"column":4}},{"start":{"line":699,"column":4},"end":{"line":699,"column":4}}]},"97":{"line":699,"type":"binary-expr","locations":[{"start":{"line":699,"column":8},"end":{"line":699,"column":43}},{"start":{"line":699,"column":47},"end":{"line":699,"column":81}},{"start":{"line":699,"column":85},"end":{"line":699,"column":122}}]},"98":{"line":703,"type":"if","locations":[{"start":{"line":703,"column":11},"end":{"line":703,"column":11}},{"start":{"line":703,"column":11},"end":{"line":703,"column":11}}]},"99":{"line":704,"type":"if","locations":[{"start":{"line":704,"column":6},"end":{"line":704,"column":6}},{"start":{"line":704,"column":6},"end":{"line":704,"column":6}}]},"100":{"line":704,"type":"binary-expr","locations":[{"start":{"line":704,"column":10},"end":{"line":704,"column":30}},{"start":{"line":704,"column":34},"end":{"line":704,"column":65}}]},"101":{"line":709,"type":"if","locations":[{"start":{"line":709,"column":11},"end":{"line":709,"column":11}},{"start":{"line":709,"column":11},"end":{"line":709,"column":11}}]},"102":{"line":735,"type":"switch","locations":[{"start":{"line":736,"column":6},"end":{"line":737,"column":42}},{"start":{"line":738,"column":6},"end":{"line":739,"column":52}},{"start":{"line":740,"column":6},"end":{"line":741,"column":46}},{"start":{"line":742,"column":6},"end":{"line":743,"column":52}},{"start":{"line":744,"column":6},"end":{"line":745,"column":62}},{"start":{"line":746,"column":6},"end":{"line":747,"column":56}},{"start":{"line":748,"column":6},"end":{"line":749,"column":56}}]}}}} \ No newline at end of file diff --git a/node_modules/terraformer-wkt-parser/coverage/dist/index.html b/node_modules/terraformer-wkt-parser/coverage/dist/index.html new file mode 100644 index 0000000..5e463a4 --- /dev/null +++ b/node_modules/terraformer-wkt-parser/coverage/dist/index.html @@ -0,0 +1,93 @@ + + + + Code coverage report for dist/ + + + + + + + +
    +
    +

    + all files dist/ +

    +
    +
    + 78.64% + Statements + 405/515 +
    +
    + 74.38% + Branches + 209/281 +
    +
    + 65.31% + Functions + 32/49 +
    +
    + 79.17% + Lines + 399/504 +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FileStatementsBranchesFunctionsLines
    terraformer-wkt-parser.js
    78.64%405/51574.38%209/28165.31%32/4979.17%399/504
    +
    +
    + + + + + + + diff --git a/node_modules/terraformer-wkt-parser/coverage/dist/terraformer-wkt-parser.js.html b/node_modules/terraformer-wkt-parser/coverage/dist/terraformer-wkt-parser.js.html new file mode 100644 index 0000000..9060587 --- /dev/null +++ b/node_modules/terraformer-wkt-parser/coverage/dist/terraformer-wkt-parser.js.html @@ -0,0 +1,2348 @@ + + + + Code coverage report for dist/terraformer-wkt-parser.js + + + + + + + +
    +
    +

    + all files / dist/ terraformer-wkt-parser.js +

    +
    +
    + 78.64% + Statements + 405/515 +
    +
    + 74.38% + Branches + 209/281 +
    +
    + 65.31% + Functions + 32/49 +
    +
    + 79.17% + Lines + 399/504 +
    +
    +
    +
    +
    
    +
    +
    1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 +295 +296 +297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307 +308 +309 +310 +311 +312 +313 +314 +315 +316 +317 +318 +319 +320 +321 +322 +323 +324 +325 +326 +327 +328 +329 +330 +331 +332 +333 +334 +335 +336 +337 +338 +339 +340 +341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 +370 +371 +372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 +397 +398 +399 +400 +401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 +412 +413 +414 +415 +416 +417 +418 +419 +420 +421 +422 +423 +424 +425 +426 +427 +428 +429 +430 +431 +432 +433 +434 +435 +436 +437 +438 +439 +440 +441 +442 +443 +444 +445 +446 +447 +448 +449 +450 +451 +452 +453 +454 +455 +456 +457 +458 +459 +460 +461 +462 +463 +464 +465 +466 +467 +468 +469 +470 +471 +472 +473 +474 +475 +476 +477 +478 +479 +480 +481 +482 +483 +484 +485 +486 +487 +488 +489 +490 +491 +492 +493 +494 +495 +496 +497 +498 +499 +500 +501 +502 +503 +504 +505 +506 +507 +508 +509 +510 +511 +512 +513 +514 +515 +516 +517 +518 +519 +520 +521 +522 +523 +524 +525 +526 +527 +528 +529 +530 +531 +532 +533 +534 +535 +536 +537 +538 +539 +540 +541 +542 +543 +544 +545 +546 +547 +548 +549 +550 +551 +552 +553 +554 +555 +556 +557 +558 +559 +560 +561 +562 +563 +564 +565 +566 +567 +568 +569 +570 +571 +572 +573 +574 +575 +576 +577 +578 +579 +580 +581 +582 +583 +584 +585 +586 +587 +588 +589 +590 +591 +592 +593 +594 +595 +596 +597 +598 +599 +600 +601 +602 +603 +604 +605 +606 +607 +608 +609 +610 +611 +612 +613 +614 +615 +616 +617 +618 +619 +620 +621 +622 +623 +624 +625 +626 +627 +628 +629 +630 +631 +632 +633 +634 +635 +636 +637 +638 +639 +640 +641 +642 +643 +644 +645 +646 +647 +648 +649 +650 +651 +652 +653 +654 +655 +656 +657 +658 +659 +660 +661 +662 +663 +664 +665 +666 +667 +668 +669 +670 +671 +672 +673 +674 +675 +676 +677 +678 +679 +680 +681 +682 +683 +684 +685 +686 +687 +688 +689 +690 +691 +692 +693 +694 +695 +696 +697 +698 +699 +700 +701 +702 +703 +704 +705 +706 +707 +708 +709 +710 +711 +712 +713 +714 +715 +716 +717 +718 +719 +720 +721 +722 +723 +724 +725 +726 +727 +728 +729 +730 +731 +732 +733 +734 +735 +736 +737 +738 +739 +740 +741 +742 +743 +744 +745 +746 +747 +748 +749 +750 +751 +752 +753 +754 +755 +756 +757 +758 +759 +760 +761 +762 +  +  + +  + +  + +  +  + +  +  +  + +  +  + + +  +  +  +  +  +  +  +500× +500× + +  + +  + +  + +  + +  + +  +71× +71× +56× +56× +29× +29× +82× +82× +30× +30× + + +19× +19× +25× +25× + + + + + + + + + + +28× +28× +16× +16× + + + + +10× +10× +32× +32× +12× +12× + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +  +  +  +  +  +  +  +  +37× +37× +37× +37× +37× +37× +  +37× +37× +37× +37× +  + +  +  +  +  + +816× +816× +816× +  +  +816× +  +37× +37× +1316× +1316× +74× +  +1242× +816× +  +1242× +  +1316× +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1316× +  +  +1316× +  +816× +816× +816× +816× +816× +816× +816× +816× +816× +816× +816× +  +  +  +  +  +816× +  +500× +500× +500× +500× +  +  +500× +500× +37× +  +463× +463× +463× +463× +  +463× +463× +463× +463× +463× +463× +  +  +  +  +  +  +  + + + +  +  +  +  +  +  +  +  +37× +37× +37× +37× +37× +37× +37× +37× +37× +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1258× +  +  +1258× +  +1258× +  +  +  +  +  +1258× +1258× +1258× +  +1258× +1258× +5168× +5168× +1258× +1258× +1258× +  +  +1258× +1258× +1258× +1258× +  +  +  +1258× +1258× +1258× +1258× +1258× +  +  +1258× +1258× +1258× +1258× +1258× +1258× +442× +  +  +  +  +  +  +  +  +  +1258× +1258× +816× +  +442× +  +  +  +  +  +  +  +  +  +1258× +  +  +  +  +  +  +  + + +  +  +1258× +1258× +  +442× +82× +  +82× +  +426× +  + +  + +  + +  + +  + +  + +  +125× +  + +  + +  + +  + +  +37× +  +  +  +  +  + + + + + + +  +  + +156× +156× +  +  + +114× +114× +  +  +  +  +114× +  +  + +  +  +  + +25× +25× +  +  + +25× +  +25× +107× +  +  +25× +  +  + +19× +19× +  +  + + +  + +  +  + +19× +  +19× +25× +  +  +19× +13× +  + +  +  +  + + + +  +  + + +  + +  +  + + +  + +10× +  +  + +  +  + +  +  +  + +37× +  +37× +37× +  +  +  +  +37× +  +  + +28× +  +28× +108× +  +  +28× +  +28× +  +  +  + + +  + + +  + + +  + + +  + +  + +  + +  +  +  + +  + +  +  + + +  + + +  + + + + +  + +  + + +  +  + +  + +  +  + + +  + + +  + + + + +  + +  + + +  +  + + + + +  +  + + +  + +  +  + + +  + + +  + + + + +  + +  + + +  +  + +  + +  +  + + +  + + +  + + + + +  + +  + + +  +  + + + + +  +  + + +  + +  +  + + +  + + +  + + + + +  + +  + + +  +  + + + + + + +12× +  +  + + +  + +  +  + + +  + +  +  + +31× +  + +  + +  + +  + +  + +  + +  + +  +  +  +  +  + + + + +  + +  + 
    (function (root, factory) {
    + 
    +  // Node.
    +  Iif(typeof module === 'object' && typeof module.exports === 'object') {
    +    exports = module.exports = factory(require("terraformer"));
    +  } else Eif(typeof navigator === "object") {
    +    // Browser Global.
    +    Iif (!root.Terraformer){
    +      throw new Error("Terraformer.WKT requires the core Terraformer library. http://github.com/esri/terraformer")
    +    }
    +    root.Terraformer.WKT = factory(root.Terraformer);
    +  }
    + 
    +}(this, function(Terraformer) {
    +  var exports = { };
    + 
    +  /* Jison generated parser */
    +var parser = (function(){
    +var parser = {trace: function trace() { },
    +yy: {},
    +symbols_: {"error":2,"expressions":3,"point":4,"EOF":5,"linestring":6,"polygon":7,"multipoint":8,"multilinestring":9,"multipolygon":10,"coordinate":11,"DOUBLE_TOK":12,"ptarray":13,"COMMA":14,"ring_list":15,"ring":16,"(":17,")":18,"POINT":19,"Z":20,"ZM":21,"M":22,"EMPTY":23,"point_untagged":24,"polygon_list":25,"polygon_untagged":26,"point_list":27,"LINESTRING":28,"POLYGON":29,"MULTIPOINT":30,"MULTILINESTRING":31,"MULTIPOLYGON":32,"$accept":0,"$end":1},
    +terminals_: {2:"error",5:"EOF",12:"DOUBLE_TOK",14:"COMMA",17:"(",18:")",19:"POINT",20:"Z",21:"ZM",22:"M",23:"EMPTY",28:"LINESTRING",29:"POLYGON",30:"MULTIPOINT",31:"MULTILINESTRING",32:"MULTIPOLYGON"},
    +productions_: [0,[3,2],[3,2],[3,2],[3,2],[3,2],[3,2],[11,2],[11,3],[11,4],[13,3],[13,1],[15,3],[15,1],[16,3],[4,4],[4,5],[4,5],[4,5],[4,2],[24,1],[24,3],[25,3],[25,1],[26,3],[27,3],[27,1],[6,4],[6,5],[6,5],[6,5],[6,2],[7,4],[7,5],[7,5],[7,5],[7,2],[8,4],[8,5],[8,5],[8,5],[8,2],[9,4],[9,5],[9,5],[9,5],[9,2],[10,4],[10,5],[10,5],[10,5],[10,2]],
    +performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$,_$
    +/**/) {
    + 
    +var $0 = $.length - 1;
    +switch (yystate) {
    +case 1: return $[$0-1]; 
    +break;
    +case 2: return $[$0-1]; 
    +break;
    +case 3: return $[$0-1]; 
    +break;
    +case 4: return $[$0-1]; 
    +break;
    +case 5: return $[$0-1]; 
    +break;
    +case 6: return $[$0-1]; 
    +break;
    +case 7: this.$ = new PointArray([ Number($[$0-1]), Number($[$0]) ]); 
    +break;
    +case 8: this.$ = new PointArray([ Number($[$0-2]), Number($[$0-1]), Number($[$0]) ]); 
    +break;
    +case 9: this.$ = new PointArray([ Number($[$0-3]), Number($[$0-2]), Number($[$0-1]), Number($[$0]) ]); 
    +break;
    +case 10: this.$ = $[$0-2].addPoint($[$0]); 
    +break;
    +case 11: this.$ = $[$0]; 
    +break;
    +case 12: this.$ = $[$0-2].addRing($[$0]); 
    +break;
    +case 13: this.$ = new RingList($[$0]); 
    +break;
    +case 14: this.$ = new Ring($[$0-1]); 
    +break;
    +case 15: this.$ = { "type": "Point", "coordinates": $[$0-1].data[0] }; 
    +break;
    +case 16: this.$ = { "type": "Point", "coordinates": $[$0-1].data[0], "properties": { z: true } }; 
    +break;
    +case 17: this.$ = { "type": "Point", "coordinates": $[$0-1].data[0], "properties": { z: true, m: true } }; 
    +break;
    +case 18: this.$ = { "type": "Point", "coordinates": $[$0-1].data[0], "properties": { m: true } }; 
    +break;
    +case 19: this.$ = { "type": "Point", "coordinates": [ ] }; 
    +break;
    +case 20: this.$ = $[$0]; 
    +break;
    +case 21: this.$ = $[$0-1]; 
    +break;
    +case 22: this.$ = $[$0-2].addPolygon($[$0]); 
    +break;
    +case 23: this.$ = new PolygonList($[$0]); 
    +break;
    +case 24: this.$ = $[$0-1]; 
    +break;
    +case 25: this.$ = $[$0-2].addPoint($[$0]); 
    +break;
    +case 26: this.$ = $[$0]; 
    +break;
    +case 27: this.$ = { "type": "LineString", "coordinates": $[$0-1].data }; 
    +break;
    +case 28: this.$ = { "type": "LineString", "coordinates": $[$0-1].data, "properties": { z: true } }; 
    +break;
    +case 29: this.$ = { "type": "LineString", "coordinates": $[$0-1].data, "properties": { m: true } }; 
    +break;
    +case 30: this.$ = { "type": "LineString", "coordinates": $[$0-1].data, "properties": { z: true, m: true } }; 
    +break;
    +case 31: this.$ = { "type": "LineString", "coordinates": [ ] }; 
    +break;
    +case 32: this.$ = { "type": "Polygon", "coordinates": $[$0-1].toJSON() }; 
    +break;
    +case 33: this.$ = { "type": "Polygon", "coordinates": $[$0-1].toJSON(), "properties": { z: true } }; 
    +break;
    +case 34: this.$ = { "type": "Polygon", "coordinates": $[$0-1].toJSON(), "properties": { m: true } }; 
    +break;
    +case 35: this.$ = { "type": "Polygon", "coordinates": $[$0-1].toJSON(), "properties": { z: true, m: true } }; 
    +break;
    +case 36: this.$ = { "type": "Polygon", "coordinates": [ ] }; 
    +break;
    +case 37: this.$ = { "type": "MultiPoint", "coordinates": $[$0-1].data }; 
    +break;
    +case 38: this.$ = { "type": "MultiPoint", "coordinates": $[$0-1].data, "properties": { z: true } }; 
    +break;
    +case 39: this.$ = { "type": "MultiPoint", "coordinates": $[$0-1].data, "properties": { m: true } }; 
    +break;
    +case 40: this.$ = { "type": "MultiPoint", "coordinates": $[$0-1].data, "properties": { z: true, m: true } }; 
    +break;
    +case 41: this.$ = { "type": "MultiPoint", "coordinates": [ ] } 
    +break;
    +case 42: this.$ = { "type": "MultiLineString", "coordinates": $[$0-1].toJSON() }; 
    +break;
    +case 43: this.$ = { "type": "MultiLineString", "coordinates": $[$0-1].toJSON(), "properties": { z: true } }; 
    +break;
    +case 44: this.$ = { "type": "MultiLineString", "coordinates": $[$0-1].toJSON(), "properties": { m: true } }; 
    +break;
    +case 45: this.$ = { "type": "MultiLineString", "coordinates": $[$0-1].toJSON(), "properties": { z: true, m: true } }; 
    +break;
    +case 46: this.$ = { "type": "MultiLineString", "coordinates": [ ] }; 
    +break;
    +case 47: this.$ = { "type": "MultiPolygon", "coordinates": $[$0-1].toJSON() }; 
    +break;
    +case 48: this.$ = { "type": "MultiPolygon", "coordinates": $[$0-1].toJSON(), "properties": { z: true } }; 
    +break;
    +case 49: this.$ = { "type": "MultiPolygon", "coordinates": $[$0-1].toJSON(), "properties": { m: true } }; 
    +break;
    +case 50: this.$ = { "type": "MultiPolygon", "coordinates": $[$0-1].toJSON(), "properties": { z: true, m: true } }; 
    +break;
    +case 51: this.$ = { "type": "MultiPolygon", "coordinates": [ ] }; 
    +break;
    +}
    +},
    +table: [{3:1,4:2,6:3,7:4,8:5,9:6,10:7,19:[1,8],28:[1,9],29:[1,10],30:[1,11],31:[1,12],32:[1,13]},{1:[3]},{5:[1,14]},{5:[1,15]},{5:[1,16]},{5:[1,17]},{5:[1,18]},{5:[1,19]},{17:[1,20],20:[1,21],21:[1,22],22:[1,23],23:[1,24]},{17:[1,25],20:[1,26],21:[1,28],22:[1,27],23:[1,29]},{17:[1,30],20:[1,31],21:[1,33],22:[1,32],23:[1,34]},{17:[1,35],20:[1,36],21:[1,38],22:[1,37],23:[1,39]},{17:[1,40],20:[1,41],21:[1,43],22:[1,42],23:[1,44]},{17:[1,45],20:[1,46],21:[1,48],22:[1,47],23:[1,49]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{11:51,12:[1,52],13:50},{17:[1,53]},{17:[1,54]},{17:[1,55]},{5:[2,19]},{11:58,12:[1,52],17:[1,59],24:57,27:56},{17:[1,60]},{17:[1,61]},{17:[1,62]},{5:[2,31]},{15:63,16:64,17:[1,65]},{17:[1,66]},{17:[1,67]},{17:[1,68]},{5:[2,36]},{11:58,12:[1,52],17:[1,59],24:57,27:69},{17:[1,70]},{17:[1,71]},{17:[1,72]},{5:[2,41]},{15:73,16:64,17:[1,65]},{17:[1,74]},{17:[1,75]},{17:[1,76]},{5:[2,46]},{17:[1,79],25:77,26:78},{17:[1,80]},{17:[1,81]},{17:[1,82]},{5:[2,51]},{14:[1,84],18:[1,83]},{14:[2,11],18:[2,11]},{12:[1,85]},{11:51,12:[1,52],13:86},{11:51,12:[1,52],13:87},{11:51,12:[1,52],13:88},{14:[1,90],18:[1,89]},{14:[2,26],18:[2,26]},{14:[2,20],18:[2,20]},{11:91,12:[1,52]},{11:58,12:[1,52],17:[1,59],24:57,27:92},{11:58,12:[1,52],17:[1,59],24:57,27:93},{11:58,12:[1,52],17:[1,59],24:57,27:94},{14:[1,96],18:[1,95]},{14:[2,13],18:[2,13]},{11:51,12:[1,52],13:97},{15:98,16:64,17:[1,65]},{15:99,16:64,17:[1,65]},{15:100,16:64,17:[1,65]},{14:[1,90],18:[1,101]},{11:58,12:[1,52],17:[1,59],24:57,27:102},{11:58,12:[1,52],17:[1,59],24:57,27:103},{11:58,12:[1,52],17:[1,59],24:57,27:104},{14:[1,96],18:[1,105]},{15:106,16:64,17:[1,65]},{15:107,16:64,17:[1,65]},{15:108,16:64,17:[1,65]},{14:[1,110],18:[1,109]},{14:[2,23],18:[2,23]},{15:111,16:64,17:[1,65]},{17:[1,79],25:112,26:78},{17:[1,79],25:113,26:78},{17:[1,79],25:114,26:78},{5:[2,15]},{11:115,12:[1,52]},{12:[1,116],14:[2,7],18:[2,7]},{14:[1,84],18:[1,117]},{14:[1,84],18:[1,118]},{14:[1,84],18:[1,119]},{5:[2,27]},{11:58,12:[1,52],17:[1,59],24:120},{18:[1,121]},{14:[1,90],18:[1,122]},{14:[1,90],18:[1,123]},{14:[1,90],18:[1,124]},{5:[2,32]},{16:125,17:[1,65]},{14:[1,84],18:[1,126]},{14:[1,96],18:[1,127]},{14:[1,96],18:[1,128]},{14:[1,96],18:[1,129]},{5:[2,37]},{14:[1,90],18:[1,130]},{14:[1,90],18:[1,131]},{14:[1,90],18:[1,132]},{5:[2,42]},{14:[1,96],18:[1,133]},{14:[1,96],18:[1,134]},{14:[1,96],18:[1,135]},{5:[2,47]},{17:[1,79],26:136},{14:[1,96],18:[1,137]},{14:[1,110],18:[1,138]},{14:[1,110],18:[1,139]},{14:[1,110],18:[1,140]},{14:[2,10],18:[2,10]},{12:[1,141],14:[2,8],18:[2,8]},{5:[2,16]},{5:[2,17]},{5:[2,18]},{14:[2,25],18:[2,25]},{14:[2,21],18:[2,21]},{5:[2,28]},{5:[2,29]},{5:[2,30]},{14:[2,12],18:[2,12]},{14:[2,14],18:[2,14]},{5:[2,33]},{5:[2,34]},{5:[2,35]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,43]},{5:[2,44]},{5:[2,45]},{14:[2,22],18:[2,22]},{14:[2,24],18:[2,24]},{5:[2,48]},{5:[2,49]},{5:[2,50]},{14:[2,9],18:[2,9]}],
    +defaultActions: {14:[2,1],15:[2,2],16:[2,3],17:[2,4],18:[2,5],19:[2,6],24:[2,19],29:[2,31],34:[2,36],39:[2,41],44:[2,46],49:[2,51],83:[2,15],89:[2,27],95:[2,32],101:[2,37],105:[2,42],109:[2,47],117:[2,16],118:[2,17],119:[2,18],122:[2,28],123:[2,29],124:[2,30],127:[2,33],128:[2,34],129:[2,35],130:[2,38],131:[2,39],132:[2,40],133:[2,43],134:[2,44],135:[2,45],138:[2,48],139:[2,49],140:[2,50]},
    +parseError: function parseError(str, hash) {
    +    throw new Error(str);
    +},
    +parse: function parse(input) {
    +    var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
    +    this.lexer.setInput(input);
    +    this.lexer.yy = this.yy;
    +    this.yy.lexer = this.lexer;
    +    this.yy.parser = this;
    +    Iif (typeof this.lexer.yylloc == "undefined")
    +        this.lexer.yylloc = {};
    +    var yyloc = this.lexer.yylloc;
    +    lstack.push(yyloc);
    +    var ranges = this.lexer.options && this.lexer.options.ranges;
    +    Iif (typeof this.yy.parseError === "function")
    +        this.parseError = this.yy.parseError;
    +    function popStack(n) {
    +        stack.length = stack.length - 2 * n;
    +        vstack.length = vstack.length - n;
    +        lstack.length = lstack.length - n;
    +    }
    +    function lex() {
    +        var token;
    +        token = self.lexer.lex() || 1;
    +        Iif (typeof token !== "number") {
    +            token = self.symbols_[token] || token;
    +        }
    +        return token;
    +    }
    +    var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
    +    while (true) {
    +        state = stack[stack.length - 1];
    +        if (this.defaultActions[state]) {
    +            action = this.defaultActions[state];
    +        } else {
    +            if (symbol === null || typeof symbol == "undefined") {
    +                symbol = lex();
    +            }
    +            action = table[state] && table[state][symbol];
    +        }
    +        Iif (typeof action === "undefined" || !action.length || !action[0]) {
    +            var errStr = "";
    +            if (!recovering) {
    +                expected = [];
    +                for (p in table[state])
    +                    if (this.terminals_[p] && p > 2) {
    +                        expected.push("'" + this.terminals_[p] + "'");
    +                    }
    +                if (this.lexer.showPosition) {
    +                    errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
    +                } else {
    +                    errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1?"end of input":"'" + (this.terminals_[symbol] || symbol) + "'");
    +                }
    +                this.parseError(errStr, {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected});
    +            }
    +        }
    +        Iif (action[0] instanceof Array && action.length > 1) {
    +            throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
    +        }
    +        switch (action[0]) {
    +        case 1:
    +            stack.push(symbol);
    +            vstack.push(this.lexer.yytext);
    +            lstack.push(this.lexer.yylloc);
    +            stack.push(action[1]);
    +            symbol = null;
    +            Eif (!preErrorSymbol) {
    +                yyleng = this.lexer.yyleng;
    +                yytext = this.lexer.yytext;
    +                yylineno = this.lexer.yylineno;
    +                yyloc = this.lexer.yylloc;
    +                Iif (recovering > 0)
    +                    recovering--;
    +            } else {
    +                symbol = preErrorSymbol;
    +                preErrorSymbol = null;
    +            }
    +            break;
    +        case 2:
    +            len = this.productions_[action[1]][1];
    +            yyval.$ = vstack[vstack.length - len];
    +            yyval._$ = {first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column};
    +            Iif (ranges) {
    +                yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
    +            }
    +            r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);
    +            if (typeof r !== "undefined") {
    +                return r;
    +            }
    +            Eif (len) {
    +                stack = stack.slice(0, -1 * len * 2);
    +                vstack = vstack.slice(0, -1 * len);
    +                lstack = lstack.slice(0, -1 * len);
    +            }
    +            stack.push(this.productions_[action[1]][0]);
    +            vstack.push(yyval.$);
    +            lstack.push(yyval._$);
    +            newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
    +            stack.push(newState);
    +            break;
    +        case 3:
    +            return true;
    +        }
    +    }
    +    return true;
    +}
    +};
    +undefined/* Jison generated lexer */
    +var lexer = (function(){
    +var lexer = ({EOF:1,
    +parseError:function parseError(str, hash) {
    +        if (this.yy.parser) {
    +            this.yy.parser.parseError(str, hash);
    +        } else {
    +            throw new Error(str);
    +        }
    +    },
    +setInput:function (input) {
    +        this._input = input;
    +        this._more = this._less = this.done = false;
    +        this.yylineno = this.yyleng = 0;
    +        this.yytext = this.matched = this.match = '';
    +        this.conditionStack = ['INITIAL'];
    +        this.yylloc = {first_line:1,first_column:0,last_line:1,last_column:0};
    +        Iif (this.options.ranges) this.yylloc.range = [0,0];
    +        this.offset = 0;
    +        return this;
    +    },
    +input:function () {
    +        var ch = this._input[0];
    +        this.yytext += ch;
    +        this.yyleng++;
    +        this.offset++;
    +        this.match += ch;
    +        this.matched += ch;
    +        var lines = ch.match(/(?:\r\n?|\n).*/g);
    +        if (lines) {
    +            this.yylineno++;
    +            this.yylloc.last_line++;
    +        } else {
    +            this.yylloc.last_column++;
    +        }
    +        if (this.options.ranges) this.yylloc.range[1]++;
    + 
    +        this._input = this._input.slice(1);
    +        return ch;
    +    },
    +unput:function (ch) {
    +        var len = ch.length;
    +        var lines = ch.split(/(?:\r\n?|\n)/g);
    + 
    +        this._input = ch + this._input;
    +        this.yytext = this.yytext.substr(0, this.yytext.length-len-1);
    +        //this.yyleng -= len;
    +        this.offset -= len;
    +        var oldLines = this.match.split(/(?:\r\n?|\n)/g);
    +        this.match = this.match.substr(0, this.match.length-1);
    +        this.matched = this.matched.substr(0, this.matched.length-1);
    + 
    +        if (lines.length-1) this.yylineno -= lines.length-1;
    +        var r = this.yylloc.range;
    + 
    +        this.yylloc = {first_line: this.yylloc.first_line,
    +          last_line: this.yylineno+1,
    +          first_column: this.yylloc.first_column,
    +          last_column: lines ?
    +              (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length:
    +              this.yylloc.first_column - len
    +          };
    + 
    +        if (this.options.ranges) {
    +            this.yylloc.range = [r[0], r[0] + this.yyleng - len];
    +        }
    +        return this;
    +    },
    +more:function () {
    +        this._more = true;
    +        return this;
    +    },
    +less:function (n) {
    +        this.unput(this.match.slice(n));
    +    },
    +pastInput:function () {
    +        var past = this.matched.substr(0, this.matched.length - this.match.length);
    +        return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
    +    },
    +upcomingInput:function () {
    +        var next = this.match;
    +        if (next.length < 20) {
    +            next += this._input.substr(0, 20-next.length);
    +        }
    +        return (next.substr(0,20)+(next.length > 20 ? '...':'')).replace(/\n/g, "");
    +    },
    +showPosition:function () {
    +        var pre = this.pastInput();
    +        var c = new Array(pre.length + 1).join("-");
    +        return pre + this.upcomingInput() + "\n" + c+"^";
    +    },
    +next:function () {
    +        Iif (this.done) {
    +            return this.EOF;
    +        }
    +        if (!this._input) this.done = true;
    + 
    +        var token,
    +            match,
    +            tempMatch,
    +            index,
    +            col,
    +            lines;
    +        Eif (!this._more) {
    +            this.yytext = '';
    +            this.match = '';
    +        }
    +        var rules = this._currentRules();
    +        for (var i=0;i < rules.length; i++) {
    +            tempMatch = this._input.match(this.rules[rules[i]]);
    +            if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
    +                match = tempMatch;
    +                index = i;
    +                Eif (!this.options.flex) break;
    +            }
    +        }
    +        Eif (match) {
    +            lines = match[0].match(/(?:\r\n?|\n).*/g);
    +            Iif (lines) this.yylineno += lines.length;
    +            this.yylloc = {first_line: this.yylloc.last_line,
    +                           last_line: this.yylineno+1,
    +                           first_column: this.yylloc.last_column,
    +                           last_column: lines ? lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length};
    +            this.yytext += match[0];
    +            this.match += match[0];
    +            this.matches = match;
    +            this.yyleng = this.yytext.length;
    +            Iif (this.options.ranges) {
    +                this.yylloc.range = [this.offset, this.offset += this.yyleng];
    +            }
    +            this._more = false;
    +            this._input = this._input.slice(match[0].length);
    +            this.matched += match[0];
    +            token = this.performAction.call(this, this.yy, this, rules[index],this.conditionStack[this.conditionStack.length-1]);
    +            Iif (this.done && this._input) this.done = false;
    +            if (token) return token;
    +            else return;
    +        }
    +        if (this._input === "") {
    +            return this.EOF;
    +        } else {
    +            return this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\n'+this.showPosition(),
    +                    {text: "", token: null, line: this.yylineno});
    +        }
    +    },
    +lex:function lex() {
    +        var r = this.next();
    +        if (typeof r !== 'undefined') {
    +            return r;
    +        } else {
    +            return this.lex();
    +        }
    +    },
    +begin:function begin(condition) {
    +        this.conditionStack.push(condition);
    +    },
    +popState:function popState() {
    +        return this.conditionStack.pop();
    +    },
    +_currentRules:function _currentRules() {
    +        return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;
    +    },
    +topState:function () {
    +        return this.conditionStack[this.conditionStack.length-2];
    +    },
    +pushState:function begin(condition) {
    +        this.begin(condition);
    +    }});
    +lexer.options = {};
    +lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START
    +/**/) {
    + 
    +var YYSTATE=YY_START
    +switch($avoiding_name_collisions) {
    +case 0:// ignore
    +break;
    +case 1:return 17
    +break;
    +case 2:return 18
    +break;
    +case 3:return 12
    +break;
    +case 4:return 19
    +break;
    +case 5:return 28
    +break;
    +case 6:return 29
    +break;
    +case 7:return 30
    +break;
    +case 8:return 31
    +break;
    +case 9:return 32
    +break;
    +case 10:return 14
    +break;
    +case 11:return 23
    +break;
    +case 12:return 22
    +break;
    +case 13:return 20
    +break;
    +case 14:return 21
    +break;
    +case 15:return 5
    +break;
    +case 16:return "INVALID"
    +break;
    +}
    +};
    +lexer.rules = [/^(?:\s+)/,/^(?:\()/,/^(?:\))/,/^(?:-?[0-9]+(\.[0-9]+)?([eE][\-\+]?[0-9]+)?)/,/^(?:POINT\b)/,/^(?:LINESTRING\b)/,/^(?:POLYGON\b)/,/^(?:MULTIPOINT\b)/,/^(?:MULTILINESTRING\b)/,/^(?:MULTIPOLYGON\b)/,/^(?:,)/,/^(?:EMPTY\b)/,/^(?:M\b)/,/^(?:Z\b)/,/^(?:ZM\b)/,/^(?:$)/,/^(?:.)/];
    +lexer.conditions = {"INITIAL":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],"inclusive":true}};
    +return lexer;})()
    +parser.lexer = lexer;
    +function Parser () { this.yy = {}; }Parser.prototype = parser;parser.Parser = Parser;
    +return new Parser;
    +})();
    + 
    +  function PointArray (point) {
    +    this.data = [ point ];
    +    this.type = 'PointArray';
    +  }
    + 
    +  PointArray.prototype.addPoint = function (point) {
    +    Eif (point.type === 'PointArray') {
    +      this.data = this.data.concat(point.data);
    +    } else {
    +      this.data.push(point);
    +    }
    + 
    +    return this;
    +  };
    + 
    +  PointArray.prototype.toJSON = function () {
    +    return this.data;
    +  };
    + 
    +  function Ring (point) {
    +    this.data = point;
    +    this.type = 'Ring';
    +  }
    + 
    +  Ring.prototype.toJSON = function () {
    +    var data = [ ];
    + 
    +    for (var i = 0; i < this.data.data.length; i++) {
    +      data.push(this.data.data[i]);
    +    }
    + 
    +    return data;
    +  };
    + 
    +  function RingList (ring) {
    +    this.data = [ ring ];
    +    this.type = 'RingList';
    +  }
    + 
    +  RingList.prototype.addRing = function (ring) {
    +    this.data.push(ring);
    + 
    +    return this;
    +  };
    + 
    +  RingList.prototype.toJSON = function () {
    +    var data = [ ];
    + 
    +    for (var i = 0; i < this.data.length; i++) {
    +      data.push(this.data[i].toJSON());
    +    }
    + 
    +    if (data.length === 1) {
    +      return data;
    +    } else {
    +      return data;
    +    }
    +  };
    + 
    +  function PolygonList (polygon) {
    +    this.data = [ polygon ];
    +    this.type = 'PolygonList';
    +  }
    + 
    +  PolygonList.prototype.addPolygon = function (polygon) {
    +    this.data.push(polygon);
    + 
    +    return this;
    +  };
    + 
    +  PolygonList.prototype.toJSON = function () {
    +    var data = [ ];
    + 
    +    for (var i = 0; i < this.data.length; i++) {
    +      data = data.concat( [ this.data[i].toJSON() ] );
    +    }
    + 
    +    return data;
    +  };
    + 
    +  function _parse () {
    +    return parser.parse.apply(parser, arguments);
    +  }
    + 
    +  function parse (element) {
    +    var res, primitive;
    + 
    +    try {
    +      res = parser.parse(element);
    +    } catch (err) {
    +      throw Error("Unable to parse: " + err);
    +    }
    + 
    +    return Terraformer.Primitive(res);
    +  }
    + 
    +  function arrayToRing (arr) {
    +    var parts = [ ], ret = '';
    + 
    +    for (var i = 0; i < arr.length; i++) {
    +      parts.push(arr[i].join(' '));
    +    }
    + 
    +    ret += '(' + parts.join(', ') + ')';
    + 
    +    return ret;
    + 
    +  }
    + 
    +  function pointToWKTPoint (primitive) {
    +    var ret = 'POINT ';
    + 
    +    if (primitive.coordinates === undefined || primitive.coordinates.length === 0) {
    +      ret += 'EMPTY';
    + 
    +      return ret;
    +    } else if (primitive.coordinates.length === 3) {
    +      // 3d or time? default to 3d
    +      if (primitive.properties && primitive.properties.m === true) {
    +        ret += 'M ';
    +      } else {
    +        ret += 'Z ';
    +      }
    +    } else if (primitive.coordinates.length === 4) {
    +      // 3d and time
    +      ret += 'ZM ';
    +    }
    + 
    +    // include coordinates
    +    ret += '(' + primitive.coordinates.join(' ') + ')';
    + 
    +    return ret;
    +  }
    + 
    +  function lineStringToWKTLineString (primitive) {
    +    var ret = 'LINESTRING ';
    + 
    +    if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) {
    +      ret += 'EMPTY';
    + 
    +      return ret;
    +    } else if (primitive.coordinates[0].length === 3) {
    +      if (primitive.properties && primitive.properties.m === true) {
    +        ret += 'M ';
    +      } else {
    +        ret += 'Z ';
    +      }
    +    } else if (primitive.coordinates[0].length === 4) {
    +      ret += 'ZM ';
    +    }
    + 
    +    ret += arrayToRing(primitive.coordinates);
    + 
    +    return ret;
    +  }
    + 
    +  function polygonToWKTPolygon (primitive) {
    +    var ret = 'POLYGON ';
    + 
    +    if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) {
    +      ret += 'EMPTY';
    + 
    +      return ret;
    +    } else if (primitive.coordinates[0][0].length === 3) {
    +      if (primitive.properties && primitive.properties.m === true) {
    +        ret += 'M ';
    +      } else {
    +        ret += 'Z ';
    +      }
    +    } else if (primitive.coordinates[0][0].length === 4) {
    +      ret += 'ZM ';
    +    }
    + 
    +    ret += '(';
    +    var parts = [ ];
    +    for (var i = 0; i < primitive.coordinates.length; i++) {
    +      parts.push(arrayToRing(primitive.coordinates[i]));
    +    }
    + 
    +    ret += parts.join(', ');
    +    ret += ')';
    + 
    +    return ret;
    +  }
    + 
    +  function multiPointToWKTMultiPoint (primitive) {
    +    var ret = 'MULTIPOINT ';
    + 
    +    if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) {
    +      ret += 'EMPTY';
    + 
    +      return ret;
    +    } else if (primitive.coordinates[0].length === 3) {
    +      if (primitive.properties && primitive.properties.m === true) {
    +        ret += 'M ';
    +      } else {
    +        ret += 'Z ';
    +      }
    +    } else if (primitive.coordinates[0].length === 4) {
    +      ret += 'ZM ';
    +    }
    + 
    +    ret += arrayToRing(primitive.coordinates);
    + 
    +    return ret;
    +  }
    + 
    +  function multiLineStringToWKTMultiLineString (primitive) {
    +    var ret = 'MULTILINESTRING ';
    + 
    +    if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) {
    +      ret += 'EMPTY';
    + 
    +      return ret;
    +    } else if (primitive.coordinates[0][0].length === 3) {
    +      if (primitive.properties && primitive.properties.m === true) {
    +        ret += 'M ';
    +      } else {
    +        ret += 'Z ';
    +      }
    +    } else if (primitive.coordinates[0][0].length === 4) {
    +      ret += 'ZM ';
    +    }
    + 
    +    ret += '(';
    +    var parts = [ ];
    +    for (var i = 0; i < primitive.coordinates.length; i++) {
    +      parts.push(arrayToRing(primitive.coordinates[i]));
    +    }
    + 
    +    ret += parts.join(', ');
    +    ret += ')';
    + 
    +    return ret;
    +  }
    + 
    +  function multiPolygonToWKTMultiPolygon (primitive) {
    +    var ret = 'MULTIPOLYGON ';
    + 
    +    if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) {
    +      ret += 'EMPTY';
    + 
    +      return ret;
    +    } else if (primitive.coordinates[0][0][0].length === 3) {
    +      if (primitive.properties && primitive.properties.m === true) {
    +        ret += 'M ';
    +      } else {
    +        ret += 'Z ';
    +      }
    +    } else if (primitive.coordinates[0][0][0].length === 4) {
    +      ret += 'ZM ';
    +    }
    + 
    +    ret += '(';
    +    var inner = [ ];
    +    for (var c = 0; c < primitive.coordinates.length; c++) {
    +      var it = '(';
    +      var parts = [ ];
    +      for (var i = 0; i < primitive.coordinates[c].length; i++) {
    +        parts.push(arrayToRing(primitive.coordinates[c][i]));
    +      }
    + 
    +      it += parts.join(', ');
    +      it += ')';
    + 
    +      inner.push(it);
    +    }
    + 
    +    ret += inner.join(', ');
    +    ret += ')';
    + 
    +    return ret;
    +  }
    + 
    +  function convert (primitive) {
    +    switch (primitive.type) {
    +      case 'Point':
    +        return pointToWKTPoint(primitive);
    +      case 'LineString':
    +        return lineStringToWKTLineString(primitive);
    +      case 'Polygon':
    +        return polygonToWKTPolygon(primitive);
    +      case 'MultiPoint':
    +        return multiPointToWKTMultiPoint(primitive);
    +      case 'MultiLineString':
    +        return multiLineStringToWKTMultiLineString(primitive);
    +      case 'MultiPolygon':
    +        return multiPolygonToWKTMultiPolygon(primitive);
    +      default:
    +        throw Error ("Unknown Type: " + primitive.type);
    +    }
    +  }
    + 
    + 
    + 
    +  exports.parser  = parser;
    +  exports.Parser  = parser.Parser;
    +  exports.parse   = parse;
    +  exports.convert = convert;
    + 
    +  return exports;
    +}));
    + 
    +
    +
    + + + + + + + diff --git a/node_modules/terraformer-wkt-parser/coverage/index.html b/node_modules/terraformer-wkt-parser/coverage/index.html new file mode 100644 index 0000000..47bae3d --- /dev/null +++ b/node_modules/terraformer-wkt-parser/coverage/index.html @@ -0,0 +1,93 @@ + + + + Code coverage report for All files + + + + + + + +
    +
    +

    + / +

    +
    +
    + 78.64% + Statements + 405/515 +
    +
    + 74.38% + Branches + 209/281 +
    +
    + 65.31% + Functions + 32/49 +
    +
    + 79.17% + Lines + 399/504 +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FileStatementsBranchesFunctionsLines
    __root__/
    78.64%405/51574.38%209/28165.31%32/4979.17%399/504
    +
    +
    + + + + + + + diff --git a/node_modules/terraformer-wkt-parser/coverage/prettify.css b/node_modules/terraformer-wkt-parser/coverage/prettify.css new file mode 100644 index 0000000..b317a7c --- /dev/null +++ b/node_modules/terraformer-wkt-parser/coverage/prettify.css @@ -0,0 +1 @@ +.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} diff --git a/node_modules/terraformer-wkt-parser/coverage/prettify.js b/node_modules/terraformer-wkt-parser/coverage/prettify.js new file mode 100644 index 0000000..ef51e03 --- /dev/null +++ b/node_modules/terraformer-wkt-parser/coverage/prettify.js @@ -0,0 +1 @@ +window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];var r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var I=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var f=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;arat[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);c(g([[F,/^[\s]+/,null," \t\r\n"],[n,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[m,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[L,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);c(g([],[[n,/^[\s\S]+/]]),["uq.val"]);c(i({keywords:l,hashComments:true,cStyleComments:true,types:e}),["c","cc","cpp","cxx","cyc","m"]);c(i({keywords:"null,true,false"}),["json"]);c(i({keywords:R,hashComments:true,cStyleComments:true,verbatimStrings:true,types:e}),["cs"]);c(i({keywords:x,cStyleComments:true}),["java"]);c(i({keywords:H,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);c(i({keywords:I,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);c(i({keywords:s,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);c(i({keywords:f,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);c(i({keywords:w,cStyleComments:true,regexLiterals:true}),["js"]);c(i({keywords:r,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);c(g([],[[C,/^[\s\S]+/]]),["regex"]);function d(V){var U=V.langExtension;try{var S=a(V.sourceNode);var T=S.sourceCode;V.sourceCode=T;V.spans=S.spans;V.basePos=0;q(U,T)(V);D(V)}catch(W){if("console" in window){console.log(W&&W.stack?W.stack:W)}}}function y(W,V,U){var S=document.createElement("PRE");S.innerHTML=W;if(U){Q(S,U)}var T={langExtension:V,numberLines:U,sourceNode:S};d(T);return S.innerHTML}function b(ad){function Y(af){return document.getElementsByTagName(af)}var ac=[Y("pre"),Y("code"),Y("xmp")];var T=[];for(var aa=0;aa=0){var ah=ai.match(ab);var am;if(!ah&&(am=o(aj))&&"CODE"===am.tagName){ah=am.className.match(ab)}if(ah){ah=ah[1]}var al=false;for(var ak=aj.parentNode;ak;ak=ak.parentNode){if((ak.tagName==="pre"||ak.tagName==="code"||ak.tagName==="xmp")&&ak.className&&ak.className.indexOf("prettyprint")>=0){al=true;break}}if(!al){var af=aj.className.match(/\blinenums\b(?::(\d+))?/);af=af?af[1]&&af[1].length?+af[1]:true:false;if(af){Q(aj,af)}S={langExtension:ah,sourceNode:aj,numberLines:af};d(S)}}}if(X]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),["handlebars","hbs"]);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]); diff --git a/node_modules/terraformer-wkt-parser/coverage/sort-arrow-sprite.png b/node_modules/terraformer-wkt-parser/coverage/sort-arrow-sprite.png new file mode 100644 index 0000000000000000000000000000000000000000..03f704a609c6fd0dbfdac63466a7d7c958b5cbf3 GIT binary patch literal 209 zcmeAS@N?(olHy`uVBq!ia0vp^>_9Bd!3HEZxJ@+%Qj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS>Jii$m5978H@?Fn+^JD|Y9yzj{W`447Gxa{7*dM7nnnD-Lb z6^}Hx2)'; + } + } + return cols; + } + // attaches a data attribute to every tr element with an object + // of data values keyed by column name + function loadRowData(tableRow) { + var tableCols = tableRow.querySelectorAll('td'), + colNode, + col, + data = {}, + i, + val; + for (i = 0; i < tableCols.length; i += 1) { + colNode = tableCols[i]; + col = cols[i]; + val = colNode.getAttribute('data-value'); + if (col.type === 'number') { + val = Number(val); + } + data[col.key] = val; + } + return data; + } + // loads all row data + function loadData() { + var rows = getTableBody().querySelectorAll('tr'), + i; + + for (i = 0; i < rows.length; i += 1) { + rows[i].data = loadRowData(rows[i]); + } + } + // sorts the table using the data for the ith column + function sortByIndex(index, desc) { + var key = cols[index].key, + sorter = function (a, b) { + a = a.data[key]; + b = b.data[key]; + return a < b ? -1 : a > b ? 1 : 0; + }, + finalSorter = sorter, + tableBody = document.querySelector('.coverage-summary tbody'), + rowNodes = tableBody.querySelectorAll('tr'), + rows = [], + i; + + if (desc) { + finalSorter = function (a, b) { + return -1 * sorter(a, b); + }; + } + + for (i = 0; i < rowNodes.length; i += 1) { + rows.push(rowNodes[i]); + tableBody.removeChild(rowNodes[i]); + } + + rows.sort(finalSorter); + + for (i = 0; i < rows.length; i += 1) { + tableBody.appendChild(rows[i]); + } + } + // removes sort indicators for current column being sorted + function removeSortIndicators() { + var col = getNthColumn(currentSort.index), + cls = col.className; + + cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, ''); + col.className = cls; + } + // adds sort indicators for current column being sorted + function addSortIndicators() { + getNthColumn(currentSort.index).className += currentSort.desc ? ' sorted-desc' : ' sorted'; + } + // adds event listeners for all sorter widgets + function enableUI() { + var i, + el, + ithSorter = function ithSorter(i) { + var col = cols[i]; + + return function () { + var desc = col.defaultDescSort; + + if (currentSort.index === i) { + desc = !currentSort.desc; + } + sortByIndex(i, desc); + removeSortIndicators(); + currentSort.index = i; + currentSort.desc = desc; + addSortIndicators(); + }; + }; + for (i =0 ; i < cols.length; i += 1) { + if (cols[i].sortable) { + // add the click event handler on the th so users + // dont have to click on those tiny arrows + el = getNthColumn(i).querySelector('.sorter').parentElement; + if (el.addEventListener) { + el.addEventListener('click', ithSorter(i)); + } else { + el.attachEvent('onclick', ithSorter(i)); + } + } + } + } + // adds sorting functionality to the UI + return function () { + if (!getTable()) { + return; + } + cols = loadColumns(); + loadData(cols); + addSortIndicators(); + enableUI(); + }; +})(); + +window.addEventListener('load', addSorting); diff --git a/node_modules/terraformer-wkt-parser/dist/terraformer-wkt-parser.js b/node_modules/terraformer-wkt-parser/dist/terraformer-wkt-parser.js new file mode 100644 index 0000000..fed561b --- /dev/null +++ b/node_modules/terraformer-wkt-parser/dist/terraformer-wkt-parser.js @@ -0,0 +1,761 @@ +(function (root, factory) { + + // Node. + if(typeof module === 'object' && typeof module.exports === 'object') { + exports = module.exports = factory(require("terraformer")); + } else if(typeof navigator === "object") { + // Browser Global. + if (!root.Terraformer){ + throw new Error("Terraformer.WKT requires the core Terraformer library. http://github.com/esri/terraformer") + } + root.Terraformer.WKT = factory(root.Terraformer); + } + +}(this, function(Terraformer) { + var exports = { }; + + /* Jison generated parser */ +var parser = (function(){ +var parser = {trace: function trace() { }, +yy: {}, +symbols_: {"error":2,"expressions":3,"point":4,"EOF":5,"linestring":6,"polygon":7,"multipoint":8,"multilinestring":9,"multipolygon":10,"coordinate":11,"DOUBLE_TOK":12,"ptarray":13,"COMMA":14,"ring_list":15,"ring":16,"(":17,")":18,"POINT":19,"Z":20,"ZM":21,"M":22,"EMPTY":23,"point_untagged":24,"polygon_list":25,"polygon_untagged":26,"point_list":27,"LINESTRING":28,"POLYGON":29,"MULTIPOINT":30,"MULTILINESTRING":31,"MULTIPOLYGON":32,"$accept":0,"$end":1}, +terminals_: {2:"error",5:"EOF",12:"DOUBLE_TOK",14:"COMMA",17:"(",18:")",19:"POINT",20:"Z",21:"ZM",22:"M",23:"EMPTY",28:"LINESTRING",29:"POLYGON",30:"MULTIPOINT",31:"MULTILINESTRING",32:"MULTIPOLYGON"}, +productions_: [0,[3,2],[3,2],[3,2],[3,2],[3,2],[3,2],[11,2],[11,3],[11,4],[13,3],[13,1],[15,3],[15,1],[16,3],[4,4],[4,5],[4,5],[4,5],[4,2],[24,1],[24,3],[25,3],[25,1],[26,3],[27,3],[27,1],[6,4],[6,5],[6,5],[6,5],[6,2],[7,4],[7,5],[7,5],[7,5],[7,2],[8,4],[8,5],[8,5],[8,5],[8,2],[9,4],[9,5],[9,5],[9,5],[9,2],[10,4],[10,5],[10,5],[10,5],[10,2]], +performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$,_$ +/**/) { + +var $0 = $.length - 1; +switch (yystate) { +case 1: return $[$0-1]; +break; +case 2: return $[$0-1]; +break; +case 3: return $[$0-1]; +break; +case 4: return $[$0-1]; +break; +case 5: return $[$0-1]; +break; +case 6: return $[$0-1]; +break; +case 7: this.$ = new PointArray([ Number($[$0-1]), Number($[$0]) ]); +break; +case 8: this.$ = new PointArray([ Number($[$0-2]), Number($[$0-1]), Number($[$0]) ]); +break; +case 9: this.$ = new PointArray([ Number($[$0-3]), Number($[$0-2]), Number($[$0-1]), Number($[$0]) ]); +break; +case 10: this.$ = $[$0-2].addPoint($[$0]); +break; +case 11: this.$ = $[$0]; +break; +case 12: this.$ = $[$0-2].addRing($[$0]); +break; +case 13: this.$ = new RingList($[$0]); +break; +case 14: this.$ = new Ring($[$0-1]); +break; +case 15: this.$ = { "type": "Point", "coordinates": $[$0-1].data[0] }; +break; +case 16: this.$ = { "type": "Point", "coordinates": $[$0-1].data[0], "properties": { z: true } }; +break; +case 17: this.$ = { "type": "Point", "coordinates": $[$0-1].data[0], "properties": { z: true, m: true } }; +break; +case 18: this.$ = { "type": "Point", "coordinates": $[$0-1].data[0], "properties": { m: true } }; +break; +case 19: this.$ = { "type": "Point", "coordinates": [ ] }; +break; +case 20: this.$ = $[$0]; +break; +case 21: this.$ = $[$0-1]; +break; +case 22: this.$ = $[$0-2].addPolygon($[$0]); +break; +case 23: this.$ = new PolygonList($[$0]); +break; +case 24: this.$ = $[$0-1]; +break; +case 25: this.$ = $[$0-2].addPoint($[$0]); +break; +case 26: this.$ = $[$0]; +break; +case 27: this.$ = { "type": "LineString", "coordinates": $[$0-1].data }; +break; +case 28: this.$ = { "type": "LineString", "coordinates": $[$0-1].data, "properties": { z: true } }; +break; +case 29: this.$ = { "type": "LineString", "coordinates": $[$0-1].data, "properties": { m: true } }; +break; +case 30: this.$ = { "type": "LineString", "coordinates": $[$0-1].data, "properties": { z: true, m: true } }; +break; +case 31: this.$ = { "type": "LineString", "coordinates": [ ] }; +break; +case 32: this.$ = { "type": "Polygon", "coordinates": $[$0-1].toJSON() }; +break; +case 33: this.$ = { "type": "Polygon", "coordinates": $[$0-1].toJSON(), "properties": { z: true } }; +break; +case 34: this.$ = { "type": "Polygon", "coordinates": $[$0-1].toJSON(), "properties": { m: true } }; +break; +case 35: this.$ = { "type": "Polygon", "coordinates": $[$0-1].toJSON(), "properties": { z: true, m: true } }; +break; +case 36: this.$ = { "type": "Polygon", "coordinates": [ ] }; +break; +case 37: this.$ = { "type": "MultiPoint", "coordinates": $[$0-1].data }; +break; +case 38: this.$ = { "type": "MultiPoint", "coordinates": $[$0-1].data, "properties": { z: true } }; +break; +case 39: this.$ = { "type": "MultiPoint", "coordinates": $[$0-1].data, "properties": { m: true } }; +break; +case 40: this.$ = { "type": "MultiPoint", "coordinates": $[$0-1].data, "properties": { z: true, m: true } }; +break; +case 41: this.$ = { "type": "MultiPoint", "coordinates": [ ] } +break; +case 42: this.$ = { "type": "MultiLineString", "coordinates": $[$0-1].toJSON() }; +break; +case 43: this.$ = { "type": "MultiLineString", "coordinates": $[$0-1].toJSON(), "properties": { z: true } }; +break; +case 44: this.$ = { "type": "MultiLineString", "coordinates": $[$0-1].toJSON(), "properties": { m: true } }; +break; +case 45: this.$ = { "type": "MultiLineString", "coordinates": $[$0-1].toJSON(), "properties": { z: true, m: true } }; +break; +case 46: this.$ = { "type": "MultiLineString", "coordinates": [ ] }; +break; +case 47: this.$ = { "type": "MultiPolygon", "coordinates": $[$0-1].toJSON() }; +break; +case 48: this.$ = { "type": "MultiPolygon", "coordinates": $[$0-1].toJSON(), "properties": { z: true } }; +break; +case 49: this.$ = { "type": "MultiPolygon", "coordinates": $[$0-1].toJSON(), "properties": { m: true } }; +break; +case 50: this.$ = { "type": "MultiPolygon", "coordinates": $[$0-1].toJSON(), "properties": { z: true, m: true } }; +break; +case 51: this.$ = { "type": "MultiPolygon", "coordinates": [ ] }; +break; +} +}, +table: [{3:1,4:2,6:3,7:4,8:5,9:6,10:7,19:[1,8],28:[1,9],29:[1,10],30:[1,11],31:[1,12],32:[1,13]},{1:[3]},{5:[1,14]},{5:[1,15]},{5:[1,16]},{5:[1,17]},{5:[1,18]},{5:[1,19]},{17:[1,20],20:[1,21],21:[1,22],22:[1,23],23:[1,24]},{17:[1,25],20:[1,26],21:[1,28],22:[1,27],23:[1,29]},{17:[1,30],20:[1,31],21:[1,33],22:[1,32],23:[1,34]},{17:[1,35],20:[1,36],21:[1,38],22:[1,37],23:[1,39]},{17:[1,40],20:[1,41],21:[1,43],22:[1,42],23:[1,44]},{17:[1,45],20:[1,46],21:[1,48],22:[1,47],23:[1,49]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{11:51,12:[1,52],13:50},{17:[1,53]},{17:[1,54]},{17:[1,55]},{5:[2,19]},{11:58,12:[1,52],17:[1,59],24:57,27:56},{17:[1,60]},{17:[1,61]},{17:[1,62]},{5:[2,31]},{15:63,16:64,17:[1,65]},{17:[1,66]},{17:[1,67]},{17:[1,68]},{5:[2,36]},{11:58,12:[1,52],17:[1,59],24:57,27:69},{17:[1,70]},{17:[1,71]},{17:[1,72]},{5:[2,41]},{15:73,16:64,17:[1,65]},{17:[1,74]},{17:[1,75]},{17:[1,76]},{5:[2,46]},{17:[1,79],25:77,26:78},{17:[1,80]},{17:[1,81]},{17:[1,82]},{5:[2,51]},{14:[1,84],18:[1,83]},{14:[2,11],18:[2,11]},{12:[1,85]},{11:51,12:[1,52],13:86},{11:51,12:[1,52],13:87},{11:51,12:[1,52],13:88},{14:[1,90],18:[1,89]},{14:[2,26],18:[2,26]},{14:[2,20],18:[2,20]},{11:91,12:[1,52]},{11:58,12:[1,52],17:[1,59],24:57,27:92},{11:58,12:[1,52],17:[1,59],24:57,27:93},{11:58,12:[1,52],17:[1,59],24:57,27:94},{14:[1,96],18:[1,95]},{14:[2,13],18:[2,13]},{11:51,12:[1,52],13:97},{15:98,16:64,17:[1,65]},{15:99,16:64,17:[1,65]},{15:100,16:64,17:[1,65]},{14:[1,90],18:[1,101]},{11:58,12:[1,52],17:[1,59],24:57,27:102},{11:58,12:[1,52],17:[1,59],24:57,27:103},{11:58,12:[1,52],17:[1,59],24:57,27:104},{14:[1,96],18:[1,105]},{15:106,16:64,17:[1,65]},{15:107,16:64,17:[1,65]},{15:108,16:64,17:[1,65]},{14:[1,110],18:[1,109]},{14:[2,23],18:[2,23]},{15:111,16:64,17:[1,65]},{17:[1,79],25:112,26:78},{17:[1,79],25:113,26:78},{17:[1,79],25:114,26:78},{5:[2,15]},{11:115,12:[1,52]},{12:[1,116],14:[2,7],18:[2,7]},{14:[1,84],18:[1,117]},{14:[1,84],18:[1,118]},{14:[1,84],18:[1,119]},{5:[2,27]},{11:58,12:[1,52],17:[1,59],24:120},{18:[1,121]},{14:[1,90],18:[1,122]},{14:[1,90],18:[1,123]},{14:[1,90],18:[1,124]},{5:[2,32]},{16:125,17:[1,65]},{14:[1,84],18:[1,126]},{14:[1,96],18:[1,127]},{14:[1,96],18:[1,128]},{14:[1,96],18:[1,129]},{5:[2,37]},{14:[1,90],18:[1,130]},{14:[1,90],18:[1,131]},{14:[1,90],18:[1,132]},{5:[2,42]},{14:[1,96],18:[1,133]},{14:[1,96],18:[1,134]},{14:[1,96],18:[1,135]},{5:[2,47]},{17:[1,79],26:136},{14:[1,96],18:[1,137]},{14:[1,110],18:[1,138]},{14:[1,110],18:[1,139]},{14:[1,110],18:[1,140]},{14:[2,10],18:[2,10]},{12:[1,141],14:[2,8],18:[2,8]},{5:[2,16]},{5:[2,17]},{5:[2,18]},{14:[2,25],18:[2,25]},{14:[2,21],18:[2,21]},{5:[2,28]},{5:[2,29]},{5:[2,30]},{14:[2,12],18:[2,12]},{14:[2,14],18:[2,14]},{5:[2,33]},{5:[2,34]},{5:[2,35]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,43]},{5:[2,44]},{5:[2,45]},{14:[2,22],18:[2,22]},{14:[2,24],18:[2,24]},{5:[2,48]},{5:[2,49]},{5:[2,50]},{14:[2,9],18:[2,9]}], +defaultActions: {14:[2,1],15:[2,2],16:[2,3],17:[2,4],18:[2,5],19:[2,6],24:[2,19],29:[2,31],34:[2,36],39:[2,41],44:[2,46],49:[2,51],83:[2,15],89:[2,27],95:[2,32],101:[2,37],105:[2,42],109:[2,47],117:[2,16],118:[2,17],119:[2,18],122:[2,28],123:[2,29],124:[2,30],127:[2,33],128:[2,34],129:[2,35],130:[2,38],131:[2,39],132:[2,40],133:[2,43],134:[2,44],135:[2,45],138:[2,48],139:[2,49],140:[2,50]}, +parseError: function parseError(str, hash) { + throw new Error(str); +}, +parse: function parse(input) { + var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; + this.lexer.setInput(input); + this.lexer.yy = this.yy; + this.yy.lexer = this.lexer; + this.yy.parser = this; + if (typeof this.lexer.yylloc == "undefined") + this.lexer.yylloc = {}; + var yyloc = this.lexer.yylloc; + lstack.push(yyloc); + var ranges = this.lexer.options && this.lexer.options.ranges; + if (typeof this.yy.parseError === "function") + this.parseError = this.yy.parseError; + function popStack(n) { + stack.length = stack.length - 2 * n; + vstack.length = vstack.length - n; + lstack.length = lstack.length - n; + } + function lex() { + var token; + token = self.lexer.lex() || 1; + if (typeof token !== "number") { + token = self.symbols_[token] || token; + } + return token; + } + var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + if (!recovering) { + expected = []; + for (p in table[state]) + if (this.terminals_[p] && p > 2) { + expected.push("'" + this.terminals_[p] + "'"); + } + if (this.lexer.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1?"end of input":"'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected}); + } + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(this.lexer.yytext); + lstack.push(this.lexer.yylloc); + stack.push(action[1]); + symbol = null; + if (!preErrorSymbol) { + yyleng = this.lexer.yyleng; + yytext = this.lexer.yytext; + yylineno = this.lexer.yylineno; + yyloc = this.lexer.yylloc; + if (recovering > 0) + recovering--; + } else { + symbol = preErrorSymbol; + preErrorSymbol = null; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = {first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column}; + if (ranges) { + yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]]; + } + r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; +} +}; +undefined/* Jison generated lexer */ +var lexer = (function(){ +var lexer = ({EOF:1, +parseError:function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, +setInput:function (input) { + this._input = input; + this._more = this._less = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ''; + this.conditionStack = ['INITIAL']; + this.yylloc = {first_line:1,first_column:0,last_line:1,last_column:0}; + if (this.options.ranges) this.yylloc.range = [0,0]; + this.offset = 0; + return this; + }, +input:function () { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) this.yylloc.range[1]++; + + this._input = this._input.slice(1); + return ch; + }, +unput:function (ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length-len-1); + //this.yyleng -= len; + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length-1); + this.matched = this.matched.substr(0, this.matched.length-1); + + if (lines.length-1) this.yylineno -= lines.length-1; + var r = this.yylloc.range; + + this.yylloc = {first_line: this.yylloc.first_line, + last_line: this.yylineno+1, + first_column: this.yylloc.first_column, + last_column: lines ? + (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length: + this.yylloc.first_column - len + }; + + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + return this; + }, +more:function () { + this._more = true; + return this; + }, +less:function (n) { + this.unput(this.match.slice(n)); + }, +pastInput:function () { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); + }, +upcomingInput:function () { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20-next.length); + } + return (next.substr(0,20)+(next.length > 20 ? '...':'')).replace(/\n/g, ""); + }, +showPosition:function () { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c+"^"; + }, +next:function () { + if (this.done) { + return this.EOF; + } + if (!this._input) this.done = true; + + var token, + match, + tempMatch, + index, + col, + lines; + if (!this._more) { + this.yytext = ''; + this.match = ''; + } + var rules = this._currentRules(); + for (var i=0;i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (!this.options.flex) break; + } + } + if (match) { + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) this.yylineno += lines.length; + this.yylloc = {first_line: this.yylloc.last_line, + last_line: this.yylineno+1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length}; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, rules[index],this.conditionStack[this.conditionStack.length-1]); + if (this.done && this._input) this.done = false; + if (token) return token; + else return; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\n'+this.showPosition(), + {text: "", token: null, line: this.yylineno}); + } + }, +lex:function lex() { + var r = this.next(); + if (typeof r !== 'undefined') { + return r; + } else { + return this.lex(); + } + }, +begin:function begin(condition) { + this.conditionStack.push(condition); + }, +popState:function popState() { + return this.conditionStack.pop(); + }, +_currentRules:function _currentRules() { + return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules; + }, +topState:function () { + return this.conditionStack[this.conditionStack.length-2]; + }, +pushState:function begin(condition) { + this.begin(condition); + }}); +lexer.options = {}; +lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START +/**/) { + +var YYSTATE=YY_START +switch($avoiding_name_collisions) { +case 0:// ignore +break; +case 1:return 17 +break; +case 2:return 18 +break; +case 3:return 12 +break; +case 4:return 19 +break; +case 5:return 28 +break; +case 6:return 29 +break; +case 7:return 30 +break; +case 8:return 31 +break; +case 9:return 32 +break; +case 10:return 14 +break; +case 11:return 23 +break; +case 12:return 22 +break; +case 13:return 20 +break; +case 14:return 21 +break; +case 15:return 5 +break; +case 16:return "INVALID" +break; +} +}; +lexer.rules = [/^(?:\s+)/,/^(?:\()/,/^(?:\))/,/^(?:-?[0-9]+(\.[0-9]+)?([eE][\-\+]?[0-9]+)?)/,/^(?:POINT\b)/,/^(?:LINESTRING\b)/,/^(?:POLYGON\b)/,/^(?:MULTIPOINT\b)/,/^(?:MULTILINESTRING\b)/,/^(?:MULTIPOLYGON\b)/,/^(?:,)/,/^(?:EMPTY\b)/,/^(?:M\b)/,/^(?:Z\b)/,/^(?:ZM\b)/,/^(?:$)/,/^(?:.)/]; +lexer.conditions = {"INITIAL":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],"inclusive":true}}; +return lexer;})() +parser.lexer = lexer; +function Parser () { this.yy = {}; }Parser.prototype = parser;parser.Parser = Parser; +return new Parser; +})(); + + function PointArray (point) { + this.data = [ point ]; + this.type = 'PointArray'; + } + + PointArray.prototype.addPoint = function (point) { + if (point.type === 'PointArray') { + this.data = this.data.concat(point.data); + } else { + this.data.push(point); + } + + return this; + }; + + PointArray.prototype.toJSON = function () { + return this.data; + }; + + function Ring (point) { + this.data = point; + this.type = 'Ring'; + } + + Ring.prototype.toJSON = function () { + var data = [ ]; + + for (var i = 0; i < this.data.data.length; i++) { + data.push(this.data.data[i]); + } + + return data; + }; + + function RingList (ring) { + this.data = [ ring ]; + this.type = 'RingList'; + } + + RingList.prototype.addRing = function (ring) { + this.data.push(ring); + + return this; + }; + + RingList.prototype.toJSON = function () { + var data = [ ]; + + for (var i = 0; i < this.data.length; i++) { + data.push(this.data[i].toJSON()); + } + + if (data.length === 1) { + return data; + } else { + return data; + } + }; + + function PolygonList (polygon) { + this.data = [ polygon ]; + this.type = 'PolygonList'; + } + + PolygonList.prototype.addPolygon = function (polygon) { + this.data.push(polygon); + + return this; + }; + + PolygonList.prototype.toJSON = function () { + var data = [ ]; + + for (var i = 0; i < this.data.length; i++) { + data = data.concat( [ this.data[i].toJSON() ] ); + } + + return data; + }; + + function _parse () { + return parser.parse.apply(parser, arguments); + } + + function parse (element) { + var res, primitive; + + try { + res = parser.parse(element); + } catch (err) { + throw Error("Unable to parse: " + err); + } + + return Terraformer.Primitive(res); + } + + function arrayToRing (arr) { + var parts = [ ], ret = ''; + + for (var i = 0; i < arr.length; i++) { + parts.push(arr[i].join(' ')); + } + + ret += '(' + parts.join(', ') + ')'; + + return ret; + + } + + function pointToWKTPoint (primitive) { + var ret = 'POINT '; + + if (primitive.coordinates === undefined || primitive.coordinates.length === 0) { + ret += 'EMPTY'; + + return ret; + } else if (primitive.coordinates.length === 3) { + // 3d or time? default to 3d + if (primitive.properties && primitive.properties.m === true) { + ret += 'M '; + } else { + ret += 'Z '; + } + } else if (primitive.coordinates.length === 4) { + // 3d and time + ret += 'ZM '; + } + + // include coordinates + ret += '(' + primitive.coordinates.join(' ') + ')'; + + return ret; + } + + function lineStringToWKTLineString (primitive) { + var ret = 'LINESTRING '; + + if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) { + ret += 'EMPTY'; + + return ret; + } else if (primitive.coordinates[0].length === 3) { + if (primitive.properties && primitive.properties.m === true) { + ret += 'M '; + } else { + ret += 'Z '; + } + } else if (primitive.coordinates[0].length === 4) { + ret += 'ZM '; + } + + ret += arrayToRing(primitive.coordinates); + + return ret; + } + + function polygonToWKTPolygon (primitive) { + var ret = 'POLYGON '; + + if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) { + ret += 'EMPTY'; + + return ret; + } else if (primitive.coordinates[0][0].length === 3) { + if (primitive.properties && primitive.properties.m === true) { + ret += 'M '; + } else { + ret += 'Z '; + } + } else if (primitive.coordinates[0][0].length === 4) { + ret += 'ZM '; + } + + ret += '('; + var parts = [ ]; + for (var i = 0; i < primitive.coordinates.length; i++) { + parts.push(arrayToRing(primitive.coordinates[i])); + } + + ret += parts.join(', '); + ret += ')'; + + return ret; + } + + function multiPointToWKTMultiPoint (primitive) { + var ret = 'MULTIPOINT '; + + if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) { + ret += 'EMPTY'; + + return ret; + } else if (primitive.coordinates[0].length === 3) { + if (primitive.properties && primitive.properties.m === true) { + ret += 'M '; + } else { + ret += 'Z '; + } + } else if (primitive.coordinates[0].length === 4) { + ret += 'ZM '; + } + + ret += arrayToRing(primitive.coordinates); + + return ret; + } + + function multiLineStringToWKTMultiLineString (primitive) { + var ret = 'MULTILINESTRING '; + + if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) { + ret += 'EMPTY'; + + return ret; + } else if (primitive.coordinates[0][0].length === 3) { + if (primitive.properties && primitive.properties.m === true) { + ret += 'M '; + } else { + ret += 'Z '; + } + } else if (primitive.coordinates[0][0].length === 4) { + ret += 'ZM '; + } + + ret += '('; + var parts = [ ]; + for (var i = 0; i < primitive.coordinates.length; i++) { + parts.push(arrayToRing(primitive.coordinates[i])); + } + + ret += parts.join(', '); + ret += ')'; + + return ret; + } + + function multiPolygonToWKTMultiPolygon (primitive) { + var ret = 'MULTIPOLYGON '; + + if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) { + ret += 'EMPTY'; + + return ret; + } else if (primitive.coordinates[0][0][0].length === 3) { + if (primitive.properties && primitive.properties.m === true) { + ret += 'M '; + } else { + ret += 'Z '; + } + } else if (primitive.coordinates[0][0][0].length === 4) { + ret += 'ZM '; + } + + ret += '('; + var inner = [ ]; + for (var c = 0; c < primitive.coordinates.length; c++) { + var it = '('; + var parts = [ ]; + for (var i = 0; i < primitive.coordinates[c].length; i++) { + parts.push(arrayToRing(primitive.coordinates[c][i])); + } + + it += parts.join(', '); + it += ')'; + + inner.push(it); + } + + ret += inner.join(', '); + ret += ')'; + + return ret; + } + + function convert (primitive) { + switch (primitive.type) { + case 'Point': + return pointToWKTPoint(primitive); + case 'LineString': + return lineStringToWKTLineString(primitive); + case 'Polygon': + return polygonToWKTPolygon(primitive); + case 'MultiPoint': + return multiPointToWKTMultiPoint(primitive); + case 'MultiLineString': + return multiLineStringToWKTMultiLineString(primitive); + case 'MultiPolygon': + return multiPolygonToWKTMultiPolygon(primitive); + default: + throw Error ("Unknown Type: " + primitive.type); + } + } + + + + exports.parser = parser; + exports.Parser = parser.Parser; + exports.parse = parse; + exports.convert = convert; + + return exports; +})); diff --git a/node_modules/terraformer-wkt-parser/dist/terraformer-wkt-parser.min.js b/node_modules/terraformer-wkt-parser/dist/terraformer-wkt-parser.min.js new file mode 100644 index 0000000..8530ed4 --- /dev/null +++ b/node_modules/terraformer-wkt-parser/dist/terraformer-wkt-parser.min.js @@ -0,0 +1,4 @@ +/*! Terraformer JS - 1.1.1 - 2016-08-17 +* https://github.com/esri/terraformer-wkt-parser +* Copyright (c) 2016 Esri, Inc. +* Licensed MIT */!function(a,b){if("object"==typeof module&&"object"==typeof module.exports)exports=module.exports=b(require("terraformer"));else if("object"==typeof navigator){if(!a.Terraformer)throw new Error("Terraformer.WKT requires the core Terraformer library. http://github.com/esri/terraformer");a.Terraformer.WKT=b(a.Terraformer)}}(this,function(a){function b(a){this.data=[a],this.type="PointArray"}function c(a){this.data=a,this.type="Ring"}function d(a){this.data=[a],this.type="RingList"}function e(a){this.data=[a],this.type="PolygonList"}function f(b){var c;try{c=p.parse(b)}catch(d){throw Error("Unable to parse: "+d)}return a.Primitive(c)}function g(a){for(var b=[],c="",d=0;d2&&v.push("'"+this.terminals_[s]+"'");x=this.lexer.showPosition?"Parse error on line "+(i+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[n]||n)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==n?"end of input":"'"+(this.terminals_[n]||n)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[n]||n,line:this.lexer.yylineno,loc:l,expected:v})}}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+n);switch(q[0]){case 1:d.push(n),e.push(this.lexer.yytext),f.push(this.lexer.yylloc),d.push(q[1]),n=null,o?(n=o,o=null):(j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,l=this.lexer.yylloc,k>0&&k--);break;case 2:if(t=this.productions_[q[1]][1],w.$=e[e.length-t],w._$={first_line:f[f.length-(t||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(t||1)].first_column,last_column:f[f.length-1].last_column},m&&(w._$.range=[f[f.length-(t||1)].range[0],f[f.length-1].range[1]]),r=this.performAction.call(w,h,j,i,this.yy,q[1],e,f),"undefined"!=typeof r)return r;t&&(d=d.slice(0,-1*t*2),e=e.slice(0,-1*t),f=f.slice(0,-1*t)),d.push(this.productions_[q[1]][0]),e.push(w.$),f.push(w._$),u=g[d[d.length-2]][d[d.length-1]],d.push(u);break;case 3:return!0}}return!0}},g=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parser)throw new Error(a);this.yy.parser.parseError(a,b)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var b=a.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b-1),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this},more:function(){return this._more=!0,this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d,e;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),g=0;gb[0].length)||(b=c,d=g,this.options.flex));g++);return b?(e=b[0].match(/(?:\r\n?|\n).*/g),e&&(this.yylineno+=e.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:e?e[e.length-1].length-e[e.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,f[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a?a:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return"undefined"!=typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return a.options={},a.performAction=function(a,b,c,d){switch(c){case 0:break;case 1:return 17;case 2:return 18;case 3:return 12;case 4:return 19;case 5:return 28;case 6:return 29;case 7:return 30;case 8:return 31;case 9:return 32;case 10:return 14;case 11:return 23;case 12:return 22;case 13:return 20;case 14:return 21;case 15:return 5;case 16:return"INVALID"}},a.rules=[/^(?:\s+)/,/^(?:\()/,/^(?:\))/,/^(?:-?[0-9]+(\.[0-9]+)?([eE][\-\+]?[0-9]+)?)/,/^(?:POINT\b)/,/^(?:LINESTRING\b)/,/^(?:POLYGON\b)/,/^(?:MULTIPOINT\b)/,/^(?:MULTILINESTRING\b)/,/^(?:MULTIPOLYGON\b)/,/^(?:,)/,/^(?:EMPTY\b)/,/^(?:M\b)/,/^(?:Z\b)/,/^(?:ZM\b)/,/^(?:$)/,/^(?:.)/],a.conditions={INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],inclusive:!0}},a}();return f.lexer=g,a.prototype=f,f.Parser=a,new a}();return b.prototype.addPoint=function(a){return"PointArray"===a.type?this.data=this.data.concat(a.data):this.data.push(a),this},b.prototype.toJSON=function(){return this.data},c.prototype.toJSON=function(){for(var a=[],b=0;b=1.1.0 <2.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/sequelize" + ] + ], + "_from": "terraformer-wkt-parser@>=1.1.0 <2.0.0", + "_id": "terraformer-wkt-parser@1.1.2", + "_inCache": true, + "_location": "/terraformer-wkt-parser", + "_nodeVersion": "4.4.3", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/terraformer-wkt-parser-1.1.2.tgz_1471465880494_0.13407308142632246" + }, + "_npmUser": { + "name": "esri_dev", + "email": "dev_tools@esri.com" + }, + "_npmVersion": "2.15.1", + "_phantomChildren": {}, + "_requested": { + "raw": "terraformer-wkt-parser@^1.1.0", + "scope": null, + "escapedName": "terraformer-wkt-parser", + "name": "terraformer-wkt-parser", + "rawSpec": "^1.1.0", + "spec": ">=1.1.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/sequelize" + ], + "_resolved": "https://registry.npmjs.org/terraformer-wkt-parser/-/terraformer-wkt-parser-1.1.2.tgz", + "_shasum": "336a0c8fc82094a5aff83288f69aedecd369bf0c", + "_shrinkwrap": null, + "_spec": "terraformer-wkt-parser@^1.1.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/sequelize", + "author": { + "name": "Jerry Sievert", + "email": "code@legitimatesounding.com", + "url": "http://legitimatesounding.com" + }, + "bugs": { + "url": "https://github.com/Esri/terraformer-wkt-parser/issues" + }, + "contributors": [ + { + "name": "Patrick Arlt", + "email": "parlt@esri.com" + }, + { + "name": "John Gravois", + "email": "jgravois@esri.com" + } + ], + "dependencies": { + "terraformer": "~1.0.5" + }, + "description": "Well-Known Text parser", + "devDependencies": { + "grunt": "0.4.x", + "grunt-contrib-jasmine": "~0.4.2", + "grunt-contrib-uglify": "~0.2.2", + "grunt-jasmine-node": "~0.3.1", + "grunt-s3": "~0.2.0-alpha.3", + "grunt-template-jasmine-istanbul": "~0.2.4", + "grunt-vows": "~0.4.0", + "jison": "~0.3.12", + "mkdirp": "^0.5.1", + "typescript": "^1.8.10", + "typings": "^1.3.2", + "vows": "~0.7.0" + }, + "directories": { + "test": "test" + }, + "dist": { + "shasum": "336a0c8fc82094a5aff83288f69aedecd369bf0c", + "tarball": "https://registry.npmjs.org/terraformer-wkt-parser/-/terraformer-wkt-parser-1.1.2.tgz" + }, + "gitHead": "d0b00a3fc111ea1fe6c062b42cb0b51ee23c5070", + "homepage": "http://terraformer.io", + "keywords": [ + "WKT", + "GIS", + "Geography" + ], + "license": "MIT", + "main": "terraformer-wkt-parser.js", + "maintainers": [ + { + "name": "esri_dev", + "email": "dev_tools@esri.com" + } + ], + "name": "terraformer-wkt-parser", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/Esri/terraformer-wkt-parser.git" + }, + "scripts": { + "pretest": "mkdirp dist", + "test": "grunt test", + "test:ts": "typings install && tsc" + }, + "version": "1.1.2" +} diff --git a/node_modules/terraformer-wkt-parser/spec/wktSpec.js b/node_modules/terraformer-wkt-parser/spec/wktSpec.js new file mode 100644 index 0000000..22c262f --- /dev/null +++ b/node_modules/terraformer-wkt-parser/spec/wktSpec.js @@ -0,0 +1,718 @@ +if(typeof module === "object"){ + var Terraformer = require("terraformer"); + Terraformer.WKT = require("../dist/terraformer-wkt-parser"); +} + +beforeEach(function() { + this.addMatchers({ + toBeInstanceOfClass: function(classRef){ + return this.actual instanceof classRef; + } + }); +}); + +describe("WKT Convert", function () { + + it("should convert a POINT", function () { + var input = { + type: "Point", + coordinates: [ 30, 10 ] + }; + + var output = Terraformer.WKT.convert(input); + + expect(output).toEqual("POINT (30 10)"); + }); + + it("should convert a POINT with Z", function () { + var input = { + type: "Point", + coordinates: [ 30, 10, 10 ] + }; + + var output = Terraformer.WKT.convert(input); + + expect(output).toEqual("POINT Z (30 10 10)"); + }); + + it("should convert a POINT with M (nonstandard)", function () { + var input = { + properties: { m: true }, + type: "Point", + coordinates: [ 30, 10, 10 ] + }; + + var output = Terraformer.WKT.convert(input); + + expect(output).toEqual("POINT M (30 10 10)"); + }); + + it("should convert a POINT with Z and M", function () { + var input = { + type: "Point", + coordinates: [ 30, 10, 10, 12 ] + }; + + var output = Terraformer.WKT.convert(input); + + expect(output).toEqual("POINT ZM (30 10 10 12)"); + }); + + it("should convert an empty POINT", function () { + var input = { + type: "Point", + coordinates: [ ] + }; + + var output = Terraformer.WKT.convert(input); + + expect(output).toEqual("POINT EMPTY"); + }); + + it("should convert a POLYGON", function () { + var input = { + type: "Polygon", + coordinates: [ [ [ 30, 10 ], [ 20, 20 ], [ 30, 20 ] ] ] + }; + + var output = Terraformer.WKT.convert(input); + + expect(output).toEqual("POLYGON ((30 10, 20 20, 30 20))"); + }); + + it("should convert a POLYGON with Z", function () { + var input = { + type: "Polygon", + coordinates: [ [ [ 30, 10, 1 ], [ 20, 20, 2 ], [ 30, 20, 3 ] ] ] + }; + + var output = Terraformer.WKT.convert(input); + + expect(output).toEqual("POLYGON Z ((30 10 1, 20 20 2, 30 20 3))"); + }); + + it("should convert a POLYGON with ZM", function () { + var input = { + type: "Polygon", + coordinates: [ [ [ 30, 10, 1, 3 ], [ 20, 20, 2, 2 ], [ 30, 20, 3, 1 ] ] ] + }; + + var output = Terraformer.WKT.convert(input); + + expect(output).toEqual("POLYGON ZM ((30 10 1 3, 20 20 2 2, 30 20 3 1))"); + }); + + it("should convert a POLYGON with M (nonstandard)", function () { + var input = { + properties: { m: true }, + type: "Polygon", + coordinates: [ [ [ 30, 10, 1 ], [ 20, 20, 2 ], [ 30, 20, 3 ] ] ] + }; + + var output = Terraformer.WKT.convert(input); + + expect(output).toEqual("POLYGON M ((30 10 1, 20 20 2, 30 20 3))"); + }); + + it("should convert an EMPTY POLYGON", function () { + var input = { + type: "Polygon", + coordinates: [ ] + }; + + var output = Terraformer.WKT.convert(input); + + expect(output).toEqual("POLYGON EMPTY"); + }); + + it("should convert a MULTIPOINT", function () { + var input = { + type: "MultiPoint", + coordinates: [ [ 30, 10 ], [ 20, 20 ], [ 30, 20 ] ] + }; + + var output = Terraformer.WKT.convert(input); + + expect(output).toEqual("MULTIPOINT (30 10, 20 20, 30 20)"); + }); + + it("should convert a MULTIPOINT with Z", function () { + var input = { + type: "MultiPoint", + coordinates: [ [ 30, 10, 1 ], [ 20, 20, 2 ], [ 30, 20, 3 ] ] + }; + + var output = Terraformer.WKT.convert(input); + + expect(output).toEqual("MULTIPOINT Z (30 10 1, 20 20 2, 30 20 3)"); + }); + + it("should convert a MULTIPOINT with ZM", function () { + var input = { + type: "MultiPoint", + coordinates: [ [ 30, 10, 1, 2 ], [ 20, 20, 3, 4 ], [ 30, 20, 5, 6 ] ] + }; + + var output = Terraformer.WKT.convert(input); + + expect(output).toEqual("MULTIPOINT ZM (30 10 1 2, 20 20 3 4, 30 20 5 6)"); + }); + + it("should convert a MULTIPOINT with M (nonstandard)", function () { + var input = { + properties: { m: true }, + type: "MultiPoint", + coordinates: [ [ 30, 10, 1 ], [ 20, 20, 2 ], [ 30, 20, 3 ] ] + }; + + var output = Terraformer.WKT.convert(input); + + expect(output).toEqual("MULTIPOINT M (30 10 1, 20 20 2, 30 20 3)"); + }); + + it("should convert an EMPTY MULTIPOINT", function () { + var input = { + type: "MultiPoint", + coordinates: [ ] + }; + + var output = Terraformer.WKT.convert(input); + + expect(output).toEqual("MULTIPOINT EMPTY"); + }); + + it("should convert a LINESTRING with Z", function () { + var input = { + type: "LineString", + coordinates: [ [ 30, 10, 2 ], [ 20, 20, 1 ], [ 30, 20, 0 ] ] + }; + + var output = Terraformer.WKT.convert(input); + + expect(output).toEqual("LINESTRING Z (30 10 2, 20 20 1, 30 20 0)"); + }); + + it("should convert a LINESTRING with ZM", function () { + var input = { + type: "LineString", + coordinates: [ [ 30, 10, 1, 2 ], [ 20, 20, 3, 4 ], [ 30, 20, 5, 6 ] ] + }; + + var output = Terraformer.WKT.convert(input); + + expect(output).toEqual("LINESTRING ZM (30 10 1 2, 20 20 3 4, 30 20 5 6)"); + }); + + it("should convert a LINESTRING with M (nonstandard)", function () { + var input = { + properties: { m: true }, + type: "LineString", + coordinates: [ [ 30, 10, 1 ], [ 20, 20, 2 ], [ 30, 20, 3 ] ] + }; + + var output = Terraformer.WKT.convert(input); + + expect(output).toEqual("LINESTRING M (30 10 1, 20 20 2, 30 20 3)"); + }); + + it("should convert an EMPTY LINESTRING", function () { + var input = { + type: "LineString", + coordinates: [ ] + }; + + var output = Terraformer.WKT.convert(input); + + expect(output).toEqual("LINESTRING EMPTY"); + }); + + it("should convert a LINESTRING", function () { + var input = { + type: "LineString", + coordinates: [ [ 30, 10 ], [ 20, 20 ], [ 30, 20 ] ] + }; + + var output = Terraformer.WKT.convert(input); + + expect(output).toEqual("LINESTRING (30 10, 20 20, 30 20)"); + }); + + it("should convert a MULTILINESTRING", function () { + var input = { + type: "MultiLineString", + coordinates: [ [ [ 30, 10 ], [ 20, 20 ], [ 30, 20 ] ] ] + }; + + var output = Terraformer.WKT.convert(input); + + expect(output).toEqual("MULTILINESTRING ((30 10, 20 20, 30 20))"); + }); + + it("should convert a MULTILINESTRING with Z", function () { + var input = { + type: "MultiLineString", + coordinates: [ [ [ 30, 10, 1 ], [ 20, 20, 2 ], [ 30, 20, 3 ] ] ] + }; + + var output = Terraformer.WKT.convert(input); + + expect(output).toEqual("MULTILINESTRING Z ((30 10 1, 20 20 2, 30 20 3))"); + }); + + it("should convert a MULTILINESTRING with Z and M", function () { + var input = { + type: "MultiLineString", + coordinates: [ [ [ 30, 10, 1, 2 ], [ 20, 20, 3, 4 ], [ 30, 20, 5, 6 ] ] ] + }; + + var output = Terraformer.WKT.convert(input); + + expect(output).toEqual("MULTILINESTRING ZM ((30 10 1 2, 20 20 3 4, 30 20 5 6))"); + }); + + it("should convert a MULTILINESTRING with M (nonstandard)", function () { + var input = { + properties: { m: true }, + type: "MultiLineString", + coordinates: [ [ [ 30, 10, 1 ], [ 20, 20, 2 ], [ 30, 20, 3 ] ] ] + }; + + var output = Terraformer.WKT.convert(input); + + expect(output).toEqual("MULTILINESTRING M ((30 10 1, 20 20 2, 30 20 3))"); + }); + + it("should convert an EMPTY MULTILINESTRING", function () { + var input = { + type: "MultiLineString", + coordinates: [ ] + }; + + var output = Terraformer.WKT.convert(input); + + expect(output).toEqual("MULTILINESTRING EMPTY"); + }); + + it("should convert a MULTIPOLYGON", function () { + var input = { "type": "MultiPolygon", + "coordinates": [ + [[[102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0]]], + [[[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]], + [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]]] + ] + }; + var output = Terraformer.WKT.convert(input); + expect(output).toEqual("MULTIPOLYGON (((102 2, 103 2, 103 3, 102 3, 102 2)), ((100 0, 101 0, 101 1, 100 1, 100 0), (100.2 0.2, 100.8 0.2, 100.8 0.8, 100.2 0.8, 100.2 0.2)))"); + }); + + it("should convert a MULTIPOLYGON with Z", function () { + var input = { "type": "MultiPolygon", + "coordinates": [ + [[[102.0, 2.0, 1], [103.0, 2.0, 2], [103.0, 3.0, 3], [102.0, 3.0, 4], [102.0, 2.0, 5]]], + [[[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]], + [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]]] + ] + }; + var output = Terraformer.WKT.convert(input); + expect(output).toEqual("MULTIPOLYGON Z (((102 2 1, 103 2 2, 103 3 3, 102 3 4, 102 2 5)), ((100 0, 101 0, 101 1, 100 1, 100 0), (100.2 0.2, 100.8 0.2, 100.8 0.8, 100.2 0.8, 100.2 0.2)))"); + }); + + it("should convert a MULTIPOLYGON with Z and M", function () { + var input = { "type": "MultiPolygon", + "coordinates": [ + [[[102.0, 2.0, 1, 2], [103.0, 2.0, 3, 4], [103.0, 3.0, 5, 6], [102.0, 3.0, 7, 8], [102.0, 2.0, 9, 10]]], + [[[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]], + [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]]] + ] + }; + var output = Terraformer.WKT.convert(input); + expect(output).toEqual("MULTIPOLYGON ZM (((102 2 1 2, 103 2 3 4, 103 3 5 6, 102 3 7 8, 102 2 9 10)), ((100 0, 101 0, 101 1, 100 1, 100 0), (100.2 0.2, 100.8 0.2, 100.8 0.8, 100.2 0.8, 100.2 0.2)))"); + }); + + it("should convert a MULTIPOLYGON with M (nonstandard)", function () { + var input = { "type": "MultiPolygon", + properties: { m: true }, + "coordinates": [ + [[[102.0, 2.0, 1], [103.0, 2.0, 2], [103.0, 3.0, 3], [102.0, 3.0, 4], [102.0, 2.0, 5]]], + [[[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]], + [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]]] + ] + }; + var output = Terraformer.WKT.convert(input); + expect(output).toEqual("MULTIPOLYGON M (((102 2 1, 103 2 2, 103 3 3, 102 3 4, 102 2 5)), ((100 0, 101 0, 101 1, 100 1, 100 0), (100.2 0.2, 100.8 0.2, 100.8 0.8, 100.2 0.8, 100.2 0.2)))"); + }); + + it("should convert an EMPTY MULTIPOLYGON", function () { + var input = { "type": "MultiPolygon", + "coordinates": [ ] + }; + var output = Terraformer.WKT.convert(input); + expect(output).toEqual("MULTIPOLYGON EMPTY"); + }); + + it("should fail a conversion on an unknown type", function () { + var input = { "type": "MultiPolygonLikeThingy", + "coordinates": [ ] + }; + var error; + try { + var output = Terraformer.WKT.convert(input); + } catch (err) { + error = err.toString(); + } + expect(error).toEqual("Error: Unknown Type: MultiPolygonLikeThingy"); + }); + +}); + + +describe("WKT Parser", function() { + + it("should parse a POINT", function(){ + var input = "POINT (30 10)"; + var output = new Terraformer.WKT.parse(input); + expect(output.coordinates).toEqual([30,10]); + expect(output).toBeInstanceOfClass(Terraformer.Point); + expect(output.type).toEqual("Point"); + }); + + it("should parse an EMPTY POINT", function(){ + var input = "POINT EMPTY"; + var output = new Terraformer.WKT.parse(input); + expect(output.coordinates).toEqual([ ]); + expect(output).toBeInstanceOfClass(Terraformer.Point); + expect(output.type).toEqual("Point"); + }); + + it("should parse a POINT with a Z coordinate", function(){ + var input = "POINT Z (30 10 20)"; + var output = new Terraformer.WKT.parse(input); + expect(output.coordinates).toEqual([30,10,20]); + expect(output).toBeInstanceOfClass(Terraformer.Point); + expect(output.type).toEqual("Point"); + }); + + it("should parse a POINT with a M coordinate", function(){ + var input = "POINT M (30 10 20)"; + var output = new Terraformer.WKT.parse(input); + expect(output.coordinates).toEqual([30,10,20]); + expect(output).toBeInstanceOfClass(Terraformer.Point); + expect(output.type).toEqual("Point"); + }); + + it("should parse a POINT with Z and M coordinates", function(){ + var input = "POINT ZM (30 10 20 15)"; + var output = new Terraformer.WKT.parse(input); + expect(output.coordinates).toEqual([30,10,20,15]); + expect(output).toBeInstanceOfClass(Terraformer.Point); + expect(output.type).toEqual("Point"); + }); + + it("should parse a POINT with scientific notation coordinates", function(){ + var input = "POINT (30e0 10 2.0E+001 15)"; + var output = new Terraformer.WKT.parse(input); + expect(output.coordinates).toEqual([30,10,20,15]); + expect(output).toBeInstanceOfClass(Terraformer.Point); + expect(output.type).toEqual("Point"); + }); + + it("should parse a LINESTRING", function(){ + var input = "LINESTRING (30 10, 10 30, 40 40)"; + var output = new Terraformer.WKT.parse(input); + expect(output.coordinates).toEqual([ [30,10], [10,30], [40,40] ]); + expect(output).toBeInstanceOfClass(Terraformer.LineString); + expect(output.type).toEqual("LineString"); + }); + + it("should parse an EMPTY LINESTRING", function(){ + var input = "LINESTRING EMPTY"; + var output = new Terraformer.WKT.parse(input); + expect(output.coordinates).toEqual([ ]); + expect(output).toBeInstanceOfClass(Terraformer.LineString); + expect(output.type).toEqual("LineString"); + }); + + it("should parse a LINESTRING with a Z coordinate", function(){ + var input = "LINESTRING Z (30 10 5, 10 30 15, 40 40 25)"; + var output = new Terraformer.WKT.parse(input); + expect(output.coordinates).toEqual([ [30,10,5], [10,30,15], [40,40,25] ]); + expect(output).toBeInstanceOfClass(Terraformer.LineString); + expect(output.type).toEqual("LineString"); + }); + + it("should parse a LINESTRING with a M coordinate", function(){ + var input = "LINESTRING M (30 10 5, 10 30 15, 40 40 25)"; + var output = new Terraformer.WKT.parse(input); + expect(output.coordinates).toEqual([ [30,10,5], [10,30,15], [40,40,25] ]); + expect(output).toBeInstanceOfClass(Terraformer.LineString); + expect(output.type).toEqual("LineString"); + }); + + it("should parse a LINESTRING with Z and M coordinates", function(){ + var input = "LINESTRING ZM (30 10 5 2, 10 30 15 8, 40 40 25 16)"; + var output = new Terraformer.WKT.parse(input); + expect(output.coordinates).toEqual([ [30,10,5,2], [10,30,15,8], [40,40,25,16] ]); + expect(output).toBeInstanceOfClass(Terraformer.LineString); + expect(output.type).toEqual("LineString"); + }); + + it("should parse a POLYGON", function(){ + var input = "POLYGON ((30 10, 10 20, 20 40, 40 40, 30 10))"; + var output = new Terraformer.WKT.parse(input); + expect(output.coordinates).toEqual([ [ [30, 10], [10, 20], [20, 40], [40, 40], [30, 10] ] ]); + expect(output).toBeInstanceOfClass(Terraformer.Polygon); + expect(output.type).toEqual("Polygon"); + }); + + it("should parse an EMPTY POLYGON", function(){ + var input = "POLYGON EMPTY"; + var output = new Terraformer.WKT.parse(input); + expect(output.coordinates).toEqual([ ]); + expect(output).toBeInstanceOfClass(Terraformer.Polygon); + expect(output.type).toEqual("Polygon"); + }); + + it("should parse a POLYGON with a Z coordinate", function(){ + var input = "POLYGON Z ((30 10 4, 10 20 6, 20 40 8, 40 40 1, 30 10 3))"; + var output = new Terraformer.WKT.parse(input); + expect(output.coordinates).toEqual([ [ [30, 10, 4], [10, 20, 6], [20, 40, 8], [40, 40, 1], [30, 10, 3] ] ]); + expect(output).toBeInstanceOfClass(Terraformer.Polygon); + expect(output.type).toEqual("Polygon"); + }); + + it("should parse a POLYGON with a M coordinate", function(){ + var input = "POLYGON M ((30 10 4, 10 20 6, 20 40 8, 40 40 1, 30 10 3))"; + var output = new Terraformer.WKT.parse(input); + expect(output.coordinates).toEqual([ [ [30, 10, 4], [10, 20, 6], [20, 40, 8], [40, 40, 1], [30, 10, 3] ] ]); + expect(output).toBeInstanceOfClass(Terraformer.Polygon); + expect(output.type).toEqual("Polygon"); + }); + + it("should parse a POLYGON with Z and M coordinates", function(){ + var input = "POLYGON ZM ((30 10 4 1, 10 20 6 3, 20 40 8 5, 40 40 1 7, 30 10 3 9))"; + var output = new Terraformer.WKT.parse(input); + expect(output.coordinates).toEqual([ [ [30, 10, 4, 1], [10, 20, 6, 3], [20, 40, 8, 5], [40, 40, 1, 7], [30, 10, 3, 9] ] ]); + expect(output).toBeInstanceOfClass(Terraformer.Polygon); + expect(output.type).toEqual("Polygon"); + }); + + it("should parse a POLYGON with a hole", function(){ + var input = "POLYGON ((35 10, 10 20, 15 40, 45 45, 35 10),(20 30, 35 35, 30 20, 20 30))"; + var output = new Terraformer.WKT.parse(input); + expect(output.coordinates).toEqual([ + [ [35, 10],[10, 20],[15, 40],[45, 45],[35, 10] ], + [ [20, 30],[35, 35],[30, 20],[20, 30] ] + ]); + expect(output).toBeInstanceOfClass(Terraformer.Polygon); + expect(output.type).toEqual("Polygon"); + }); + + it("should parse a MULTIPOINT", function(){ + var input = "MULTIPOINT ((10 40), (40 30), (20 20), (30 10))"; + var output = new Terraformer.WKT.parse(input); + expect(output.coordinates).toEqual([ [10, 40],[40, 30], [20,20], [30,10] ]); + expect(output).toBeInstanceOfClass(Terraformer.MultiPoint); + expect(output.type).toEqual("MultiPoint"); + }); + + it("should parse an EMPTY MULTIPOINT", function(){ + var input = "MULTIPOINT EMPTY"; + var output = new Terraformer.WKT.parse(input); + expect(output.coordinates).toEqual([ ]); + expect(output).toBeInstanceOfClass(Terraformer.MultiPoint); + expect(output.type).toEqual("MultiPoint"); + }); + + it("should parse a MULTIPOINT with a Z coordinate", function(){ + var input = "MULTIPOINT Z ((10 40 1), (40 30 2), (20 20 3), (30 10 4))"; + var output = new Terraformer.WKT.parse(input); + expect(output.coordinates).toEqual([ [10, 40, 1],[40, 30, 2], [20, 20, 3], [30, 10, 4] ]); + expect(output).toBeInstanceOfClass(Terraformer.MultiPoint); + expect(output.type).toEqual("MultiPoint"); + }); + + it("should parse a MULTIPOINT with a M coordinate", function(){ + var input = "MULTIPOINT M ((10 40 1), (40 30 2), (20 20 3), (30 10 4))"; + var output = new Terraformer.WKT.parse(input); + expect(output.coordinates).toEqual([ [10, 40, 1],[40, 30, 2], [20, 20, 3], [30, 10, 4] ]); + expect(output).toBeInstanceOfClass(Terraformer.MultiPoint); + expect(output.type).toEqual("MultiPoint"); + }); + + it("should parse a MULTIPOINT with Z and M coordinates", function(){ + var input = "MULTIPOINT ZM ((10 40 1 8), (40 30 2 9), (20 20 3 8), (30 10 4 9))"; + var output = new Terraformer.WKT.parse(input); + expect(output.coordinates).toEqual([ [10, 40, 1, 8],[40, 30, 2, 9], [20, 20, 3, 8], [30, 10, 4, 9] ]); + expect(output).toBeInstanceOfClass(Terraformer.MultiPoint); + expect(output.type).toEqual("MultiPoint"); + }); + + it("should parse a MULTIPOINT with alternate syntax", function(){ + var input = "MULTIPOINT (10 40, 40 30, 20 20, 30 10)"; + var output = new Terraformer.WKT.parse(input); + expect(output.coordinates).toEqual([ [10, 40],[40, 30], [20,20], [30,10] ]); + expect(output).toBeInstanceOfClass(Terraformer.MultiPoint); + expect(output.type).toEqual("MultiPoint"); + }); + + it("should parse a MULTIPOINT with alternate syntax and Z coordinates", function(){ + var input = "MULTIPOINT Z (10 40 1, 40 30 2, 20 20 3, 30 10 4)"; + var output = new Terraformer.WKT.parse(input); + expect(output.coordinates).toEqual([ [10, 40, 1],[40, 30, 2], [20, 20, 3], [30, 10, 4] ]); + expect(output).toBeInstanceOfClass(Terraformer.MultiPoint); + expect(output.type).toEqual("MultiPoint"); + }); + + it("should parse a MULTIPOINT with alternate syntax and M coordinates", function(){ + var input = "MULTIPOINT M (10 40 1, 40 30 2, 20 20 3, 30 10 4)"; + var output = new Terraformer.WKT.parse(input); + expect(output.coordinates).toEqual([ [10, 40, 1],[40, 30, 2], [20, 20, 3], [30, 10, 4] ]); + expect(output).toBeInstanceOfClass(Terraformer.MultiPoint); + expect(output.type).toEqual("MultiPoint"); + }); + + it("should parse a MULTIPOINT with alternate syntax and Z and M coordinates", function(){ + var input = "MULTIPOINT ZM (10 40 1 2, 40 30 2 3, 20 20 3 4, 30 10 4 5)"; + var output = new Terraformer.WKT.parse(input); + expect(output.coordinates).toEqual([ [10, 40, 1, 2],[40, 30, 2, 3], [20, 20, 3, 4], [30, 10, 4, 5] ]); + expect(output).toBeInstanceOfClass(Terraformer.MultiPoint); + expect(output.type).toEqual("MultiPoint"); + }); + + it("should parse a MULTILINESTRING with alternate syntax", function(){ + var input = "MULTILINESTRING ((10 10, 20 20, 10 40),(40 40, 30 30, 40 20, 30 10))"; + var output = new Terraformer.WKT.parse(input); + expect(output.coordinates).toEqual([ + [ [10,10],[20,20],[10,40] ], + [ [40,40],[30,30],[40,20],[30,10] ] + ]); + expect(output).toBeInstanceOfClass(Terraformer.MultiLineString); + expect(output.type).toEqual("MultiLineString"); + }); + + it("should parse an EMPTY MULTILINESTRING", function(){ + var input = "MULTILINESTRING EMPTY"; + var output = new Terraformer.WKT.parse(input); + expect(output.coordinates).toEqual([ ]); + expect(output).toBeInstanceOfClass(Terraformer.MultiLineString); + expect(output.type).toEqual("MultiLineString"); + }); + + it("should parse a MULTILINESTRING with alternate syntax and Z coordinates", function(){ + var input = "MULTILINESTRING Z ((10 10 10, 20 20 20, 10 40 30),(40 40 30, 30 30 20, 40 20 10, 30 10 10))"; + var output = new Terraformer.WKT.parse(input); + expect(output.coordinates).toEqual([ + [ [10,10,10],[20,20,20],[10,40,30] ], + [ [40,40,30],[30,30,20],[40,20,10],[30,10,10] ] + ]); + expect(output).toBeInstanceOfClass(Terraformer.MultiLineString); + expect(output.type).toEqual("MultiLineString"); + }); + + it("should parse a MULTILINESTRING with alternate syntax and M coordinates", function(){ + var input = "MULTILINESTRING M ((10 10 10, 20 20 20, 10 40 30),(40 40 30, 30 30 20, 40 20 10, 30 10 10))"; + var output = new Terraformer.WKT.parse(input); + expect(output.coordinates).toEqual([ + [ [10,10,10],[20,20,20],[10,40,30] ], + [ [40,40,30],[30,30,20],[40,20,10],[30,10,10] ] + ]); + expect(output).toBeInstanceOfClass(Terraformer.MultiLineString); + expect(output.type).toEqual("MultiLineString"); + }); + + it("should parse a MULTILINESTRING with alternate syntax and Z and M coordinates", function(){ + var input = "MULTILINESTRING ZM ((10 10 10 5, 20 20 20 4, 10 40 30 3),(40 40 30 2, 30 30 20 1, 40 20 10 2, 30 10 10 3))"; + var output = new Terraformer.WKT.parse(input); + expect(output.coordinates).toEqual([ + [ [10,10,10,5],[20,20,20,4],[10,40,30,3] ], + [ [40,40,30,2],[30,30,20,1],[40,20,10,2],[30,10,10,3] ] + ]); + expect(output).toBeInstanceOfClass(Terraformer.MultiLineString); + expect(output.type).toEqual("MultiLineString"); + }); + + it("should parse a MULTIPOLYGON", function(){ + var input = "MULTIPOLYGON (((30 20, 10 40, 45 40, 30 20)),((15 5, 40 10, 10 20, 5 10, 15 5)))"; + var output = new Terraformer.WKT.parse(input); + expect(output.coordinates).toEqual([ + [ + [ [30,20],[10,40],[45,40],[30,20] ] + ], + [ + [ [15,5],[40,10],[10,20],[5,10],[15,5] ] + ] + ]); + expect(output).toBeInstanceOfClass(Terraformer.MultiPolygon); + expect(output.type).toEqual("MultiPolygon"); + }); + + it("should parse an EMPTY MULTIPOLYGON", function(){ + var input = "MULTIPOLYGON EMPTY"; + var output = new Terraformer.WKT.parse(input); + expect(output.coordinates).toEqual([ ]); + expect(output).toBeInstanceOfClass(Terraformer.MultiPolygon); + expect(output.type).toEqual("MultiPolygon"); + }); + + it("should parse a MULTIPOLYGON with a Z coordinate", function(){ + var input = "MULTIPOLYGON Z (((30 20 1, 10 40 2, 45 40 3, 30 20 4)),((15 5, 40 10, 10 20, 5 10, 15 5)))"; + var output = new Terraformer.WKT.parse(input); + expect(output.coordinates).toEqual([ + [ + [ [30,20,1],[10,40,2],[45,40,3],[30,20,4] ] + ], + [ + [ [15,5],[40,10],[10,20],[5,10],[15,5] ] + ] + ]); + expect(output).toBeInstanceOfClass(Terraformer.MultiPolygon); + expect(output.type).toEqual("MultiPolygon"); + }); + + it("should parse a MULTIPOLYGON with a M coordinate", function(){ + var input = "MULTIPOLYGON M (((30 20 1, 10 40 2, 45 40 3, 30 20 4)),((15 5, 40 10, 10 20, 5 10, 15 5)))"; + var output = new Terraformer.WKT.parse(input); + expect(output.coordinates).toEqual([ + [ + [ [30,20,1],[10,40,2],[45,40,3],[30,20,4] ] + ], + [ + [ [15,5],[40,10],[10,20],[5,10],[15,5] ] + ] + ]); + expect(output).toBeInstanceOfClass(Terraformer.MultiPolygon); + expect(output.type).toEqual("MultiPolygon"); + }); + + it("should parse a MULTIPOLYGON with Z and M coordinates", function(){ + var input = "MULTIPOLYGON ZM (((30 20 1 0, 10 40 2 1, 45 40 3 2, 30 20 4 3)),((15 5, 40 10, 10 20, 5 10, 15 5)))"; + var output = new Terraformer.WKT.parse(input); + expect(output.coordinates).toEqual([ + [ + [ [30,20,1,0],[10,40,2,1],[45,40,3,2],[30,20,4,3] ] + ], + [ + [ [15,5],[40,10],[10,20],[5,10],[15,5] ] + ] + ]); + expect(output).toBeInstanceOfClass(Terraformer.MultiPolygon); + expect(output.type).toEqual("MultiPolygon"); + }); + + it("should parse a MULTIPOLYGON with a hole", function(){ + var input = "MULTIPOLYGON (((40 40, 20 45, 45 30, 40 40)),((20 35, 45 20, 30 5, 10 10, 10 30, 20 35),(30 20, 20 25, 20 15, 30 20)))"; + var output = new Terraformer.WKT.parse(input); + expect(output.coordinates).toEqual([ + [ + [ [40,40], [20,45], [45,30], [40,40] ] + ], + [ + [ [20,35],[45,20],[30,5] ,[10,10],[10,30],[20,35] ], + [ [30,20], [20,25], [20,15],[30,20] ] + ] + ]); + expect(output).toBeInstanceOfClass(Terraformer.MultiPolygon); + expect(output.type).toEqual("MultiPolygon"); + }); + +}); diff --git a/node_modules/terraformer-wkt-parser/src/module-source.js b/node_modules/terraformer-wkt-parser/src/module-source.js new file mode 100644 index 0000000..5182d87 --- /dev/null +++ b/node_modules/terraformer-wkt-parser/src/module-source.js @@ -0,0 +1,320 @@ +(function (root, factory) { + + // Node. + if(typeof module === 'object' && typeof module.exports === 'object') { + exports = module.exports = factory(require("terraformer")); + } else if(typeof navigator === "object") { + // Browser Global. + if (!root.Terraformer){ + throw new Error("Terraformer.WKT requires the core Terraformer library. http://github.com/esri/terraformer") + } + root.Terraformer.WKT = factory(root.Terraformer); + } + +}(this, function(Terraformer) { + var exports = { }; + + "SOURCE"; + + function PointArray (point) { + this.data = [ point ]; + this.type = 'PointArray'; + } + + PointArray.prototype.addPoint = function (point) { + if (point.type === 'PointArray') { + this.data = this.data.concat(point.data); + } else { + this.data.push(point); + } + + return this; + }; + + PointArray.prototype.toJSON = function () { + return this.data; + }; + + function Ring (point) { + this.data = point; + this.type = 'Ring'; + } + + Ring.prototype.toJSON = function () { + var data = [ ]; + + for (var i = 0; i < this.data.data.length; i++) { + data.push(this.data.data[i]); + } + + return data; + }; + + function RingList (ring) { + this.data = [ ring ]; + this.type = 'RingList'; + } + + RingList.prototype.addRing = function (ring) { + this.data.push(ring); + + return this; + }; + + RingList.prototype.toJSON = function () { + var data = [ ]; + + for (var i = 0; i < this.data.length; i++) { + data.push(this.data[i].toJSON()); + } + + if (data.length === 1) { + return data; + } else { + return data; + } + }; + + function PolygonList (polygon) { + this.data = [ polygon ]; + this.type = 'PolygonList'; + } + + PolygonList.prototype.addPolygon = function (polygon) { + this.data.push(polygon); + + return this; + }; + + PolygonList.prototype.toJSON = function () { + var data = [ ]; + + for (var i = 0; i < this.data.length; i++) { + data = data.concat( [ this.data[i].toJSON() ] ); + } + + return data; + }; + + function _parse () { + return parser.parse.apply(parser, arguments); + } + + function parse (element) { + var res, primitive; + + try { + res = parser.parse(element); + } catch (err) { + throw Error("Unable to parse: " + err); + } + + return Terraformer.Primitive(res); + } + + function arrayToRing (arr) { + var parts = [ ], ret = ''; + + for (var i = 0; i < arr.length; i++) { + parts.push(arr[i].join(' ')); + } + + ret += '(' + parts.join(', ') + ')'; + + return ret; + + } + + function pointToWKTPoint (primitive) { + var ret = 'POINT '; + + if (primitive.coordinates === undefined || primitive.coordinates.length === 0) { + ret += 'EMPTY'; + + return ret; + } else if (primitive.coordinates.length === 3) { + // 3d or time? default to 3d + if (primitive.properties && primitive.properties.m === true) { + ret += 'M '; + } else { + ret += 'Z '; + } + } else if (primitive.coordinates.length === 4) { + // 3d and time + ret += 'ZM '; + } + + // include coordinates + ret += '(' + primitive.coordinates.join(' ') + ')'; + + return ret; + } + + function lineStringToWKTLineString (primitive) { + var ret = 'LINESTRING '; + + if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) { + ret += 'EMPTY'; + + return ret; + } else if (primitive.coordinates[0].length === 3) { + if (primitive.properties && primitive.properties.m === true) { + ret += 'M '; + } else { + ret += 'Z '; + } + } else if (primitive.coordinates[0].length === 4) { + ret += 'ZM '; + } + + ret += arrayToRing(primitive.coordinates); + + return ret; + } + + function polygonToWKTPolygon (primitive) { + var ret = 'POLYGON '; + + if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) { + ret += 'EMPTY'; + + return ret; + } else if (primitive.coordinates[0][0].length === 3) { + if (primitive.properties && primitive.properties.m === true) { + ret += 'M '; + } else { + ret += 'Z '; + } + } else if (primitive.coordinates[0][0].length === 4) { + ret += 'ZM '; + } + + ret += '('; + var parts = [ ]; + for (var i = 0; i < primitive.coordinates.length; i++) { + parts.push(arrayToRing(primitive.coordinates[i])); + } + + ret += parts.join(', '); + ret += ')'; + + return ret; + } + + function multiPointToWKTMultiPoint (primitive) { + var ret = 'MULTIPOINT '; + + if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) { + ret += 'EMPTY'; + + return ret; + } else if (primitive.coordinates[0].length === 3) { + if (primitive.properties && primitive.properties.m === true) { + ret += 'M '; + } else { + ret += 'Z '; + } + } else if (primitive.coordinates[0].length === 4) { + ret += 'ZM '; + } + + ret += arrayToRing(primitive.coordinates); + + return ret; + } + + function multiLineStringToWKTMultiLineString (primitive) { + var ret = 'MULTILINESTRING '; + + if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) { + ret += 'EMPTY'; + + return ret; + } else if (primitive.coordinates[0][0].length === 3) { + if (primitive.properties && primitive.properties.m === true) { + ret += 'M '; + } else { + ret += 'Z '; + } + } else if (primitive.coordinates[0][0].length === 4) { + ret += 'ZM '; + } + + ret += '('; + var parts = [ ]; + for (var i = 0; i < primitive.coordinates.length; i++) { + parts.push(arrayToRing(primitive.coordinates[i])); + } + + ret += parts.join(', '); + ret += ')'; + + return ret; + } + + function multiPolygonToWKTMultiPolygon (primitive) { + var ret = 'MULTIPOLYGON '; + + if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) { + ret += 'EMPTY'; + + return ret; + } else if (primitive.coordinates[0][0][0].length === 3) { + if (primitive.properties && primitive.properties.m === true) { + ret += 'M '; + } else { + ret += 'Z '; + } + } else if (primitive.coordinates[0][0][0].length === 4) { + ret += 'ZM '; + } + + ret += '('; + var inner = [ ]; + for (var c = 0; c < primitive.coordinates.length; c++) { + var it = '('; + var parts = [ ]; + for (var i = 0; i < primitive.coordinates[c].length; i++) { + parts.push(arrayToRing(primitive.coordinates[c][i])); + } + + it += parts.join(', '); + it += ')'; + + inner.push(it); + } + + ret += inner.join(', '); + ret += ')'; + + return ret; + } + + function convert (primitive) { + switch (primitive.type) { + case 'Point': + return pointToWKTPoint(primitive); + case 'LineString': + return lineStringToWKTLineString(primitive); + case 'Polygon': + return polygonToWKTPolygon(primitive); + case 'MultiPoint': + return multiPointToWKTMultiPoint(primitive); + case 'MultiLineString': + return multiLineStringToWKTMultiLineString(primitive); + case 'MultiPolygon': + return multiPolygonToWKTMultiPolygon(primitive); + default: + throw Error ("Unknown Type: " + primitive.type); + } + } + + + + exports.parser = parser; + exports.Parser = parser.Parser; + exports.parse = parse; + exports.convert = convert; + + return exports; +})); diff --git a/node_modules/terraformer-wkt-parser/src/wkt.yy b/node_modules/terraformer-wkt-parser/src/wkt.yy new file mode 100644 index 0000000..d94a28e --- /dev/null +++ b/node_modules/terraformer-wkt-parser/src/wkt.yy @@ -0,0 +1,178 @@ + + +%lex + +%% + +\s+ // ignore +"(" return '(' +")" return ')' +"-"?[0-9]+("."[0-9]+)?([eE][\-\+]?[0-9]+)? return 'DOUBLE_TOK' +"POINT" return 'POINT' +"LINESTRING" return 'LINESTRING' +"POLYGON" return 'POLYGON' +"MULTIPOINT" return 'MULTIPOINT' +"MULTILINESTRING" return 'MULTILINESTRING' +"MULTIPOLYGON" return 'MULTIPOLYGON' +"," return 'COMMA' +"EMPTY" return 'EMPTY' +"M" return 'M' +"Z" return 'Z' +"ZM" return 'ZM' +<> return 'EOF' +. return "INVALID" + +/lex + + +%start expressions + +%% /* language grammar */ + +expressions + : point EOF + { return $1; } + | linestring EOF + { return $1; } + | polygon EOF + { return $1; } + | multipoint EOF + { return $1; } + | multilinestring EOF + { return $1; } + | multipolygon EOF + { return $1; } + ; + +coordinate + : DOUBLE_TOK DOUBLE_TOK + { $$ = new PointArray([ Number($1), Number($2) ]); } + | DOUBLE_TOK DOUBLE_TOK DOUBLE_TOK + { $$ = new PointArray([ Number($1), Number($2), Number($3) ]); } + | DOUBLE_TOK DOUBLE_TOK DOUBLE_TOK DOUBLE_TOK + { $$ = new PointArray([ Number($1), Number($2), Number($3), Number($4) ]); } + ; + +ptarray + : ptarray COMMA coordinate + { $$ = $1.addPoint($3); } + | coordinate + { $$ = $1; } + ; + +ring_list + : ring_list COMMA ring + { $$ = $1.addRing($3); } + | ring + { $$ = new RingList($1); } + ; + +ring + : '(' ptarray ')' + { $$ = new Ring($2); } + ; + +point + : POINT '(' ptarray ')' + { $$ = { "type": "Point", "coordinates": $3.data[0] }; } + | POINT Z '(' ptarray ')' + { $$ = { "type": "Point", "coordinates": $4.data[0], "properties": { z: true } }; } + | POINT ZM '(' ptarray ')' + { $$ = { "type": "Point", "coordinates": $4.data[0], "properties": { z: true, m: true } }; } + | POINT M '(' ptarray ')' + { $$ = { "type": "Point", "coordinates": $4.data[0], "properties": { m: true } }; } + | POINT EMPTY + { $$ = { "type": "Point", "coordinates": [ ] }; } + ; + +point_untagged + : coordinate + { $$ = $1; } + | '(' coordinate ')' + { $$ = $2; } + ; + +polygon_list + : polygon_list COMMA polygon_untagged + { $$ = $1.addPolygon($3); } + | polygon_untagged + { $$ = new PolygonList($1); } + ; + +polygon_untagged + : '(' ring_list ')' + { $$ = $2; } + ; + + +point_list + : point_list COMMA point_untagged + { $$ = $1.addPoint($3); } + | point_untagged + { $$ = $1; } + ; + +linestring + : LINESTRING '(' point_list ')' + { $$ = { "type": "LineString", "coordinates": $3.data }; } + | LINESTRING Z '(' point_list ')' + { $$ = { "type": "LineString", "coordinates": $4.data, "properties": { z: true } }; } + | LINESTRING M '(' point_list ')' + { $$ = { "type": "LineString", "coordinates": $4.data, "properties": { m: true } }; } + | LINESTRING ZM '(' point_list ')' + { $$ = { "type": "LineString", "coordinates": $4.data, "properties": { z: true, m: true } }; } + | LINESTRING EMPTY + { $$ = { "type": "LineString", "coordinates": [ ] }; } + ; + +polygon + : POLYGON '(' ring_list ')' + { $$ = { "type": "Polygon", "coordinates": $3.toJSON() }; } + | POLYGON Z '(' ring_list ')' + { $$ = { "type": "Polygon", "coordinates": $4.toJSON(), "properties": { z: true } }; } + | POLYGON M '(' ring_list ')' + { $$ = { "type": "Polygon", "coordinates": $4.toJSON(), "properties": { m: true } }; } + | POLYGON ZM '(' ring_list ')' + { $$ = { "type": "Polygon", "coordinates": $4.toJSON(), "properties": { z: true, m: true } }; } + | POLYGON EMPTY + { $$ = { "type": "Polygon", "coordinates": [ ] }; } + ; + +multipoint + : MULTIPOINT '(' point_list ')' + { $$ = { "type": "MultiPoint", "coordinates": $3.data }; } + | MULTIPOINT Z '(' point_list ')' + { $$ = { "type": "MultiPoint", "coordinates": $4.data, "properties": { z: true } }; } + | MULTIPOINT M '(' point_list ')' + { $$ = { "type": "MultiPoint", "coordinates": $4.data, "properties": { m: true } }; } + | MULTIPOINT ZM '(' point_list ')' + { $$ = { "type": "MultiPoint", "coordinates": $4.data, "properties": { z: true, m: true } }; } + | MULTIPOINT EMPTY + { $$ = { "type": "MultiPoint", "coordinates": [ ] } } + ; + +multilinestring + : MULTILINESTRING '(' ring_list ')' + { $$ = { "type": "MultiLineString", "coordinates": $3.toJSON() }; } + | MULTILINESTRING Z '(' ring_list ')' + { $$ = { "type": "MultiLineString", "coordinates": $4.toJSON(), "properties": { z: true } }; } + | MULTILINESTRING M '(' ring_list ')' + { $$ = { "type": "MultiLineString", "coordinates": $4.toJSON(), "properties": { m: true } }; } + | MULTILINESTRING ZM '(' ring_list ')' + { $$ = { "type": "MultiLineString", "coordinates": $4.toJSON(), "properties": { z: true, m: true } }; } + | MULTILINESTRING EMPTY + { $$ = { "type": "MultiLineString", "coordinates": [ ] }; } + ; + +multipolygon + : MULTIPOLYGON '(' polygon_list ')' + { $$ = { "type": "MultiPolygon", "coordinates": $3.toJSON() }; } + | MULTIPOLYGON Z '(' polygon_list ')' + { $$ = { "type": "MultiPolygon", "coordinates": $4.toJSON(), "properties": { z: true } }; } + | MULTIPOLYGON M '(' polygon_list ')' + { $$ = { "type": "MultiPolygon", "coordinates": $4.toJSON(), "properties": { m: true } }; } + | MULTIPOLYGON ZM '(' polygon_list ')' + { $$ = { "type": "MultiPolygon", "coordinates": $4.toJSON(), "properties": { z: true, m: true } }; } + | MULTIPOLYGON EMPTY + { $$ = { "type": "MultiPolygon", "coordinates": [ ] }; } + ; diff --git a/node_modules/terraformer-wkt-parser/terraformer-wkt-parser.d.ts b/node_modules/terraformer-wkt-parser/terraformer-wkt-parser.d.ts new file mode 100644 index 0000000..6fa885b --- /dev/null +++ b/node_modules/terraformer-wkt-parser/terraformer-wkt-parser.d.ts @@ -0,0 +1,8 @@ +declare namespace Terraformer { + namespace WKT { + function parse(wkt: string): GeoJSON.GeometryObject; + function convert(geoJSON: GeoJSON.GeometryObject): string; + } +} + +export = Terraformer.WKT; \ No newline at end of file diff --git a/node_modules/terraformer-wkt-parser/terraformer-wkt-parser.js b/node_modules/terraformer-wkt-parser/terraformer-wkt-parser.js new file mode 100644 index 0000000..fed561b --- /dev/null +++ b/node_modules/terraformer-wkt-parser/terraformer-wkt-parser.js @@ -0,0 +1,761 @@ +(function (root, factory) { + + // Node. + if(typeof module === 'object' && typeof module.exports === 'object') { + exports = module.exports = factory(require("terraformer")); + } else if(typeof navigator === "object") { + // Browser Global. + if (!root.Terraformer){ + throw new Error("Terraformer.WKT requires the core Terraformer library. http://github.com/esri/terraformer") + } + root.Terraformer.WKT = factory(root.Terraformer); + } + +}(this, function(Terraformer) { + var exports = { }; + + /* Jison generated parser */ +var parser = (function(){ +var parser = {trace: function trace() { }, +yy: {}, +symbols_: {"error":2,"expressions":3,"point":4,"EOF":5,"linestring":6,"polygon":7,"multipoint":8,"multilinestring":9,"multipolygon":10,"coordinate":11,"DOUBLE_TOK":12,"ptarray":13,"COMMA":14,"ring_list":15,"ring":16,"(":17,")":18,"POINT":19,"Z":20,"ZM":21,"M":22,"EMPTY":23,"point_untagged":24,"polygon_list":25,"polygon_untagged":26,"point_list":27,"LINESTRING":28,"POLYGON":29,"MULTIPOINT":30,"MULTILINESTRING":31,"MULTIPOLYGON":32,"$accept":0,"$end":1}, +terminals_: {2:"error",5:"EOF",12:"DOUBLE_TOK",14:"COMMA",17:"(",18:")",19:"POINT",20:"Z",21:"ZM",22:"M",23:"EMPTY",28:"LINESTRING",29:"POLYGON",30:"MULTIPOINT",31:"MULTILINESTRING",32:"MULTIPOLYGON"}, +productions_: [0,[3,2],[3,2],[3,2],[3,2],[3,2],[3,2],[11,2],[11,3],[11,4],[13,3],[13,1],[15,3],[15,1],[16,3],[4,4],[4,5],[4,5],[4,5],[4,2],[24,1],[24,3],[25,3],[25,1],[26,3],[27,3],[27,1],[6,4],[6,5],[6,5],[6,5],[6,2],[7,4],[7,5],[7,5],[7,5],[7,2],[8,4],[8,5],[8,5],[8,5],[8,2],[9,4],[9,5],[9,5],[9,5],[9,2],[10,4],[10,5],[10,5],[10,5],[10,2]], +performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$,_$ +/**/) { + +var $0 = $.length - 1; +switch (yystate) { +case 1: return $[$0-1]; +break; +case 2: return $[$0-1]; +break; +case 3: return $[$0-1]; +break; +case 4: return $[$0-1]; +break; +case 5: return $[$0-1]; +break; +case 6: return $[$0-1]; +break; +case 7: this.$ = new PointArray([ Number($[$0-1]), Number($[$0]) ]); +break; +case 8: this.$ = new PointArray([ Number($[$0-2]), Number($[$0-1]), Number($[$0]) ]); +break; +case 9: this.$ = new PointArray([ Number($[$0-3]), Number($[$0-2]), Number($[$0-1]), Number($[$0]) ]); +break; +case 10: this.$ = $[$0-2].addPoint($[$0]); +break; +case 11: this.$ = $[$0]; +break; +case 12: this.$ = $[$0-2].addRing($[$0]); +break; +case 13: this.$ = new RingList($[$0]); +break; +case 14: this.$ = new Ring($[$0-1]); +break; +case 15: this.$ = { "type": "Point", "coordinates": $[$0-1].data[0] }; +break; +case 16: this.$ = { "type": "Point", "coordinates": $[$0-1].data[0], "properties": { z: true } }; +break; +case 17: this.$ = { "type": "Point", "coordinates": $[$0-1].data[0], "properties": { z: true, m: true } }; +break; +case 18: this.$ = { "type": "Point", "coordinates": $[$0-1].data[0], "properties": { m: true } }; +break; +case 19: this.$ = { "type": "Point", "coordinates": [ ] }; +break; +case 20: this.$ = $[$0]; +break; +case 21: this.$ = $[$0-1]; +break; +case 22: this.$ = $[$0-2].addPolygon($[$0]); +break; +case 23: this.$ = new PolygonList($[$0]); +break; +case 24: this.$ = $[$0-1]; +break; +case 25: this.$ = $[$0-2].addPoint($[$0]); +break; +case 26: this.$ = $[$0]; +break; +case 27: this.$ = { "type": "LineString", "coordinates": $[$0-1].data }; +break; +case 28: this.$ = { "type": "LineString", "coordinates": $[$0-1].data, "properties": { z: true } }; +break; +case 29: this.$ = { "type": "LineString", "coordinates": $[$0-1].data, "properties": { m: true } }; +break; +case 30: this.$ = { "type": "LineString", "coordinates": $[$0-1].data, "properties": { z: true, m: true } }; +break; +case 31: this.$ = { "type": "LineString", "coordinates": [ ] }; +break; +case 32: this.$ = { "type": "Polygon", "coordinates": $[$0-1].toJSON() }; +break; +case 33: this.$ = { "type": "Polygon", "coordinates": $[$0-1].toJSON(), "properties": { z: true } }; +break; +case 34: this.$ = { "type": "Polygon", "coordinates": $[$0-1].toJSON(), "properties": { m: true } }; +break; +case 35: this.$ = { "type": "Polygon", "coordinates": $[$0-1].toJSON(), "properties": { z: true, m: true } }; +break; +case 36: this.$ = { "type": "Polygon", "coordinates": [ ] }; +break; +case 37: this.$ = { "type": "MultiPoint", "coordinates": $[$0-1].data }; +break; +case 38: this.$ = { "type": "MultiPoint", "coordinates": $[$0-1].data, "properties": { z: true } }; +break; +case 39: this.$ = { "type": "MultiPoint", "coordinates": $[$0-1].data, "properties": { m: true } }; +break; +case 40: this.$ = { "type": "MultiPoint", "coordinates": $[$0-1].data, "properties": { z: true, m: true } }; +break; +case 41: this.$ = { "type": "MultiPoint", "coordinates": [ ] } +break; +case 42: this.$ = { "type": "MultiLineString", "coordinates": $[$0-1].toJSON() }; +break; +case 43: this.$ = { "type": "MultiLineString", "coordinates": $[$0-1].toJSON(), "properties": { z: true } }; +break; +case 44: this.$ = { "type": "MultiLineString", "coordinates": $[$0-1].toJSON(), "properties": { m: true } }; +break; +case 45: this.$ = { "type": "MultiLineString", "coordinates": $[$0-1].toJSON(), "properties": { z: true, m: true } }; +break; +case 46: this.$ = { "type": "MultiLineString", "coordinates": [ ] }; +break; +case 47: this.$ = { "type": "MultiPolygon", "coordinates": $[$0-1].toJSON() }; +break; +case 48: this.$ = { "type": "MultiPolygon", "coordinates": $[$0-1].toJSON(), "properties": { z: true } }; +break; +case 49: this.$ = { "type": "MultiPolygon", "coordinates": $[$0-1].toJSON(), "properties": { m: true } }; +break; +case 50: this.$ = { "type": "MultiPolygon", "coordinates": $[$0-1].toJSON(), "properties": { z: true, m: true } }; +break; +case 51: this.$ = { "type": "MultiPolygon", "coordinates": [ ] }; +break; +} +}, +table: [{3:1,4:2,6:3,7:4,8:5,9:6,10:7,19:[1,8],28:[1,9],29:[1,10],30:[1,11],31:[1,12],32:[1,13]},{1:[3]},{5:[1,14]},{5:[1,15]},{5:[1,16]},{5:[1,17]},{5:[1,18]},{5:[1,19]},{17:[1,20],20:[1,21],21:[1,22],22:[1,23],23:[1,24]},{17:[1,25],20:[1,26],21:[1,28],22:[1,27],23:[1,29]},{17:[1,30],20:[1,31],21:[1,33],22:[1,32],23:[1,34]},{17:[1,35],20:[1,36],21:[1,38],22:[1,37],23:[1,39]},{17:[1,40],20:[1,41],21:[1,43],22:[1,42],23:[1,44]},{17:[1,45],20:[1,46],21:[1,48],22:[1,47],23:[1,49]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{11:51,12:[1,52],13:50},{17:[1,53]},{17:[1,54]},{17:[1,55]},{5:[2,19]},{11:58,12:[1,52],17:[1,59],24:57,27:56},{17:[1,60]},{17:[1,61]},{17:[1,62]},{5:[2,31]},{15:63,16:64,17:[1,65]},{17:[1,66]},{17:[1,67]},{17:[1,68]},{5:[2,36]},{11:58,12:[1,52],17:[1,59],24:57,27:69},{17:[1,70]},{17:[1,71]},{17:[1,72]},{5:[2,41]},{15:73,16:64,17:[1,65]},{17:[1,74]},{17:[1,75]},{17:[1,76]},{5:[2,46]},{17:[1,79],25:77,26:78},{17:[1,80]},{17:[1,81]},{17:[1,82]},{5:[2,51]},{14:[1,84],18:[1,83]},{14:[2,11],18:[2,11]},{12:[1,85]},{11:51,12:[1,52],13:86},{11:51,12:[1,52],13:87},{11:51,12:[1,52],13:88},{14:[1,90],18:[1,89]},{14:[2,26],18:[2,26]},{14:[2,20],18:[2,20]},{11:91,12:[1,52]},{11:58,12:[1,52],17:[1,59],24:57,27:92},{11:58,12:[1,52],17:[1,59],24:57,27:93},{11:58,12:[1,52],17:[1,59],24:57,27:94},{14:[1,96],18:[1,95]},{14:[2,13],18:[2,13]},{11:51,12:[1,52],13:97},{15:98,16:64,17:[1,65]},{15:99,16:64,17:[1,65]},{15:100,16:64,17:[1,65]},{14:[1,90],18:[1,101]},{11:58,12:[1,52],17:[1,59],24:57,27:102},{11:58,12:[1,52],17:[1,59],24:57,27:103},{11:58,12:[1,52],17:[1,59],24:57,27:104},{14:[1,96],18:[1,105]},{15:106,16:64,17:[1,65]},{15:107,16:64,17:[1,65]},{15:108,16:64,17:[1,65]},{14:[1,110],18:[1,109]},{14:[2,23],18:[2,23]},{15:111,16:64,17:[1,65]},{17:[1,79],25:112,26:78},{17:[1,79],25:113,26:78},{17:[1,79],25:114,26:78},{5:[2,15]},{11:115,12:[1,52]},{12:[1,116],14:[2,7],18:[2,7]},{14:[1,84],18:[1,117]},{14:[1,84],18:[1,118]},{14:[1,84],18:[1,119]},{5:[2,27]},{11:58,12:[1,52],17:[1,59],24:120},{18:[1,121]},{14:[1,90],18:[1,122]},{14:[1,90],18:[1,123]},{14:[1,90],18:[1,124]},{5:[2,32]},{16:125,17:[1,65]},{14:[1,84],18:[1,126]},{14:[1,96],18:[1,127]},{14:[1,96],18:[1,128]},{14:[1,96],18:[1,129]},{5:[2,37]},{14:[1,90],18:[1,130]},{14:[1,90],18:[1,131]},{14:[1,90],18:[1,132]},{5:[2,42]},{14:[1,96],18:[1,133]},{14:[1,96],18:[1,134]},{14:[1,96],18:[1,135]},{5:[2,47]},{17:[1,79],26:136},{14:[1,96],18:[1,137]},{14:[1,110],18:[1,138]},{14:[1,110],18:[1,139]},{14:[1,110],18:[1,140]},{14:[2,10],18:[2,10]},{12:[1,141],14:[2,8],18:[2,8]},{5:[2,16]},{5:[2,17]},{5:[2,18]},{14:[2,25],18:[2,25]},{14:[2,21],18:[2,21]},{5:[2,28]},{5:[2,29]},{5:[2,30]},{14:[2,12],18:[2,12]},{14:[2,14],18:[2,14]},{5:[2,33]},{5:[2,34]},{5:[2,35]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,43]},{5:[2,44]},{5:[2,45]},{14:[2,22],18:[2,22]},{14:[2,24],18:[2,24]},{5:[2,48]},{5:[2,49]},{5:[2,50]},{14:[2,9],18:[2,9]}], +defaultActions: {14:[2,1],15:[2,2],16:[2,3],17:[2,4],18:[2,5],19:[2,6],24:[2,19],29:[2,31],34:[2,36],39:[2,41],44:[2,46],49:[2,51],83:[2,15],89:[2,27],95:[2,32],101:[2,37],105:[2,42],109:[2,47],117:[2,16],118:[2,17],119:[2,18],122:[2,28],123:[2,29],124:[2,30],127:[2,33],128:[2,34],129:[2,35],130:[2,38],131:[2,39],132:[2,40],133:[2,43],134:[2,44],135:[2,45],138:[2,48],139:[2,49],140:[2,50]}, +parseError: function parseError(str, hash) { + throw new Error(str); +}, +parse: function parse(input) { + var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; + this.lexer.setInput(input); + this.lexer.yy = this.yy; + this.yy.lexer = this.lexer; + this.yy.parser = this; + if (typeof this.lexer.yylloc == "undefined") + this.lexer.yylloc = {}; + var yyloc = this.lexer.yylloc; + lstack.push(yyloc); + var ranges = this.lexer.options && this.lexer.options.ranges; + if (typeof this.yy.parseError === "function") + this.parseError = this.yy.parseError; + function popStack(n) { + stack.length = stack.length - 2 * n; + vstack.length = vstack.length - n; + lstack.length = lstack.length - n; + } + function lex() { + var token; + token = self.lexer.lex() || 1; + if (typeof token !== "number") { + token = self.symbols_[token] || token; + } + return token; + } + var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + if (!recovering) { + expected = []; + for (p in table[state]) + if (this.terminals_[p] && p > 2) { + expected.push("'" + this.terminals_[p] + "'"); + } + if (this.lexer.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1?"end of input":"'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected}); + } + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(this.lexer.yytext); + lstack.push(this.lexer.yylloc); + stack.push(action[1]); + symbol = null; + if (!preErrorSymbol) { + yyleng = this.lexer.yyleng; + yytext = this.lexer.yytext; + yylineno = this.lexer.yylineno; + yyloc = this.lexer.yylloc; + if (recovering > 0) + recovering--; + } else { + symbol = preErrorSymbol; + preErrorSymbol = null; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = {first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column}; + if (ranges) { + yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]]; + } + r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; +} +}; +undefined/* Jison generated lexer */ +var lexer = (function(){ +var lexer = ({EOF:1, +parseError:function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, +setInput:function (input) { + this._input = input; + this._more = this._less = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ''; + this.conditionStack = ['INITIAL']; + this.yylloc = {first_line:1,first_column:0,last_line:1,last_column:0}; + if (this.options.ranges) this.yylloc.range = [0,0]; + this.offset = 0; + return this; + }, +input:function () { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) this.yylloc.range[1]++; + + this._input = this._input.slice(1); + return ch; + }, +unput:function (ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length-len-1); + //this.yyleng -= len; + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length-1); + this.matched = this.matched.substr(0, this.matched.length-1); + + if (lines.length-1) this.yylineno -= lines.length-1; + var r = this.yylloc.range; + + this.yylloc = {first_line: this.yylloc.first_line, + last_line: this.yylineno+1, + first_column: this.yylloc.first_column, + last_column: lines ? + (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length: + this.yylloc.first_column - len + }; + + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + return this; + }, +more:function () { + this._more = true; + return this; + }, +less:function (n) { + this.unput(this.match.slice(n)); + }, +pastInput:function () { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); + }, +upcomingInput:function () { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20-next.length); + } + return (next.substr(0,20)+(next.length > 20 ? '...':'')).replace(/\n/g, ""); + }, +showPosition:function () { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c+"^"; + }, +next:function () { + if (this.done) { + return this.EOF; + } + if (!this._input) this.done = true; + + var token, + match, + tempMatch, + index, + col, + lines; + if (!this._more) { + this.yytext = ''; + this.match = ''; + } + var rules = this._currentRules(); + for (var i=0;i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (!this.options.flex) break; + } + } + if (match) { + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) this.yylineno += lines.length; + this.yylloc = {first_line: this.yylloc.last_line, + last_line: this.yylineno+1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length}; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, rules[index],this.conditionStack[this.conditionStack.length-1]); + if (this.done && this._input) this.done = false; + if (token) return token; + else return; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\n'+this.showPosition(), + {text: "", token: null, line: this.yylineno}); + } + }, +lex:function lex() { + var r = this.next(); + if (typeof r !== 'undefined') { + return r; + } else { + return this.lex(); + } + }, +begin:function begin(condition) { + this.conditionStack.push(condition); + }, +popState:function popState() { + return this.conditionStack.pop(); + }, +_currentRules:function _currentRules() { + return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules; + }, +topState:function () { + return this.conditionStack[this.conditionStack.length-2]; + }, +pushState:function begin(condition) { + this.begin(condition); + }}); +lexer.options = {}; +lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START +/**/) { + +var YYSTATE=YY_START +switch($avoiding_name_collisions) { +case 0:// ignore +break; +case 1:return 17 +break; +case 2:return 18 +break; +case 3:return 12 +break; +case 4:return 19 +break; +case 5:return 28 +break; +case 6:return 29 +break; +case 7:return 30 +break; +case 8:return 31 +break; +case 9:return 32 +break; +case 10:return 14 +break; +case 11:return 23 +break; +case 12:return 22 +break; +case 13:return 20 +break; +case 14:return 21 +break; +case 15:return 5 +break; +case 16:return "INVALID" +break; +} +}; +lexer.rules = [/^(?:\s+)/,/^(?:\()/,/^(?:\))/,/^(?:-?[0-9]+(\.[0-9]+)?([eE][\-\+]?[0-9]+)?)/,/^(?:POINT\b)/,/^(?:LINESTRING\b)/,/^(?:POLYGON\b)/,/^(?:MULTIPOINT\b)/,/^(?:MULTILINESTRING\b)/,/^(?:MULTIPOLYGON\b)/,/^(?:,)/,/^(?:EMPTY\b)/,/^(?:M\b)/,/^(?:Z\b)/,/^(?:ZM\b)/,/^(?:$)/,/^(?:.)/]; +lexer.conditions = {"INITIAL":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],"inclusive":true}}; +return lexer;})() +parser.lexer = lexer; +function Parser () { this.yy = {}; }Parser.prototype = parser;parser.Parser = Parser; +return new Parser; +})(); + + function PointArray (point) { + this.data = [ point ]; + this.type = 'PointArray'; + } + + PointArray.prototype.addPoint = function (point) { + if (point.type === 'PointArray') { + this.data = this.data.concat(point.data); + } else { + this.data.push(point); + } + + return this; + }; + + PointArray.prototype.toJSON = function () { + return this.data; + }; + + function Ring (point) { + this.data = point; + this.type = 'Ring'; + } + + Ring.prototype.toJSON = function () { + var data = [ ]; + + for (var i = 0; i < this.data.data.length; i++) { + data.push(this.data.data[i]); + } + + return data; + }; + + function RingList (ring) { + this.data = [ ring ]; + this.type = 'RingList'; + } + + RingList.prototype.addRing = function (ring) { + this.data.push(ring); + + return this; + }; + + RingList.prototype.toJSON = function () { + var data = [ ]; + + for (var i = 0; i < this.data.length; i++) { + data.push(this.data[i].toJSON()); + } + + if (data.length === 1) { + return data; + } else { + return data; + } + }; + + function PolygonList (polygon) { + this.data = [ polygon ]; + this.type = 'PolygonList'; + } + + PolygonList.prototype.addPolygon = function (polygon) { + this.data.push(polygon); + + return this; + }; + + PolygonList.prototype.toJSON = function () { + var data = [ ]; + + for (var i = 0; i < this.data.length; i++) { + data = data.concat( [ this.data[i].toJSON() ] ); + } + + return data; + }; + + function _parse () { + return parser.parse.apply(parser, arguments); + } + + function parse (element) { + var res, primitive; + + try { + res = parser.parse(element); + } catch (err) { + throw Error("Unable to parse: " + err); + } + + return Terraformer.Primitive(res); + } + + function arrayToRing (arr) { + var parts = [ ], ret = ''; + + for (var i = 0; i < arr.length; i++) { + parts.push(arr[i].join(' ')); + } + + ret += '(' + parts.join(', ') + ')'; + + return ret; + + } + + function pointToWKTPoint (primitive) { + var ret = 'POINT '; + + if (primitive.coordinates === undefined || primitive.coordinates.length === 0) { + ret += 'EMPTY'; + + return ret; + } else if (primitive.coordinates.length === 3) { + // 3d or time? default to 3d + if (primitive.properties && primitive.properties.m === true) { + ret += 'M '; + } else { + ret += 'Z '; + } + } else if (primitive.coordinates.length === 4) { + // 3d and time + ret += 'ZM '; + } + + // include coordinates + ret += '(' + primitive.coordinates.join(' ') + ')'; + + return ret; + } + + function lineStringToWKTLineString (primitive) { + var ret = 'LINESTRING '; + + if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) { + ret += 'EMPTY'; + + return ret; + } else if (primitive.coordinates[0].length === 3) { + if (primitive.properties && primitive.properties.m === true) { + ret += 'M '; + } else { + ret += 'Z '; + } + } else if (primitive.coordinates[0].length === 4) { + ret += 'ZM '; + } + + ret += arrayToRing(primitive.coordinates); + + return ret; + } + + function polygonToWKTPolygon (primitive) { + var ret = 'POLYGON '; + + if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) { + ret += 'EMPTY'; + + return ret; + } else if (primitive.coordinates[0][0].length === 3) { + if (primitive.properties && primitive.properties.m === true) { + ret += 'M '; + } else { + ret += 'Z '; + } + } else if (primitive.coordinates[0][0].length === 4) { + ret += 'ZM '; + } + + ret += '('; + var parts = [ ]; + for (var i = 0; i < primitive.coordinates.length; i++) { + parts.push(arrayToRing(primitive.coordinates[i])); + } + + ret += parts.join(', '); + ret += ')'; + + return ret; + } + + function multiPointToWKTMultiPoint (primitive) { + var ret = 'MULTIPOINT '; + + if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) { + ret += 'EMPTY'; + + return ret; + } else if (primitive.coordinates[0].length === 3) { + if (primitive.properties && primitive.properties.m === true) { + ret += 'M '; + } else { + ret += 'Z '; + } + } else if (primitive.coordinates[0].length === 4) { + ret += 'ZM '; + } + + ret += arrayToRing(primitive.coordinates); + + return ret; + } + + function multiLineStringToWKTMultiLineString (primitive) { + var ret = 'MULTILINESTRING '; + + if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) { + ret += 'EMPTY'; + + return ret; + } else if (primitive.coordinates[0][0].length === 3) { + if (primitive.properties && primitive.properties.m === true) { + ret += 'M '; + } else { + ret += 'Z '; + } + } else if (primitive.coordinates[0][0].length === 4) { + ret += 'ZM '; + } + + ret += '('; + var parts = [ ]; + for (var i = 0; i < primitive.coordinates.length; i++) { + parts.push(arrayToRing(primitive.coordinates[i])); + } + + ret += parts.join(', '); + ret += ')'; + + return ret; + } + + function multiPolygonToWKTMultiPolygon (primitive) { + var ret = 'MULTIPOLYGON '; + + if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) { + ret += 'EMPTY'; + + return ret; + } else if (primitive.coordinates[0][0][0].length === 3) { + if (primitive.properties && primitive.properties.m === true) { + ret += 'M '; + } else { + ret += 'Z '; + } + } else if (primitive.coordinates[0][0][0].length === 4) { + ret += 'ZM '; + } + + ret += '('; + var inner = [ ]; + for (var c = 0; c < primitive.coordinates.length; c++) { + var it = '('; + var parts = [ ]; + for (var i = 0; i < primitive.coordinates[c].length; i++) { + parts.push(arrayToRing(primitive.coordinates[c][i])); + } + + it += parts.join(', '); + it += ')'; + + inner.push(it); + } + + ret += inner.join(', '); + ret += ')'; + + return ret; + } + + function convert (primitive) { + switch (primitive.type) { + case 'Point': + return pointToWKTPoint(primitive); + case 'LineString': + return lineStringToWKTLineString(primitive); + case 'Polygon': + return polygonToWKTPolygon(primitive); + case 'MultiPoint': + return multiPointToWKTMultiPoint(primitive); + case 'MultiLineString': + return multiLineStringToWKTMultiLineString(primitive); + case 'MultiPolygon': + return multiPolygonToWKTMultiPolygon(primitive); + default: + throw Error ("Unknown Type: " + primitive.type); + } + } + + + + exports.parser = parser; + exports.Parser = parser.Parser; + exports.parse = parse; + exports.convert = convert; + + return exports; +})); diff --git a/node_modules/terraformer-wkt-parser/terraformer-wkt-parser.min.js b/node_modules/terraformer-wkt-parser/terraformer-wkt-parser.min.js new file mode 100644 index 0000000..934c39e --- /dev/null +++ b/node_modules/terraformer-wkt-parser/terraformer-wkt-parser.min.js @@ -0,0 +1,4 @@ +/*! Terraformer JS - 1.1.2 - 2016-08-17 +* https://github.com/esri/terraformer-wkt-parser +* Copyright (c) 2016 Esri, Inc. +* Licensed MIT */!function(a,b){if("object"==typeof module&&"object"==typeof module.exports)exports=module.exports=b(require("terraformer"));else if("object"==typeof navigator){if(!a.Terraformer)throw new Error("Terraformer.WKT requires the core Terraformer library. http://github.com/esri/terraformer");a.Terraformer.WKT=b(a.Terraformer)}}(this,function(a){function b(a){this.data=[a],this.type="PointArray"}function c(a){this.data=a,this.type="Ring"}function d(a){this.data=[a],this.type="RingList"}function e(a){this.data=[a],this.type="PolygonList"}function f(b){var c;try{c=p.parse(b)}catch(d){throw Error("Unable to parse: "+d)}return a.Primitive(c)}function g(a){for(var b=[],c="",d=0;d2&&v.push("'"+this.terminals_[s]+"'");x=this.lexer.showPosition?"Parse error on line "+(i+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[n]||n)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==n?"end of input":"'"+(this.terminals_[n]||n)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[n]||n,line:this.lexer.yylineno,loc:l,expected:v})}}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+n);switch(q[0]){case 1:d.push(n),e.push(this.lexer.yytext),f.push(this.lexer.yylloc),d.push(q[1]),n=null,o?(n=o,o=null):(j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,l=this.lexer.yylloc,k>0&&k--);break;case 2:if(t=this.productions_[q[1]][1],w.$=e[e.length-t],w._$={first_line:f[f.length-(t||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(t||1)].first_column,last_column:f[f.length-1].last_column},m&&(w._$.range=[f[f.length-(t||1)].range[0],f[f.length-1].range[1]]),r=this.performAction.call(w,h,j,i,this.yy,q[1],e,f),"undefined"!=typeof r)return r;t&&(d=d.slice(0,-1*t*2),e=e.slice(0,-1*t),f=f.slice(0,-1*t)),d.push(this.productions_[q[1]][0]),e.push(w.$),f.push(w._$),u=g[d[d.length-2]][d[d.length-1]],d.push(u);break;case 3:return!0}}return!0}},g=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parser)throw new Error(a);this.yy.parser.parseError(a,b)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var b=a.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b-1),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this},more:function(){return this._more=!0,this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d,e;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),g=0;gb[0].length)||(b=c,d=g,this.options.flex));g++);return b?(e=b[0].match(/(?:\r\n?|\n).*/g),e&&(this.yylineno+=e.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:e?e[e.length-1].length-e[e.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,f[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a?a:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return"undefined"!=typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return a.options={},a.performAction=function(a,b,c,d){switch(c){case 0:break;case 1:return 17;case 2:return 18;case 3:return 12;case 4:return 19;case 5:return 28;case 6:return 29;case 7:return 30;case 8:return 31;case 9:return 32;case 10:return 14;case 11:return 23;case 12:return 22;case 13:return 20;case 14:return 21;case 15:return 5;case 16:return"INVALID"}},a.rules=[/^(?:\s+)/,/^(?:\()/,/^(?:\))/,/^(?:-?[0-9]+(\.[0-9]+)?([eE][\-\+]?[0-9]+)?)/,/^(?:POINT\b)/,/^(?:LINESTRING\b)/,/^(?:POLYGON\b)/,/^(?:MULTIPOINT\b)/,/^(?:MULTILINESTRING\b)/,/^(?:MULTIPOLYGON\b)/,/^(?:,)/,/^(?:EMPTY\b)/,/^(?:M\b)/,/^(?:Z\b)/,/^(?:ZM\b)/,/^(?:$)/,/^(?:.)/],a.conditions={INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],inclusive:!0}},a}();return f.lexer=g,a.prototype=f,f.Parser=a,new a}();return b.prototype.addPoint=function(a){return"PointArray"===a.type?this.data=this.data.concat(a.data):this.data.push(a),this},b.prototype.toJSON=function(){return this.data},c.prototype.toJSON=function(){for(var a=[],b=0;b extends GeoJsonObject + { + type: 'Feature' + geometry: T; + properties: any; + id?: string; + } + + /*** + * http://geojson.org/geojson-spec.html#feature-collection-objects + */ + export interface FeatureCollection extends GeoJsonObject + { + type: 'FeatureCollection' + features: Feature[]; + } + + /*** + * http://geojson.org/geojson-spec.html#coordinate-reference-system-objects + */ + export interface CoordinateReferenceSystem + { + type: string; + properties: any; + } + + export interface NamedCoordinateReferenceSystem extends CoordinateReferenceSystem + { + properties: { name: string } + } + + export interface LinkedCoordinateReferenceSystem extends CoordinateReferenceSystem + { + properties: { href: string; type: string } + } +} diff --git a/node_modules/terraformer-wkt-parser/typings/globals/geojson/typings.json b/node_modules/terraformer-wkt-parser/typings/globals/geojson/typings.json new file mode 100644 index 0000000..8d74b7a --- /dev/null +++ b/node_modules/terraformer-wkt-parser/typings/globals/geojson/typings.json @@ -0,0 +1,8 @@ +{ + "resolution": "main", + "tree": { + "src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/29708b6a46a61274d2d402d336ef60c697085b64/geojson/geojson.d.ts", + "raw": "registry:dt/geojson#0.0.0+20160619034323", + "typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/29708b6a46a61274d2d402d336ef60c697085b64/geojson/geojson.d.ts" + } +} diff --git a/node_modules/terraformer-wkt-parser/typings/index.d.ts b/node_modules/terraformer-wkt-parser/typings/index.d.ts new file mode 100644 index 0000000..e5a355f --- /dev/null +++ b/node_modules/terraformer-wkt-parser/typings/index.d.ts @@ -0,0 +1 @@ +/// diff --git a/node_modules/terraformer/.coverage/__root__/index.html b/node_modules/terraformer/.coverage/__root__/index.html new file mode 100644 index 0000000..9394707 --- /dev/null +++ b/node_modules/terraformer/.coverage/__root__/index.html @@ -0,0 +1,93 @@ + + + + Code coverage report for __root__/ + + + + + + + +
    +
    +

    + all files __root__/ +

    +
    +
    + 96.77% + Statements + 660/682 +
    +
    + 91.65% + Branches + 384/419 +
    +
    + 96.51% + Functions + 83/86 +
    +
    + 96.77% + Lines + 660/682 +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FileStatementsBranchesFunctionsLines
    terraformer.js
    96.77%660/68291.65%384/41996.51%83/8696.77%660/682
    +
    +
    + + + + + + + diff --git a/node_modules/terraformer/.coverage/__root__/terraformer.js.html b/node_modules/terraformer/.coverage/__root__/terraformer.js.html new file mode 100644 index 0000000..0d644b1 --- /dev/null +++ b/node_modules/terraformer/.coverage/__root__/terraformer.js.html @@ -0,0 +1,4319 @@ + + + + Code coverage report for terraformer.js + + + + + + + +
    +
    +

    + all files / __root__/ terraformer.js +

    +
    +
    + 96.77% + Statements + 660/682 +
    +
    + 91.65% + Branches + 384/419 +
    +
    + 96.51% + Functions + 83/86 +
    +
    + 96.77% + Lines + 660/682 +
    +
    +
    +
    +
    
    +
    +
    1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 +295 +296 +297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307 +308 +309 +310 +311 +312 +313 +314 +315 +316 +317 +318 +319 +320 +321 +322 +323 +324 +325 +326 +327 +328 +329 +330 +331 +332 +333 +334 +335 +336 +337 +338 +339 +340 +341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 +370 +371 +372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 +397 +398 +399 +400 +401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 +412 +413 +414 +415 +416 +417 +418 +419 +420 +421 +422 +423 +424 +425 +426 +427 +428 +429 +430 +431 +432 +433 +434 +435 +436 +437 +438 +439 +440 +441 +442 +443 +444 +445 +446 +447 +448 +449 +450 +451 +452 +453 +454 +455 +456 +457 +458 +459 +460 +461 +462 +463 +464 +465 +466 +467 +468 +469 +470 +471 +472 +473 +474 +475 +476 +477 +478 +479 +480 +481 +482 +483 +484 +485 +486 +487 +488 +489 +490 +491 +492 +493 +494 +495 +496 +497 +498 +499 +500 +501 +502 +503 +504 +505 +506 +507 +508 +509 +510 +511 +512 +513 +514 +515 +516 +517 +518 +519 +520 +521 +522 +523 +524 +525 +526 +527 +528 +529 +530 +531 +532 +533 +534 +535 +536 +537 +538 +539 +540 +541 +542 +543 +544 +545 +546 +547 +548 +549 +550 +551 +552 +553 +554 +555 +556 +557 +558 +559 +560 +561 +562 +563 +564 +565 +566 +567 +568 +569 +570 +571 +572 +573 +574 +575 +576 +577 +578 +579 +580 +581 +582 +583 +584 +585 +586 +587 +588 +589 +590 +591 +592 +593 +594 +595 +596 +597 +598 +599 +600 +601 +602 +603 +604 +605 +606 +607 +608 +609 +610 +611 +612 +613 +614 +615 +616 +617 +618 +619 +620 +621 +622 +623 +624 +625 +626 +627 +628 +629 +630 +631 +632 +633 +634 +635 +636 +637 +638 +639 +640 +641 +642 +643 +644 +645 +646 +647 +648 +649 +650 +651 +652 +653 +654 +655 +656 +657 +658 +659 +660 +661 +662 +663 +664 +665 +666 +667 +668 +669 +670 +671 +672 +673 +674 +675 +676 +677 +678 +679 +680 +681 +682 +683 +684 +685 +686 +687 +688 +689 +690 +691 +692 +693 +694 +695 +696 +697 +698 +699 +700 +701 +702 +703 +704 +705 +706 +707 +708 +709 +710 +711 +712 +713 +714 +715 +716 +717 +718 +719 +720 +721 +722 +723 +724 +725 +726 +727 +728 +729 +730 +731 +732 +733 +734 +735 +736 +737 +738 +739 +740 +741 +742 +743 +744 +745 +746 +747 +748 +749 +750 +751 +752 +753 +754 +755 +756 +757 +758 +759 +760 +761 +762 +763 +764 +765 +766 +767 +768 +769 +770 +771 +772 +773 +774 +775 +776 +777 +778 +779 +780 +781 +782 +783 +784 +785 +786 +787 +788 +789 +790 +791 +792 +793 +794 +795 +796 +797 +798 +799 +800 +801 +802 +803 +804 +805 +806 +807 +808 +809 +810 +811 +812 +813 +814 +815 +816 +817 +818 +819 +820 +821 +822 +823 +824 +825 +826 +827 +828 +829 +830 +831 +832 +833 +834 +835 +836 +837 +838 +839 +840 +841 +842 +843 +844 +845 +846 +847 +848 +849 +850 +851 +852 +853 +854 +855 +856 +857 +858 +859 +860 +861 +862 +863 +864 +865 +866 +867 +868 +869 +870 +871 +872 +873 +874 +875 +876 +877 +878 +879 +880 +881 +882 +883 +884 +885 +886 +887 +888 +889 +890 +891 +892 +893 +894 +895 +896 +897 +898 +899 +900 +901 +902 +903 +904 +905 +906 +907 +908 +909 +910 +911 +912 +913 +914 +915 +916 +917 +918 +919 +920 +921 +922 +923 +924 +925 +926 +927 +928 +929 +930 +931 +932 +933 +934 +935 +936 +937 +938 +939 +940 +941 +942 +943 +944 +945 +946 +947 +948 +949 +950 +951 +952 +953 +954 +955 +956 +957 +958 +959 +960 +961 +962 +963 +964 +965 +966 +967 +968 +969 +970 +971 +972 +973 +974 +975 +976 +977 +978 +979 +980 +981 +982 +983 +984 +985 +986 +987 +988 +989 +990 +991 +992 +993 +994 +995 +996 +997 +998 +999 +1000 +1001 +1002 +1003 +1004 +1005 +1006 +1007 +1008 +1009 +1010 +1011 +1012 +1013 +1014 +1015 +1016 +1017 +1018 +1019 +1020 +1021 +1022 +1023 +1024 +1025 +1026 +1027 +1028 +1029 +1030 +1031 +1032 +1033 +1034 +1035 +1036 +1037 +1038 +1039 +1040 +1041 +1042 +1043 +1044 +1045 +1046 +1047 +1048 +1049 +1050 +1051 +1052 +1053 +1054 +1055 +1056 +1057 +1058 +1059 +1060 +1061 +1062 +1063 +1064 +1065 +1066 +1067 +1068 +1069 +1070 +1071 +1072 +1073 +1074 +1075 +1076 +1077 +1078 +1079 +1080 +1081 +1082 +1083 +1084 +1085 +1086 +1087 +1088 +1089 +1090 +1091 +1092 +1093 +1094 +1095 +1096 +1097 +1098 +1099 +1100 +1101 +1102 +1103 +1104 +1105 +1106 +1107 +1108 +1109 +1110 +1111 +1112 +1113 +1114 +1115 +1116 +1117 +1118 +1119 +1120 +1121 +1122 +1123 +1124 +1125 +1126 +1127 +1128 +1129 +1130 +1131 +1132 +1133 +1134 +1135 +1136 +1137 +1138 +1139 +1140 +1141 +1142 +1143 +1144 +1145 +1146 +1147 +1148 +1149 +1150 +1151 +1152 +1153 +1154 +1155 +1156 +1157 +1158 +1159 +1160 +1161 +1162 +1163 +1164 +1165 +1166 +1167 +1168 +1169 +1170 +1171 +1172 +1173 +1174 +1175 +1176 +1177 +1178 +1179 +1180 +1181 +1182 +1183 +1184 +1185 +1186 +1187 +1188 +1189 +1190 +1191 +1192 +1193 +1194 +1195 +1196 +1197 +1198 +1199 +1200 +1201 +1202 +1203 +1204 +1205 +1206 +1207 +1208 +1209 +1210 +1211 +1212 +1213 +1214 +1215 +1216 +1217 +1218 +1219 +1220 +1221 +1222 +1223 +1224 +1225 +1226 +1227 +1228 +1229 +1230 +1231 +1232 +1233 +1234 +1235 +1236 +1237 +1238 +1239 +1240 +1241 +1242 +1243 +1244 +1245 +1246 +1247 +1248 +1249 +1250 +1251 +1252 +1253 +1254 +1255 +1256 +1257 +1258 +1259 +1260 +1261 +1262 +1263 +1264 +1265 +1266 +1267 +1268 +1269 +1270 +1271 +1272 +1273 +1274 +1275 +1276 +1277 +1278 +1279 +1280 +1281 +1282 +1283 +1284 +1285 +1286 +1287 +1288 +1289 +1290 +1291 +1292 +1293 +1294 +1295 +1296 +1297 +1298 +1299 +1300 +1301 +1302 +1303 +1304 +1305 +1306 +1307 +1308 +1309 +1310 +1311 +1312 +1313 +1314 +1315 +1316 +1317 +1318 +1319 +1320 +1321 +1322 +1323 +1324 +1325 +1326 +1327 +1328 +1329 +1330 +1331 +1332 +1333 +1334 +1335 +1336 +1337 +1338 +1339 +1340 +1341 +1342 +1343 +1344 +1345 +1346 +1347 +1348 +1349 +1350 +1351 +1352 +1353 +1354 +1355 +1356 +1357 +1358 +1359 +1360 +1361 +1362 +1363 +1364 +1365 +1366 +1367 +1368 +1369 +1370 +1371 +1372 +1373 +1374 +1375 +1376 +1377 +1378 +1379 +1380 +1381 +1382 +1383 +1384 +1385 +1386 +1387 +1388 +1389 +1390 +1391 +1392 +1393 +1394 +1395 +1396 +1397 +1398 +1399 +1400 +1401 +1402 +1403 +1404 +1405 +1406 +1407 +1408 +1409 +1410 +1411 +1412 +1413 +1414 +1415 +1416 +1417 +1418 +1419 +  +  + +  +  +  +  + + +  +  +  + +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + +216× +  +  +  +  +  + +  +  +  +  +  +  +  +  +  +  + +96× +685× +226× +  +  +96× +  +  +  +  +  + +73× +73× +  + +  +  + +  +  + +  +  + +  +  +29× +  +  + +  +  +15× +  +  + +  +  + +  +  + +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + +32× +  +32× +40× +  +40× +1600× +  +1600× +1600× +  +1600× +32× +1568× +553× +  +  +1600× +32× +1568× +275× +  +  +1600× +32× +1568× +323× +  +  +1600× +32× +1568× +429× +  +  +  +  +32× +  +  +  +  +  +  +  +  +  +  + + +  + + +  + + + +220× +  +220× +220× +  +220× + +217× + +  +  +220× + +217× +119× +  +  +220× + +217× +11× +  +  +220× + +217× +82× +  +  +  +  +  + +  +  +  +  +  +  +  +  + +16× +  +16× +69× +69× +69× +  +69× +16× +53× +10× +  +  +69× +16× +53× +39× +  +  +69× +16× +53× +21× +  +  +69× +16× +53× +22× +  +  +  +16× +  +  +  +  +  + + + + + + +  +  + +  +  +  +  +  + + +  + + + + +  +  + +  +  + +13× +13× +  +  +  +  +  +  +  +  +  +  + +5709× +  +  +  +  +  + +141× +  +  +  +  +  + +1976× +  +5790× +1920× +  +  +5790× +1950× +  +  +1976× +  +  +  +  +  + +1903× +1903× +1903× +  +  +  +  +  + +47× +47× +47× +  +  +  +  +  + +50× +14× +36× + +30× + + +  +28× + + +  +  +26× +  +  +50× +36× +10× +  +  +  +50× +33× +  +  +50× +  +  +  +  +  + +10× +  +  +  +  +  + +26× +  +  +  +  +  +  + +280× +58× +222× +108× +  +114× +  +  +  +  +  +  + +403× +143× +260× +90× +170× +94× +76× +40× +  +36× +  +  +  +  +  +  +  + +  +280× +  +  +  +  +  + +  +228× +228× +  +228× +  +  + +  +48× +48× +280× +280× +108× +  +  +48× +  +  + +  +  +  +14× + +13× + +  +  +  +12× +  +12× +48× +  +48× +36× +  +  +  +12× +  +  + + +  + + + + + +  +  + +  + + +  +  + +  +  + + +  +  +  +  + +  +  + +70× +70× +378× +  +  +43× +  +  +70× +  +  + +69× +68× +65× +  + + + + +  +  +  + +  + +  +  +  + +  +  +  + +192× +192× +192× +  +192× +105× +105× +  +105× +25× +  +  +  +167× +  +  + +210× +  +  + +121× +89× +41× +72× +192× +25× +  +  +  +  +48× +51× +31× +  +  +  +  +32× +32× +23× +  +  +  +42× +  +  +  +  +  + +48× +  +48× +50× +50× +42× +  +  +50× +  +  +48× +  +  + +64× +  +94× +52× +  +  +  +12× +  +  + +28× + +  +  +27× +27× +  +27× +46× + +  +45× +137× +21× +  +  +  +  + +  +  +  +  +  + +  +  +  +  + +65× +55× +  + +  +  + +  +  + +  +  + +  +  +25× +  +  + +  +  + +  +  + +  +  + +  +  + +  +  +  +  + + +  +  + + +  +  + +13× +  +  + +13× +  +  + +23× +23× + +21× + + +  + +  +14× + + + +  + +  +  +  + +  + + + + + +  +  + +  +  +  + +  + + + +  +  +12× +  +  +  +  +  + +19× +19× +291× +45× +  +  +19× +19× +  +  + +  +  +  + +115× +  +  +115× + +  +  +  +115× + + +  +  +  +  +  +113× + + + +  + + +  +  +  +  +  +  +112× +19× + +13× + +  +  +12× + +  +  +  +  +  +108× +  +60× +  +20× +20× +20× + +  +  +  +  +16× + +  + +  +  +  +40× + +  +  +35× +22× + +  +  +21× +39× +13× +  +  +  + +  +  +13× + + +  + + + +  +  +  + +  +  + + +12× +  +12× + +  +  +  + +  +  +  +  +48× +  +25× + + + + + +  +  +  +  + +  +23× + + + + + +  +  +  +  +  + + + + + + +  + +  +  +  + +  +  +  +  +17× + + +  + + +  +  + +  +  +  + + + +  + + +  +  +  + +  +  + + + +  + + +  +  +  + +  +  +  +  +27× +  +  + +  +24× +  +  +  +24× +24× + +  +  +  +23× +  +23× +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + +32× +  +32× + +29× +19× +10× + +  + +  +  +31× +  +  + + +  +  +  +  +  +  +  +  +  +  + +19× + +18× +17× +  + +  +  +18× +  +  + + + + + +  + +  + + + +  + + + +  + + + +  + +  + +  + + +  +  +  +  +  +  +  +  +  +  +  + +49× + +42× +41× +  + +  +  +48× +  +  + + + + + +  + + + +  + + + +  +  +  +  +  +  +  +  +  +  +  + +27× + +22× +21× +  + +  +  +26× +  +  + + + + + +  +  + + +  +  +  +  +  +  +  +  +  +  +  + +97× +37× +60× +59× +  + +  +  +96× +  +  + + + + + +  + + + +  + + + +  + +  +  + + +  + + + + + +  +  + +  +  +  +  +  +  +  +  +  +  +  + +43× + +34× +33× +  + +  +  +42× +  +  + + + + + +  +  + + +  + + + + +  + + +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + +23× +18× + + +  +  +  +  +23× +  +  + + +  +  +  +  +  +  +  +  +  +  + + + + + +  +  +  +  + +  +  + + + + + +  +  + + + + + +  +  + +  +  +  +  +  +  +  +  +  +  +  + + + + + +  +  +  +  +  +  +  + +  +  + + + + + +  +  + + +  +  + +16× +16× +16× +  +  +  +16× +1856× +1856× +  +16× +  +16× +  +  + +14× +14× +  +14× + +  +  +13× +  +  +  +  +  +  +  +  +  +  + + + + + +  + + + + +  + +  + + + + +  + +  + + + + +  + +  +  + + + +  +  + + + + + + + + + + + +  + + +  + + + + + + + +  + + +  + + + + + + + +  + + +  + +  + 
    (function (root, factory) {
    + 
    +  // Node.
    +  Iif(typeof module === 'object' && typeof module.exports === 'object') {
    +    exports = module.exports = factory();
    +  }
    + 
    +  // Browser Global.
    +  Eif(typeof window === "object") {
    +    root.Terraformer = factory();
    +  }
    + 
    +}(this, function(){
    +  var exports = {},
    +      EarthRadius = 6378137,
    +      DegreesPerRadian = 57.295779513082320,
    +      RadiansPerDegree =  0.017453292519943,
    +      MercatorCRS = {
    +        "type": "link",
    +        "properties": {
    +          "href": "http://spatialreference.org/ref/sr-org/6928/ogcwkt/",
    +          "type": "ogcwkt"
    +        }
    +      },
    +      GeographicCRS = {
    +        "type": "link",
    +        "properties": {
    +          "href": "http://spatialreference.org/ref/epsg/4326/ogcwkt/",
    +          "type": "ogcwkt"
    +        }
    +      };
    + 
    +  /*
    +  Internal: isArray function
    +  */
    +  function isArray(obj) {
    +    return Object.prototype.toString.call(obj) === "[object Array]";
    +  }
    + 
    +  /*
    +  Internal: safe warning
    +  */
    +  function warn() {
    +    var args = Array.prototype.slice.apply(arguments);
    + 
    +    if (typeof console !== undefined && console.warn) {
    +      console.warn.apply(console, args);
    +    }
    +  }
    + 
    +  /*
    +  Internal: Extend one object with another.
    +  */
    +  function extend(destination, source) {
    +    for (var k in source) {
    +      if (source.hasOwnProperty(k)) {
    +        destination[k] = source[k];
    +      }
    +    }
    +    return destination;
    +  }
    + 
    +  /*
    +  Public: Calculate an bounding box for a geojson object
    +  */
    +  function calculateBounds (geojson) {
    +    Eif(geojson.type){
    +      switch (geojson.type) {
    +        case 'Point':
    +          return [ geojson.coordinates[0], geojson.coordinates[1], geojson.coordinates[0], geojson.coordinates[1]];
    + 
    +        case 'MultiPoint':
    +          return calculateBoundsFromArray(geojson.coordinates);
    + 
    +        case 'LineString':
    +          return calculateBoundsFromArray(geojson.coordinates);
    + 
    +        case 'MultiLineString':
    +          return calculateBoundsFromNestedArrays(geojson.coordinates);
    + 
    +        case 'Polygon':
    +          return calculateBoundsFromNestedArrays(geojson.coordinates);
    + 
    +        case 'MultiPolygon':
    +          return calculateBoundsFromNestedArrayOfArrays(geojson.coordinates);
    + 
    +        case 'Feature':
    +          return geojson.geometry? calculateBounds(geojson.geometry) : null;
    + 
    +        case 'FeatureCollection':
    +          return calculateBoundsForFeatureCollection(geojson);
    + 
    +        case 'GeometryCollection':
    +          return calculateBoundsForGeometryCollection(geojson);
    + 
    +        default:
    +          throw new Error("Unknown type: " + geojson.type);
    +      }
    +    }
    +    return null;
    +  }
    + 
    +  /*
    +  Internal: Calculate an bounding box from an nested array of positions
    +  [
    +    [
    +      [ [lng, lat],[lng, lat],[lng, lat] ]
    +    ]
    +    [
    +      [lng, lat],[lng, lat],[lng, lat]
    +    ]
    +    [
    +      [lng, lat],[lng, lat],[lng, lat]
    +    ]
    +  ]
    +  */
    +  function calculateBoundsFromNestedArrays (array) {
    +    var x1 = null, x2 = null, y1 = null, y2 = null;
    + 
    +    for (var i = 0; i < array.length; i++) {
    +      var inner = array[i];
    + 
    +      for (var j = 0; j < inner.length; j++) {
    +        var lonlat = inner[j];
    + 
    +        var lon = lonlat[0];
    +        var lat = lonlat[1];
    + 
    +        if (x1 === null) {
    +          x1 = lon;
    +        } else if (lon < x1) {
    +          x1 = lon;
    +        }
    + 
    +        if (x2 === null) {
    +          x2 = lon;
    +        } else if (lon > x2) {
    +          x2 = lon;
    +        }
    + 
    +        if (y1 === null) {
    +          y1 = lat;
    +        } else if (lat < y1) {
    +          y1 = lat;
    +        }
    + 
    +        if (y2 === null) {
    +          y2 = lat;
    +        } else if (lat > y2) {
    +          y2 = lat;
    +        }
    +      }
    +    }
    + 
    +    return [x1, y1, x2, y2 ];
    +  }
    + 
    +  /*
    +  Internal: Calculate a bounding box from an array of arrays of arrays
    +  [
    +    [ [lng, lat],[lng, lat],[lng, lat] ]
    +    [ [lng, lat],[lng, lat],[lng, lat] ]
    +    [ [lng, lat],[lng, lat],[lng, lat] ]
    +  ]
    +  */
    +  function calculateBoundsFromNestedArrayOfArrays (array) {
    +    var x1 = null, x2 = null, y1 = null, y2 = null;
    + 
    +    for (var i = 0; i < array.length; i++) {
    +      var inner = array[i];
    + 
    +      for (var j = 0; j < inner.length; j++) {
    +        var innerinner = inner[j];
    +        for (var k = 0; k < innerinner.length; k++) {
    +          var lonlat = innerinner[k];
    + 
    +          var lon = lonlat[0];
    +          var lat = lonlat[1];
    + 
    +          if (x1 === null) {
    +            x1 = lon;
    +          } else if (lon < x1) {
    +            x1 = lon;
    +          }
    + 
    +          if (x2 === null) {
    +            x2 = lon;
    +          } else if (lon > x2) {
    +            x2 = lon;
    +          }
    + 
    +          if (y1 === null) {
    +            y1 = lat;
    +          } else if (lat < y1) {
    +            y1 = lat;
    +          }
    + 
    +          if (y2 === null) {
    +            y2 = lat;
    +          } else if (lat > y2) {
    +            y2 = lat;
    +          }
    +        }
    +      }
    +    }
    + 
    +    return [x1, y1, x2, y2];
    +  }
    + 
    +  /*
    +  Internal: Calculate a bounding box from an array of positions
    +  [
    +    [lng, lat],[lng, lat],[lng, lat]
    +  ]
    +  */
    +  function calculateBoundsFromArray (array) {
    +    var x1 = null, x2 = null, y1 = null, y2 = null;
    + 
    +    for (var i = 0; i < array.length; i++) {
    +      var lonlat = array[i];
    +      var lon = lonlat[0];
    +      var lat = lonlat[1];
    + 
    +      if (x1 === null) {
    +        x1 = lon;
    +      } else if (lon < x1) {
    +        x1 = lon;
    +      }
    + 
    +      if (x2 === null) {
    +        x2 = lon;
    +      } else if (lon > x2) {
    +        x2 = lon;
    +      }
    + 
    +      if (y1 === null) {
    +        y1 = lat;
    +      } else if (lat < y1) {
    +        y1 = lat;
    +      }
    + 
    +      if (y2 === null) {
    +        y2 = lat;
    +      } else if (lat > y2) {
    +        y2 = lat;
    +      }
    +    }
    + 
    +    return [x1, y1, x2, y2 ];
    +  }
    + 
    +  /*
    +  Internal: Calculate an bounding box for a feature collection
    +  */
    +  function calculateBoundsForFeatureCollection(featureCollection){
    +    var extents = [], extent;
    +    for (var i = featureCollection.features.length - 1; i >= 0; i--) {
    +      extent = calculateBounds(featureCollection.features[i].geometry);
    +      extents.push([extent[0],extent[1]]);
    +      extents.push([extent[2],extent[3]]);
    +    }
    + 
    +    return calculateBoundsFromArray(extents);
    +  }
    + 
    +  /*
    +  Internal: Calculate an bounding box for a geometry collection
    +  */
    +  function calculateBoundsForGeometryCollection(geometryCollection){
    +    var extents = [], extent;
    + 
    +    for (var i = geometryCollection.geometries.length - 1; i >= 0; i--) {
    +      extent = calculateBounds(geometryCollection.geometries[i]);
    +      extents.push([extent[0],extent[1]]);
    +      extents.push([extent[2],extent[3]]);
    +    }
    + 
    +    return calculateBoundsFromArray(extents);
    +  }
    + 
    +  function calculateEnvelope(geojson){
    +    var bounds = calculateBounds(geojson);
    +    return {
    +      x: bounds[0],
    +      y: bounds[1],
    +      w: Math.abs(bounds[0] - bounds[2]),
    +      h: Math.abs(bounds[1] - bounds[3])
    +    };
    +  }
    + 
    +  /*
    +  Internal: Convert radians to degrees. Used by spatial reference converters.
    +  */
    +  function radToDeg(rad) {
    +    return rad * DegreesPerRadian;
    +  }
    + 
    +  /*
    +  Internal: Convert degrees to radians. Used by spatial reference converters.
    +  */
    +  function degToRad(deg) {
    +    return deg * RadiansPerDegree;
    +  }
    + 
    +  /*
    +  Internal: Loop over each array in a geojson object and apply a function to it. Used by spatial reference converters.
    +  */
    +  function eachPosition(coordinates, func) {
    +    for (var i = 0; i < coordinates.length; i++) {
    +      // we found a number so lets convert this pair
    +      if(typeof coordinates[i][0] === "number"){
    +        coordinates[i] = func(coordinates[i]);
    +      }
    +      // we found an coordinates array it again and run THIS function against it
    +      if(typeof coordinates[i] === "object"){
    +        coordinates[i] = eachPosition(coordinates[i], func);
    +      }
    +    }
    +    return coordinates;
    +  }
    + 
    +  /*
    +  Public: Convert a GeoJSON Position object to Geographic (4326)
    +  */
    +  function positionToGeographic(position) {
    +    var x = position[0];
    +    var y = position[1];
    +    return [radToDeg(x / EarthRadius) - (Math.floor((radToDeg(x / EarthRadius) + 180) / 360) * 360), radToDeg((Math.PI / 2) - (2 * Math.atan(Math.exp(-1.0 * y / EarthRadius))))];
    +  }
    + 
    +  /*
    +  Public: Convert a GeoJSON Position object to Web Mercator (102100)
    +  */
    +  function positionToMercator(position) {
    +    var lng = position[0];
    +    var lat = Math.max(Math.min(position[1], 89.99999), -89.99999);
    +    return [degToRad(lng) * EarthRadius, EarthRadius/2.0 * Math.log( (1.0 + Math.sin(degToRad(lat))) / (1.0 - Math.sin(degToRad(lat))) )];
    +  }
    + 
    +  /*
    +  Public: Apply a function agaist all positions in a geojson object. Used by spatial reference converters.
    +  */
    +  function applyConverter(geojson, converter, noCrs){
    +    if(geojson.type === "Point") {
    +      geojson.coordinates = converter(geojson.coordinates);
    +    } else if(geojson.type === "Feature") {
    +      geojson.geometry = applyConverter(geojson.geometry, converter, true);
    +    } else if(geojson.type === "FeatureCollection") {
    +      for (var f = 0; f < geojson.features.length; f++) {
    +        geojson.features[f] = applyConverter(geojson.features[f], converter, true);
    +      }
    +    } else if(geojson.type === "GeometryCollection") {
    +      for (var g = 0; g < geojson.geometries.length; g++) {
    +        geojson.geometries[g] = applyConverter(geojson.geometries[g], converter, true);
    +      }
    +    } else {
    +      geojson.coordinates = eachPosition(geojson.coordinates, converter);
    +    }
    + 
    +    if(!noCrs){
    +      if(converter === positionToMercator){
    +        geojson.crs = MercatorCRS;
    +      }
    +    }
    + 
    +    if(converter === positionToGeographic){
    +      delete geojson.crs;
    +    }
    + 
    +    return geojson;
    +  }
    + 
    +  /*
    +  Public: Convert a GeoJSON object to ESRI Web Mercator (102100)
    +  */
    +  function toMercator(geojson) {
    +    return applyConverter(geojson, positionToMercator);
    +  }
    + 
    +  /*
    +  Convert a GeoJSON object to Geographic coordinates (WSG84, 4326)
    +  */
    +  function toGeographic(geojson) {
    +    return applyConverter(geojson, positionToGeographic);
    +  }
    + 
    + 
    +  /*
    +  Internal: -1,0,1 comparison function
    +  */
    +  function cmp(a, b) {
    +    if(a < b) {
    +      return -1;
    +    } else if(a > b) {
    +      return 1;
    +    } else {
    +      return 0;
    +    }
    +  }
    + 
    +  /*
    +  Internal: used for sorting
    +  */
    +  function compSort(p1, p2) {
    +    if (p1[0] > p2[0]) {
    +      return -1;
    +    } else if (p1[0] < p2[0]) {
    +      return 1;
    +    } else if (p1[1] > p2[1]) {
    +      return -1;
    +    } else if (p1[1] < p2[1]) {
    +      return 1;
    +    } else {
    +      return 0;
    +    }
    +  }
    + 
    + 
    +  /*
    +  Internal: used to determine turn
    +  */
    +  function turn(p, q, r) {
    +    // Returns -1, 0, 1 if p,q,r forms a right, straight, or left turn.
    +    return cmp((q[0] - p[0]) * (r[1] - p[1]) - (r[0] - p[0]) * (q[1] - p[1]), 0);
    +  }
    + 
    +  /*
    +  Internal: used to determine euclidean distance between two points
    +  */
    +  function euclideanDistance(p, q) {
    +    // Returns the squared Euclidean distance between p and q.
    +    var dx = q[0] - p[0];
    +    var dy = q[1] - p[1];
    + 
    +    return dx * dx + dy * dy;
    +  }
    + 
    +  function nextHullPoint(points, p) {
    +    // Returns the next point on the convex hull in CCW from p.
    +    var q = p;
    +    for(var r in points) {
    +      var t = turn(p, q, points[r]);
    +      if(t === -1 || t === 0 && euclideanDistance(p, points[r]) > euclideanDistance(p, q)) {
    +        q = points[r];
    +      }
    +    }
    +    return q;
    +  }
    + 
    +  function convexHull(points) {
    +    // implementation of the Jarvis March algorithm
    +    // adapted from http://tixxit.wordpress.com/2009/12/09/jarvis-march/
    + 
    +    if(points.length === 0) {
    +      return [];
    +    } else if(points.length === 1) {
    +      return points;
    +    }
    + 
    +    // Returns the points on the convex hull of points in CCW order.
    +    var hull = [points.sort(compSort)[0]];
    + 
    +    for(var p = 0; p < hull.length; p++) {
    +      var q = nextHullPoint(points, hull[p]);
    + 
    +      if(q !== hull[0]) {
    +        hull.push(q);
    +      }
    +    }
    + 
    +    return hull;
    +  }
    + 
    +  function isConvex(points) {
    +    var ltz;
    + 
    +    for (var i = 0; i < points.length - 3; i++) {
    +      var p1 = points[i];
    +      var p2 = points[i + 1];
    +      var p3 = points[i + 2];
    +      var v = [p2[0] - p1[0], p2[1] - p1[1]];
    + 
    +      // p3.x * v.y - p3.y * v.x + v.x * p1.y - v.y * p1.x
    +      var res = p3[0] * v[1] - p3[1] * v[0] + v[0] * p1[1] - v[1] * p1[0];
    + 
    +      if (i === 0) {
    +        Iif (res < 0) {
    +          ltz = true;
    +        } else {
    +          ltz = false;
    +        }
    +      } else {
    +        Eif (ltz && (res > 0) || !ltz && (res < 0)) {
    +          return false;
    +        }
    +      }
    +    }
    + 
    +    return true;
    +  }
    + 
    +  function coordinatesContainPoint(coordinates, point) {
    +    var contains = false;
    +    for(var i = -1, l = coordinates.length, j = l - 1; ++i < l; j = i) {
    +      if (((coordinates[i][1] <= point[1] && point[1] < coordinates[j][1]) ||
    +           (coordinates[j][1] <= point[1] && point[1] < coordinates[i][1])) &&
    +          (point[0] < (coordinates[j][0] - coordinates[i][0]) * (point[1] - coordinates[i][1]) / (coordinates[j][1] - coordinates[i][1]) + coordinates[i][0])) {
    +        contains = !contains;
    +      }
    +    }
    +    return contains;
    +  }
    + 
    +  function polygonContainsPoint(polygon, point) {
    +    if (polygon && polygon.length) {
    +      if (polygon.length === 1) { // polygon with no holes
    +        return coordinatesContainPoint(polygon[0], point);
    +      } else { // polygon with holes
    +        if (coordinatesContainPoint(polygon[0], point)) {
    +          for (var i = 1; i < polygon.length; i++) {
    +            if (coordinatesContainPoint(polygon[i], point)) {
    +              return false; // found in hole
    +            }
    +          }
    + 
    +          return true;
    +        } else {
    +          return false;
    +        }
    +      }
    +    } else {
    +      return false;
    +    }
    +  }
    + 
    +  function edgeIntersectsEdge(a1, a2, b1, b2) {
    +    var ua_t = (b2[0] - b1[0]) * (a1[1] - b1[1]) - (b2[1] - b1[1]) * (a1[0] - b1[0]);
    +    var ub_t = (a2[0] - a1[0]) * (a1[1] - b1[1]) - (a2[1] - a1[1]) * (a1[0] - b1[0]);
    +    var u_b  = (b2[1] - b1[1]) * (a2[0] - a1[0]) - (b2[0] - b1[0]) * (a2[1] - a1[1]);
    + 
    +    if ( u_b !== 0 ) {
    +      var ua = ua_t / u_b;
    +      var ub = ub_t / u_b;
    + 
    +      if ( 0 <= ua && ua <= 1 && 0 <= ub && ub <= 1 ) {
    +        return true;
    +      }
    +    }
    + 
    +    return false;
    +  }
    + 
    +  function isNumber(n) {
    +    return !isNaN(parseFloat(n)) && isFinite(n);
    +  }
    + 
    +  function arraysIntersectArrays(a, b) {
    +    if (isNumber(a[0][0])) {
    +      if (isNumber(b[0][0])) {
    +        for (var i = 0; i < a.length - 1; i++) {
    +          for (var j = 0; j < b.length - 1; j++) {
    +            if (edgeIntersectsEdge(a[i], a[i + 1], b[j], b[j + 1])) {
    +              return true;
    +            }
    +          }
    +        }
    +      } else {
    +        for (var k = 0; k < b.length; k++) {
    +          if (arraysIntersectArrays(a, b[k])) {
    +            return true;
    +          }
    +        }
    +      }
    +    } else {
    +      for (var l = 0; l < a.length; l++) {
    +        if (arraysIntersectArrays(a[l], b)) {
    +          return true;
    +        }
    +      }
    +    }
    +    return false;
    +  }
    + 
    +  /*
    +  Internal: Returns a copy of coordinates for s closed polygon
    +  */
    +  function closedPolygon(coordinates) {
    +    var outer = [ ];
    + 
    +    for (var i = 0; i < coordinates.length; i++) {
    +      var inner = coordinates[i].slice();
    +      if (pointsEqual(inner[0], inner[inner.length - 1]) === false) {
    +        inner.push(inner[0]);
    +      }
    + 
    +      outer.push(inner);
    +    }
    + 
    +    return outer;
    +  }
    + 
    +  function pointsEqual(a, b) {
    +    for (var i = 0; i < a.length; i++) {
    + 
    +      if (a[i] !== b[i]) {
    +        return false;
    +      }
    +    }
    + 
    +    return true;
    +  }
    + 
    +  function coordinatesEqual(a, b) {
    +    if (a.length !== b.length) {
    +      return false;
    +    }
    + 
    +    var na = a.slice().sort(compSort);
    +    var nb = b.slice().sort(compSort);
    + 
    +    for (var i = 0; i < na.length; i++) {
    +      if (na[i].length !== nb[i].length) {
    +        return false;
    +      }
    +      for (var j = 0; j < na.length; j++) {
    +        if (na[i][j] !== nb[i][j]) {
    +          return false;
    +        }
    +      }
    +    }
    + 
    +    return true;
    +  }
    + 
    +  /*
    +  Internal: An array of variables that will be excluded form JSON objects.
    +  */
    +  var excludeFromJSON = ["length"];
    + 
    +  /*
    +  Internal: Base GeoJSON Primitive
    +  */
    +  function Primitive(geojson){
    +    if(geojson){
    +      switch (geojson.type) {
    +      case 'Point':
    +        return new Point(geojson);
    + 
    +      case 'MultiPoint':
    +        return new MultiPoint(geojson);
    + 
    +      case 'LineString':
    +        return new LineString(geojson);
    + 
    +      case 'MultiLineString':
    +        return new MultiLineString(geojson);
    + 
    +      case 'Polygon':
    +        return new Polygon(geojson);
    + 
    +      case 'MultiPolygon':
    +        return new MultiPolygon(geojson);
    + 
    +      case 'Feature':
    +        return new Feature(geojson);
    + 
    +      case 'FeatureCollection':
    +        return new FeatureCollection(geojson);
    + 
    +      case 'GeometryCollection':
    +        return new GeometryCollection(geojson);
    + 
    +      default:
    +        throw new Error("Unknown type: " + geojson.type);
    +      }
    +    }
    +  }
    + 
    +  Primitive.prototype.toMercator = function(){
    +    return toMercator(this);
    +  };
    + 
    +  Primitive.prototype.toGeographic = function(){
    +    return toGeographic(this);
    +  };
    + 
    +  Primitive.prototype.envelope = function(){
    +    return calculateEnvelope(this);
    +  };
    + 
    +  Primitive.prototype.bbox = function(){
    +    return calculateBounds(this);
    +  };
    + 
    +  Primitive.prototype.convexHull = function(){
    +    var coordinates = [ ], i, j;
    +    if (this.type === 'Point') {
    +      return null;
    +    } else if (this.type === 'LineString' || this.type === 'MultiPoint') {
    +      if (this.coordinates && this.coordinates.length >= 3) {
    +        coordinates = this.coordinates;
    +      } else {
    +        return null;
    +      }
    +    } else if (this.type === 'Polygon' || this.type === 'MultiLineString') {
    +      if (this.coordinates && this.coordinates.length > 0) {
    +        for (i = 0; i < this.coordinates.length; i++) {
    +          coordinates = coordinates.concat(this.coordinates[i]);
    +        }
    +        Iif(coordinates.length < 3){
    +          return null;
    +        }
    +      } else {
    +        return null;
    +      }
    +    } else if (this.type === 'MultiPolygon') {
    +      if (this.coordinates && this.coordinates.length > 0) {
    +        for (i = 0; i < this.coordinates.length; i++) {
    +          for (j = 0; j < this.coordinates[i].length; j++) {
    +            coordinates = coordinates.concat(this.coordinates[i][j]);
    +          }
    +        }
    +        Iif(coordinates.length < 3){
    +          return null;
    +        }
    +      } else {
    +        return null;
    +      }
    +    } else Eif(this.type === "Feature"){
    +      var primitive = new Primitive(this.geometry);
    +      return primitive.convexHull();
    +    }
    + 
    +    return new Polygon({
    +      type: 'Polygon',
    +      coordinates: closedPolygon([convexHull(coordinates)])
    +    });
    +  };
    + 
    +  Primitive.prototype.toJSON = function(){
    +    var obj = {};
    +    for (var key in this) {
    +      if (this.hasOwnProperty(key) && excludeFromJSON.indexOf(key) === -1) {
    +        obj[key] = this[key];
    +      }
    +    }
    +    obj.bbox = calculateBounds(this);
    +    return obj;
    +  };
    + 
    +  Primitive.prototype.contains = function(primitive){
    +    return new Primitive(primitive).within(this);
    +  };
    + 
    +  Primitive.prototype.within = function(primitive) {
    +    var coordinates, i, contains;
    + 
    +    // if we are passed a feature, use the polygon inside instead
    +    if (primitive.type === 'Feature') {
    +      primitive = primitive.geometry;
    +    }
    + 
    +    // point.within(point) :: equality
    +    if (primitive.type === "Point") {
    +      Eif (this.type === "Point") {
    +        return pointsEqual(this.coordinates, primitive.coordinates);
    + 
    +      }
    +    }
    + 
    +    // point.within(multilinestring)
    +    if (primitive.type === "MultiLineString") {
    +      if (this.type === "Point") {
    +        for (i = 0; i < primitive.coordinates.length; i++) {
    +          var linestring = { type: "LineString", coordinates: primitive.coordinates[i] };
    + 
    +          Eif (this.within(linestring)) {
    +            return true;
    +          }
    +        }
    +      }
    +    }
    + 
    +    // point.within(linestring), point.within(multipoint)
    +    if (primitive.type === "LineString" || primitive.type === "MultiPoint") {
    +      if (this.type === "Point") {
    +        for (i = 0; i < primitive.coordinates.length; i++) {
    +          if (this.coordinates.length !== primitive.coordinates[i].length) {
    +            return false;
    +          }
    + 
    +          if (pointsEqual(this.coordinates, primitive.coordinates[i])) {
    +            return true;
    +          }
    +        }
    +      }
    +    }
    + 
    +    if (primitive.type === "Polygon") {
    +      // polygon.within(polygon)
    +      if (this.type === "Polygon") {
    +        // check for equal polygons
    +        Eif (primitive.coordinates.length === this.coordinates.length) {
    +          for (i = 0; i < this.coordinates.length; i++) {
    +            if (coordinatesEqual(this.coordinates[i], primitive.coordinates[i])) {
    +              return true;
    +            }
    +          }
    +        }
    + 
    +        if (this.coordinates.length && polygonContainsPoint(primitive.coordinates, this.coordinates[0][0])) {
    +          return !arraysIntersectArrays(closedPolygon(this.coordinates), closedPolygon(primitive.coordinates));
    +        } else {
    +          return false;
    +        }
    + 
    +      // point.within(polygon)
    +      } else if (this.type === "Point") {
    +        return polygonContainsPoint(primitive.coordinates, this.coordinates);
    + 
    +      // linestring/multipoint withing polygon
    +      } else if (this.type === "LineString" || this.type === "MultiPoint") {
    +        if (!this.coordinates || this.coordinates.length === 0) {
    +          return false;
    +        }
    + 
    +        for (i = 0; i < this.coordinates.length; i++) {
    +          if (polygonContainsPoint(primitive.coordinates, this.coordinates[i]) === false) {
    +            return false;
    +          }
    +        }
    + 
    +        return true;
    + 
    +      // multilinestring.within(polygon)
    +      } else if (this.type === "MultiLineString") {
    +        for (i = 0; i < this.coordinates.length; i++) {
    +          var ls = new LineString(this.coordinates[i]);
    + 
    +          if (ls.within(primitive) === false) {
    +            contains++;
    +            return false;
    +          }
    +        }
    + 
    +        return true;
    + 
    +      // multipolygon.within(polygon)
    +      } else Eif (this.type === "MultiPolygon") {
    +        for (i = 0; i < this.coordinates.length; i++) {
    +          var p1 = new Primitive({ type: "Polygon", coordinates: this.coordinates[i] });
    + 
    +          if (p1.within(primitive) === false) {
    +            return false;
    +          }
    +        }
    + 
    +        return true;
    +      }
    + 
    +    }
    + 
    +    if (primitive.type === "MultiPolygon") {
    +      // point.within(multipolygon)
    +      if (this.type === "Point") {
    +        Eif (primitive.coordinates.length) {
    +          for (i = 0; i < primitive.coordinates.length; i++) {
    +            coordinates = primitive.coordinates[i];
    +            if (polygonContainsPoint(coordinates, this.coordinates) && arraysIntersectArrays([this.coordinates], primitive.coordinates) === false) {
    +              return true;
    +            }
    +          }
    +        }
    + 
    +        return false;
    +      // polygon.within(multipolygon)
    +      } else if (this.type === "Polygon") {
    +        for (i = 0; i < this.coordinates.length; i++) {
    +          Eif (primitive.coordinates[i].length === this.coordinates.length) {
    +            for (j = 0; j < this.coordinates.length; j++) {
    +              if (coordinatesEqual(this.coordinates[j], primitive.coordinates[i][j])) {
    +                return true;
    +              }
    +            }
    +          }
    +        }
    + 
    +        if (arraysIntersectArrays(this.coordinates, primitive.coordinates) === false) {
    +          Eif (primitive.coordinates.length) {
    +            for (i = 0; i < primitive.coordinates.length; i++) {
    +              coordinates = primitive.coordinates[i];
    +              if (polygonContainsPoint(coordinates, this.coordinates[0][0]) === false) {
    +                contains = false;
    +              } else {
    +                contains = true;
    +              }
    +            }
    + 
    +            return contains;
    +          }
    +        }
    + 
    +      // linestring.within(multipolygon), multipoint.within(multipolygon)
    +      } else if (this.type === "LineString" || this.type === "MultiPoint") {
    +        for (i = 0; i < primitive.coordinates.length; i++) {
    +          var p = { type: "Polygon", coordinates: primitive.coordinates[i] };
    + 
    +          if (this.within(p)) {
    +            return true;
    +          }
    + 
    +          return false;
    +        }
    + 
    +      // multilinestring.within(multipolygon)
    +      } else if (this.type === "MultiLineString") {
    +        for (i = 0; i < this.coordinates.length; i++) {
    +          var lines = new LineString(this.coordinates[i]);
    + 
    +          if (lines.within(primitive) === false) {
    +            return false;
    +          }
    +        }
    + 
    +        return true;
    + 
    +      // multipolygon.within(multipolygon)
    +      } else Eif (this.type === "MultiPolygon") {
    +        for (i = 0; i < primitive.coordinates.length; i++) {
    +          var mpoly = { type: "Polygon", coordinates: primitive.coordinates[i] };
    + 
    +          if (this.within(mpoly) === false) {
    +            return false;
    +          }
    +        }
    + 
    +        return true;
    +      }
    +    }
    + 
    +    // default to false
    +    return false;
    +  };
    + 
    +  Primitive.prototype.intersects = function(primitive) {
    +    // if we are passed a feature, use the polygon inside instead
    +    Iif (primitive.type === 'Feature') {
    +      primitive = primitive.geometry;
    +    }
    + 
    +    var p = new Primitive(primitive);
    +    if (this.within(primitive) || p.within(this)) {
    +      return true;
    +    }
    + 
    + 
    +    Eif (this.type !== 'Point' && this.type !== 'MultiPoint' &&
    +        primitive.type !== 'Point' && primitive.type !== 'MultiPoint') {
    +      return arraysIntersectArrays(this.coordinates, primitive.coordinates);
    +    } else if (this.type === 'Feature') {
    +      // in the case of a Feature, use the internal primitive for intersection
    +      var inner = new Primitive(this.geometry);
    +      return inner.intersects(primitive);
    +    }
    + 
    +    warn("Type " + this.type + " to " + primitive.type + " intersection is not supported by intersects");
    +    return false;
    +  };
    + 
    + 
    +  /*
    +  GeoJSON Point Class
    +    new Point();
    +    new Point(x,y,z,wtf);
    +    new Point([x,y,z,wtf]);
    +    new Point([x,y]);
    +    new Point({
    +      type: "Point",
    +      coordinates: [x,y]
    +    });
    +  */
    +  function Point(input){
    +    var args = Array.prototype.slice.call(arguments);
    + 
    +    if(input && input.type === "Point" && input.coordinates){
    +      extend(this, input);
    +    } else if(input && isArray(input)) {
    +      this.coordinates = input;
    +    } else if(args.length >= 2) {
    +      this.coordinates = args;
    +    } else {
    +      throw "Terraformer: invalid input for Terraformer.Point";
    +    }
    + 
    +    this.type = "Point";
    +  }
    + 
    +  Point.prototype = new Primitive();
    +  Point.prototype.constructor = Point;
    + 
    +  /*
    +  GeoJSON MultiPoint Class
    +      new MultiPoint();
    +      new MultiPoint([[x,y], [x1,y1]]);
    +      new MultiPoint({
    +        type: "MultiPoint",
    +        coordinates: [x,y]
    +      });
    +  */
    +  function MultiPoint(input){
    +    if(input && input.type === "MultiPoint" && input.coordinates){
    +      extend(this, input);
    +    } else if(isArray(input)) {
    +      this.coordinates = input;
    +    } else {
    +      throw "Terraformer: invalid input for Terraformer.MultiPoint";
    +    }
    + 
    +    this.type = "MultiPoint";
    +  }
    + 
    +  MultiPoint.prototype = new Primitive();
    +  MultiPoint.prototype.constructor = MultiPoint;
    +  MultiPoint.prototype.forEach = function(func){
    +    for (var i = 0; i < this.coordinates.length; i++) {
    +      func.apply(this, [this.coordinates[i], i, this.coordinates]);
    +    }
    +    return this;
    +  };
    +  MultiPoint.prototype.addPoint = function(point){
    +    this.coordinates.push(point);
    +    return this;
    +  };
    +  MultiPoint.prototype.insertPoint = function(point, index){
    +    this.coordinates.splice(index, 0, point);
    +    return this;
    +  };
    +  MultiPoint.prototype.removePoint = function(remove){
    +    if(typeof remove === "number"){
    +      this.coordinates.splice(remove, 1);
    +    } else {
    +      this.coordinates.splice(this.coordinates.indexOf(remove), 1);
    +    }
    +    return this;
    +  };
    +  MultiPoint.prototype.get = function(i){
    +    return new Point(this.coordinates[i]);
    +  };
    + 
    +  /*
    +  GeoJSON LineString Class
    +      new LineString();
    +      new LineString([[x,y], [x1,y1]]);
    +      new LineString({
    +        type: "LineString",
    +        coordinates: [x,y]
    +      });
    +  */
    +  function LineString(input){
    +    if(input && input.type === "LineString" && input.coordinates){
    +      extend(this, input);
    +    } else if(isArray(input)) {
    +      this.coordinates = input;
    +    } else {
    +      throw "Terraformer: invalid input for Terraformer.LineString";
    +    }
    + 
    +    this.type = "LineString";
    +  }
    + 
    +  LineString.prototype = new Primitive();
    +  LineString.prototype.constructor = LineString;
    +  LineString.prototype.addVertex = function(point){
    +    this.coordinates.push(point);
    +    return this;
    +  };
    +  LineString.prototype.insertVertex = function(point, index){
    +    this.coordinates.splice(index, 0, point);
    +    return this;
    +  };
    +  LineString.prototype.removeVertex = function(remove){
    +    this.coordinates.splice(remove, 1);
    +    return this;
    +  };
    + 
    +  /*
    +  GeoJSON MultiLineString Class
    +      new MultiLineString();
    +      new MultiLineString([ [[x,y], [x1,y1]], [[x2,y2], [x3,y3]] ]);
    +      new MultiLineString({
    +        type: "MultiLineString",
    +        coordinates: [ [[x,y], [x1,y1]], [[x2,y2], [x3,y3]] ]
    +      });
    +  */
    +  function MultiLineString(input){
    +    if(input && input.type === "MultiLineString" && input.coordinates){
    +      extend(this, input);
    +    } else if(isArray(input)) {
    +      this.coordinates = input;
    +    } else {
    +      throw "Terraformer: invalid input for Terraformer.MultiLineString";
    +    }
    + 
    +    this.type = "MultiLineString";
    +  }
    + 
    +  MultiLineString.prototype = new Primitive();
    +  MultiLineString.prototype.constructor = MultiLineString;
    +  MultiLineString.prototype.forEach = function(func){
    +    for (var i = 0; i < this.coordinates.length; i++) {
    +      func.apply(this, [this.coordinates[i], i, this.coordinates ]);
    +    }
    +  };
    +  MultiLineString.prototype.get = function(i){
    +    return new LineString(this.coordinates[i]);
    +  };
    + 
    +  /*
    +  GeoJSON Polygon Class
    +      new Polygon();
    +      new Polygon([ [[x,y], [x1,y1], [x2,y2]] ]);
    +      new Polygon({
    +        type: "Polygon",
    +        coordinates: [ [[x,y], [x1,y1], [x2,y2]] ]
    +      });
    +  */
    +  function Polygon(input){
    +    if(input && input.type === "Polygon" && input.coordinates){
    +      extend(this, input);
    +    } else if(isArray(input)) {
    +      this.coordinates = input;
    +    } else {
    +      throw "Terraformer: invalid input for Terraformer.Polygon";
    +    }
    + 
    +    this.type = "Polygon";
    +  }
    + 
    +  Polygon.prototype = new Primitive();
    +  Polygon.prototype.constructor = Polygon;
    +  Polygon.prototype.addVertex = function(point){
    +    this.insertVertex(point, this.coordinates[0].length - 1);
    +    return this;
    +  };
    +  Polygon.prototype.insertVertex = function(point, index){
    +    this.coordinates[0].splice(index, 0, point);
    +    return this;
    +  };
    +  Polygon.prototype.removeVertex = function(remove){
    +    this.coordinates[0].splice(remove, 1);
    +    return this;
    +  };
    +  Polygon.prototype.close = function() {
    +    this.coordinates = closedPolygon(this.coordinates);
    +  };
    +  Polygon.prototype.hasHoles = function() {
    +    return this.coordinates.length > 1;
    +  };
    +  Polygon.prototype.holes = function() {
    +    holes = [];
    +    Eif (this.hasHoles()) {
    +      for (var i = 1; i < this.coordinates.length; i++) {
    +        holes.push(new Polygon([this.coordinates[i]]));
    +      }
    +    }
    +    return holes;
    +  };
    + 
    +  /*
    +  GeoJSON MultiPolygon Class
    +      new MultiPolygon();
    +      new MultiPolygon([ [ [[x,y], [x1,y1]], [[x2,y2], [x3,y3]] ] ]);
    +      new MultiPolygon({
    +        type: "MultiPolygon",
    +        coordinates: [ [ [[x,y], [x1,y1]], [[x2,y2], [x3,y3]] ] ]
    +      });
    +  */
    +  function MultiPolygon(input){
    +    if(input && input.type === "MultiPolygon" && input.coordinates){
    +      extend(this, input);
    +    } else if(isArray(input)) {
    +      this.coordinates = input;
    +    } else {
    +      throw "Terraformer: invalid input for Terraformer.MultiPolygon";
    +    }
    + 
    +    this.type = "MultiPolygon";
    +  }
    + 
    +  MultiPolygon.prototype = new Primitive();
    +  MultiPolygon.prototype.constructor = MultiPolygon;
    +  MultiPolygon.prototype.forEach = function(func){
    +    for (var i = 0; i < this.coordinates.length; i++) {
    +      func.apply(this, [this.coordinates[i], i, this.coordinates ]);
    +    }
    +  };
    +  MultiPolygon.prototype.get = function(i){
    +    return new Polygon(this.coordinates[i]);
    +  };
    +  MultiPolygon.prototype.close = function(){
    +    var outer = [];
    +    this.forEach(function(polygon){
    +      outer.push(closedPolygon(polygon));
    +    });
    +    this.coordinates = outer;
    +    return this;
    +  };
    + 
    +  /*
    +  GeoJSON Feature Class
    +      new Feature();
    +      new Feature({
    +        type: "Feature",
    +        geometry: {
    +          type: "Polygon",
    +          coordinates: [ [ [[x,y], [x1,y1]], [[x2,y2], [x3,y3]] ] ]
    +        }
    +      });
    +      new Feature({
    +        type: "Polygon",
    +        coordinates: [ [ [[x,y], [x1,y1]], [[x2,y2], [x3,y3]] ] ]
    +      });
    +  */
    +  function Feature(input){
    +    if(input && input.type === "Feature"){
    +      extend(this, input);
    +    } else Eif(input && input.type && input.coordinates) {
    +      this.geometry = input;
    +    } else {
    +      throw "Terraformer: invalid input for Terraformer.Feature";
    +    }
    + 
    +    this.type = "Feature";
    +  }
    + 
    +  Feature.prototype = new Primitive();
    +  Feature.prototype.constructor = Feature;
    + 
    +  /*
    +  GeoJSON FeatureCollection Class
    +      new FeatureCollection();
    +      new FeatureCollection([feature, feature1]);
    +      new FeatureCollection({
    +        type: "FeatureCollection",
    +        coordinates: [feature, feature1]
    +      });
    +  */
    +  function FeatureCollection(input){
    +    if(input && input.type === "FeatureCollection" && input.features){
    +      extend(this, input);
    +    } else Eif(isArray(input)) {
    +      this.features = input;
    +    } else {
    +      throw "Terraformer: invalid input for Terraformer.FeatureCollection";
    +    }
    + 
    +    this.type = "FeatureCollection";
    +  }
    + 
    +  FeatureCollection.prototype = new Primitive();
    +  FeatureCollection.prototype.constructor = FeatureCollection;
    +  FeatureCollection.prototype.forEach = function(func){
    +    for (var i = 0; i < this.features.length; i++) {
    +      func.apply(this, [this.features[i], i, this.features]);
    +    }
    +  };
    +  FeatureCollection.prototype.get = function(id){
    +    var found;
    +    this.forEach(function(feature){
    +      if(feature.id === id){
    +        found = feature;
    +      }
    +    });
    +    return new Feature(found);
    +  };
    + 
    +  /*
    +  GeoJSON GeometryCollection Class
    +      new GeometryCollection();
    +      new GeometryCollection([geometry, geometry1]);
    +      new GeometryCollection({
    +        type: "GeometryCollection",
    +        coordinates: [geometry, geometry1]
    +      });
    +  */
    +  function GeometryCollection(input){
    +    if(input && input.type === "GeometryCollection" && input.geometries){
    +      extend(this, input);
    +    } else Eif(isArray(input)) {
    +      this.geometries = input;
    +    } else if(input.coordinates && input.type){
    +      this.type = "GeometryCollection";
    +      this.geometries = [input];
    +    } else {
    +      throw "Terraformer: invalid input for Terraformer.GeometryCollection";
    +    }
    + 
    +    this.type = "GeometryCollection";
    +  }
    + 
    +  GeometryCollection.prototype = new Primitive();
    +  GeometryCollection.prototype.constructor = GeometryCollection;
    +  GeometryCollection.prototype.forEach = function(func){
    +    for (var i = 0; i < this.geometries.length; i++) {
    +      func.apply(this, [this.geometries[i], i, this.geometries]);
    +    }
    +  };
    +  GeometryCollection.prototype.get = function(i){
    +    return new Primitive(this.geometries[i]);
    +  };
    + 
    +  function createCircle(center, radius, interpolate){
    +    var mercatorPosition = positionToMercator(center);
    +    var steps = interpolate || 64;
    +    var polygon = {
    +      type: "Polygon",
    +      coordinates: [[]]
    +    };
    +    for(var i=1; i<=steps; i++) {
    +      var radians = i * (360/steps) * Math.PI / 180;
    +      polygon.coordinates[0].push([mercatorPosition[0] + radius * Math.cos(radians), mercatorPosition[1] + radius * Math.sin(radians)]);
    +    }
    +    polygon.coordinates = closedPolygon(polygon.coordinates);
    + 
    +    return toGeographic(polygon);
    +  }
    + 
    +  function Circle (center, radius, interpolate) {
    +    var steps = interpolate || 64;
    +    var rad = radius || 250;
    + 
    +    if(!center || center.length < 2 || !rad || !steps) {
    +      throw new Error("Terraformer: missing parameter for Terraformer.Circle");
    +    }
    + 
    +    extend(this, new Feature({
    +      type: "Feature",
    +      geometry: createCircle(center, rad, steps),
    +      properties: {
    +        radius: rad,
    +        center: center,
    +        steps: steps
    +      }
    +    }));
    +  }
    + 
    +  Circle.prototype = new Primitive();
    +  Circle.prototype.constructor = Circle;
    +  Circle.prototype.recalculate = function(){
    +    this.geometry = createCircle(this.properties.center, this.properties.radius, this.properties.steps);
    +    return this;
    +  };
    +  Circle.prototype.center = function(coordinates){
    +    if(coordinates){
    +      this.properties.center = coordinates;
    +      this.recalculate();
    +    }
    +    return this.properties.center;
    +  };
    +  Circle.prototype.radius = function(radius){
    +    if(radius){
    +      this.properties.radius = radius;
    +      this.recalculate();
    +    }
    +    return this.properties.radius;
    +  };
    +  Circle.prototype.steps = function(steps){
    +    if(steps){
    +      this.properties.steps = steps;
    +      this.recalculate();
    +    }
    +    return this.properties.steps;
    +  };
    + 
    +  Circle.prototype.toJSON = function() {
    +    var output = Primitive.prototype.toJSON.call(this);
    +    return output;
    +  };
    + 
    +  exports.Primitive = Primitive;
    +  exports.Point = Point;
    +  exports.MultiPoint = MultiPoint;
    +  exports.LineString = LineString;
    +  exports.MultiLineString = MultiLineString;
    +  exports.Polygon = Polygon;
    +  exports.MultiPolygon = MultiPolygon;
    +  exports.Feature = Feature;
    +  exports.FeatureCollection = FeatureCollection;
    +  exports.GeometryCollection = GeometryCollection;
    +  exports.Circle = Circle;
    + 
    +  exports.toMercator = toMercator;
    +  exports.toGeographic = toGeographic;
    + 
    +  exports.Tools = {};
    +  exports.Tools.positionToMercator = positionToMercator;
    +  exports.Tools.positionToGeographic = positionToGeographic;
    +  exports.Tools.applyConverter = applyConverter;
    +  exports.Tools.toMercator = toMercator;
    +  exports.Tools.toGeographic = toGeographic;
    +  exports.Tools.createCircle = createCircle;
    + 
    +  exports.Tools.calculateBounds = calculateBounds;
    +  exports.Tools.calculateEnvelope = calculateEnvelope;
    + 
    +  exports.Tools.coordinatesContainPoint = coordinatesContainPoint;
    +  exports.Tools.polygonContainsPoint = polygonContainsPoint;
    +  exports.Tools.arraysIntersectArrays = arraysIntersectArrays;
    +  exports.Tools.coordinatesContainPoint = coordinatesContainPoint;
    +  exports.Tools.coordinatesEqual = coordinatesEqual;
    +  exports.Tools.convexHull = convexHull;
    +  exports.Tools.isConvex = isConvex;
    + 
    +  exports.MercatorCRS = MercatorCRS;
    +  exports.GeographicCRS = GeographicCRS;
    + 
    +  return exports;
    +}));
    + 
    +
    +
    + + + + + + + diff --git a/node_modules/terraformer/.coverage/base.css b/node_modules/terraformer/.coverage/base.css new file mode 100644 index 0000000..29737bc --- /dev/null +++ b/node_modules/terraformer/.coverage/base.css @@ -0,0 +1,213 @@ +body, html { + margin:0; padding: 0; + height: 100%; +} +body { + font-family: Helvetica Neue, Helvetica, Arial; + font-size: 14px; + color:#333; +} +.small { font-size: 12px; } +*, *:after, *:before { + -webkit-box-sizing:border-box; + -moz-box-sizing:border-box; + box-sizing:border-box; + } +h1 { font-size: 20px; margin: 0;} +h2 { font-size: 14px; } +pre { + font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace; + margin: 0; + padding: 0; + -moz-tab-size: 2; + -o-tab-size: 2; + tab-size: 2; +} +a { color:#0074D9; text-decoration:none; } +a:hover { text-decoration:underline; } +.strong { font-weight: bold; } +.space-top1 { padding: 10px 0 0 0; } +.pad2y { padding: 20px 0; } +.pad1y { padding: 10px 0; } +.pad2x { padding: 0 20px; } +.pad2 { padding: 20px; } +.pad1 { padding: 10px; } +.space-left2 { padding-left:55px; } +.space-right2 { padding-right:20px; } +.center { text-align:center; } +.clearfix { display:block; } +.clearfix:after { + content:''; + display:block; + height:0; + clear:both; + visibility:hidden; + } +.fl { float: left; } +@media only screen and (max-width:640px) { + .col3 { width:100%; max-width:100%; } + .hide-mobile { display:none!important; } +} + +.quiet { + color: #7f7f7f; + color: rgba(0,0,0,0.5); +} +.quiet a { opacity: 0.7; } + +.fraction { + font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; + font-size: 10px; + color: #555; + background: #E8E8E8; + padding: 4px 5px; + border-radius: 3px; + vertical-align: middle; +} + +div.path a:link, div.path a:visited { color: #333; } +table.coverage { + border-collapse: collapse; + margin: 10px 0 0 0; + padding: 0; +} + +table.coverage td { + margin: 0; + padding: 0; + vertical-align: top; +} +table.coverage td.line-count { + text-align: right; + padding: 0 5px 0 20px; +} +table.coverage td.line-coverage { + text-align: right; + padding-right: 10px; + min-width:20px; +} + +table.coverage td span.cline-any { + display: inline-block; + padding: 0 5px; + width: 100%; +} +.missing-if-branch { + display: inline-block; + margin-right: 5px; + border-radius: 3px; + position: relative; + padding: 0 4px; + background: #333; + color: yellow; +} + +.skip-if-branch { + display: none; + margin-right: 10px; + position: relative; + padding: 0 4px; + background: #ccc; + color: white; +} +.missing-if-branch .typ, .skip-if-branch .typ { + color: inherit !important; +} +.coverage-summary { + border-collapse: collapse; + width: 100%; +} +.coverage-summary tr { border-bottom: 1px solid #bbb; } +.keyline-all { border: 1px solid #ddd; } +.coverage-summary td, .coverage-summary th { padding: 10px; } +.coverage-summary tbody { border: 1px solid #bbb; } +.coverage-summary td { border-right: 1px solid #bbb; } +.coverage-summary td:last-child { border-right: none; } +.coverage-summary th { + text-align: left; + font-weight: normal; + white-space: nowrap; +} +.coverage-summary th.file { border-right: none !important; } +.coverage-summary th.pct { } +.coverage-summary th.pic, +.coverage-summary th.abs, +.coverage-summary td.pct, +.coverage-summary td.abs { text-align: right; } +.coverage-summary td.file { white-space: nowrap; } +.coverage-summary td.pic { min-width: 120px !important; } +.coverage-summary tfoot td { } + +.coverage-summary .sorter { + height: 10px; + width: 7px; + display: inline-block; + margin-left: 0.5em; + background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent; +} +.coverage-summary .sorted .sorter { + background-position: 0 -20px; +} +.coverage-summary .sorted-desc .sorter { + background-position: 0 -10px; +} +.status-line { height: 10px; } +/* dark red */ +.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 } +.low .chart { border:1px solid #C21F39 } +/* medium red */ +.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE } +/* light red */ +.low, .cline-no { background:#FCE1E5 } +/* light green */ +.high, .cline-yes { background:rgb(230,245,208) } +/* medium green */ +.cstat-yes { background:rgb(161,215,106) } +/* dark green */ +.status-line.high, .high .cover-fill { background:rgb(77,146,33) } +.high .chart { border:1px solid rgb(77,146,33) } +/* dark yellow (gold) */ +.medium .chart { border:1px solid #f9cd0b; } +.status-line.medium, .medium .cover-fill { background: #f9cd0b; } +/* light yellow */ +.medium { background: #fff4c2; } +/* light gray */ +span.cline-neutral { background: #eaeaea; } + +.cbranch-no { background: yellow !important; color: #111; } + +.cstat-skip { background: #ddd; color: #111; } +.fstat-skip { background: #ddd; color: #111 !important; } +.cbranch-skip { background: #ddd !important; color: #111; } + + +.cover-fill, .cover-empty { + display:inline-block; + height: 12px; +} +.chart { + line-height: 0; +} +.cover-empty { + background: white; +} +.cover-full { + border-right: none !important; +} +pre.prettyprint { + border: none !important; + padding: 0 !important; + margin: 0 !important; +} +.com { color: #999 !important; } +.ignore-none { color: #999; font-weight: normal; } + +.wrapper { + min-height: 100%; + height: auto !important; + height: 100%; + margin: 0 auto -48px; +} +.footer, .push { + height: 48px; +} diff --git a/node_modules/terraformer/.coverage/coverage.json b/node_modules/terraformer/.coverage/coverage.json new file mode 100644 index 0000000..d72eabe --- /dev/null +++ b/node_modules/terraformer/.coverage/coverage.json @@ -0,0 +1 @@ +{"./terraformer.js":{"path":"./terraformer.js","s":{"1":1,"2":1,"3":0,"4":1,"5":1,"6":1,"7":1,"8":216,"9":1,"10":0,"11":0,"12":0,"13":1,"14":96,"15":685,"16":226,"17":96,"18":1,"19":73,"20":73,"21":6,"22":5,"23":4,"24":3,"25":29,"26":3,"27":15,"28":3,"29":4,"30":1,"31":0,"32":1,"33":32,"34":32,"35":40,"36":40,"37":1600,"38":1600,"39":1600,"40":1600,"41":32,"42":1568,"43":553,"44":1600,"45":32,"46":1568,"47":275,"48":1600,"49":32,"50":1568,"51":323,"52":1600,"53":32,"54":1568,"55":429,"56":32,"57":1,"58":3,"59":3,"60":6,"61":6,"62":7,"63":7,"64":220,"65":220,"66":220,"67":220,"68":3,"69":217,"70":3,"71":220,"72":3,"73":217,"74":119,"75":220,"76":3,"77":217,"78":11,"79":220,"80":3,"81":217,"82":82,"83":3,"84":1,"85":16,"86":16,"87":69,"88":69,"89":69,"90":69,"91":16,"92":53,"93":10,"94":69,"95":16,"96":53,"97":39,"98":69,"99":16,"100":53,"101":21,"102":69,"103":16,"104":53,"105":22,"106":16,"107":1,"108":3,"109":3,"110":5,"111":5,"112":5,"113":3,"114":1,"115":4,"116":4,"117":8,"118":8,"119":8,"120":4,"121":1,"122":13,"123":13,"124":1,"125":5709,"126":1,"127":141,"128":1,"129":1976,"130":5790,"131":1920,"132":5790,"133":1950,"134":1976,"135":1,"136":1903,"137":1903,"138":1903,"139":1,"140":47,"141":47,"142":47,"143":1,"144":50,"145":14,"146":36,"147":6,"148":30,"149":2,"150":4,"151":28,"152":2,"153":4,"154":26,"155":50,"156":36,"157":10,"158":50,"159":33,"160":50,"161":1,"162":10,"163":1,"164":26,"165":1,"166":280,"167":58,"168":222,"169":108,"170":114,"171":1,"172":403,"173":143,"174":260,"175":90,"176":170,"177":94,"178":76,"179":40,"180":36,"181":1,"182":280,"183":1,"184":228,"185":228,"186":228,"187":1,"188":48,"189":48,"190":280,"191":280,"192":108,"193":48,"194":1,"195":14,"196":1,"197":13,"198":1,"199":12,"200":12,"201":48,"202":48,"203":36,"204":12,"205":1,"206":2,"207":2,"208":3,"209":3,"210":3,"211":3,"212":3,"213":3,"214":2,"215":0,"216":2,"217":1,"218":1,"219":1,"220":1,"221":70,"222":70,"223":378,"224":43,"225":70,"226":1,"227":69,"228":68,"229":65,"230":3,"231":2,"232":2,"233":1,"234":1,"235":1,"236":1,"237":1,"238":192,"239":192,"240":192,"241":192,"242":105,"243":105,"244":105,"245":25,"246":167,"247":1,"248":210,"249":1,"250":121,"251":89,"252":41,"253":72,"254":192,"255":25,"256":48,"257":51,"258":31,"259":32,"260":32,"261":23,"262":42,"263":1,"264":48,"265":48,"266":50,"267":50,"268":42,"269":50,"270":48,"271":1,"272":64,"273":94,"274":52,"275":12,"276":1,"277":28,"278":1,"279":27,"280":27,"281":27,"282":46,"283":1,"284":45,"285":137,"286":21,"287":5,"288":1,"289":1,"290":65,"291":55,"292":3,"293":1,"294":7,"295":5,"296":25,"297":8,"298":2,"299":1,"300":2,"301":1,"302":1,"303":1,"304":1,"305":1,"306":1,"307":13,"308":1,"309":13,"310":1,"311":23,"312":23,"313":2,"314":21,"315":7,"316":4,"317":3,"318":14,"319":8,"320":6,"321":8,"322":6,"323":0,"324":2,"325":6,"326":3,"327":2,"328":4,"329":4,"330":2,"331":0,"332":1,"333":3,"334":3,"335":3,"336":12,"337":1,"338":19,"339":19,"340":291,"341":45,"342":19,"343":19,"344":1,"345":0,"346":1,"347":115,"348":115,"349":1,"350":115,"351":2,"352":2,"353":113,"354":9,"355":1,"356":1,"357":1,"358":1,"359":112,"360":19,"361":4,"362":13,"363":1,"364":12,"365":3,"366":108,"367":60,"368":20,"369":20,"370":20,"371":4,"372":16,"373":9,"374":7,"375":40,"376":5,"377":35,"378":22,"379":1,"380":21,"381":39,"382":13,"383":8,"384":13,"385":4,"386":5,"387":5,"388":3,"389":3,"390":1,"391":9,"392":9,"393":12,"394":12,"395":7,"396":2,"397":48,"398":25,"399":2,"400":2,"401":4,"402":4,"403":1,"404":1,"405":23,"406":6,"407":6,"408":6,"409":6,"410":1,"411":5,"412":1,"413":1,"414":2,"415":2,"416":1,"417":1,"418":1,"419":17,"420":9,"421":9,"422":9,"423":4,"424":5,"425":8,"426":3,"427":4,"428":4,"429":2,"430":1,"431":5,"432":5,"433":5,"434":5,"435":4,"436":1,"437":27,"438":1,"439":24,"440":0,"441":24,"442":24,"443":1,"444":23,"445":23,"446":0,"447":0,"448":0,"449":0,"450":0,"451":1,"452":32,"453":32,"454":3,"455":29,"456":19,"457":10,"458":9,"459":1,"460":31,"461":1,"462":1,"463":1,"464":19,"465":1,"466":18,"467":17,"468":1,"469":18,"470":1,"471":1,"472":1,"473":1,"474":2,"475":1,"476":1,"477":2,"478":2,"479":1,"480":1,"481":1,"482":1,"483":2,"484":1,"485":1,"486":2,"487":1,"488":2,"489":1,"490":49,"491":7,"492":42,"493":41,"494":1,"495":48,"496":1,"497":1,"498":1,"499":2,"500":2,"501":1,"502":1,"503":1,"504":1,"505":1,"506":1,"507":1,"508":27,"509":5,"510":22,"511":21,"512":1,"513":26,"514":1,"515":1,"516":1,"517":1,"518":2,"519":1,"520":2,"521":1,"522":97,"523":37,"524":60,"525":59,"526":1,"527":96,"528":1,"529":1,"530":1,"531":1,"532":1,"533":1,"534":2,"535":2,"536":1,"537":1,"538":1,"539":1,"540":0,"541":1,"542":3,"543":1,"544":1,"545":1,"546":1,"547":1,"548":1,"549":1,"550":43,"551":9,"552":34,"553":33,"554":1,"555":42,"556":1,"557":1,"558":1,"559":3,"560":6,"561":1,"562":2,"563":1,"564":1,"565":1,"566":2,"567":1,"568":1,"569":1,"570":23,"571":18,"572":5,"573":5,"574":0,"575":23,"576":1,"577":1,"578":1,"579":6,"580":1,"581":5,"582":5,"583":0,"584":6,"585":1,"586":1,"587":1,"588":2,"589":4,"590":1,"591":2,"592":2,"593":4,"594":2,"595":2,"596":1,"597":8,"598":2,"599":6,"600":6,"601":0,"602":0,"603":0,"604":0,"605":8,"606":1,"607":1,"608":1,"609":1,"610":2,"611":1,"612":2,"613":1,"614":16,"615":16,"616":16,"617":16,"618":1856,"619":1856,"620":16,"621":16,"622":1,"623":14,"624":14,"625":14,"626":1,"627":13,"628":1,"629":1,"630":1,"631":3,"632":3,"633":1,"634":2,"635":1,"636":1,"637":2,"638":1,"639":2,"640":1,"641":1,"642":2,"643":1,"644":2,"645":1,"646":1,"647":2,"648":1,"649":1,"650":1,"651":1,"652":1,"653":1,"654":1,"655":1,"656":1,"657":1,"658":1,"659":1,"660":1,"661":1,"662":1,"663":1,"664":1,"665":1,"666":1,"667":1,"668":1,"669":1,"670":1,"671":1,"672":1,"673":1,"674":1,"675":1,"676":1,"677":1,"678":1,"679":1,"680":1,"681":1,"682":1},"b":{"1":[0,1],"2":[1,0],"3":[1,0],"4":[0,0],"5":[0,0],"6":[226,459],"7":[73,0],"8":[6,5,4,3,29,3,15,3,4,1],"9":[13,2],"10":[32,1568],"11":[553,1015],"12":[32,1568],"13":[275,1293],"14":[32,1568],"15":[323,1245],"16":[32,1568],"17":[429,1139],"18":[3,217],"19":[3,214],"20":[3,217],"21":[119,98],"22":[3,217],"23":[11,206],"24":[3,217],"25":[82,135],"26":[16,53],"27":[10,43],"28":[16,53],"29":[39,14],"30":[16,53],"31":[21,32],"32":[16,53],"33":[22,31],"34":[1920,3870],"35":[1950,3840],"36":[14,36],"37":[6,30],"38":[2,28],"39":[2,26],"40":[36,14],"41":[10,26],"42":[33,17],"43":[58,222],"44":[108,114],"45":[143,260],"46":[90,170],"47":[94,76],"48":[40,36],"49":[108,172],"50":[280,222,114],"51":[1,13],"52":[1,12],"53":[36,12],"54":[2,1],"55":[0,2],"56":[1,0],"57":[1,0,1,1],"58":[43,335],"59":[378,195,333,195,90],"60":[68,1],"61":[69,69],"62":[65,3],"63":[2,1],"64":[1,1],"65":[105,87],"66":[25,80],"67":[105,68,26,25],"68":[210,210],"69":[89,32],"70":[41,48],"71":[25,167],"72":[31,20],"73":[23,9],"74":[42,8],"75":[52,42],"76":[1,27],"77":[1,45],"78":[21,116],"79":[55,10],"80":[3,1,7,5,25,8,2,1,2,1],"81":[2,21],"82":[7,14],"83":[21,17],"84":[4,3],"85":[7,7],"86":[8,6],"87":[14,8],"88":[6,2],"89":[8,8],"90":[0,6],"91":[3,3],"92":[2,1],"93":[3,3],"94":[0,2],"95":[3,0],"96":[45,246],"97":[291,45],"98":[1,114],"99":[2,113],"100":[2,0],"101":[9,104],"102":[1,8],"103":[1,0],"104":[19,93],"105":[112,95],"106":[4,15],"107":[1,12],"108":[3,9],"109":[60,48],"110":[20,40],"111":[20,0],"112":[4,16],"113":[9,7],"114":[16,16],"115":[5,35],"116":[22,13],"117":[35,16],"118":[1,21],"119":[22,22],"120":[13,26],"121":[4,9],"122":[3,2],"123":[9,0],"124":[7,5],"125":[25,23],"126":[2,23],"127":[2,0],"128":[1,3],"129":[4,1],"130":[6,17],"131":[6,0],"132":[1,5],"133":[1,4],"134":[1,0],"135":[1,1],"136":[9,8],"137":[17,9],"138":[4,5],"139":[3,5],"140":[2,2],"141":[5,0],"142":[4,1],"143":[0,24],"144":[1,23],"145":[24,23],"146":[23,0],"147":[23,23,23,23],"148":[0,0],"149":[3,29],"150":[32,32,3],"151":[19,10],"152":[29,29],"153":[9,1],"154":[1,18],"155":[19,19,1],"156":[17,1],"157":[1,1],"158":[7,42],"159":[49,49,7],"160":[41,1],"161":[5,22],"162":[27,27,5],"163":[21,1],"164":[37,60],"165":[97,97,37],"166":[59,1],"167":[1,0],"168":[9,34],"169":[43,43,9],"170":[33,1],"171":[18,5],"172":[23,23],"173":[5,0],"174":[5,5,5],"175":[1,5],"176":[6,6,1],"177":[5,0],"178":[2,2],"179":[2,6],"180":[8,8,2],"181":[6,0],"182":[0,0],"183":[0,0],"184":[16,0],"185":[14,2],"186":[14,1],"187":[1,13],"188":[14,13,13,13],"189":[1,1],"190":[1,1],"191":[1,1]},"f":{"1":1,"2":1,"3":216,"4":0,"5":96,"6":73,"7":32,"8":3,"9":16,"10":3,"11":4,"12":13,"13":5709,"14":141,"15":1976,"16":1903,"17":47,"18":50,"19":10,"20":26,"21":280,"22":403,"23":280,"24":228,"25":48,"26":14,"27":2,"28":70,"29":69,"30":192,"31":210,"32":121,"33":48,"34":64,"35":28,"36":65,"37":1,"38":1,"39":13,"40":13,"41":23,"42":19,"43":0,"44":115,"45":24,"46":32,"47":19,"48":1,"49":2,"50":1,"51":2,"52":2,"53":49,"54":2,"55":1,"56":1,"57":27,"58":1,"59":2,"60":97,"61":1,"62":2,"63":1,"64":0,"65":3,"66":1,"67":43,"68":3,"69":2,"70":1,"71":2,"72":23,"73":6,"74":2,"75":2,"76":4,"77":8,"78":1,"79":2,"80":16,"81":14,"82":3,"83":2,"84":2,"85":2,"86":1},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":1},"end":{"line":1,"column":26}}},"2":{"name":"(anonymous_2)","line":13,"loc":{"start":{"line":13,"column":8},"end":{"line":13,"column":18}}},"3":{"name":"isArray","line":36,"loc":{"start":{"line":36,"column":2},"end":{"line":36,"column":24}}},"4":{"name":"warn","line":43,"loc":{"start":{"line":43,"column":2},"end":{"line":43,"column":18}}},"5":{"name":"extend","line":54,"loc":{"start":{"line":54,"column":2},"end":{"line":54,"column":39}}},"6":{"name":"calculateBounds","line":66,"loc":{"start":{"line":66,"column":2},"end":{"line":66,"column":37}}},"7":{"name":"calculateBoundsFromNestedArrays","line":117,"loc":{"start":{"line":117,"column":2},"end":{"line":117,"column":51}}},"8":{"name":"calculateBoundsFromNestedArrayOfArrays","line":166,"loc":{"start":{"line":166,"column":2},"end":{"line":166,"column":58}}},"9":{"name":"calculateBoundsFromArray","line":216,"loc":{"start":{"line":216,"column":2},"end":{"line":216,"column":44}}},"10":{"name":"calculateBoundsForFeatureCollection","line":255,"loc":{"start":{"line":255,"column":2},"end":{"line":255,"column":65}}},"11":{"name":"calculateBoundsForGeometryCollection","line":269,"loc":{"start":{"line":269,"column":2},"end":{"line":269,"column":67}}},"12":{"name":"calculateEnvelope","line":281,"loc":{"start":{"line":281,"column":2},"end":{"line":281,"column":37}}},"13":{"name":"radToDeg","line":294,"loc":{"start":{"line":294,"column":2},"end":{"line":294,"column":25}}},"14":{"name":"degToRad","line":301,"loc":{"start":{"line":301,"column":2},"end":{"line":301,"column":25}}},"15":{"name":"eachPosition","line":308,"loc":{"start":{"line":308,"column":2},"end":{"line":308,"column":43}}},"16":{"name":"positionToGeographic","line":325,"loc":{"start":{"line":325,"column":2},"end":{"line":325,"column":42}}},"17":{"name":"positionToMercator","line":334,"loc":{"start":{"line":334,"column":2},"end":{"line":334,"column":40}}},"18":{"name":"applyConverter","line":343,"loc":{"start":{"line":343,"column":2},"end":{"line":343,"column":52}}},"19":{"name":"toMercator","line":376,"loc":{"start":{"line":376,"column":2},"end":{"line":376,"column":31}}},"20":{"name":"toGeographic","line":383,"loc":{"start":{"line":383,"column":2},"end":{"line":383,"column":33}}},"21":{"name":"cmp","line":391,"loc":{"start":{"line":391,"column":2},"end":{"line":391,"column":21}}},"22":{"name":"compSort","line":404,"loc":{"start":{"line":404,"column":2},"end":{"line":404,"column":28}}},"23":{"name":"turn","line":422,"loc":{"start":{"line":422,"column":2},"end":{"line":422,"column":25}}},"24":{"name":"euclideanDistance","line":430,"loc":{"start":{"line":430,"column":2},"end":{"line":430,"column":35}}},"25":{"name":"nextHullPoint","line":438,"loc":{"start":{"line":438,"column":2},"end":{"line":438,"column":36}}},"26":{"name":"convexHull","line":450,"loc":{"start":{"line":450,"column":2},"end":{"line":450,"column":30}}},"27":{"name":"isConvex","line":474,"loc":{"start":{"line":474,"column":2},"end":{"line":474,"column":28}}},"28":{"name":"coordinatesContainPoint","line":502,"loc":{"start":{"line":502,"column":2},"end":{"line":502,"column":55}}},"29":{"name":"polygonContainsPoint","line":514,"loc":{"start":{"line":514,"column":2},"end":{"line":514,"column":48}}},"30":{"name":"edgeIntersectsEdge","line":536,"loc":{"start":{"line":536,"column":2},"end":{"line":536,"column":46}}},"31":{"name":"isNumber","line":553,"loc":{"start":{"line":553,"column":2},"end":{"line":553,"column":23}}},"32":{"name":"arraysIntersectArrays","line":557,"loc":{"start":{"line":557,"column":2},"end":{"line":557,"column":39}}},"33":{"name":"closedPolygon","line":587,"loc":{"start":{"line":587,"column":2},"end":{"line":587,"column":38}}},"34":{"name":"pointsEqual","line":602,"loc":{"start":{"line":602,"column":2},"end":{"line":602,"column":29}}},"35":{"name":"coordinatesEqual","line":613,"loc":{"start":{"line":613,"column":2},"end":{"line":613,"column":34}}},"36":{"name":"Primitive","line":643,"loc":{"start":{"line":643,"column":2},"end":{"line":643,"column":29}}},"37":{"name":"(anonymous_37)","line":679,"loc":{"start":{"line":679,"column":35},"end":{"line":679,"column":45}}},"38":{"name":"(anonymous_38)","line":683,"loc":{"start":{"line":683,"column":37},"end":{"line":683,"column":47}}},"39":{"name":"(anonymous_39)","line":687,"loc":{"start":{"line":687,"column":33},"end":{"line":687,"column":43}}},"40":{"name":"(anonymous_40)","line":691,"loc":{"start":{"line":691,"column":29},"end":{"line":691,"column":39}}},"41":{"name":"(anonymous_41)","line":695,"loc":{"start":{"line":695,"column":35},"end":{"line":695,"column":45}}},"42":{"name":"(anonymous_42)","line":740,"loc":{"start":{"line":740,"column":31},"end":{"line":740,"column":41}}},"43":{"name":"(anonymous_43)","line":751,"loc":{"start":{"line":751,"column":33},"end":{"line":751,"column":52}}},"44":{"name":"(anonymous_44)","line":755,"loc":{"start":{"line":755,"column":31},"end":{"line":755,"column":51}}},"45":{"name":"(anonymous_45)","line":945,"loc":{"start":{"line":945,"column":35},"end":{"line":945,"column":55}}},"46":{"name":"Point","line":982,"loc":{"start":{"line":982,"column":2},"end":{"line":982,"column":23}}},"47":{"name":"MultiPoint","line":1010,"loc":{"start":{"line":1010,"column":2},"end":{"line":1010,"column":28}}},"48":{"name":"(anonymous_48)","line":1024,"loc":{"start":{"line":1024,"column":33},"end":{"line":1024,"column":47}}},"49":{"name":"(anonymous_49)","line":1030,"loc":{"start":{"line":1030,"column":34},"end":{"line":1030,"column":49}}},"50":{"name":"(anonymous_50)","line":1034,"loc":{"start":{"line":1034,"column":37},"end":{"line":1034,"column":59}}},"51":{"name":"(anonymous_51)","line":1038,"loc":{"start":{"line":1038,"column":37},"end":{"line":1038,"column":53}}},"52":{"name":"(anonymous_52)","line":1046,"loc":{"start":{"line":1046,"column":29},"end":{"line":1046,"column":40}}},"53":{"name":"LineString","line":1059,"loc":{"start":{"line":1059,"column":2},"end":{"line":1059,"column":28}}},"54":{"name":"(anonymous_54)","line":1073,"loc":{"start":{"line":1073,"column":35},"end":{"line":1073,"column":50}}},"55":{"name":"(anonymous_55)","line":1077,"loc":{"start":{"line":1077,"column":38},"end":{"line":1077,"column":60}}},"56":{"name":"(anonymous_56)","line":1081,"loc":{"start":{"line":1081,"column":38},"end":{"line":1081,"column":54}}},"57":{"name":"MultiLineString","line":1095,"loc":{"start":{"line":1095,"column":2},"end":{"line":1095,"column":33}}},"58":{"name":"(anonymous_58)","line":1109,"loc":{"start":{"line":1109,"column":38},"end":{"line":1109,"column":52}}},"59":{"name":"(anonymous_59)","line":1114,"loc":{"start":{"line":1114,"column":34},"end":{"line":1114,"column":45}}},"60":{"name":"Polygon","line":1127,"loc":{"start":{"line":1127,"column":2},"end":{"line":1127,"column":25}}},"61":{"name":"(anonymous_61)","line":1141,"loc":{"start":{"line":1141,"column":32},"end":{"line":1141,"column":47}}},"62":{"name":"(anonymous_62)","line":1145,"loc":{"start":{"line":1145,"column":35},"end":{"line":1145,"column":57}}},"63":{"name":"(anonymous_63)","line":1149,"loc":{"start":{"line":1149,"column":35},"end":{"line":1149,"column":51}}},"64":{"name":"(anonymous_64)","line":1153,"loc":{"start":{"line":1153,"column":28},"end":{"line":1153,"column":39}}},"65":{"name":"(anonymous_65)","line":1156,"loc":{"start":{"line":1156,"column":31},"end":{"line":1156,"column":42}}},"66":{"name":"(anonymous_66)","line":1159,"loc":{"start":{"line":1159,"column":28},"end":{"line":1159,"column":39}}},"67":{"name":"MultiPolygon","line":1178,"loc":{"start":{"line":1178,"column":2},"end":{"line":1178,"column":30}}},"68":{"name":"(anonymous_68)","line":1192,"loc":{"start":{"line":1192,"column":35},"end":{"line":1192,"column":49}}},"69":{"name":"(anonymous_69)","line":1197,"loc":{"start":{"line":1197,"column":31},"end":{"line":1197,"column":42}}},"70":{"name":"(anonymous_70)","line":1200,"loc":{"start":{"line":1200,"column":33},"end":{"line":1200,"column":43}}},"71":{"name":"(anonymous_71)","line":1202,"loc":{"start":{"line":1202,"column":17},"end":{"line":1202,"column":34}}},"72":{"name":"Feature","line":1224,"loc":{"start":{"line":1224,"column":2},"end":{"line":1224,"column":25}}},"73":{"name":"FeatureCollection","line":1248,"loc":{"start":{"line":1248,"column":2},"end":{"line":1248,"column":35}}},"74":{"name":"(anonymous_74)","line":1262,"loc":{"start":{"line":1262,"column":40},"end":{"line":1262,"column":54}}},"75":{"name":"(anonymous_75)","line":1267,"loc":{"start":{"line":1267,"column":36},"end":{"line":1267,"column":48}}},"76":{"name":"(anonymous_76)","line":1269,"loc":{"start":{"line":1269,"column":17},"end":{"line":1269,"column":34}}},"77":{"name":"GeometryCollection","line":1286,"loc":{"start":{"line":1286,"column":2},"end":{"line":1286,"column":36}}},"78":{"name":"(anonymous_78)","line":1303,"loc":{"start":{"line":1303,"column":41},"end":{"line":1303,"column":55}}},"79":{"name":"(anonymous_79)","line":1308,"loc":{"start":{"line":1308,"column":37},"end":{"line":1308,"column":48}}},"80":{"name":"createCircle","line":1312,"loc":{"start":{"line":1312,"column":2},"end":{"line":1312,"column":52}}},"81":{"name":"Circle","line":1328,"loc":{"start":{"line":1328,"column":2},"end":{"line":1328,"column":48}}},"82":{"name":"(anonymous_82)","line":1349,"loc":{"start":{"line":1349,"column":33},"end":{"line":1349,"column":43}}},"83":{"name":"(anonymous_83)","line":1353,"loc":{"start":{"line":1353,"column":28},"end":{"line":1353,"column":49}}},"84":{"name":"(anonymous_84)","line":1360,"loc":{"start":{"line":1360,"column":28},"end":{"line":1360,"column":44}}},"85":{"name":"(anonymous_85)","line":1367,"loc":{"start":{"line":1367,"column":27},"end":{"line":1367,"column":42}}},"86":{"name":"(anonymous_86)","line":1375,"loc":{"start":{"line":1375,"column":28},"end":{"line":1375,"column":39}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1418,"column":4}},"2":{"start":{"line":4,"column":2},"end":{"line":6,"column":3}},"3":{"start":{"line":5,"column":4},"end":{"line":5,"column":41}},"4":{"start":{"line":9,"column":2},"end":{"line":11,"column":3}},"5":{"start":{"line":10,"column":4},"end":{"line":10,"column":33}},"6":{"start":{"line":14,"column":2},"end":{"line":31,"column":8}},"7":{"start":{"line":36,"column":2},"end":{"line":38,"column":3}},"8":{"start":{"line":37,"column":4},"end":{"line":37,"column":68}},"9":{"start":{"line":43,"column":2},"end":{"line":49,"column":3}},"10":{"start":{"line":44,"column":4},"end":{"line":44,"column":54}},"11":{"start":{"line":46,"column":4},"end":{"line":48,"column":5}},"12":{"start":{"line":47,"column":6},"end":{"line":47,"column":40}},"13":{"start":{"line":54,"column":2},"end":{"line":61,"column":3}},"14":{"start":{"line":55,"column":4},"end":{"line":59,"column":5}},"15":{"start":{"line":56,"column":6},"end":{"line":58,"column":7}},"16":{"start":{"line":57,"column":8},"end":{"line":57,"column":35}},"17":{"start":{"line":60,"column":4},"end":{"line":60,"column":23}},"18":{"start":{"line":66,"column":2},"end":{"line":101,"column":3}},"19":{"start":{"line":67,"column":4},"end":{"line":99,"column":5}},"20":{"start":{"line":68,"column":6},"end":{"line":98,"column":7}},"21":{"start":{"line":70,"column":10},"end":{"line":70,"column":115}},"22":{"start":{"line":73,"column":10},"end":{"line":73,"column":63}},"23":{"start":{"line":76,"column":10},"end":{"line":76,"column":63}},"24":{"start":{"line":79,"column":10},"end":{"line":79,"column":70}},"25":{"start":{"line":82,"column":10},"end":{"line":82,"column":70}},"26":{"start":{"line":85,"column":10},"end":{"line":85,"column":77}},"27":{"start":{"line":88,"column":10},"end":{"line":88,"column":76}},"28":{"start":{"line":91,"column":10},"end":{"line":91,"column":62}},"29":{"start":{"line":94,"column":10},"end":{"line":94,"column":63}},"30":{"start":{"line":97,"column":10},"end":{"line":97,"column":59}},"31":{"start":{"line":100,"column":4},"end":{"line":100,"column":16}},"32":{"start":{"line":117,"column":2},"end":{"line":156,"column":3}},"33":{"start":{"line":118,"column":4},"end":{"line":118,"column":51}},"34":{"start":{"line":120,"column":4},"end":{"line":153,"column":5}},"35":{"start":{"line":121,"column":6},"end":{"line":121,"column":27}},"36":{"start":{"line":123,"column":6},"end":{"line":152,"column":7}},"37":{"start":{"line":124,"column":8},"end":{"line":124,"column":30}},"38":{"start":{"line":126,"column":8},"end":{"line":126,"column":28}},"39":{"start":{"line":127,"column":8},"end":{"line":127,"column":28}},"40":{"start":{"line":129,"column":8},"end":{"line":133,"column":9}},"41":{"start":{"line":130,"column":10},"end":{"line":130,"column":19}},"42":{"start":{"line":131,"column":15},"end":{"line":133,"column":9}},"43":{"start":{"line":132,"column":10},"end":{"line":132,"column":19}},"44":{"start":{"line":135,"column":8},"end":{"line":139,"column":9}},"45":{"start":{"line":136,"column":10},"end":{"line":136,"column":19}},"46":{"start":{"line":137,"column":15},"end":{"line":139,"column":9}},"47":{"start":{"line":138,"column":10},"end":{"line":138,"column":19}},"48":{"start":{"line":141,"column":8},"end":{"line":145,"column":9}},"49":{"start":{"line":142,"column":10},"end":{"line":142,"column":19}},"50":{"start":{"line":143,"column":15},"end":{"line":145,"column":9}},"51":{"start":{"line":144,"column":10},"end":{"line":144,"column":19}},"52":{"start":{"line":147,"column":8},"end":{"line":151,"column":9}},"53":{"start":{"line":148,"column":10},"end":{"line":148,"column":19}},"54":{"start":{"line":149,"column":15},"end":{"line":151,"column":9}},"55":{"start":{"line":150,"column":10},"end":{"line":150,"column":19}},"56":{"start":{"line":155,"column":4},"end":{"line":155,"column":29}},"57":{"start":{"line":166,"column":2},"end":{"line":208,"column":3}},"58":{"start":{"line":167,"column":4},"end":{"line":167,"column":51}},"59":{"start":{"line":169,"column":4},"end":{"line":205,"column":5}},"60":{"start":{"line":170,"column":6},"end":{"line":170,"column":27}},"61":{"start":{"line":172,"column":6},"end":{"line":204,"column":7}},"62":{"start":{"line":173,"column":8},"end":{"line":173,"column":34}},"63":{"start":{"line":174,"column":8},"end":{"line":203,"column":9}},"64":{"start":{"line":175,"column":10},"end":{"line":175,"column":37}},"65":{"start":{"line":177,"column":10},"end":{"line":177,"column":30}},"66":{"start":{"line":178,"column":10},"end":{"line":178,"column":30}},"67":{"start":{"line":180,"column":10},"end":{"line":184,"column":11}},"68":{"start":{"line":181,"column":12},"end":{"line":181,"column":21}},"69":{"start":{"line":182,"column":17},"end":{"line":184,"column":11}},"70":{"start":{"line":183,"column":12},"end":{"line":183,"column":21}},"71":{"start":{"line":186,"column":10},"end":{"line":190,"column":11}},"72":{"start":{"line":187,"column":12},"end":{"line":187,"column":21}},"73":{"start":{"line":188,"column":17},"end":{"line":190,"column":11}},"74":{"start":{"line":189,"column":12},"end":{"line":189,"column":21}},"75":{"start":{"line":192,"column":10},"end":{"line":196,"column":11}},"76":{"start":{"line":193,"column":12},"end":{"line":193,"column":21}},"77":{"start":{"line":194,"column":17},"end":{"line":196,"column":11}},"78":{"start":{"line":195,"column":12},"end":{"line":195,"column":21}},"79":{"start":{"line":198,"column":10},"end":{"line":202,"column":11}},"80":{"start":{"line":199,"column":12},"end":{"line":199,"column":21}},"81":{"start":{"line":200,"column":17},"end":{"line":202,"column":11}},"82":{"start":{"line":201,"column":12},"end":{"line":201,"column":21}},"83":{"start":{"line":207,"column":4},"end":{"line":207,"column":28}},"84":{"start":{"line":216,"column":2},"end":{"line":250,"column":3}},"85":{"start":{"line":217,"column":4},"end":{"line":217,"column":51}},"86":{"start":{"line":219,"column":4},"end":{"line":247,"column":5}},"87":{"start":{"line":220,"column":6},"end":{"line":220,"column":28}},"88":{"start":{"line":221,"column":6},"end":{"line":221,"column":26}},"89":{"start":{"line":222,"column":6},"end":{"line":222,"column":26}},"90":{"start":{"line":224,"column":6},"end":{"line":228,"column":7}},"91":{"start":{"line":225,"column":8},"end":{"line":225,"column":17}},"92":{"start":{"line":226,"column":13},"end":{"line":228,"column":7}},"93":{"start":{"line":227,"column":8},"end":{"line":227,"column":17}},"94":{"start":{"line":230,"column":6},"end":{"line":234,"column":7}},"95":{"start":{"line":231,"column":8},"end":{"line":231,"column":17}},"96":{"start":{"line":232,"column":13},"end":{"line":234,"column":7}},"97":{"start":{"line":233,"column":8},"end":{"line":233,"column":17}},"98":{"start":{"line":236,"column":6},"end":{"line":240,"column":7}},"99":{"start":{"line":237,"column":8},"end":{"line":237,"column":17}},"100":{"start":{"line":238,"column":13},"end":{"line":240,"column":7}},"101":{"start":{"line":239,"column":8},"end":{"line":239,"column":17}},"102":{"start":{"line":242,"column":6},"end":{"line":246,"column":7}},"103":{"start":{"line":243,"column":8},"end":{"line":243,"column":17}},"104":{"start":{"line":244,"column":13},"end":{"line":246,"column":7}},"105":{"start":{"line":245,"column":8},"end":{"line":245,"column":17}},"106":{"start":{"line":249,"column":4},"end":{"line":249,"column":29}},"107":{"start":{"line":255,"column":2},"end":{"line":264,"column":3}},"108":{"start":{"line":256,"column":4},"end":{"line":256,"column":29}},"109":{"start":{"line":257,"column":4},"end":{"line":261,"column":5}},"110":{"start":{"line":258,"column":6},"end":{"line":258,"column":71}},"111":{"start":{"line":259,"column":6},"end":{"line":259,"column":42}},"112":{"start":{"line":260,"column":6},"end":{"line":260,"column":42}},"113":{"start":{"line":263,"column":4},"end":{"line":263,"column":45}},"114":{"start":{"line":269,"column":2},"end":{"line":279,"column":3}},"115":{"start":{"line":270,"column":4},"end":{"line":270,"column":29}},"116":{"start":{"line":272,"column":4},"end":{"line":276,"column":5}},"117":{"start":{"line":273,"column":6},"end":{"line":273,"column":65}},"118":{"start":{"line":274,"column":6},"end":{"line":274,"column":42}},"119":{"start":{"line":275,"column":6},"end":{"line":275,"column":42}},"120":{"start":{"line":278,"column":4},"end":{"line":278,"column":45}},"121":{"start":{"line":281,"column":2},"end":{"line":289,"column":3}},"122":{"start":{"line":282,"column":4},"end":{"line":282,"column":42}},"123":{"start":{"line":283,"column":4},"end":{"line":288,"column":6}},"124":{"start":{"line":294,"column":2},"end":{"line":296,"column":3}},"125":{"start":{"line":295,"column":4},"end":{"line":295,"column":34}},"126":{"start":{"line":301,"column":2},"end":{"line":303,"column":3}},"127":{"start":{"line":302,"column":4},"end":{"line":302,"column":34}},"128":{"start":{"line":308,"column":2},"end":{"line":320,"column":3}},"129":{"start":{"line":309,"column":4},"end":{"line":318,"column":5}},"130":{"start":{"line":311,"column":6},"end":{"line":313,"column":7}},"131":{"start":{"line":312,"column":8},"end":{"line":312,"column":46}},"132":{"start":{"line":315,"column":6},"end":{"line":317,"column":7}},"133":{"start":{"line":316,"column":8},"end":{"line":316,"column":60}},"134":{"start":{"line":319,"column":4},"end":{"line":319,"column":23}},"135":{"start":{"line":325,"column":2},"end":{"line":329,"column":3}},"136":{"start":{"line":326,"column":4},"end":{"line":326,"column":24}},"137":{"start":{"line":327,"column":4},"end":{"line":327,"column":24}},"138":{"start":{"line":328,"column":4},"end":{"line":328,"column":178}},"139":{"start":{"line":334,"column":2},"end":{"line":338,"column":3}},"140":{"start":{"line":335,"column":4},"end":{"line":335,"column":26}},"141":{"start":{"line":336,"column":4},"end":{"line":336,"column":67}},"142":{"start":{"line":337,"column":4},"end":{"line":337,"column":138}},"143":{"start":{"line":343,"column":2},"end":{"line":371,"column":3}},"144":{"start":{"line":344,"column":4},"end":{"line":358,"column":5}},"145":{"start":{"line":345,"column":6},"end":{"line":345,"column":59}},"146":{"start":{"line":346,"column":11},"end":{"line":358,"column":5}},"147":{"start":{"line":347,"column":6},"end":{"line":347,"column":75}},"148":{"start":{"line":348,"column":11},"end":{"line":358,"column":5}},"149":{"start":{"line":349,"column":6},"end":{"line":351,"column":7}},"150":{"start":{"line":350,"column":8},"end":{"line":350,"column":83}},"151":{"start":{"line":352,"column":11},"end":{"line":358,"column":5}},"152":{"start":{"line":353,"column":6},"end":{"line":355,"column":7}},"153":{"start":{"line":354,"column":8},"end":{"line":354,"column":87}},"154":{"start":{"line":357,"column":6},"end":{"line":357,"column":73}},"155":{"start":{"line":360,"column":4},"end":{"line":364,"column":5}},"156":{"start":{"line":361,"column":6},"end":{"line":363,"column":7}},"157":{"start":{"line":362,"column":8},"end":{"line":362,"column":34}},"158":{"start":{"line":366,"column":4},"end":{"line":368,"column":5}},"159":{"start":{"line":367,"column":6},"end":{"line":367,"column":25}},"160":{"start":{"line":370,"column":4},"end":{"line":370,"column":19}},"161":{"start":{"line":376,"column":2},"end":{"line":378,"column":3}},"162":{"start":{"line":377,"column":4},"end":{"line":377,"column":55}},"163":{"start":{"line":383,"column":2},"end":{"line":385,"column":3}},"164":{"start":{"line":384,"column":4},"end":{"line":384,"column":57}},"165":{"start":{"line":391,"column":2},"end":{"line":399,"column":3}},"166":{"start":{"line":392,"column":4},"end":{"line":398,"column":5}},"167":{"start":{"line":393,"column":6},"end":{"line":393,"column":16}},"168":{"start":{"line":394,"column":11},"end":{"line":398,"column":5}},"169":{"start":{"line":395,"column":6},"end":{"line":395,"column":15}},"170":{"start":{"line":397,"column":6},"end":{"line":397,"column":15}},"171":{"start":{"line":404,"column":2},"end":{"line":416,"column":3}},"172":{"start":{"line":405,"column":4},"end":{"line":415,"column":5}},"173":{"start":{"line":406,"column":6},"end":{"line":406,"column":16}},"174":{"start":{"line":407,"column":11},"end":{"line":415,"column":5}},"175":{"start":{"line":408,"column":6},"end":{"line":408,"column":15}},"176":{"start":{"line":409,"column":11},"end":{"line":415,"column":5}},"177":{"start":{"line":410,"column":6},"end":{"line":410,"column":16}},"178":{"start":{"line":411,"column":11},"end":{"line":415,"column":5}},"179":{"start":{"line":412,"column":6},"end":{"line":412,"column":15}},"180":{"start":{"line":414,"column":6},"end":{"line":414,"column":15}},"181":{"start":{"line":422,"column":2},"end":{"line":425,"column":3}},"182":{"start":{"line":424,"column":4},"end":{"line":424,"column":81}},"183":{"start":{"line":430,"column":2},"end":{"line":436,"column":3}},"184":{"start":{"line":432,"column":4},"end":{"line":432,"column":25}},"185":{"start":{"line":433,"column":4},"end":{"line":433,"column":25}},"186":{"start":{"line":435,"column":4},"end":{"line":435,"column":29}},"187":{"start":{"line":438,"column":2},"end":{"line":448,"column":3}},"188":{"start":{"line":440,"column":4},"end":{"line":440,"column":14}},"189":{"start":{"line":441,"column":4},"end":{"line":446,"column":5}},"190":{"start":{"line":442,"column":6},"end":{"line":442,"column":36}},"191":{"start":{"line":443,"column":6},"end":{"line":445,"column":7}},"192":{"start":{"line":444,"column":8},"end":{"line":444,"column":22}},"193":{"start":{"line":447,"column":4},"end":{"line":447,"column":13}},"194":{"start":{"line":450,"column":2},"end":{"line":472,"column":3}},"195":{"start":{"line":454,"column":4},"end":{"line":458,"column":5}},"196":{"start":{"line":455,"column":6},"end":{"line":455,"column":16}},"197":{"start":{"line":456,"column":11},"end":{"line":458,"column":5}},"198":{"start":{"line":457,"column":6},"end":{"line":457,"column":20}},"199":{"start":{"line":461,"column":4},"end":{"line":461,"column":42}},"200":{"start":{"line":463,"column":4},"end":{"line":469,"column":5}},"201":{"start":{"line":464,"column":6},"end":{"line":464,"column":45}},"202":{"start":{"line":466,"column":6},"end":{"line":468,"column":7}},"203":{"start":{"line":467,"column":8},"end":{"line":467,"column":21}},"204":{"start":{"line":471,"column":4},"end":{"line":471,"column":16}},"205":{"start":{"line":474,"column":2},"end":{"line":500,"column":3}},"206":{"start":{"line":475,"column":4},"end":{"line":475,"column":12}},"207":{"start":{"line":477,"column":4},"end":{"line":497,"column":5}},"208":{"start":{"line":478,"column":6},"end":{"line":478,"column":25}},"209":{"start":{"line":479,"column":6},"end":{"line":479,"column":29}},"210":{"start":{"line":480,"column":6},"end":{"line":480,"column":29}},"211":{"start":{"line":481,"column":6},"end":{"line":481,"column":45}},"212":{"start":{"line":484,"column":6},"end":{"line":484,"column":74}},"213":{"start":{"line":486,"column":6},"end":{"line":496,"column":7}},"214":{"start":{"line":487,"column":8},"end":{"line":491,"column":9}},"215":{"start":{"line":488,"column":10},"end":{"line":488,"column":21}},"216":{"start":{"line":490,"column":10},"end":{"line":490,"column":22}},"217":{"start":{"line":493,"column":8},"end":{"line":495,"column":9}},"218":{"start":{"line":494,"column":10},"end":{"line":494,"column":23}},"219":{"start":{"line":499,"column":4},"end":{"line":499,"column":16}},"220":{"start":{"line":502,"column":2},"end":{"line":512,"column":3}},"221":{"start":{"line":503,"column":4},"end":{"line":503,"column":25}},"222":{"start":{"line":504,"column":4},"end":{"line":510,"column":5}},"223":{"start":{"line":505,"column":6},"end":{"line":509,"column":7}},"224":{"start":{"line":508,"column":8},"end":{"line":508,"column":29}},"225":{"start":{"line":511,"column":4},"end":{"line":511,"column":20}},"226":{"start":{"line":514,"column":2},"end":{"line":534,"column":3}},"227":{"start":{"line":515,"column":4},"end":{"line":533,"column":5}},"228":{"start":{"line":516,"column":6},"end":{"line":530,"column":7}},"229":{"start":{"line":517,"column":8},"end":{"line":517,"column":58}},"230":{"start":{"line":519,"column":8},"end":{"line":529,"column":9}},"231":{"start":{"line":520,"column":10},"end":{"line":524,"column":11}},"232":{"start":{"line":521,"column":12},"end":{"line":523,"column":13}},"233":{"start":{"line":522,"column":14},"end":{"line":522,"column":27}},"234":{"start":{"line":526,"column":10},"end":{"line":526,"column":22}},"235":{"start":{"line":528,"column":10},"end":{"line":528,"column":23}},"236":{"start":{"line":532,"column":6},"end":{"line":532,"column":19}},"237":{"start":{"line":536,"column":2},"end":{"line":551,"column":3}},"238":{"start":{"line":537,"column":4},"end":{"line":537,"column":85}},"239":{"start":{"line":538,"column":4},"end":{"line":538,"column":85}},"240":{"start":{"line":539,"column":4},"end":{"line":539,"column":85}},"241":{"start":{"line":541,"column":4},"end":{"line":548,"column":5}},"242":{"start":{"line":542,"column":6},"end":{"line":542,"column":26}},"243":{"start":{"line":543,"column":6},"end":{"line":543,"column":26}},"244":{"start":{"line":545,"column":6},"end":{"line":547,"column":7}},"245":{"start":{"line":546,"column":8},"end":{"line":546,"column":20}},"246":{"start":{"line":550,"column":4},"end":{"line":550,"column":17}},"247":{"start":{"line":553,"column":2},"end":{"line":555,"column":3}},"248":{"start":{"line":554,"column":4},"end":{"line":554,"column":48}},"249":{"start":{"line":557,"column":2},"end":{"line":582,"column":3}},"250":{"start":{"line":558,"column":4},"end":{"line":580,"column":5}},"251":{"start":{"line":559,"column":6},"end":{"line":573,"column":7}},"252":{"start":{"line":560,"column":8},"end":{"line":566,"column":9}},"253":{"start":{"line":561,"column":10},"end":{"line":565,"column":11}},"254":{"start":{"line":562,"column":12},"end":{"line":564,"column":13}},"255":{"start":{"line":563,"column":14},"end":{"line":563,"column":26}},"256":{"start":{"line":568,"column":8},"end":{"line":572,"column":9}},"257":{"start":{"line":569,"column":10},"end":{"line":571,"column":11}},"258":{"start":{"line":570,"column":12},"end":{"line":570,"column":24}},"259":{"start":{"line":575,"column":6},"end":{"line":579,"column":7}},"260":{"start":{"line":576,"column":8},"end":{"line":578,"column":9}},"261":{"start":{"line":577,"column":10},"end":{"line":577,"column":22}},"262":{"start":{"line":581,"column":4},"end":{"line":581,"column":17}},"263":{"start":{"line":587,"column":2},"end":{"line":600,"column":3}},"264":{"start":{"line":588,"column":4},"end":{"line":588,"column":20}},"265":{"start":{"line":590,"column":4},"end":{"line":597,"column":5}},"266":{"start":{"line":591,"column":6},"end":{"line":591,"column":41}},"267":{"start":{"line":592,"column":6},"end":{"line":594,"column":7}},"268":{"start":{"line":593,"column":8},"end":{"line":593,"column":29}},"269":{"start":{"line":596,"column":6},"end":{"line":596,"column":24}},"270":{"start":{"line":599,"column":4},"end":{"line":599,"column":17}},"271":{"start":{"line":602,"column":2},"end":{"line":611,"column":3}},"272":{"start":{"line":603,"column":4},"end":{"line":608,"column":5}},"273":{"start":{"line":605,"column":6},"end":{"line":607,"column":7}},"274":{"start":{"line":606,"column":8},"end":{"line":606,"column":21}},"275":{"start":{"line":610,"column":4},"end":{"line":610,"column":16}},"276":{"start":{"line":613,"column":2},"end":{"line":633,"column":3}},"277":{"start":{"line":614,"column":4},"end":{"line":616,"column":5}},"278":{"start":{"line":615,"column":6},"end":{"line":615,"column":19}},"279":{"start":{"line":618,"column":4},"end":{"line":618,"column":38}},"280":{"start":{"line":619,"column":4},"end":{"line":619,"column":38}},"281":{"start":{"line":621,"column":4},"end":{"line":630,"column":5}},"282":{"start":{"line":622,"column":6},"end":{"line":624,"column":7}},"283":{"start":{"line":623,"column":8},"end":{"line":623,"column":21}},"284":{"start":{"line":625,"column":6},"end":{"line":629,"column":7}},"285":{"start":{"line":626,"column":8},"end":{"line":628,"column":9}},"286":{"start":{"line":627,"column":10},"end":{"line":627,"column":23}},"287":{"start":{"line":632,"column":4},"end":{"line":632,"column":16}},"288":{"start":{"line":638,"column":2},"end":{"line":638,"column":35}},"289":{"start":{"line":643,"column":2},"end":{"line":677,"column":3}},"290":{"start":{"line":644,"column":4},"end":{"line":676,"column":5}},"291":{"start":{"line":645,"column":6},"end":{"line":675,"column":7}},"292":{"start":{"line":647,"column":8},"end":{"line":647,"column":34}},"293":{"start":{"line":650,"column":8},"end":{"line":650,"column":39}},"294":{"start":{"line":653,"column":8},"end":{"line":653,"column":39}},"295":{"start":{"line":656,"column":8},"end":{"line":656,"column":44}},"296":{"start":{"line":659,"column":8},"end":{"line":659,"column":36}},"297":{"start":{"line":662,"column":8},"end":{"line":662,"column":41}},"298":{"start":{"line":665,"column":8},"end":{"line":665,"column":36}},"299":{"start":{"line":668,"column":8},"end":{"line":668,"column":46}},"300":{"start":{"line":671,"column":8},"end":{"line":671,"column":47}},"301":{"start":{"line":674,"column":8},"end":{"line":674,"column":57}},"302":{"start":{"line":679,"column":2},"end":{"line":681,"column":4}},"303":{"start":{"line":680,"column":4},"end":{"line":680,"column":28}},"304":{"start":{"line":683,"column":2},"end":{"line":685,"column":4}},"305":{"start":{"line":684,"column":4},"end":{"line":684,"column":30}},"306":{"start":{"line":687,"column":2},"end":{"line":689,"column":4}},"307":{"start":{"line":688,"column":4},"end":{"line":688,"column":35}},"308":{"start":{"line":691,"column":2},"end":{"line":693,"column":4}},"309":{"start":{"line":692,"column":4},"end":{"line":692,"column":33}},"310":{"start":{"line":695,"column":2},"end":{"line":738,"column":4}},"311":{"start":{"line":696,"column":4},"end":{"line":696,"column":32}},"312":{"start":{"line":697,"column":4},"end":{"line":732,"column":5}},"313":{"start":{"line":698,"column":6},"end":{"line":698,"column":18}},"314":{"start":{"line":699,"column":11},"end":{"line":732,"column":5}},"315":{"start":{"line":700,"column":6},"end":{"line":704,"column":7}},"316":{"start":{"line":701,"column":8},"end":{"line":701,"column":39}},"317":{"start":{"line":703,"column":8},"end":{"line":703,"column":20}},"318":{"start":{"line":705,"column":11},"end":{"line":732,"column":5}},"319":{"start":{"line":706,"column":6},"end":{"line":715,"column":7}},"320":{"start":{"line":707,"column":8},"end":{"line":709,"column":9}},"321":{"start":{"line":708,"column":10},"end":{"line":708,"column":64}},"322":{"start":{"line":710,"column":8},"end":{"line":712,"column":9}},"323":{"start":{"line":711,"column":10},"end":{"line":711,"column":22}},"324":{"start":{"line":714,"column":8},"end":{"line":714,"column":20}},"325":{"start":{"line":716,"column":11},"end":{"line":732,"column":5}},"326":{"start":{"line":717,"column":6},"end":{"line":728,"column":7}},"327":{"start":{"line":718,"column":8},"end":{"line":722,"column":9}},"328":{"start":{"line":719,"column":10},"end":{"line":721,"column":11}},"329":{"start":{"line":720,"column":12},"end":{"line":720,"column":69}},"330":{"start":{"line":723,"column":8},"end":{"line":725,"column":9}},"331":{"start":{"line":724,"column":10},"end":{"line":724,"column":22}},"332":{"start":{"line":727,"column":8},"end":{"line":727,"column":20}},"333":{"start":{"line":729,"column":11},"end":{"line":732,"column":5}},"334":{"start":{"line":730,"column":6},"end":{"line":730,"column":51}},"335":{"start":{"line":731,"column":6},"end":{"line":731,"column":36}},"336":{"start":{"line":734,"column":4},"end":{"line":737,"column":7}},"337":{"start":{"line":740,"column":2},"end":{"line":749,"column":4}},"338":{"start":{"line":741,"column":4},"end":{"line":741,"column":17}},"339":{"start":{"line":742,"column":4},"end":{"line":746,"column":5}},"340":{"start":{"line":743,"column":6},"end":{"line":745,"column":7}},"341":{"start":{"line":744,"column":8},"end":{"line":744,"column":29}},"342":{"start":{"line":747,"column":4},"end":{"line":747,"column":37}},"343":{"start":{"line":748,"column":4},"end":{"line":748,"column":15}},"344":{"start":{"line":751,"column":2},"end":{"line":753,"column":4}},"345":{"start":{"line":752,"column":4},"end":{"line":752,"column":49}},"346":{"start":{"line":755,"column":2},"end":{"line":943,"column":4}},"347":{"start":{"line":756,"column":4},"end":{"line":756,"column":33}},"348":{"start":{"line":759,"column":4},"end":{"line":761,"column":5}},"349":{"start":{"line":760,"column":6},"end":{"line":760,"column":37}},"350":{"start":{"line":764,"column":4},"end":{"line":769,"column":5}},"351":{"start":{"line":765,"column":6},"end":{"line":768,"column":7}},"352":{"start":{"line":766,"column":8},"end":{"line":766,"column":68}},"353":{"start":{"line":772,"column":4},"end":{"line":782,"column":5}},"354":{"start":{"line":773,"column":6},"end":{"line":781,"column":7}},"355":{"start":{"line":774,"column":8},"end":{"line":780,"column":9}},"356":{"start":{"line":775,"column":10},"end":{"line":775,"column":89}},"357":{"start":{"line":777,"column":10},"end":{"line":779,"column":11}},"358":{"start":{"line":778,"column":12},"end":{"line":778,"column":24}},"359":{"start":{"line":785,"column":4},"end":{"line":797,"column":5}},"360":{"start":{"line":786,"column":6},"end":{"line":796,"column":7}},"361":{"start":{"line":787,"column":8},"end":{"line":795,"column":9}},"362":{"start":{"line":788,"column":10},"end":{"line":790,"column":11}},"363":{"start":{"line":789,"column":12},"end":{"line":789,"column":25}},"364":{"start":{"line":792,"column":10},"end":{"line":794,"column":11}},"365":{"start":{"line":793,"column":12},"end":{"line":793,"column":24}},"366":{"start":{"line":799,"column":4},"end":{"line":861,"column":5}},"367":{"start":{"line":801,"column":6},"end":{"line":859,"column":7}},"368":{"start":{"line":803,"column":8},"end":{"line":809,"column":9}},"369":{"start":{"line":804,"column":10},"end":{"line":808,"column":11}},"370":{"start":{"line":805,"column":12},"end":{"line":807,"column":13}},"371":{"start":{"line":806,"column":14},"end":{"line":806,"column":26}},"372":{"start":{"line":811,"column":8},"end":{"line":815,"column":9}},"373":{"start":{"line":812,"column":10},"end":{"line":812,"column":111}},"374":{"start":{"line":814,"column":10},"end":{"line":814,"column":23}},"375":{"start":{"line":818,"column":13},"end":{"line":859,"column":7}},"376":{"start":{"line":819,"column":8},"end":{"line":819,"column":77}},"377":{"start":{"line":822,"column":13},"end":{"line":859,"column":7}},"378":{"start":{"line":823,"column":8},"end":{"line":825,"column":9}},"379":{"start":{"line":824,"column":10},"end":{"line":824,"column":23}},"380":{"start":{"line":827,"column":8},"end":{"line":831,"column":9}},"381":{"start":{"line":828,"column":10},"end":{"line":830,"column":11}},"382":{"start":{"line":829,"column":12},"end":{"line":829,"column":25}},"383":{"start":{"line":833,"column":8},"end":{"line":833,"column":20}},"384":{"start":{"line":836,"column":13},"end":{"line":859,"column":7}},"385":{"start":{"line":837,"column":8},"end":{"line":844,"column":9}},"386":{"start":{"line":838,"column":10},"end":{"line":838,"column":55}},"387":{"start":{"line":840,"column":10},"end":{"line":843,"column":11}},"388":{"start":{"line":841,"column":12},"end":{"line":841,"column":23}},"389":{"start":{"line":842,"column":12},"end":{"line":842,"column":25}},"390":{"start":{"line":846,"column":8},"end":{"line":846,"column":20}},"391":{"start":{"line":849,"column":13},"end":{"line":859,"column":7}},"392":{"start":{"line":850,"column":8},"end":{"line":856,"column":9}},"393":{"start":{"line":851,"column":10},"end":{"line":851,"column":88}},"394":{"start":{"line":853,"column":10},"end":{"line":855,"column":11}},"395":{"start":{"line":854,"column":12},"end":{"line":854,"column":25}},"396":{"start":{"line":858,"column":8},"end":{"line":858,"column":20}},"397":{"start":{"line":863,"column":4},"end":{"line":939,"column":5}},"398":{"start":{"line":865,"column":6},"end":{"line":938,"column":7}},"399":{"start":{"line":866,"column":8},"end":{"line":873,"column":9}},"400":{"start":{"line":867,"column":10},"end":{"line":872,"column":11}},"401":{"start":{"line":868,"column":12},"end":{"line":868,"column":51}},"402":{"start":{"line":869,"column":12},"end":{"line":871,"column":13}},"403":{"start":{"line":870,"column":14},"end":{"line":870,"column":26}},"404":{"start":{"line":875,"column":8},"end":{"line":875,"column":21}},"405":{"start":{"line":877,"column":13},"end":{"line":938,"column":7}},"406":{"start":{"line":878,"column":8},"end":{"line":886,"column":9}},"407":{"start":{"line":879,"column":10},"end":{"line":885,"column":11}},"408":{"start":{"line":880,"column":12},"end":{"line":884,"column":13}},"409":{"start":{"line":881,"column":14},"end":{"line":883,"column":15}},"410":{"start":{"line":882,"column":16},"end":{"line":882,"column":28}},"411":{"start":{"line":888,"column":8},"end":{"line":901,"column":9}},"412":{"start":{"line":889,"column":10},"end":{"line":900,"column":11}},"413":{"start":{"line":890,"column":12},"end":{"line":897,"column":13}},"414":{"start":{"line":891,"column":14},"end":{"line":891,"column":53}},"415":{"start":{"line":892,"column":14},"end":{"line":896,"column":15}},"416":{"start":{"line":893,"column":16},"end":{"line":893,"column":33}},"417":{"start":{"line":895,"column":16},"end":{"line":895,"column":32}},"418":{"start":{"line":899,"column":12},"end":{"line":899,"column":28}},"419":{"start":{"line":904,"column":13},"end":{"line":938,"column":7}},"420":{"start":{"line":905,"column":8},"end":{"line":913,"column":9}},"421":{"start":{"line":906,"column":10},"end":{"line":906,"column":77}},"422":{"start":{"line":908,"column":10},"end":{"line":910,"column":11}},"423":{"start":{"line":909,"column":12},"end":{"line":909,"column":24}},"424":{"start":{"line":912,"column":10},"end":{"line":912,"column":23}},"425":{"start":{"line":916,"column":13},"end":{"line":938,"column":7}},"426":{"start":{"line":917,"column":8},"end":{"line":923,"column":9}},"427":{"start":{"line":918,"column":10},"end":{"line":918,"column":58}},"428":{"start":{"line":920,"column":10},"end":{"line":922,"column":11}},"429":{"start":{"line":921,"column":12},"end":{"line":921,"column":25}},"430":{"start":{"line":925,"column":8},"end":{"line":925,"column":20}},"431":{"start":{"line":928,"column":13},"end":{"line":938,"column":7}},"432":{"start":{"line":929,"column":8},"end":{"line":935,"column":9}},"433":{"start":{"line":930,"column":10},"end":{"line":930,"column":81}},"434":{"start":{"line":932,"column":10},"end":{"line":934,"column":11}},"435":{"start":{"line":933,"column":12},"end":{"line":933,"column":25}},"436":{"start":{"line":937,"column":8},"end":{"line":937,"column":20}},"437":{"start":{"line":942,"column":4},"end":{"line":942,"column":17}},"438":{"start":{"line":945,"column":2},"end":{"line":968,"column":4}},"439":{"start":{"line":947,"column":4},"end":{"line":949,"column":5}},"440":{"start":{"line":948,"column":6},"end":{"line":948,"column":37}},"441":{"start":{"line":951,"column":4},"end":{"line":951,"column":37}},"442":{"start":{"line":952,"column":4},"end":{"line":954,"column":5}},"443":{"start":{"line":953,"column":6},"end":{"line":953,"column":18}},"444":{"start":{"line":957,"column":4},"end":{"line":964,"column":5}},"445":{"start":{"line":959,"column":6},"end":{"line":959,"column":76}},"446":{"start":{"line":960,"column":11},"end":{"line":964,"column":5}},"447":{"start":{"line":962,"column":6},"end":{"line":962,"column":47}},"448":{"start":{"line":963,"column":6},"end":{"line":963,"column":41}},"449":{"start":{"line":966,"column":4},"end":{"line":966,"column":105}},"450":{"start":{"line":967,"column":4},"end":{"line":967,"column":17}},"451":{"start":{"line":982,"column":2},"end":{"line":996,"column":3}},"452":{"start":{"line":983,"column":4},"end":{"line":983,"column":53}},"453":{"start":{"line":985,"column":4},"end":{"line":993,"column":5}},"454":{"start":{"line":986,"column":6},"end":{"line":986,"column":26}},"455":{"start":{"line":987,"column":11},"end":{"line":993,"column":5}},"456":{"start":{"line":988,"column":6},"end":{"line":988,"column":31}},"457":{"start":{"line":989,"column":11},"end":{"line":993,"column":5}},"458":{"start":{"line":990,"column":6},"end":{"line":990,"column":30}},"459":{"start":{"line":992,"column":6},"end":{"line":992,"column":63}},"460":{"start":{"line":995,"column":4},"end":{"line":995,"column":24}},"461":{"start":{"line":998,"column":2},"end":{"line":998,"column":36}},"462":{"start":{"line":999,"column":2},"end":{"line":999,"column":38}},"463":{"start":{"line":1010,"column":2},"end":{"line":1020,"column":3}},"464":{"start":{"line":1011,"column":4},"end":{"line":1017,"column":5}},"465":{"start":{"line":1012,"column":6},"end":{"line":1012,"column":26}},"466":{"start":{"line":1013,"column":11},"end":{"line":1017,"column":5}},"467":{"start":{"line":1014,"column":6},"end":{"line":1014,"column":31}},"468":{"start":{"line":1016,"column":6},"end":{"line":1016,"column":68}},"469":{"start":{"line":1019,"column":4},"end":{"line":1019,"column":29}},"470":{"start":{"line":1022,"column":2},"end":{"line":1022,"column":41}},"471":{"start":{"line":1023,"column":2},"end":{"line":1023,"column":48}},"472":{"start":{"line":1024,"column":2},"end":{"line":1029,"column":4}},"473":{"start":{"line":1025,"column":4},"end":{"line":1027,"column":5}},"474":{"start":{"line":1026,"column":6},"end":{"line":1026,"column":67}},"475":{"start":{"line":1028,"column":4},"end":{"line":1028,"column":16}},"476":{"start":{"line":1030,"column":2},"end":{"line":1033,"column":4}},"477":{"start":{"line":1031,"column":4},"end":{"line":1031,"column":33}},"478":{"start":{"line":1032,"column":4},"end":{"line":1032,"column":16}},"479":{"start":{"line":1034,"column":2},"end":{"line":1037,"column":4}},"480":{"start":{"line":1035,"column":4},"end":{"line":1035,"column":45}},"481":{"start":{"line":1036,"column":4},"end":{"line":1036,"column":16}},"482":{"start":{"line":1038,"column":2},"end":{"line":1045,"column":4}},"483":{"start":{"line":1039,"column":4},"end":{"line":1043,"column":5}},"484":{"start":{"line":1040,"column":6},"end":{"line":1040,"column":41}},"485":{"start":{"line":1042,"column":6},"end":{"line":1042,"column":67}},"486":{"start":{"line":1044,"column":4},"end":{"line":1044,"column":16}},"487":{"start":{"line":1046,"column":2},"end":{"line":1048,"column":4}},"488":{"start":{"line":1047,"column":4},"end":{"line":1047,"column":42}},"489":{"start":{"line":1059,"column":2},"end":{"line":1069,"column":3}},"490":{"start":{"line":1060,"column":4},"end":{"line":1066,"column":5}},"491":{"start":{"line":1061,"column":6},"end":{"line":1061,"column":26}},"492":{"start":{"line":1062,"column":11},"end":{"line":1066,"column":5}},"493":{"start":{"line":1063,"column":6},"end":{"line":1063,"column":31}},"494":{"start":{"line":1065,"column":6},"end":{"line":1065,"column":68}},"495":{"start":{"line":1068,"column":4},"end":{"line":1068,"column":29}},"496":{"start":{"line":1071,"column":2},"end":{"line":1071,"column":41}},"497":{"start":{"line":1072,"column":2},"end":{"line":1072,"column":48}},"498":{"start":{"line":1073,"column":2},"end":{"line":1076,"column":4}},"499":{"start":{"line":1074,"column":4},"end":{"line":1074,"column":33}},"500":{"start":{"line":1075,"column":4},"end":{"line":1075,"column":16}},"501":{"start":{"line":1077,"column":2},"end":{"line":1080,"column":4}},"502":{"start":{"line":1078,"column":4},"end":{"line":1078,"column":45}},"503":{"start":{"line":1079,"column":4},"end":{"line":1079,"column":16}},"504":{"start":{"line":1081,"column":2},"end":{"line":1084,"column":4}},"505":{"start":{"line":1082,"column":4},"end":{"line":1082,"column":39}},"506":{"start":{"line":1083,"column":4},"end":{"line":1083,"column":16}},"507":{"start":{"line":1095,"column":2},"end":{"line":1105,"column":3}},"508":{"start":{"line":1096,"column":4},"end":{"line":1102,"column":5}},"509":{"start":{"line":1097,"column":6},"end":{"line":1097,"column":26}},"510":{"start":{"line":1098,"column":11},"end":{"line":1102,"column":5}},"511":{"start":{"line":1099,"column":6},"end":{"line":1099,"column":31}},"512":{"start":{"line":1101,"column":6},"end":{"line":1101,"column":73}},"513":{"start":{"line":1104,"column":4},"end":{"line":1104,"column":34}},"514":{"start":{"line":1107,"column":2},"end":{"line":1107,"column":46}},"515":{"start":{"line":1108,"column":2},"end":{"line":1108,"column":58}},"516":{"start":{"line":1109,"column":2},"end":{"line":1113,"column":4}},"517":{"start":{"line":1110,"column":4},"end":{"line":1112,"column":5}},"518":{"start":{"line":1111,"column":6},"end":{"line":1111,"column":68}},"519":{"start":{"line":1114,"column":2},"end":{"line":1116,"column":4}},"520":{"start":{"line":1115,"column":4},"end":{"line":1115,"column":47}},"521":{"start":{"line":1127,"column":2},"end":{"line":1137,"column":3}},"522":{"start":{"line":1128,"column":4},"end":{"line":1134,"column":5}},"523":{"start":{"line":1129,"column":6},"end":{"line":1129,"column":26}},"524":{"start":{"line":1130,"column":11},"end":{"line":1134,"column":5}},"525":{"start":{"line":1131,"column":6},"end":{"line":1131,"column":31}},"526":{"start":{"line":1133,"column":6},"end":{"line":1133,"column":65}},"527":{"start":{"line":1136,"column":4},"end":{"line":1136,"column":26}},"528":{"start":{"line":1139,"column":2},"end":{"line":1139,"column":38}},"529":{"start":{"line":1140,"column":2},"end":{"line":1140,"column":42}},"530":{"start":{"line":1141,"column":2},"end":{"line":1144,"column":4}},"531":{"start":{"line":1142,"column":4},"end":{"line":1142,"column":61}},"532":{"start":{"line":1143,"column":4},"end":{"line":1143,"column":16}},"533":{"start":{"line":1145,"column":2},"end":{"line":1148,"column":4}},"534":{"start":{"line":1146,"column":4},"end":{"line":1146,"column":48}},"535":{"start":{"line":1147,"column":4},"end":{"line":1147,"column":16}},"536":{"start":{"line":1149,"column":2},"end":{"line":1152,"column":4}},"537":{"start":{"line":1150,"column":4},"end":{"line":1150,"column":42}},"538":{"start":{"line":1151,"column":4},"end":{"line":1151,"column":16}},"539":{"start":{"line":1153,"column":2},"end":{"line":1155,"column":4}},"540":{"start":{"line":1154,"column":4},"end":{"line":1154,"column":55}},"541":{"start":{"line":1156,"column":2},"end":{"line":1158,"column":4}},"542":{"start":{"line":1157,"column":4},"end":{"line":1157,"column":39}},"543":{"start":{"line":1159,"column":2},"end":{"line":1167,"column":4}},"544":{"start":{"line":1160,"column":4},"end":{"line":1160,"column":15}},"545":{"start":{"line":1161,"column":4},"end":{"line":1165,"column":5}},"546":{"start":{"line":1162,"column":6},"end":{"line":1164,"column":7}},"547":{"start":{"line":1163,"column":8},"end":{"line":1163,"column":55}},"548":{"start":{"line":1166,"column":4},"end":{"line":1166,"column":17}},"549":{"start":{"line":1178,"column":2},"end":{"line":1188,"column":3}},"550":{"start":{"line":1179,"column":4},"end":{"line":1185,"column":5}},"551":{"start":{"line":1180,"column":6},"end":{"line":1180,"column":26}},"552":{"start":{"line":1181,"column":11},"end":{"line":1185,"column":5}},"553":{"start":{"line":1182,"column":6},"end":{"line":1182,"column":31}},"554":{"start":{"line":1184,"column":6},"end":{"line":1184,"column":70}},"555":{"start":{"line":1187,"column":4},"end":{"line":1187,"column":31}},"556":{"start":{"line":1190,"column":2},"end":{"line":1190,"column":43}},"557":{"start":{"line":1191,"column":2},"end":{"line":1191,"column":52}},"558":{"start":{"line":1192,"column":2},"end":{"line":1196,"column":4}},"559":{"start":{"line":1193,"column":4},"end":{"line":1195,"column":5}},"560":{"start":{"line":1194,"column":6},"end":{"line":1194,"column":68}},"561":{"start":{"line":1197,"column":2},"end":{"line":1199,"column":4}},"562":{"start":{"line":1198,"column":4},"end":{"line":1198,"column":44}},"563":{"start":{"line":1200,"column":2},"end":{"line":1207,"column":4}},"564":{"start":{"line":1201,"column":4},"end":{"line":1201,"column":19}},"565":{"start":{"line":1202,"column":4},"end":{"line":1204,"column":7}},"566":{"start":{"line":1203,"column":6},"end":{"line":1203,"column":41}},"567":{"start":{"line":1205,"column":4},"end":{"line":1205,"column":29}},"568":{"start":{"line":1206,"column":4},"end":{"line":1206,"column":16}},"569":{"start":{"line":1224,"column":2},"end":{"line":1234,"column":3}},"570":{"start":{"line":1225,"column":4},"end":{"line":1231,"column":5}},"571":{"start":{"line":1226,"column":6},"end":{"line":1226,"column":26}},"572":{"start":{"line":1227,"column":11},"end":{"line":1231,"column":5}},"573":{"start":{"line":1228,"column":6},"end":{"line":1228,"column":28}},"574":{"start":{"line":1230,"column":6},"end":{"line":1230,"column":65}},"575":{"start":{"line":1233,"column":4},"end":{"line":1233,"column":26}},"576":{"start":{"line":1236,"column":2},"end":{"line":1236,"column":38}},"577":{"start":{"line":1237,"column":2},"end":{"line":1237,"column":42}},"578":{"start":{"line":1248,"column":2},"end":{"line":1258,"column":3}},"579":{"start":{"line":1249,"column":4},"end":{"line":1255,"column":5}},"580":{"start":{"line":1250,"column":6},"end":{"line":1250,"column":26}},"581":{"start":{"line":1251,"column":11},"end":{"line":1255,"column":5}},"582":{"start":{"line":1252,"column":6},"end":{"line":1252,"column":28}},"583":{"start":{"line":1254,"column":6},"end":{"line":1254,"column":75}},"584":{"start":{"line":1257,"column":4},"end":{"line":1257,"column":36}},"585":{"start":{"line":1260,"column":2},"end":{"line":1260,"column":48}},"586":{"start":{"line":1261,"column":2},"end":{"line":1261,"column":62}},"587":{"start":{"line":1262,"column":2},"end":{"line":1266,"column":4}},"588":{"start":{"line":1263,"column":4},"end":{"line":1265,"column":5}},"589":{"start":{"line":1264,"column":6},"end":{"line":1264,"column":61}},"590":{"start":{"line":1267,"column":2},"end":{"line":1275,"column":4}},"591":{"start":{"line":1268,"column":4},"end":{"line":1268,"column":14}},"592":{"start":{"line":1269,"column":4},"end":{"line":1273,"column":7}},"593":{"start":{"line":1270,"column":6},"end":{"line":1272,"column":7}},"594":{"start":{"line":1271,"column":8},"end":{"line":1271,"column":24}},"595":{"start":{"line":1274,"column":4},"end":{"line":1274,"column":30}},"596":{"start":{"line":1286,"column":2},"end":{"line":1299,"column":3}},"597":{"start":{"line":1287,"column":4},"end":{"line":1296,"column":5}},"598":{"start":{"line":1288,"column":6},"end":{"line":1288,"column":26}},"599":{"start":{"line":1289,"column":11},"end":{"line":1296,"column":5}},"600":{"start":{"line":1290,"column":6},"end":{"line":1290,"column":30}},"601":{"start":{"line":1291,"column":11},"end":{"line":1296,"column":5}},"602":{"start":{"line":1292,"column":6},"end":{"line":1292,"column":39}},"603":{"start":{"line":1293,"column":6},"end":{"line":1293,"column":32}},"604":{"start":{"line":1295,"column":6},"end":{"line":1295,"column":76}},"605":{"start":{"line":1298,"column":4},"end":{"line":1298,"column":37}},"606":{"start":{"line":1301,"column":2},"end":{"line":1301,"column":49}},"607":{"start":{"line":1302,"column":2},"end":{"line":1302,"column":64}},"608":{"start":{"line":1303,"column":2},"end":{"line":1307,"column":4}},"609":{"start":{"line":1304,"column":4},"end":{"line":1306,"column":5}},"610":{"start":{"line":1305,"column":6},"end":{"line":1305,"column":65}},"611":{"start":{"line":1308,"column":2},"end":{"line":1310,"column":4}},"612":{"start":{"line":1309,"column":4},"end":{"line":1309,"column":45}},"613":{"start":{"line":1312,"column":2},"end":{"line":1326,"column":3}},"614":{"start":{"line":1313,"column":4},"end":{"line":1313,"column":54}},"615":{"start":{"line":1314,"column":4},"end":{"line":1314,"column":34}},"616":{"start":{"line":1315,"column":4},"end":{"line":1318,"column":6}},"617":{"start":{"line":1319,"column":4},"end":{"line":1322,"column":5}},"618":{"start":{"line":1320,"column":6},"end":{"line":1320,"column":52}},"619":{"start":{"line":1321,"column":6},"end":{"line":1321,"column":136}},"620":{"start":{"line":1323,"column":4},"end":{"line":1323,"column":61}},"621":{"start":{"line":1325,"column":4},"end":{"line":1325,"column":33}},"622":{"start":{"line":1328,"column":2},"end":{"line":1345,"column":3}},"623":{"start":{"line":1329,"column":4},"end":{"line":1329,"column":34}},"624":{"start":{"line":1330,"column":4},"end":{"line":1330,"column":28}},"625":{"start":{"line":1332,"column":4},"end":{"line":1334,"column":5}},"626":{"start":{"line":1333,"column":6},"end":{"line":1333,"column":79}},"627":{"start":{"line":1336,"column":4},"end":{"line":1344,"column":8}},"628":{"start":{"line":1347,"column":2},"end":{"line":1347,"column":37}},"629":{"start":{"line":1348,"column":2},"end":{"line":1348,"column":40}},"630":{"start":{"line":1349,"column":2},"end":{"line":1352,"column":4}},"631":{"start":{"line":1350,"column":4},"end":{"line":1350,"column":104}},"632":{"start":{"line":1351,"column":4},"end":{"line":1351,"column":16}},"633":{"start":{"line":1353,"column":2},"end":{"line":1359,"column":4}},"634":{"start":{"line":1354,"column":4},"end":{"line":1357,"column":5}},"635":{"start":{"line":1355,"column":6},"end":{"line":1355,"column":43}},"636":{"start":{"line":1356,"column":6},"end":{"line":1356,"column":25}},"637":{"start":{"line":1358,"column":4},"end":{"line":1358,"column":34}},"638":{"start":{"line":1360,"column":2},"end":{"line":1366,"column":4}},"639":{"start":{"line":1361,"column":4},"end":{"line":1364,"column":5}},"640":{"start":{"line":1362,"column":6},"end":{"line":1362,"column":38}},"641":{"start":{"line":1363,"column":6},"end":{"line":1363,"column":25}},"642":{"start":{"line":1365,"column":4},"end":{"line":1365,"column":34}},"643":{"start":{"line":1367,"column":2},"end":{"line":1373,"column":4}},"644":{"start":{"line":1368,"column":4},"end":{"line":1371,"column":5}},"645":{"start":{"line":1369,"column":6},"end":{"line":1369,"column":36}},"646":{"start":{"line":1370,"column":6},"end":{"line":1370,"column":25}},"647":{"start":{"line":1372,"column":4},"end":{"line":1372,"column":33}},"648":{"start":{"line":1375,"column":2},"end":{"line":1378,"column":4}},"649":{"start":{"line":1376,"column":4},"end":{"line":1376,"column":55}},"650":{"start":{"line":1377,"column":4},"end":{"line":1377,"column":18}},"651":{"start":{"line":1380,"column":2},"end":{"line":1380,"column":32}},"652":{"start":{"line":1381,"column":2},"end":{"line":1381,"column":24}},"653":{"start":{"line":1382,"column":2},"end":{"line":1382,"column":34}},"654":{"start":{"line":1383,"column":2},"end":{"line":1383,"column":34}},"655":{"start":{"line":1384,"column":2},"end":{"line":1384,"column":44}},"656":{"start":{"line":1385,"column":2},"end":{"line":1385,"column":28}},"657":{"start":{"line":1386,"column":2},"end":{"line":1386,"column":38}},"658":{"start":{"line":1387,"column":2},"end":{"line":1387,"column":28}},"659":{"start":{"line":1388,"column":2},"end":{"line":1388,"column":48}},"660":{"start":{"line":1389,"column":2},"end":{"line":1389,"column":50}},"661":{"start":{"line":1390,"column":2},"end":{"line":1390,"column":26}},"662":{"start":{"line":1392,"column":2},"end":{"line":1392,"column":34}},"663":{"start":{"line":1393,"column":2},"end":{"line":1393,"column":38}},"664":{"start":{"line":1395,"column":2},"end":{"line":1395,"column":21}},"665":{"start":{"line":1396,"column":2},"end":{"line":1396,"column":56}},"666":{"start":{"line":1397,"column":2},"end":{"line":1397,"column":60}},"667":{"start":{"line":1398,"column":2},"end":{"line":1398,"column":48}},"668":{"start":{"line":1399,"column":2},"end":{"line":1399,"column":40}},"669":{"start":{"line":1400,"column":2},"end":{"line":1400,"column":44}},"670":{"start":{"line":1401,"column":2},"end":{"line":1401,"column":44}},"671":{"start":{"line":1403,"column":2},"end":{"line":1403,"column":50}},"672":{"start":{"line":1404,"column":2},"end":{"line":1404,"column":54}},"673":{"start":{"line":1406,"column":2},"end":{"line":1406,"column":66}},"674":{"start":{"line":1407,"column":2},"end":{"line":1407,"column":60}},"675":{"start":{"line":1408,"column":2},"end":{"line":1408,"column":62}},"676":{"start":{"line":1409,"column":2},"end":{"line":1409,"column":66}},"677":{"start":{"line":1410,"column":2},"end":{"line":1410,"column":52}},"678":{"start":{"line":1411,"column":2},"end":{"line":1411,"column":40}},"679":{"start":{"line":1412,"column":2},"end":{"line":1412,"column":36}},"680":{"start":{"line":1414,"column":2},"end":{"line":1414,"column":36}},"681":{"start":{"line":1415,"column":2},"end":{"line":1415,"column":40}},"682":{"start":{"line":1417,"column":2},"end":{"line":1417,"column":17}}},"branchMap":{"1":{"line":4,"type":"if","locations":[{"start":{"line":4,"column":2},"end":{"line":4,"column":2}},{"start":{"line":4,"column":2},"end":{"line":4,"column":2}}]},"2":{"line":4,"type":"binary-expr","locations":[{"start":{"line":4,"column":5},"end":{"line":4,"column":31}},{"start":{"line":4,"column":35},"end":{"line":4,"column":69}}]},"3":{"line":9,"type":"if","locations":[{"start":{"line":9,"column":2},"end":{"line":9,"column":2}},{"start":{"line":9,"column":2},"end":{"line":9,"column":2}}]},"4":{"line":46,"type":"if","locations":[{"start":{"line":46,"column":4},"end":{"line":46,"column":4}},{"start":{"line":46,"column":4},"end":{"line":46,"column":4}}]},"5":{"line":46,"type":"binary-expr","locations":[{"start":{"line":46,"column":8},"end":{"line":46,"column":36}},{"start":{"line":46,"column":40},"end":{"line":46,"column":52}}]},"6":{"line":56,"type":"if","locations":[{"start":{"line":56,"column":6},"end":{"line":56,"column":6}},{"start":{"line":56,"column":6},"end":{"line":56,"column":6}}]},"7":{"line":67,"type":"if","locations":[{"start":{"line":67,"column":4},"end":{"line":67,"column":4}},{"start":{"line":67,"column":4},"end":{"line":67,"column":4}}]},"8":{"line":68,"type":"switch","locations":[{"start":{"line":69,"column":8},"end":{"line":70,"column":115}},{"start":{"line":72,"column":8},"end":{"line":73,"column":63}},{"start":{"line":75,"column":8},"end":{"line":76,"column":63}},{"start":{"line":78,"column":8},"end":{"line":79,"column":70}},{"start":{"line":81,"column":8},"end":{"line":82,"column":70}},{"start":{"line":84,"column":8},"end":{"line":85,"column":77}},{"start":{"line":87,"column":8},"end":{"line":88,"column":76}},{"start":{"line":90,"column":8},"end":{"line":91,"column":62}},{"start":{"line":93,"column":8},"end":{"line":94,"column":63}},{"start":{"line":96,"column":8},"end":{"line":97,"column":59}}]},"9":{"line":88,"type":"cond-expr","locations":[{"start":{"line":88,"column":35},"end":{"line":88,"column":68}},{"start":{"line":88,"column":71},"end":{"line":88,"column":75}}]},"10":{"line":129,"type":"if","locations":[{"start":{"line":129,"column":8},"end":{"line":129,"column":8}},{"start":{"line":129,"column":8},"end":{"line":129,"column":8}}]},"11":{"line":131,"type":"if","locations":[{"start":{"line":131,"column":15},"end":{"line":131,"column":15}},{"start":{"line":131,"column":15},"end":{"line":131,"column":15}}]},"12":{"line":135,"type":"if","locations":[{"start":{"line":135,"column":8},"end":{"line":135,"column":8}},{"start":{"line":135,"column":8},"end":{"line":135,"column":8}}]},"13":{"line":137,"type":"if","locations":[{"start":{"line":137,"column":15},"end":{"line":137,"column":15}},{"start":{"line":137,"column":15},"end":{"line":137,"column":15}}]},"14":{"line":141,"type":"if","locations":[{"start":{"line":141,"column":8},"end":{"line":141,"column":8}},{"start":{"line":141,"column":8},"end":{"line":141,"column":8}}]},"15":{"line":143,"type":"if","locations":[{"start":{"line":143,"column":15},"end":{"line":143,"column":15}},{"start":{"line":143,"column":15},"end":{"line":143,"column":15}}]},"16":{"line":147,"type":"if","locations":[{"start":{"line":147,"column":8},"end":{"line":147,"column":8}},{"start":{"line":147,"column":8},"end":{"line":147,"column":8}}]},"17":{"line":149,"type":"if","locations":[{"start":{"line":149,"column":15},"end":{"line":149,"column":15}},{"start":{"line":149,"column":15},"end":{"line":149,"column":15}}]},"18":{"line":180,"type":"if","locations":[{"start":{"line":180,"column":10},"end":{"line":180,"column":10}},{"start":{"line":180,"column":10},"end":{"line":180,"column":10}}]},"19":{"line":182,"type":"if","locations":[{"start":{"line":182,"column":17},"end":{"line":182,"column":17}},{"start":{"line":182,"column":17},"end":{"line":182,"column":17}}]},"20":{"line":186,"type":"if","locations":[{"start":{"line":186,"column":10},"end":{"line":186,"column":10}},{"start":{"line":186,"column":10},"end":{"line":186,"column":10}}]},"21":{"line":188,"type":"if","locations":[{"start":{"line":188,"column":17},"end":{"line":188,"column":17}},{"start":{"line":188,"column":17},"end":{"line":188,"column":17}}]},"22":{"line":192,"type":"if","locations":[{"start":{"line":192,"column":10},"end":{"line":192,"column":10}},{"start":{"line":192,"column":10},"end":{"line":192,"column":10}}]},"23":{"line":194,"type":"if","locations":[{"start":{"line":194,"column":17},"end":{"line":194,"column":17}},{"start":{"line":194,"column":17},"end":{"line":194,"column":17}}]},"24":{"line":198,"type":"if","locations":[{"start":{"line":198,"column":10},"end":{"line":198,"column":10}},{"start":{"line":198,"column":10},"end":{"line":198,"column":10}}]},"25":{"line":200,"type":"if","locations":[{"start":{"line":200,"column":17},"end":{"line":200,"column":17}},{"start":{"line":200,"column":17},"end":{"line":200,"column":17}}]},"26":{"line":224,"type":"if","locations":[{"start":{"line":224,"column":6},"end":{"line":224,"column":6}},{"start":{"line":224,"column":6},"end":{"line":224,"column":6}}]},"27":{"line":226,"type":"if","locations":[{"start":{"line":226,"column":13},"end":{"line":226,"column":13}},{"start":{"line":226,"column":13},"end":{"line":226,"column":13}}]},"28":{"line":230,"type":"if","locations":[{"start":{"line":230,"column":6},"end":{"line":230,"column":6}},{"start":{"line":230,"column":6},"end":{"line":230,"column":6}}]},"29":{"line":232,"type":"if","locations":[{"start":{"line":232,"column":13},"end":{"line":232,"column":13}},{"start":{"line":232,"column":13},"end":{"line":232,"column":13}}]},"30":{"line":236,"type":"if","locations":[{"start":{"line":236,"column":6},"end":{"line":236,"column":6}},{"start":{"line":236,"column":6},"end":{"line":236,"column":6}}]},"31":{"line":238,"type":"if","locations":[{"start":{"line":238,"column":13},"end":{"line":238,"column":13}},{"start":{"line":238,"column":13},"end":{"line":238,"column":13}}]},"32":{"line":242,"type":"if","locations":[{"start":{"line":242,"column":6},"end":{"line":242,"column":6}},{"start":{"line":242,"column":6},"end":{"line":242,"column":6}}]},"33":{"line":244,"type":"if","locations":[{"start":{"line":244,"column":13},"end":{"line":244,"column":13}},{"start":{"line":244,"column":13},"end":{"line":244,"column":13}}]},"34":{"line":311,"type":"if","locations":[{"start":{"line":311,"column":6},"end":{"line":311,"column":6}},{"start":{"line":311,"column":6},"end":{"line":311,"column":6}}]},"35":{"line":315,"type":"if","locations":[{"start":{"line":315,"column":6},"end":{"line":315,"column":6}},{"start":{"line":315,"column":6},"end":{"line":315,"column":6}}]},"36":{"line":344,"type":"if","locations":[{"start":{"line":344,"column":4},"end":{"line":344,"column":4}},{"start":{"line":344,"column":4},"end":{"line":344,"column":4}}]},"37":{"line":346,"type":"if","locations":[{"start":{"line":346,"column":11},"end":{"line":346,"column":11}},{"start":{"line":346,"column":11},"end":{"line":346,"column":11}}]},"38":{"line":348,"type":"if","locations":[{"start":{"line":348,"column":11},"end":{"line":348,"column":11}},{"start":{"line":348,"column":11},"end":{"line":348,"column":11}}]},"39":{"line":352,"type":"if","locations":[{"start":{"line":352,"column":11},"end":{"line":352,"column":11}},{"start":{"line":352,"column":11},"end":{"line":352,"column":11}}]},"40":{"line":360,"type":"if","locations":[{"start":{"line":360,"column":4},"end":{"line":360,"column":4}},{"start":{"line":360,"column":4},"end":{"line":360,"column":4}}]},"41":{"line":361,"type":"if","locations":[{"start":{"line":361,"column":6},"end":{"line":361,"column":6}},{"start":{"line":361,"column":6},"end":{"line":361,"column":6}}]},"42":{"line":366,"type":"if","locations":[{"start":{"line":366,"column":4},"end":{"line":366,"column":4}},{"start":{"line":366,"column":4},"end":{"line":366,"column":4}}]},"43":{"line":392,"type":"if","locations":[{"start":{"line":392,"column":4},"end":{"line":392,"column":4}},{"start":{"line":392,"column":4},"end":{"line":392,"column":4}}]},"44":{"line":394,"type":"if","locations":[{"start":{"line":394,"column":11},"end":{"line":394,"column":11}},{"start":{"line":394,"column":11},"end":{"line":394,"column":11}}]},"45":{"line":405,"type":"if","locations":[{"start":{"line":405,"column":4},"end":{"line":405,"column":4}},{"start":{"line":405,"column":4},"end":{"line":405,"column":4}}]},"46":{"line":407,"type":"if","locations":[{"start":{"line":407,"column":11},"end":{"line":407,"column":11}},{"start":{"line":407,"column":11},"end":{"line":407,"column":11}}]},"47":{"line":409,"type":"if","locations":[{"start":{"line":409,"column":11},"end":{"line":409,"column":11}},{"start":{"line":409,"column":11},"end":{"line":409,"column":11}}]},"48":{"line":411,"type":"if","locations":[{"start":{"line":411,"column":11},"end":{"line":411,"column":11}},{"start":{"line":411,"column":11},"end":{"line":411,"column":11}}]},"49":{"line":443,"type":"if","locations":[{"start":{"line":443,"column":6},"end":{"line":443,"column":6}},{"start":{"line":443,"column":6},"end":{"line":443,"column":6}}]},"50":{"line":443,"type":"binary-expr","locations":[{"start":{"line":443,"column":9},"end":{"line":443,"column":17}},{"start":{"line":443,"column":21},"end":{"line":443,"column":28}},{"start":{"line":443,"column":32},"end":{"line":443,"column":89}}]},"51":{"line":454,"type":"if","locations":[{"start":{"line":454,"column":4},"end":{"line":454,"column":4}},{"start":{"line":454,"column":4},"end":{"line":454,"column":4}}]},"52":{"line":456,"type":"if","locations":[{"start":{"line":456,"column":11},"end":{"line":456,"column":11}},{"start":{"line":456,"column":11},"end":{"line":456,"column":11}}]},"53":{"line":466,"type":"if","locations":[{"start":{"line":466,"column":6},"end":{"line":466,"column":6}},{"start":{"line":466,"column":6},"end":{"line":466,"column":6}}]},"54":{"line":486,"type":"if","locations":[{"start":{"line":486,"column":6},"end":{"line":486,"column":6}},{"start":{"line":486,"column":6},"end":{"line":486,"column":6}}]},"55":{"line":487,"type":"if","locations":[{"start":{"line":487,"column":8},"end":{"line":487,"column":8}},{"start":{"line":487,"column":8},"end":{"line":487,"column":8}}]},"56":{"line":493,"type":"if","locations":[{"start":{"line":493,"column":8},"end":{"line":493,"column":8}},{"start":{"line":493,"column":8},"end":{"line":493,"column":8}}]},"57":{"line":493,"type":"binary-expr","locations":[{"start":{"line":493,"column":12},"end":{"line":493,"column":15}},{"start":{"line":493,"column":20},"end":{"line":493,"column":27}},{"start":{"line":493,"column":32},"end":{"line":493,"column":36}},{"start":{"line":493,"column":41},"end":{"line":493,"column":48}}]},"58":{"line":505,"type":"if","locations":[{"start":{"line":505,"column":6},"end":{"line":505,"column":6}},{"start":{"line":505,"column":6},"end":{"line":505,"column":6}}]},"59":{"line":505,"type":"binary-expr","locations":[{"start":{"line":505,"column":12},"end":{"line":505,"column":41}},{"start":{"line":505,"column":45},"end":{"line":505,"column":73}},{"start":{"line":506,"column":12},"end":{"line":506,"column":41}},{"start":{"line":506,"column":45},"end":{"line":506,"column":73}},{"start":{"line":507,"column":11},"end":{"line":507,"column":156}}]},"60":{"line":515,"type":"if","locations":[{"start":{"line":515,"column":4},"end":{"line":515,"column":4}},{"start":{"line":515,"column":4},"end":{"line":515,"column":4}}]},"61":{"line":515,"type":"binary-expr","locations":[{"start":{"line":515,"column":8},"end":{"line":515,"column":15}},{"start":{"line":515,"column":19},"end":{"line":515,"column":33}}]},"62":{"line":516,"type":"if","locations":[{"start":{"line":516,"column":6},"end":{"line":516,"column":6}},{"start":{"line":516,"column":6},"end":{"line":516,"column":6}}]},"63":{"line":519,"type":"if","locations":[{"start":{"line":519,"column":8},"end":{"line":519,"column":8}},{"start":{"line":519,"column":8},"end":{"line":519,"column":8}}]},"64":{"line":521,"type":"if","locations":[{"start":{"line":521,"column":12},"end":{"line":521,"column":12}},{"start":{"line":521,"column":12},"end":{"line":521,"column":12}}]},"65":{"line":541,"type":"if","locations":[{"start":{"line":541,"column":4},"end":{"line":541,"column":4}},{"start":{"line":541,"column":4},"end":{"line":541,"column":4}}]},"66":{"line":545,"type":"if","locations":[{"start":{"line":545,"column":6},"end":{"line":545,"column":6}},{"start":{"line":545,"column":6},"end":{"line":545,"column":6}}]},"67":{"line":545,"type":"binary-expr","locations":[{"start":{"line":545,"column":11},"end":{"line":545,"column":18}},{"start":{"line":545,"column":22},"end":{"line":545,"column":29}},{"start":{"line":545,"column":33},"end":{"line":545,"column":40}},{"start":{"line":545,"column":44},"end":{"line":545,"column":51}}]},"68":{"line":554,"type":"binary-expr","locations":[{"start":{"line":554,"column":11},"end":{"line":554,"column":32}},{"start":{"line":554,"column":36},"end":{"line":554,"column":47}}]},"69":{"line":558,"type":"if","locations":[{"start":{"line":558,"column":4},"end":{"line":558,"column":4}},{"start":{"line":558,"column":4},"end":{"line":558,"column":4}}]},"70":{"line":559,"type":"if","locations":[{"start":{"line":559,"column":6},"end":{"line":559,"column":6}},{"start":{"line":559,"column":6},"end":{"line":559,"column":6}}]},"71":{"line":562,"type":"if","locations":[{"start":{"line":562,"column":12},"end":{"line":562,"column":12}},{"start":{"line":562,"column":12},"end":{"line":562,"column":12}}]},"72":{"line":569,"type":"if","locations":[{"start":{"line":569,"column":10},"end":{"line":569,"column":10}},{"start":{"line":569,"column":10},"end":{"line":569,"column":10}}]},"73":{"line":576,"type":"if","locations":[{"start":{"line":576,"column":8},"end":{"line":576,"column":8}},{"start":{"line":576,"column":8},"end":{"line":576,"column":8}}]},"74":{"line":592,"type":"if","locations":[{"start":{"line":592,"column":6},"end":{"line":592,"column":6}},{"start":{"line":592,"column":6},"end":{"line":592,"column":6}}]},"75":{"line":605,"type":"if","locations":[{"start":{"line":605,"column":6},"end":{"line":605,"column":6}},{"start":{"line":605,"column":6},"end":{"line":605,"column":6}}]},"76":{"line":614,"type":"if","locations":[{"start":{"line":614,"column":4},"end":{"line":614,"column":4}},{"start":{"line":614,"column":4},"end":{"line":614,"column":4}}]},"77":{"line":622,"type":"if","locations":[{"start":{"line":622,"column":6},"end":{"line":622,"column":6}},{"start":{"line":622,"column":6},"end":{"line":622,"column":6}}]},"78":{"line":626,"type":"if","locations":[{"start":{"line":626,"column":8},"end":{"line":626,"column":8}},{"start":{"line":626,"column":8},"end":{"line":626,"column":8}}]},"79":{"line":644,"type":"if","locations":[{"start":{"line":644,"column":4},"end":{"line":644,"column":4}},{"start":{"line":644,"column":4},"end":{"line":644,"column":4}}]},"80":{"line":645,"type":"switch","locations":[{"start":{"line":646,"column":6},"end":{"line":647,"column":34}},{"start":{"line":649,"column":6},"end":{"line":650,"column":39}},{"start":{"line":652,"column":6},"end":{"line":653,"column":39}},{"start":{"line":655,"column":6},"end":{"line":656,"column":44}},{"start":{"line":658,"column":6},"end":{"line":659,"column":36}},{"start":{"line":661,"column":6},"end":{"line":662,"column":41}},{"start":{"line":664,"column":6},"end":{"line":665,"column":36}},{"start":{"line":667,"column":6},"end":{"line":668,"column":46}},{"start":{"line":670,"column":6},"end":{"line":671,"column":47}},{"start":{"line":673,"column":6},"end":{"line":674,"column":57}}]},"81":{"line":697,"type":"if","locations":[{"start":{"line":697,"column":4},"end":{"line":697,"column":4}},{"start":{"line":697,"column":4},"end":{"line":697,"column":4}}]},"82":{"line":699,"type":"if","locations":[{"start":{"line":699,"column":11},"end":{"line":699,"column":11}},{"start":{"line":699,"column":11},"end":{"line":699,"column":11}}]},"83":{"line":699,"type":"binary-expr","locations":[{"start":{"line":699,"column":15},"end":{"line":699,"column":41}},{"start":{"line":699,"column":45},"end":{"line":699,"column":71}}]},"84":{"line":700,"type":"if","locations":[{"start":{"line":700,"column":6},"end":{"line":700,"column":6}},{"start":{"line":700,"column":6},"end":{"line":700,"column":6}}]},"85":{"line":700,"type":"binary-expr","locations":[{"start":{"line":700,"column":10},"end":{"line":700,"column":26}},{"start":{"line":700,"column":30},"end":{"line":700,"column":58}}]},"86":{"line":705,"type":"if","locations":[{"start":{"line":705,"column":11},"end":{"line":705,"column":11}},{"start":{"line":705,"column":11},"end":{"line":705,"column":11}}]},"87":{"line":705,"type":"binary-expr","locations":[{"start":{"line":705,"column":15},"end":{"line":705,"column":38}},{"start":{"line":705,"column":42},"end":{"line":705,"column":73}}]},"88":{"line":706,"type":"if","locations":[{"start":{"line":706,"column":6},"end":{"line":706,"column":6}},{"start":{"line":706,"column":6},"end":{"line":706,"column":6}}]},"89":{"line":706,"type":"binary-expr","locations":[{"start":{"line":706,"column":10},"end":{"line":706,"column":26}},{"start":{"line":706,"column":30},"end":{"line":706,"column":57}}]},"90":{"line":710,"type":"if","locations":[{"start":{"line":710,"column":8},"end":{"line":710,"column":8}},{"start":{"line":710,"column":8},"end":{"line":710,"column":8}}]},"91":{"line":716,"type":"if","locations":[{"start":{"line":716,"column":11},"end":{"line":716,"column":11}},{"start":{"line":716,"column":11},"end":{"line":716,"column":11}}]},"92":{"line":717,"type":"if","locations":[{"start":{"line":717,"column":6},"end":{"line":717,"column":6}},{"start":{"line":717,"column":6},"end":{"line":717,"column":6}}]},"93":{"line":717,"type":"binary-expr","locations":[{"start":{"line":717,"column":10},"end":{"line":717,"column":26}},{"start":{"line":717,"column":30},"end":{"line":717,"column":57}}]},"94":{"line":723,"type":"if","locations":[{"start":{"line":723,"column":8},"end":{"line":723,"column":8}},{"start":{"line":723,"column":8},"end":{"line":723,"column":8}}]},"95":{"line":729,"type":"if","locations":[{"start":{"line":729,"column":11},"end":{"line":729,"column":11}},{"start":{"line":729,"column":11},"end":{"line":729,"column":11}}]},"96":{"line":743,"type":"if","locations":[{"start":{"line":743,"column":6},"end":{"line":743,"column":6}},{"start":{"line":743,"column":6},"end":{"line":743,"column":6}}]},"97":{"line":743,"type":"binary-expr","locations":[{"start":{"line":743,"column":10},"end":{"line":743,"column":34}},{"start":{"line":743,"column":38},"end":{"line":743,"column":73}}]},"98":{"line":759,"type":"if","locations":[{"start":{"line":759,"column":4},"end":{"line":759,"column":4}},{"start":{"line":759,"column":4},"end":{"line":759,"column":4}}]},"99":{"line":764,"type":"if","locations":[{"start":{"line":764,"column":4},"end":{"line":764,"column":4}},{"start":{"line":764,"column":4},"end":{"line":764,"column":4}}]},"100":{"line":765,"type":"if","locations":[{"start":{"line":765,"column":6},"end":{"line":765,"column":6}},{"start":{"line":765,"column":6},"end":{"line":765,"column":6}}]},"101":{"line":772,"type":"if","locations":[{"start":{"line":772,"column":4},"end":{"line":772,"column":4}},{"start":{"line":772,"column":4},"end":{"line":772,"column":4}}]},"102":{"line":773,"type":"if","locations":[{"start":{"line":773,"column":6},"end":{"line":773,"column":6}},{"start":{"line":773,"column":6},"end":{"line":773,"column":6}}]},"103":{"line":777,"type":"if","locations":[{"start":{"line":777,"column":10},"end":{"line":777,"column":10}},{"start":{"line":777,"column":10},"end":{"line":777,"column":10}}]},"104":{"line":785,"type":"if","locations":[{"start":{"line":785,"column":4},"end":{"line":785,"column":4}},{"start":{"line":785,"column":4},"end":{"line":785,"column":4}}]},"105":{"line":785,"type":"binary-expr","locations":[{"start":{"line":785,"column":8},"end":{"line":785,"column":39}},{"start":{"line":785,"column":43},"end":{"line":785,"column":74}}]},"106":{"line":786,"type":"if","locations":[{"start":{"line":786,"column":6},"end":{"line":786,"column":6}},{"start":{"line":786,"column":6},"end":{"line":786,"column":6}}]},"107":{"line":788,"type":"if","locations":[{"start":{"line":788,"column":10},"end":{"line":788,"column":10}},{"start":{"line":788,"column":10},"end":{"line":788,"column":10}}]},"108":{"line":792,"type":"if","locations":[{"start":{"line":792,"column":10},"end":{"line":792,"column":10}},{"start":{"line":792,"column":10},"end":{"line":792,"column":10}}]},"109":{"line":799,"type":"if","locations":[{"start":{"line":799,"column":4},"end":{"line":799,"column":4}},{"start":{"line":799,"column":4},"end":{"line":799,"column":4}}]},"110":{"line":801,"type":"if","locations":[{"start":{"line":801,"column":6},"end":{"line":801,"column":6}},{"start":{"line":801,"column":6},"end":{"line":801,"column":6}}]},"111":{"line":803,"type":"if","locations":[{"start":{"line":803,"column":8},"end":{"line":803,"column":8}},{"start":{"line":803,"column":8},"end":{"line":803,"column":8}}]},"112":{"line":805,"type":"if","locations":[{"start":{"line":805,"column":12},"end":{"line":805,"column":12}},{"start":{"line":805,"column":12},"end":{"line":805,"column":12}}]},"113":{"line":811,"type":"if","locations":[{"start":{"line":811,"column":8},"end":{"line":811,"column":8}},{"start":{"line":811,"column":8},"end":{"line":811,"column":8}}]},"114":{"line":811,"type":"binary-expr","locations":[{"start":{"line":811,"column":12},"end":{"line":811,"column":35}},{"start":{"line":811,"column":39},"end":{"line":811,"column":106}}]},"115":{"line":818,"type":"if","locations":[{"start":{"line":818,"column":13},"end":{"line":818,"column":13}},{"start":{"line":818,"column":13},"end":{"line":818,"column":13}}]},"116":{"line":822,"type":"if","locations":[{"start":{"line":822,"column":13},"end":{"line":822,"column":13}},{"start":{"line":822,"column":13},"end":{"line":822,"column":13}}]},"117":{"line":822,"type":"binary-expr","locations":[{"start":{"line":822,"column":17},"end":{"line":822,"column":43}},{"start":{"line":822,"column":47},"end":{"line":822,"column":73}}]},"118":{"line":823,"type":"if","locations":[{"start":{"line":823,"column":8},"end":{"line":823,"column":8}},{"start":{"line":823,"column":8},"end":{"line":823,"column":8}}]},"119":{"line":823,"type":"binary-expr","locations":[{"start":{"line":823,"column":12},"end":{"line":823,"column":29}},{"start":{"line":823,"column":33},"end":{"line":823,"column":62}}]},"120":{"line":828,"type":"if","locations":[{"start":{"line":828,"column":10},"end":{"line":828,"column":10}},{"start":{"line":828,"column":10},"end":{"line":828,"column":10}}]},"121":{"line":836,"type":"if","locations":[{"start":{"line":836,"column":13},"end":{"line":836,"column":13}},{"start":{"line":836,"column":13},"end":{"line":836,"column":13}}]},"122":{"line":840,"type":"if","locations":[{"start":{"line":840,"column":10},"end":{"line":840,"column":10}},{"start":{"line":840,"column":10},"end":{"line":840,"column":10}}]},"123":{"line":849,"type":"if","locations":[{"start":{"line":849,"column":13},"end":{"line":849,"column":13}},{"start":{"line":849,"column":13},"end":{"line":849,"column":13}}]},"124":{"line":853,"type":"if","locations":[{"start":{"line":853,"column":10},"end":{"line":853,"column":10}},{"start":{"line":853,"column":10},"end":{"line":853,"column":10}}]},"125":{"line":863,"type":"if","locations":[{"start":{"line":863,"column":4},"end":{"line":863,"column":4}},{"start":{"line":863,"column":4},"end":{"line":863,"column":4}}]},"126":{"line":865,"type":"if","locations":[{"start":{"line":865,"column":6},"end":{"line":865,"column":6}},{"start":{"line":865,"column":6},"end":{"line":865,"column":6}}]},"127":{"line":866,"type":"if","locations":[{"start":{"line":866,"column":8},"end":{"line":866,"column":8}},{"start":{"line":866,"column":8},"end":{"line":866,"column":8}}]},"128":{"line":869,"type":"if","locations":[{"start":{"line":869,"column":12},"end":{"line":869,"column":12}},{"start":{"line":869,"column":12},"end":{"line":869,"column":12}}]},"129":{"line":869,"type":"binary-expr","locations":[{"start":{"line":869,"column":16},"end":{"line":869,"column":67}},{"start":{"line":869,"column":71},"end":{"line":869,"column":145}}]},"130":{"line":877,"type":"if","locations":[{"start":{"line":877,"column":13},"end":{"line":877,"column":13}},{"start":{"line":877,"column":13},"end":{"line":877,"column":13}}]},"131":{"line":879,"type":"if","locations":[{"start":{"line":879,"column":10},"end":{"line":879,"column":10}},{"start":{"line":879,"column":10},"end":{"line":879,"column":10}}]},"132":{"line":881,"type":"if","locations":[{"start":{"line":881,"column":14},"end":{"line":881,"column":14}},{"start":{"line":881,"column":14},"end":{"line":881,"column":14}}]},"133":{"line":888,"type":"if","locations":[{"start":{"line":888,"column":8},"end":{"line":888,"column":8}},{"start":{"line":888,"column":8},"end":{"line":888,"column":8}}]},"134":{"line":889,"type":"if","locations":[{"start":{"line":889,"column":10},"end":{"line":889,"column":10}},{"start":{"line":889,"column":10},"end":{"line":889,"column":10}}]},"135":{"line":892,"type":"if","locations":[{"start":{"line":892,"column":14},"end":{"line":892,"column":14}},{"start":{"line":892,"column":14},"end":{"line":892,"column":14}}]},"136":{"line":904,"type":"if","locations":[{"start":{"line":904,"column":13},"end":{"line":904,"column":13}},{"start":{"line":904,"column":13},"end":{"line":904,"column":13}}]},"137":{"line":904,"type":"binary-expr","locations":[{"start":{"line":904,"column":17},"end":{"line":904,"column":43}},{"start":{"line":904,"column":47},"end":{"line":904,"column":73}}]},"138":{"line":908,"type":"if","locations":[{"start":{"line":908,"column":10},"end":{"line":908,"column":10}},{"start":{"line":908,"column":10},"end":{"line":908,"column":10}}]},"139":{"line":916,"type":"if","locations":[{"start":{"line":916,"column":13},"end":{"line":916,"column":13}},{"start":{"line":916,"column":13},"end":{"line":916,"column":13}}]},"140":{"line":920,"type":"if","locations":[{"start":{"line":920,"column":10},"end":{"line":920,"column":10}},{"start":{"line":920,"column":10},"end":{"line":920,"column":10}}]},"141":{"line":928,"type":"if","locations":[{"start":{"line":928,"column":13},"end":{"line":928,"column":13}},{"start":{"line":928,"column":13},"end":{"line":928,"column":13}}]},"142":{"line":932,"type":"if","locations":[{"start":{"line":932,"column":10},"end":{"line":932,"column":10}},{"start":{"line":932,"column":10},"end":{"line":932,"column":10}}]},"143":{"line":947,"type":"if","locations":[{"start":{"line":947,"column":4},"end":{"line":947,"column":4}},{"start":{"line":947,"column":4},"end":{"line":947,"column":4}}]},"144":{"line":952,"type":"if","locations":[{"start":{"line":952,"column":4},"end":{"line":952,"column":4}},{"start":{"line":952,"column":4},"end":{"line":952,"column":4}}]},"145":{"line":952,"type":"binary-expr","locations":[{"start":{"line":952,"column":8},"end":{"line":952,"column":30}},{"start":{"line":952,"column":34},"end":{"line":952,"column":48}}]},"146":{"line":957,"type":"if","locations":[{"start":{"line":957,"column":4},"end":{"line":957,"column":4}},{"start":{"line":957,"column":4},"end":{"line":957,"column":4}}]},"147":{"line":957,"type":"binary-expr","locations":[{"start":{"line":957,"column":8},"end":{"line":957,"column":29}},{"start":{"line":957,"column":33},"end":{"line":957,"column":59}},{"start":{"line":958,"column":8},"end":{"line":958,"column":34}},{"start":{"line":958,"column":38},"end":{"line":958,"column":69}}]},"148":{"line":960,"type":"if","locations":[{"start":{"line":960,"column":11},"end":{"line":960,"column":11}},{"start":{"line":960,"column":11},"end":{"line":960,"column":11}}]},"149":{"line":985,"type":"if","locations":[{"start":{"line":985,"column":4},"end":{"line":985,"column":4}},{"start":{"line":985,"column":4},"end":{"line":985,"column":4}}]},"150":{"line":985,"type":"binary-expr","locations":[{"start":{"line":985,"column":7},"end":{"line":985,"column":12}},{"start":{"line":985,"column":16},"end":{"line":985,"column":38}},{"start":{"line":985,"column":42},"end":{"line":985,"column":59}}]},"151":{"line":987,"type":"if","locations":[{"start":{"line":987,"column":11},"end":{"line":987,"column":11}},{"start":{"line":987,"column":11},"end":{"line":987,"column":11}}]},"152":{"line":987,"type":"binary-expr","locations":[{"start":{"line":987,"column":14},"end":{"line":987,"column":19}},{"start":{"line":987,"column":23},"end":{"line":987,"column":37}}]},"153":{"line":989,"type":"if","locations":[{"start":{"line":989,"column":11},"end":{"line":989,"column":11}},{"start":{"line":989,"column":11},"end":{"line":989,"column":11}}]},"154":{"line":1011,"type":"if","locations":[{"start":{"line":1011,"column":4},"end":{"line":1011,"column":4}},{"start":{"line":1011,"column":4},"end":{"line":1011,"column":4}}]},"155":{"line":1011,"type":"binary-expr","locations":[{"start":{"line":1011,"column":7},"end":{"line":1011,"column":12}},{"start":{"line":1011,"column":16},"end":{"line":1011,"column":43}},{"start":{"line":1011,"column":47},"end":{"line":1011,"column":64}}]},"156":{"line":1013,"type":"if","locations":[{"start":{"line":1013,"column":11},"end":{"line":1013,"column":11}},{"start":{"line":1013,"column":11},"end":{"line":1013,"column":11}}]},"157":{"line":1039,"type":"if","locations":[{"start":{"line":1039,"column":4},"end":{"line":1039,"column":4}},{"start":{"line":1039,"column":4},"end":{"line":1039,"column":4}}]},"158":{"line":1060,"type":"if","locations":[{"start":{"line":1060,"column":4},"end":{"line":1060,"column":4}},{"start":{"line":1060,"column":4},"end":{"line":1060,"column":4}}]},"159":{"line":1060,"type":"binary-expr","locations":[{"start":{"line":1060,"column":7},"end":{"line":1060,"column":12}},{"start":{"line":1060,"column":16},"end":{"line":1060,"column":43}},{"start":{"line":1060,"column":47},"end":{"line":1060,"column":64}}]},"160":{"line":1062,"type":"if","locations":[{"start":{"line":1062,"column":11},"end":{"line":1062,"column":11}},{"start":{"line":1062,"column":11},"end":{"line":1062,"column":11}}]},"161":{"line":1096,"type":"if","locations":[{"start":{"line":1096,"column":4},"end":{"line":1096,"column":4}},{"start":{"line":1096,"column":4},"end":{"line":1096,"column":4}}]},"162":{"line":1096,"type":"binary-expr","locations":[{"start":{"line":1096,"column":7},"end":{"line":1096,"column":12}},{"start":{"line":1096,"column":16},"end":{"line":1096,"column":48}},{"start":{"line":1096,"column":52},"end":{"line":1096,"column":69}}]},"163":{"line":1098,"type":"if","locations":[{"start":{"line":1098,"column":11},"end":{"line":1098,"column":11}},{"start":{"line":1098,"column":11},"end":{"line":1098,"column":11}}]},"164":{"line":1128,"type":"if","locations":[{"start":{"line":1128,"column":4},"end":{"line":1128,"column":4}},{"start":{"line":1128,"column":4},"end":{"line":1128,"column":4}}]},"165":{"line":1128,"type":"binary-expr","locations":[{"start":{"line":1128,"column":7},"end":{"line":1128,"column":12}},{"start":{"line":1128,"column":16},"end":{"line":1128,"column":40}},{"start":{"line":1128,"column":44},"end":{"line":1128,"column":61}}]},"166":{"line":1130,"type":"if","locations":[{"start":{"line":1130,"column":11},"end":{"line":1130,"column":11}},{"start":{"line":1130,"column":11},"end":{"line":1130,"column":11}}]},"167":{"line":1161,"type":"if","locations":[{"start":{"line":1161,"column":4},"end":{"line":1161,"column":4}},{"start":{"line":1161,"column":4},"end":{"line":1161,"column":4}}]},"168":{"line":1179,"type":"if","locations":[{"start":{"line":1179,"column":4},"end":{"line":1179,"column":4}},{"start":{"line":1179,"column":4},"end":{"line":1179,"column":4}}]},"169":{"line":1179,"type":"binary-expr","locations":[{"start":{"line":1179,"column":7},"end":{"line":1179,"column":12}},{"start":{"line":1179,"column":16},"end":{"line":1179,"column":45}},{"start":{"line":1179,"column":49},"end":{"line":1179,"column":66}}]},"170":{"line":1181,"type":"if","locations":[{"start":{"line":1181,"column":11},"end":{"line":1181,"column":11}},{"start":{"line":1181,"column":11},"end":{"line":1181,"column":11}}]},"171":{"line":1225,"type":"if","locations":[{"start":{"line":1225,"column":4},"end":{"line":1225,"column":4}},{"start":{"line":1225,"column":4},"end":{"line":1225,"column":4}}]},"172":{"line":1225,"type":"binary-expr","locations":[{"start":{"line":1225,"column":7},"end":{"line":1225,"column":12}},{"start":{"line":1225,"column":16},"end":{"line":1225,"column":40}}]},"173":{"line":1227,"type":"if","locations":[{"start":{"line":1227,"column":11},"end":{"line":1227,"column":11}},{"start":{"line":1227,"column":11},"end":{"line":1227,"column":11}}]},"174":{"line":1227,"type":"binary-expr","locations":[{"start":{"line":1227,"column":14},"end":{"line":1227,"column":19}},{"start":{"line":1227,"column":23},"end":{"line":1227,"column":33}},{"start":{"line":1227,"column":37},"end":{"line":1227,"column":54}}]},"175":{"line":1249,"type":"if","locations":[{"start":{"line":1249,"column":4},"end":{"line":1249,"column":4}},{"start":{"line":1249,"column":4},"end":{"line":1249,"column":4}}]},"176":{"line":1249,"type":"binary-expr","locations":[{"start":{"line":1249,"column":7},"end":{"line":1249,"column":12}},{"start":{"line":1249,"column":16},"end":{"line":1249,"column":50}},{"start":{"line":1249,"column":54},"end":{"line":1249,"column":68}}]},"177":{"line":1251,"type":"if","locations":[{"start":{"line":1251,"column":11},"end":{"line":1251,"column":11}},{"start":{"line":1251,"column":11},"end":{"line":1251,"column":11}}]},"178":{"line":1270,"type":"if","locations":[{"start":{"line":1270,"column":6},"end":{"line":1270,"column":6}},{"start":{"line":1270,"column":6},"end":{"line":1270,"column":6}}]},"179":{"line":1287,"type":"if","locations":[{"start":{"line":1287,"column":4},"end":{"line":1287,"column":4}},{"start":{"line":1287,"column":4},"end":{"line":1287,"column":4}}]},"180":{"line":1287,"type":"binary-expr","locations":[{"start":{"line":1287,"column":7},"end":{"line":1287,"column":12}},{"start":{"line":1287,"column":16},"end":{"line":1287,"column":51}},{"start":{"line":1287,"column":55},"end":{"line":1287,"column":71}}]},"181":{"line":1289,"type":"if","locations":[{"start":{"line":1289,"column":11},"end":{"line":1289,"column":11}},{"start":{"line":1289,"column":11},"end":{"line":1289,"column":11}}]},"182":{"line":1291,"type":"if","locations":[{"start":{"line":1291,"column":11},"end":{"line":1291,"column":11}},{"start":{"line":1291,"column":11},"end":{"line":1291,"column":11}}]},"183":{"line":1291,"type":"binary-expr","locations":[{"start":{"line":1291,"column":14},"end":{"line":1291,"column":31}},{"start":{"line":1291,"column":35},"end":{"line":1291,"column":45}}]},"184":{"line":1314,"type":"binary-expr","locations":[{"start":{"line":1314,"column":16},"end":{"line":1314,"column":27}},{"start":{"line":1314,"column":31},"end":{"line":1314,"column":33}}]},"185":{"line":1329,"type":"binary-expr","locations":[{"start":{"line":1329,"column":16},"end":{"line":1329,"column":27}},{"start":{"line":1329,"column":31},"end":{"line":1329,"column":33}}]},"186":{"line":1330,"type":"binary-expr","locations":[{"start":{"line":1330,"column":14},"end":{"line":1330,"column":20}},{"start":{"line":1330,"column":24},"end":{"line":1330,"column":27}}]},"187":{"line":1332,"type":"if","locations":[{"start":{"line":1332,"column":4},"end":{"line":1332,"column":4}},{"start":{"line":1332,"column":4},"end":{"line":1332,"column":4}}]},"188":{"line":1332,"type":"binary-expr","locations":[{"start":{"line":1332,"column":7},"end":{"line":1332,"column":14}},{"start":{"line":1332,"column":18},"end":{"line":1332,"column":35}},{"start":{"line":1332,"column":39},"end":{"line":1332,"column":43}},{"start":{"line":1332,"column":47},"end":{"line":1332,"column":53}}]},"189":{"line":1354,"type":"if","locations":[{"start":{"line":1354,"column":4},"end":{"line":1354,"column":4}},{"start":{"line":1354,"column":4},"end":{"line":1354,"column":4}}]},"190":{"line":1361,"type":"if","locations":[{"start":{"line":1361,"column":4},"end":{"line":1361,"column":4}},{"start":{"line":1361,"column":4},"end":{"line":1361,"column":4}}]},"191":{"line":1368,"type":"if","locations":[{"start":{"line":1368,"column":4},"end":{"line":1368,"column":4}},{"start":{"line":1368,"column":4},"end":{"line":1368,"column":4}}]}}}} \ No newline at end of file diff --git a/node_modules/terraformer/.coverage/index.html b/node_modules/terraformer/.coverage/index.html new file mode 100644 index 0000000..be0e549 --- /dev/null +++ b/node_modules/terraformer/.coverage/index.html @@ -0,0 +1,93 @@ + + + + Code coverage report for All files + + + + + + + +
    +
    +

    + / +

    +
    +
    + 96.77% + Statements + 660/682 +
    +
    + 91.65% + Branches + 384/419 +
    +
    + 96.51% + Functions + 83/86 +
    +
    + 96.77% + Lines + 660/682 +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FileStatementsBranchesFunctionsLines
    __root__/
    96.77%660/68291.65%384/41996.51%83/8696.77%660/682
    +
    +
    + + + + + + + diff --git a/node_modules/terraformer/.coverage/prettify.css b/node_modules/terraformer/.coverage/prettify.css new file mode 100644 index 0000000..b317a7c --- /dev/null +++ b/node_modules/terraformer/.coverage/prettify.css @@ -0,0 +1 @@ +.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} diff --git a/node_modules/terraformer/.coverage/prettify.js b/node_modules/terraformer/.coverage/prettify.js new file mode 100644 index 0000000..ef51e03 --- /dev/null +++ b/node_modules/terraformer/.coverage/prettify.js @@ -0,0 +1 @@ +window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];var r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var I=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var f=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;arat[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);c(g([[F,/^[\s]+/,null," \t\r\n"],[n,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[m,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[L,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);c(g([],[[n,/^[\s\S]+/]]),["uq.val"]);c(i({keywords:l,hashComments:true,cStyleComments:true,types:e}),["c","cc","cpp","cxx","cyc","m"]);c(i({keywords:"null,true,false"}),["json"]);c(i({keywords:R,hashComments:true,cStyleComments:true,verbatimStrings:true,types:e}),["cs"]);c(i({keywords:x,cStyleComments:true}),["java"]);c(i({keywords:H,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);c(i({keywords:I,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);c(i({keywords:s,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);c(i({keywords:f,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);c(i({keywords:w,cStyleComments:true,regexLiterals:true}),["js"]);c(i({keywords:r,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);c(g([],[[C,/^[\s\S]+/]]),["regex"]);function d(V){var U=V.langExtension;try{var S=a(V.sourceNode);var T=S.sourceCode;V.sourceCode=T;V.spans=S.spans;V.basePos=0;q(U,T)(V);D(V)}catch(W){if("console" in window){console.log(W&&W.stack?W.stack:W)}}}function y(W,V,U){var S=document.createElement("PRE");S.innerHTML=W;if(U){Q(S,U)}var T={langExtension:V,numberLines:U,sourceNode:S};d(T);return S.innerHTML}function b(ad){function Y(af){return document.getElementsByTagName(af)}var ac=[Y("pre"),Y("code"),Y("xmp")];var T=[];for(var aa=0;aa=0){var ah=ai.match(ab);var am;if(!ah&&(am=o(aj))&&"CODE"===am.tagName){ah=am.className.match(ab)}if(ah){ah=ah[1]}var al=false;for(var ak=aj.parentNode;ak;ak=ak.parentNode){if((ak.tagName==="pre"||ak.tagName==="code"||ak.tagName==="xmp")&&ak.className&&ak.className.indexOf("prettyprint")>=0){al=true;break}}if(!al){var af=aj.className.match(/\blinenums\b(?::(\d+))?/);af=af?af[1]&&af[1].length?+af[1]:true:false;if(af){Q(aj,af)}S={langExtension:ah,sourceNode:aj,numberLines:af};d(S)}}}if(X]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),["handlebars","hbs"]);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]); diff --git a/node_modules/terraformer/.coverage/sort-arrow-sprite.png b/node_modules/terraformer/.coverage/sort-arrow-sprite.png new file mode 100644 index 0000000000000000000000000000000000000000..03f704a609c6fd0dbfdac63466a7d7c958b5cbf3 GIT binary patch literal 209 zcmeAS@N?(olHy`uVBq!ia0vp^>_9Bd!3HEZxJ@+%Qj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS>Jii$m5978H@?Fn+^JD|Y9yzj{W`447Gxa{7*dM7nnnD-Lb z6^}Hx2)'; + } + } + return cols; + } + // attaches a data attribute to every tr element with an object + // of data values keyed by column name + function loadRowData(tableRow) { + var tableCols = tableRow.querySelectorAll('td'), + colNode, + col, + data = {}, + i, + val; + for (i = 0; i < tableCols.length; i += 1) { + colNode = tableCols[i]; + col = cols[i]; + val = colNode.getAttribute('data-value'); + if (col.type === 'number') { + val = Number(val); + } + data[col.key] = val; + } + return data; + } + // loads all row data + function loadData() { + var rows = getTableBody().querySelectorAll('tr'), + i; + + for (i = 0; i < rows.length; i += 1) { + rows[i].data = loadRowData(rows[i]); + } + } + // sorts the table using the data for the ith column + function sortByIndex(index, desc) { + var key = cols[index].key, + sorter = function (a, b) { + a = a.data[key]; + b = b.data[key]; + return a < b ? -1 : a > b ? 1 : 0; + }, + finalSorter = sorter, + tableBody = document.querySelector('.coverage-summary tbody'), + rowNodes = tableBody.querySelectorAll('tr'), + rows = [], + i; + + if (desc) { + finalSorter = function (a, b) { + return -1 * sorter(a, b); + }; + } + + for (i = 0; i < rowNodes.length; i += 1) { + rows.push(rowNodes[i]); + tableBody.removeChild(rowNodes[i]); + } + + rows.sort(finalSorter); + + for (i = 0; i < rows.length; i += 1) { + tableBody.appendChild(rows[i]); + } + } + // removes sort indicators for current column being sorted + function removeSortIndicators() { + var col = getNthColumn(currentSort.index), + cls = col.className; + + cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, ''); + col.className = cls; + } + // adds sort indicators for current column being sorted + function addSortIndicators() { + getNthColumn(currentSort.index).className += currentSort.desc ? ' sorted-desc' : ' sorted'; + } + // adds event listeners for all sorter widgets + function enableUI() { + var i, + el, + ithSorter = function ithSorter(i) { + var col = cols[i]; + + return function () { + var desc = col.defaultDescSort; + + if (currentSort.index === i) { + desc = !currentSort.desc; + } + sortByIndex(i, desc); + removeSortIndicators(); + currentSort.index = i; + currentSort.desc = desc; + addSortIndicators(); + }; + }; + for (i =0 ; i < cols.length; i += 1) { + if (cols[i].sortable) { + // add the click event handler on the th so users + // dont have to click on those tiny arrows + el = getNthColumn(i).querySelector('.sorter').parentElement; + if (el.addEventListener) { + el.addEventListener('click', ithSorter(i)); + } else { + el.attachEvent('onclick', ithSorter(i)); + } + } + } + } + // adds sorting functionality to the UI + return function () { + if (!getTable()) { + return; + } + cols = loadColumns(); + loadData(cols); + addSortIndicators(); + enableUI(); + }; +})(); + +window.addEventListener('load', addSorting); diff --git a/node_modules/terraformer/.npmignore b/node_modules/terraformer/.npmignore new file mode 100644 index 0000000..343abba --- /dev/null +++ b/node_modules/terraformer/.npmignore @@ -0,0 +1,14 @@ +examples +versions +source +out +docs +config.rb + +# Ignore Grunt temp files +.grunt + +# SASS +.sass-cache + +playing-around.js \ No newline at end of file diff --git a/node_modules/terraformer/.travis.yml b/node_modules/terraformer/.travis.yml new file mode 100755 index 0000000..d98c3f0 --- /dev/null +++ b/node_modules/terraformer/.travis.yml @@ -0,0 +1,9 @@ +language: node_js +sudo: false +before_install: npm install -g grunt-cli +node_js: + - "6" + - "4" +cache: + directories: + - node_modules diff --git a/node_modules/terraformer/CHANGELOG.md b/node_modules/terraformer/CHANGELOG.md new file mode 100644 index 0000000..cafb346 --- /dev/null +++ b/node_modules/terraformer/CHANGELOG.md @@ -0,0 +1,78 @@ +# Change Log +All notable changes to this project will be documented in this file. +This project adheres to [Semantic Versioning](http://semver.org/). + +## [unreleased] + +## [1.0.8] - 2017-04-24 + +### Changed +* removed `.sass-cache` and another local debugging file from npm package + +## [1.0.7] - 2016-10-17 + +### Fixed +* ensure that contains()/within() can compare the geometry of GeoJSON feature objects. [#281](https://github.com/Esri/Terraformer/issues/281) + +### Removed +* the minified library and archived versions have been removed from source control + +## [1.0.6] - 2016-08-17 + +### Added +* typings for TypeScript folks (thx [@JeffJacobson](https://github.com/JeffJacobson)) [#20](https://github.com/Esri/terraformer-wkt-parser/pull/20) +* lots of little website improvements + +## [1.0.5] - 2015-03-14 + +### Changed + +* Use Jarvis March for convex hulls + +## [1.0.4] - 2014-08-06 + +### Fixed + +* Internal improvements to `addVertex()` and `arrayIntersectsArrays` + +### Added + +* new `isConvex()` method + +## [1.0.3] - 2014-02-24 + +### Fixed + +* MultiPolygons can now be closed with the `multipolygon.close()` method. +* Circles are now closed properly [#234](https://github.com/Esri/Terraformer/pull/234) + +## [1.0.2] - 2013-12-16 + +This release fixes several issues related to convexHull and ensures the Polygons are closed under a variety of situations. + +### Breaking Changes + +primitive.convexHull() now always returns null or a valid Terraformer.Polygon. It will not return arrays or throw errors. + +### Fixed + +* `Terraformer.Circle` is now closed. +* `Polygon`s returned by `primitive.convexHull()` are now closed. + +### Added + +* `primitive.convexHull()`` will now handle features. + +## [1.0.1] - 2013-11-12 + +Initial Release + +[unreleased]: https://github.com/Esri/Terraformer/compare/v1.0.8...HEAD +[1.0.8]: https://github.com/Esri/Terraformer/compare/v1.0.7...v1.0.8 +[1.0.7]: https://github.com/Esri/Terraformer/compare/v1.0.6...v1.0.7 +[1.0.6]: https://github.com/Esri/Terraformer/compare/v1.0.5...v1.0.6 +[1.0.5]: https://github.com/Esri/Terraformer/compare/v1.0.4...v1.0.5 +[1.0.4]: https://github.com/Esri/Terraformer/compare/v1.0.3...v1.0.4 +[1.0.3]: https://github.com/Esri/Terraformer/compare/v1.0.2...v1.0.3 +[1.0.2]: https://github.com/Esri/Terraformer/compare/v1.0.1...v1.0.2 +[1.0.1]: https://github.com/Esri/Terraformer/releases/tag/v1.0.1 diff --git a/node_modules/terraformer/Gemfile b/node_modules/terraformer/Gemfile new file mode 100644 index 0000000..7ae8f88 --- /dev/null +++ b/node_modules/terraformer/Gemfile @@ -0,0 +1,7 @@ +# If you have OpenSSL installed, we recommend updating +# the following line to use "https" +source 'http://rubygems.org' + +gem "middleman", "~>3.1.6" +gem "middleman-rouge" +gem "redcarpet" \ No newline at end of file diff --git a/node_modules/terraformer/Gemfile.lock b/node_modules/terraformer/Gemfile.lock new file mode 100644 index 0000000..d73c50d --- /dev/null +++ b/node_modules/terraformer/Gemfile.lock @@ -0,0 +1,101 @@ +GEM + remote: http://rubygems.org/ + specs: + activesupport (3.2.21) + i18n (~> 0.6, >= 0.6.4) + multi_json (~> 1.0) + chunky_png (1.3.4) + coffee-script (2.2.0) + coffee-script-source + execjs + coffee-script-source (1.9.1.1) + compass (1.0.3) + chunky_png (~> 1.2) + compass-core (~> 1.0.2) + compass-import-once (~> 1.0.5) + rb-fsevent (>= 0.9.3) + rb-inotify (>= 0.9) + sass (>= 3.3.13, < 3.5) + compass-core (1.0.3) + multi_json (~> 1.0) + sass (>= 3.3.0, < 3.5) + compass-import-once (1.0.5) + sass (>= 3.2, < 3.5) + execjs (1.4.1) + multi_json (~> 1.0) + ffi (1.9.8) + haml (4.0.6) + tilt + hike (1.2.3) + i18n (0.6.11) + kramdown (1.7.0) + listen (1.3.1) + rb-fsevent (>= 0.9.3) + rb-inotify (>= 0.9) + rb-kqueue (>= 0.2) + middleman (3.1.6) + coffee-script (~> 2.2.0) + compass (>= 0.12.2) + execjs (~> 1.4.0) + haml (>= 3.1.6) + kramdown (~> 1.2) + middleman-core (= 3.1.6) + middleman-more (= 3.1.6) + middleman-sprockets (>= 3.1.2) + sass (>= 3.1.20) + uglifier (~> 2.1.0) + middleman-core (3.1.6) + activesupport (~> 3.2.6) + bundler (~> 1.1) + i18n (~> 0.6.1) + listen (~> 1.1) + rack (>= 1.4.5) + rack-test (~> 0.6.1) + thor (>= 0.15.2, < 2.0) + tilt (~> 1.3.6) + middleman-more (3.1.6) + middleman-rouge (0.0.1) + middleman-core (>= 3.0.0) + redcarpet (>= 2.2.0) + rouge (>= 0.3.0) + middleman-sprockets (3.1.4) + middleman-core (>= 3.0.14) + middleman-more (>= 3.0.14) + sprockets (~> 2.1) + sprockets-helpers (~> 1.0.0) + sprockets-sass (~> 1.0.0) + multi_json (1.11.1) + rack (1.6.1) + rack-test (0.6.3) + rack (>= 1.0) + rb-fsevent (0.9.5) + rb-inotify (0.9.5) + ffi (>= 0.5.0) + rb-kqueue (0.2.4) + ffi (>= 0.5.0) + redcarpet (3.3.1) + rouge (1.9.0) + sass (3.4.14) + sprockets (2.12.3) + hike (~> 1.2) + multi_json (~> 1.0) + rack (~> 1.0) + tilt (~> 1.1, != 1.3.0) + sprockets-helpers (1.0.1) + sprockets (~> 2.0) + sprockets-sass (1.0.3) + sprockets (~> 2.0) + tilt (~> 1.1) + thor (0.19.1) + tilt (1.3.7) + uglifier (2.1.2) + execjs (>= 0.3.0) + multi_json (~> 1.0, >= 1.0.2) + +PLATFORMS + ruby + +DEPENDENCIES + middleman (~> 3.1.6) + middleman-rouge + redcarpet diff --git a/node_modules/terraformer/LICENSE b/node_modules/terraformer/LICENSE new file mode 100755 index 0000000..7365790 --- /dev/null +++ b/node_modules/terraformer/LICENSE @@ -0,0 +1,7 @@ +Copyright (c) 2013 Esri, Inc + +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. diff --git a/node_modules/terraformer/README.md b/node_modules/terraformer/README.md new file mode 100755 index 0000000..92e299e --- /dev/null +++ b/node_modules/terraformer/README.md @@ -0,0 +1,125 @@ +# Terraformer + +[![Build Status](https://travis-ci.org/Esri/Terraformer.svg?branch=master)](https://travis-ci.org/Esri/Terraformer) + +> A modular toolkit for working with geographic data. + +## Modules + +The Terraformer project is broken up into a series of smaller modules. + +* [Terraformer Core](http://terraformer.io/core/) - Contains methods and objects for working with GeoJSON. This also contains common methods used by other modules. +* [WKT Parser](http://terraformer.io/wkt-parser/) - Parse Well Known Text into GeoJSON and vice versa. +* [ArcGIS Geometry Parser](http://terraformer.io/arcgis-parser/) - Parse the [ArcGIS Geometry Format](http://resources.arcgis.com/en/help/arcgis-rest-api/#/Geometry_Objects/02r3000000n1000000/) into GeoJSON and vice versa. +* [GeoStore](http://terraformer.io/geostore/) - A framework for persisting and querying GeoJSON features with pluggable indexes and persistent stores. + +## Features + +* Designed to work in Node and the browser +* No dependencies on other tools or libraries + +## Getting Started + +Check out the getting [started guide](http://terraformer.io/getting-started/) which will give you an overview of core concepts and methods in Terraformer. + +### Node.js + +Install the core module with npm and then require it in your Node program. + +``` +$ npm install terraformer +``` + +```js +var Terraformer = require('terraformer'); +``` + +If needed, supporting packages can be added too. + +```js +require('terraformer-arcgis-parser'); +require('terraformer-wkt-parser'); +require('terraformer-geostore'); +``` + +### Browser + +To see Terraformer in action in the browser, check out our [live demos](http://terraformer.io/examples/browser/index.html). To use it in the browser yourself, reference it using a ` +``` + +To utilize supporting packages, you must load their source as well. + +```html + + +``` + +## Documentation + +Make sure you check out the full documentation on the [Terraformer website](http://terraformer.io/core/) and the [getting started guide](http://terraformer.io/getting-started/). + +```js +var polygon = new Terraformer.Primitive({ + "type": "Polygon", + "coordinates": [ + [ + [-122.665894, 45.5229015], + [-122.669263, 45.5229165], + [-122.671151, 45.5184062], + [-122.673254, 45.5140008], + [-122.668426, 45.5127378], + [-122.667654, 45.5169478], + [-122.665894, 45.5229015] + ] + ] +}); + +var point = new Terraformer.Primitive({ + "type": "Point", + "coordinates": [-122.669477, 45.517760] +}); +``` + +Now that you have a point and a polygon primitive you can use the primitive helper methods. + +```js +// add a new vertex to our polygon +polygon.insertVertex([-122.670851, 45.513189], 2); + +// figure out if our point is within our polygon +point.within(polygon); // returns true +``` + +You can also have Terraformer perform many geometric operations like convex hulls and bounding boxes. + +```js +var convexHull = polygon.convexHull(); + +point.within(convexHull); // returns true + +var boundingBox = polygon.bbox(); // returns the geojson bounding box for this object. +``` + +## Resources + +* [Documentation Site](http://terraformer.io) +* [@EsriPDX](http://twitter.com/esripdx) + +## Building the documentation + +To build the site locally, first `bundle install` then `bundle exec middleman` to run a local server. Maintainers can run `bundle exec middleman build`, then `grunt gh-pages` to deploy to github pages. + +## Issues + +Find a bug or want to request a new feature? Please let us know by submitting an issue. + +## Contributing + +Esri welcomes contributions from anyone and everyone. Please see our [guidelines for contributing](https://github.com/esri/contributing). + +## Licensing + +A copy of the license is available in the repository's [LICENSE](./LICENSE) file. diff --git a/node_modules/terraformer/bower.json b/node_modules/terraformer/bower.json new file mode 100644 index 0000000..c0e3fb9 --- /dev/null +++ b/node_modules/terraformer/bower.json @@ -0,0 +1,13 @@ +{ + "name": "terraformer", + "main": "terraformer.min.js", + "ignore": [ + "docs", + "examples", + "spec", + "versions", + "source", + "Gemfile", + "config.rb" + ] +} diff --git a/node_modules/terraformer/docs-build/CNAME b/node_modules/terraformer/docs-build/CNAME new file mode 100644 index 0000000..50fee9f --- /dev/null +++ b/node_modules/terraformer/docs-build/CNAME @@ -0,0 +1 @@ +terraformer.io \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/arcgis-parser/index.html b/node_modules/terraformer/docs-build/arcgis-parser/index.html new file mode 100644 index 0000000..e8da289 --- /dev/null +++ b/node_modules/terraformer/docs-build/arcgis-parser/index.html @@ -0,0 +1,197 @@ + + + + + + + Terraformer + + + + + + +
    +
    + +
    +
    + +
    +

    ArcGIS JSON Parser

    + + +

    This plugin handles two-way conversion between GeoJSON and the ArcGIS Geometry format used by Esri.

    +

    + + Link + Using the ArcGIS JSON Parser + Back to Top +

    +

    The ArcGIS parser can be used client-side in a browser and server-side via Node.js.

    +
    // parse an ArcGIS Geometry to GeoJSON
    +var geojsonPoint = Terraformer.ArcGIS.parse({
    +  "x":-122.6764,
    +  "y":45.5165,
    +  "spatialReference": {
    +    "wkid": 4326
    +  }
    +});
    +
    +// convert a GeoJSON object into an ArcGIS geometry
    +var arcgisPoint = Terraformer.ArcGIS.convert({
    +  "type": "Point",
    +  "coordinates": [45.5165, -122.6764]
    +});
    +
    +

    + + Link + Using in the Browser + Back to Top +

    +

    In the browser, the core Terraformer library is required.

    +
    <script src="terraformer.min.js"></script>
    +<script src="terraformer-arcgis-parser.min.js"></script>
    +<script>
    +  // Terraformer and Terraformer.ArcGIS will be defined.
    +</script>
    +
    + +

    You can also use Bower to install the components if you like, or download them and host them yourself.

    +
    $ bower install terraformer-arcgis-parser
    +
    +

    + + Link + Using in Node.js + Back to Top +

    +

    Just install the package from npm with $ npm install terraformer-arcgis-parser Then include it in your application.

    +
    Terraformer.ArcGIS = require('terraformer-arcgis-parser');
    +
    +// Start parsing and converting!
    +
    +

    + + Link + Methods + Back to Top +

    + + Link + ArcGIS.parse(json, options) + Back to Top +

    +

    Terraformer.ArcGIS.parse(json, options) - Converts from ArcGIS JSON to GeoJSON or a Terraformer.Primitive.

    + + + + + + + + + + + + + + + +
    OptionTypeDefaultDescription
    idAttributeString"OBJECTID"By default, when converting GeoJSON Features the id key of your output feature will be set on the OBJECTID field. This option allows you to assign your ID using a different fieldname.
    +
    Notes
    +

    Terraformer will also handle converting FeatureCollection and GeometryCollection objects to arrays of ArcGIS geometries or features. However it will not do this in reverse. This is because there is no official structure for arrays of features and geometries in ArcGIS and output features will be missing an id property. See this issue for more details.

    +
    Example
    // parse an ArcGIS Geometry to GeoJSON
    +var point = Terraformer.ArcGIS.parse({
    +  "x":-122.6764,
    +  "y":45.5165,
    +  "spatialReference": {
    +    "wkid": 4326
    +  }
    +});
    +
    +

    + + Link + ArcGIS.convert(geojson, options) + Back to Top +

    +

    Terraformer.ArcGIS.convert(geoJSON, options) will convert GeoJSON or a Terraformer Primitive to ArcGIS JSON.

    + + + + + + + + + + + + + + + + + + + + + +
    OptionTypeDefaultDescription
    srNumber4326This is used to set the value of spatialReference.wkid in the output. Setting sr does not convert the geojson coordinates, it only identifies the projection using the appropriate code.
    idAttributeString"OBJECTID" "FID"When converting ArcGIS Feature the attributes will contain the ID of the feature. This is usually called OBJECTID or FID. If your feature does not use the OBJECTID or FID keys as its ID, you should define what the key representing your Features ID is.
    +
    Notes
    +

    If the geometry is in the Web Mercator spatial reference it will be reprojected to WGS84.

    +
    Example
    // take a Terraformer.Primitive or GeoJSON and convert it to an ArcGIS JSON object
    +var point = ArcGIS.convert({
    +  "type": "Point",
    +  "coordinates": [45.5165, -122.6764]
    +});
    +
    + +
    + + + + + + + + \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/assets/css/terraformer-02847305.css b/node_modules/terraformer/docs-build/assets/css/terraformer-02847305.css new file mode 100644 index 0000000..335da2d --- /dev/null +++ b/node_modules/terraformer/docs-build/assets/css/terraformer-02847305.css @@ -0,0 +1 @@ +@import url(http://fonts.googleapis.com/css?family=Cardo:700,400italic);@import url(http://fonts.googleapis.com/css?family=PT+Mono);@import url(http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,700italic,400,300,700);html{overflow-y:scroll;font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio[controls],canvas,video{display:inline-block;zoom:1}a:hover,a:active{outline:0}svg:not(:root){overflow:hidden}a,abbr,acronym,address,b,big,cite,code,del,em,i,ins,kbd,mark,output,q,samp,small,strike,strong,sub,sup,time,tt,var,dfn,dl,dt,dd,ol,ul,li,blockquote,h1,h2,h3,h4,h5,h6,p,pre,applet,canvas,embed,figure,figcaption,iframe,img,object{background:transparent;border:0;font-size:100%;font:inherit;line-height:1.0;margin:0;padding:0;vertical-align:baseline}body{background-color:#EAE8E5;color:#333333;font-family:'Lucida Grande', 'Lucida Sans Unicode', sans-serif;font-style:normal;font-weight:400;text-rendering:optimizeLegibility}h1{font-size:2.375rem;line-height:3rem;margin-top:0;padding-top:0.54167rem;margin-bottom:-0.54167rem;font-family:'Open Sans', sans-serif;font-style:normal;font-weight:400;text-rendering:optimizeLegibility;padding-bottom:1.5rem}h2{font-size:2rem;line-height:3rem;margin-top:0;padding-top:0.66667rem;margin-bottom:-0.66667rem;font-family:'Open Sans', sans-serif;font-style:normal;font-weight:400;text-rendering:optimizeLegibility;padding-bottom:1.5rem}h3{font-size:1.5rem;line-height:1.5rem;margin-top:0;padding-top:0.25rem;margin-bottom:-0.25rem;font-family:'Open Sans', sans-serif;font-style:normal;font-weight:400;text-rendering:optimizeLegibility;padding-bottom:1.5rem}h4{font-size:1.125rem;line-height:1.5rem;margin-top:0;padding-top:0.375rem;margin-bottom:-0.375rem;font-family:'Open Sans', sans-serif;font-style:normal;font-weight:400;text-rendering:optimizeLegibility;padding-bottom:1.5rem}h5{font-size:1.125rem;line-height:1.5rem;margin-top:0;padding-top:0.375rem;margin-bottom:-0.375rem;font-family:'Open Sans', sans-serif;font-style:normal;font-weight:400;text-rendering:optimizeLegibility;padding-bottom:1.5rem}h6{font-size:1rem;line-height:1.5rem;margin-top:0;padding-top:0.33333rem;margin-bottom:-0.33333rem;font-family:'Open Sans', sans-serif;font-style:normal;font-weight:700;text-rendering:optimizeLegibility;padding-bottom:1.5rem}h1,h2,h3,h4,h5,h6{margin-top:2rem;position:relative}h1:hover .header-link,h2:hover .header-link,h3:hover .header-link,h4:hover .header-link,h5:hover .header-link,h6:hover .header-link{display:block}p{font-size:1rem;line-height:1.5rem;margin-top:0;padding-top:0.33333rem;margin-bottom:-0.33333rem;padding-bottom:1.5rem}a{color:#B26A61;border-bottom:1px dashed;padding-bottom:0.25rem;text-decoration:none}a:hover{color:#d3aba6;border-bottom:1px dashed}a code{color:#B26A61}li{padding-bottom:0.75rem}blockquote{font-size:1rem;line-height:1.5rem;margin-top:0;padding-top:0.33333rem;margin-bottom:-0.33333rem;margin-left:0;padding-top:1.5rem;padding-bottom:1.5rem}b,strong{font-family:'Open Sans', sans-serif;font-style:normal;font-weight:700;text-rendering:optimizeLegibility}em,cite{font-family:'Open Sans', sans-serif;font-style:italic;font-weight:400;text-rendering:optimizeLegibility}small{font-size:0.75rem;line-height:1.16667rem}sub,sup{font-family:'Open Sans', sans-serif;font-style:normal;font-weight:700;text-rendering:optimizeLegibility;font-size:75%;line-height:0;position:relative;vertical-align:baseline;padding-left:0.08333rem;padding-right:0.08333rem}sup{top:-0.5em}sub{bottom:-0.25em}code{font-family:'PT Mono', sans-serif;letter-spacing:0.08333rem;padding:3px;color:#72a983}code em{color:gray}pre{font-family:'PT Mono', sans-serif;letter-spacing:0.08333rem;font-size:0.875rem;line-height:1.5rem;margin-top:0;padding-top:0.45833rem;margin-bottom:-0.45833rem;line-height:1.5rem;margin-bottom:1.5rem;overflow-x:auto;display:block;padding:1rem;background:#002b36;color:#839496}@media screen and (max-width: 960px){pre{width:90%}}pre code{display:block;overflow:auto;word-wrap:normal;padding:1.5rem;line-height:1.125rem}ul,ol{margin-bottom:1.16667rem}ul li:first-child,ol li:first-child{margin-top:0.33333rem}ul ul,ul ol,ol ul,ol ol{margin-top:-0.5rem}ul ul li:first-child,ul ol li:first-child,ol ul li:first-child,ol ol li:first-child{margin-top:0.5rem}ul ol,ol ol{list-style-type:lower-alpha}nav ul li:first-child,nav ol li:first-child{margin-top:0}dl{margin-top:0}dl dt{font-family:'Open Sans', sans-serif;font-style:normal;font-weight:400;text-rendering:optimizeLegibility;font-size:1.125rem;line-height:1.5rem;margin-top:0;padding-top:0.375rem;margin-bottom:-0.375rem}dl dd{margin:0;font-size:1rem;line-height:1.5rem;margin-top:0;padding-top:0.33333rem;margin-bottom:-0.33333rem}dl.horizontal{padding-top:0.5rem}dl.horizontal dt{font-family:'Open Sans', sans-serif;font-style:normal;font-weight:400;text-rendering:optimizeLegibility;font-size:1.125rem;line-height:1.5rem;margin-top:0;padding-top:0.375rem;margin-bottom:-0.375rem;float:left}dl.horizontal dd{margin-left:12rem;font-size:1rem;line-height:1.5rem;margin-top:0;padding-top:0.33333rem;margin-bottom:-0.33333rem}table{width:100%;font-size:0.875rem;line-height:1.5rem;margin-top:0;padding-top:0.45833rem;margin-bottom:-0.45833rem;border-spacing:0;border-collapse:collapse;border:1px solid #c8c3bb;margin-bottom:1.5rem}table thead{background:#d3cfc9}table thead th{font-size:1rem;line-height:1.5rem;margin-top:0;padding-top:0.33333rem;margin-bottom:-0.33333rem;font-family:'Open Sans', sans-serif;font-style:normal;font-weight:700;text-rendering:optimizeLegibility;text-align:left}table th,table td{padding:0.5rem;border-bottom:1px solid #c8c3bb}table tbody tr:nth-child(even){background:#dfdcd7}.button{display:inline-block;font-family:'Open Sans', sans-serif;font-style:normal;font-weight:300;text-rendering:optimizeLegibility;font-size:0.875rem;line-height:1.5rem;margin-top:0;padding-top:0.45833rem;margin-bottom:-0.45833rem;padding:0.5rem 1rem;background-color:#595959;color:white;border:1px solid #404040;text-decoration:none}.button:hover{color:white;background-color:#404040}.button.button-light{background-color:#a6a6a6;border:1px solid #8c8c8c}.button.button-light:hover{color:white;background-color:#92BC9F;border:1px solid #72a983}.button.button-green{background-color:#92BC9F;border:1px solid #72a983}.button.button-green:hover{background-color:#72a983}.button.button-blue{background-color:#7EB3FE;border:1px solid #4b95fe}.button.button-blue:hover{background-color:#4b95fe}.button.button-red{background-color:#B26A61;border:1px solid #975249}.button.button-red:hover{background-color:#975249}.button.button-disabled,.button.button:disabled{background-color:#ededed;border:1px solid #d4d4d4;color:#a6a6a6}.button.button-disabled:hover,.button.button:disabled:hover{background-color:#ededed}.button.button-cancel{background-color:gray;border:1px solid #666666}.button.button-cancel:hover{background-color:#666666}.c{color:#586e75}.cm{color:#586e75}.cp{color:#586e75}.c1{color:#586e75}.cs{color:#586e75}.err{color:#dc322f}.k{color:#cb4b16}.o{color:#93a1a1}.p{color:#93a1a1}.ow{color:#2aa198}.gd{color:#93a1a1;display:inline-block}.gd .x{color:#93a1a1;display:inline-block}.ge{color:#93a1a1}.gr{color:#aa0000}.gh{color:#586e75}.gi{color:#93a1a1;display:inline-block}.gi .x{color:#93a1a1;display:inline-block}.go{color:#888888}.gp{color:#555555}.gs{color:#93a1a1}.gu{color:#6c71c4}.gt{color:#aa0000}.kc{color:#859900}.kd{color:#268bd2}.kp{color:#cb4b16}.kr{color:#d33682}.kt{color:#2aa198}.n{color:#268bd2}.na{color:#268bd2}.nb{color:#859900}.nc{color:#d33682}.no{color:#b58900}.ni{color:#800080}.nl{color:#859900}.ne{color:#268bd2}.nf{color:#268bd2}.nn{color:#b58900}.nt{color:#268bd2}.nx{color:#b58900}.bp{color:#999999}.vc{color:#008080}.vg{color:#268bd2}.vi{color:#268bd2}.nv{color:#268bd2}.w{color:#bbbbbb}.mf{color:#2aa198}.m{color:#2aa198}.mh{color:#2aa198}.mi{color:#2aa198}.mo{color:#009999}.s{color:#2aa198}.sb{color:#d14}.sc{color:#d14}.sd{color:#2aa198}.s2{color:#2aa198}.se{color:#dc322f}.sh{color:#d14}.si{color:#268bd2}.sx{color:#d14}.sr{color:#2aa198}.s1{color:#2aa198}.ss{color:#990073}.il{color:#009999}div .gd,div .gd .x,div .gi,div .gi .x{display:inline-block;width:100%}#wrap{overflow:hidden}.index,.docs{max-width:1680px;margin:auto;padding-top:3rem;padding-bottom:3rem;padding-left:18.75%;width:80%}@media screen and (max-width: 960px){.index,.docs{padding-left:18.75%;padding-right:18.75%}}@media screen and (max-width: 662px){.index,.docs{padding-left:9.375%;padding-right:9.375%}}.index .subhead,.docs .subhead{position:relative;background-color:transparent;padding-top:1.5rem;clear:both}.index .subhead h2,.docs .subhead h2{font-size:2.375rem;line-height:3rem;margin-top:0;padding-top:0.54167rem;margin-bottom:-0.54167rem;font-family:'Open Sans', sans-serif;font-style:normal;font-weight:300;text-rendering:optimizeLegibility;margin-bottom:-0.91667rem;line-height:3rem}.index .subhead h3,.docs .subhead h3{font-family:'Open Sans', sans-serif;font-style:normal;font-weight:700;text-rendering:optimizeLegibility;font-size:1.125rem;line-height:1.5rem;margin-top:0;padding-top:0.375rem;margin-bottom:-0.375rem}.index .subhead img,.docs .subhead img{margin:auto;position:absolute;margin-left:-31.25%;width:25%}@media screen and (max-width: 960px){.index .subhead img,.docs .subhead img{display:none}}.index h4,.docs h4{font-family:'Open Sans', sans-serif;font-style:normal;font-weight:700;text-rendering:optimizeLegibility;font-size:1.125rem;line-height:1.5rem;margin-top:0;padding-top:0.375rem;margin-bottom:-0.375rem}.index p,.docs p{width:62.5%}@media screen and (max-width: 960px){.index p,.docs p{width:100%}}.index blockquote,.docs blockquote{float:right;max-width:37.5%;padding-top:1rem}@media screen and (max-width: 960px){.index blockquote,.docs blockquote{float:none;max-width:100%;padding-bottom:0;text-align:center}}.index blockquote p,.docs blockquote p{color:#589069;font-family:'PT Mono', sans-serif;font-size:1.5rem;line-height:1.5rem;margin-top:0;padding-top:0.25rem;margin-bottom:-0.25rem;max-width:100%;min-width:0;line-height:2.25rem;padding-left:2em}@media screen and (max-width: 960px){.index blockquote p,.docs blockquote p{padding-left:0}}.index .button-light,.docs .button-light{color:white}.index aside,.docs aside{width:18.75%}.docs{padding-left:0}.docs pre{padding-left:1em;margin-left:37.5%;width:63%}.docs table{margin-left:37.5%;width:62.5%}.docs aside{width:18.75%;padding-left:0;float:left;z-index:150}.docs main{overflow:hidden;*zoom:1;width:62.5%;padding-top:4.5rem}.docs p{width:62.5%;padding-left:18.75%}.docs img{width:31.25%;margin-left:18.75%;display:block;padding-bottom:1.5rem}@media screen and (max-width: 960px){.docs img{width:41.25%}}.index{padding-left:18.75%;width:60%}.container{max-width:1680px}.docs h1,.docs h2,.docs h3,.docs h4,.docs h5,.docs h6,.docs ol,.docs ul,.docs p{padding-left:37.5%;z-index:1}.docs li{font-size:1rem;line-height:1.5rem;margin-top:0;padding-top:0.33333rem;margin-bottom:-0.33333rem}aside.docs{position:absolute;float:left;padding-left:0;margin-top:1.5rem;z-index:100}aside.docs ul{padding-left:18.75%;list-style-type:none}aside.docs li{z-index:2;padding-bottom:0.75rem}aside.docs a:hover{color:#72a983}nav{top:0;left:0;right:0;background:#1D2D42;position:fixed;padding-bottom:0.5rem;display:block;z-index:250}nav ul{margin:auto;max-width:1680px;padding-bottom:0.25rem;padding-right:9.375%}nav ul li{font-family:'Open Sans', sans-serif;font-style:normal;font-weight:300;text-rendering:optimizeLegibility;text-transform:uppercase;letter-spacing:0.08333rem;font-size:0.875rem;line-height:1.5rem;margin-top:0;padding-top:0.45833rem;margin-bottom:-0.45833rem;display:inline;float:right;padding:0.5rem 0.5rem}nav ul li:first-child{float:left;padding-left:9.375%}@media screen and (max-width: 662px){nav ul li:first-child{padding-left:9.375%}}nav ul li a{color:#fafafa;text-decoration:none;padding-bottom:0.08333rem}nav ul li a:hover{color:#92BC9F;border-bottom:1px dashed #92BC9F}.doctoc .container{padding-left:37.5%}.doctoc ul{padding-top:3rem;float:left;list-style-type:none}.doctoc li{margin-bottom:0.375rem}.doctoc .indent{padding-left:2em}.doctoc a{color:#ededed}.doctoc a:hover{color:#B26A61;background-color:transparent}.subnav{background-color:#1D2D42;overflow:hidden;*zoom:1}.subnav .container{max-width:1680px;margin:auto}.subnav section{text-align:center;float:left;width:25%;padding:0;margin:0}.subnav h4{font-family:'Open Sans', sans-serif;font-style:normal;font-weight:300;text-rendering:optimizeLegibility;font-size:1rem;line-height:1.5rem;margin-top:0;padding-top:0.33333rem;margin-bottom:-0.33333rem;padding:0.75rem 0 1.125rem 0}.subnav h4:hover{background-color:#0d151f}.subnav a{width:100%;margin:0.75rem 0;color:#ededed;text-decoration:none}.subnav a:hover{color:#ededed;background-color:#0d151f}footer{margin:0;padding-top:1.5rem;padding-bottom:0;width:100%;color:white;background-color:#333333;text-align:center}footer p{font-family:'Open Sans', sans-serif;font-style:normal;font-weight:400;text-rendering:optimizeLegibility;font-size:0.875rem;line-height:1.5rem;margin-top:0;padding-top:0.45833rem;margin-bottom:-0.45833rem}.cover{background:#39567F;padding:4.5rem 0 0;width:100%}@media screen and (max-width: 960px){.cover{padding-bottom:0}}.cover section{width:65%;margin:auto}.cover h1{padding:0;width:1em;margin:20px 0 0 48px;float:left;background-color:#ededed;font-size:256px;border-radius:0.5em}@media screen and (max-width: 960px){.cover h1{font-size:9em;margin:auto;text-align:center;float:none}}.cover h2{font-size:2.375rem;line-height:3rem;margin-top:0;padding-top:0.54167rem;margin-bottom:-0.54167rem;font-family:'PT Mono', sans-serif;color:#EAE8E5;padding-left:9em;margin-top:0;width:45%;padding-top:1.5rem}@media screen and (max-width: 960px){.cover h2{font-size:1.5rem;line-height:1.5rem;margin-top:0;padding-top:0.25rem;margin-bottom:-0.25rem;padding-top:1.5rem;margin:auto;text-align:center;width:100%;padding-left:0}}.cover .cover-actions{padding-left:21.5rem;padding-bottom:4.5rem;width:45%}@font-face{font-family:'esri-logo';src:url("../fonts/esri-logo-fc93d7bf.eot");src:url("../fonts/esri-logo-fc93d7bf.eot?#iefix") format("embedded-opentype"),url("../fonts/esri-logo-80bed756.woff") format("woff"),url("../fonts/esri-logo-71163913.ttf") format("truetype"),url("../fonts/esri-logo-3a94862e.svg#esri-Set") format("svg");font-weight:normal;font-style:normal}.icon{font-family:'esri-logo';-webkit-font-feature-settings:"liga","dlig";-moz-font-feature-settings:"liga=1, dlig=1";-moz-font-feature-settings:"liga","dlig";-ms-font-feature-settings:"liga","dlig";-o-font-feature-settings:"liga","dlig";font-feature-settings:"liga","dlig";text-rendering:optimizeLegibility;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;color:#6d6e71}.terraformer{color:rgba(38,122,64,0.5)}.terraformer:after{content:"terraformerfront";color:#000000;opacity:0.5;margin-left:-1em}.terraformer:before{content:"terraformerback";color:#912a1d;opacity:0.7;margin-right:-1em}.semantic-toc{position:absolute;z-index:100}.semantic-toc ol{float:left;padding-left:0}.semantic-toc ol li{line-height:1.5rem;padding-left:0;list-style-type:lower-roman}.semantic-toc ol li:first-child{margin-top:1.5rem}.semantic-toc ol li ol{padding-left:1.5rem;margin-bottom:0;float:none}.header-link,.back-to-top-link{font-size:0.75rem;line-height:1.5rem;margin-top:0;padding-top:0.58333rem;margin-bottom:-0.58333rem;font-family:'Open Sans', sans-serif;font-style:normal;font-weight:300;text-rendering:optimizeLegibility;border:none;display:none;position:absolute;margin-left:-3em;margin-right:0.5em;color:#c8c3bb;z-index:10}.header-link:hover,.back-to-top-link:hover{color:#a69d90;border:none}h2 .header-link,h2 .back-to-top-link{margin-top:0.66667rem}h3 .header-link,h3 .back-to-top-link{margin-top:-0.25rem}h4 .header-link,h4 .back-to-top-link{margin-top:-0.33333rem}.back-to-top-link{right:0;float:right;margin-left:0;margin-right:0}.section-link{border:none;position:absolute;height:40px;top:-40px;display:block;z-index:-100;opacity:0}h2 .header-link,h2 .back-to-top-link{margin-top:10px}h4 .header-link,h4 .back-to-top-link{margin-top:-7px}h2:hover .header-link,h2:hover .back-to-top-link,h3:hover .header-link,h3:hover .back-to-top-link,h4:hover .header-link,h4:hover .back-to-top-link,h5:hover .header-link,h5:hover .back-to-top-link,h6:hover .header-link,h6:hover .back-to-top-link{display:inline-block}.drawer{-webkit-transform:translate3d(0, 0, 0);background:transparent;background:transparent;overflow:hidden;position:fixed;visibility:hidden;z-index:200;bottom:0;height:100%;width:100%;left:0;right:0;top:0;-webkit-transition:all 400ms linear;-moz-transition:all 400ms linear;-ms-transition:all 400ms linear;-o-transition:all 400ms linear;transition:all 400ms linear}.drawer.active-left,.drawer.active-right,.drawer.active-top{visibility:visible;background-color:rgba(0,0,0,0.6);-webkit-transition:all 200ms linear;-moz-transition:all 200ms linear;-ms-transition:all 200ms linear;-o-transition:all 200ms linear;transition:all 200ms linear}.drawer-nav{list-style:none;width:280px;margin:0;padding:0;position:absolute;top:0;height:100%;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;background:white;-webkit-transition:all 300ms cubic-bezier(0.215, 0.44, 0.42, 0.88)}.drawer-left{-webkit-transform:translate3d(-280px, 0, 0);-moz-transform:translate3d(-280px, 0, 0);-ms-transform:translate3d(-280px, 0, 0);-o-transform:translate3d(-280px, 0, 0);transform:translate3d(-280px, 0, 0);left:0}.drawer.active-left .drawer-left{-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);transition:-webkit-transform 300ms cubic-bezier(0.215, 0.44, 0.42, 0.88)}.drawer-right{margin-left:100%;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}.drawer.active-right .drawer-right{-webkit-transform:translate3d(-280px, 0, 0);-moz-transform:translate3d(-280px, 0, 0);-ms-transform:translate3d(-280px, 0, 0);-o-transform:translate3d(-280px, 0, 0);transform:translate3d(-280px, 0, 0);transition:-webkit-transform 300ms cubic-bezier(0.215, 0.44, 0.42, 0.88)}.drawer-top{padding-top:1.5rem;top:-525px;width:100%;height:500px;background-color:#92BC9F}.drawer.active-top .drawer-top{width:100%;-webkit-transform:translate3d(0, 500px, 0);-moz-transform:translate3d(0, 500px, 0);-ms-transform:translate3d(0, 500px, 0);-o-transform:translate3d(0, 500px, 0);transform:translate3d(0, 500px, 0);transition:-webkit-transform 300ms cubic-bezier(0.215, 0.44, 0.42, 0.88)}.drawer-open .main-content{min-height:100%;margin:auto} \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/assets/fonts/esri-logo-3a94862e.svg b/node_modules/terraformer/docs-build/assets/fonts/esri-logo-3a94862e.svg new file mode 100644 index 0000000..f13dc7e --- /dev/null +++ b/node_modules/terraformer/docs-build/assets/fonts/esri-logo-3a94862e.svg @@ -0,0 +1,283 @@ + + + + +This is a custom SVG font generated by IcoMoon. + + + + \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/assets/fonts/esri-logo-71163913.ttf b/node_modules/terraformer/docs-build/assets/fonts/esri-logo-71163913.ttf new file mode 100644 index 0000000000000000000000000000000000000000..853dd561cc81adfae0e7e0c8eca2325c49242260 GIT binary patch literal 7860 zcmeHMdyHIHc|YGd_nvcKGjr#0=g!W~%+Ac+o!N&yyYt?)z3WHpbx0f%;@Ghj#CA#S z^%lQaZ-Pxhq=0xvEwlkuEiDy9Gzz7qAXHJQQq>kx%A*l2Rf#A{Ur4R03L=mIQMO=qi?!W#f z>VAUMI|GK{Uwa;XJ1CEzIk$N^{}lf)%Fm#D`s{@VSKoEum*38q!1!$W-0J0v?7egp z^(Rm+pI<$9>ci^MXBivW1n)x^FI?Ij|D8L($JnTc^5aae9Vz#~Hx8^M_WXdk91O<3 z);ScvnO}R3GkOkXi)~d8`p|RNo?{KoxT@J&()K4g;8f`zHZfr9hBV;q8#W{QK7D|h z%%UT78oa~9{0D4=y%RgeOzhM3w*GYr`8}r(J;e60)$d|fdJdRd`OzCQ&;t#gr?xVb z$B?Q>Eu@WMJ~PZ8MxH|IAhmTq?EOkIJwKfagLN_XI7)gS3d~@ak*Ams4urA?*&17C z7umz?%6AzwKtHSO6nJl78{2s7+F;h#KH+ak@>vEgv#hK;;2B{#mWR{~E3#2mVinW{ zs75+BX{=E1-ZLfQ!^hgeK$P`(cjg~6e0K+FkjLpVgseu2pc5(WQ zI3s>yyw7aNo_tm@O@P3JAnJDtaz$DNNj zPdLAiSz@<_+K+uqQiVg=>A9^S_!S$LKA zv5&JqW>2%{*$;`6LutxWm3B~*=4l^Pq$)GnR<9$gotDmPDEC^KYS^jwx}6yc+Cdbw zTlID;gF+Ws)EjnD=n`aPJF26FLh45Sc8I**5BptR9`x--$m_LwKO4$wt=s9gGl3p* zNKMpx{a!zmN@@{-jH;b>D@5m7R1GriR=?Y>Lo%u|)kPXot#18A1DF`0+gqg0)^D{) znJ|!Bzp6;tF|n6g-Da;}@3n)f3Im8&-Cnz;x}7BgD~!5*NbU8zQq?f0LAFGDNe-H! zgNha@>|+=#L}w)m*{~1Y)|0f9Tiu?@H}A{ru2O&`3#yT zjF^$Dp(}DlQxr>ERr9zg%T&ya#7LpxQe?hIjE{P^`^i+&3xku1a?qYjshH$2VKHg*>~#vWp4*e|k2*gM#}*$3Fi*dMUZvp;8FX8*vx!~TPPkNuGSgap}? z#CodKpanWWcOr`1%~%?$l^x@?2&$G1vtdtbOoLZtf`T|DC>wyK)eBlzgS}~+8`x00 zUnFgIT?Jj=BEw+7i25+aOjNCB+bwMg3g%T0`noa`)-)$X-i7%Lj3-3(pt9YqMxmBe zBv_a34V&urGq5_%!g z^@nq;x9gGGnr?p}>BefdnA()L7FB6_A>$YhSC)Bg^JB!X(1_>Ger=S?Ff1T@Ns5v5%coXnCSkGK$S+%RmkBfLte zm1&qtn&L;C;4U#F#oPo8T0kH-pk)LB23H10(aCYxJmkVg49=y;(LNwMrpV?N@+k@H zfNYzbcychCdv784FNxl0a!#Xy*QSN#B@>Bwe1@ReobNE=7@gZxjt6HF&7`}UaDT;#>h z~|SaPpj1Ses36@qcE-!5_lvS^I=s)b6z*EV@oSOIg<~6olzz zU{WGE>CZT0g?yLGtk>a2WfBWKBsq5~L7c~xYE*f7(@E#t&6r**>| zr2_mTOheJtAA2NCN);E3sf^+?7P;JYxtGjAHvBO> zS2sk9E(!{0A*^faXVs|1YJ6_JTH5#NN-3&Tic=-Sc(PI{l#ZvHt>(dFnmm@7Yqbs* z*7lu@zjEFBLezMlO1<&qNJ=(OW{Q(zLi|eaTvRN5@O7_iHG4P6R{z(|RQj`eAAL5% z6#YGY9{4c<^f-pNx6aKoU`+3B3TNJ@u`D8we6>4qyD77 zo*T)JB&%a@59UgDEa&ZXDs_94)7+6GO%tGI!k`^Hi;D}TnZWbbTCcimjzs%N?QlqR z5_14v!W@+2ZlkY${;ekt^t(AHY`6E`_sApnEp=LO}1=BWc2hRI#_kRZdTUusCh_YH%hNYaVe`I?r#ikU>oiXLCr`*{v zk)Jj#S(x|S{^-?jQ`g;`v3<8;#u`r7oX#g+Xje<@06PrN{BzsYgm%AC4>$rorX38N zFw99i;r19w4d4Ga6Z;u`_0=cN>_3^PRO8Lb{n6JerE0aBpnahj85q@z?dz3W*3)p# zb3ck^H#Xj{W=2w~bt3EU4~>=n4V&6-UIYL1Fnb!l`$^!*_5e#B#9qD#5tih2NC-5@ zH6qN6(KbZ5Wmno!Yx}AP-OQK$S~71MRLS&ulQ|JHTDsnye~>;3jKJ%HFYGblhPgB>TLSeVaNr0bg|Sa&lroH3;F>N1dos+U z^Y#A-aSZE9v(&ZcacA-nrFw@K|&}R+& zxe_7P_c~n^LNx2w64<_8y{fVb(l846gYjRI4|cvU6(-bDa)zondk&hyhlM>ohise_ zMz7Tyv_wGZ3UdwtD|E|Re;`%K`b|oPI16qqE&FGSdy}KBj{NL_uB_*>d7nSFa9cdS ze~(IhWXI%aqB|W-8{TxscRTjz*~Mhp?*T62c*SGp2!;aav`rCrxQPRv6w(TnD(N5z z#1`isndX=@cr@eiv2r;%8gz1T&Zj4m_eZ0pWKep2sZz{OSW|bWQk5AmxpSY4%}ghZ zew7>Lu0_-J2X5P?p{^_*%8=EVP2~(XpWb^hHxawD9qs9zT}=5BC%uEWai4!IHses- z#97dCf|TV*!|~D-H`CXKc?X?YqCTn>#L3<3k|at~-dA8pEj&$~Qo9QNq{`QG4 zTBwhmpubFI-=Cf`Rk9=%4hFkNmJ&OsYp>?^Sc;BtHM>U#kM78bB}BYc$`~2PIoRfR zH0j=n>Bi%OSowa(e2KF;uuL;Lv@4h z?!CBY+zV8~`n6uawIupWqT3*tXBEc+ZFKz_b_qVDUXx0jXB3B!puH~^PZX+!!?d} zp18gVV#+n8A>faN8HQXu4;N}%*fy#3a%Lp77p8304L86c71uVZgqsSI*{|ekT*d8x z0}%!nbISlWu893!HLy4rv2zK02gL+@1gF zke1;86V7;-aPC`2>$8ZeYe?+WrH%ESXD_UQyusTlE~EN9La)v@(D)Q9<6zWabI5lg zy;Rs1zsY(SU>>Q3woN!GwtV6I=JJJ&wNvF*W3Ifbd}C11&EC%Wovpbhn!Qxw_URo* z{RS4WKA2Y-lJ#8J@lzX@)-RkdHybG2S^{=Y`_@}MRa6p#4dAlIAd@7#5r7ZwwO!oi z#3;^g2WmaWj<8p;d)aH){kUT|h%I_GJ2ALxcrDJ-_o#=@uP@Kd&DA$o9$r~ndHu?T zmDQEam9xm#kTzGYtXy0exaODkSo9MHFzg6_Sfc)H`d_zj{ zmQqmra=nML!x#3wAv1W{Uf^zD*HA|C)XF8yYW?QA64yDy7O@xfQ^Q)l5YW9xN;g>qx^!Q~1`D#Yr`Wx-DJ~U!?NDq6tXY;%Hl5!ncq2uqWAH zv43VirWEQjkX6LDs{rjo%qu`C7@T>_gRfcFC7T%MRxPiOC(+Btd{U5?fus~xugf>* zsL#~5l4PO&w>>1EXwj5Bov8aPTG^)RbQGj_@)D SkA7F|OYgma0P@0bvi}3m0l5bN literal 0 HcmV?d00001 diff --git a/node_modules/terraformer/docs-build/assets/fonts/esri-logo-80bed756.woff b/node_modules/terraformer/docs-build/assets/fonts/esri-logo-80bed756.woff new file mode 100644 index 0000000000000000000000000000000000000000..0a592601b538431cd5a93c5eeaf1950315ffd84a GIT binary patch literal 14468 zcmZXbRZtyWw5>O`aSQGi+@0X=5P~}!ci6bQJ0Um(g1Zyk-QC?KxI0|_b8g+2yQ)Ta zjjvbFRW-U_R(DOe?~;<=RaL(O06f6}WWeW8#RNe7cmDr}n4}~r006-P0I;6`0P^+C z)Z5#VlBx;-04L$+Z2V6VnqECAN{LHIelng3_2M=^Q7e zq9*#u{6Br)XWjgr%!BXWRhZcT050)QCif|jlHi(@v8^Half{4f=+AlS%&}%)EKChe z008d))@Aw>*IU@gvc)I-Wb&V$_)}k@(LOFMY@OXdna!uC`IJ6B05Zwe(EYO>cjBi9 z{*OqN0CtA9rk^bH)31E4k(3PUzXG;*a{kQa^L_x*r$_-%0DyaDySJOS>io+2$}h{W zWbHqLgM+8!ggw!rzKBDMd)m*$ILA|wtHBdN|L+h-fra?F0nbUcFrsShI#h@g=un%uC&?IB zqUngSFoJUj$3cc4>zgPYldS)j(m9p%iBz5rl|0FqLevaao73u_y;R5qtTxZpG_QQv z9~pu+_tnF_lBfjiHguI#C>igael}mveR)soj(L7Zeh>saP;GBc&YyhLvA#d8H$r{9 zjdvnHqF%fn*4;x$qGp6{4u0JI%OLo;g?O>I$Jwh&LKoF4^v?4xW6;P=!Wxk^O{&$_ z$}3k}pgobGzHCW3A{Rsx=o`$9b2o5CBa+aV)^NsN?-Ra?IASVw&>{@3i)y?u{?Hc5 z4z4dd(f*Ksymc#Udy#lK`*}#tEU6#SM(ja{#qr z6hkxvtplsVVmfy!7p|^szB`CEK~~%q)t>e?U|HE>v`khjXOr15Y;rAs1_qxqqSF*g!c5|v&Q7OLwDLi_c2Hw7 z(Ew>(w%qn=Ej6(&{(zT>h7_G``-mqFi8YF9OqVw zK~*CpnkHdfd0;rLSPie}zIFj9R!?=Da%YchINDj%hXTy@D#bp8>-t`tox3o^Ctl5+ zOA%s}_Q{o_FC%%@?mq6YZTiW4xEN&~z&2<575pGo&niaAe>Jc|K9Sq9S%QaTC@E6F zT^3r1ltZSg>Lu6jM~lHbf71=`p*FFeZNqrx_`S)RkMY8Dea)!Db6p3u2z@WUGr7k1 zT-FGQPqSDs7eB4_-$yZIxWR?l>+I-bCKuv0fo49Nv{62!t;#?cU+W0aqks89uboz~z zcjY}xtcNmF9l!l#{Fy}C@CBK{d2KgLWpGe)H4!f77n_%-H9y}UA>6|ydn{9W*I3M? zlg%FdIp)lg4&)iSVglZHvkaMMwHdc3tj-O@M2~cycjmSfn~%~6dZdybik59ZrO$@Z=Hpc&W-o)HLkzxK zF_t0dCL#LSA>S3DnW0*DQuaJBF400$n7Jx??liu`N-w{zbh5lst8uN`O1>a4*t}ee zM=tWeUuF_oMuj8{uYwogqsXg*W>G4hjgfx25>y@{^)L4E!K8{BVq`uUlZ}@c58te% zxc_U6BU3tTJl`jaNfEka2~I(~cg+LJOy3<1k@^lZ!dz(NNE++^OYO-?SbnD@OFo^s zdcltNCR(9XA$2`a;d?4TEOX$`)b3S$*CMj%rhXU8`!?%Pt+x2jFFZ|Ma8*7s-nE)i z&9{OwM95iIb+k*irQ8SE2lj_7LgFfk}R|llqu9u82wCvAT?ZdYc z9H;@M9m=v%*)cOeQom1UDbd#o_AQfER}kJnqxT=jilF;g2~YlpMPwwrCe`5C6;mv`0=*l?|w){#eTkd4Bv*R-HO&}JC=F^c)_YB7vY z68lcfF^4AqY*~UYT&;)anyP;#{9D?225YE^g(FXJ%PCm&)Bv;b0UuaiqKLB5CfXhs z1etmbVkA6h>p9fd0|S4?*}1Ql2aT<>qd9SDQK@Vfsh}4N#kH?-2be3sP27zSv(sV_tLOZYAy+H zB`ITGJ%HXn7ukBbw;fUJB0D0|-%3*Z0fOcRh^0bp_$fHD~jc zvnJ?7<*AKFAJj!uqhBwMahngu?!;GXwugoM(mU7?0RP=1sTX- zP4SPDH{I5=G}-(3p;YdzzKkInPJg@L{K0r$fDz$Pt+Q@9R3fc}6ZH?%pmoze*r z|E2$I5-U&_cY-U7D+>d(%g!T#`Y-d~5s!bXg(1@QU5+9B+Qq#3bn_OhfvR%qJnY`} z2#rWZ7t$XzeCwM&eEG*t-{}l?<5%+h71+|Dsw-he+XJW_3n?8#IR^s;>;`E^9&C;A zV$6>D`B4nqXv!hY5fHDtuw?p5V3D+$l#1SH%vnY8_5h_z3Iy#^<>1k&?kU+@w|M_b zXhbV{;0L#Gz)234gs^wm6-QZKvlpbFyIV9Ib{0GuP0@r0_QT458E|<@eS=#fdT6ss zHOfYGXU~BO(crP9fiUgZ!pB6|%m0Bra~Qhg8XyI=w#16ssAuTF*viuKxYduzpFI_T z#zdqpmWK+pee>N&7yjEQg)Y=gz|Nz%QFQJ|rTYyMlCQ@g4v*JACr?GaFFAeZ)SIw?8yd8Tg%^nthDR|X91Ob8eueeju2l< z)pVer>BUyPdw~wx&yNS1E3hmRY;VWxEM~blW^7!j>3BalG)Cg<*wu_{G$Z$O9$2<# z=+Vqinn!tpSbwTFes=&KQZUvn5U|EP-l3@<_Fw>pHmc>WCtYz{qRq;0Ulo#Uo4nt! z`WEu8p=i}Leh|H+F(_SKYm)g^6$+=_a(4Ym9ZwaOL?qOQoDF}%9je8+jj}i2wJ|i! zv?WC${0%*NUJp&dB*ZLH&0eU67fBoFn-w#!TOI!8RY!$1zuM6JD(z4_et){loHk$=VA`LZczst;fqVUnAyCR)tltk-9Oy{NaR{QnVWr+ad&IiDi2{Rbf$|ljzwUTW zZa4*tsZb7+Z5(s8#K;R zMDVZBfUIv!fLbd?EhOV`lX5)oKZD>Vc7bHVQG*be55Wk<(2jmSy#~v=?1AH#1#op^ z@tf28>|cTQ7eW1KqXBB1;0#f3c!Nqj#EdKtPv+E1jIj$jUh5Qk@ONh8wyxk|ieqXD zUjJec4#G@bb~RFK*H&Og*WE^*e^ag7169$4C@sAkVR)QnvIsr>qBwK`Znxkr!wxC{ zC&yzdl^&{mAK4~$9ulG>@!#S3?iNa60RIyu~%WFN|Or7rr97AE$hZn^V_R zIipw%67;UNz^{?L6GqG1Y?5G))EXsN*GC{ggC1i`mHuOG#`iL!4=%avF3+%d?*SnG z&UbJOhb9ZE52>Umj29h`4`c04+<9;Z)~Q5G#AEpix$HEa(!V3nh+*3d#)#zd z6_rNyy^518)=kQ2nm|x3do4Y7I0#K^TYlHKj^d)QG2qvgJh8=tvn==4?ivkNJs{!G z7ubSaFHOtz#*)1triMVQ{*ag(!jCwROro%zZhi&!PbuN=y0B>VTJ}Y2iGy;Nu3oPr zawf4q?9Prexz;!6!2VJmx)%O>)K37-mLvg|K(S|Q;DeZ`3PCTWls)bk7w#srQVHjfR^Mu1F zdq2`uF$J}q@m)op@2c6=!gt_Y-j!m;V2Hdo*4i;Zo%Do_g{4S2jF=BBv5teA*tsia zy-r)2di9K1Xn`WXUja4w#ZXJ6FF`^J=%fmkutzi+13L`#z#!TpNK30h$+s9;7KTU6 zCZ)An*iLg6w44s7IbRlB6pSA|2Uek&Uu0ao{N>cJVgZjMlmPXa=Pl^GV5v=(uR#o& z%nk;qtvf=8z(1aC95N;B2N|`R2L3I~QTkzM29VJsBU4V} z-TmSLVxuChqhaCRW9&>NZNWf3`ESCN{f0~}>~J9Zihm~+R1VwuMpO{K-jQHOWUPIq?fWJ_ce?Sf<4*ZK;KrAD`xG z#`aap(Wp5$t)9FTW|8R}v%~8!M#1V+@uvaH-I`lA;p`)_Qy%xuPN+z*Y$RS+nI*HZ-}s z?s9?}7aszKrsXB{{2p<`Xk~d5B(@dx^j`8QG~GS&S*%n__O3}N89>_4AzFqWV5U_= zwIAa$pZR!D#lMu1qu1E^7vqiw>-{iT?jU#7M_|Uo^`t)%{gpeV1PmPyBQh2X>#~)goasyw5`3$6wR&Mkl)VHv0 ztQAs=KX(0$NxGWFP<`$TGVmWb&t!a(K|U2e8t7l|PD=ZE``dd)nPY#P5X+nMTEn6= z5=Lw#(q9C{QjDi~gl*4Xllu1**SF|GLuQhu|6Y?3%W>{XVl&PI@-XF5k|E|xQhg`| zC!xIJVe?~XDm1+Txsx96kgNCDy0ftVNT0u0lwhhn|I920vGmYl`0w9o_;(I49kQ5p zR;q6760##l{=WQ*ZTw7LoKR>byuKkXlj7`+l12$f*AX+Nqj+2g5Vk%*##cmSs2cs} z4mWtRZ(z7yDR#iVn6h)XtwF=$kJq1>j6Y8AoOq5yB36kC<)R+f5s8k%)E}P_O*w*a(_d~rEze6gKrb; zVodUg3Ym&Ifqq2)(P()oDu%Xg-vPTT)Zn#g!8uSMSQJE_)*J2orQ22}%+CG6t*_X~ zpWa5)y|WT`#{3B9aSBJ%l4K}><4HhVUQ|efX*J#fM_rD!8C~$@5K?4+vFgE4#l0v7E^8*U_QShd1f)AX7c^z(`e)5vtl@tc(rRbHqrpEia&iS_sw= z%l9K5V!7vwxlNr?^A;oVEA-|dL1Ne1=%dbud-YQ`#Q+99<{G%Ka9FT#7D5`%1*ixh z(I!S~$-3$nWX*IMGr*zZ0&F{X2rK5c$eXa%NbW!P@W? z{dq;LK@`3Vy11R^$){LHz;@_$f3S+JUX^6{q^3=EHuF5)y{LY19JCDvDqj=sMKb&6OHe(HXx!(Oe zvQDJ@3no0rb0ny{1mp)-j!+A)G2728_*Nv`_P)D0C!81061dez;8vM>J9YTJMklgI zZdsB)Gvsgoo?(`JK#T5^O6(L<~!ZQ>P`b1y;N)xyd;8|3@D8P+8r$Q~eb&IS^+jNQRI zGk_70U&h`j8_#D8`6eR-boQDT)y1f_g*=?{p`lCax z^c%l-5vR|QY;|kgP>P zSp$hjBe(-l8BUTD*AN!-L;fnvhEH6Imr_)^`4A&K5QTL!<5qDMEYZY<8p3;qRQC8J5CdaJW=q~u-uL=xi7!;N)bU_+3P4x}Aqn(FP zNVdxEq{U*tQ65Q%_GBT-2o7r%!->JlvEMjrNPc)OP3cY@X_jM9VJ|8q@P-Q`^A~>} zk8}6;qu*T5ct8tDj1hTN8BjHTs`TP7uQ5oDsTh^&@u+Hj#$S70dmF^7WPw+b4S=?U zebi%aMQ2wJ#@kft%ixM69eFfmE@`v(>K7z%2_3}mNXv00jn)LUI`YicI$T`#mf0A< zvU=Flray<~DuAs#g<;3QkbXRhbjF(#;N1+o*bSIaT>wSJ;EEft&K$|wmi~8y;aDBY ziz5Q_#ATSPW~nCxT8L<9wF`DHQ9kQJB}y3GtXE)Ijt;0@pVzSR-Anjwb|W63@pnV> z3XZG#QC}fk8n>18npV2|Y};4)dw_H{9$ce77qp6Zc^xTqUN^;|_S6%#5IJ;mT#)Y| zZt27;2NvOzr7RV*^)-0Pl@`bb%U1G2h5hp+7%J#n?^%?#kUxXL=bjelQi4Q%w=AvZ zpj(I%f<>ZhYVlGJe$L^ydJQ>2;LcLu!No9rxg@btVD!fo@O2Gr0m8?+l^E5`j1gko zccL@NX+m0Dip0uU`a8D7xakpL6J&9!>mFxg-K#tEZxS%$h~qJ{(a}Y&WlmRbn-+Tr=&yhf0x#Y>}Ke@`NsR&MTOA@x;?9o2ftj=B#yK~A^OwU>7 zoUAVpKyTl0*PkxH5KiO}3(XQA!qFpWccx5kaEQ5R1|79XK0hf&kH?+slsGzG>QRd@lB z(^|8p3{)x=ca#(1vq$9A}#(bw6agv>#}9=X$cOAq#SFtB#iz$wtGJne@lPK`U7~y34#~ z2MrXrtjq-^c#};{iHh>cE&d|-!AES1B+rGz0e%WXdqb#VCNowa18iL!$!&he0YzF9 zY(gz&^|SXgj9B%}YOlfEWg@KtE#5GmniFns2Rz-)HPBLSN9l=x`<|GF?$W#7muvyy z>UbVn;==y7?#}K2pKz$&UO#`_v4YiV`GYk=pL*bPLc?y2@NNyJDSFiMFbuQpn~y^2 zZ>gPuvU6T9!yfGmpG-#sJ+-zzV zvkSeFRpPNBzbkdx^Ti9u9bM)NNEkN_jc#oU@?Q_pr&A#6W%|Hp4Ti5#zfiA!N^EYQ zO7dmiIrV7il22GP2hJ3U*sSEsOmDrI3sX=Sh7#b$l_4u*N-lP5j+*_Tzf8-h@Q;;c zL`z-GDKj)gV;IWkII`@~bM37Dp1*Ts$MAsy>ImE)~ZLDf9nY20$C-=WLyC;{dAe z>-EnZbp%oR-X*So9m^5o_XQHRP3EV`d#e*6s)XN-35Cd{@L5)OEJ`wjm1}5iVwUN{ z(h=8p;{KDqG&sY5%t1DVS#g_DwDkG1{u6JgMWRAj7$GxFr3wT0Zoq{dqyJmilo1{M z2OqwV?2Z9PpNX>d&MB3AQSY$kb#}q9ePK`+7dSOwa;Dno1whdj(7m^g0Sfb#VexuN zXNLNL+%Rtz;nsn9XQ@}$a0;N%l$2%Nt3eF5-u-3|3Got9z+?I*qlLurk3X%fOT07L zax|Z#X<-X&aeih6m?t~EYms?0nOo~0v`h8eG2Rw9RzUZUxLf4Ske zA5#tse>w53=Bxd8t8({@xue%?8D#E-M-1$;;h#I52^2&I!Wdk&Om{zE&94z3rM)2s z87`cKHNRHu^SXk%uBjkr;2Swv%!h6M+~k~$T)KQ6c_(6dHa+EUJBO*JLX;!#mU}eT z8d2xXuJ5h4P4$XIGLmVB(AE>@){3}(l`El|%F_kg+K#*GVXPP5gekHlTCyB*4 zd&*C1?aC|rVJyugJa9jStKXqQSH~>M&c}!U{YS*I%ZH!Hi;$t~x=@ho3)J|N=LP&( zuG+0n-3WHcX}FP4UKNt zBA9a}{a(E4hvRJ9D}vVQtl9t(rl9VL3~hj%*G;5$p`9xt*)CJa@$l`s4V!ueqXzwN zY{3-wuZ`^9(ej+lC#Ql2ZvqY%n#H4#;?v(SU&vjr_nezX*@JUwSsmi3Mp<>5)0-jC zM=Uh#=2q}c3tnS$d=Gc!W2%{7w!Y{zuT&90V)(_*^^TSXgmu@JmaKi|UfdTBp3%d4@(aiAI!~*|`B(7rWMvADM0m)qy43USQ?b|7{Xa*@1Xs#c)`| zuZIX~Vno^18_3&ZtYH)8cU1vZt(AlaIy`qkgL7TvU4TKT=-&7aOEfnUvs^8o%%dj> ziD_;UP&hJ0nFdCn_c&RmX{dp)?*A6FL;j%=4pT0y_cXu!qxR)D(EpnIC?Lkb*_2`i zzGeR%x5ml1_&ZHL`_J|&3C;v9h5p%Zh}bGCvEPq~C2c+t4^O2sbd@q0G#9g0aVClS^Q zv#TS(-XT{IGq2r3pC+~v_y)b%3(6(-vZ!%w!b>(l+861UBCFZ*5;|$30ZVK;?`9@H>iQL6jbgUa)y)B!HiNjYL zeBtv~@X^bZFdCk}%A1R*q5r4pTYe!Us|{T-cYG%*94sACP;iH?Xytkj2LdAN4XO5+ zD3A6w5n3cFSi_%Wv{sEqdIaCXl%@w@Y4~sPVGsD%9FoHujxh;cFA|aJy&p9_y6t}hEoeG1LH5qvmK@c8@fliei6IOQ< z2ZD#WN7l`CWUHKhCR21*T+AB_ZkPA?V5LBAu+Egt2I5Dik}S3dV<_gGa60md%czY> z%o4I0O!$(nfAycPeQ3rpr0N;CZh35jLKf?{;95P1GwvmpZmi`k#DlOJ**&`T*UwK< zU`4UH=lFn*wa^D3Wx&TdYVl7g6B9dUS^4d8{z6fQMye$xB@#>v{~FicMqD6FtMvr? z=i3Q>V3^O+&$3;rkjhJ{>!(gb12Ih%_xh2j%RtJiWR;utd1XkTxw-w-692guPl*{8 zjkOZXHVNW%6$=R6n%zye0gr0J>&pWHP2*|55tKk>v!Yy=>ECUsGRUw~ml^dbN08?b zZ%_s)aX_cKf$Qj9uk!vG=sF?BzF<0&u8#Z3*f7w#X8UiVmhxg!{1}Jpk1!sBm{MDF z)|~o&I+`wp2BI3(QuAOfpME2r(BKF7xf_R63cz5_|C*C2unaFF~%*>oi)X4uw9I*6lGLyCVS&^$RNVDT)UjC{}EdH47JDCXa(UrrqZ& zRKOITf`Q%jhbUwr|MTn^1R1SF=`LC~oP>n4w9t>zBP zGj0$=&t***wU2%G42H={aj+<^0HWh3D_s8N0vAn_$C>n*w@Z^oE-;oH`N&@MdvU-<~>4l}~l)`IL zAQN!!ZX4AaKL_Mn&xS)MxTy{BLpoK9`;zJ!+#_wiYp^dpSKe_j1d?-LW&QmK36m7n z&Ro7%vF&TTMCuC7O`s4qKR|}Q-iW?8s6Czu2`PydfxB^RKQL;q@{N_cUjT#+Hxjxk zAFvO`D^MSg42+tbyCaxPf+il|(7io>1CSq{0SNDF^@J0p`3!D!;^7m*7&5Jc6gFxT_ER3^q z79KWBRN;CRZ{Tb07$wWFS2K|I_N&;wcj!HfOpl8$y3MVcg+FsYWAHML1_&}opiPTW zR#+xgew;TfwL4r`hl(lqN&3Mi5LG_FTj13eC>dg$v|R3Y&?_LTGUPbbbv~s0=lhQ` z0Yr%)(naF&G`^BQl(FvEvY72#Uoy0J@H)NE5y+co87vU7X~HuUAe*fF?~HNXn~_hn za_t}}lzq4^u_kDI@E8oJ*;bXnglr$tCB2KzD9b*iKbzM!jSY88H2RE^kJ-A6jGzn1 z`1tV$x`|Qw5w{7vsUi0Gp8-3+p^}FP@Gk4(;BgJkyQ(|SAg@_jb6(ONK;%1u%^`gF z>8z*Alkel6um=>xCas2YcBtVbzIfa7Sa34KH05H0?Jr<12MqpwFL0Tp>%zP-YJvGz z?~^0@?KS*r>xR_?Qd(cha;ms#m5H20%2)^$?HL^s!^gGMm)v{q92m zbch@1jM2xi5aGL+CS#kq*n&**?hDpw4TnJ}y!!}|KtJc8FjF^-7XL1!?<3sx!HJ}CHQZ4N z9n253a}V(vS&}X@(M1yUN-hG2UjQO^%5p?&FKg@C%w<0)FY4r4qtzFrAV~F#T+n0v znOV2LHq~wd%*D$$C0rlmra)>_;Q-1KFjXA8S@%aaWAHHl5^j!d@Bm2R zJut)KdOai+#R7Jr;gP(+X7NEG%eL2US~wBR%-pjVpX`Is^z7l0|CtifP*Yj64~1y^ z?lr)x!0`uS`>LojybzKUX4j!z{=-$FMTv8m#Hy!-y9&u7qSQWboO#lPZ5Iv^h6CfQ zkg0U(`4wA2o~1iHleiA;DGsG4jJ&~icKt|3cTRlBvSwyWqpjOtuADRCRYcrQF&&_U z^fS;glNj0J;um|Q(!%D#T}Jx2#p^&>rS2=_TT?ND36RseJrJPq!gRjlVP4XQ{)9-psp5ksiKu6V|9so;Zba0rSGiGVnU=Qp8bs!3)YJ>b~)576G~ zMbR64t+}R z#^g`r%bM}w1(ePQ+<@L3Yj0`4LzslUL|k=84i1DI)X*bs zAKI8YVcZ-uT6UDfWiHJT9{LzlDT%>1_H5D_jeiP;$Qzp78?<7LnmWT;FiU=AVr6%x ze^JJt*+v&$&M1#Q%Eeao&4|+P{*ltAaA?B1aYv%JF(FJyz6V;1eS|4JU>-m;7q#s? z5^}Ysw$6y}1)&xQ$!|kM8k$W?gvb#(g(f4ND#9gb{qdpjZPj;oc?%mZUwQkGMbNZR4{Hl%vacL4+g{uhBQX@&nB# zb?<9+y$H-Jv8d?c6&vGAkIM^70Lv1qaOLuVMmo+QR4kWeI9y-~qi!!yWDbr{FRf<& z@;hzQm%1oDH!V2x%kD817xfb#AN6Uji)O2K>6Q`UB9@f-jO)LnU9jrAHxB3w8!}100ek2ZQl4sTr0fsydJOXf@0- zjb6^Ggq$9b+Ui9SEA7JAZ&Z%;ChBJ7Zx-<#6B~!o>H7nH-rIQpU|{Q~Ymhh1uq&9s zLov-jJLL4jy?z;0I8m~Y(txh$_etsIh*lh^($hd2V1RmC ztE^~+4Rq4Nnzs|5`Z+#sR(V+@dV?N3IJ+`7v_~pxN_~%XV)oGZlM-nZqLol`%Mvyn zj}m#bP`o$;g%Cm|q@^{MR`<%Cav~BhdBEmi;bvA`9Nd-#A>^=$AV}HpF;R~oTto1X zmhqGVU0U4ywIQVilpRu8>&FoW@UDHuM#ga;a%^jM?sj6Cd3 zpI*w=xNU`Mj7vqUt8?@!vXw`H7t9mJrY@}---l35fdNH1M#T0)@wxXI^5&{Bd#UUT zu)Ngm@<|&eEvzQ`;1z*Dv{FTKT7|cFWvr|E(a8Y?rPR3Um~Di7@1sW6-5kyyOi%~i zEcNQ(>W)D*V9^f?o7Vp>X8en)y0}?}7&mmdb`gmrvQw%_50^iVXlOe+(7(`G75hZK zyi|%sxJK+F%RP@s)A(qtI(6KkK#c6NBRVD~TsQ=yZZ(#A+e*)?H!4IP!K4N8L@VN_ z*gj*Ea~2HXYyz@450yWP1j0$L1*GD1|4=<=PN_QQh&k0t(2ShOcp0jK4bGb-WZGg7ZvIyNMjJ-qU zqXE$9E9WYX*zjQyxa9rkfPNls##4D+Vme?jX7LE&a7!L$3+Y#dHCpVDVi)uds`}cp zJ52+HQT2f_dcQX*xrjUS!0dHRvmV2G92AZ`i&nuUss@dGb5zdw{JWYmcSXr`M1+`t z+Lr+(hd|c)wS#lS(H+J$*8v+Hm{|>MUPP6dU!*VDKYldT3?G+yfMY^c0`8xqv45n2 zaasKN3>s=K#603weP|pJbo9R(i%1YmR?%@+RaXS5B-+@iHCeB(#GQ@#U>mj3okE<- zx5**LS3qga(HKv9Y0V+LY(Vc0aeAU~#^3Rd%UHy^7opv|iR|6{I-epw zrrKO!go!MkINJ*My#3~>a)gB!}wax zL@#nCa%bn9^A~paGH2{qZeayTzkV)@n3b)*ou;4_FM^8mGV@6{0E8=>8#63GYCZ8zLFZFu^S7arh@ z*D09<@Z&ZdmcB`pL{%}<)sxx!1Y#_w5I~8*Tnc&>jz7W;zS>c|pzQI{Uv*W|F}Fpo zS!~(ZfiUJU3(}Xr=K4MR0ZF!Vi1*p+V+;a;OaOtuem{khK4(VIlSBgnJbBPr|MdYG zgG@l6Ehr-_AR5RBWCns3qXO!a9vH{N)@pUJApsDh0Rf*~LlB=r01$q5Bth61I@(xN?^u>aUWH)mJE=ZRHYaA#1*Gr164 zG?;>t_)^~4@|Dvi+b=))npf08G-G4ZTgLV7Z9YF0ytjz%Wu*2Z`O!<^3*|zC^XI=T z%wBtV0s@i(f~Lb*V*&!YiDdmu<4r6KL7&-}n)yRWLI9!Rq@5HD!650^uCB+e4=A9( z04x#$vM?tY20@qx5}+A_RP>q0-&i@6Kw&iT&0+^y3P0$+GCbpG2Qg{sOJd^gkii?E z@waO5aj5LG#{97rXc!kOl$kg^I$Hy&luUh0bUgx5L)-J*KJ#W(YGTLES%~m_|7I57 zZ} z2KE1a#(*8BSp|5S6|m7U}zr%kb?qTSit@MfA56%UNGl z>%WOxk@Uh|lFb~-5U)Wegcx@C+#J9*9R@{jn=-g_WX0bY@tgLyIxtP9Tt!ow?>67s zf2;E*+c!MLckdyZ98lSyiFWc3j4|hTV9S#0L_3nHcO(htKoHGd*+C=NR%rEg>xtb> z{e=J_r65z#ruItgIxk>tNg%;kb*PqSxS$Vsg=nROuo06qZd{{uJc1sMPU literal 0 HcmV?d00001 diff --git a/node_modules/terraformer/docs-build/assets/fonts/esri-logo-fc93d7bf.eot b/node_modules/terraformer/docs-build/assets/fonts/esri-logo-fc93d7bf.eot new file mode 100644 index 0000000000000000000000000000000000000000..45f76a38a4949d56639736557fbff7c7a7dcdd49 GIT binary patch literal 8026 zcmeHMYm8(^b*@u&Z`FNu_wC2++tbtC)7^Kbdmg(z)9;zxoqc(C*4S%oyx#S0jF=4e zJ|^so*|G5w5RQX*S_vcuMF|NJSi~|RArKT1DN>XK9Ks_O2~n^Ja$ZP@q6jRI0Fm8% z)!n;0c9xCdSAOKq+^$ons!r9Zd(Nq^s(xmIu|F&^MvOE4aAt}D0nYnKQ-|*vB#ik( zzOKt2)AatYJ&?P`yOE~YNp^{CuywYbon;r;X}pYCTj(r1hB_OlwT`m$tjwCM!4^>K z=50}+hmb(8f?Zr$x$mx%-}%9-87uu7xP?Op4z93MtOoLF z{Da6phy1Ct7am-D$Npb(-D*(N4|W1?cB)^s>hyZY-|&}4_v%( zX>;Jh|d(0hvsjqYn#?hV))2lCVMlT?1jXorr;{S!K zFR+HLe?_zPEN*?015TChVN(OPu1Evk-cdE8@6!92$t*fdr@%WjO25a(*xR>Si*9+{ zK#;lT)WL_?Ubgn_(HJnc@?+OWpgS5o&kPgfC-7GBw(xF@(z#LkFwzv>4&Js-N3CB; zqODoKg@Im-J&By2hXOO0{{AW0wHVCVgD}-~c9A{IE`OWB0`#*6LtSTYfU(}-v8#ho zU;UUrl;pDvYGzqkH^4K-ax4$28CGQDti&oP3s9P3Nfx4CM)LYZFoHVQzu2HTeqR2a zuJM18bS#H4WQr`!#!HoKfbNqa`eyL=|6@;_J|)hG9~tj48?q;#S1Z<+tZ&+HaSG0) zv(4!^yPN~gVdp;Qwa!D%S!dIEi}QBp3Fk@YL(Wsq??M;M*2wxXmr1H{7(2aiWuRpd z`ktWwq{o?JF6JUcoY=-%YzN!Njvx%3LRfl?y@!32{SkYXy~w^#oE%D1o~pEsnzTrJ zVIozT$+mhOS?#oRT0_3q%2dNnz1Qu`QP2*epxvssTNz}!NTS}Ti9(YgBim6OH5A@% z)NhAK>;16b)%ii&ZiKX6tM{{^tk$}nZaWj`E=SZI{FYMaqPM9R8{zWhcZQYIU2ve!bTYswxa1 zUUhrzmg;tP6Ifx??L%s>-<7I{F%6R4w1?!N8XBl*nZiE0fg(C7Q7FIeNa;x7`?uRt z+6u%OCEbK+CcKnXmMJZ3I&Rx>E8%A4g5f%bZFmNc2{V>8&FOJNnQ_y4L)aHPa(BG> znDv@V_gYu}LuGpc5AUeB5{Bmq!!V`qOUdU@Jz>O*Tn$Z;Dw?5K+NzqzL|LX{W+cW6 z4VNPGU1DH+|nwgbDosr;0Y;(7YEBWkqOO2KTz4FFCSYr z@hshY?~+cJH$*>2q=>>phDA9t^<)VrAw*KCBz|4jvn(?wM9$1o!pj?`=bCXLY|pa= z_f5w$jDi;@+HpcCE+yT+^RhCe2szK13#Kql^)J%em#G-sR3$@HEYm9cPO4y-M!IIH zspRKq(z?4OT~#)m2{maHQjT_{DOP3wKrhmpn1f}#$+~POyN%t&j+2N zf`WV1gT5}zgf-0xk#^xe1Lp}*JSc2;t5K*W6$##@Tf?Wi{R}(~3;)562UZ0{Km*P3m9&+I$2Itb_s2`9WQ)F`s>5PPTK(KYqP@g zl8Hn-K1Z-@&bJwH^v?5f3&ziruAfY&)0u1rLb)ZlK|GBC<;jOmt`AK(#^OUy?h6kM zg-5VD7nLysHYPxDSHQ2J4%$JR7}sMqgr$hblq6@U7>Cjp>f6dvrkUghM<@_RIF8@3 zAfvUjG@Tnv;4S3s^f?wY3+q#izD%EHeYS@kWOuN;u~Iz%bi$_U{bsE`$Cs&Io5xt^ zNoi+^V5ZGbHM8MPUL<%@dk=-pb`PG@#==qWG&mx1J~S%%yv^w_0EY( z^piDJPZm8A@y-L=@)T%J|DP*Pc* zq1j!VZ83ou671p89!!{?x~PjugUY>j5uAkCRalIB{dSRK zA&Vw>uUhN$TG>oJLG4}}!lG-$^OSYnLP3~b1}-I%)Bc<@QOI|>%z7PeRHmWeLCLvO z3F17iRHMq6Bh1q$>qX)iREcQd&36aVj7_!Zj3K`JqSBq*QUqn8_$UXOYWY zmwU+^ES|XMIf7yna(q@yC4`!wrDE#O2dht5 zhEY8WTR~*%^?@>?U|#f)2U*92!HA-My^VN`$kh!|ql=6JS_tc!`bjNnxf)+sua@?H zvQmmFmEugvFrKbd3Z-M|W~+JNs3wnQ7Fw+Xh0}Xa#9z5>eJ*OeN2T6)Vk{+_Co;w9 z2_b%|cP=WH-v7GSwVJ)_WUK!xXDa=9J&!({V~YNcJ`4Pq0D7Fjy0^~W$bKH{-4pCr z*>A9qv5&J)u|M955{Jff11V-R0Ck;|26iJDHv)G<#E0c#p5U542ARQBOI$;;>x@hd2 zoH|IEg4a@SlM8k}O(aX9F*$R) zRI2gj^uFk;l~T1@P0-#@j18RX<^J``J?mKn=Y=0c^BWuQRdZu0)jFQ__l3r4|GH0Y zb+18udYC-gHjH3|G3IQj{zUcYbHX2HpsJ8dWKGGcBc&j5ny}v8#xoqC&Pb}RQkMG;15+B+&J)Y>!2D64Y+wt9wJ$`mM zS@wH?i`ZWAm^p^706J|`#2s#8gC~WwLZwQ2kpyCkbB|1OLK-}pbNEELoE#52xj5&u zQ_1_I@lrAk0*h1S$#bdS&wH?l<=RJb}L+UMV9#OWpUByMMA$DW}#aAr5FqSB|V8Cq_;h$1WeR~A#rNiVHwQbyK&CA2dISgYrTGJx9IN{-3Gxu ztJoH3r|Z`+ONb%$npE07qd3AuiCXyKgD8SI)WM)ujhpakCA0X~?uvi7IjSIPKz8ql zN+hKhQ*rJTgM>&Vb1GR}5oXyDX7&l}_te}3j&XGG#PLlKQ?4lufp{#;Fy!JzgizbU zv`MAanUkLkkU1q~ak6Zi>7t*?dJ8W- zWo^Ff)b;=K@L7+2a5PKAY@BBg&!ss|&ZkGTz{$|%5pAH(r$@Aj)7GzzXbJxJ^r^dH zgOh^XA+2zv7OB?Ik&t5ovf!(-d8fI4p z_e+~hryJNnpJZihjPzYo8Arh7n+O~7o2-Z7EaGjUZWBR@tz0<2xpHCS^vQCou~6Po zzTPS5W^eoA_SQlZ)oyb4b-gAon^1m}d#__BH!iJTIA3lya0zy6379<{TW|GLQHbk2 zeKdmu2a_bC5r7ZQwOyR%#3;^g$3Tvi-J?i1} z>njTj3-!&_hgVOpzJB$>>e}k&>RF_x@ouhOUcI<_a`n{e26E?DH>Yl0@AYW?;OZMD zHqmASe`{!Y0qMCx{<@UnEv2CJX01oE!dE zBlePZYE-Ic95+U|f&-;*pJj&ZH&&YZJviW47To& zqf6-Q`sp?BhH*)^(xn6r(L<2sVD}-AE5MvRcvuqNk%o_^aMzT@PBn(IAuop;sXVY~ z0uqKC?aRAy_wg?FH2X{TPwa=3LRki~inzN9P(Q@D0_1|hp0_->&AKMpL_fExd96Q* zRzAj)g1ihQrJ%je-x#CbQ{PIGh4Pz8xYmOW&9}C{A=yRz*;;a~g#-T0B*uYJw$|6z h;XZU9exm|r + + + +This is a custom SVG font generated by IcoMoon. + + + + \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/assets/images/terraformer-arcparser-a0228324.png b/node_modules/terraformer/docs-build/assets/images/terraformer-arcparser-a0228324.png new file mode 100644 index 0000000000000000000000000000000000000000..424e9d17acde236440f6941f29b90745e9feab47 GIT binary patch literal 39315 zcmafabyQSe)aX!32q*|BN;eE3EhQn{-QA50B`qx=(k+5W2s6}>gM>&9-5m-H-QB#4 zzwcY?t@ZwRf55$S@40)Qv(N6mPn4R9EIuwdE(ip|mzR^$0D;i;?*FhK08g52(&vE7 za}Q}f4^3Aa4{vjbHAuqB)xw%u-r3yNTEp7h%Et|9Edl~%@X1R_XuY4=Zh9C`Kk1X3 zq2D|cd$wTq^3^l52MZXO?94<)Lvs1`m?%jDd$Q=M`Iwlgn4e8CO|N&tcdN%(s*`md z&`U(;VbMIs#0R56K#xRh%xqpg+cQ3^hH`k{EuJ{28Ed9!>t|bYZ(X5_!Hc-r*tQC; zHk;D!s*WxiQGB(|hM;*Vdde1kMuE(r2zm<=(%y764I&>N3h3h^p5n2rWH3nl$SwlI zxSmt35%l$Os@#}cGsz&rptqSV*bEJHeiA7l4KjAG=vwBnf={(KE3uxGMMA00-n&Om zTY^B?q~b+LEiFbxhEzo`kH)wr{3HKg9~QmmaV@`n;(Fg^u^-W<_pAB;BxtYWX~$wwx`s@K@GTu&*2?*-^=yb{IN0GYuzY@bKQ>qE$FY2LIFX}bKI^sx zi3winq;lArs7X$0+{7Pa2gzQwEE?~u_qt(h9SK;V4`vc)@+r7u3Q_n(TMQ2hD;x4* zuHyL?-QW8)^`~ub2jrEs^cW3jgWaHNZK=FZ*bOJP$YCfFldYus5h;}(%NC`@g!hU) zD6s5HkofXczC9?XJLUBIr86C)$$|2dsCkOR8(Ich(!vn;*L)w}GvMptsJRDu1k(u})LB{ZjfwU_Xx zRld4lf_`8)RQwX?j=go~o}T(ME6YHj_%h*jp=LsOD+fzmT=$9)p-zEvj^8IIdmf9_ z??j+$B_79$$Kd@W=Jlj^IVJ9H&J#jvpIibhRC;!Bq5Dt2@mKk(JC@cs2XR;n4XEP) zn-hX{ONP}SSQZe)%17dWKW+kzpLKAp8&g4m#ZuV%@oPs|MFJ2~s*?|NPBN4C2$|JE z;s6Tl&-DH#j9YzTHN|_*#Io{v8x3GS=QajLt$HHQ<`YMai9PiYfa)}Qk6*G3ebJo} zym3Y#bG}Q7u<4eP7+I5OnAwTdEwIKojBedU_MwA9!p$VETxR$MEKGL=`Uh)9e8pJo z?fWN|;i@@>$skaxWJRv1zlR*?+vd2B#u%l8}`D@HgCc{=i^gG$$d_o0$2Vd2q!k%q5WG zN+wl7wj>WaZ!`Sk zjKApro6J0`4lBLTc26l07n$okjlfXkY~#+%MPRV@vnCB$cZ%c zQhc(F;kRcut5q4*No!@ka*sf2V?LsWGR0YJAmhRPW{xXEYBU(V^~uhvAd**RO^gQ~ z&@1x{ra#p<4&hPO1c?@&c~;{zy5mCzWj8wJKXPxfb^MqY9SfCi+Z*1mQ;M2=O?od` z>l0E%0D26@Wb3vlkY^HeBGKR+3z$>b<`w7}Wp8$KjP&bQY3@0+*>0+po8Vn3A!4oD zliTM1onn8)4j=8%dN!3#VOuqO|%Q zM`UZX;3BC|$cT=4pUk|fYn@PeioXB_#=+T^(Y10^PB%Y+8~;D{z>XZpzHOV{1&M-zblaeSZ(nFCD&*2kkiyZAA&T}k_&M>U53H}WKzLJHr z(l2gw`sENC02o#v8CaRr*D*ULPELgJ0Kya5nczG^uxaq!E2F)SpF~-c0ono4{(Ksw zAsF~}so&-_IB`#KmX%ky-20%mj-K*#OEc-;%G9>0Zy)N=I0uj7UtmFp221pRKjD!q zsG(F8%733ptM3dfO{?tqFJ{2yksfhe6(9G-N9~}|vWbctJQfOottU1fDppi`{XOgNH>NrYn%ZJ&P;$?=37a(dBuH^M z&Q}u_tyyY=w3pY(hMZ7D#S-ay$W5>F+l!UjqWp5~esdLdh48;%+?pdzfe8p2q5&&w zk)N>YbVo!r?H>4g{z!&0l+_rV(VI2dm3H6A1Omi4=}B1)NwnVErEX=FK5`JHo2_45 zw)}3&m{WmUEbwLMA-H*FQ;YaNxsCcw%A--xmQOF_!4rp6zJki2i>84EAl9jSTCJ>b z)g>}`Q>4fnonzskY6ZcKj;&yuBCP*Zf(jX%v&$GcGz&HWtt?^Iv-!z~+-yocB2MvC zOf^ItMwyWeI|u&m4OBmzx9yhVX-PZl9sQd|xd!MZOuPndn4}Crb=CEw9H&#PR_;ZK zNW9At4+iKH#9@Y+vPl(8a%rTii9BfJ<=eV+OF7P0GxQgH`az$09sx46E`u16NUe#o z{Wi!S5N+l|qaWLoLWl)DzH+L=X2%li))?5?!F2p?{ON+W>Odt^3oXUmBYQWE$S!)A)#)~ zZ2T&}9seFS9cqICs@ANKeCqmVMZqyPP;tp5sih?4T1I@OgpqN2bCTYH!PxkOg248fne5cO}l}+=3Pi5e^R1-rqu>9_3~0ky3=n} z;~^!>Kma}Wqm1Sq1qYzYdgphgG*fUgOxRGa}QGkL)RXfGuUKTS6 zVBqQnk0)4kTT;)TEZ6Y0OMQ1uK76A^tKY3{+pC=*j5^t3rU2!3e)DrB$c+B0=-EBa z1JS(0Vwj-Rf?Jse7~X#Jq1P439}+>Z9zMy)Nw}#AO$1m8`qPDg3;JqBp|mw30Xh&5 zI}(?6^J@4-PiSH|e z$o^%f(ep<;e}v~%nt7D)#UBp^e~j~K9FVo9qHuh7XSaij08vcL7Jw<8mjw#~o_SX6 znnZTU(BDQntqGP%f?D%4LPbX(LXS`mh7^#3;%AiEowjx@$yqErEbDEUY*`g5>mZMh zbb`ArE+jJIKWa_2n%{8t-ZX)8^2R{F@Ohtjy{UQNxWI4_KL;{$tmhY1mGFxULfqA&O z`j5J~>POm6@OymT)dnAJeQ@eJgZ;*!AJ43tRPfhY>e}W9{UEzEyXXkRQ{@X7@NE%X z&Tkj%#rlD72b^#TQGQ@4Sn%|4L^8M=!!XL_iIj@A>VMUWu zzvitXBpqLP(>nM1Rz)(XfKbt&7=d2@VfEvc|Mv}&6(e7H#uiv*IwP&Ij5-D=ghT`> z#E^7Hb5JAm)k(69`j1o*o&N7-A{87Nra>zGAS!8m5Vp=fy`$EW6$Yf>>XN6M#3Raz z-TBYlNNvbN1_EL5ge!ea-zA{)JcSve6gJv0=4tg!la~V}FcJ$?pWY^+zI?16!~}_- z_;E@Pk@)K^;YOngeN1DRdlV87hjRI~Ro|W_1;15sH$f!B%zYNUVUnL=hncL(F^6=A z7J!x+-w}RI*)m>|{mnS2lu*rJNb++`ej{q>^+3Z@a6yq2eBfs??CoK*?8@NcE6$Cz zJ0p|DfijE_zPVAarXZdLN-pJ~fipbhI$(;Y#N>%d)1&EOVi|dB@ad;A-6IDLz%536x(ADO(|7 zn%XDOp9c;VAuPH_Fi8!KBBtzWeKlfJf|P5EN&4t9E4Q)-2{p0T@8jKRLygctWX@`c z5j2MuGZLW-owu&f7MWAn=%LF|>X@T8&@WVz>W=^#1{)$q$l3ZmQM}^SZz68li;N89 zNHNn1dwt*$7WYwv(Yy$~j!@sERP^FFQ@%qfHZtTxp5WhVv5A+_=zzNU5jFRUcW|7K zkJL}AeIwgCz1jA>0NIS+uq_KawZsj?PlYrH7mL6qyf5qs3#Wil2Rm0{W? zhyl#u0@L~TmGhH4KP6ia&J_jWsx8of3X8z0g2>FeEw%n*wc75Bs@VJ4^me5;YGw6{ zd0uuM&X5x7l*WA>^hyt!U_JiXqrCPu9*oUQ#mDyxh^bNuQ3{S}Z*)%K1j`338AYKZ z0}k(+46PxEHdtiN~s{QGV-jSilEj2nh?96raoP^PUGQ3OON{aJN4n3xxkDcCoSMCQ=s4ytrM_jTWVARHk`0TLfNPNfMTdFmdekmIMYH zv9FE$Mxz1bx!XsJa_A?V;oR(^1^c9JHOgBQw_RIK@Cwz?=?@iLN66_Ab^!C$iKHXj z>fm~1!eLe=+rIz-ORz9b!1+F2as8q2)70oL{`fQahkoV-Fk1Z@nhVHk}$q!5{6 z^T}(I&eLQ`K5a{j=GF?I>$dpgV6jesY6`5|st`LS3mY@IA0o1synI<||Me~gmY6`Y zviQ>~dr!R)G>^fj*KZlx4vD;oLt=UVMhTUt>8-rFbJkz`tP`Z}0H-$dHwt4O&ec0n zoMR8V4dy%fn?jgLWen_ED{o-aX818dr1WQn#!X0e=GG>Eq%gwYC zfd>PA%5{gX3?5S@kc^RC^fZlXzzbI*-0|icG{60h@8L9QF8T#>B0{_M(q%1822L&R zL~L%bd3ZjV-yBInifH3K0<;De{&h5d?}|>O^g=S;L15a}m}xVVf^_(nqTKuUnJk=| z+75rL>&4?d)7O2Y2J5{n1_0-hFDpbjWK7pgY`UdE3Tkvzabvh1YybE}w^h&T?p%2zbcvL}g{F7Bj>qR2LQ2FMX81v+a)d1h;M z2ydhP4}oMvbwq3N>8AB4&IJA?y+w_Y^~~Iq9O-*{yk8VTp9VzI_AUxgMlm%R7FgmH zxo@iJF2ArI!B<1JWTr^R>#}v+F7swbaAcDVnq~mkr z>E7zu_ONvG#-)=zEgO{p{$O9Z;5_r77eVUS+-?v}0yqIP=m!x>&9ny?Q6mRfN2ymc zP`*@mgNP#3k&M5dj2!8ChKxhy!aKc{2hmS~;g=jg1fwQb2Fn#hs4I0PyZD56Alh}p zeZou!jd8u$Nc0x?$o08fTNS~PP6pavz_$$%VxZ-$lwI079HeUSDK~moGySWWWyww7 zwQ~&>Y87mXm`7CxN;3Wg_Bev}ex+O)-3|V|&ICuFeJ1g z+yHZWJpYfU9R{n1qAE9x<+RrK+@vhYQ6aROF`5(_T+#%{>o2hg)^DoBpS3fJmZJ#N z@M;ruL`)HYDj><5q{dzn#nG8BU&hRzDeE?G$o< zQzbnQOK&H6iUBxl*+`kFX4a$XoX*~PJ!ZLy4i1$k9`v)!=zxnRlmw+%ZPIW(!bk*C z2ZrfnQC+%f_d4Hmgo1}M$C5;-NoV=Og_8~-5vWG*{>3wu8-dd(qc3?M)WVQ7@fN1C9afh)Xy!)JhB4V}LFZCZ-3di0a z=WLwP1Yb3m^YVJVG|k8q1Q+1|EDNEL7UkAAvOdk7TT!jon}1w8U$jT52pPQ zGp_TE*pXqu6H%u4ay9#LhN1o@0i#ehOlroyS#IdUMv=5Xd z$5<08UWz`2qwg-o+RwPRp4^KtE^RNx>W;V1GF3v%Iw5LMl|~=XPl;_V;c`jOdRG)> ze*CtsN>k4V-G(v#o_THj=alc=@+5eNRezL0R8t~QRI3aphat&Rr~V$S ze#z?eGsT{|*z~Fnu~ldef=P=J*cuKH7HB0x4<3kZeQ0lF6$?2bKc-Bx0Gx-{;hH}h z%2V$)zwlouFL&67(;LD!M2pZM z5b87RGeHxt2#L@<`tyYI&94G0`_%P8+Iw0llqHW6jbFO3TMYt&Ct;}`8w1r92&BhD zhU})W^*-7Ug!OFe!<}(X9|LYK{g+E(ij(usI4c_cp>T-yZ>~rmyeUP%&#Cav#E8XHSs4zP610p^7KpQ zLsi}j0BFtUN#>BU6t141&d-Cqf z0;y8Sj7;s@$&^=Hqn=9j_8DBWNz888J3xT!xgx^BdGnIJYAN1R|46X8zMMu+juZqL ze-0^lM5`CP%0twsc{~YDq>7j7?3jb0akKTAXxDRw;Pb?8#fv z>G41a$%=+6y-!H1lqUrwM1EWTj(v@?){+HMajMQ76P8yFQPS|;Aed)tnzaWnNLf*% zZ|_Hx^I+!5*88+&z7+*m5z}Nn0|<x^dp>qV+NJ}e8~Aj#;R74$XjwHAZ`%sZ;o zwdYRYcaLln8!_T;=*S?mGPr2jp-xKgT`nuPmJmD8;$__~a`a zgV*aXc)sO#ummU#P7~Ej)(ls}nxod6hzoF2oCy7aL2*1%$fl=d&__$BE@NYhNDS=k z%exF2aIE%udcU~b-j$NDqEgA0bn~OF0Pfe`0fW9(rd_dSqC&A-EoHVpU#@L^s&{@z z1eS0NJ7&=$A#v^$HZczfC0I*}9=Bf2Aw(XQ>r558Q)d74wal`=y*N4yG+q@EU60v% z+$EBT^})zfC6Hx0b!{ppSeWtT5_a=d<%PKkLwSEnK!8IgbioJF4gURg`b_v~QcDYEe~L*Q{n= zByaW(PR359=uBbM#)=Mi4JQ|29n<_DzA9$TnaZ0+mMzri^V{xZ&q^Dl{Fi7#r7!mH zW{EpyKcR*-Lp=BKphL&SkTdIxvc)v#AhP=zQl~=-D56f}!JLk_i+qSs2)@%GB*VY; z@O0yM5`3Y>wZgxeYG}`ZY>hpWfDXP86u%=l|Le59?-acM&TquV?{mWx0Xv~{-l#$0 zGHb=*3>S3Bsa|I(_Ca%&LfjjP*NY!7KMU<1wc!V@SvYpRgMOV$8WjAd!4MQU!zyxd zK6~gIaK6k^o|M5)oQaLWtPe=+2O}R=-3VyryM7}}m+IJev8aH}2p@(TS{KBKB|@Y6 z)Y>t0uc`h1*2_f`W0s3$lp#dJ3Eh2Esov!CnOO3<<;9hlK{yjeimX)=lcQ7B$ojK} z1cg1_Z>f6vq>7@AX-zCi4?m?lgtwLw

    1yJO+!yLFlx)qs3_NXk7)*a@>~ulcK$T zbnH1!oH^-S)X$qrN3l9DvEoh`jE?CN+S3WUmr9n7;NU2~YWUuH1+mT>>*jLMC$mj# z`TZrR;NW@Op7qSyR*T`@+06)f%Obx|lh7S`hqX|BqO|+p>f9q9i1vWxstw=dVWH|^ zdVB9^H`Q@+2FK}o7komkQ8c!h<1#E`;&tia`a<4hUH}m%?|Xa^>aHlp_AzoMP6tts zMXDMj5qVoFvziNAdkgg)o&r^n!%^DA<;x$Io_>78KakzGkvcSfzRd#=t-R4G!jy&b z4XM+tBMEmWXXj1?$D)s3^O3;HpfJ5lqMi*&#E?(*a=E5aNdlN2FCN-3z*PFg=SS#( z>y3)oPVSC6n$L_>k<+Lmw@-0wR>cUb2YeEaVA4Q%ZY2s~LC>>4_xdi>;v%I_Sbnw? z4-1r}_n3QyE`EExVA@ja@pO-ndz=b;FN671y*lf?)6MU((|KyQ*z246EVPnYH03a3 z>i>2gtvb|`;cO*|G_Se-qgb0v-R<8bLk8QbC zru*`4o<`rf3~4~Ub(JGr{oYAz`z?#u&L1CZaROxWOT#+~L!d=4d7$?=x^UsO_?fx51N()ul`nrFpEE&`w`E!PuDR66(y)q z{Mno8=`K2%nZGppu`VOOWSsf*?dazNs`5%F29sB3_@ZQc4u5W9wLG+Zjq8FkF4ito z#6Uk>~|q_j|-zc@1UowJ|nUP@Ht5_2x-PO|74 z;Jy1u6iRTeo;%&x!Wa~YgzQ>DEe^Bb+c$?_X{ds%n_9KDs?Oub7mAj0o3~&KhH1|? zyoq2KtG+J;x=z*8);eiMuj?kdBS&rRw>oS;eJrhDt?uq_$Rp?v5)%;1tKnQ{B}TnG z%{|v5t+7AxB1Wyh6J2!H*73oFdQQC&+t4oCb;vW?Kn8G7UtK);|g1%+Y55G1acL+K*xE|E`##of;0n{4L)oQ+3Rom#UikVp{ z8FE$c>5ds4o%o&=YA&)?El?qaOo05_E!i`!u`@?TALm^d-?Qr5*HgBFOgo}K(5*?n zR*xMa(pN3I8_!NuR0rSvrS4v9N)w+wEssp!ytpgv+1BM9egVO9o(dA$o$^Gx5L$+O zy3r3s4H-sSvDnfBWhWb@7O_%p!-q`)**xgKUS$3imtJ34pb)TK!9@?AutG{X!d1rf zs`Zli#Ea3yg~cn-O-#B;sP&tZz*$X?KD@#_SlZDtefG8t6c1xuP8R3tUw9~9aji77 z7ZPrSmWVP$LWsaZ2n=ey;HR)3RQ!|(bo$=OMAY$Hjy99~k$qAaE#L$;5ItZFf$Uju zC2Kj;{ZA;e{RtQdlv{z4K|I)X!!2E)_3Hz`?`76|f?)PGlJ#D}rB(yNMj#~;Y&~Xf zB0FwDqYDa7g1y1S1GR3-v~Hed7!@S2iNpOF^v4}4AcsvF+r|Kj!7twFlTXMj$RH=| zE4cAsQ+XXz46$pV@NkIr7T@SvNV{yo(i=Sy#fHpON1d3TGJ`@;-X-H^8?S_%cS3<> zVd}#B-tvx@afNOxgYF)G!)Ar3EHSuCWD!9sU1rrtfMou1BEwpo!bBSVDo{B&>-CG6 zsVL@gFiN|}a?+tU$}2LaE{uynUw?2GF-F04U9GZK5M%M?f%=!wpo!JP?HY$kE0XXvDr>*NIyb{M z?hFPl@GRHBH0TdS|GQk;F*ATP#*w|5FivtB$H`h71{L7JE&6}NwXIIwQrx-k5vc$n zLM9T6u;c%`M|bskyW|{=hPAnd>; zictQ#^4gCCf`yibLEkHk^!>#uBKXk?$X082@<&;(?&+^ep5sKlhG5B&jxozBgMGyk zfvo0)milmT`X20+BeXro!@`*qc&}qP@UvbjPx4Xv)>0_ZcK{8qLM~BkPxvlnhLe}x zieolCi)T+to;-nS9b{C=U-f8j?811pXJr&kSgd*4E<~OsPVD%-;c@4p=HC-ts~1$@ zD<@^83;n1Q3WGAiC~t+&RS=J>@7jTnJ6Vk(^d;kJOa}V_D(Q~B*mX}qLBoAg--DmW zsJXEAI&_b-y-8s!Sd{7&7)8PHFuZodiw+iQQ^Eo1I5^2BNClG=;G+qtMDyK~LkTg2 zB~f-vwk-?f{z`6hF0{%(Ppn~ln1!uVmFC{xq1puLT#{HI+U-jAHz2Fx_CN$c8Rkt2_U8H4^$Dqr?VtM zUy@#Ee;52z;y*zl1MA76o2-8dnb_4%_8wxQkuVGY{YFaO!bwEIDzby^Fpa%|f-)++4=QXuJaD(gFHo}m0P^@G&~ zQK`=Y>QGeIAiRvAh3!BLS+m1Kq^oeO`2`4oh3k>#vxD-DLt%sdljaKy9Fr)ICkxwf znMWYx<|BfJja2G2gx9d1=3(L+CrEKS6T>dg5s;s8z=sSE+f=g?#E9tcX$Eji@4On^ zsi3-|?=0yXH7$d_=Ka=@Sd%uA&M$1tQNHF=-P3qxwP?kx0mxU%oRjvRpQp@H4P(Hr zI@EWun1MDBgTuuEK~A>ZD|r9qi7M#^R^eN^{?M(LtLjkf4`wxAc8JRLQm9meX1W!5 zTqG~Z$(mw0bT^WX1Cy`~zqAn>FzaWA?ikAHv~7D%i~N`eeQ{`B{3eI?7^bs`ts*bN z9CTaI?tYn=Q4mmW;&|94?5W~CtMns#bxkBfXmgM(&`Zc-?>*ZHkDL!n{I=;qELCq15T~PZ@ zcjglXi3RfJgjH8tjM~dxx(xineSR_b5QP3lyrMlwZ-=s9Y;Bim-?}(vR~J_q zXsGW@)_i>XwAG6vnhZdW!2DR5b5X_EMtCW$_ zWd-$U$j$dA9*D*_qI#vZhFK3)HS_QD8hP2OP(EUZ($SZMoC9eHdoN6JxWQ-KVVbl( zHwB)mq<`Q}3cvTue2$WQ@wnE3!hmo155EFMJnVCawua@AM+J~|;keIMZQ6VhDl*+* zB>uUP-qL2C;Ml$XNKQvK54BX=l5FEpo@#XbA^GI_eJXp?=2Tv**XMi2>SVo94z5lO z!MM=GUy`SS)cO=%iuj*=Ha$36Bool7_2vVshMDfZd^MO`g#>)(oAAb1CPq&jSGVgw za(7vvUfUOe#^03?T|T9~DF-SyL#E{fM-#mr)q|+Zz@1mFwc2(DAaS@*r~ofnPVbq~ z&Z|9TebZ>VN1)av8O?Pzb$h)hrSl`7x46=_gslaco;9Wz08x!lgegLQ%EQIm*LUCg z^S#ksD5`dEAiykrj=Ia5`_MdZW;<^Ca@GC_y+-eYRZWiQ;Y}REKW?=f%HRCswtl8d z9mwprUfIPa*?8Rrx8FH(_Ym?oa3`sDu^g=LFyisPf2e9ltMB3i4?Y8XU4FB<^t^B2 zS$&X{a$eZ(cv&Y4^(^Tap)dTT{?Uv^f5%c4BTBmFOCWtxOUirWykmoJ*|R>rkAaju z>0HIBe#(^>34)y{u8WyP96s|qX_UE$j%YDWti^()fp~qitvurp16YK?FH3@>RXlvRp)`?s)Co}zKispfy@z8? z%vasJXZPA|gr8UYX*Vp^ie(mc^~JIr{evr(Vm<7)W9FB=Xx5{Uz@(9t0##u!_hMd~ zFtvWaReh%*Ht3HbkaK}5o(+596v6g0Yt0!WxvBM)|E`T$p?@gHQlvL8)BcfA-0lNa zj7)rmqeSJVCw2AX=E3q)$wr~eBXbOp1Q{%Qn{`XQ7twYV3DE9QG)_EN^_x1=ZEoDXM49_XAI#bzbiw70~x0hk(wXZ}94 z_G2V}UFSEQ1R9D8@dVPy-ar~)#_G&E%8&k1(Z)XV_~#sfw`C@75Hr_m#S{v@0Daw# zhAfFOMS5+!{+XND#SdZ~&7%Jec#G@Ut=y`O#!LG#5LNLWp8~0x;0(|04(N+|7JU8i zTRj#3>Q-{@4=#z|e(pWrSGJ>%%K17nw{^3w?$k^STNf}t)Z(RT%k`_3`rhOkdB|dD z3=As1MvV=B-l!t4XKAu0`3i^Qg447aQCYm?HTbIx$AR;X`D~ zA38efbZE>5TqXx1R{ihuRNB?T7Q7fM$a ze8af*EsR;)t#gv%s;AlwnN?*q-nLzZcYQ}%P6M!##Qfg-7+O3%4j#7ox zVc8&viB1Ne6lhz5p%D(X5i-i47Y8VGv8}Gn=Pk_(KW}a6Y9E~kd+qkCf z<*VL^ZdZKt%DmB{Qx1o_D0g3a#CE(f(~uT-W@HZerI32teX%BUX^g!1UbCx0SYYRV z<8?}T-z8OzvkxT_tHQl0RdBW2dvIR(jdo=WT&c0t`9SwBOk4P<$?KPK|2Na5m(q{r zkUiuGp~VkI8{K$0Ft{dX$IZF!Gppri74>b6v#1+O&p@M*qMtMa3F~6W#AOYJtvK+S2Tt^<>~-oBo;pauVQKbEcIL&agHiKF`;3jD?ZQ9o>E)%p5C6h$axt8>fQXJa`nx5r88%2jR z?v!O>oLiGBCz%ho6cieruZy=Ia!#H_Z_hpyK8VRQatxYUiev8?KiIhb!xhl@##P%T zVoW3;-wFhh1(Gpfq>vfOq2>Hufl0!5e+E%UCiFYySGF0!TePj4BFq!{c30K!qaq-WCqQ>s zQ9DZcGQw8GsI=Da=1Bpbv$!yPYczx@^Ie&p^0?}X|FA)2HCc@%uptt^7q`v>ff5D*Ej!+30l`N7;&NzND0m}dVajP zMemYOA3ZsPD-{Rc>w{o@EolJ<}1;5>nA&UpJKx|Nb{ZMoDG`_|if zEyg>Q!bvv|ba4S(Qa-(fd9|_xWHyOSY4Uku-=6DeVQI?X?FXqx2%y#0`$4@(YVS(h z4iT76JBR;jneK3p-G~N6{V_zlG)hhQ>Z^^wd&paa5+jwno>fBo9ujgiTj@h2pm=R~ zam^N@<39SqhyN0|gEvBC5Dx^qlxOvr0tAaqrG(iOO^icaO4Dercw$ie;&FEbZos?FW^`U3fJRj+Jz=6*+=Z?Rxdu4kQ9N#o~ zf9KrSvu8Y4+ixm6OKDM1ELEb<=_)|yTPl2EjMFEs?k(!3mv4o`fu60C1moW7ld3+h z)qs1vPjgjlRJT+oL02Zrr6_Hq45-Cjz#!@}Zd7(0sh&O*U?9CHhHWK7d5D5I53+^m zw^YRBQzu9>0##Ub3^3AQXKD%WHJ0=V>!ibP2tU;ef9qQJUeU|`%~Wmc_vZUJ1s#=zBPhY`E>2YtAHG~pZ{5~yfL8M&fO!q~rc$k|M(M0g zV5JJN3KBQNbmR{ihag8HA5x}d#VvIA2w$aE{boIm8ZkYM6g_uxzMQ7nnq?WCE&V+T zIhjZPTYitXfUn4QIbbA8W&jw$fYXw9&&n2o$U(zF1zB{J=`h! zq_=bM&X0C=s;sE^N-Am_U{#q48^J!|UJknwJ5eS9+8qp!IG~^N%W2XTh5qRpcfbH% zaf0V36X&4m%-=+`cU>5c2qd{m{%9RkoaOmtS2X@?n{=(??M@~ zaPS>nxr-c}vQ)I*bfUQbgTeQjUmde+12A+Wu4DpZLQJdi#pum@76uZ8UC zKIE+X`?K?tTCpDAh=7W<0%|`EenUs;nnfv_Q@y!$RAankYs~+PALJ2gmfpOK@fVPNOIRIT|# zTQLx(Mg>fARP$NuCN@%tQ=s??HTaXh45ogyua{ISkws}La8u>+!iB5r`58W{m(o)|QFc>;R9&;) zeCihPdg-T!&ApE?!(cG@0(t2%9jnNIx*&ClT*x&|boQB^+t#iomlr8Xg=F9;YaV<} zDD^H%ATrb8L6x8(4TkpRP3%lYE72x1AYTRhjf>E)^4d>zx(Fy#|qZ#wvz_P&C`{z;#0b1}_qzCE4GtJ$&c^l(-wM`b-m z?G6*-Dr-z7}J5mjxYK#VBkhM+nSZ>%u=WuZAeNrQglW6Ulk)P8rg zM~i=8fXRY_`1E$tU|b0MnR9>xYlim*$6jI*N!i+Xye8cnqs|BxitQzm}GfO2eK>oK;#*0E7p zPxBs%1E?&t|5l!QS~@&dI7`+PNc%1m^}XvC8SJ;3u<8&!HfXc~Z6#~cZd9wa1QI-U z&DR7m7wIU&N)ym6MY5jO7|cZ|+m#q8zlAqSX3bU?>txNIdO6%O2OL&DS7ig79F!wq znb#SiKGpnL=`Vo&4+XmZeO+G^&xpo)klh~u48cN6Vy93u%6h_CiA&M&mNH065mkbf zSkNCdQ@%+7Rnz2aRmc1{@HYM{V#n@5>Y%b-c(Vbk;pJ1~94b_gC32*&xs5@?vvKsn z@V##Wbmp>S8GJvMCCZFb5T>PaSgy50A0=V<%lJ^s5amD)!1gy-eMo;?+!wl2Qot=( z567keLUN!x^RBSOlF|k2Bk!m}nU=LZOfbd2!(86~5l?yDtg|VbRo7E4bwb6S^u&^} zx^VN|&zv$I3>i~8x9s*dAyNk0`$GgkZ(E?{xQJ4VuJtKplnXZM1VfLq zs|NX~GCpIzD@I)(GyZFHqtP4s(|^hV9THg~O@Zoa)yh$C#N52(lJrc`epdX=!~@o= z%PjGahVO!o#>cSh48yq&$R%=o{p2mu=01%k+sW=2?i3ZiCEa+ehkT&pCV9GHs+kD5 zF97KCem&x#1#^~M?D8P}y(Ft1$w=sA4 z%KLD_1)?QbXK830x|N^0?4c~cl~ssGERZo~%408YK(2`xV;d)Vs$jnCDnN+!$7r;LAbN~!Q;=Sr4JtG?hj ztcq1zhbD3wn*k_60L-23$1}+^;nCORDN_NVEHk_ca!!10L6Qmg@TFx|*0=f8fkk9# zLQuxOmCczHWO-Yxis9g#avD3^HJbg8s2>^wBpB0@n_%cgQOc^R?JQC5*;9gs&7n35 zlQj0LdV6tM^}nRJILBYWcNUM%-B0X)V-UF}W&yK>36*CnH#}KSvVg)QIlgP@zl@JL z#{5ZQpj6Oa#0oxAN~UVFWHr$F#-fxH{emM(LNG$r7p%f6Cu%d}C~57GOK)RPle1~K z?%9g;4oGi%2+GC4?Cl=+)LsqfVCCflRj*RVb*<^`^29MIgG*kiW|7@Zv?*WTu;z?n zyRTez`dku$a+|_ts9l~%QyBCS#Z3yV9$Yp$eI7f#2;YW)KI{^MFW-qn^*4d10}8vI z&Z8Dyf*|o%SZu?;vv9=Ot2^a|%hyDWa?;+8CC5T z>7hgZh3I*z3--9^{a`A0M2`xzl|1=1hg+XgT*V|Bs6ny9jxx+EIyJg4ka&*@c2NJO zRA8`sLW#Jlk9PsRwM09#V1qs)RxX>%t>JaSTfn_M!`8`@Zy7_&q%jGVG2!TW$$3b^ z)8#&*#HaGU5$9)YwX&Y3X67f7&`i_&)_nUW5ee+Tq;ed(H*b}%AN4l|ejEXgToRN9 zM#nQs0%3-D1v$L|$}AKkyE22PRx?|sPlt7Cu~pbx(+*Nzs}Za*;+0T~oeaFRlkbR}?PRs5%Y z1O}gWh10A}`8`VD0PX*E`CmvOSpNY2yL|XJ;9lhb&;I8Eq*8$&_mchpT>fWH|9`lT zd0V3yiSU5K2SC|PBvZa%!MqNbxVRb?+erQif!y4mSA_Q%E5b6X7l1}V(Wk=yCb0Wl z`X5nR9kR_%G`9au070LmU{7pb*0W9D@sBP#mRehp(!@0XzQE@Ox*dVL5ET2^|J-o3 zX`94JFCAb@-{Zhe_4@)bKT$va57=5`n+O~M5DSRsKyR^0&lBWCTol8Eo&26jP=J1^ zo+a|*OgxIF6p}JI)*EX@lF9d_rL%F#2Kje4QrT)0Q#dcYx#5D8w>w>2eNj@)d~LIo z>}2^_6bCdU8p5~!syrtzk{>ySOQ(sa{F%D&72R)5`#7JOy8xNeEjjWQ|obIux`+h<>(-Z^}c zLb2s5a*c=kibFqb+yPlatvk^pb)0C`{WYNn6)Ed}aYQ#gH}sBQ0L)l3#VVEH=5vQe zXL!Z%x%<>skQLxGYCVX=WXyHgLd#>YT|zRw65odNi%0nChSEa@N9;0`){rr6Pv+3lFWO%OJ!T*MHt~ z1nGorZL9HnUpfi-F`6=mdfHT0!`yR}ycHYi7MEYj;(^57E028k42hg(ITo02+gXq8 zS=JhjR_>^xsYK$R>dl+$$I=S%SxHM!CrzF&Oii*XBfT7w@n`vf~2NU45CyB zY>$`*t>H`qHjpC4=1>Tn*^ubrdK(sKUV-Q35ABc>Y0d9ye<{sw$T+r#a>MNU2do)a zRY~ZDg#^e=UbB&#%)NktpPc!Gpup;4Y+KGw zvPKX7WyK+oSHyq*Q~qfse83t~S(V{r@hUr((8m4Xh^V1do0A&S9J_W{6bYZED;k-m z3(YXH$DjDvt`a3cPcY(*2bh~6?1_19M4pqE!rl|2v)&H>PxE-5J&|voRq8KkL@^W` zUABF@^%>qz43>NE#%(oN#glJus`)O%BQkBy<1CRWsA0zs%IsS)_6llQAZR~ z6Y$PyxSz+5K=(1T4?#}<%I7aiwsC3xM7bVC2M(G9_y1PL@N_r@10RgE2hH^-0 zhLP@;?(Y5_KHulPuJ>PtbN1S6@6~JFM};j~IwcBJF86g;VC`TBBb;8UA&j_(n&u=w zp(@@UF8aGQ@c8!Ht5>C70XEm0JW#3)^u%W%x^as*n;E3*27bCCKIyVj8`~`V(R&_h z2-3ikMI4M&O2Nf;2v3pr;s1j~ASgBG1O}#>&C{<|jBA)H>MLh`6G0jc4{FS#fr43E#fM)%8{ODuDOoOx@Fp-# zm{=Q^8_PF=7JY;B-~7)Bk}a#5*mMB~&Uq>>uQRQ@_Lp_Ql7aj+W6Z_nBP!d-<>9tu zYRzgIQ$GJ-Zo0NodLy{wWE&IBOF#2bPQuLAQd*sUNSVx9NxBKb^ST*!@Uu2B9er0J zl2xX`X1$4YaIO6yrU?B!&e9?p>`IKGN1sC}kc`+D<<6ewN*FAivguC=*w|QYjC0Ze zMo%8`Av&4C4%hX%bY`C(?*ZtWH1D?hmjdKYVjv4af-At26VqAfhKc5qx1r-TK6|7e zzbLl0V&&^{jz)Kj;~&IKWN(vMuD&F_v2F@BA&)<}WZ-GZ?}Lc?dnb3gYpu<>sq>2_ z$nTS@4kjJU8ZUhPUR`!Nt>iIye{`z90>Ay;klN`HY3Ut-_8*7zShVWkh(!m&u*#|r zb%c6vqoA3@SdJ01=V;TANmt~`u*9o4S1y_*pY$K6^bdJ(L@QN0hu(pQ0EQNGj+nOJ zhhZ#)4S){7rBc9k09ELOHu^d&?!(4g7#1%?`EEY6oV=ycd&@$G#hZ%T%E!wgXJoEGc2|%f1_RZ&n?lfw(}`qSUkQ13W}J8L?W9UX#1b;5$B`*ashR zXN!^5DpTo%p6OL8^yTVwcx80<2HHioi^&Kw@K#}CAq6J z#doRraS=+p)@z=_19L*M>Z&DRYu6<;`cyv~C%0mSl!)a`_h*O>W?hkYzHRFZm*sR2 z9s%*1O4|k(o~!(>64BSO#B%U$O$*Mb#@>m=jJu1Ek;!XFn{1Al(Ji~>n1r!8^@FGs z5f*$Sp?vlx1u5H$mZMXs2HS%!Q+PAy0Ry!jgMbjq5B(p{v6^19%pavwX=FTOaBO(C zH1ua1?53~ESX22sbN##CB7qod1#T#)2mC`2^p^%dE((Qvjj2|TM`ztyfQ16KB8?ac z9E|?j;Jkm5vdyeULlJxeVAkNe6v&H2F5xOh}etUEW*S$oLdvxE3)*j`bNX>Dx2P9s_pGfuvT%A6!)W4UT3?qu@z>0LUXq zM%lA1xO23y-&6FnvKDr+{|H_0YVV-@KHYfmt)){Q9quE)thz>jAL#boK>2g_*PFUd z)4ir(4A)YCw}k#}6dPy2psweW$_ zxy7x;;jjd3x7ktcyO?<3-_1sX`zf(UA#JXQ~V+3PUS;cU^^jYEA z-XAuY^JWT(NVuichw)F0Rv(5Q82NS|KvngLtr>E09yJd##o#S3f5C%Qsk(z{*Ze3J z`H6{^%bvGMrLi)jpXF}V?r#kv9rZ%TUJ|RNX%%b1vl$kfSAz)vQ|CCgZdR%$^a4;D zPsU7O-R2(L!p8~I{x>yiNnf8 zlU{EH|G`d5@uuHgVWZSwk+XW^aN=I7Ao^NYh2(J`+q5JwE=|EITce+?FwFj-imRhW z62x_iU^4wUD79=)(hTc_4pK`+BtWSFXC`2^7i==Vzva_+(pL2zOyTstm$yDve;Wd* zyp`w_b1FyE%c+o>X;$Qkh=;ReWn>M8+KqL&i%w?Iizif-Y9VOZc(wKnx`Fx*O~$yv z2FVI3N*XW~Y;#vh$CyG2Wcpi@2=CEY19;a%85Ri) ze;(=&J z($UlKU&cvgxsY3x$Z0)?KSkM8(VIu#iRetntYDzCP<(GE(})9%n2g;$0G2kRe z|Dll~`~Bx1APUvu;Vd5WhF9%4F(qHufFRzcx?x9%barh$(mds0?d?`=`n(;Y9_m@f zv|>59U7t6<(E?oQytCNt9EHv|2%GJ?ULf~oQ@*(cnAROi4mRi4kgi;ny#^l-ckHGV z_9dsBh~Q_OF4`tmA=hO)G8jC+*lz&#({j%m$Mlo=oItDG_%x)ISlQEGmVwj1_~OL0 zIo3qkG#7(ir{Jph?`S4asbkVXr(-MSbR-ELcl!?$;;))X8d=nbAM0^>HH|N|o)5UX71}$B8z)tf2KPq5cvpjAWr-G* zoSkJow=}dy_mE2(J~Kto=%Yp3r1cORzI)2b<%5GQ^?@KsV=^a))l`PR#z)c7uU30! z)S1ftS6-VE4&v#T*dOGo^yG=ZJZOwn+J_4f<3+T*Z{Q6jjM|8J5$7Ag$L=M(Bq4wJ z*b|ib3ZonnSOPv%XGR&)Y>i(_HCJH^n87u-51meDw}N)cd&F3}6ttI^i94_*lq!C6 zao_oy9Rd&@1_`#nuicxA;ewzSRmV;z6!%YhBVop56gh$1$s~-)AoWBbR7~Vi*m@?e z{URkd-Gqq+52Sik*-69z_i?oQY(kqFXD~r3MpIp5y(Ttazw__jfsyPgduC&szzBN6 zl96Klc|?f+bYbICivFto>WFSsw@2jUdXX(~?>cC;${06Bmyi|-0PzINP4G#b}pCx{S3B8-XxZNtwMTxuPK=O0E6FWc(@JJKvDOtD1|$9!REc=JoO zsRYdWO_uEx{t2O%6FomcjAI?xF_;z(NI=7f%2W9^H=v(#D|{`|z>qF+mLZ0RWM0Ql zPfe(Xcx~H+dGuoB>PR}BK{#9ce*XG(!biVq>a0GadJbXxj`+Dz3TT`Vw$UFjVM(L7>>QkO>Q=lgi%oS zDqs4RZ}$h4zA6h_Qy}285eyq@*8w9&yjI`(8zx39aK{Vt<6#uU6>^HOX9gNWlM0SD zc?jUQ-$^pxAc6}yQ;<2+0+5EqCE-Z}Z`Y`YsX5YC_)G~cB(bN(<0s{&!0i}(*j#ej z;Dd40?0K}J?@E1>AZPaYN7~iz0YM|^Uw&Xs_!1h8s!SZ{4ZvYP8Vt7bw{j+L`pV?I z&VkI0jNgut2M)(@#(l}zOJcZ}zH3W@ynN^_0$oVq& zeSNHZlLetn_|Py$nNIJ(yfBydW>s}QOSf|HB#;GaEoKOqC+z@cNcBWr*@5I&KmAzu zpeS>02c(JVh#lWJ0c+7%;a2Bqn+v-(GqRP5V~7Cr%m5O-fY1C=3~V?}DON{CL_!K= z4F+*y*%0d|<~Jfa#8^l|I@DPW^KWzk8;Rs2w}okM4o#E;znPUI;Mik$KQn>p@krK#{{ zlpRE786-zw$85MPSw5FdEj%Hf)H9mM;CH?gKXw9879Nf@BN?I|zLQ`m8%!GW7e-a| z$As~*#>n#a<+RfExMfm5`y!4>vBozP>2Tp2BvX%_dXQcc2eRpJmP%oCWs6 zPJ&!BTRYHvlE`1rNJP?%gV^4^vzrxA$mP7)6a4io>7k%AlwP*HwmFZTqkyLQoF|hU z+x9vvuq!bX@Hm1J4OmkVvZn_;h^Yeqr6Dk94@tt%)c7;RiqGVN=+!fozk2aWhQi=!T+O(d#Bh;FPP#3?>;Iw%Za6XC%JU&%kp0IR@na zf)!i};_?H5=|qm-UJ~5G0%R(}U`q!;*(PLV1e($EY)nbLL%K5^@7&)`+;>JEPwvEn z92EBWKiUg@U>c*-733axU~?|HoFVj&R6i+P?^STvj9jE`Dd{;;0L}pq1OVaKFZ|a3 z{DYlrTR$ygfhus8S!VJZ6`eBmu%`?In-9LN1+B2ho%pgsdO3ow zWIu&vFY2ViZ7~vsHQ9J+=hWT){#88IS#}s>n3iPsE-!siep)Ad+&Tp^N}PK{&QZ@7tMadD-rV_=nX;C|O>?Hp-M$ z=-)N>+BQKMkdxIh>a# zAgOK69Rj1DPY(}mK2KCSy~;h3UNd{yE$MMR6SVq~-RF>6_a9JfRXGUMKF&8Y2>6+F zzgejbuoD@VqOVLT`-p#`_*?R`Od$UldmdL>t;pwD-7C5PrM0c(rLm?ZJE-4f-0k>X zWIm8&KC_{T2OU-caX{!G(SyIW<82xJYV#pYcb%_v1GjsKsOFo(PCz6u`CY0ecXtz& zLjYFWf{T>T3E*XX9(n9!3Y5y`KIbt-mdUM-&9@&Wmp(KtPypNhYpkeb;W0_yUV2T? zqtL^WNr++0$@jM9FEvsKxI{szEO&I}$|2{+Qf|sX&UA8eL#l(u7E<+28FBb%MUO8K zF`tzJbNOr=0SajVz2LRL?B;qSK8si45te!Q6%FC9?m(Q+D2FTDab zrDK==T+?PX^#ZIArXAL^0i<__NBFE-N^LRIW-7+HZsej4#Yq18OwMlU1Up2fm;af(2!Ksls`ffMm;B`t03V0MmF2zsJl z6$9YZBvt6syNBH4ajdu)T}tHXE&$=y?CNE6Qr^=qf3UQO*MAM$?H!?2^-^DjHX9gk z#(nLcyyzU*QV(IrEn-uM{uMG~Giu7hhYw)bI4?p&(w#0UzCC0EUR{Nf)F9yl>j+i%ejQi1l5S<}&hlaB(YzoMurw)F#Sca}T)16U#f=r*tZt?E8j5 zaz(Z;`|Vg^n||f#0+@%yx^!;ffh?p2WFItQ2q8WVc?uT@$>QkuvYb;SL224 zJ4~#P9n^?^ep=_q&Z4!P2Z?0@d=^?F&kiRdi+|I&JBy|G!)F|`*?<4CwR7?Veuq#_ zzw|}4vccFBPczkBup@tx^`r-Y8mILX6en8&^d!*Ct%|xE_D#~#+d{dYY!x)CyO?cp zG)wp0@s1kcqWp7g<8(Pf!|*p~Xwp6W#x})HN|$2QbADCTYo0h_K0D3of0THAQQEO` zf+YB6BbwtbQsuh0aOi^2BZ@O>d{3ks4ECnd;SFBnc{Cm&(hvSei!20HxoHVb*5Mbc z+pFO43nAcKUj&=%xqYvv>y=08_Z)4}*7L1}PgVKbbNbK&MT5uma}NW|-`o-DxTi=~ zFSII@q>yrMo^aqy0O9FhX|Ma7^kI~ChbgV8FmOkJRt&7t%j7O$0bE;BpAY9TE^`C< zH7I{3gOlY8aC%qWlBY%Rcb+w=*2({!h~BHFUgEh9KF69KA`r?*+A(%T}s z^EIb#=(_z;$9vYP5^68hYH9bm+lrU3fS$%iKdry{Xf*56KOSWDBs*He3Aj?%`THNj zJw=LkA@tKhPF7vfa+`tz7O9_BQT}bo8Y<*?p_#Do8DBd1BEEc=+zS=fiDQ#5~0 zCvR#&;RIy(d90!E_Y?Exqr`VP!VPg?9w`xA*F$h_{jJVtPEAQ_u%$M`XZ7wAZm|G| zg6}AQ4uWfC^Jczu$w&4}Oku1e+DH}I{w3P&GM$#s@T8|_AvTKU>?~y^^A%STUWxgu z0`ih|<3XMYB(p*jA6+EY@~&-+P@)00vCph|z?s)Sp84tIRTNH?0df4@k5A*qdcHh( z7%{A`g5D0UbsWSP8~D}&-e6yx@oU6W%EPan9CwnoRa$g~r(Lj=ZfZf%rT*6hD3@B5 zFR!^xYgOj3R>PY528I5B?OP>)_%+I|;Sec6B9uQ0#1piV z@6WocRq#C+++KubU#1VwUv_TQ`a zfHGHB{NFQ00L;NoLHO440%Qd?aS3u%Hyw-vH3+Z~w=l)m5L`sCNoPf*!Tq(8OWJBIpXDJ z-zyAhrG7;^HimW6Lw~IfzfIzPon9xgO5@}m2fR-TVA^|{#PDwqMyZ+UFjEWKCVC6~ z$+UnZ03V(Zq%5dsFZU)nk@QyMkiKe@(8auNL+XR=U*uISqMbm|x0`L>*Ij-ZjRNu1 zN-$23KCM(#XM`9dCe^_0GuFz-e&hP!&reYnF;nEH56e2J_1EY#4?j-tt=MCy zJSyN{a4*6n(-ODrJ~L)0rm$tcnBH28+`OWqjFuyEd;6%$KAc4@x2}E99GUiaplzDK z+?@J_GDH__K6Hc;&fEmOt8SsgUoRS1O!Vhl@1bWON-UFqZCgRlw(Uztd|o|2gahCU zq90e9bFL$g_+QuU86a?TrmJakGgg1^=Kgo2bWaOZ&u>ds>H1IaJ&&&^Y0t0Le0#fe z&}^g~`Nw80@uTP^J$y`sIZHa0$ufFRm8a#YNdY6B>mb0GP}V1<=&(B^_;~v$VbdSy z&=o%~F>Ng8d1>UJv_u1Ns=)S_=py-|bwsF~d&3t^qwZCIniiOU;sPm4p`XPyuWXU5 zMM|f3=5MUL6Pi^^u8 z#hloc>jmcyZUAmiV(YhyD3j#YBEMfaw52R`Q4HhEi8jL2LY0-~4NC!@l@RgAR-cC}}=r)8)qUzVO!S}RFQGk2 z0d>Q7gtHm%tN1C>AgK;O>c@bdl!+Qejrz5O;`Gml41%mCJmP4i!B5M*qwe!Bznm# z4eL6X~1;ka#eq~Cku+?vA z-i*MNCs+f8GJC#JTj*5Pl3b3cCJNBM!Vf?WmV4<)>#piO7e0wtDuPJXuyR9+Mn7x? zfK$570?cm%Y5EI&b6DtVo-0sYaQ)UFQk|d6VNW6aG1nV!I}v2hHWmcaggsp_c#+i+ z3hu!&TUr_+siuCnrw@;%ev0C-UA_X5FaGwG*!VZUEKMTuMh5{gAMS@c2v1geS%sZm zVZV?_ruM(!4cdF1b|bR5=q4UPjtYJn63qU%*@?nva}iYz0J31{Eq&lPj?@QYR9k0Z z!Mss3Ce+dxNC96@>xuI#13Jj%9?pE7)>wR?Udsc+>=~M+bUPFIx(z5b=Wk5~u5que zcG2>YW1n;C`pZXT!n9DbI9q{=7qcGx4ztA1T||=niiTPYj?4BQ4})DaWx$9%P_%y>7l?M( z^ZcPMAAPrDeoWOk0TF=GQEjdr+x7P0rSNQzKs+Q@%|}0Qxzo0zSRf=V63ikx%7XAY zy1n#cueYVmxY%76OG0!tFSKZJQ1_gHOeP zp(F>)J(@^VCy?G$&i!lU$VLVpc?q6u2U~#^c@S@3gpVi!6N#x|J;X$m59g%*34Z!v z=SLr4kKu*84cvxHgTc|b+Iqv2GU97D??t!jIHXiVG;n`P>UwaE-#3MYQrvUYUG-I; zvPT`_*MbdVq^-F1XkX{rJh^Pdn^{*#_EUA#gHducHc+!6V!5 zOIF2amC|XW_l!R5R4rBIe6&Fs;t8hXn~3j>(OTNdA)TqhmLr0owWXBObmWT_jG>r} z2sKDS*Lzph@w-rSJbP_@rM+V7Bw;mhHCo%_MV0H;VYGP1Ug&@q6h`AxX-o?g zCiGErk7PTFCn%62X^q(dvv+HYV(v?`H7#cRnTn}p555kkTZ`5i^#?W81|8XDYfD;I zv!lrdVp+Z*ZOU|2XdVO=*eNJ|d;vWw%w9m5^`J$-lco3dkZ zJW;vXs%PORw-C)=suMr`jRuvOay1(l8R^9b^w>HDp zXzQfmvLdu>?_k}6pCD8oeagfzMvp<9R8t|GdI zaEa8SD*xZ|U-Vi<-(j&uB2V0^)^ELNlrKOZpx2+!HWbIs{27G2>* zl1W(?x*gdLrraJERe)N@@LI1&T6JbPNU$ny3{t$fk0M@eIdLakwbcKMz+WOb>?)+8 zSor5E`1{BA9|uBo4pBON2VrZLS?@(!D)80)ZpR>PKjBfE)9t%0yVmI8Oe zf9I4#GlLge#j6AJ7Tt+;RH>D22+j}RH39J1T0o1PQ zE^{W{49Dps%pyVnY0;(j1>7Z=ipQ$a_^Uw>Ct2L&&~8VrL6ubI4*(+uPq~8|n^hwu zdFQU(tz7#aOq_tTe{xf$25ovzZop>n5_wH(b$zB5(TC8tZs18OeUfhU(^^cqsN)td zDxL)zec4Y27gQWYE@heq-Sw-re_ONf8hfdAI`wDkqZac5dTBg3mmW(Ts*qTEQg;)Y z9eEm;kZ%&%LxcS5`*llV#ns@ zZ@DT@DE5(4mlaWRw%-1Z`Sw$G1=~dnEM%q?{=h=3W@>$tq?UD)c3mUrUu} z%U^3mHt9)0h;1cojiASljIrau!geFiE!$&AV7~Ed&BfP_DMIGizm@qnYfBqBOrM(# zpw1_2{ipN9R^(=QWyz|AUraRBk8Si|Mw#5RP7$xMFVcQ{Bs-8^a9!a8E13X*bJdD| z{5HjWpF!T(ORXEkzfd-b3o{5vk*6mh);Zxmv-5k*@(1HhPla+dD~yc|qDuouMjcjZ zXzFN}IeGm;lQiQplhO;VJ@sTAom!CY=Pw~BNd^COwBVRnP!~g*tFl9dNONvkpVi6< zaBYF*_DF5g=~wIJ)1*?58U24-tz}~`K_|s|>$@SL?Qf#Lo?LS#^MLGeziu!o&h~V0 zt{7mH77r%Wx)f%y2>veI$ud~|*pSUyH$fI$>w?PCKo+T^g7`$&)?vF-)6?o*{O9-RCrIowoo%KYNy=&dTN=8M0CjlW(@`?kI(e^zYZ zwEN4KNhEy3%Q$Bxz4f)j&qdH!>dqhGHeOdW&s?0dX_ZSo5@h;H(t3EiUS60QjDJC^ zN|jlr9j*(Wp<7s#?&A-S{%7%l?S$X1V={&LsNjpr{u)DTzONk|KREUP5aUgYHgdw> z0?S2B4MbP-JAEMSm$LIMrU{G9d4FA!2~+fezou{^HS7GE?1N5KB25>LX4``VPYORH zp9C-;*`pO+U4LH3ocM4YA5)|`5m2cyAuL^efHi7L^!u+Dy8X$GOI`u-$~%t)>%qnK ztC23g8{Du5m&E=35+kIO0K1T8)Vfg_IQdiJ88GxakrQM7m8($w7k$)T>*n^MmZ5w_ z(hR7$o0ON75MHIM?XeqeT>8ttg13_xSXURNA6n5`tec}W zT{3M+O?r`ub7=bmCw(#%1imFGVa+ei&Q4I+!AlloQf^T4w!aw_;gdkCIG9?t64vaX zD3ztu3*lP2-nJgKp8CneckJs8Im1+zjv3@%zfM4x8P(UCiQTEnyw+3Jm%?8;gN=Es zbJ|pNCQ`55kkiBl%2z&@HicRc?}LOh*>&6+nT=ATn?{e&c$k%AoaxDwba${2;~zV& z&wrBMx<$&1zFs(j68DYvFp}!tbW*nthH_EnWFTo@8T@m`zNn6BD$LBa?E{pq7YbY{ z97C4uVVZiBOJeJat+~mF(fEY;!t(k`_`ovbnA#iJN99hC$uIzr5`Iyo0LV`(IkeEM-qFby@c$6-KM02x~A4!fokeHI5jn zYxNOLZik6JcT2UYYujdoDzZ?Ms;`3=uZ{g;zkPApN6)x{hVnfH>39x3s1CZaS+ol) zu~lx{aTOcdh?S__8evv284&GvAbxx>Ai>YBN5aIKkwK$siP>FZl&0LtL!LOdR&iOZpt!f$Q}vJ6_=qtI$Ey0P%m} z?QS|~Jg-|51VlyO_KkmNQ?2$7lO;+kleLQV{CsHZ+mj4sX=o| z4Fc?oipr|#BOS`gj)m5^$^`9hw`?!8lJQvL8IaUEnkg)zYG|6T8Mx(@DzZb~{S$pt z+alukv0^+x7j`(4sHF%g!;1BMW=~IxHHJ^dBl5ylf}iRT3;8`|U#$}Q(@ca@Rt$=C z9q7rX?)xCYn9Ftb^lv>y?EApPKZD1c*XtjuO02x8W&fzKy(4eME6l*qEn^m~d4+0A zZ;>|9X5S|>;Kzd`B>wu)enOL?IgW#8^6ln=V(U(imEO)+yQiP~rh{`XOA;o&H$SbT z#q1{-BRP9GYCT_L2Tp^Wz~0Z-N7#PbU)}j&l=jE`E&~?)Nvh_|F7TIhs_~LeO!-pl ziAan$b(8$YqMz*>7PbfBew>p29f7*9{_9~JjiOWH!{{mSnyTK@=V*<-sz4#i%&Zf5D zlmqn~I&FF{lJbL`SNd4}k0WkD#AHG`!ybkIhO^HVn`win9o-+#bI(VtNSUP!j8jtx<8hC*1FycqfSOt zsx`+k=ymh$!24Iax-YJW$dKM-ErCY=8vO#CWS#acyK-MRJoaddU~>-p@&D!7ks#At5(mVLFZ)_(e8PVUU7I zYRU^;1f+^sJgpDg0d|dU+TiM4R~WYTjV|iO`cBAyeN(vf-^%qgT49Iu&ycta$Dz~8 z_vDIf`jPECqH{@C6{c1(@PDqKIb~nuye7hl?b}&vv79c#uXPeBcDfRKO^}&BXrF#L zXQ8`>M;!3oL$npXzJFtSrJ^GMEr&j!^*OxPzAH|FX(LNvpHEk*N7|@Q*6;)4ZZhu}i$Kg5*>#lTceG^0nK3o1e`i ztxwwYI$Yf6DqAt&Pvb!V*dZ`@rjWpb>w*RZr$FN!Dpry*bR@e%SRlnZ+~A2E5ztKr zAbyxbO6@iP(9kbn3D_f&2MQ1_13@0prLmUG5Ts)IqX|a`5J9k|RC5fGoGzl_f95irj>Q)T2HuO_apeDAM{yKvqWyc(Ipp#4N8{fO zn%SFr*=3+OUwMce%RjjITFr>{`0iNy%rY+;HtjjQ%4v*Z5lo>8Vo`=Ym53f2aaR8Z zmZqyRCzhXJvEJbTHg3YE*4*r}hWRBJ61v{rrKnZaAIc#=_Xk23MLqc=7mf#97Jy^Y z|Hgfu^6m7!p~d>|1SFtT+APl}VVQcWEBjKb%jO^5Q6W6+AQ_7wYe-?$t`x-m_n^x` zTwh+A8m)S=lw;tGf#Xe(h8zqUx#K9+564{|0V;&{TM#wolY;U=%wR=t7OW5AJ-_t-;k>6BW@7w}p_}ds@11W-k>OJ& z;NC+7(y-_X_`@bnMnjV(qXw!{PEx$;T=1%MP7{NLn|5EY_yW?Gu#A# zj)Z}98rxjlu@Z3Ywt_`BMy9it_5i1dIK7#QnE zLTYDv6((rR(pZz~6|`VDpNvMaF*#oVL#n^HHNM|vV%8EF;#c(djcepWdwE$;tXz5w z#Tw?e-27V0dP4TlVO!|i-}qnsG%2C+rTf;!F&U*LL`kJP{*GQTn*lX7Z>$>Z-cK;fgz0f-2UwR&7hTbOS(e`Df+q*?R+~kSegu-f*h<{>I6dQ&rl_d)BrIs>$ zH`$EB_Oif{lfiQJRa$mMcmVC%l}!lsEQT&@^DO$vArEGS%+sk7GQGdE*?8tyM1_f5 zkf7VU(!&EyV$0w$=4sTvjWxGp^GhpKt@tvk&VHoV>vG*%=m4=}&#rg$*G;1ABm_oc z+e+AaWXa>ucKUXMjYf+bnW1rZV@YH39og@6vKj;j4m6oLE{rngKJLBzUH#5OE3wnu zQPkUnyV+a-)m4F$aQeES`!dbue%(cGVu7alcFgR;Mkw;a-MuMj!wgzfaN_XIO@8}+ z>1xUJ2}K|Ke2-RFHwx>jr;ta_z+GD5Ep zy!7&M?|dIsHuH+!gc{Y05T?NcB-=_6Iy|jXKB2sLy_)Pd!m0DfZIz6%2y7qoD?h%h ztE!?j#8#wYW70n*(ev4BRA=2=92X2=qk0rLxI#vb`@z*IT<#1_^4j#rVsl(O)Hr`e zrqqeym4Bu}cj6UYkA2c>UQLd2E&N?7%Y(R`XSd{z_EG~D$TkgiCwK+tGT6!bdz_JL z15+hep30%2(|-7kG6Tu#R}Yl6wli&2{;*F=AzNW!H>W2EoA!^N;)SjTNnFokR5em4 zB+eg`k4Vi*{fT(W7ygL?{a@!^^Y41SihVi%bAaqqCk|@Cpvy|HfSNSov-jm2T3h;? z20?x?j}vTF<7|_osqmO@r}nG(fOV{GB70LaPok=wg~L9T^~zoNp<_O5UM)sSlam(p z3%LC0Lhtm1Bb=k<2;on|7RAsKaK6k0e)ZpzO`PDy5C=SilJf2Pte?cF)VPo`IrUeI z>>R6JM^$LuIV|cyQBTGI%UkwzcW3)wnGb2}K1bH|?F9kMk2042KV~?yvd}~&Go=n4#e;#Hw8g!H0kxJ+ zPm6%uZLlV3X6EUwQ3oy?m^d14l(b?rj)08jF>lS``qF9_MNcaeM4_qDKb6yR257hX zIn63+{xNsG&HdZ0Bfrn%ZF<{Q3xekQ90jjre>XKO>>zeE^;IJ6e;8oua5zQM%EVHN zR}#(0w%O)#Q|a33!4@PE=PU)Ck+@@Xe9N%0R-s(6SYVO~5FJ({QA+_!VTt$ESl6JU zfm46DraC8vG^eYW-ALD6jp^jOSpXbT5TL^(H{FIp*qXn(4la=Z)JWvmDR3S;`fM;J zVV{DiD9GHK6#c7$#p7emGiBITp%DYnF2R(l$y{$-aahT7bfWUsO|OKHlTqs}xsiF( zg-nZ`!%rWrC;i~5-heZtP?6)852&#X`>8b${zuC#M_Vv=;MQ;zCW_Z-J{OilLGG(=O)iSy{%47xeE4cuiOy;cdT*P(>@5v z7TH#zd;x2w=v&!jIQiRqSUn%M9ZhQOdG+7&ysew{bNO(r25id`$(!?EyxGQ4$>)B} zJ)KlTC=gAi_L)-L!yOv+T5W)$D`44kmLl{kvX;4MQy3!9wQW6O&CCjl-2pp?X}vB z9U`z*IuSSb{IM>j2Zy-d2Cs`! z7a2!e5*#t~IXSWHj0NnvpsH?Gu|_XLCdRw+feG`T$nXyT96(nMu7!DDMsE%L>e{Z| zy?)g*N=i6Aga5GyU?rn{xor3aT}1F3@k(YET~ZrwQh+L_>jhapu4NW9n+jf=K6T@L z3a=-=q>q%f{Z4WB7(2`Uet63T$8@5yR~bh&Aeao-_~_)?YIYTb@6m_$V}dryHbhi! z1#;$`K9*0?IDGh&^#WUPGPAtlns^HN=&Nu4%cbZD7$!z#Z~T(Ms*<7dDN!m=I|%1M zq;T~8s#n5it=K2|QQcBRWe$j$$?>Xi3%(*@V-bg`>g>MxpQU2ABgH2XGmoNB{@eih zR`IGWgjT6yolPu>Q~x)h=1Y{hi$Bq~M*EtM%=Pw@VU<&cynQA&k!0Z9Alg-d`?HKF zz>4xmIz5Q@CH{8OptNEyC377Ozl<979Z|pA$=GH8g zi|&J0q<07r3$L=smzsNONQ)~Y-l3<4li|6D@x5s`xlTr?dYG@%NWQfZTlk0 zIrj9YGXCRKQd$08%8kj)#o)$kpR@Zn|UlfS$_o*Hq?EEm`RKlPh$J2W0@kSsCqih!U7=YPI zya2Hrq8^Eh1;^GweOW#o(0GBJS+X*(y1+{EjgAH{oR zTeQE!_#XNPBCZb~fGhvP_dj9Ohwun*UoFBny~15nT_xJgUdhlR8bwJ�oS8oWR?b z48NIBztpnm0(Re_U|OI5$0l-XdP6di8Fyc0GpC2*G4hh>=}porJC`tyU%Pt!sMVcR&|ras0j|ddWOdFu8Z1qZH=6T{s9LG z3(mX1_vKM-vGI8c0}g(g-bG_ZDfR~$;q|t@;hW)i>wtb0g{dT4p1l)DuS&lG@x>aT z0zroy)XT0-><5#}dvo46xDodQSE_W)LBQ7PRZkV*;sW6{t8OuHn)R+JH=p;9F$UwB zxaTQZy!<(RM5!aa6MCg76pCUn-;@ve5Pm#OXfz>Im~b2&L+}w7y|mO~-KRGcsO5?+ z0?=adK<`;~dj|CeL})cFT~l*v=fWI1R6f01O8}p3^z__=qgUWC0dqpeL>7rI`i2LtZ#3XLG$qyXfpA-g5a=LY$vELmXxiVCu z1N#Iy0hU{s3$Mk!uafd_%<(`jNp{wIUXttzyO>{zLZ7R9SpLR6Jo{q<0YO-x<<|yO zN}){FYZ5~zV%0PycbkqX*nXq}xWH`<`T*hKSiXKZ$XpZ7X`DNLwpJXurE&mR38xIG z5>@>lJs?qADwyscRM_y0sd_DVkM3BkT36e+nHlQ;MBq_v1zpjW-juD~cl_Gvx7vQ= zdAG?$FnXurpdf>uuE7*C$4o-1Tj@d@wW^RiO*vAt_0@EeczbN&ryPyj=#dc66Y;j! z9=HowAX?o)GUU{Q-DO+o+#1<~jo5tGXe^F{a`!dCx32?D1wjlf+7aLcgQG9cb8@XW z1ZHDeAutPn`u|tbb@)^L{eOi@b{U_NeO=ihZbn92+>C2o^Inv_%a-*uGjF-KE4ft2 zwXe+VvRyZ1%ShSW5JE2Ud+YZP-1mLF&Uw9F&vDM{fK$c?;{G0;?poQa`(2|khH*Hx zmB>XOp?Ss$IkG1ZPLpPitrGm^d_HCod2OWI2d;C(&r1&Y#ik-s)|hj-20pm`tz?7D zsX@#@RfP=H8e9L<9DEMVSevSxB4T|cFZj2%cYL2woDZS;Uv;s44texJh~XQt{_lsV z$ob=uUKEW+fhO~~c#KL*Vas>QEa5~;F7}%2dzQlfy+Xr6X|VpL_gdzzT1bL=L0v*~e<^0P_PWILKp}9D z#o+k-jz6k6PO%P_MY97JN&3el$!VgTq=s^}sh*Blfu2u*1bmo;skqq~n3XW6|LDF){0o75Wo$$tq|%aBuvlpO0Lq&#+q) zG)F_hjp= zeUn4e%N>ai4Zny9lWwLNYF^aVulgcw1~dNmbK;| z2}6!8y9%)hr_nC#lpM zVeC_1O=Sk;LcFj?vM2HNe-K4Z4DfV-YB=iNX{W3G21Sc_)(hSWS!JBem}nlS09!9! z*?PSfS4J!5*-cYVTZc!kZv}SMGLkaY8rze7m;z7>zdkKNFvwcUeP#Kv+*vmnkfl_K zYLKJc4r!2gLmiEz1Zn(gi9Ma;a}Tw6!OI zryD8LC?tIg^Bu)IBJ;u#wU_J#DXoH;7O1IZxXW;m%S~`#Jz`|a;<^CZ<1CrY<5M5p z4KinIy+kTu5k~W$v>AJZDNP){UhX8Npt*Vc<8gvkF{}1mV||J&;G}|XIHL{yYc8jT z#$4$>zgm7>exT6<@@pyg5Oa(I=lKr2@Mrpimrno?R6n}M+GJN_Y{l-w)!Zt*LsC~A zKb2!q`By{mPB~ZJ!8eLikkzAsX-#$=O4BVy>`-T0?Fd@GVDANnczQB3o%@&lE4V-X z%vpZh)VROJgS?a|`mnR}H|NQH^$%`@#SujKH5yxSF8JFf=CJqAE8mvXxc45`#=5W1lvwe#ZT*fe`724CoRK(Ht&$sc zBlo|vs!d}dOLU%<4>Vn)q8TQle9bdl%-6h!mNxGOrvH67aj-k|n{%P=gCNIk6n7UD zmj#Kmo0EjI{S>&w#Vg^hYoOxiEwtlK$9@LxX{>U;nGZ8S{h-yXdX z%s;Y8leJ7tY(2e=)~C@(6BcCrWYfu= z>{BIf^S;UtIuZ_NX~n7q3j?w1V-i7X zAMWPa2@bH>|FWZgQ|NU*!$0TVJ0+lGst!0afYoaV@76K&yal4GwuSvl`+z!E z2ZS@J?u|CUtcHUXz%`{0r}pRv+E|I&r1=fy2a|j1yheeqZ~qL`WH^~>)_C*?5EuZ} zTQX)KQJD|h6?2k#UOXGlV>AMX)vyrC0_*rkyDP0aJL0?g#$>>$hCt$lKT#d&o1V^< zDE^=*@(@)mqHhPoK&OSW<$i*a#w@0Sc~&kbh^ORzyjzmSVW-RXo#~8x)7(6VN!IS$ z9b?XVcx>vJS13V5y=@Ks`C zi@yhqV4(42pu0}5?`*+5mblQvcf-(kmTyQ$kEm0Typ}&LG}YNw^EG@tpy4eiW77C` z>gOT#ozk|XmZHHpjVW!)ORKh=CD<3SWWxut(b9ere#qxiEszFRw$j2Yt`Nl?@s z9ev>h9ElWgCc1uoJvjS_`ftrSTrvqgB7*gv=zBI14~D%ciW{FdLl*C0#chEuK$TIp zTLkFst5O;l*qVIKh1aVpYh@YQGb-t<+R_7Ok^K2NugVZgAjxiz($OdF6~4a0(4Ew=>N!wM$+>^s-a ztci2RG!s?zuU1yXP*IWXyE5IN?T+M|10^{R)1Np=wm9b#j5d=gT2dum-@dYK@xGs( z{82Njy8L9QA=0sPdtS8#Q~VFX+>|qGBC@gw3feNiw9wV zXdjYu;m%R;$F=rVgV1qr9qDX8cO}5|zmUc@(v(o*TD<+GD>ux0!0oZ!p z`6u}VCpTpkx27S-YfWo;X7y{vnM7WbHTnJ?x$#CYg5)(cmV{2km_mmtz7x6_B_-|? z^)75hIe_*=(~^%1d2TP2@4~nkxJc$Yz1Xtkc0{yfJqTfT^e*#9Y`xf{Fmv8nu4K+& z2X&9hG*PA|(%uRmSWi^2NwuU!W17khU`@WBYyThI^AW`cTmQ?C+Ud&-(ly{Z)zy9> zE%QsZaw1^;NU{(Oa?e&%X@}n!9vzGbwyM$7SdUT4%Cs7-sPj8u% zy^xwmNxQEg|LaeP5Ps3c??8fBA%|u6*bF^Z&uv}s!G;G z?On6~#iF@|bCdlI$HMQukkRE)aP|u`=UD)w?6`u$eOC!2>$eLk5l{Dv|5otaKBTwoGJ6<_1b(Vjt)j*uO*T*mSg zEd{R>5B0BkrBU$1FVEzGIh}3i-=6<%NYJH%<7GCBDvo+w5Y)SJDIfIninytg2W^da zd_b5grvRNo0NTQ^x7A1~6AZFMX`yvXwOx<7(mUN*|#s$L@{{At;U+)vQ1kT;3kyhz#0+w=9 z?>0_ue9uJmkC@^-MsNmo1aTfhE>K?v(#`w1T?8#vCOpj)><)a>icarM&&CP^33Pep zOI{M&=w(~%ww0^)QKk$X|J#nL^2{y0`GCv>MU)Yi4ONo~w{Xo-%*w5x=E_bv`lbea4OGZ%Dw?!pI?uaZAY zkya14uns7o@80<%%An^Z-2epRsa|Acu$Uhr&xv91xz*$Au9q#?Ku%wMjGbfO^?6x{ z15wLG2zeig&zI2>Wmj6*t)$h0GWg%Ga_}SJ?Af-Az^?S$NPurpHLG) z5x}W2dxBP=quAUMp%To+iWn#>45dxd-8@3#<(EUI5-HI71Oi~40f>*fVdC9v9 z;AOSNI7A~ZO?b4lh((t2T-t(!pITgb<5W!fqTS|g&Ur*KyBwe z<0um%OBRNqDGL|3WMjXBmE#stP}~>C3@~nE5*TQ^GgVWdHB-*ERLZjJ{&-!Y^1wE+ z8&=eP*B(AZ(O}~WY_BXUH(Lrw0dH-68RH)%4LjC&FWhNAqa>HOtQMLb9kExiT@dWG zma*R_JYM#b#z}L<2}t19fquN_b{4|9Su@?v>sb+Ny7^t`^zBsPGe!M!2n zg*>n8>i*{;X#zm_m3m{dp}M1T1w8C;Ie{OkKOacXU_GhU;(W(vQ)k7gL0GaL@Y zU8Q>o^qFF#3_BZxxc$p8i`l)v^g-`uMZr3tO8b}ZMqtnhm90>6RJ z_g(KFvu4d*bMM(__w(#?Bj2mY<6x3wA|WB+C@RRPBOxK{JbnOZh%2oh)8-LhFI;7H zTt7H`boDTGwm_0JcK}<^D%zP^TBuu?ntM6*Tf9L+D*LV|BdOszyVrtVPYL^aZz!-G zR~14aNy{LEuRy0j`?}9ui3^Q_g2L9Z-Lz%5Qss7OebmU|#Ji<-`jeSi5JnG5GEjjw zk~SDgQ33Gsi;I-dyl>m-PnCixE|+4TA|K(Fwk;vmC6V!kaYMs}bN9&~E;ho#!bzQprxTy+rY?*2`a4@!8A%APJzmvuleC)k2p$F>yiQx#9uJP?8} z6)3BqBlR;C^GBf9pb@v&o<}!hl)~)6%0KVERb(jlW;->{Swag_t!^p>j6cH8l=B5B z1UVWx8ov#^!E!^~t2 zd#Oq)vIJjI5br&VU_VPMBi83^`!hl=1ITO7Z>J;r;Kq_0wnGr~Gs%bC!+?+{$!Hye-9?+ zoqyN8NUV>hmQZ;bozdTwok&NMP>(Zm_|-(ghOqpVRfqAexfv6i>t^*i#muz#l&_RRI;s|XbOr1P(v&^F!Kc4B_gV|a;^m5}N5`DE*qB3sQm>c1+UaO9P+I6Mqq7)r z?y-7qu(%_g>d%O7E6HT07?=-3(cdUIH_&TFPz~hMJ!&fHpWFjIxLEPIxFq?VCR@_) z7qsrdUj%|;#VlKSAAPn}ZQX%RE zJHJ%O)L@lw4NtKx0f5gp3|~sYbbDQ8RU)B37)W%AY(}-BYVwERe|qltqrK-1)D?)P zqCCFlJ0>8M0-%zBtidJlR2g$a<|)y9vt?{~DL_BjSq`nPSE8V%?Ux7$a}T3{y(Lse zj+EpXhye=+52Tw{3f}-51M~PYVZaw|Y{*Z~`D>O7SEj4NAN@fS9gGmQfc=%$b2opA)9B^V$zNg6gOT=PmeX<=Zi7DOPLKJje)lP7O<&{Jw^ z7F65&G^UWl+LOJwo=AB6%b;mohv-r1Qmd%WFAli*^SBkM`@VXHMnK+m+vre+B-nHc zxDcR|$HuA=lhT$HQHWGmCZ;k0A*A{&?plF|N4nZTT~+ROwny1C+)ei@r#>San}!(} zbOHr?35pj(Jz&{i!>&Z9@?|RZZL8o)L-$|2@$$}rryV9mX5HlLxAGRE7YYQAHq%|j zj2-NajXjlVhU$h+f=OiQUcm=n1&k)%#G5Xtrr{N>zd&7ixg_45%_gM)pKx^zp*blo z3Om5lB+@=AZPKD3R43;h`4Bs-3MU!k>wwg@nW~}pNI@gB&R@U%hL;R0R$6Hecj>0K zXy%cslIP&CcbfxFQh}h?}&2UK9(nK!WIs+>G?o`K&;92*?E|@bV z;|5L4&Dr6N{a&S)7-_%9VZShz&O}H;t|=wNHKH`w{FwWLFaKick$@WdfpN5GK?|~O z-VFTP$A@=LUtcZL2(*kf2RZtt!cI|JJMWyc=EcJ+5#E7F!ZB&_D3th{UkG_Bt$I+y}_+hJZ7h{i7p0x#Yo3 zvwX#kLuB6t*4?y#31jyEyfw2zzRFzS*t)WWQb8CaEk0xBMrCUXn;l_5-B4S5*hX0q z(j&aA3eVa#?hEYOORWt3{FNC7_lkdBIZ$YB5^ndp8B4iVbxL7SK{rRaE7MK>aV1o` z=Q{J%<#<1v&EwKA;xK-EXk#_4nUz9{m#r^;$G?Z}-=$y8AK1PODuRP`-l@aBsc*@n z(^lb&lY9Ul6f9U|i@?*uO zAsZcWJF%)M=;*uzrhN zJ2j->Jln(KvBr9NB4%_U9we)bu<-z+qwOU@m#syp!_CoXqx`*$%w8d*xLidyA~ht2 zomy#Sbw4k@WMy55oY>7Oa@-QLW}1=L`M17R1^Eq4trJLJGY)WBw(sq zcJU?|DX4Vu)rLo~PQX;5j0+h5UZi&syAh{mmv)KwUUo^JFU( z7N;Po2EIZUvppImr`IApIi%{Cr4S^$xwHB{twJcz$$3P~C|^k$jmRorfg@+ogA1e( z%`7ti(~27C4@F(C3;ZU%JuRV85D2gu2o~tinTGC!b-sswcn%+ZCo3i%oJAPmOfDo@FC)EHTgP2N-?bGk*xDU}OTf?h z^C-RS_w9F&#VxBeA5JK_DlTOe0^!n+h7 zLt1cebQYb(YsHkq5+2tdC(@4NgWb3vHOqwYVf5?5>_=)#=sV}+i~V<}MQ|b#PDEN@ zEhFtOIuxWU^b>g|1Y&7~{#ruslBOY~V6xzqBtLYM9XO;l^O1ZJQM#;}gZMd5+ee!sZ7#CO3D$(pMw2$otzA8= zXG}348hTXTEc+4RN&2S1qqCY7zL2*ruv}#3WOF^1w72{lSJG~~GCGp)J4ScNNXnRK z?Rz6)zf^U_@I*kOyVJ-7jWVBu*pRK|jr=(Ie4`7u>&q+pYs=W=9tCh0tctO_A;s5< zpyFMW;c2qVfJ#!SZE>iS2=@PlCVQ@4jf&=-w@e(d`|c)OU3(Q2Yy!M*)RJVJ{6^+dH`yiwBALADG?iBkkSi=6ZU*&Z@1?|L$^x@`r_>piKGFIoIg0VY-Qcp_3|%6GPpg?| zPL)jeuQHnX#B~aLt_w@Qjl13GSXk_b`f8E{gEiieiG5?akgEw(J@Yo{b8Ln}O8`Ik z>*Ws|`@#kJ8eL;SN8Y@BO>W#f<)&hGlz>=18jI%gy;(B)4+nNW{#M?8kw z6@mJmzs0)$qv1m*H2-?wm)caIn-cOt(>lvL4-|oV4t*!igbqu*Ne1sny(`HcVZlmt zZm~3+Gi3ZN5NG)1l+SyZ4AIEqwyrdOPlHn< zd5cOT?=I$Bl1cHN0wS*ub9}}p3+k`MN~rfn1eOw!S6spR35&VI*-V;~=!BJRb7-*- zO#irmz7^`N20BG`V$ z$Q1UL{GOrMx@v?+SLMjGejD__e(7$Uv)RaXh{A3a5^ zph5$ibFpn(t7aXErI&1CkAmEU5`#^$nB2pTQ>V7nXWX5PhH~n&>B+mGJz)jgJ*6th z`P$rpFWnCCbW_f#Sk|OFm6X$YL& z6m(B)=*6JEMHBoK?6M-zOHRRBn@cKqSPkx4ujp?S(KUbST%PsLjXx)1!^fD8wyGEC z(-5v|d)9MtK}qQ3RmR1SzSf8odVnk>zV7Opq*4%mfZ#$<$(;!B_%|n2L!Q6TGHDU@ zX2*E+=ywt*ifc!|pia;rWE>oCST?qVPRBGrI&dwfP2p5Bc(G8?^g8VanV;+kY25EV zr@E{fo+*giq*~03k(PN&|5?jpj;+e3~+Pu%p8 z(Rsr@`}{c7=8W+r=p28h_x1D=8Tp=}Ob9pc^G6}plz82*$}B(MHYUakA1u8p$$d(U|QUWpq%;vVA1?%F-_1aQ(LWWulI}n(8-1 zMBQq{!5<5Iiz29)`5D^%q<9x-W5;MtT%dpVSkLs%V~;YqGlSDiI6PZKrL;TZwT`2$tO3{Ggvstb;RwqHP(2&693k*R!j>KB%(F<$= zMl{fRDYI)E;bWDlg6jRhW(t) z3jPC}B9%$YF|k$u7{$7px~8+-mc&7LD|@o;jkBMTSf0d$s2|fg;%2xz0=U{pNfYmkF<);nKGr-7Rr3}QU8&}M^DKj9{SlR! z51B$IO3Fmtj~|||W=#rnrnl$`ax1nrUWQzSsvP_!)$P-cz{geeGLv5(t5BpDcryFxb-LUWs1$sx z)*XqB<`r~R%e?+g@Dvm({(So-7P?&c;D(Eh{`_zs@m^B%YYOzRTM(xgZ_yc6k?8!3rym&D(`flWWOK=>h&@e zDvf1-N#_y60Cl7KR4R~Zn2~Jy^jw%Ym2gq7>!2V+43tg6@(wa0${4Yl|Bop7fqlgV zvSJ|+KLk7BKe0H4ueHcBuDqxo>5fPC<}1|DHVH05S1yPZ|KAnj-*o&qjGaG2VUkbO zV8TE1XWsl0AGlfWACR;I5Un3cNU{*pXEnY%7q;E(YeAh@^m{D;Xj zSx~dV9>L5ZGJx)%+>cKsqMs0bh^{#?puH5PlI)h~>n+>E2?|r*iq4DCu9kabo@vJOiRmc8 zQ#duG<39+Pg&)(_azP@fUy3_H!-#-N_7@S#z%FbUF7bz>!JQAw)WXKt)_#or&h|m! z$;>5B1~%7m%#*hcOy^m{qx)0|UjZL|7w)?{+(0Hn>r(0_-SC+2>U7!gpgrO;1Bx15 z2lD-q4!bf~GjG|lh%}YHjOnUJl?w&P9L|$N-B=*}g_WdnkH8GT{K3%_ZH|SnARntM zD&pQh0xBKFg~Gf)+h0x#U;c1zl(-al<*9aoQ|xv2F_xo}+G@a_%Th8` z?SW`35YIVgZA?FrO~tG@VEJ`JAu?B)15GBwU$gnv>vxy{qp#vTb2a>EJE}X8tL@N4 zju(HcL0pYXWy}}sAq8(ff-W$x9Q8E>J1*+)7gwtM z@}s1Eo@^5+JH`NC9z06{l-0$acRBxStz=vG&@4SK?W(aIKb$=a!1k)O+5TUknrm4} zQrcN4A|jca(Vr&+q0c9gAHN>c!T^!UwMoM_T6=Zl@9m{(G7tFB4e?CKE@HLu~{^-b)t%V(>z+xe0f! z(KE-Cy^r~!KSWd~WUn`?_{a%*?Hw<8i4lgsdv=I6jfJVcKe4`FASdo&WKM2yY4GEY zsx+YP7=fK11yp3(y7AHe^x=aUgMbCc<>-wiAtxfQG7#bd3Dk8=_~aSNePB%-s&2TeuLCwg=Q0zsdu zp@IvB{oCjT&?EiyrZSiYF~*J#v5$4|^YfZ^3pOL7zS|(b8)?X4;{Z~u++4|B`zEsG zB%k=l*L-<2fP!-fambJtxcJ+hDQ3G7G!-@#Y4~yPJxBuS_e#}*xo#^6C%^}_Z9$qO zJSuP6_Op(-VIxel^q-sth+rPMG?ns@R@c6KJrnDTq{`q!O!J9{pw^&IBb)J;r6NwU zr?4Z#V(s=5{;;?A1{65)`l!Jhh7n7_0L@4@Z8aP>odcAf;a_8pn73Okb0 zxJ@>1A~hF!=U*LMllHVV-w@)DrP*LePJEN8e8rG0lzGha(9xkllz-fOuA%B*NmTo>lDbyX)@_3Om1LK5!kH6ma)MT|(W_y+F-v7!;M3h^*xc1*pSxEty zm6he?uQr#dgJI~mh!(4IN@ zVJC9;!>P;7G<5h}t0*FBV|y-8glbCPFMAOuj z_jYjfEx#J|(8+<<7Z}I9i#kgnPVV^&vbn)(sQ?e@kXFsFDNG?7KpSZdS7O%Sg`T48 znNo{M*!co3@pqRN?Cbu+xUt=BlG^R#475^bG91LzLII3I5)M%O9ZN`lA3YQZB5h|R z*1{TGsI!g!=11s8w)>Wt0v$qEtATAwmC}EcF|J-dYlf1sOOO#k!EZ3UfB-1vAF#gQ z$oygTmq~<(X!~PLW8dp+mFVo|OI;FO~or!=O=qAm3gAtzx+ z8#;(|J`Yu|CNJQd|EI)Ac0i_p^!x)$!+jeMdYG?7{0na)`2i2W^^u1r)u^{;lD2>$>VYV(J6Kvc)_6U)HV-5A46L-5YvAzdA z+I^@=EP0`V=E;TjCM8o@?&vC)IZ30y;$7V-oTuytYhY6~$aA_Y;LRS?<^4vg2N=8g z%oryp`l7^m<)NZviDc|x&%zogRVBe5olBePY?NjY_`o^+Y9&O%DzA5E8azry5kBZO zVgfiGOh-?ARN3pdBGK(U5kBWa)`ArTyFIJ4w<|-UT$?ETS;rv2!nO)A)j+_VZq_no<%pDfR;c#SJ+-(Dew!9Kd^8HjgxNwx zhlwXs>mhz{0{AD?Q#{;9wvLkKKuvqbNCBoFB zZ%LkERIbRXG-kkV{>t}7hOcxCvt?-nD&icK?&d!@5c!l48jFZo0zlt_s{xAdS23S4 zIJic#uG2S5lP}<~Wx0Z;iNv(9odHrrdHJMe)3D0@*U)D!*eUpv=sg$k{HGY+$^*UyRJ?cnpXzL_nc>%`E0U%U~#Shk3Iu>uf)e@%aNdrkzy%CNHS zL))4OdXKx^Q2Nzne@DBTTTQV4$c3EKEsbk+-Cb5IhTU0p5BwJa^gI`TZR=iF32_NI zylhSkqcD=)3hlW`og~8lFbLE7sRL)&YVKO|2UXF|a{Y?PhU9Vl3Ej|1g9vD+Bqvjg zD8&U7XJVZIvkPeaiaK|L*pS*%?rM(@UcT^_qdyyN2%WXMrfykM9T0_ve}6pD;4vIb zpuKIFmK_v6^OvQ3zD3#UcVa!csM5QEeML18ntpy;_z6w9)B%bg58urL0C9KVIKe?N zYM`5(#3(64vK(g7ezTjRT)ly9=6x&>xt=KZaz_Cw)^mY>nQ93;{HBqG9Nis_JH50` zm8Rd(n&PwHANixc(~*kqH_g@!8Q!mH5JBhmw-0$?320awmpPN@%>QP{&-_Dvi@a_1 z5&VI>@=8GHo@rzBLlk6HcKK3+og?wn@ERwKiKD0JTyYU>U6r&0lp&6fi`uVs<$T z)OQp6La4u@Pj*cbXkSac+f%zfeP%|r`K(jISI%b!0QwuiVG164f9KJtZ_toU>?!H~ znkhGU9VLYlRcp+YK9xhv93uYwGhUbI>>2^HGxpJS<2XD`4e4H9`_vhjgmI+g%m^Ra zH5bLE66Or*(y=AdQ7jIVO-QekQSuRc_W+xt^)A!u*|_30=<@4Pp+%zKNDDt5048~( zZ998dR!7#54tjm0>I4_G(=l*l9{jxISvNhmpT~V4XPw2y*d!(#o*J7lF|M6zBvoVU zTI+P;pG4OByBeU-QNMFA7*#vk2zZx;Lj8m0c&08;lMO|_EtM7?q~O>?Ld zV>889&hQN}mbi+pJ`)H7ZPU`{F>QC)bUC3+o-P&rQ`*ixk9`?;}7lt>1p|4&#$IVEB=+zSiyhkP;_)d=IjKFuTEPY%u0^P3E zGom?xsA8WI{mK(I)Xm1%ZP{nN6@!01LscD*_xAR!e)(sLn|CBF%Uh%U7G?|Wx3Kp~ zqyA8bgon|g(6itiacJ zZ=d^k&a3%e?E?Zad}5-*mJ|n?-T^ore)L@E@HJ2;8J_qLKFgsgbC3KtWux25%wN|x zciGb%Zl(3(-EXKno}K~o)>}WX??XmIJjf*4a+l#(c6h0vkB&5%q*5>P=EHZeVvOa` z*~*c;Q@NVOGcM67bgFW2jUFb9r)QhP#i-TI&dM6!e}1R*&0T#%;wo3bx{22_R+b#d zD-qEclk|H&v{T~PePov1FA&`X;L|e@_Vu`ul zFgJC`$tEGahlD|4t{z2{antEzq z5A~VyBkuiY5^g*$N34$CzZ4--U4hPAv7%d!H|N3Xwm$5j^UG9^zU?lEEuMQS(XXT& zdFxt#*@6BY95B5p!sFhcM_@2&grIr2g{jX*-Vjy4ma-ptiTE+UML3z?8QHfu*VQ;8 zT*hH4hk#4n=6-PN6!`a>%i^IxNptSK%a}K|q}qQ2TLFwgn631E+?(AUfdK(#406-5L+G@``JV7$~$LhIE(Tc@Xs8b>x7H*JwOn% z__C3`Y`?6oY@v3i#NLqKV7{(5x1dRY(tu*M@biAzzVf*Hp5gIH?SfB+2(IIfT-^gb z`3~qC9*IayU~~Kin&g{^I;MVdg$s_$k@1r)%^tL}JIKFyM?5=kRlzK}?S}Lb0z?)( zhV`3iascQ*d#Y3?>mi*;_!v@~0BEBGb#B3C>azH^IqrMHvQ<>EEk)8$N;d*1Ne zu$yd2Z0Z9$heMrT#TLUcS+R4Qht@WBOX8FOt`GQs-xo1?eM~^JgJrloEP_L>{27N6 ze5}I%c|}4cqi!2p<%U?5!o0o*)mtH&IE^(U{#(n5YvPY8YhH10uoqQMhB)l2i#S+{Oxa0RL3Xsz!{WI7O)70=0#3ek z⋘WAXp+$wyMvjLHCfQARIYM$oMt?*p&n^V>Q9OL~!4?ms|Y3aFo%t7*^7ixZ1ds znWpp@GVgCk?hS7-pK%Q^5=gU>FSHulk++Z7djlK-1KIr64g;lYT*nMIYr3V1Y7=*hIzN15gWM#Q*#d;X(vPrGWOs;2@((ws}lQ8 z14>=|2ll!qaJTpT+=7$rBCG%-N#eod_PUp$D-@-I&4j4FZl}5Ya`SeUxt( zSsw{%YbRtDkr!;I&+OuT(;l-A4bGWDA_lgc&HtfaLtzg!=^V-ywSo7N5L0+QUr1aP zu*b%V^YG)1R4c+@&S1X5eo@Hj<+(!f)BW4L!XYr*)q#zP$h*he zcb`@2+Izo2;h2aoPkeBA7cCAvhP?oHojYI?s{(9#bI2!rw&6yGK%s!O>8-NWA?BpX zE%qS%t|F`W#$?%i=|dqzAFbZQYo`+)<;KG=xOm8umMPeT2c*D022ab6q6kqqTTOFJ zlkWysU2ZW^9;ZOB87!mVv)yA%FNpQG)rv=nQArf9V;4Da_PTmTSVC0CI>0okqtweW zsY(&7R|SR+7w8h1FQ@%f6vWY=1r((Np*3$|Bm{14^g+=$xF808E=`r5t5nnH@c>El zjz1@oW?4-g+&#FYRsP=*Df7pj9I==QVtlLl24%wH%I{8L&j@G`!0Mi&qisYbrLaD# zKq7gQh=z{y2Ni7TO6F3}W*I_TrDd%;#T1+M=d~Wiint4-t_^H*_+!8q>#K!3?#_8D z#|u&8GTm?j;PFjt#i)KwvUbcPqUc3WY_IJxv3!`NoWJw$HYyOj>IWl_S!nL z-3LO?)1%6SupcB4f<}df@n#K8qhC@$Ay5nH(pcexHu=1Qt~d2gy;DVTesl2yx8$N) z5fc9xt6Pc*WD3K%gcf$r{iMBeWD<0%#oq*rkb*wmv}ku6+I_M;gfk)ofXCeP*p?U1 zSZeWocDrBam>tbDO4ya|5xTkO{~OUW0wbWK*15u@ZT*2;%{jf#I$CPe-Or+_vV~8d z>iBA?a&wOGiUw5^^5 zqNM=}4p?dv$h>28gm?gdo`-{mKdn@p_l&d*-Zxuo+quZ28{sV%~VVbrOy6K_iMBN#2HF>qSe7RSzcwNIp$e1epAX78;WYo8e%61 zJFG6xD=J#qJ}`_Efm$Av)=`e3i#kUfhU!MJH=jKE#Oiyef}`%uthv+f$tG~X*cTjz zIVr3>JZd8DP^4-ae)m3{Og8rz-+P0IKMT>3>=DAnmRKs++mliwLuP~U1whSc^g=hQ z%A>Ca{+TyD2@cKYmR*#@#(B*|8Ti{tV9R&+Rn@}K2|L;^zVswMApx)utA;7Z$K^d zAIox%Y92O}-Q7{J%Jc}b7686&9SR$hURzHb4YhTVg}rlB`iLM|p(5pOTFFVDS7 z;a!ghPwDOxdY+H$C4UE9N3)5uxM%%k$W8#fDpY9DC!br3rSflP}tl;8<%Y_&MjTgb8ayM(93CqqbltNa;bck$kqm2yLkQr!N)J7=yDSQ!_# zjYGk-1bTL6lY`?Ej9J4IJu!nuY*>k_8<52Ys^`kEb0ar%>lez`M*ABV_OnuWh;sWO zq+YqpLbN+bO6I&4(;w?r)TqL`)k-p9hIAGGr!=DJ+$ifYhOk~?E^=I$E$%<1LXyCc z{on1$@o&4ZX((l`#0=VkXs?2N#q=pQsHn*=2y09|MsK9dy|1qJG(b)~Sr^I1)p$%honT zA_}#!&bj(M!b=5R1op^`LIiz`YG=OZ3{Nd)7SwF5zH(U}su3pk3~#!?VcI(fAJIrV z%r@7Dq`dES0)*Z7sE`TDl=(y|gS3`3r5y+uSp*eR(W4gfMWYE@u=8yCLa{WP8)r&Z zJx#Ggh|5KMAs+muB zKE8&ZCN_?`>Bb~0C7pHX?CUJsOExoUOTjL01w$9eP1i8XI$m+FOCU3)v*}N` z{@1HNsISWLefCdTq*`8o*z=%+OdTaYRvbE~f@0pzv=s4i)r$BLI$z0JS^6z^4f$aI z7T;C_81l!W21~y@OEhM!O>aB+Bn{vqJu2*;Ae)Jw`BOJnCt%)V1_ z*|@WJg@#w(<+~I0>0ALkQB!RSkz=H;Fp8R(#$E5?Z=E30#fUB?WuO-RurV8LyU6pP z9e1D>kLT^v>ksqrA}JKN&9~L!x!ca-B7b!4@N7y#2MtB>r6=d}k%4Q)n&hjJwc!O~ zwkc534gAT)^*|%~-hzI_T_w*Q?HX5Iu+^Ov`_mn@<`HA(&;mfQBIJ~~D_9=2i(mrIX zbDPyG#vF5tA8i>tu@xKqVivil0=@Ogn2@1#Z3~%9w)vfiNmSbgJY7n7YuI_jgJSM9 z*waE(qa-uA&ISe|J^4tb#RA#U(2z7ZKdXP?eX-o^Ujbm{BqVokZh1O?PT&gP=dgaG z`WtQbg;v)?uZ?OStG{=~FYQg`tc^?AyDPive~Bzu8Lv>aMl`9FLB?Hv$tZ=*q(81+ zWYoPyEFt{Ot-c=H2{i}GNj5jP`L&_vM)z8AvU`j6krb8T__b;MJd5T%(Y;7&(!qlSN67S-vu*VJ5o~(}(lq(u|npwUNO(A?gp?I~|oi5zDhxckHPM28e zdySabRcs3}w&g|?AeIdS^0r*^hi-UVW4f?3ps72W!1Gvfx8&|BqBr^->J}S4&iDYg}CO0P)h?psd%w zUp?xyTgzMscLH$njpn^;j&zN0_<9%CfGr#}%c1dS6HT$?PqK6N4H3JRzFvNw$EAs% zRIO|blVt>kzX?0X$}*sfqo!glOL%g4DT(Lq)WenVo${$b5B^JJS`kC4MIX}(L zv)Mm1FGqD?OQHQAgm8IGy35D`*R^CxzU^lA#=fS8?^A}pz6hl9Sp>4UTv^xGVEjNK z?E!~IKg;>mB5mw})_yauWpbfwfGHqT&lZjuv@MwB`Cbdf9WmRAn7j8fmR2>G@0~ z(UBQLyeekQ#}B;fRYGimEGi^`BrMeO)cxrMUdi#!7k$zRJR6BW;>3VgQHvxf^)ed! z{lW!hI&1#TQNJ$loC_N&n(B??jkeDI`fH@7lULW&lsPRP6uI$u@Ez#Qz-Omg+qC<$ z&aSZ+XecYVW9sE#I+<1+j`s_i5>)x`bi_Z*Tb4+V;;f#_w6ryqzH*|g^SRI+{}f(w zdkrF`)ycu5`%^7k^q?3*GIlx7=I$SldlQ z?|ce2;;Bo`PFqi?oIApQ2Nm3?$_k3wHD8;9Lb`NxADnc>UdVIeZc+xM8I9bsj*5`~IMF&{-ggUVZ(sGGG=sH%&_Wis9;GYl(6K5KC&#iko z>_#l>4mS*2{-Tcxv+H3_e=b9tzsA;}x!9{WsV606c({y@{q`;=imG(Z;gds&Ku#>x z1^@!;(U(v@!#{A{NH;y+^;s`Lgl7N7z{!o>kg;@eR3mTweAlvZylwix^Ob zN@vnq)_bfw?v<_ZrmZ}f?28@#cYo(^t-6N3klV=mB?lID2TN~SME{;7K}sS?D}}YX zp-V+AQxNdWf5Sc9eRO-)PpAAowgN|NJBfVmbUj+^yauOW*Cjmuz*Hn(PgvN7pRdkN ze_^7^Vl`!9uCBJGuD78+W>_}Dh#vdX!Mn3P0nS{AxctDap_xx%&riqB1XlIY`VT9) z^2Y}SqAc;_tf1eM&hCS#I>s^nGd!G6m?!mr_xC{83Egt+B(`k?2ap}3C|5}{%$wpYF z@;q>Oep1k9cM<-#RFS2S7E+5osbA=CuWD_g!%*-3Z)M)!D)_Y9P&P9AIf0(wLDR;p zxMj1fyZqr+z`zYBIR(upmoNt&6n|L4ZkvJ-Wc@>U!cJGN7sJ~;RO9Ri9)9i$o@m?_ z_O_J6Y!`upF@@ZY-k53;rEhAzgh=2}_CRqRGHEAr(p`S`Ln*bsK(% z?B9Bv7iQO|G_h3F?5LC*0qm=*gkYQ(t+1olCxpzwP~X`{xL(CnHOq^>INI&c9I&Kq zJKM%vRR)fKv5RsSGb3)sMJyXwRU+k8_sNSs`-{&jyFko2rf&Cc=;!rWdfqMp4Th8f z+|N#?*unQXfEbszkc>@5?c_wCI3rH9-A_8`wHC2iIOIpsU`PDA$qEWxU zc5UY)S8ih~>1Z%s*LqM!fp>5R?koPvdcr2Axo7jCAsYGLLF>;z!^4jWT2Hg)2woyb zo7O*YGG%K}lB+1UYM-8}AC+wuKr_Y@s&JX5PSa zty|;48-c~S)?WkX6xE6=F79vJo8;&&TB{z6`-JLF6`v-xDqSBc9L~~Mme?(dr@L7V zQho@_KGrQsoxC zh%w6ks>|cwuaQGDl#Z<~k)9cF)1Rx)p#521imA6Z1K=Mo+jF6Zu`$Cm%)*k_iNBnkVXyZmNFRJ|YTqr^-;jOd^1 zZ7jdyYuhgeTqyo98!W*5o6Ga>_o;h*{4m!o$-Oz2A+if}Z@1}W>tXBoC5kEKy=?8Z zB^BLcyP*3evV>$|%HS5eEPJOq`$8K5Q z%@e-W=<4U;FnGZ7rEWS;2@`U%i#dk5z~-JEKfG)fx_$T|-|;5Jj2hCpqd}8l_s1+- zZ#!+H+Kr{k-{hiLVF%kBc$H^+s!F8$xVZQGETgb`mYJi;>51m0j1T%Bo-c(}`tdbZ z3%80JI5$LZ1wZ~uM;rc5h z&M#KiEaR_L1vCJ`#)J#^F7aJa=9nVjJ>Tmpl|iw~$^H~v-Qt3R@5x;q7g%2Be$&Kf zNS#i%!Ze(~dR&$J&K^MA3paAZM^_mXSF=QeJ1p+9xJw8U+$CsmcL@Q4 z1$TE1uEE_C+%@Rp?(V)g?A!1CqH2qpzPIm4cTb;lN@^q4L)&&;;gIQ`gwgTef7MF{ z8c8i|&N4(pbN0hP9#|}d{!hF%-&nD@7mhs)RzN%|a$hx`YFUV$C4Mg_ittL_xj(W_ zL>{GYi$-ks(D>RlX~aL}IQ!vBpahMC|LYUjOtbeRE6qrO`doUJst~OsFpYCMmM%;h z+Zh;P5=Fc2iqN<_^%87ERV%y@k>XmrB!!`x8A6COaM&hmr&io$Y8k=GzveI5^u!dL zh?689Sd68oD0?w6mbNt1Fmy)Ae*7zOw!~k-(-onQ6s1DcrsIXF4;!;Q`GPRNjwQ&P z{csQlcIp}ft*WL)YN4Cxbj}D>5ifxIjl9Y?#6r%bT%9Eh0Sn{WniIhb95s~s;641^ z#mcJL;7um)rFXoUAHM(WyV;x|?IJ)@kZ9*Kv-tywH~i}&{&-#gR3@cytFBpdbe#@< z@Abk-bbqOD7r$co?_Sm(&Nu~W0;4aGeh<=;4w;2bs#W0$JvliU_|z-SdTbzM$gw^Y zx9KdmzOs5f;|VNgt3C^>l@>)p$xpM%>V~NhoLt5dtQiu2T~9oK5){@&G0hdfU`}yj z-iYrt?hxwhbMhFM-@2^@pG7ieH}VADu$fsuFQIpt zK12#@D{XQ8KQ}YrS=E0sJ-PWZPeBrg? zv`!kgJU7F;o6mFBd*eBA6(F*?WK`+LiajH5=oGfF_3LoH8OK4GBjOFFK98E;>QUFw zp(-zB@sQD{pY!Z~82U%UqB_+a!uND5OCiN-K=v-a09h@IOG}_tpZyxTk&&5s)2}fy z5j%e04LH@G2-00#d+w6_w)xz~v;N(do`h7=8m>}l#5Sx&pqYf!I9%sPLR(|j;8kE- zP(IIq2(6$;N{@9L_O%yhaL)rE3a2 zMaO-Q;6{@tIV#(U(5UjRyEDD7{vKUPO*On+?yML;a;2vszHJa6VGA_I!2YUrpPMRTq4qo#hXfhs5?)b-@l$yra|%&j}5aLj)908D|D z@O$z7s)GgSeCgJZLwZvNs zI5xbWKc94ih^s!6VUd+w!El7{c^*WRHDmws}R>7w}+q{ksP{n>h zfE_b!s%H|^Drx}^N6BTc{kper_LLP^95vbHB;4uPS)fpastOa5CNbAz^r{JUhdVcAuW*b zA6;VF{M!-Q$WT{=`I`Y(IFsRN$?k7g$au__2YIPCy6L^UzqW))C`m92;^H;Ukhkg~ z<;N6EDA+onCyA64JKG;OEjJ+mJ{7J>`g@GExsat`L^${BLDx}ZVsX#2$!CGqN5|dY z*4CEegFIfG9Jjz4E;I}vdT!i~A0s|;b3{+nCq!-hF~mhcV{`mwC!H8O66LTByLiU4_5Z@M@Mxu z8f$#(BeguhV9x{ll~CAD_Hl`|0f0z?ym;Nnd~CdjTm`-G9V@-G>)2gCZ+}nzJIZW{ z2t2XW0!kgG?YI3nU{hwS!=z<5CHe7b`DR@l3#8*2@wu_&zT_Ox=ioZ zytJ46;zsp~_-Z6$ac3m>8%bew*Tnu2#O~r>Tkfc99BR9`zLfi~(zhcS7}6^V-8{d= zm38H(oqJGbnaXTYcD4W9ZEC`FN%3 zd`sLoqJM(97e~+y8$%0|mp&z-H$Z-kM-!9lz>^DkLaqKnb&@Fbkt;d|uo#PNiIu8+ z{%%QzRuUzwGr20#wwL!Wh^BgoBIw`aw@_-DuO#ZE%n@ULFqhuOplFmjLOkq=*mEbL zm0_!YBPgPkq1bawb2P(;AeFvro1p`NwX1ji(gW%_f9}=b;{B+G$H3wFZl?W~kO}5U z?hGgAw5$jH2BJKtKpx%A`(}%)ZDBct;m^eUhM%_lf*jn4AR@MxQEyE+fi#O20Y<-W zeNctaT~s0&JC#1845ty32A`h4axm73sCGeYIxx<=nfIR@?D|j;v<6@m)YV@n2j*IR zeO*qu$i3`UhbRw_Muru5*!h{Tjz);u%TPXdixXd&8$b8 zu*Pnt)%qtJHlUSAwx?ql3A0_nHA!1dyQ`P)!mUdlm-{RlT?3@t1F4xaOyl1*(%++` zW#puUbx4Y?ly^Z+O%+uRKZM&P;m#4}fn$nzi3{BZ+O1n>>r5rv)cQ^7tUb zzH>=E5C`#Tjn9gGgXtw#%Or3A?t^K`k^>q>wPya0tT`ysl~X;$TxaqIq{=d6 zNL;uk@W4UdIXq5#|%~6Z6 z>&t%_;`hSKZZ-9oM`L>qcYp$0z$T&3P4PB&Hk4M$E@YJwwvJKCl?4VqYV_%$ zM{p^ z20q0}1V}xs)%umxEe9UTJtL5hlpxeKTY%()_D3n{K(HTj4oC7eHTqZA+Nf1GXaz}2 z6M>*Dz8mi$TD7DH_08UxCcym5vu;iNb?STa`;YJB9%E!HQE2&lJF_OgcVo||QJK3I z^vuKm7{_msELNt!7pZVza6$8dloSfdRD{%Ie-8X6KL%hvFaz0%ZqYnmteH7{ zhkfi;Tdq|V4aD?oR4(eBv-FrM?a{03JBdx8 z@Y%mprHY{T>E4j{EL2qv82OGZ&)!8XoNeSqnLw~l@p-`>+h7>TT%~+nzf6H2tb)jf z*hpVj^s2HzmZGg8b=Y|p0 zZ!do`5G$MR2IwltwFZC4XiX<0aK2tAxBTe`o|ar^N|F816?ILAO=iw<&Ls|tT-+|3 z3NL7&hFZenSqOalnU}Q_3d6PVo*g=8M2j7Sx-13&G&i5>!lscwGSZ|!*g8{QDz^7T z*?%XaghfN(mH)r%PFcBVmpZ8e*0*6E%a&+t;=1W9!}g~6qH`#>O{G$!YvnSw#9hjx z(l-B$loz(kpzZ87y&y+C38giPd(~v2s_8s%j*ese5o@k7u7K2@kx}NCz+y?m2Rx4{26>Z-S;SAt&2OkU3tli^ z-l1Wy+C^SywoSUBry{;Tfv_ggb1u$sL(0eFax=sNL|kf$>5cFbR91}ObVww;(71q zXX?Pibq;+J(n^9KC7H0N$iIH$q5cS*FKn{%yL@iT3wvs+O>CPs^mqJM+9XDqd|9Gn zkq>MYBTWjHcrBN6xlZ}Y4&YI8uF9f*Jnv=p8HOI^IHJ71CWQ}Jeq{DctqfCBCeV{3 zFUyRGpuE$_whd>_9i{*09&HTyDGDsIa?CJ6+R93}mh+Y!BmTf!N?E~+Gx4rDH zzuiVB11rNl4Y-%DEvhs;T7gy(-6-6G9zzJR{3qM zPpzu#6^Tgjr(Z5eY1M!OYkXY}ho$b$yTi`>{>chk2crLXx5A8=EUgHwsj1xcX`s6O z@W*$X)k0x>anVPw@`|u{#lOFd1SJuy$DH_QZ}ex}W=B2)&wAFK<3PlMtgc=k+GAM> zjr&O4tXD+Mn87#oOkO(M)_)_4b-q6JuW#wqpTn73CRjCHfmsa$} z!=A$RZ0@)}*ssADm;HYGy@uKK&BIH|r-olN#J@!&4y}``w)lE7=~j;;nsV$jH8W31 zA*Jrn4~h86yn>-O3;aKRqn~j_f;5>SF5oV9J|7hLWh@I({mA4*`h1tI&zaM085zuZ}0)oF^N?O`6jQ})` zVbfQ%7S~@JSGpN!KIinCvDQdD@FXBnPC{HnNOKv*ut1=F50=S80_{&vm$S}s92qlA z;u5jYmkA?pbWK<}V9tB^Z1u8+A3EzhIx0Gjr`8{H{)Qo3LJ=fMBG}GVmI$|Yx?0q0 zU$d1ywd&+s4V zxMTnQbY_a&g*ujg@MgtiZf$B030b4{Ec1CrI`K>}mIDEy&ETnd5())#1j5hOY%G%g zW<}KLy&eeTp+_69#?i9Z$0!3I6x%fw4bzih5Ne<&7dnUul9DD`pyl5cW6k2ld_m|f zW9-wN@Zda6?3gVZFcZE1aGA6p4P!i<2*ktp>gQDQmmyxo#1JhL0?*oNPnRW;QOd-NlyKlotdu7S1oCjwgNh$0*-gQt|AG(U?LERu z_jKc4Eku)VGiwTd`hE!|m~;@xx<~@Q0L36*S@J7Y~tHOWmTp|58dkvDuIvH`*x+i3C0Y1^* zTO2Xmo%p@|nQsu}{wY}{;w=)xlAhEZo#|}=JavOgvXv*FquZ~>+J45hOC%EPw;Kt= zUq;h%b)$Tb1tD(v_&7lwh&V9Psryw?*z>?`HaGbK21*$A!m_{ISrKF|(KTdB&rgVj zUOmaOc!(lw+`zv9Pbfybh{f$en0!h|KOFLv1irx@xh_YSdbn|VnCoXMvvtlA{PO0g zFGF^d#%Jof_p#)>x)!x7$EWJe3@1<6Q~6eY?kJ&j)$$s3Th8SVlEM)eLK%|68Ma4b zV3sw$)}E#1^mg5(+_BYbmtfrX%}?gveovjgR>W^g_QwLS(w+8)BT4#T{G{Vcxk@M^ z`Pc(P`Mt*eTokz5=loemQY?@!>}gw1ru6HX^=j?KNr=GQ3tVCx#87&O_!2ooCJCw%Qkyk$&qI5g%of`HkV|AxvyLtFIQy z@Y!ZnDhZoQKVoV%IusM*@2t$NFP;X8YgTc3oVMt0e1uc|MELTc@YOw3qp#4Ir=~}u zZ@~b6lA-R^G88^l$Z_kF`>%R#cw3!ntPj_Q0LA<1?+gcYiDCuI@U@94mu0Nmp{~nCeqw<2Z)ri$ zYF^2dhkUf7+F;)Hp2?YSRi9F&_Sj=#jT%P@alW;cNDxH~q)_uIZb{Rp6PEVKkUENH zGJTR9y^iH+N^4ki6#N%(Mf17qsY3x85IVyXP_R2T<&xa>4`S<--i?#Hd3IC4y||ax zn)BQb3PK&iY6*1+ClxP2*pv$Eu3y&}Jf$(yq$PrJseUX(Ud)l!UBdWN*iXA)umB?V zE3Thz{OtvmE{+Zug$+dDyX(tX6+V_=;G1{t+n)EiEdPDVz@E*^vZ;aO1vcf)`X(Xw zo1I6@Ict*LZ$CZ=)gncG1Hky$BtA>vI;AGT-k)&DQ9C9Ce-b}1f`ifAMRBbcJ{JQ> zPAVZ`(n3f~9^_Sj)+ZQjq5Md9mEP~y(i6TH<~mWWeVwn$MfBX`INhpNgGEFN?2H{u zBF+a_7`PXa-jEuja4-5%uOi|YGg(2Q93JW)`oPVmO6X-&U~FKKDx6L+P~uZf$}@ZD zn`1fm%kIS8%G8>dMmuVik?UVl?}d428sZH2cJnZPohEE>o$`9WR7BsUMl9@w=?EBB zJUi?|wFeIKjxKHYn2N-s`Dq$SxSHHd_jlmR5q(S0`$@#p%*(^$+Vq3Ox9+*Zv32P& z&o}%J=0oVKqj(4Lqj*Q2b}TH5MgrW8d(2sme11yn8U6$clu#95Z`BqSBt`e9SQa}9aNk4;Pxnd z6*J;Nt(r2mxIBxh`eHRP!OQEn5CxxY-P*|9%PI`ggt|72A<=iIaL8CLB7^y-_OV}$ zTCYLWszp|*?h7=7m4h7vI||EE))*y;AyF91Q?e_!#RvImK`*g_6FVDO{y0)n&%W`9 zkUr@QYda4jNM7_%i0~O#!XCt?N3PC$8F1g+ho3$WW358ensNs8R2b_d@N{ZOXB{v_ z$M+<~`fTt;3=+)Ix~OvK$BKF?1R~C2P5WE_o8Q&WG->8bXMXi4P8mYL!=MC2Ip7{& zgRs|W4mw^nkX-+Be`EXKm^>zpp$3&0IfHXkQPIS6V=H?G=)(b^Hh%sVF#v&E1V8mO zzr@zkcDrPY7zhn!LGuc9nfu9_DQ3Qh4Q5~Z@u;h%v5AQYBu+0kz^H}3+_081thGvK zNW&wlAp;@FKzt@5R6jh2NnI3v z`HgPl995Vr!<($`J6H4Y`UTBv4=%wKC%!9E?(ezvolOc70!_}665}(@2FKfces&$7 zFZ~tno6~uq7Nn`_?yLr*(rqGq{Ec?%e(RHS>*kJLb}azqgbYM}ybk~O?5Tq*G+go0 ziMsikKk5{Okg|~vy(NT1gent$-Ej~3k2BIrcdMVJ0A^RSP3__{^AZ4EZ{2(DehwW^ zGaJk=hM-I+G>95U$I~G+kJHU=bFAMrmiHg`&lhg+_Q$d{^OBw@_++k|3MDI$=7=}^ z`wv{pWzs9wE_pcVcK50GG|k>Zwp9in)?NrwJPMuvV~K=wyVTBp4f$I|G$1GwbLX!2bf37JVz}GNMU2H_piIvWmpGg{vDI!h zV_$4LbiSs(PHx_^)8pxIK_@Yid~3ZWbiW=}^X=*GFJRQY1Tz1)qGIOMcucPE)qf~z zQT!4)VfIK;;4*k7Sv&tBFFcY0i2hZCvLJ7sX$Uj#+4DMta*kYFY9MV>w$*2@zk#)?zfeDAH!WzqgF`;g&}#))6ak^EDR|tF^;xAjxNb_%qQ;L^v0N@r^Vg1 z9@E#iD>5h_WV*t>i1Z$INxC<1aMMa{IW_I^`_V@K>ZoGweuBOH1|8TxkVly`N0PA) z2Z7>5B|X8~y;zDLeL+B^sm~DTaq2L;p}@G0kjMD=_?R;np;n1y{5ZRF zP@cW$h%-MTeV5iIfpDb=KvOCGd6g4A^S2^rzuabKG0x}NC z{3tn5AaE3Q^z1qv(DKAUp(UL#L%OUFow{a>bwA|*e%g+ERn=O(swN11sOP|RT=8Ii zO0CgEK-@e^&65o!1|!J?;UB(!1yC$*2RQK)Xl^dUkFQb(HA{K+AN)^|VNyX2&p+`K zycJvCJOj>MT4Swv4x>)53Got8C(#5J8&0L!6wWrT5C+0lQd28zWfNAp<)b+LqyN22 zUW{?XNoo1gg_U)`)-z2c?+!(_bXZqGrWKeTKqSCueP2}ETK;W}3k;U!pBX?PRW`Y3 zjD0lQZjAz+J-0!c# z;-vG1H*rjN|28biPO0q0K=)spRK71?Fx82|lMe!BJmO#Uf5&dNGZE-cPLUK;KVW=o zhLX;AH{k=xT|NVWR{&Xu17T+a{YurEbuhx{7$@&rEi?`wgHK&+aWoh{OP?+5LWcGX zAzj!wTr$XRY}6{OkA`Jt(rZm92L@l}d=*j@rbox}UFjG$4^`*%%Bs1Z4(PHuO8}8z zy-?Kv?(zmEgJmKTUlD;LPNOVvTpDRRKg>RiP?dFjQ({kewY zW?Bxq_u%Qk2!DVpT~F8hd=p2q3P|kh=_QQ&(@6b|pNrP58r1wow*to{8nlsotBHJn z+oG%cbp_na&e?Q$K!ufM^6gk<2$St^k{) zXPr$qR5OBpcePM0Kk-l)8^EGT5WD2NHWuGmQDod5pfJnf4 zXr_;L+~2$|A%iXO24U8>s@uE!5Akr4mq)Fi`*-OZW69n0GRzX^muWMlhwh!(QIDH} zZnYnq7B^JnBACqF!|5J{CwA z8|TA}g1KWU%C{EjIQ&KxY!Mi)ls2z5yPBv>OJFLHKHh}!L=LOcykrgD92e$N(Kd7v z4K7$Lo5(GT#LSD7wkAC9*i?kKKO|(eAIC=|9%4N4F14EzNYNzt_z&vSc|x75oYpZ7 zU?~+!$UJkEmBvdr*dFrTclDCs2INcC;7&a3T~gmEjpV%s-}Q;8B3rBYMhY}hJaoTy zcTa&2zmerB$sz2_2esU)B3c4fn+jjzYW7?L`L0cwr zkXbu*r;!c&$H;9Zu!?kc0!5SuM@{EDAThCLzVUgc0-v?+P)(1V{|qZ}vfy`pikI0_ zfO86khjvn3&;?w6!Ov^-)PH0?%+;IJCb|qv%E>ffF0Hh;#`p0bwwa-KpUIfB~U(vCSvp$A3C`Zj^Ck%|jXqy3=@3+hq9aYa^U z@HjQv_(;j9aA#J)cPmGk#WvGc&slP~$HRkZ^zTPxfp#i%Y&Zu!MPmqu(Tz^P&yVQ^ z5HENvhY0+=9Z40{+VoT`ve)fz9eQzuexI&NKlcsaKST(V9qMYHTpsWrdSAP{WcM++ zG%a=A1aGcG*ViXA8LB=C#YkJ?@0~s0B>k}}X=Z!ge6s&LW#LIuvIrx^R1PfT(N!c( zfg&9$pLpq~6Hyph9`k{!$Mu$WFAr*64h&L^CPVan3RE&VX~5T|`*F?kjQ~UbihN83|Xg8JO%#)L&<-BJ4w-i=`~1r8qH5?h0qR{Eud<+QkRX6t z$-J~}p=?>1!pSHUj+3;pA|n1LuD-{*r2V$Bkz|zDb<95hy2LhFpsqBA%6K5ffDd&L zf+`h;5GO+N=9`cyrdmq!@*S1qq2sS6GH1r$=wQ*@KCnm{05t~FVqC8vP+GuHiZOVu zf&`}z8AvBSue9_k{H7fD1AEWZ4Q~)HA*?;RHyVfkt^w2oi}`pcl=H0ckwc?3{&X1xaOMQ$S+J?(eXtrt0+}iU*m)DbUgd^XT955v2SCo*n>-uzoF)z9i;2qt&AiYX`_!JkyDej4|K68|e?HK<7J=+k#LmPksxS9t zufo?P$^p+Wei2}}omGV(lSj&R7GAFJkU~!Q)JlT{15)8mhNm^Wk-SShZ@Q|RL~}tE zg3bFD0j~w3hbUDOR|$JEG_fCR>qCt*f7?dDuH?s z!ENRzGU0rGx_eO)RO;&e2DR{cKRY`Efm*7iL-&Dq!%=GwI+&UZ{J75CeECW;jfqEmu8wt!tRhu!Wd@=H_KJ(jnU*9+8*8QMq-W=&<3DLRo+ zS{iJ}B}M#p!6+dI%W)hUVky$^k3_wT|KcUxsr&fgW9hXajmfJPx*N1^iPs0iI)$gX zY^(1hOOb3TwBNg@3tM2_zZzig#Ogel97~dlpg}AfNL6eSq3qjem2ds{GG+8gNhcJn z!6x{O{o8tBG`>IDCYN%%7snoz?qndphUcdn9}CNT_mIm& z#symmJ&{kD0f8mgc)7MdXiK!p!%Mc+-i+ z*+`>11iQkEWFx)XVbq4#<^4M}!vGA*YGvR-ug=yTn zldo%(?>7wx=eH>yp5k>;xS?wf);pE9%pjqhyi12h-RHcLLT3uxGto+MgwcT^pXe3T zOgB&_iKSpnnI%Jl%xCkBSeR=6ts@ouM8P*$6vR^BW#^s8nm6`f`wLV**(@Bz;)pbe z4}6zb#7Y$*+CsWh|JC)0HT^zjI|%`sC;c#L-R?}o5eGB!vNx&iqXa>76#2P}I=_=F z4svr<^CZ!o2|klI`ZDD%^v5C^y?49CE)cK*3MKT9qN1Gdw%HY7K6;{J4J|2DU-SO6{eHCqW8J8au7Vj%e!D(JT?FlWEIftCM^HcLyCgh@Rcj!I{LlqYIZOJU zW8*a+*`?x?M-eIqW@&oDO$z4svdh`OH3W?`N)Ib~*^s*AIq}*ZRHqR?F(@wqB0_3Z z)yNDo)$Yq7j`Kf-*jQ_@vJ}Pvzq$DtS>Ja`lvY}@qB-1<{hqq|%@Nw#qv(DaqZ6rM zqZ-OFSA)RUT_YfSLmtY2l$CU%95(HYl zp_9r!?}))7fJ*b6hp3=|THL=jZSxxg{6^QXK+QZQJZT2yfkb@B;h4gK^WdaNQ6VyJOcI!927%FSb*8W&?AZ7JnH@$#X6Av zWUpa(riREsaw^)tw^Y>V^-Y=5fOL>VaZGT*aYzxt%m#e`6_V z$+5)W_f0VE{`Bj4+3k^h)xp`uxwF#d-hW+9T1<(d%Le>%RO_K0$GwT&Hpiy(Zj&#{^w9da?9^kU$*5(DT|#@?^ZX1OZgFc|&501*C0+ z9mCdbXi+CgB2XtEc1KSWV!9U_=%-81AF4wuO0Saup=U30*{ux^m$csvZZE(7WP!3~ zex$84kU)#OJkoqNix3Uo#(C7Oj_iFh`*uUQpFJHMn#&qyMitjWVsGbxDO#UBg%*9Z zFGtkzt61(o4EK-e>!PSChfEWiF3Is%k+^=k2t4*fA<6gGh{rJ61D|x?=@9V&yiJT{KN~LF-i4_74g6zoW#u7nWN&k_I0J-u3O!9BTg^k%)I1v)@DZKoG!f zQXk@RvLD^fzE%B22b8`Y8W$GVi|?p?;{Da=mdMqvW>@k0WLYmtyh)4G ziOh;Giuwa?G3rf5YC&3HE#2eO2dHR@s!8bF)SrmA_*c(xCUZvik~6T=d#u@mjk#d# zyr{Zsw=Vk5Gm9CA=TcGa(q_b)#(+FYSlZ|9|H!X3Lx&EybYFkf$92k=lI2y$ni26z z#BY4uK+LFk$r^lDcz>-~!okXd(oE-3H+0eP2GBvj+(sGbBvOHfTc6z0`*{ryM!1q| z&9MvRGj(TjuK^QWNIfG1GM&8Jn=#emyZ+6gv{~M@<9VXM!O!IbQ{8uBVKeMJ*znf> z(2HC@EC9Z~DrE6WBn@9Rnc?75e6;*7E!B-k@RQb_<2OL^&gWbPuPEl$ldf*(T+_Si zW`twB?j!dc>QEIkIn(dD@R1A&=>{`87XQ=4>zNjybH_&Hi0& z4#b&3zdm%ikSvq#O(s0co*~^F7P794qp%sgP>$xcyc?;B#p1nWL{xR->|TBRKe*6L zPSP`ih&3Rf8X@yp94R_6@@+VDggaU!>Q$1s2kq1%4z zfulu736S|99{?{u9RZ;GvU4IOuMjEl#k&+)+Rnhvz+hng-ATs1-RbmCa^X+s~mxKPB zFVcFUnhadNqWbue@?XEb8t;A193`L)(GYz7D{qQ` z1%HBH@MF8$4*NZQ1V^uIKl1E?kuX@d*?rG*OspQlyxNa;AJx$v*qjUK?*wcY5--WM6-1Fv$R{zk#IJ3owbL2&Fx096tE|#r4LEQ^QwC#q5marha)7s zm`O^iQu5|iWS+$yO*rs;b&(VivH+dUIYRpWyu2bT#>!QC^$_4{H^Uf&;ZjtsZ?<}y z{6EMeT`-ebo@zZfETT$-esfMLfg>vRkd2NDrMkK%Ndc7gYUy4Qsg&|ylDgyYH6*)Q z4vNvLpjZpF|8)j#-J+>#v$cL8^6&hG6Tv!QJ>i;S&=>#9$I@Mdg%|qh7Off&Um0WV zTqWd^Owm(C%kk)DbpJ~C$v)k_4ABP^wNMx1=`pqk!xx998nh{)OP6xZ@wY`t@-+TM z0m_F_RG~@;FrwR<@jFuK2Pf-(%b%Ov{66zl=oj2g2g1(DrR9rs!)rzdgjOHwszA-B zpK>jALBAyut}Qm0lQ{GLYUP3+VwDyHh^wBgZiQKSl{RiOSs{#<-F;fLAw}4j*d^UL zG7-MvJ5jVc7Ch1U9*>KI2migYKvcfn>=^YQohB$h~=i6*vE z#Dqj~;IZchtO^zVPdw7sjofM_WG1>hlc!m=gI(@+o^twpSB*3Ou{?-$l?Y;QvMI}d zc+4d6*3xhqNx@E?qLq*ZD_tLjvvxD54ZE!DEq=XmB-b%@d5JY7a|x=5WDP|q zkm!g0x0(vhz9~nFoA_#;`A1cA?^CwX7HNPWp7qe(VH0n)2g-e2go4-#h1>M1Zhu)4 zT^At=Ewzpm{{DkiPD!p<1oC2ey}7sCJ-pN)__o9xl29ZGT@C_Sg(ve8vbURqTEv+7 z2`3)++G9Jl1AfeIk!(R36xq~3n&WY^)fe^_$~|3p8w;*^n)>7a=z}*E8ps*EpjhLONH&iq zx3V`4fwp|+rVHK}d*F3Mx$?7}_)@&)SA1}SapRJfx%GTa(%~zSer{0+g&D*MGBi*u z`eKKKb=mmL$4vg8vQuIRT8(c*z?+PK#80mX&y0dG3Ok@$QFpW&zd%9L{%1Hvy{Q|3L%wo%lJo3`;$vd*c?K&)O#jBQL&cAu=na1ujR6CQs z-c^}k%tXM&wnf3N_q36UmbBx7a-Zl1q4jf|&c`S?iWgDwe&`ps$Mr!G95hNiU8;f9rrD;mk3qLYjn;^h zvV!7TJ<-47E4;-xGfK>5O~j|=E4jjF3^^0lcOU^jX8F*14FrOqjmuANN2D<`pj{rx zODHW=`Ip`luIj*X^SPu1%$<<>V$IYF?MYvZ%Tdo=g)?GvVZ97gJe7#b)BFcm?gX!L z)0X_w_w{PU(s1}z!OYsfX9C{flepED=G8F8^Vgq=--}x7>y7-xdRU?(WoP#;U2jOF zQg%C6Xdx~)h){D9y`hikY~Pg+H`GH@Y1(8`RR^|w{IF(SZUr4YlsMs|OeK?zGBU&x zLt0`m&2qqt_V*2yQMAKkUlGJp@M@_qU^l4-ikEr#+-c#0`=%PN+Ur6@Y4^m*C+&;QrrK$2->NXzv-@$4 zt^=_gpM@P@9Lisr1DtdU&j$H_Y#NwKQ~cSVJvn7S7ihYJXdXOaO4(P05$`Qz449sc z$uW&M-1^pIey`ALZPS4|Qnu!lz8?MiFf8D3Ry^+zhCb6nV68jYOkqEp9Z87cbxH!= zLgQ(QN{V;%$qv&)#DhH%%TZ$iD~~f9PjWO=UAhZvGd7QJVRy5tDZ5hx^+l5x=4%_N zej~s~B~(j(>JBie$hC`OB&_ib<0o;Ht~HWTVWUj;yx_8v77PgKMTd6SAGEYoWljA$ zqqL4C!ZqMarpD!}3JFUW(30{7eXKqvT|j!{VJF|-q&F}S*YKqeGh7_)f*6@QM_HEC zYmydNlx=`M!wilSD&B1@CpKKt%*coj2nsDy#y|R88O|$pXGNKo`ayPv;RmisT1&Xk z3ZP7sk!l_}sR(uosaM~v^{m@m)lKokhcUV*{n>}Jtk3NFZSYs-04=f_WfZP&vHL)q za2BAnY;`@ivJ(C)N&KlGm;nDN7G{G~JO8W(xKgIBcsMr!e;enfphMc~-*RW=(8B>I zk&XE``gJF&x}|3FldURC=v463V-qslfCQCDC9iZJ%C+hvIC>iuT{Bx%u-uJ$68-3g zbxZI7wHl^n@!0GASz{&EbCa=dNqHb9jUyyusIApBg7S0LeKZcR zL04*_c@H!^AW~|C@QM@fMS$ejX{6?WAkcsY70$+d4GK5Z5O>w6Lzw4MU;_g*T-?Yw-O1xsC>zG|Kz7j z7?ceXJ@t)_s`LxZa(Sid<-VrjX;uHs}+7meftalz?wGArgt|L%CEFqf;LV^?1=lxf)TlV^) zz3rWbgCHvs8YlUDrWz^oW;_>v3Tnw?Q=i^Jm6z)NrWYKFjeD<`?m;e5vE>r{$lv^M zQe+E$8B*4O;a=8*>QwMk+oqfn5_w2#cwsO7i4SAcB$(lS7z%#Q zxn8E63gU?>YaMmpnH3)kCMt;uLD`fd)+xfxg50oMo|}A_$YzuY12;?Wq6=eB$1HfV zS_=j=`S7)smkVX^wPg)gx87-vI!X0o5>E5b(2G?T{hO^kYsokZ0o*9pG*%_1tON*J zqc#-{r>;of!j%*sixxH8TF^i44=M+|Zz&r?Qu;NaIcW0!NOr=n5!zA(vywNSpHt0ULi9}@JFDNn?OO*x zITc~vc<%fq{B(cAxt@5oLM3mJ4@bG08jD#{`33;Cq1(n0OdjH*44?sa-7dN?vz_LX zCOHv(ISj#{B1QAAu0Bz}1~rh_HSvl*)6nmb1w8U(GyHEuz5&%l=q? z2Ak$IIl={)%#$F247)#6xjg-=8KifKBm@)9;>D|p?pCt zJl!8mn{uK7eV`FMMcIAHU&S$)<&rqI|C0<37#s8oUSE#K@+<~_EA%W(m&{{@ zC@G1c_1)gTUcWm;^iyvw+ZF8CB;<8ZKf( zCk|0lng6u@uQA}v&7%u3CpzMuaq6O4h@X(u_y#P5jG0}w8V%XatBkqKWU>8UvTT6z z!4a#XyPG!Wa5i&2OM@%30H!}=S6J)zi7G_nz@0KHKnlL(*c~UUIETJNUwx|l3sSpO zYNc*`4fEhUkuUvo9nb%DRq#}zk;}j{`P8NqQK=iYb`nD4)RMn%HFU$b9t`a&Dgau+ zme*xV300a%F>Hn0+139yUnC|amVcYgKz=5GuT|)ZKU(&C2v~9iiYy!tJ|hjPDLi|D zy_8xG!8fbeswc_%dlIrF!DVd)gi_){laPcD5@_Tn9L4?QHg>{&Ms27NNJ>YX8A!pR zeGL2OiE@GZp5X~Sq_Brm$YxbH_0a3ZB%&tx&+vPCTp;Wu_u$1Rz9BbitQE6*4Cgc3 zHa1bJ|Ds+A3DjzVV^yx;Gm7&7!S6^uP}(rvX1UbUoJl^hVG&h?HIv0L-#LmT@Kv&@ z4i5M7y-jQ6cYr2&3>c?3IKs!$5DXS>@K9gbwvZa`ed{p3EPZ)_?;~zR)YeeQ`cIFE zfa&kQAP+sJoNIbr5j#5y+6Y#~d0E|*_P?BtzS!j6gyzCpzs6&aso5(dT#kyv1R^JH zx_pNg>Vp{$O^ScMGnXYO`InKvTkFRw0o%634cN!rgHt(^9-7ssUjyoYk&?GWl6Ic_FT5|eX|p3a?AbeZ`x)jDwV_CJ&hkqdUvVMVz*RtqpRiJ?=gVxv?HMlK;g3oX#1eKMf(4Jrx^@Te%t>Rx^iP zy@$tusrs`1Hb?1Swb3me;^UXdT5XTgnZb&%f~YFO=B(4&YI6JI152^J`uAY z%B=zBtjQ0Q2eV55Cy~^PQr2T3zd@R@DRddSA`ib>^kyTIc+;5P`)%C}{>s{1(Wjx-mp1rKM7%=OV@6&oLzd?|UZbIQ zTr&SxkqANBU|`5+6gcWZk+$@X2or7DX+%7!FshjV^oKG*PJ<=|?)cd|jO(hITe>XI z5-eSa&Fk0t(Ev;rn|&4{vy}yZ5=zoS8Fou9-7e_FPFmh7jY6H&Ficij=hXH8RdlLw_DRQ!*>FwHoU3TVA|PYTIQd4e7`*h01Hsw#hAC zM^-S`Ynmvn9cbH;;iv&&#*Rjp zk~T97kNkpgGQwEMc;z$cxpPhAiZN&KqZU2KlRI>^rcX5l@xE@Ko4lr$y&GCf0q3Va@JM9b_y8CFju}O)ubYG%y&y1yWA?7prv676JZWi)<-+7?C$5JS` zT*DH~06c}jR>70U-G0F&^xcbviU6|I~AGKi{eEqd*@aA14&P z2$%5m4qleIK9wNceDPZBYY$6wWvQ4D=hR;uQ3%N=3}Pb}Ua|D=-ur29MkO5+tukDp z=50fJ=rp){BCie{o6B88Vdhi@QV+W&xJfC+LVoP6^+@Eeg3Fq}!<>nG{6FZG3W!#d zvp<5f2cGNq)Jk5(M-8M|47zGjMiL0D59zph?#^PX zOqXJPq(D;9?JUo=#q^iTvCl*3_aSt;M#3;mzV!`)t3hyXGKlS=72& z7EYhiQ;~}F&0}owHE_`R`_%fQAn!%kZ~XLmT#y0xiN^hYln0<-;regDd0TPOn(UEO zuftcJU08qd?xfgC=Q8OTHHEb>e1?B?v-d#JIZfNs3liHZkuRGvdhuejT=!egf>A2S z+0>Qs`qONlB(i1=_U-UPFUu7T_`K1cC;3<@rr=vqhk{&3r;s6^K`ILjPU#VKG`!Fz zKac3&yfNN-V9Eh&FSD|x6bE^1yp_p3m0c-;bKDsPAUicgXE;-r0!OLe zn1m6|_rNOl^V$Zzy3>4aJItCz>dC=)r)1~roW2#C%QkQ6zse8yFT@&^9{s(_tr@!Bb- z;JoL{N1tkr*ZfS^GQc`SgP~T2u%G<9=U&rxhX$=%V|N-&4^)ZFO7ggislQc_vO`7( zY8KNDu#YK`6_Ev4Lcx(V=VmCG=pv6ckzhMv*Xvx7ef$W^>(@@5Nw^Od#HsQIY_N6R z>z(v64kUC(9;V3!*BS2F#D3B7#JOAQWtg91fipzGz{-2IbV(fV?cJG=i>}ls*|NR<1 zRp@p6(2?y~8l-NPck+X5k?KF@PvYPd626}93_ubn-+`wCZ+Ra8{r`XP(m(;DVA8*G z{Wf!3n?)6O`~j0&|3oVPxdsS>w3at&0KD%96ripJ-mq|7ktFBezQZrKS^e_FL5ZDe zzwWShZlnd{;H1eLK+W#S`bvnjX>G^UD;kVmq^A8b>(%Y@lI9gv8g{M>FaO5)b%(%s zfz3mEw-9mJtkq#-u?gFJuunL9FsYP=Uk}C?xQn9xba1Z3@Tr&hzwGMZQHl6X3GKE` zY($=Ty}jOdcf~#al#I=&|Axy!$*)k?5T8OS3fZqFAk4utUJ#)Y$$w96XKh^}_;Q}N za)xXg*;#2}X*MrqsZh}Z!kRwQPZQv4E zL%>6}%(%O+Qx-0TQg~xeH85p0JOp+f#JJr$RCcqF# z3_qI37x`ehe}XhWBVJ`Xl!xIeM7TS=nI@O1c=$~M*B1x9XVD~29HCX7U^5ZX&@Bbz zmTd$+tTFTp_--c)xSL#k^Q_!_?v^t%{GoerHEh6$PgQ0~V3x0bekQLBRb$jx^xGfl zpjX6*I`tIO_wU&2?uvH=08! z1|L6s4|UadKphidY@JwCki$lMf(cE~3wU%X;P85lZg^Q5NPx|!GJsXds~RGufsa#r zuBvBsu&ZYYZH4Y2Rp3C8?%+0v- zWoBf3#4x6UX-kP7!57hYg^Mtqb+g5^bvHO}4h6}JDXI|1hL^u$%vtJ}KRZnC-7p)# zDDrsT@4;o$B*lWB&4s-VB6#DN#8Iy0` zZ(>%c0Cv;xe2Az{lin}SMi5H&@CyzS6O{#VLkVZJPFcJ1P0lA1gV#wjzcPGE0(dBJ z`|Lw*Y>K6VdG9wSAo#!unNl^rF+tO-;HIb8*+k4TASi4zW2((Ms(Ip_6?dKNN4#@S z_huFUr*gG_l%Dxn+_mWLT0vS3XBk-En57Tw3+umhwIDUMfyT&v?tM5-=`1tiIvYGu zeC8w~is6`nblu}^7BXC{X;myX#Fk$xxOj?Skx*2BP#nGZ(ZGf`@mOEnt9=!rfk-=* z^^ZveJ~j~-aBxC>F#Q^oEMDxiKO_iOmx`7B<)YJA~| zYRa#E)z^sEQ5qWq!TG@;>#gsMWH@$&k^C2k8}Y@Nz~DH$6id9_R&BS{QMUj5GCV7TC@{HqCaeB>hU~oVW5=Ft5*I zvr268FpNqByZE=SL~F~d5HEqis?_nXOM?v+@M^IB8ADss3{iAo4sG1DC$8Mht5JzV zrp3(V;6^>JhABu`4n-;mj&dJ`~W18R)<7TW43 zDsHoj*X0MTXu%`BF0I|RGagPA1sYA*`2?Ti2KwY9gcNX38<}P~q~hQ8T|$?f9-sr_ z+^WvQsb9V1(feBnY#m~;2w~%{Dls@Qq?{{#Cpmn7))FFgN{DypfmQQjKt|9-hRZAJ z;apW74jUz2R?hNs8RfqhXb{qDzkIh zt?xP{uXWo&drCNq<@#;>u}^Ww-Y@j>xTC~-NFg##BmZ4~jBdK7vwN#FKbqLj87V_^ zXGvsCOigLjrCy~0OqYJjqdacuQmIW4R`IRJtun69nR?x9dTkz5B4IP18j~&Jm6pqX zUpwGC!F+RLM`?Q4I2S_JJz)dEmHoYfzz%(s8eUP}@mi-e3jx9*<#@E03=DSYh+yt80GHghNMLwx_^g^O# z{?{&2g1zK7cUCiL0{0t5sfKe1G2h7LLYLz|e0VioiIKhr(gVJlushkWjAiK!0L^QF z(n9tmTa2gEQ|5si-Lt5SdHd`Z3WdP%S@}mW(^oOKnsS)zJE?sxG0+bp-=|}(Sn&AV zPiG2Mhx(D-!$M+|C}s}OmbppzIbMzdAX?SY)6+>;@5F|T`wX~ALe@Ww^gg6_ORTR! z`;X);ZOH2lwc-W?NlH(gpx7&F9QqObow{&2vvqZ;CT%EKF!J~a|8zllq*BOX zHfuVG(qR^WpDql{-=9@EX(NWL3I&wouFCz@C882Tc9mUaTRE?vl;rnh2a|mGAU7pv z`6EK$g`U9lEgX^aRMud-Nl?J%{Y$#7y{aRa%h$u!m2P8ql?xGBp3Uam{H%K!*j>As z%oirk=lM`Q?x%HzVs=m9=2EkJS#QS|%iv zQ!1~H1ByAJ-I7hh_%HxR?l3^=C{PRMW^lgv%=xn%3(EHCC@;e{1y5eGZux`SY z=iNqQKU71*j&DBU6{mNL$>8MevJkm9HHRkE`ufFN znX=6u5t}eDiTIh;o+AB_NzC$qK=s`#<2DkHaE_(R#i7$@=^IBH5SoyQH&ppcnOr8$>!oP&AJ@|e$qbrrgN9QQs_|1s9HgRP@0I?~TE+A~&tnAzLi zG$VvAG*%LKB`zYd1Uua0HYIV?2jkDeUn$7z7uyW?aC&+0Yc$D2o6KAxeVdP)3ivgo zTjb|)%tyAZT`!Xr?yc|SiA{0K@0}WN`)Fj(ONN!In*@b?8?}5FTl?+A-y7`s6VH48 zpv_|RL{4{WpBRUYydSw4IDfXVOoPmP@)M%?!=qKXSl*m)rJVoLsygEHqD?|N<8-se z+%9pu-~EavZzJ(>9Z~*V|hw^o{H;ZVk2a1yrXPDYhYj zG}{&keDoDp%GI&Ud*d%wkJ_er(_QjDW%sKU+Z|2GQlNJ#Ceptd>$+ukGy~rUtKEZWxzi2L6Nf^{c(^-4z-``WBWE~_q@z3wyn$_%`P-lbtOr=BvRJvaN zDU}b?IW9yVLgFHS7l3m^w7hwAHP?~Gmqh894+IvzX%b+d(EhXJcEw}l3d8@_PiG%{(ocnL&~xK93XHM%&$@QYv2!)b0qo` zw+RY)lr3(ZmsKsfGqB9@GHx74JWP{Qn9T=Ev-Z|dI23o!`T19(9G3RkfOt~%Dc9gI zm-I4Wcp_)P7>obcP~YAb96!S+@vuktCo?YTi*@Qb62&A^IE~=T(08+Z!PG6>Snzi{ zHB>0gK0v0tc#Q+mT(>)%<04$;op!gz*{r*Rpwi)p9(#6ykjbUOE8>OUIz=qgfZc#L zacukrC%>v9_-!p(qd!QQ)PW-Y6Wut{GIx3>YFFdB6h^sGqxuQ&cSbNNdg}74?UkBY zFqxA|CjWCu_lAxx{*_c=5}z$!O|T-Kl$Pw6^_+@c2JQ8Pd5D2%JefN063r8vF_4bY zI&R-r3>w0v0l}#+4>~6(IJ$WnC^3tYpnx%a$a76sp8w;3W|_)_z5Y9qQ<_q^^|xN1 zaN?Xi?P{5X=vA=dkU@-}%ea2+2*QiGCqex$c!VBq;q==pyg8^L8A$yBZc6`Yk9U~2 zPkHC)(wNi%53{%pLtOms6ZGWe<)h4BSYtq3RFbMPo|flnEBoZfkA4m3MU`!S)hUH6 zr|7a?Yr1&!7fB@7Ywi`8K=?A3oA4St5qC*^x9i0e{z$rzX)X5%6}a$kiM@TqzviOP zpIP1U3v}0Ii~r@M@GXDfUPcHc9Y3WjiyidxWkX*7WeLMeS~fkyeK9P&mv+-4A*o-R z&2HV^G;l=o68!V!#%9OSl>1X6KuBX=t5na1ex-5V`FBM>gHf|>Tp)UWtaBZe1a0HzbwIp3YN~{{OK1(FU2w^ z(;0JmIS}K$#Rb?&zm*f=oz21%uSp7{jI5!WogF3Q6HjW5QGXSeHMQCt%0&PC=EpSv zb~&N>sUuqSJVaj;Xe79lon5ACnti>Q!}I4{1Huj~hw3J%;s(P9!sxg^1ZZm!PB9p_ zY$0$SFX7^95KytZdOvPI1Aop^%%FfYdcY7%0>>G3VQyGyChalwzgqT;oLJszZ6CL_ zeys1`Ovcyy{t=YmE2fwx6@dQkM;55L>v{(#o17Qf%ePA*WdOdouJXw8?+2rJy@LF|eUovzt{{KGb2(X`oqi{xTmp0QWH`xYmM1imj=vsB_hv`eRRhLV)s?X-4^VZY%}|I(hHt zm~fM#X}>Fm{q9e1@fUcL9W@&S3jjO!?ksJ!e+2h*Fb}P6$(m|h{B!fc03eO~O+HhtApGH3H=0H=Jl=zzF}!{Imp%GLc#Zlbi| zdsz^>*p}3YKh41-V*9shs*IYjMg9q)p9?feabN*b<>${Y2Yn-5>X`yt9=EP{1Fmbw9X~A(8<5b;1Fv5*fJ|2aQ=M3}8d8<-N`Kchlv!mqkOj2jP9B)-| zPp?;b@5>!V#3^@JLIbU95t1D<>=dcs_vkyUJ+hY_ZS}Eu82#S|@C)#>l5#KyJL;XL z{@ComMiXmj)w#%QeUOLnPZu{~`Y)bKdTR4sM{PE2Y^`_3f*vRxE!HFz21i1nU=f(a zb?P=LL!`F5<*Sd&2V$X84TD}c880w^$N&f@$FR@FwMMzZMg+*n&NsH+@E2ZqAQl6H z>jHkJdz{arC6X>Z7Eempp(>jWiojJWrVGC?b16cG1alGGZoV(5o)jbxN-m-KS*UHhZ*VQ6Y6nWV zaOvnIQL)5=be~RM6c4aB-lz|4;yljHreng<`cgHgzjkTaH?NvC2i_R`M<>)o0>t3~ z`hF{=iIK4!;u6~udxddDC)BP#$lcx(SLCSopK9nkPnL8v{L<@a)Yyy#+r#F)Ll($@ zQy#S`d&^8IDy5pzRf0~^UBJtK7WSuS4`en~S`rqBO_Di|1C1m1jh#_c+mkafg5W3C zv7$(-Yi6X}vMns|3JvBnJe!YA($e>&&s z*6sBUI!bF(V&ffKG(-9*b2W!4Giw~x(@t>dA`G*=W8-^ewof~D1VsaX{o*&RjXuZP z7RUn6i=wx%yj)&G3Da3csd@2xwSnMaVUu~v|3(lj^x^jsB)?MG7Rd(*tT=!yR>|~Y zz?q&_R;%TIna!n3vUkqXzOvy_{tY>Q>zRIFY~h5olF3BNa09((7jbCoihKk_V?fbH zWfi9lt6`}QG0cpK4m5<;6kr#MSSNJ(>;*9H?@4(oAOGOq92-g>!lYJt#?RN%RE-NsIMJ0XLsw76Mr`a!)EeRtE_ zcef~2&UaeRFOR*oR2%X4PU$pKj?;4=2`u(9GYt>K_1yG=gB2f38*#{mmABcogz1s1 zATPB7hsmz7_-H37bYKNN4(J{!r#(l4Erzt3b3QwrwaG+WmTQGbX;n%@ zBUoR#vwZJHfT7Yt18jPh;(H`tY&7xq!Zi-HSZ`edXIkj1s)YXAHMy$o9E+1QTW4Mj zk{$AHhUAH_@l$WsU`z1AwEi#=KlP_-BS~}<`HnIOCbCTyPT$9aIMSpzUVuW1{|&vP z{BMm7E%St~;(C4To&@&{5a+&VL(4gYi*18CdyUsiyV4p9%Q!$r1QG0byn7*NMd7Yb z^j8#^eowYP4&cBAuka}^yfzR{S0L0$*DAB(4|R7Y+0AJQ88byCi~ z`BwkJguUt6xqX8+XRUYg7QCIiq47TC)wX0QKK37<0VhM@AGR@_@2FEDOrvz-(HPgz zKpO4i&M71pLzk!ZvDEe@g#DO=1D2)rrExC#Q@vxs$hih0R)7vCXY%Pq%so`L_8S7- zpAdY3uJx~cdU?;wK;nyqSF#)S>^4v&gC4EjH=`~>KNjo#u5WdXD}_dNv7C4`>+m=T z%Yw1~bC!Tn4*u)hU&(*Dp@JTQs4E2XioR*9u-FTId8`Oj?<$>Wf^4vRkYUwRV)fyu zEwMwoUye|QYC{*c-_=5oW0SeMo~|^(pK_7aovoQL5a+6{#EA*4otl^p8wV@Zv)C0e zes(faY*wUV#Ve*?e~JyBL3w&P_gi1LS-TcL!9%JRAE(@i&qGdE ztM}#MyT2p~aOr~Lf$)SK_I75$6rEIkF%K!;-%N|MMyt>=hxvGa3{7|L1RFHb#LCSr zJXIhewse;Y6ms=(Y>&o;%p?4W!b6h6P3i-)yU3L+yZ>Nd2Gp2NmR#^ z0ON4>&kIb$t9s&;IHtVyjEdq##TqRE8$~t+2_{w@1m+jt zAV_*0lWpt8kbnCfH^qaH+^)VYrFJ&qJ~&E1IUF=wMbNy{tM9uiFIWC}>_8^cb3$o|!V9jbC^X3oI|u`%c+LdveCP zd~`r9PDlw)xp%4KEY+0}pDqCk5~rWl1_fO{I#Zq^qRNRDmY2?C2HGq+iqsKuGAlSI zM49ZH$)(1Ds^9i{?P@+0cQfX*Aa}J>vL9}OMUogFnh%kD57gSXiqoX)8{^;=AY#i& z^2<)`dAIJnB;GaDy_=^3YkX;7mjDf-vOW;f`fSOs;MP_)=MV(n}oyn5^wK1E--&GIbO5%>`&zl-L^!D%bAUtT0vIj zM*|u@-fLK?zKs(pB9KO9gz8{6fIy|6U*Pl4kFU$+Mu6LFD=u25F`8V?U&AgG$j`qH zh-Su|4rgiFA3yDB`M{ih`?;3H?o}mM7r;Vw6HFwJ)y`06Y?EjAo3LjXul{kvV7y(1Hu2}Wx|T?=jtO$jAqoVs_reJ0 z#xrguneR&KpSZ#*mmjXsTKrdSuek}&_Qd93kztx&aDv7bE3_2k0BK24dUD!fO0xc2|PC!O>{gRQDnToI=rY56u zgUq#V-soUbpx!{v^7&SAbarxthofcULr%DahWZ$b3ud&>FIwj78K(&<4(TqIoJ|UN zmM~3Gl&zilUhd;u@Q^A{ECnchKng=`2sC6PiAwHU*CgR<&L&{E<575>jjL zN{aGdW?OY2D7BxVggqf<(e`bnF{WI-95mi8fNd;b?Nd$n=RWC=hKH#C6U7NG7c-d> z(2}&bSrqKz(fY$U5D_$+Gtz(iW%|r6&*>q3hrMo6Ib9?~&l43Fb$T*`!Q!_O{$FuHQb4hcFXjFb*! zaaup6!rYI#9+^WCA5u%{I!p6k3KxIHhdkWLGE1NH*$_>r`&R@9aJ5g&h%-!4wT+S! zPcDY6x%CyRF8)fJF1i`2onQTC0Z@I{BS%OcksurHM5Z9OvAnTyV*olSnBlgFD9 zMO-lkmi|->jYGRv7$RaEGSzu2#vJ%-`)WjlVzW1t;N6s7-EsA;C>hXc>&pyq#S5@^ zl{W}?6Y?mxxqs}C!P@9EuMPO*EnS^DwHba{;%!okMikA5k2vl68Xcx>M7NgI!Cpot;eCu7D9;&^Hs zn@RsI`=)ihKJ~Txbq7}7yPJF*1y4}) ztz)54JELd7%-1es4_2Qy+Oa{9PrNHjkBXbrL#85dD2#q^nt|Cp1?XZPjvh*!%J1D% zdR{`ph^+ijb}>YV!J)C#J0YDitZOrLbQvPO1W#fQXE7EtC#}_$U}lw|fOV`=?>Y>E zfA>xb82J>d65Q+Egb``gYY`UiK}d)%rR(zw*)_@{^-9`r(G{?O8E-;9<8kyUFUTM{ z?Wa%o8AfeOq7`xhtk{DBYuv5~zsX3|zuR01CzO=+Er!tNvA5RjF3orNakC<1A4o{X z^};nJzXak829cTBWZushD?-j~IbbI*u&e>GSZwa_HXzulE!lbyr@x_Su_i1=^Hat| z7`1uHDz9WHOAqOPs#JXOr!){31)7T$r~CNq@$y+P0%29Ok$|YV9R4$Yd0mK8GT1Ws zpFU;u%+Uf<_ZT!m=S!bfAdI8Jv4&iLy239GMZN_m=32oByVBC|y+U|iV1fH7jQ&}C aeEcZ7yL-&(RGIk^@TaPzrC2F%8TfyTU0hTE literal 0 HcmV?d00001 diff --git a/node_modules/terraformer/docs-build/assets/images/terraformer-geostore-9e09ce2c.png b/node_modules/terraformer/docs-build/assets/images/terraformer-geostore-9e09ce2c.png new file mode 100644 index 0000000000000000000000000000000000000000..9766a1e0ba9e45f938dac702a23b7cdece5757a0 GIT binary patch literal 50945 zcmXV11ys{-8>JaNKtOtQjV=jk_|q|Jq_lK*rwr-Q3W5kyqq{o>NQX2^Nr|F>fWSBP zJ7;mu&d%?xC+>6a^CswO|3`#RgO7%WMx>^y1VKZ?fc|*{a8SSWIOMLQzNmebp}zVa z4!!}_-u7tnb{;nNAT>AZ=k^eLYr7yXq`fp6+Q>UKC3%Cu)st?gG`eL!_TZ|Hjw;&Q z9)6-okQ^GTD#p6FCoWY&6Q_PLIH9T8q-Df*^fm0Dj@fcDRh)lhN8IBi9jw=2rae6#X) zBDrQ6v9(sx^ySKkS0$%8=%e`3*4paA!nl+o5bIMt<8un25?F9Zxh9fk^lBBOaGIT~ z_mdkF>f!y&Fo;UQ&Mh0)L8jG;`&|2ZQJCSCpG%sF{+1qdEOb=(k>XyMkB=z4Vh)lylCH z=;jW4h@%&W%oI?Qq0d)V1%Bs%YEgs|qZY}AXIckfUK_M-UmsDIK+V~=1p}!?ghz?m z0@O#WS`GX7=paNz-6>=1Y~r8+L!DwMYW-3EE>{IT_ueD>|F7Yk$%rKjs^tq-(ft($ zsmXcR%8ZIIM%Nye5U#5y17t6pKEBT7!7e=5y~4O&FR8aj4b2M0(u*E)P77TpA=|ql zI0pbOU)W+?2qKHmXR>z*~&e*>VL2HBso0qX5*zJ3W}QsFU<;f6~apu)u6wu2RCyl75r z0YhTFiXnW=Ulx$B0>-0Kyg3aDI6oYyxH=Z0MtmIKBklKyOj_T@+m>c=CM^q%k4}8R z=`R9_Ya_KF9h@_br>-Q+6rW??OHd9*U!-RaH@IcM>t`YC8to%c z%1ZNT(|7O+{TlBQsGUO1yWUXgs)Is}IqV_d)<;8Sr*I#c0{cRiru!p{h!x68pAa8BAuIox9`a4z1$myfK!59w55Et z_b!#R;@g%nd&jVB9NAGmg^j3nD~Bxr@4HN2!;3oVvCl?aW}ab?V5g0(lcNA)8lE?& zR>Y9R1l+H`+Maft>a}=AgH-DP#ow^3;lwj6<`Ji94FX@#s)sPM>!f_rlJ(WQF5ixQ z*UpkJc%SK*JP+~c=rApaeDQd_WU44=2*QiienB(%zLAhoINNUqXC3ZR+O?LkmyU8% ztVGZN3;MfEsFvrQpKik9W?Bm7@f11x&SkWQM=e>~>B_pjz0oo#7bc9E*St}@f$kUc zxXOO&u{h(Xd|}+m3)N5a%ipQY5gH{3uu2!rUl-8BLzyUX-@HXczgt{hgxTPd(OeYc zstJfDBql9hs1p~qrI5esr{1M2>q*52i19pP#fFl2h+A+FZZizJwPomF{55sbsUqS$ zOhB}PcRzI|QNRKj*RkUU=XhAZUGytXa8QHCP~X#HrKtpZ^(O6eVwCfv&Y~a3WavuH z8-0oJIUR6arDa!vz@-wgCf8m6x$%V*rLDskbuNv)d+~^2~{aLyWxdXz`ww=j(J4zzUmDbj?Nb@dGAkPmvWmm zYzLkx!E6D-Q390`*1Xcg!zbQ*tE^Oc34Po3r=OIH$joNnJmn+5caurr%w&;kcB)_o>0bkp92WK9=KHkR^XX#Ab8{WwBSQ zk$WTS(qX!jO099`EbapP8~y>Z#fGjuje4-i=+|(m!R`Dh5E{7{YJ%E_VO6zO!iJ^ z7Z;895JgS)k;>ZopQ%>u4ICbzkJpMzM#D`BwsY(=Wl?s6#S&`awK;nQf~MzTnMkPE zl>imfUtgQOi|kOw`M@&LV71u3DnjlTmg-@fe_4)#=+7gCdK}W?`_)-*XnC%fRUO9dz=7qs zLu~T>bd8+TY7#7aB@0@%)XPLiJFiE^wN{YBTFah*h0$s1od1AIC1Iqf)h==Uesn|9_#B=~IK@=-fq&M$Sx^>h9}uk($UbgM z*CGD5Bw>?CjW0BJcsw6)?S0(_lkM|jiX1FpoeU*=4qUw6`EDcXFS=VbE8UYV*EsKz zLBE!FZ}`p=m;lAVqQo>#v8YJDPc9G@oOR`Qhewnlia4{2_PYG4XFk0#PddEJ@y*Tu zEA6B4Gr}KJY@{4|!*tDnW&BCzq&5~moBxD%sJhc+Xa?U5?AO*!cm#X}oj#tPFf~>= z9<7~|GDrL-o=Ek~1>|d*kb$v${<3&F*lcM-cfbw59{Nlqn=SQ@O|PAPCA zGRj4J>h*Ab1W{ar-p}jr?wDkx=SBL@L%0~#3YwIHTsIy}CF1?ggJLq{OMmJ?qML*j z?Fy7jp|!xgtRD~mF^18DgQjNi(l)2hXIX6&>Tond7|f@HOVsL6I5NXr%RilG$ms6< z%vT8shR-cxj(xY}BMr{zS7So@1FQr_TD939RF=D``zX~PwMRtK5#SGC1oNyEM|$H$ zR(J!7+X^^vzCEYg#TS%$u$=tJfiK=?#wLBxzNzIQ%8$r1GIdYqk|^rD zNoJ`UKOh)TxE0hf>Nt9p%m7#v2=gf@TD!zor?Gn$NW19*Zry$R29WbRK;fd~8~X-h z1F_z;YZ7Vx1!S0AJn>0=tTDc$)aUbxmyzVvw{sLAzv7iB zJJ)%R65X$)IoAp2RmcYyfNQPCqpE2&fBWtJ3w;Yce` zjOnf4jZ+4Dm*C(XTF#zyeDLoguwCL24@L3KTXqh-pH5## zZQTR2hHJS~PvN8mIs;gZ>c+!$DK9rDU8Ccu>LgP3?k;?uuy>3#hGwTe{$sQj=q?Kd zH}pn4Ly9Y}ppQ$8Xn1-*mvZVTT#{T(ksTs(j$hwCbw-a2!3g@jy;|oN;4e_OBrXs_ zUbBp3`bsVsqJgpL0ad4R3L!{z?5~vIC&?q-O^Vgv1Lv@3$GKXX4bfSF)3^IUYa5#X|z`rFwiP7^RS)^`rCk4`B#^jgAAdd{Q(V#@N=mM-MU zJqg@5G8gqMn}42VrByDlk_pEsqbFDLlJe|&+w%#E)w(_}nOKqAHsb52u`RvznVtpa z$TTgp{)7DI!4$Yko~lag*(7_z63TI+zr3-l7SCpzxW2qGo}1MsnOFW)?^By`?sR>F zosrNf$+wr|{pLfL85XGoJGYm@NZgLe4WXt;{mw-0Z;2YaJVUu5fWDpQ!$joTKxVIk z@&!l_%GnIyIM`4KbkJ=w#fSl~10^pH z1Fb@}$DN2|ws!R~t2oZBJE?%rML#SuS{Z$Wa82xFN3L?n(J+2`r<@67zXd@Z*TSrW zvJZX=Rqxm^XcoNr|^ z09FJxWVA)=cYC!N+u?i3XaULPXfEz{%NgZvt@b$In6 z{nxI+`wgbICOMn~-F6f}!GX~^wJwGt#b}zFXS6);zY$+|t2Y;@ldbBxFZ_pB(wi?~3t}UkMY5kbb;3C^Elq=8whxKT5SdbE$ANL$kn%NhDpXh>am||x z_ui>J`gZM+YGd&y{73t$a>QAIbbmY84)Z?+?*-V;%|_d~!H*R?D0UlSZmnF!?J8D( zwJ!8!;omWpeEn#ot>0bR11yT@wVkzT@99Rr6pqw+{0Ds~v0;8!5YDvvkQwC_Ls;H9 z0aH>4{TcSiuWH~!e8~sJXp!z7RD`^9tBsVGW*u8zK zAXMpJk@A4GivXquBxi|G2C9emLQ|p&xpV4tG_FYeB@4p|C2FIJ_y425IWVOXpoce?_D`q7uu+xu`aUZ#Hl`I|O(xC=tg1MNnD zq|Sl+h51|A82{YrAZ+n3AqeWfbtiKK9NP)~KyxU>Zo4~ARG&0(zz&iWX{QKkPF_Uu zBY!v##fFygczuFneO0N!S6t7=?h05K8-H?u^J))=(Eg1CNVl^#`b2Y=5STwb4hnth z@*a#_+!!IVZ~or0{y_g{u$Qai_4u&I*0H9{(M9^g`%Hgp?al*%`Vj2A zZ-dV}jygue90dYQo{4D^sQj6>p0ymr8en~iZ~d&!K(3oM=IHULcN%va0hRDG;}ueG z4jlZqM?6=*x@=dvnc!7MMiTNs%l=l$;$L9df)}(7z6__Ncu9=o=ZtXX=?wWRPM408 zRidv_BDE?Kl;Ubp+b7(%rH^iWEQpWy-b)k5izw8kiPrDq{h_e9t<#i=d!)3MyL`|b z(mpIx$0=QJMrbbN@$Sjbi)!h{Tza%*9TPbbRGHZRBRHlpc~<#KsM0>R_wMjRA7`tX zFky0ANM_A50A0k5*J5dNe|@vidZPuz(gPZxwvmiZ)4KUraeZ{Yi=UuPm6&P}c0$BBj9ehxW)=xvowtxuclvebSqahSmpltINiVVrnLjovoof)QSv{sX-323btx}S zSmJVGY`LdqmyAqWR?Xv^7>$fXO6Hj8|DD^=A{N2dqLrHA47+Pju6TPiH#=TK5u|fY z!+)y-l-GDdGI9?C;Q73U(CXh?1Fuk_T3z>j6eou{hrKs_B{p{ z@1|*%f;62+t>~RRT-ILZ(r~Tq$$qgU63uI)ZHsZw-is-vgZq6E1IyYN@?KGzI!@DQ z3~y=MkX&thbM*=ufwQXxv6txNf$5i8sG>i==;f(wmORyWXs*)}-G>g#aRZb4 zp3rd6aU9t$_?FfQ%*#i(-C627@*H~0@AVn8cwXb^vqJ1`FB1CI`uUWal;~WD|0P#28Iy-9E!D|Q!hoU6TQAlO|!diUW{m5j$vNe6;zk0NW-9*>> z89U~AFn!W#(epMES)K_GL8CVVIE*n;>qo7$JPDp+jexOrLf(%!M$Hx@1N(7W8 z%l4is7~AdY7)kKx+KF?&^J{lL<7@yiOs{$n7xv2R>K?ft} z%QNw%lTj8(N|u5tqaU*0CKk%xrZRf?Txf#b%~Upb1J5S7F!R`6w$9=7JjiunOVPAd zyXc>!4XCp612dt9O0-;Ur*+LfgA=6L^!Zq`lTLCr)a*NL2P~0n@ z8(O|mtp=GlRj8mkuKS|Bg|^Z@``$grO`FrC?>h-qp6ViJLeqp58*EVeC-w8vlS~Y% zLk6~IbqrHW9V7QWtfO)kAEx(YvM#LLV$H5_<_*2kkzG_f47x93{t?bH$N{S^J)EyP zNu@b{IWo9)Px>!JH0}rcdbMOi@{)eW%&TK!{PY()#BEkNUBH0P=-@3s;Z?M-W2)H2 z#-=Q0q)dQnrKgT+E$^i9NJy>9T>O$eQ{b2#r0lQd}_H|iu8blF&g z6HKj4QI&R;tu@vEpR}As%jO_FpSYV`pZBAx3IPr|cidwWO!zd=#iAR%HXU{FWa1N% z8P-@FXx2-l2gr;=zlwGezU&tcav}DPJC^HOC1uMaB0jdLk$l3re5d#nhaGo;vjY2V zr`~-CX0}xG8>W#{ZQ~6^?@x-|)05(AK&2D;EZgFroA}`9b6&1)i(!Ded&dD^0{qZQ~F{oSG{L z9`yR&HO=QEgf-f)mMnk5o0##@Hp81t+X2bA$4!Flwt8FDL-MZs6;D$iZk037t{?|;u$*2a5oQ-XFe1O)7O%fxF z2GAs4yx!{#u z@df|n%x%|u*Sy+m{6U(JpB&;-C~*Q|7GLqLcoSo=dH9S(dM{EVuO%SvA{M10MWYur znaK-C=70P&lPSO;LJMarYvfh6m?XdzXN`G`iuvWMb z=I_{T^;BwO)<_2BT8{_}ygA0>phOT1k--Zp9IM^V+aYR9*5kodEb%SR(GJhjuoA3+ zH_2ktP&mm(^_3-GKxPNId|S~Y5)GX~x}5Wl6Q3~H1>9fy;3;VfsVQS$5St37^d+g5 zx)oDgq}&6Ju|>=`dD~-cs_%o7J*{>d!VOc;UL|P`Ml7C=a9Mk6@bzuH%!`WmeF|;L z&!EXa{y^XZ!ThIza1B+a5^pw|$B3JIB$gs3C~X&G>?=9!ntg+$pFv}`O=BipOW-dJ z46r6fgBB-72^fr&EffMNB=Fu25ht$c@q4*)mwqdOYta@6%O>yLH}V=hR1P`6bfNk$ z6M8z?@KFE$xCG}mR55SiA6;yK-;PlceT&Sq#HK9W8zG}|``%XQT5qULC!RetIF(k5 zKH90Hkq@ARA)PXi|G|!B-`iEPrS23>%Oe&BpQf$)FNZy;w!7Xj7bf+40J+Qz9UVJU zeT+X-Bl@d6DzT;WK*R3)MS+9G=ZQtxFTstNOpSG{<54ClA)Uy!gU@nxo&^s9nMz72 z%NlA+T2B!#ZUM(jN8m>OkX2b#aq#PMv$8l~te53Sr92Q|fM}nYRh?p0=FQyyp~Qp4nr7!uk`PqOb=tVP&qK7RdgeVNwo+UdHm9wink zU40(^BbYpnbaMe?j6ZN^Y4>szGGgV`@UL0ntf%1DOe^d&uk&9WDPIT2*PDj`G$VBO zcm_T`IITRe+YX0GSip1LI-*klvCQf8fF?^9@O9kgY7J>ycno2U$2h1n-f))yo8rje zYU|c?;CLOZ9NK1i+?eM5uN3-%uFBXbk7LmGQ!+z}cA_{gxAMSV0@4hUyJM~zCx4}W zy}K8FWfbk!ib*>ocRanO@fYL%irl}ueMeXaAd9DqthVrr$#k*5Rv`D*mL@|$NqL4c zZP>ri&5Pavz4aCBDBVX7f5pOBJ_@>yYOxAy>Tw0Y9FoY{q z?k<-7yHD=Ug_#w@hF$V7Q}K&^SK=F$I5-ou^7FlukKboEtQP*X+t6$sluw|DH&U6J zfHWQ}dqRrtR>>)0L}>K&wmII$)~&@ZzNzC(`|9+2oxclJnr)kR(!7fps|Vnp5$yQC zQNWRN3|}Ag+m_IJ@@6GACYJiH;AlT&PJS+bt4dR)XtCP^TC1*B{JHJ;N)pcVuZ)rO zjw_i?m89(E$2=Q=bW!GH8xx$lQ-wMrcGnv(u6Df7_|*#B92QXplP0SPwh}d*2c{}> z3T-MjKvJY@in zjxVWsS>bYM{6Crg6J{Ds-F$`Ik1t+aTbbtwButIDZ0mTTyAlA8%ggP}nkz~a=mcgX zT=7oVOkDoxbL=7P>SU^D`I@Byx5R2Mk1*=-Nma)olOZS zCm$n}OMkCm0x&zzL@N(P$;k~mYLZkv@j3OwW%YYgw3R-2oocVk5hzxs5d}T^0^7sqDm`pCzz!sB@!3yk3fjp0pRc0GmD&oIeQoADRhtu^Es(LN z@aM-ci)((xn}X;Q5YJc-t&9J zq?)u~Z#=3l90TZc+bMEo@UY3Isn(WW2nks}s1VLC+h6lESXM0Y zuFeNFqkW9+85zBV8F!|qvg;|iiW~g~l{^pT`QEVs{T??x_T!pAOF$|Y#gCm2Dj#yD z7_2KgVjs$S2nmsY0p~>0Jrbf+--?Z3K8T6D87+~cV5~Qro@gk{u_1&LOCSGe6Td*w zVd-Au_NA+Ar)2y@KFRim!>*qd5$}IRsei@NGxx?OSU;fKJ%ZO`LAH2|irVR@gz=w= zP#gMoaYe{a`JtUXmLI~H%6ZX)ApXN5*WlQIU31p$xnvU+HRJLzF*YLh1BG8?RhKOY zqhP_;>mk=qMt5pY#sB;{AJ`DxRun>?7|ud}Fq`Z5`N3L9g7LUibFY8}R(wUDW?8Qo zI#s8FDj%WPSb8E>_$~CF$<)!E82&Au!k0^M|GSN1EWGb-)#$2A*eegA*EdOg(M87` zS$1G6VKy6p8I+nPa1=_9ItY2+VXV=sRB1RD)|=(mnw4~bc;*?=Pu6Qbt4u5{_>CBE z*TXjlt>4C9)YW5bj!uNbDMVb5YIPW$|1EwN_!wLE6b9|yk$;|3c~6HGT%~|0dr{;S za}>-l`+-0~x5zRDd2K$m^M**|le$m-2V)hLV>}_gfMd~~;Y^)B!<#2FrSu=_k`!>m zh!7U@nNV!{l3S;WfD>Ae-hvA6l6Nw*r(<07Z3x`sRjpuG!sr~HZ{gTS{8^74EMRsc zBb|^<0#6wL(RIhWySTV+NH~qB8Q^%6?EG3}yg8f$=AZA1Yy9g#(L?U==M`owy5=k% zyBgaeXQ0s*vGWDHY8`A`j;%LrWmPk$vk{4RDQ{G8#i!!bb^OJ!q%JRtkcbQ)l)jN$81q!A*4 z^y#yAB`1KoQ&G}pY-yKpyd^naZP4i=xC<22q(F|cusCvrI&GUgY&-hP9$oIP6bvZh z&K}VC!HcVN!PFDlB60A8h{lefW;ockbe#I|S4dYj&X5JN=SuRv$|tm}{H<*MvLrzW zWcH2p)IlckoV85^!yI$S1vW@iPN|h?yJgHmLMpn&Q@T&gEGY}wpVAx)5@=ennq^>` zK1zg~eF&ZWBcpK`7=OHA(2v$H^?3NQU|s)eCs<5=Xo-f0V&;1&arswxfhpy%V`0^jm15MXOCv2ecHA`9`NRf0|_X_#?1TA}tRy z$n}AJwUrE}Te$%hw5GyXnx(9GcgBTB#Ntkjb!#Uk9$FJ}8oaW?dGG>3#sB4+sdSNB z#_6wRhH1R1*dlFu`S?*8AqGyoJ!As=UZlSX3rf^F z$`z4|On+2gnO*AcDZ3J0|Hgl=uaqQUAepj;>7EE$sSdX%uu*7uwc8QF{j5-w+6f1% zOVP@+BD97l*1KbhGv5}$wcSEdt&CjUCu2ww5U%#<`+)nSp4DcCUwi3!z3DB$OaVjw zml;$UwfE@+@0ziOT@BUwB)&t2Y?1A~u87^~E9!|3La!N}Pp#_gh~*VWYd8t8;`^$# zj<7}bDy;pbA;uBfGOo)y!Hdu3N{2RZBs8Poi6bIV>u4?=)#JDusV?NOm}w_u!}dZW z?$P$|bjcFS2aMScM&1P()I7<_ftB1l5&wC=_5@R z8?)01xD<{_h6mZ&iUN!N z?aXmAEohzckX@%xkp$+Sm_Yc`$ya~cI0Zb_C9^KjaUejvU1C~m@W%Vsn$%->j?Bvz z-eDkRAZvkp$9wU9zcu8um|}~q7jFr>+b1FJ(kH)q%=b8cw^XD5F>O@KXV%SoTn*x% zB|YVd4AJBD@8h`Qk7LXSm>+%62P9IOhrY}5yv`#coD!L}lYJyTD5>rW(Ge1l&h zq4!qFW=M{>e~gEYg8zW1BjPc*ZRkzrd6iI?b{nRi5m$O71%WrQr@bN1N<*Pbo7!8m z#mZ8>VXcWyeT_2G*7IE3S!VXZzjy)^jfrP_oJ#kjhng&QC7iPvr`ZKA z&6ZUgHK5dhKV5Owa>IfVT*EDvR_`}{u$tIw)PO#GXS2n=#SGCjHWrizDt)?TH$o?6 zS=jwFGCwv%c1TODV9QlNc*l%Dqe)qHIa!#2D63%wjo80^lE<$r1 z&VhcJ{gmxDmdj_kYOq*jbBf^$iF0a1jw^CIWdpo&l9kE$2Jap@f3W08IXo1pWJcVF*eUs%r69o0H~7(7Cw&LJ)A-RoZeFIFM&W`mY1h9R2D zI~Mvx`I0nKfCQb#qWy6R{qHxTe^n#-T?X@XhJ8yeV2-b8wKiw{D$=wP=AUN3jNR(l z@!D{k@;;?0z7fHT>VI4Mqi2!P8$2HyeaD_bh8;=ZnUI+!l-tsn&5apcYpnYEBe>9~ zR5PI3dr}|^C=bNO;e{%3!Fg0Aem^(9wQxa{^iY{7Qf$evPmJ!oKc4KL5>cO%X{mdG zvLLJ{*m;~1tomF)gqe9FX<8_vyE?f-kDJaBb53Q68$CV~(;VhWubs2UQsSEJ2i5z# zd$EaD@@tMQE`kn88=!~e>^TtT7q%q>#BG$)&SeJX z8h`UTBGF$XXay=L=84;Hm^%}7@!pPm5xl1wVrGWxQp*fm6lmWnH1b~D`fePL96G7a zzVwW0Mm79pTBS*mJ{O9kLfZu@^+poe6}sl3WmvU4)#1LBTH{@tW*eh+xR^n zpx1x`yl%6S?fdY)Us8XnS(rM=;4yGi5|BmDPeE-Lxxs`fXww8b6!;Ifm!HxTU%kwA2A`=}U$@VL&CR1D?3(Cf|CC>1~pOFj99NVw2m!ja} zZRl@Tzdp(vc9mBZwz3%vlJP>}XWFEG=3-_8M>7`Rx`L8j?neq+-X}I@0fJBooc&En z&S~%FkVyrl&?R}2TQsJwd8iRNheYhPi6bpr7!x9?jXdDPMpdFIq>}c_f;2O zkyKMWdtr~-PBG}NB(DQ!?7(m_D_-*j@}La2LL(aooTpFyv^GRz-rn>?Y(<2$X6f+! z717t#C=idynX6a)OkJ7@#1+55S$~rOFA!Fpq>~b(EKGBMjkQ=HKL*Q zd-7k4Igf^X?P4oO{v)_Mp>rZSmc+KO1HS98be;quI*>F+) z@%t}*RB>5H2xQxwTxE)+g@h1v;N^MF4f)WqvCzjG?R1vgsEKo8+hM!KHk{RA^_T1O z_gKK=DN!4xgpD^9tyQc$|gx}w`35f%D7Pdi#xULGXY#-Y8b@Gxp z!I5%5l_5rJ^`11-7m=B?=6W-r(iWqhzAN zOl#d!K4^OnB9VCFJ_5=beL*pAcufbv^?Y5hFn2g|f^*>w5Z=oBQ2x;&gPjnw#&fQi*=)v3O_XaT0&?~+5ALg zf|Xxe!4X{|f4Qh#7?6zhHkQDnCef}>sF7|sF^heBJJscv?8O0t#MJalrMmlZ=s=C< z^<75(=pG<7&L4aEc!9wvCg}xl`^=+nPe646)Dw_AeAT*jx%G7p(Au1TYC{ePP`q{@ zZzvZC`g9HFfkybRmZ;;Dc9EZsM|P^jDSlGNSc$gB%5EvMLQj9#M@rtJ6st7XtF!Zq zA0rJ*=)Gxsx6Cy=O*j12`d9oz z|DAckzbUzm8(f_I=4a&D)#be!CjeMd3dq}JG#v|{@crfWim}$8fW)PeM5T_QN--j; zeXoUbYlO1*oQm(UbJm`XookIi++~k#3+Wp+_Atm9o`Zq}hXv>3*n=QjYo$H%UDi(< zIp{*gRW%F9c)AGt7DFPa=CVZ+EcIWAU39kgu;*#VRWy+#GJ-2e@Kz*?>|8V+^P^~d zRQ``84=L^9#+)q0Af5wx@*}tL1IQh4R-<-Qt%a4d|2z6jkpA&e=K4>$pZMzMp3im} zL?yy;*^HODSE&8%tp`}=c5p>Va)p_)Xy&TeKWk7|?FllOb!NJTDO97f@E@S5%fDA8 z)Yrv=IkAL6vS4PP7Pm+!zi`Fv)sGlOsZNl+OD*dI{DsHdP>mFv^#HAUylittb5+YU zAI7R7=PsY1i*GX3m<+jT2W47a6&@C9o zt6|P8tTOqLc1&odL_Oi0ygwo1ETn-hZ=Utsq;$C848M)2(jSQE>;R@u;r4(3aKio< z`$c2Gi6gi$C!DX%!7<}|(IU zOs)&ku)6ZoBW)%bg7$Wc7EG>KsrhVH$0e6KWU3omqeT!sF=V0Un08~+Ke5GG(B$&8 zD`h{@4}*&3^Y(V-YgeJ8)11ZNHZj8ExBJogw&0aG9;XC&n6u=~hD1yA)x}_y7IQXv zi5t~t^B{Im1Af(#wf|pP%YgknY<>g{wqm|KQH1e*YEh_M368IVV>!tj>jG@Vuc8~p zt&h>Bgb{#E9*3oe2EKB|+`FW(^x3KCc(RL)x`-nm=+kD~hr5#d9(zq*$GMQQWYBBs ziBCt}&8r%|Bz>qCNC02_lyPr06{oAWTz@yJYhxwA+QDke zOhx=6Pqb1jUEL_BPdKY3p-q~6=E0O{dT8{-`OnstgJYFn2#m?p#EeT*>-xtp!RDRX z4qU5Qo=cO1r5QP+oU<=LMu(b9Nm0c0QjNQ^C9W&0gMtlgi7(LDSeb~O!IbNUb?#c8 zq-9K|4u|)Axk)rPk+~Z`vcY!FC6t^qw(s|g=uY?3He-+-gz8_n(!!!n`1+rI4~)=D z1u~v8w-;T#6i=L)hFZc9;Tao_hc-h6C{C3lj22P_MdR{OU12wE* zLo?!eE@a)-You<%9`h?}B}p>Tv%9XsDGiiC$3fVvFyVL86S$(GOHG@BTQb{(Mb~Q zkA6*ZeWlwVG#L{cgUW^k8E!QlK5P%| zcc{h8%}oq%_@8ABpTs{T^=;sup3mu|@4p-+S>Xq8DT=i&r z(Du#3$1ZU6^`F_YG~>-4l~cbm z{wj|uqPDEc6o10due8xt+SYcC#)N;hxMDV7ETgUh#>ZfPc325d%T#=xb9(q$O!GYi zX5TT@O!PTithKdyuau5|tyOJ>cT}!U@N?MqD~x(M%_UlEXmx{p3LaGs{X>)C)Q;-g zvqluhd+M=Jh!Q+pBvKn83dX%TVZ|b2f~2)LSI01SBgL>mKiHG%42H8U%asEawvz(q zuWkpg$a2IOv|7YlnwC-+(}WU~=&DVs=a#mfdnf|;uu)f&X5J1I_db3&#g(IB5H%j1 z-5nqTK^mU2K9U(rcgBj^{d1EFmT3CQLy~TVA@FNcA$nLp0TpJ!h#AWU32I zP1SSz+wQXaw$r{nH;$9NG|a#cP+>d|LwKBDZ_#&ynfHP**W~gB?2i4+14_lX#c_EMg5BeQWYNV<{-cm-I+-<5 zP8K7_H=%dpwh5-Ia`}`9lYlR-Pnq|zcxqdRd}-vrKNHW^m|-^tT>?cc{7Su+lo-76 zSBNKH+|@K)@VcsC>8%uDCyqIpf2((wT*l`H-yHq&kQLD0`ug8qShSWFkp? zJGQEZoF@7AXTp2ETQ--b2@6*STG#XXn{uzQE;2LfG#C_WDEe!j&r-2pyi7BVKdetI;h&0W80**70$Mn1zwy=B+IutfUMHf!W*`rBPP9>M>dW4Ct7)hqR+}PrWkp}2WB;VZc zC(nA*qBp!Zw}h!T>WZ$hHn!X__BcG4975bvf-9EZ=G>z>3nR}825hU)cPSb z_^%SI9_7dszURke%1F&4u7+Q#e6IhSCA=|)Ew ze7$q2Okre`)MrzZA~N&Mz7zPnOnDfk_r{$PjM4#<875K2+(lRiYYrZ-! zAiwyxZ`F=3KhLt$63-SHh=vg-Tt3lRE!{Fuv)tG?iN`A@>^I?4%1@xgSbA85zEVi8 z>5X3{BYZV+CNUb>@&S72rdl(eWA};SVXFQMpA)XIq731B=@|0YAlmNu&lSso{5vNgKdA5b{E*3{sVyHRxeREVuz&rq4M7bEvmXI zkgpQPG1dct2xSDr*b<7Ck!yLI<){3T*~DT|KLWRk>NCPWF3=Khljbi>g)p0j*rDA; zg`%#w{!Eie-($=-t#J-q5?3@K>E3b@@k?N?V;HVulx50UW;*Zsa_FJAZgh%{~`uiuZ>w3|5FAZT+sm zZ5(5jG<)WW*JI%ji;w=BJb90}zz(6bWT{&^L||X;9ugN?0pNikUAfEbK6>-w?yaT; zd|T4gVkHlAXINPXxcqWtcXs6JM((Z*RSHmjdy(0!xi z>mO;h^Y@>mTv?;XvA<(Csx#PN-eb>DGtVaiWm9P_uSb<8?oj0g1j2d(8pH*imC1s|1#5PH_4a#uF zNXkba+?K4n*1XvyAz(HSy(M2nvKV$(>KLXTMjZWK#iR=P$OujuJ98XmV^XQGRI5(@ zZmNyENldn1l3u=#aLmJ>J%x$m#J1In3ZZ2;4a?8pO51dp;t9(6cbu2FVg}X4Ph}J2XzkSd zw2$Gm$X3~>?m$6i^GR7%UPXL3crmKSu9FLyZaSHsel_XdwV5546TI{V3BJFt68w7u zQ8B=pieRRHLF9}YbN$m)n#gpv5L02zPuDV_Q>tbj_NRYhoeq?Xes~lA z3nyZpF2@6^G(pU~!is#oda#ySp#$?p~m{I}~@9g>UcY{rz{+qAAm{q@sP-u$yYJcN=aEfC%9kJ`&*(= z2anTNzSc$;SxmuDt~UX+w6!i27IyIqWAPbYC)xM?s?AOI@`5cdCQk7lRxK4roU3+uG(eBC7g0wZ-2Q$6=SDn*&|k@Q--{1 zrowG57qgBuGE$vVI<5BBfAQ$}P`SfM?;T0Ojyu8J_)V?Ha?>j<#G4OmIC#Hx(^b zlK$6<9Vt&9!$c@b^R94^N~&*KyQch(K?4#(VSWzX0mG#W%0aE1bh`-a5#3RP%4S;Q z11!o5$WO&M$FoKjyKc=#KYUo=#iupwnYqm;4#wkzB{-L4Y|oYQ9G-fIup$al4Sn)C zI1K6@JsesxdXepLRd996S#FsEoCjdAZdh<|poEL8;|@A!TQbYSA9xJ`2glV~wDzV> zt7c48Pv!f?H zm#x&~{%_UhnsFp@Ro1DiWW-4wVp)s1-}-7y3h(RswJ}3uun~pqeG8vK*htJK#UbUq z1~Q96-|4D+>_cXjEmm%TWmlZv_Sh*nVMpk_sGzbmLHsGpFEA4%ZpL~5AjhK?)R-o4 z2U$clDe-;CHo32oBP{(=PgzMh&Dz@XxVKfV`3lq1ddfap|MLh2T%{|{YLoyoD}eXK zDP+|uoshpnlntXk1TP<)T!AiE|qHX=5@C%cT**bPkxp) z4_*yQ_i>7beySnBnKVW+Iv21C0+uasp8t*&ywLD}Osc`h*kbj73oYXsz;vb@o;63W z&=4dU?M+)(eaL2ohO|db3fE!x7u_7B3^7|2GtA3rafyN{#L^bka1UA6n{* zy!uHpH0ql|qblt15!OPE740v_!?FKDohwq4(oPj@q{H@C^JceJ1SDd8ReIR4)SAoI z8N@#R#29$>aSSV_%^EN6+Adw#s0F3?E!dwvq&vnwOWLG4xfkF=Y(m~A7fQ6 z?Ft!Z6Nxr#q^*r|e1-Ru%|IK-1 zS0xN5DcrDtiL_eENo=ZH*2VznxhosqrEV+H zRR2fHimqc&$$%qxJ;Q_4T9W;%8tUquF3$u$yRXDl+q1g{RjF`v@%|VUPH3T??~;tGs=SUW z+;Y;+y0?4(Ow(rkUCJv#;z^t63TYf-(`Onq-Wmd2=SQ1om=wKN2oWnfJNvXG;1cY_ z6L_+{SL zB34EZu>9BO66Cu`%94Y5BlGLseBXhy?6s7))xd;ak@t5BB&V3jA9fow7?ezax&%oZ zCV4C1wbAc&;8^=yJ>1O(9EdN$_+W$a;bWaNE3Ec%sJ%ctOUW`bhU#PULh$h)1yI!( z55F~^HM&vkJTgU_+Y#ZKc=z9R3od)7`<1?UBp9U-wFfR*quC3pN&+kATRNgpYT0p zp{l8>d*=W^m9MY88zFCIquMXA2|%*7HwZb(PD2d(lOX@a9HrEMUqJqYl|?=wj;^6s z=!0FBWHaNjGpD1Y(J)oXW4Lo!V8)YjjQia;=Wm#*Zfh79dglO`+fUD&_8&M+ z`nK$JhU*(XA$l|lRNQS(fl-377d3sl3#sNiZ!yVvFqB%952oR@uaU_!$#o&njE7H+ z_+ydkuZZ}&08QziMdvJlN?2%{04+{|_s7YSZ`SW6Nuox#|DfVI^`!Mmr#fd2^?v&< zSY38fSg|hhe&fF?IrU55_vrkz(QXkH=EXVhSQEs;=OL*#smojgeo$n9%ihnr@8^1w zCYhQH{|q6zx|~L{h~=p;?<&MJdi^z1D^C`KlzAit0PqBC7-$zWqgfe`V-QQ zZMUQE9#p2s1|eg2SAe6yZtvLq^MJ#Ld3)cjsfmuwPI$?~_@TdYiBpj0W0-54Z^))3G^ zP$Ld59!mOzlNZa$NpoE<){kL_#C{OZEO4C3NWCLJw-;_S($d(EP13lCvC|rWN$ggG zx28k$I^26K5|sCFkfZk;mDeDb7W?RiB$MAvA#HK>p?>gd?;B#Id?Iwz#OTP@DFty| z&f~OCv&<l|`Tb zvu`R0JvHvmIxR&bRTC=Ks4luT@X`%)m@9^KQ;h58si&TG;>sI!rSyY@ulDrTE$3{cN&bgBiNF6phgn#gA? z5WhCs%Mcbs`O(>#1jSvGv%d`6uX`0g>grV-JI5-yG(BuPW?Bu0KsJK~@iEGU)~p zvC~6;x##9-lNL1?zRgAi|4cQExdk~D3V7C3YCWu;8vDlP>9=3GWT1<0b7VYM_^fFh zz{o!U<1-QZpP~71T)nXTh7iSJ5H)?q7h^_lb-f`suTMYXZ8wd6(>=X;@U67@{@2d63tbg@&UuX=zqhueCltibB2y(X$oW{1SdT|1js zFh!LtTv_|=DsEB>N2j_5juz`7@xwu|3Y=_5VixZQ+Bme0F5-X3bYUeO^yH6wc%|hT zIZ#?bY#mWpwJ1&=Z19z8Lrvo54pNksriVeEgXN$g`;izTi&}K}1gq_r9_KCVB zGMS|(R=F=vi~ZU5eQdFzYu!@jzfHqHM-r+!Q^+_&3k~}&y`*Jtj+xOxmtHcJWX>1PEFUhtKFkLYcP*9Acqvq=k^ZXHkMkjul z-mttk7VgIi38Qyu2h84fJr8hphSo3UTq&u#x?_0e(UklY-M|Gc%eZxe`FzL^%xkPw`xsrN=ykYFh+u{)AxA%}*T|XEt^mPVS8A5I*k7O&-HSWnmwb>Lp^a zzlulYgEj}~{H_l_Gq+Fs?d)A`)mw zwJAF`&9d(PzW4fNvxFg#$u%H(N`Xc-l^WUXRlU?^g9dJ!#`@$rdfd#ZPd-Im9r1$Y zWZz-51eNskpQn_O&@J4S6@9x30x+@XQc)9HEKq|$oI_qvn@!Z{4W34vs6fWAcf9!R z7?A?~?}iTbvU|Y>apeL!P~Blr!G6QD;o^Qki1Y$KQ>{jTU$vs$)1U)A3P5+p?eIYpeFA@qD|5eA+wJT7gL{{l%^W?;XyMETN=|}XXi>M{ z)HH=XiTkkD&YPl|P2t0475l%TRt3;k2v@?)c$P{#!FFje9!%W0MQh9a%zLU+5}8aj zsxWy<3(@1(|0aX-=GHT@Dfv_UQqUr=htW9kvs9Ao-7 z)fpl-#?r}d03+zdQ4>}y5Em6OVE95QuFCZFu>-5UCf|M(VaKmbT;YgdC;On1^D^`x zGM=YSd2AtSjd!CAL}aG&AvvLVyG{O1YrDi(1s{DFX_l>VlknGDo(T^;9%jBG=g@u! z`Ov00ZO*fUuVC(uv$~Zu<(RKKY^(kl=Qp|_x?t0zafk`t^$A*SkEJwO@0H>q>+GQP zFUlwALc&R6EaQ^*>9kLl7^d~$pk(C`Hu|t55MKQtClImq>gLlp(`pKH$(q{Gv65*Z z1$Wwy_G<*?kNren#{>YcdeR5T)Wq2c^W8pyW8y)JEpCQpAGjA&91EGPDid!Mq97Ma zbj9GPIl}%Z2Yr8`E#tQpD^@Ci7_5hn7|ibfR}7oFxz(+!RkmFWZWY`@HFu4 z+W&>$k93o+tPfM;?uq>if)35USK62w@jcTc*#-7NXI#=I4A?C3vuWHBT;Zug`s8@g z;|)Hrr$3f#kc^GOQcz6l>dI*kp8QA`TE{+SwD?W}q<%&}GIG5yAGni%xHgT2 zJjK(7!$0Uzvj>-sUM52l{1Sr^m;sYZ7*G4G3}8M->b6~YtgrTOD#h@zhG3qbm%N1%xP!T05eCiIo;)vYO{qTBbO+lxoxBsyC9@mCr zb_mdD>ju30~vlx>_5ESVWHn^S5ife+-^0ECyvh!MVMjH`rsPkWQlj? z!=4ZDiA^NlNzs$dcHIdpLHwDL{i;2-%{LS0r^%bj-q{%DU1y&NfccOjT0ImG&|RIA`zee-mNFswb*}zLw0(GKmM!=Zush%uLyQZ~+j@ z#$G2=%2Qo@f+~G_8G_EOm%9UCuh@RDA+nY<3ZYz%**t}}h|vir+{SM8&W<=qDLG@> zbP?#4!CEDNNHqi9B_|{Jl2~2CVjXbw&f-b%Lc2#I1J25Z@RkM%8){n*bXs5dcn~-& zV7K)D1hb|d9e74@*GB;ruG;?JW{EKDHJ-Xi%lP~J*0i76nLj6)!Rf;1yRz-@k%V$K=nkZN)Dsx<8s&F%bkdwQ3{e*`TEYt?-%3pUm%y z5QWVea925{RdVjlSdhi)kOje6I2Ee4zAR;nFgd<)uQ~#{jx>=Yw*5MxfL2GHjYLR| zR}loSdcAc+o~`{v(H2YqN-N#Q+FJ+mxfT?c;i*wjy%S9AY_F&j-MG`jA(ExOweMyz z8?!G-=b%734HEA@tVFV)L$AmHDAlhlVG+!)Nx`>KpMI<9>=r$+j?@u{d)vUFhBZ4B z4L(X`xumE6`s}aq7!`ok|KylK^OTG-=AhkOriN-Di>C*;nrt~!T=w7s0CE#<+p4;o znT&N#wPMA_gX}h6Rb*jeImIKEC6h9&RB(6;bTS*jCB64b1d~$p`FYasLu%t4(gy@0 zOOMa-J<&hT?t*0D?X5s7iO83hNWt!^I2^>1%#cjSJ|~t+b^pb)TezOD4_m8hOih%{7V&@CutVl_q02zHQ{GyqgFD&v=Sb@-n!0<{mE zoGL7oz03Ck>Dm^S2o7K&T<5>AjC~b-Q~LFT6*>}_DgZ0n5%V&(HGkhxMec@&a4q4J zd2)E1&J^NP z<@t`96qGry@~UvrlP|8kgHyE_$W1;y=@mB{-QCUB&D?YtR;X zA1pI2@J}*NFbq5S1u1GhIMrHlW)Q%88-0eHU+HWbvM$p>{S%=(`|_8Vb*3o98vC@= zd!3#0FKtLX(zCN-PEbaGrO!DwUaDflMUq?{EADT-;RGXY++(uK)Q*py`aS%s*;PVmMF2Qs_r&a3oCCwq#cMp&q$d2+v#M9h!wtqP4eNbS5=*Pd-u4 zLuCKc?`uA#`5%;3iwK6g3PZTV3y!|EVux6)P$o5O0nY1vdbJjCUf;goP|S77vjqIh z1OjOEHl6tU`>J0I^}AO3OAR&Jf2Q6Ox*@=t^MXwp$~1lSLFq^^hc|B3{gJtmMpcO+ z_3lhz*aS#utl5feg}@F;C_$CmACX?}ktBhO0#O4~0rD|tn* z+OIo@Njhhy-#0Lk4}%xR9)4UxCJ+~RX`B#vMz&PTl!TS&x)|Z-9@n{H^IF#-$(XTZ znH0`eQ(TuQT*MioQDJk5DanAzTzlExw^!&nqHUbI+C^W6GxxB1Nu;& zv3Q?r>@bC{GdDV=UR~Q`5gE{8`q3@NHm=oc{dM`A0zpyk03vJ1oex2^vj)A1A66Y% zs_w@nq^2QQSC?B=;_-sOL|%kcxK%!LiVL|Q>8epUV`rNAy7jGrR#jc&temNk3u3CV zEV`uq$t{_K2ds`v3D82;%oqC>$5)jk2c&A88*5)YUf^ zC=ukZ3_bC@q!NW>I|1%uBnE=;)liBM4hm&;4zr{Ir3ystEe7s_On@H(3^Q%3Wji?{ zjT1dWQ%`=)WcLWx{t8q)rx^mW!DNY3oYT3J6C+hWegCvO0g7sI-^VYpO z7W@1@t(3fHf#ePvjWl-+Bm|LG9^Vqk+f+McdhFKU4WMXox^wvhzg53B9MpJ+`j{Mx z(0K58@=727<+*G8!i$C4@1Gpx0Z>|RU53RpMaJUGN86|pZ>Nx{ZGk$D<|E?XTkETH z)%%ki?7pXx+}c&{t68OgCcEYhRCrf)$}*Mjuq4geAk_Kjbi~?#H4XTd zOFG2<7t}qv=zmIsS$>Xfe-_@DY4<*?ZT!1Wq20YG`+@2R9)H%9Hc4}cX=hFBb{#ha zD~x;uofGE3q9B0f zdy#^cjjsFebzD|wGxe2fR|^|`{sMP%eQVYNpqr?!Z zTT7U8jUUtnT77kR9PqAP8BiZDZq2#h2=?o1ID5;ZEadHkuq!k4w+4;rBN&gqCq@Q7 ztlj2E?u;fDzu#z<-EP+SkuG_E{lLBB{#Fg!Mb+y;lp*`}5FH)R*0+S1mnJ4g$zj#F z+ijhA;ZiyL8FUo2Iv<+ePcFVcI0aq#seJ?k$dyl#!}QS&-k{g1!UDU3wT81R9xzxh zz4eySm}!CffiRi>_mFF^kmT1!UNoG3&2%6$*S(AnCY6~0ripg*3m zqcwI!n26n#e8kjqNb(6$)is#t{gyUM;Ux6cL&O6@Zr``PekLh0=s!Y74HUh8zl8Tl z3hT6!4_;26@;z)G6ce?QP`K2JF&HHs(fvbU5)_|jubs^Jq)mp^`)fsMnJH1~$WdWo zTt=F(WU0U`0TGYcrS%Aanga{RBS^PP$-kT=919sm0Mu4W^U3NV`QsGNO0v&m`6i1B z_dgoRFlWH0GIub^=&F<6Na%?ie>%jQDVmvj=AJG=UYp ziGX3`f-aIn_VM!ZS!vF0G*#xn2UFh@$xoO`!IAs71wbIrt3+4$NQ#m1j%PpeZhY9e zKYz>QC`t@LU`Rvn9i{<3vvVBbXa5up?tR4*dQhv@CadzV&~P%MRvb7o0)La-dc59y{=I&p$6L*_%6L`nFVqFW|a$H164qa`SKvyTUUberEn8;zzwFx!- z-U%0e$&Z|afO=nO6jfVE0WqmJ=`N3HggSncFGu(sbc|wwi=_Q?uD`VQp{~2zu$a^1 zdUtO6!;l=}`IrEeJHOue7@vORikF6^Jf}2W=T0LG6En`OdSrkW%`4prMSzZ901hG3 zOb(W?P{MlSn+3nt&;r-&F1X>^@W~S7fya~eIZ!~YzRjJD`072oEsnx5804j@&p`m* zs{1}8*QqNJkHC@0UAz4dh7ZLdh#nevhfo)$i{vOvJYj6z5E(t4_6n%}Bb@eZ)a=&6 zJIUi9ZTqiC9|I?Or()o(lEe-k#=D{ky3KZXq&v5@f1r&XVe!E0n%IlVm6JVrRBN-mg-PsQ1Uy zl^*&Kc1?ju%7Zav^bf|MV@dVsbu_(^+MgB>tvrO7tW?U*G*6ECSpR-fUZz@qNb3E~ zhq1BJL)2XPXN5BD(0UP7H(#f3+)DTf`Ka5hE~tOWqFm!xwy^jVeaMk*>eQ)pllq3b zO6yd=OjQ`iIUJM6C7dE!M`CyMyD5mgq8Y0H))y5MPsxfL#}(AWKM2OX6eG_X)N=wHZU@D;@oNL+w? zVUkR-5fAR1U~j8}F9v&`m5Q`&ojiMYKN;&=f?jp$FCZA-{~C10>W#OS z47VT|M%Kjzms0Kl3*FA(axkzLnKin)U=rd9eihD^kzhJ>b|8%5ekDkyr{rRRJfpXz zZjQ4Auqr=f z)JqqA2`U%Ey96eHXn+PIkPEBzy|p^{4ER;$A?ns4@J4dpw>Y;VE$tcpM|wCKhHmL2TVGI(Q`xFx)X z!i1)?gz354^4Glwj9~OVd>y&cg$6RJ37bp2@7W~xp8%1 z!Frd*FOnHhw!y+h`%xa%od-nz)0)adzl}h2rXlq{@$`#PDPbMG^?|x&-Wx+{zb(nw zVOHGv<&kjq4T^Gvje#U?29UgCf+-ZfVh6S&NhwySHTjdm`D{e0We|;)koexr+H}jW z-Yss0=`iw30b)C6uXmO-g5BC=rH!{YHet^@V%HPvV>o~(G z&Di8tfm2vn`KeJFz~KqFrkr9@N)>!o39H4$)SE*p06sQ7k5o1kvsL21a)(@&9C{AO zLHQBTEB5%<6V1f#z`_7z9^DXp_jFI6LNM&~(17OBk;@ zSzem9zG?iq2I5jry0-oRj7e20F%v96KKKEClm5?rOcwWboYSVwGZ!`{Ryh!l8FZ!U zdjnyR^4XfK4sVK%(~{Y-JT!1cY-7#55%3_4u8kQH5ha>ht5taBE)EIAafl)@RrCT^ z4?PUSG?r`1c-E4rbGtfUgcD~H?_|V%xi)!<)p;nYtS!(nOfu1d7m46dhZk!@z}u_3 zz*qCow%{`m5XN!h-cDX6&Tix+D7JNy3l0lFdJ!*!jUIdJ5sSv?Z}6kT$zFi8Ahwxx z){mQqbWT2F8$zYhboAw?CVo;u|Jx9R>?Mkr>lf6c0^V9Nr%kXqMWx_VK$SbK$xsRI0~v`D*};J_M#Y1``^nXLs>ZDm{;2RL{4s@Wp3KA zZ$Nv!b~yW{I}ol4orBoAV_Hc(7lEWnLOoPxkpg7s{SSw-rQt4NR#~BUbm2|OA(+Wj z8*y@DWD)mczTot#An}?GvtyZL?-DC%$Eco=!+BNkcNN}ZQm!ow`vRuo%F9s&r$$YB zn!RdlToBxU-f()FCe`mD&uEI0KDc6l_@LM@6FMDB$Y@WaPU^7QUA>Ei{YJ{N!-=s{ zoC@ZC{x%cBG*X9&TNBWkvgIh)M6dnnxFMRo_)b6XldLVY4%JP827yeI{A7^W|GB&J|tdJO-CPXd`Qt6`BEJNBCk=Hux{0N$6fTSw9Yq#z{3WVT{-dIp( z=z+p-rxaot@eE;4`LQ7)*iB?7H{?6QkT?itQVmlCunz7KN&LlY1pWBVu?^}JtH#DG zwr&1-MkEtGUJJV-Pg6SOb(}k@Nf~jw^ixb0FA%2cE2&A!_|OCRTMC`!Icqxq8j&yj zU{F(8I;eWG1(`*<<%X?Or4@8Bc0Rxj7l~4lasS4$Phu&3d=GAH1fp>4y!A3PL3kCtTC33D zHa)wpL}H7pf+RV@!wiF92)KhDiELi2-R8Rn;w2d|Q`&OP7PKjN`|l6hok1KBt) zaIcv?+C|=)H+dyDT8grzi151@AKF5?zk=DR*b+#K%Lqswwo@a6(jZwwX}U}J@I|rg zMLH>gD<6vt3yET+b!*E0KB0EWtVu_j0zsyo_Av|NU@T#-As*@UEjYV%rI#euyULM+ zNdHQhU0v|PF-Vv5h(6VeqXg2^P9U&;AVCb7W-#p8a^{#v?!5Jr@%DRCY0jKQ*Q+=W z{fwUR6)@6D5xZNhkvubl{YK{&O`>-+27_6F)H6*bwN7Tn2u)lp>_1AD0alTeL06>3 z;rn!L8h!nYhm0?9-}5Vh5an7TWSTw|PnagYGz0v8|HH8f#DfQrQ7r#{Ztx>(4S9pV z(SC!r|6_po z);%M+{W#~@fQCpq5^P}*?4yA3p6=p(a#E1WqE$658URRn+TQ?L!>K!cNvS0Z??s%OuX(}?0obEFVm}SOIw*CX}VxEtBK!bNic~aM+ zT2rvD^i9Sqt5Du(tUXRWk$qw`%l@E3cVY3_Nv58|p;=tr#urxCF`jhCMlFx{z`0;y z@CB*;7d450diR3H%r%E5w5lBaDi_k+Ng=k^(Ee#%6Z6qUkD9yK-1-pZbY(BvH%=d0 z&E$i@*j0n{@nbqmqqxdzT#Nol+LH^QnX&n8NU@TZU5MbUU8(C2x#dz1cR%D+w* z*OH=OYHCVE>iA#`af(DJ{vcF>a;H!y#x(U^C#^Uy|E`-Yt55Y$m!~tWO;Z>5#p96* zyXJUu@BoVw_2YTrHgeH`DmkLI7|7rbg7e4W;D zp3=_5$I#vOJGe#m8lN@(>?XsSaZ|VWIlqo0mNrP zmDdq=tyK=`T>)#0RxK3MUO3{vX4mVkTaZtYP$T~04R=}ohxCg9A|i0E=lAjTn^|rY zXU}YvDc6c(=>C^ zWg{&kzKv=|V`3{LW6$gFi65)2c8}5%79g+VUxNMSxPV9M89M<>?U@L}WeRwx8Tqi- zA?42ZPCkI!0}s2695$G7HST=le$&^ZF~|n4TD3d2 zqqB$Nh8w=OVt#TzG?H*y$LYkR5TUAy0|tTlTI@jSuir*za7R^Sj8b}~ zepdqqZvolpXCnIrn+B$A8(c3>GTI>E`O2!@2xh?x+?H7@jdTbrvlf0SjHc9GJxH5R z1^!8*8t%(s=dtDD93zY56cV%d?AL=nuo{={`>bDSk@2;L*QM;;l@t{X(W3#YNEO#+ z`q7un<+E@qL||8e@;cT^7d1a^)pJjIvx@-t<~#*;UF8kUApRdxPu3nR^y^6tzaAH_ zlEHg!M6H;2U~I}s+v>o`uT39ud`Ufw*)D^65v=X`Dkgh^O!L^gqHx`_osaU6;J>c> zOib2UI>fh=_$MAK;onlbG1-b(Jiw4^ll9rwdEcOVG;W~P!R zRSELME;du7|qIx#f>P*UE|#DI`3# z%eI?6;!ssihRp9zj~=;EobX>+;v=xX**XCa1)`RP51xrQ-PxbAKDzkNjj#B5f z^bz#UA!kGErk1UFMY;ePY;CKh1v ziK<|`pZE5g7E;o7G82}|M4O5^ddJTcVdrA~G$ZbhBn$T)VWChg07HD90nZb*w4TW6 z?aWaow-5Te4$Cqab1y@x)-`!*!~R>QZ`Xoy9zNg*1auQVwrGC`dhPDBuH>+OUjCDy z1umW4B=yNb!t#TFJSV@#?t3y1y0V6bX*O7(g+G5(|2NjFA%!hr2g}SbVfM9Q2!J zQ>mdfixwaP>Roug@2Q_{A&|v7V?;net5lx=CM$Wg!DrSFnl0O(K@(qc;+`jE$C7&@ z_6>}|t|LeK83{>apc$T0H@~AagZ;m>{E{FRK3$l@gJS4Mix^bB@kb`A) zf}XvRg=SoBd+;=e;r&yL)|3Gnx>Qw!;=8TSuXaZgd@iFHtXUyrj1=99+DXJ^=R7<0 zPCxzt5i&Ig)7|E_5sx(mitI8H3FU-kOC5Ux>5H5 zvoqG-?Gub4`!=gzMx!c2`)QB*Qzw*bX^oNJ*BRl!|8^JNWJ(MuXUomX7#-oE8tmzNL)Bdq;e;~Xss%PH`bCbnKp zXZL%Nh*S3rE3#Ll_9pOJAX;SnG;u$FnIY%+Fob|Z{;`yJ9?)?2Y}q*Nupa4i(HHWp zPAck4PGV_mLEfUR7Gbpr36#jp%MaclETB95xj=HjcjQQ)@=y;eSy;m$)+&rbrUHt- zS=g*B_-)Q#&4@rsu$6ubo5x}%f6)e^rTkGkZ^W9;YC%8h*a}Qfm_e)Y?D;$%*Wie|1nbld=6J-$;7sCPDZW7p+rRnr0){$2QX6|HBuT zgf^$wu(H&{3h^!_QOm)P$weB8lDaOj*P(20pIvLc2X7`nab-T_uUR=_Xf{E-Lud0> zIR&VyuZ$gwno#lxstN}|i?Gu8wp&8axsD{e?#)%*D_ofJ4!LxK{QhfXcQb`69n1kM z=g3*nuC>1}E^W!Fz_*IG$^#XCaaSVHh|xX2ZN;@y_XN#dzYZNaGi5N0rdNV10ozvd zbR5>XVNh8c#*s&97Kc@UU4s||$xjd2zza^>;U7Rjh!*H|{<6->UofehV$%nwyt{46 z1CJU5J7|c^l#&bveuc!$Len$GXJ=g`XoI<NB|yX~frvMp<*)gbzbJ)(x3Lf} z1XtSE7thTua4~)U2K7gD=Z`=t8j|Eevp>8$WZ6M8Pb_3v82_6Do@TVJOWK_=?rpbw z?0`kTaFb}YIF6ji%6{ER8y&-1Yq`vSmQk2EHu*XJ4*d07=)gy*-N%TzCWPz9Z*Xu| zg(2XKs&6F7PY$9%tNOn`W`x0GWcwGpZ&fpk*fM#~&#Aggs(~4W^%ao^^68Yyhqcew zT~mtczkR?(WULC9E@N+J@3+3M-IJ-cV-!;jbzj}A%W}ACkoQXIDE@CrR5og#LDGjq z-hslJ_syp{N7f{me8er{DVg+~=K~*5=XiHBYXwx8|E&oq!`*;{JLmfR9DUcmdmDh+ zf-jg?-Yz@L${4O%ceR^q5Hh3PCK7k(DT4f;>CvatVrxd5f-e{Kh)d@8t^#=EYV46n zp+TIqyJVI|>r$I2Z88D`5}us@19$%{F7gQR=u7=kmX~?nou6jb51&H0<3pd)0EV`0 z{$~@#@9P%@g}DDsCDzC~tHP7jn}`R$MWLT`GIm0Q^!)V$Npgv08oqn8=>I0{r1?)i zM_JiPXIK@}0YgFrSHe1d@1&NpX>0U|WMi35gIXMXh^Wd5JNAHeXOZFy1m|0(XBTD& z)i2LJ%KwMs@W1>!wDU6!oWhZUqE|~r+Y1dx1aK^qWH)lBNIG_EN(lu=W=`qT|`iD61-2nE{N<^K(=zM=&b zVTdD829!{h|122Jm=?+mY?JxLpb;!W8h|M#84veUdGa{yG0cVonL(U6V2S@Du zRM)s#Cwjy03(!7tiXHOatWn0+7vW9Pq>7q8!|m{|t`tS^F-nP7xjIEOeN8QQJvUE~ zVr~$-FPem49r2B1Od5GnAa9z049(*@Jo#tsj7WEd9YJZ)Y^-G7_(561d|Gr`afs7gn=FW<^V&Lv;Jn$^t0vH1tQF{+YhxP#x7=p z+da&c@LzbKmEffhDzd2m`wiHs!&gio=IZNg6m0dAcmFZexb?O4x1{e_*TmmhnAw-A zW~3W67t)TV_Ei$BzzQ3l6#p+yS0Uv-{V5lsV|I;o}hDPS=eU{uP7)xp^ z z>x5C)F%rdkY+AMW9{C%LiC`$NcWKf5AM98#%Lv#yO-y>Pmn}Z|cklh84)uj*XS3|# znJuibj%|olH#GEENP|yC_WSA6;7l~OCAB5Dnr;T|zv)n|^tCjy;5RonKiJy*5?Xh< zzc2U~RED0j>3ME6dDEy^ud!OWstZ27DFbL2HEbW8dXOE#W;k2Jl>sxIdA(+t_cjGc zn47V#)F_nA|D0kz>cpIPp_?nSMLP%84CTRS?s8oTdP+@3G=5o|ZhmyOvlCj=(Vb}~ z5%g|)*{K+u@>V7jc0XPihpE5$|4Z6~#UEa@`r)I+V<-G>wg1=8m+19Lcs2gavosJr z%jAOe|Fv}0QBi$eR0&DxloAj`x;vCq8fk_YhEfnx5_h&wE>bki6>``9@5R);G%V4 z)Xrs4v-{!9!qc9aCOa~UG|Y(N$G~Sz3@s=%lW!; zH=yhE(P|5x-|1d}?1~GQ{USvEp*rSVzH$(v`HsF z8S7T@!27WeopV+>rAIZC(RJ<|JB&sjC78NmVo{FiXc&9W%K}xV9zZL<5cpw^F^0}F zX@W}itD)w1A8$Pr3QuBMa9;(Fh6+?RV=n~-tDouwYKey=f?^ipXk`@C(bxvNelbt( z&6J-AAO!--<+r(eeOuFD-CHk*NHTJzGi$wI3~t>{=gH4y1vX9~y+H=?Te4Rt6Cid_X)p_0{yFKQbHi1*a&v z-4CPbl$XUvz%_$BH%C>2szsRSzUC03ZU4#)uK%Ks=6PUsZT7e#-UymYgUPD|dQNOk zc-)J$2Pdykp(>Vp{@=eCbFcj6&7R^RGpm%zQRLEOpPV_{#m7}CjV=+t3=HOodu#<4 zfSJc*Gq$YwNK&UT&Id9Rc2S?p0r+hO1(|2Axw-$P&k`OkpT|(6wQWQGW&sMov-dOC zLo{(3^Wnbt>FYfnoYq)ySn79mzV*L1~R~wALRkv!4VMM%<_Eq{)2^e*Ns%m7HK-*kmEly>tOD@%e=>-a_QR9L}L!_L>RQ z;RpiLc;K~!4;U;+op|dAGWMe8zhXDIbYAa|a!_L7V$4FM`=G->Hm=AhT2H5F4YU> zM!yJ%DKkQH&a*pdeITteJ)X#bZVjhZRw(`(IWi`E-r}}&nhe=-ZrzckXmtbaofEzv z+N<)wAO07hIHE;wW9tj`8e0NZsHHJxttWT>;2J*7dcjK1u%#B)FfYda<)V8WCA;iD z(kn^G%pJycFtD;$%%e6KI=eu zBfiQn@@=+x?EBsPISGPUA<#ex+8NnmHS4;SdmitMsLp1ojpW|NrAuBuLwb$iWpkj} zY>ii5Q7+oj@8WJ?HfW|gYc6CXtHBDJ5;ypv&^es}B<+O+ zUjj>;>TKqQ8!0$wjg99{n8`D`f4r)8(>k?DA1%Fu0*ZySrk*ah_o)A<{cY+!ABzBg z+adC!5`TEK*yYaRpbI~P2h2NOO2)jM=Ra${e_1j|9>;}O`*^G&v*2ushMk}O)UDx2 z-rELLUE6NYErx-Bn8`qg)3Dc%Dsv3gzsw0&(cX*wd-G7!YR~`qc<3{3NRRQC)h0@> zTOdtAgq2edV@%oRvwHd9ozfFexv3cO9#5dwP)7X1K)Wxllqjhj|%g$5ymC4*lALh+u+yVzR zIOz;`IBctnxMOX*v_AzHay6aWFBqCWc%hQ#5q`w?@<+QxlLMEkYnycCN|VIbd6t0f zH1CfVZ7cY1;-73h$J@xHx(geiycz=PW04V=-s&X#R93{v?uUgaUyuFsKnH5k-xJo^ z?9`QU!yqDRHEw1YIhe`-Y--J;jcim2g7sGf6tW{Iz1Kd~($?bDD#Xxav*AChMLrbM zqn{~)AH{g|3>1fNI8AW%-B8Q{w*0qO`en~XE08kQb-jzGU#*FN8r<;te=ARMGNum{ zGe%*6EIsheIU3n}$Vrv`Zc!ly^wvqYp<3n7E(!M;w%~=kGjZ*xdLZ_&GC_EsPxYY9 zwg*CQP)C_4oVm6d7OUtOOOVGZw7qLF<_J2Vq%@Mrr;*++4w$d0V}AY4B5td?k-Vna z+^;XZWu+*LFNANXZbJ{BRXr|AF6Pgr@y9{EdRb=$)4baU)Xo~vou4e*e^LW474>d>{cLZVigv?T8k#eEGFm>MTaQy~k_4 zHzpIDCDL9N!FH&JK&e|S@ZH6nh&?)n%|Diz0TUPXo_Ond{iyx%a|#mxU;l+6-hCL(uly;hxtAg8 zF7rvLvlb8nH0r^2ra@F%Ivg&8vPe(+D>~+OP?qTJPWR6|@oW74Kl84LN6x7kd%uA= zhI=5Sz@WW3nKz#aX7>Y>g)X_{ZNyXLQeK-_Ldcw;Ep9su5^&fTg${x^s9ogwjT* z0OH^G0Tl~RckGbgf3VWRn&nG<#r^aK4#dv>52x`;R4NIExe3v^-yNf%o ziTEz~o8PkDXNJhBVaJdL`pbvJ0Kd=vq4SRI+H{rX?Jl zJ?{tQO$0~w2&~to!0Q*BWt@1QDn(=*E`RrRB^S%l0UmN z+TJ{ppeQ{kffcV7vTVylSmxt-wkrF#L19Oj0-QJcT0dmxxMs~xgW1N!&A>tSgAhv2 zxjgcSaI2y^<<)~ACUVVP>)s|}ag9Kue`tmk%Fc}Z-fmRNP!!2w&xHWf#C&6EwV=U~cyoiwvJe)9ftxA$G zkUs5dQU@nty!5Ox*nysvs}T8!CT_QoD+^4JBk`oExXCC7E=;m=>Nk60$6J12C|L61 zE>9Q|@La6Ghy)+KqH`Np{we%mxXb;x7qosF<18PJe4^>Fx~#$kPJQOWOc0hXGIn}D zwgFoQ`NK=}=wbd};P#9mr>Y{kFcR#J_w~hBbi&RIm{?iYQ@+{4&q<$-tR^Ag6dwl= z>a=&UO^^RAzIJ#?PZpkeo`NyYt+&J48Z|1rr=+1zRevqn_rA+HBH4V%soff}Q(d;W zS;0d(ctD3)>Djg!d7^0}n;$GP93M?S4lBX_9HToK0?U6{zhEYK(Pbu)U)bhgvn|?q z+P9N;OAbi=V(v#f$%#U=bU1`t1jN#{$^`GnG>%mWw*UIszgh`I@L9oKpCxXk208xHk(E*K-Pg09L~vRHiXF<@V}6z3~T3U*E>0DPK~k|ztJ zVoXg(=6_%?U%`q&4e}d72jos0c>1~Iw(U1gE;KdqJ^awBu}O{sf(Hx`3wH(Z0$@Cy zGqRlHYa#K+#P>9j8FCAbR|GR*Rt&DZDVN{gpo&nsDojT8f9$^*wtcYv( zAmf=)FXU+U>(r<5!F+EdR6;0Fm->voM#w;9H18^7((6ask-W?3n#mOB z5KsS(Yuo7-s++&FZ#w>*<16rj4Eg)X9M#>k(dLHOo{d?+`_Z5;P+wv3W4owrKpy0%(u&QW8XvGgCB}(pgdyP4cHzX(mYb<&4M+2{6ZL z`=PCd!{kQa?u^mUT-noC_=aHJCZkyYhVloxM(#BZ4&|vdpAt0 z-W<~Gd&*Z(0|=#Fztc#u@Jacb9)B2MQ~iD${*MDC7!w0Kzi&VPNub`MS;kb-F5`rT`+WD0rOyjKCQutdq zt*s$C)^zc1vD=b4%eYbm^rD7X+gNVhbT*6x@81fhZ`4hm`vBPgh~d-CS`d@^4O@c~Xa0zIQ1yXq`;l0pOLeUF1xhS=kyo)4HM*8ooAgnV9TBRavk zD>AuAa=hhxtyE%4DF`GlY-)aOHaJIqxO&(UIIK*AUF-h5bMQS*7}-YQ3rw}Vk`Pie z{+FeJQH{*fRbj^Pxan~8*N+dj%BQsEh)(&?p~Y`WcQc)s2~&yqX5SL3?nM>*%$S+* zcQcgG=M%K_x5|{N{}pT6@kb6Ajbc<)E`D!5H>MDK`}Pgk*1Ui#mn-s*PPheX_S%i6 zU^Q7m`+A6g?RPjyK$l4Er5VliHB$5r3Cs8njh>6k~N z)rt!;<`t!U%=gx(Twi+9mw$5&+)t||>Je2ZZGe0YBrN0O7GhO~Z|1R){nEDK@1-e? zw4MM{1h{2?+mG4_&lU+^?}i222WaVru`+P+(~D<7CsdT$l!(UTMGVO+C_f5jRT6gTEK6C5_xMLm*mlVp>{!qH3f2$E2Ik_YZQ zMIQD}W$V1*s`L=^RAB5mAMTkR?OybdRg3WQQR{ELd*eL?0Wy zS!Yata>nduI=rH1_+Xsq$mox$Q$ODf+QFW|5>GQghi8(lYwtlAzUsL}SpGa#NV(t= zME<#L8iT+VOZet!hf|4i>eTZFUAlSF3}ioBBoG0-%+z`4F?s%3<{%|qo^uEpCy66I z@0(L&oh5rqW#Zvzz0NW4uIVW8ihac*%BN5;!!+3RUKm;O1xbfSR3IU#XZ8I1hhDTQ z`E}7e_y^EWMB1cF{W7Tl`}Q8(-a_Qx0=K7A zPu>u+5|W#s_JwEj*~s(PSD`J6;0EaG_)hRO$>>@;MGQGaiNE&%#(*Y3KFRPREv~V? zndhc9r7CgIx6Ej7R0=11tNWdib%3XW&T@4yxZaHPQsrB>q2@=}<;R9=#TQ-z@m@(4 z7(n`uXnH8S>ipu*Y0VHv@pIgE=w3`xJVn^^f@N!2p7<*px{wxo>+g)x zupH4fU~(vdqAaFWp(9Xof7umGk+r;3QQ$OLIA?IT^1R%9_XF&hLmau}H_1l-8WsR) zi{5W~NL`o+z1%uCkRsFbYa}&#vFaqPVp=F zf=xoGm#2)i<>@e*ii=}cI`(h`#WIBDa>QLd3S-Pr9?;@P_3VsbHU{%Hn z?oK@dWbvkozWB3XBxOrrb)(Q86XXr`+S)$sX8X)?ZLz4uYA-2zTWNl3L9zzC{o-z+ zieOGZIG7LdxW;UL)~^pd`Cg4m2-G{y0d2b}KyCaFv+F0abLwHM&9~&Y;C(-djoAgc zzRWPRW7E`m#Q?LtXJhMwBZcM5dzX?nrNjhAu5K8D?2yL9;XrtpJ7F%DjcHG})HX@D z>}9XVtAP`KNcRDX&M3lT3n~xEMje{BEc%;6>LChc+q}0+`a*ewRRu`X5R^xdkxXrh z$}EWTY9ezq2ss)?1IT>}T+|pr2{my`GD`&#{d?kM4zzu}(3&%IP0;S!+#rG@zTd*K z%toR-`W1uFWD7xdVg7;*+=`47va8{ezR@kAZ7NmG)`gZOBE(XS_d?B#SbBo6tmROs z;BDm$nZD+5=Tx;!rmI$A0#YK2bb_qAb@mPU5~lX~YzADxZK4s_zTIpR0n@;$q>@j& zT?%q<+PS04uGB^fnO>=kweM=95OmegZ*Rq^DNtr z`$jTj-Y(O{7pHrkbx=ivdpz$HT9WeF>^@GiNbl+U$OH;>L$r;YSWS$VFQ-7=Qye`{ z5xgd03l{pr`NFwv(r<&(%s~0ot)|9&Q;c?lK5j7xjT>{7`Sn@E1A1OBd#E!kW`FR# zXgFE)HYa9uA#^MAAPKmlT?{ecy=8guQNAt+5>73tP%Enik>{lDHj>Q-uvF&}Kwjwe zTxDZ;Lt_nXG?xJ3;AO}w54S+TYp??>TkwuXcla&6r{*a?CW&kOg|H^1n+CD{d+eP{ zfR^nT@_nytF#5)Z$51U8^el6;a3pF6FKd*ojV7yEj4}B-kcYAg7j+J2CcmSV`*Hj9 z@JXR%qqBvhYiAV^Kn+N8)$#<_-hC6yQgi9V9vFjENFJ z64Z-bx~P{Ntc2aPHp>*OIN0yX{C9~eECshrnvE>fdvV<9jmy?Z!_zFbOYf9WOfJA+ z=Dz2)0qg!BhwvfP+6MiT{Piu~GA!6}FsI`)&f5Q23*vO_%g6Pjt=x%*)vJH_QA!@l zO}K6~mY7R$Z6jW(Jm!u{EaBbLs3$>$usOK&xJ!2kc<%SqO1=j-9d(}2w=8RMsh>$l8-I0IwXnUJ2x#}N3V$j?stTD(}qInxVvisLovuw2f z)a2#5!Q&p~lbBK&(CQy1^UE2yUE1Km-0noM>D}#3ih3&AmwlI~2glr(*i$WfUv%^; ziJj{^9eDucA>LG(8h^qybClDPLJH^BB5`-JnS3~zZ$Xe({uQ@EstwPC9WFRzY={MI zyC{w%HfTf`jEi|M?Kg_>Dk1;$KQ5~V?sckmwm3~ZYc%qPrTd4=)yY(*j1v(28@$c$ zNky)|c3_d9>NJ{&{($L8o3>%;#v8`AwvwGQsT`y<2yqnXo%k+@>8zb1`9EH2muK23 zQzuU3N!mOyVACIG&p!F}!aPyv{s9;I3yHnQa;JjhyHK+H&&LMjQQT#k438c$47cOD$P1RrYR zmr9t9eGmI%_J*nJ8a}`1eB2J=2_O-tpHS1ztSl8;u$vbpO`g%iztPV9 z2!qe{7}X+w&bX1w1sGs+a74{J2zwB1r1z@{mTx0dfLL--lnDt2)A#-XB`1;P8}#967%)AI zi^DcYkWOV!rKEVls;|15;?l(DYc3b|J-CZWBX-u^x!b=`8pYMu)~#+ETN~rYuuTNLg^M{*W#3H!{N3s7DBThA=tyGOBQ&~P-|NZuO}t+7 zkCfJwKy1Oda%gN}pk(K@`HuhlLUOq2cGjp=gN{zf-I%T7^F2t*j2TGt-9mm5o3R%< zywp!?=|7hZ_ciWG`C``?T{?1zbSs>Vvv)R$^d*~Vtii3tzAR05QHP95<-|wy*YwUf z%%6Nv+*UJz$jdMB6?&1*(K%1MYl3O?*92*1#TU-+DqwZ?A4siZHg1RC`8LwY8qPET zv+N$v2gRA88`|Fb4HK=A_q8L#GrSi^9nuXiK4qR^L$moHHgUp;UYu!WN*tL?mixZ< zE-U`_9ZhklsU0L5MHnM}y-t}|r1aK*gXwD}7e4GXMI0?8y<6%8U%!HzUS_$%&A!T5 z++kGTe`?mGLicn=<{meC&;N`WP{?VsDC^H37sI5<;@IJ+2>x_j_nv3-0yKh1ejzdA zQ!Qu=BBgx#0{}K7nzH73q$b@GxwFGp{qfIRMaP#w_Tl&5)zVqL3M8=`gEU_=oNqW_ zu5%?iwUSxr-zIeKD}e}m>%MRsSOf2#BiYxxL2$IN9aGrGHkfCTTFUp#II=K9PuXlw zi4OTu4hDcbZ}!AksUUuO_ux)$9#1cUw9C>WP#h>VB*(&9{7J3)=yOlKuB#uK9Z){k z91*uL?AS-zK_PbO+788Dq=7V$xZ(VJe0^?JnN@RX!0CnoFGMFir!+tI)@P)%IB+LQwi(EV{Ltas@!f){?x z4%i*~8WVEr;%&|5YB_htRRI;_#t1x^rmyDC-Mk5-`_+Tc7OAnmwwhPswpc4tWrGz> zky)g5&nt*&3exg#r4 zEcY;Zuw+{7mJN_t{=M*uIH?GMU`zH7LWPT?_OYN=m5r9~CIlgHs|f%4&cNN?K%?XW zb2moW2h18GBWFR&k{CTPf~jBlIZv(EgW5-za}IV|PyhBw@G++M^H0&f<7Fv)wXF5k zAHDY8KVbZvrZbA;)gI}8bSGQY7od|~a3Gk?DR(&kmW;j53TN(xPzo>u!_=7w#9mx0 z!fm(@Ob*;iuM2a}OEj@~22ehadiPxjDpmr~M*)=81?GsQX(OZt*O@n5^E(}AitU^l zg<$ARX%HJxbDvgv62`^-hmFecA@>SXiDuBQ|IjlC_3N^CKj`(h!q~BS8dM*4#!48r zxrrw4U$|Mhu1d$nDDxFx3!f12r55NgsPVh2icXA{^tAQcJ@umICs_u6+(K?ED`<~yuU>CKqV zn_3kYR9_nx7YE|1#pM}*>j#M~uO{+6%?6w1r%0Gi1Fn(gx}jE~FGFI#UbOW9n_}dZ z??~ha-OPV|$0=m=_~o4?K34711)PCwEQ}8bo5$H2M+H2UAJ=v!MkLgqCPsp#Vh+hv zU*#N;Yg*G4!}pTij25ZtJZG)a?T9E&+l3LG15Ms& zBy9%`k2a=H?w`8My=ZB)wP>9m96v!N)r|Jj$r%027yI@kaGZvOh;iT}$+V}S%#cza z{*Gp}lA3?dui1(I7R6w%NGBFO@Ww~AljoAAUyq;s2c%R@;C@kCCTT_- zvA)XW@bUA<$!OKpH*)-g_wr+TwQtMl&m|QArLWf4sN>s;-k7*x+4%39yQRbJQQ;p6 z_*G>cm^&;|Zegt5&&~*yHFIKPs-KaP4<=@4Hu;BVS+%;<_RGd8bTu+&Nh-YEPKvJI z-np=390JX_O|HbGcwj1mJ2+5E;e@XnDY8X5p%c?9G5?}X? z>zxxSwKZ66T$Qa z%@|ExbEgSQj}|+0RoXq%2N_O$x)#x`p%t13i{1xVW5Y-L9i)}*vvn)_{A<6KW7-}_Jv%I?f|ie5FB zOAN$6V|EWN|8TqwO4?m%_awxauj`JE1OB67LI^Xcg#cxoUG_q1%z!-cjfSjjqgP9) zL)Y^e+kBuEbZyr@_0;?sDCc`PE0K(N{0^YIt%IKS36lC4^{S zuu4oTgP)|_j8*K_z_nmJ5b;xLjdSxnRA9)aP-(1R7x$GE zOzbVU0l2Q!a9rOUWnndshsd3B@Yjyx+~55!7~JhH>xg37V7CoH$%X$QN$<;=BW#m^jfl(1-6b^X%1kN8y>Ccc2*L0W+iRKH(Wxg9 z7WjxlF3v?rATmfJab#P3&b0`i7n*jf+x3x5?~1#J8<7{&y*XHOul5PcS05tRc9*3C zxGBr59NSYLR^@(OenmYoQBm5S{hS>x;pAl$iX z19}6{t78qHrqaa3fN@9Gu+2lA9O(1Owj7)u<;E7FRKGY-$#lEsI-MFNgVHzG;DFABGQ^b1AO^+C`;jC-$71nd$FhRF=r-xrxy+!rE9utto&q zSqu@n$>U|N^7)HM(R{j>%7_FHIy_}i$QBPlfafg;;3vNu!bZybC26QU#iCXUwPFj$ ziKm^MKxxV=etqUf0|T2Xhl^3UKeM5Y6p-yI4)Diom$4#h#m~?Om^#(|aV}lZmII7F zSPh?=l{|3ROQTx!r1dx7wf7&Ncy7B8U6di4(~dC~BELtFo z^zpz{i|dQno2E9TDTWn(_DF@xaV;mrn>Yug@J!RP%-)Tokt$pB_Z1HcP}TPwX=QQ- z`;UXYCy}SftU-D96zLV7YQZYY?OS;;pb0mn1x_5^+lm7rFH9Xe;*PEQ$qZ3!SZ{JRdswl^~n&9?}k2_9lf7U zJrvMEQ|cfGO2cC&Od%eP3BIB{$l(FTfKsPtfuD=I&tIcuQE%Gr`r;>JBte5)78S6l zjpGJ-@KTNvM`OiLXxmg&SS>T z*kINHSHQ#1EK3ecp>b8O7|}41cFvJ>6~@=#yOAv^hJGv;S?YV^ahd7b>{z;bxa`q4 zmPjhO)J?6pRHbDsk{X;hcOPBat7h2D+=jX{ z5VF2*PB6g9C$^<0a}P|8;i=^h80*r(?_>4g#psbeqpvW`v~Y@_sH6)5WxbC(_jbquryRKZ6_}fOQ76vXsLcTcLx& zBS@VFB0#x(@Nkds4tM*F6k+1n-d-FNb~sW)GD5_V*Ni@&)tT;#AY>{?RVwqRK2O-o zD}Kx@3RmM%BU7ZQ(rpe7Xe$m!CFqU z3eIk7bQMZt!=~QLt_|&-@ll!@ce;f0Ra9?#XxEjHdE+vH9i*2g zM_Bjqo>YW!?Xzg{_tqP&p`Yedqj+AJo##?fj#cvf=j2q<-*HJ(r4hyC>ML5YM?=5?(C)SY6-QrtSdbKco zB3X;sK7PN|{50&P0IW^vv_DZpAmhmCs%S2Mm4bfEER{4P!CP!9Q26=gAK7V!H`^AD zQ-=FL-^oSL0-wL`sh!>NA4p@;6#LxkvLqC&Qc+u!hs2ti_F_!K zux`r6SUf%l?qSRJ)X`i*&D)#io%J4HrO6EC(7sK>UQC=H7NFpCX?wOPzSmUha#{vs z2}y3{l4b`WZ)*u!l#XBl(kyyZh0F}Elj+_1e4j8r zqidU0Xy8ZEPX6ffPKP9GMmoh{b`tM3DY@h`>|IJV(rQ%Z$cb^|X>L9hU;?PmOEXnw zqC5OX^uW|YnlV7C%?Zb%U()W1_X@i)SHA!h%;I5=u3qyV{F`A#A33coj~X#@4N)+i3h{M&b$%2 zHO?-1D<*Ui8xWL@#YwHr1y-@uF8}eTxx!M6oYs$Pw2no3BJ*muOUrk1PXL={a8IxEL z#DF&VG!P5LY)m@(;Y>Q;53SG0xs93iD`OMB{^GVj*b=_QvAcm^zl{PqZMqI7*U!42 zUDNb-n};QI-I(xoUUfFQW3rz)5FTPzs_!p4%`-x}$LyG6bBJ8@r$cN+*m?RN8=J<_ zUQJkxpnaWM0L#{Ses(#Kq-8&>BD?{g$ z=T2b}{!lP5A?jiC=l!0$wjy?u&K#bUaxTQF2a!jyTU!NV>HZ>$3cumO*5m)8FS{ycV6&cR|n+cwc;xQ^e@knPAq!ss@muj6+=G;6;v% z^z72A{KCm-`;*GTVH*?H)juvMJXhNnq5pkm4GARmXza_=Sy$HY;Q-w{el**LMo~-| zrQ}VJmpnhUM~G^msm;&`=;i@Ri9^?uN&V<4{#>rW1~un8UALV4Y-&2ATK_VR|FR7k*|=e>(Of){+Jpw#5qN0+yw zJW+s@d>4I^h%~V37Z@Yrq`*MRQ~hg>fv9`+*K(!2o{C%6Q}Ef2?U`Dp&U%yVc1o47 zkQ`Y8?^g@>dFHf59m^oNo>_}k`32Ts2#fIYW9%?t*O|J5OFPXaN?r*?6%J^Z{k&5& zK+7#b*mCZ@D5Z`ZImTpt7{7XJh~ksuz`S+k%V z_iKT)PM;Orv>v%(VstuY50G!8?SuZVkEtR7;~U|F{sJ5E=Rkb8M6sUOQD_h&6maO6ouNlV4lRDPtew1bVBd^*MJI|)$Fuy6cmb|W3n+?!^3}dG9Zf2 zSPv~OJs^^|$KzP@-O3DLMzXf(vvj_@GS+_WhFd%V0j5uIV@&b?>?uUN#Y*%H2=DYq zb~4;QIg@oQ{<&Fb=Girkf(X!{jPB8IX@L|+-v2jo_?rRa;s|(!8O1T~$PP$VzTvB1 zH9w`}E|-=3n`OyN!DEl&efPeF{bO0(V9H`uB;q6~)qa01k;9nYzyKHd&o&-REqzy; zip8T1EaH;lfR9F6*rYua)j=P%|8A+@JCTI zii6b5gjJRYU-D|CXRY6&-_BwHP!;n`on{Cc#4Mi*YDgjB_J#;8x+MEm z0%-sx9lJg0CJ-F?O1BmchtE!=L~Sl*8pAH|o!65)1mLH&UL_q}20t zi4VeRm=74aT>6M&Q~QmxJ)suWKSM}vshp1Fyx&cV7Zq=sxP zFt!NVXbT7M2K|@bmF5r5ff#>Dkx%1DyhoJjo~)5w>O2Y3h|*A|^REq(Km7L^CqFyV zLVEg~zj;bK-XTAFWd&~9v{?P=ua`9-$YFXPf9kUGJ@mh+;De<|FF_|WK{8;y^Rmlh zd{M$OyAhfG1cG9H(Xz1NjvMVlBnu$4LJ%=@K9&1-Up(I3zna(%vyaN{oCWfFiXPms z7B!s3`5oeg(sh}0(3rx8d;EsnM4fm)7_@ZBKZPRgYt3d{b=(3m9)zgFUjWP!;0QY? zGkL26T!$EBIwgT|2KBjQ6TEt*_j1HK?6m}mtc&E?sjyxNDOA?j>z&a8qUlsuT>xd~ z@%s%VUDSwuk}q(tgoQN3#9!(3dw!#hcv8=or8ByX%J-}CgouJ&Ey|{B{#x` z1wcds7i;P?lbn%@j&drBQLpncvCI&LAfet8$V_nS9uR#*FZt^{G5F}<+)|Al8-e^y zU)H-JWwvh~4dMT?D4a#jYA4(sa;l z_5UZQ2XG8m6d0D6NL8V=t5qq9J%Kq;Ust30TWt%%vJZko9S5ST10WAL?yjY`HLZY} zulr-1HQTIl%DbKow)CI*YnStn-Tl^;hd*Llb$Y7m=OlU!(3H;8=X?{(sn@13Nl%pn z@XmzvOPbQ+RgVz4A{jR#|8u3)|CGk~=}st6YNaahRJxcyk!d4S#1Fp8X1&;uZ#(bX zB@UZm?^F7#*YP1w>?w@*@Pf{-65RLx!-pN4rs%CixGA`Ny`(eXJ==dFj^{^hKGw}Q zCl>lXIs?zbV(iO@X=+dZY`mqw%J2bxeEopu;kAE<*CmAE}OsVy@ap(xozJ&eO7Lyk1TYPto8PSJX-fN=8&a!zB$^-Yg5MA(-X*bIm_w zQ&wt0Pf)7I3GVH-cb2fOG1U3+pX?pY3ys+*`KaKzDDm_WQ=gAcLVK|dGvc8HN69>W z!IrhRwKrAxKs54)#?U5sA@(HyB}$LE=D5ptcM2u3cZalMUv@b%K1XdU?lras~ech2NxbK#JEcyPgmE4>GPV{b(!5GTdeS zGs@rVQ%VqdCDOMg1h7vsrF)c{T25O&=g4Oc9^G;fmznLC%nDrpd`o{9CCGn(tM?=eBPEb6< zKF!$GBF`B^Z)wX&V{gpS_O`TZpG`KjgG%YMikyXB2rr@saM=E^nERz#+3fd5vhhI; zQ;D*t<=c-KYQhdA3tW1$E1F9ys&`IE!ai0DFAEVrEYrd4b2z1VA*-^G4=!?o?;1c0 zFsKE7T0g&iY}hFr+kWCL9>7#A=U|ssed6MgL(%|iJC}_ZZY;QKa5jkVgSxLRp!hY( zJvsvQiIs1(^6Hmgw$Jdt@N{F?>e&^66bQ90ZtQmKc741Ra3(In8eAi%6h7~8x87zz z$c}mkK*ZkNn?s$8tQ;YMhfOb&hrgDTKI7t zYKs07)5t(N3 z-*w)M1#Oxd+)!%0f#)x6`yX!dc^NVKy&K_y@;crEF;)#{$^6jn+H}}#F#^NRV%*Os zMCB(Xe-*@oy>jX93zvR)y}>pgUv(3GWbp}IT(ou_NNKd~CGl_fsIU^g#9tulfaY<7 zj;i9IUkEZYO{dN==-eNJ$-BQ}tZL~*eDRC2dHJ-8lWY&Uu~@@O^KC~lO54K{T#cy1 z&SSaQ)?cP1?aIFR`o%?wZU6Zj9HDq30VN(m>K@3fmqbb&nPYbUc1_`B#cbXhMF&_9 z_=%gVlRc;oB)G$%hNHwNY{yggnGG87=CYr+6fr@;kG*jYa>Xe0=Gav6*cgV-2_rMj o*9*J*0h7G`{hmC0OAfq;`}W7{0=4w^dzi0RD%#2wiolTn0f*&%zyJUM literal 0 HcmV?d00001 diff --git a/node_modules/terraformer/docs-build/assets/images/terraformer-parser-a57c9c2d.png b/node_modules/terraformer/docs-build/assets/images/terraformer-parser-a57c9c2d.png new file mode 100644 index 0000000000000000000000000000000000000000..4fdfa27b69db47147cf1e7c0a1cbcd1b1d781929 GIT binary patch literal 24986 zcmZU)cU)6X&^H=H5JW_z2~mnP0RaIiN|z4Odk7#^AtAKTr6^57dJ~Y|drg4Q6b)4b zqjUn&4JC+_fV6w~J&|YP`3Ic&>wKP?YKp?VN z5a?1K6(!K}B|4xI_+dq=Ss;zwosoWaUQQroM|XQCPAxaP=T1gWc8&p_15R=vke!^C zs%Irw?p{?$QCXsv1{j<LP7UR9k0L|ifB^cd3;-e{!gM$;up2d zaa)305J_(mrT*!xS0|$6Zx?aCe?#0 zuVhyLMT0(rFKU$frQU>*y@lo9X4Lvox4ReD8adVx8>>Cv2K_|EazkWUNop%fKudeewPk6g7E;{gY<%8!! zbAL{V_qXpAZFBD5Eo(5HO89$HYkCmYq{ZM1vyQ3d^Pv~vg!X6L&>OcOVLx}{EpyRp z{4r!BKfAn#CYs6KL+_r1d<%BiT;)6EOVQH(?;E_Jp~I1#6H=WqQ{CT?2dHLuzY^Px zbX1DHM?`|<{%NSuP?!hV!jm)cVA!n08`3M`^E>yO>T4mg?UVVvrTQB!m~cjw)-VsQ z%&-0`PL10sH%pSYS7Y$<-7o`^-)4p}`Kt^1T?w0wzDM77`LEZTRSapR;jGEc$Q!~_ zww0{OyZKCS0Gz+D;e(mRYWRnI&Jtlabq?aFFeWC~fvd^?d-*^G#Tuxvs{K&jQcZvb zv~Z~>vR75MKkWtS?};)Awv!lf3=*KEhK3*H`kRhNFR5Pegy4G~{J^d2XL#p}-Qikf z$?WW2?CI1utLaD6?_{#uS9)W1SoAX6IG6g|q_+o%{xw6Xk|tRt@9P}4@Bcy_YK^$_ z2DjAKRm|p4u`E1E5^uF`mg%huotwIn#-;GyP|H%Q6NdX&gZGNH(cT(g{CD#$Og+je z=+$B?8=d?Q`Ou#=weJhOEpwJ&-`Q4jwoiQomBD|OMXaCiwi(ll^hC2ES-UIYWj!4}KOuK6?{iBE zeQ*bJoyAjw8yZ1l$+!g?3Ds{8dY7PYK3jB+n3IZii2DE+4-bdB_=Yofp-XVO7U)j9 zHJ33|!o~+%_l5noZu8KwHdJz`(ZmXb=n)a?!6np)A9Hdh-#95p&2>r-rx)Igmvo)h z^=w@;51@l9C!7^3f0x9B$=(5G_W}ji zeP(O+u6)TsDj$0p>+O=p&I8Ua=$#YdNH)@vGR6&u!Gr#$FVbVfU3{{=f|WPlvJl7vke+gGwqYtMjT*vE->1`X$F~DI$JRd z9_w|VCPvGk@B|^spGP3C?Aj%*+5HQ_sEUA@4%zOV7^Y*4eKLPHX_@tD-Dl!|xj~Yx z9B6OBRr#0(ep=>c{kpkwtREvV`=xlM*map>qm_N5VcwU29&bH4zaiQ76IS!V-L&KV z@(c6YhCD65gvW}H2jrD-?kpE;`W7ke$@&sD@X>mhm#O!y8bQMqbInm=qI z+rQP^P4<&(cfoDD7YEafYNC=^NJ}!t$Qcor_wCOKsVUCP!MD|DQzhm(c%WY;BB*mM zp{2tXhl}Hy;kfs0|KyW)*4I!T+ETI!6jPQ`BBo#%HZ8Y61$f_Uvx9>EzG zxPFE1KKw)pY&ghJoS3B7tPvQO0NQU%*>o6e&X6J;zK#g0Sxku8<`clnG>-Y1?6>Wv z+(aZS&CH&LX!ys`rM3M`^LN)N{IcQP@_11G{?9;*<1|OvjCKZK7w*Nps7duqUo*cW zZB&S=y*<9a9O5*(dsF6{(!#oIoljic%_IbL3NuoA!K&+NVNC@klrboLrl-rIxE`;&e-2 z=&WW9t}xvv-8mgx&cK97Fxs{tg*l~Yd>J;dF+S1mJJC)lf%P?Y2O0dM#lN}%>}1E# zxHze>=Btwv|P(a3GT_41J4>7eLS;!A(cf!|Y0* z*(k&_mA9)kZi1GdG=qh@N)$tH8Kb2>o`ec@m0vq3ZFT}*F)x7$M-(A**a}-sTpm_V zH4eX+{%UlRutryGZ`v~Cu-OY~IDbMwW>xjNU+tIrWf#E%DnBZoTNO`CHzjXdcL2jb zRwf+xO-9BYI?_6`>v}yb- zIhzjsC`?CMW0)XldEAT4s^pdlTE6+fb}~!9;%zO=b1xD%H0+@htVA1j+MeMw{g2co zEcZcoefCTqdv5&Fl=aW4-DhED3ydL#iRlS2hD*hwE58l+dE1;fSoJz!CE${4OdE2R zj)FPcWo*v7jeF_vkTD4L+9jt}zcR5%tJvaW{ai&~k0M4rfZVlV@#@I-)&0wUQau#? zS@0Usg3gg?OrKy-#<5n-ykJrESs23>3V$5WY{Db;<}(SLiYRcJ;qF`&JTnbF>s-_& zdPUGAGEL>K)yVqTut?!XGN%zgQt5<$<7-Sg&N-aQ6?FpVfU-78MI8O(QM1eSDep_8Pv(J2gp9XvuwC7qfqD+E9DSSEor28~mtC-&-+}tcSu8 ztc#AKjq_uuNEaYLSn}_MFJ(Z`6s`I-BY!FaG5{eHpZ_wRwNFFu1S8jgW-hDlh*=mP z%#WIugo>(S`lZerQEwl?Q&9|m?^{REIEhR_V9Rmb@Uy7J_2Sh!H_+;>({kh**G$hK zIyU%!`gFWKcJcK6lDuVtl}z4pH4@pyp;)8lRM3%WZhnLixrDU{j{>;#PIOIN=Zha7 zEQh{TF2cW9bl^djq=g?U#C{aIhhIDRZBv1(%ce5g}9zfBd`4s^oZI@bu^r zR-G%Gqs%RXAR!9K%jUB&<978)gtmku><7W+dl_{fJ~}VHqcH+!eK+Y$FEnIsx39NW zZQ`DX&|ao=+ZzzX7K3sv3+IOa%UUz%mKL1R$CP=4-iYE!?PlClTAKnmQJaz6gmi~2?emv$UKGDm>8nez8gXxd^D2$T;SLMr>Kvk~Le|y8?UvJs&Qrj4mnDzNxxcg?X;$@<#zZK~7Si+`BOl zz!E_-`j{}CPt|SGQFK^zcB;qV*bWw;xsfUQd+t%qr{hC0;oR7I!ay>y{(g>}>7aoW zL1awVUyXa)Z&r3@TLZ9I6uS(QzHqX6d#9gB`EA$ToNn1~PzV!}WBE`O^kOU0*m-XD zqXNPlUOxHw85rEKE`ga3ozeu;0-t`51gCBJF|}(gsHe^^+k&B_^AiXg?J)Z@iNsw8p$ zq#7y82PiOQ@h^UTn$oTrx4s9Tep*F6_yrjP9OcKh`-MKI4d4@51ZObl_nnkqYRQOA zYAX1%Yr+VlJ+nYbdaKX<)RwF)If71MFG{Sk6-n>kWY742-PMxp=Q88=cF)OUt&k}o zBZO#>CU^st;v~slZHPSlwA+5kM{H;ptS<7+Xz?yI%wuZWAny6kog~kgN(H|*@gzN? z8(v?a)=i)oBqiBX05KTi6Xr8@sq7;^4a6I2B7i z8tz7%br0A9LpiPQ$qS+s3b6XzntsMuUX1O(zEp&%nBLEV~N54*yV52yID-*B)T%q$#`DtFX3nmra5ZIm{S7Ug3+bU#Mk7SwgGzlNn;Z8 zfF=tk2I*$e%OTiP+Sfc4A|g20`Pzevt`XI%BULgn|9e}WNw@O|DPdK1;x0s4;t$be z85F@&Ku((0=;G-khNXia11BtcNj~%;+eV&W<04ecuZWL$ej6JvEF)S>qxM|w4bpaE z@my_k#1f$@1l$+T2)@sS(c3%oEnC1b5Wx(UT zy=K4E$iw>3_5kVr{CWtBS@*=IpuNX zSc`o+VyhI-?@$(pEcl8;F%O*+A`{wPb`g_?Z-^-E9=>OhE6MN?YLzX8YrNROzRQ)y zMT+Z?)P!qkroR4LJ9A4WX%@Mu0O&#mQWg@M^F*p$zhuTq%n>GC(b=+tOm ze@Z>o%VwPWUTN-!xm{gjSMAC_DwY@#tCX(|T-lvP{!**vAATXmtHY56)g@5a)Cq%V zu}+dqi>2vM`u4rvz>xNM&#OTtKAeDJZfdtz?U(Xvr!LzN#!sgP1!P5jDTY~dwdxnZ zaXDq!6|QW_5?9MYymqXpfC3@7IcfFNFgrdT%-U#zLHVIIqTo_$jXCtYLS5@e;m?<; zv&B~K7Sr&i*6xo4-*=R#s`=+n9uQAkxl4gvm5iAC$r{`GmP^N?Y9Sx-_)bjF(xyev zW0Tlm?<^6`mVE=%JX>{YJC9@bF4FzW)||AWX0ebH_kQPasDR}4apvXD8yf6W)w>I;k=6CxEOG&1lKK7* zSGz_G;1*#I#Q_C@b6fKoU>wqXty*&YhFL!n?(6uWA$=d@PTNeRnS!%0QAw$_8l>WC zXczoF`kfO9s}`(9$o9xJeSZVS>Xl``B$3p2w*Ct>>D{->C^e4;g&<$AO%@NsaP1ea z^2fOv%Kg|=&K?GYaJ68Y{wEwv5m*-*T382uIEvB)2ZrbF#O!=k0awT8ka2#?ZA=bV4iK=8a3UZ$t`of8T){nq#aR>f` zGB}Vl1km@D#qV18i&tg0Noe_HG1EoBeG7@vn5xjUk*_fZgKjVO1R`i^zNq_9yDqqF zBk~dqF(?uB=V|xu0F!@PB_H}X88R7uGDV%{MKVyf0|aW;F4&c+`)8iHfXxPA&pV_e z^mk4g42CY_B8`5P?zD3`N^J0%_|awvtx)P7xsWE#0D$cN93e*W_efs*%^EG=w#7DJ z1%m#aIBKQbBs{S^Y_eDW7+7@{CyNN2^hiGblA}en@Fe|?Uw_0%Q^e`V&&WG5;jMEY6hifB7G;8gi%2+jf8O+J%R6=QIfXx?$B zaX3@#F9(d`)W6@kq1Q>H)qp2{_tq}D3@OAz!PuM%v%dzu=5Q{v?S<9Jo#$;}{yZ&| z_MM7F`z=BcT(NFqWPgWX^BP(3agqw@9tAh{>xNEP>=K+ayy!(3BNGHDQ?6~)gK?3s zGra0(rZ#U_pJ(??c1r%*q_XHv(Qfluc?5{I0R|P~*U_$qQ4(m8uEzd-E2iBxZoF6$ zrn~C@N#X++^d8R@fvBWwnk?E@gPjVFO+`LieHCQclS}hbzoJYfZAG|j3*LtVcH|!- zGl7pbZl`fLC1#3jqh@~76Br9U;wRTFx#y1!T|Xxpe2w!?q+;=kTW)A#o=Li?DQ!2c z`TA>yS6?*T_sQ2VEPT9% z1c>0LO`um&Zfde90ZPX3rAEJVANubtdXZ(;jjLZ?Xlt@G4rQfwZ;Obw3XRl?UFlJ3 zHCV^FSyknkC5b5A6EYTAnf`4+_Z*c9Ktgrz_J0H0M>f84khm}9V{02hb0eon^HMR* zsE)wI>iG4nlP{E2lif^xQ65}=npaOzGKr~57?5PEY&AenR%j=jl5`12QI1uK$v}F8E z7+qAg;%xvRtgoD})5gr3+^(B6`~HFw5qIa7v*?{_-b3KfFQ>9F#$FoV&W8mV11oe7 zpT*eXbAEgMD5W6OY{#ueR;9t1{ATptBpo5jh?lyt53sRn_j`_)*;7}=xS*O>tF(!3 zkMC!rK08{GBFJl#J|lR9al^N&v|fMxtJ(k0BuJJMsu}a3po`rh&)3@^=N*!)P+Yfx z^Vz9htu<9oWY5)!%D}mI4I{x?X2mo&n55n28317*KT&YGLnnRx;dx=D34F3SpR8w| zSZ=lvxV;i(Ka=xw_#HBI+4*_JnshUz;0zxUTEw8RoiAc!MVO`ZblDpOl?+P>D@0k+ zvoCKewa?-bsuk}=%zsmovLt!o@ml> zQ=)t3^X?3t#kH-5KppMY#E03@a{amqO~y{E+pwL^_azSbz=rFfGup?$dQMt3Xoxnd zwI*J*GwqgGBw9#gFBQik$;9tkIXHjBC<~IgzwzMGlA^JAZW_P+u+jT}Ud}vNs5J&H z^oBV%1$@M`-5GQJth=p?8T_e>IbT!@Et4&ZE_RdYGL>Y%8o0p?-_FUHm?Sl_ox9JF zd{yd9_R_Ccb@)V6->x_e1fZ4B{o@mZZe#i28jhWw=!Mv!J-*E)MeSr;k#{?ptVElq z;Y>uE&4KGNyGH3X^y7VgLfGZn&}JWB-@wG{Zf;oiwE9jX)^cpiC8+>NPiK+keA(0B zl*h&Gs-6vqM%DmrW9b(kogQ`EzMpcW>_=FK#{YFCeeN`yvC$DB6C={6Y|$~28>PFM zcRioji$ZCC9NZ1T@6%PL7G%Q5fBkrd=d~8@T2c!Vl~eVsKzuVid0O$2=fJ>!>hWuv z6x!`M4glVfV4eCH$qGn7;L))r3*l0u+bek7BeD%RvLo(>2+ybbFdsA2q0LR(%Ip_n zI5kWd+=|nRyP9lGGlE9zf!s5EN4%?K10}hp^f7M#H9rW{Uj#3r^1Iv|u>Y)qaSK;tCzjLMK#IITgB z;FNlEXFyHUT~G*%EU;yBLX|L@ETAbVO$`+0=SJ|g1Cgk^|8HBg8rg=FQfn9z&~oXH z?Z$deU_Pk!|NM7$lr@VD{Z;{w!=`$WC5kAqJHkGP)^gbGDn2(r+x2YC*i>BmUs@Z- zpcEqB*2w^kk8GdbwGy_P`QYC36WZXlcjY&n4CAx)cHs4VOjt1yr8l{(e zC;(mB4>$}L^99stqR7QufuJAZ5~o!JP1psA%f*YHl4EPN)R2}7GQf|bEN=hmbnAcr zM3l7O{{Q+5UyNCNo72h>_8>qx>#g<20UF@$JcE4LJZtOSeLncRrYuKt zWC|AcHy2RTz3BzfB7&(&m(JZ$bU7NwiV-dSxn^y|#I*4pY@#_}qv%cZL8NW6WcxvF{jzev7j`mUUbiY2+!JxQ;WY-(Nejr>g0U?M>7XoXIHd#Xd7>}M9AAg|v&LK)Mo^#p@a>{`RwtKPxw5AHnxMA>ls z?#!|_y4G_%1?rqBvLK&XwBc{@nh=Hzx711#f2eJtLEPUBd2PZ?u9{J6PF!CJQ5K>X z;SrvNc7IkwgEU*Nzh-;u3xwZN>jhV4ud+;C;>16uuKaEl>A~f)a3J&+UQ-;(+DP%j z0#mkn*epcFa&Li8bS6(QJoDoUXtW-wSQqrC`9rRk0a>`Zu@ZHQR%39Y4q3hnPF}hU zSE9|DTvP;+T(}&^F9*69J6SVB&`I;dN&t&UBe2!F&kPI{0G9~(lm;4PfFz*J1-H0( zXX$Q;JPcG}H@P}~00epHPVVQjb@Yfi%TtCro@03~B_6G;ycx%D%H z0+Wb-OcGb`;_GjUm=2CIrc+io!Qh;Y6#W!1qjaLZaF^{3!u1lsHf63&%5-&dq`A=_ z!<>qYy^E)P@;3=f#gg^ure6_+`;9r1z5vni#BfIlE9Xc9qR2obdMN%bH=B6CA@cB@ zNO30QL}sY(4Vl3_~K!D1oV!{2Qsyk4c zv1-Q=NAKq;kv9fs<#8k;DoTQY%ez^-<#V$Pr(@Fu;OMGdu)=JBdA=e2sE(;`W_)UD zpf26az6Eu*Umg)u%RF-#Ze)6r5YhfH*5#H8x)*{SymtG{FID+#`R+@%+rM*kJc8~U zO+!b2q3p&YwMgf)h-0&f1>7t=^NDc1(GWd(2$`tztnfE!OswM7`^RDqprGXN`sPn`9D^b<@HP0y(y>@h3liEHKnMhu9vBVpWi{BWXu+<0nb}gAI7ry9Dy(w&V6;amI0fM%@0C~y`LKWAJo!TH(*$Hf(0=kY{!n?y*duIC z@HH0p1>C$Yo&;s_mRfZQa;Yh!zDEywYdMx!qF(Eetdc2cA>h7VPC7Q*smheK-pM-J zj|?V}a!d>9+oiM^P8)rf#MpdSC)ut$8~B1Mv)n=bYZR-`uzpF1&k<>eC54XYIDcu{ zg>;&Yb%uws-@*m%^i|R4DlI*Dm3Qmvw-8Nf1#M~YZ~ot>H7M(V^0`w$cWnfH+R|UG zdeC%ZA)V^<7hmy^T=(>0xQ%v8lhNaN3STlxcq2;WSBRLe+qU)N!xA#W6WZ%Lub;a5c4fIU+K2>R5VcvF)93XTvcI#ImXX5HzSMc`43|A*5O#O9j{_G#pzkSj=5kZCj zv6+^5smETlwcuWlaFYLoppE+{QrD8m7YKaKS)!5!93RIT5%XCb@cg9SE~$(wx~gD- z)!Xl+)jk)nTVeyelkg0c+E3Q&_yWYOjin%IEkFxl(hyqN3`t+*3NjkUAqSTpQbM9)n*^_lYJ)IA#c( zt$sjO5U-x)2>=R$zh5_}4@z8;V%?0S%S2ztyn4DAdN-1ckj|2Go@?_*)(qwt0Q-vH zW^Fu+ESG)Kn#ea2Sv@bi8p5&nx}BYj6K}suNZh9*ESz)#_ysIXQc86>g70)oAAa+qUDGCyv*{kg)@qTpM{~Do5`wKCs`R-|sv!)}$Xn8@d$jCyfW zp&C?l*LR5@Zy;qvFPsjruZf}8X_>&zo=U~&UK+Pz+Rvt9X@m}<&RP@NvwuDRNBSH? zm(?6pB?ZwEB*zKIAxCJ1Uai~75l^PVRsN>DHT*Ysk!pe5Hk@ovKn>5?MFUr3?$mX_;f`=;0TIa$3_(s(p)gA4y8%juZ+DQL$s z0Env<9li-LSp=OQObjLJiJ~iSF{qZwy&6C5dS(w zqy2~2#H};Nyp>vy>@(QU(Rx!$UqzFNEKJ!+svMu#q&l96gBYJ+G%yZyi|X?5?z}Mu zpliFKYePxjXq3E8+ql5#RZ)M45};yFaW!!bXOW4+tARUxPt{xhn41LRHDmKh=%z*V z2cgyr6gt2(Qhx~&4{cd`B9(n_N+D(c zi+bykT^Zn_IsLn-Wzv+|{zZ!g9d(?CcNi?^wn>g$QxT-( zGRxQCTtyC1(6R=`_V4TGn_{(ND*FJg>5__|txWl>(`H8V$2)<@4{A%Sjd!pWj=w(j zwO6W(SCsmlM=aN@xmKYj4t3;P$IT0B6t)gNHxNFPa+ClYu6O&`)&X}aBd{BzbL<-%chCG#n1 zHo@S-_@UUdKgs0diI-PWY7ZO=k7Y$$`J+6m9FJAWj|i)fO zO+7cpV^?TaT050lRIoG}-V_>cI@BcJ9V!Cixo;i(jmN)%MNYlL&f&|s1?f5W>8jh} zzxrMa2HY(rss-m8q?@4|0BV}%(s(JSDlYtG)!i4hL$#GF``|>P1LP!A=mzH_f-fwo z!@Iw9TxMM(uA{|=ZsAHKT*`O{$wnRJ(ezf*+*Xfpz>NzYp~=&nt4vRD`%@LNr2P|g z1Au=vOTWhsPQ`q_3n#$_e7%4GaP+ou=dVgfn5;)tP`O5{ld9s`U2N#aNS^=M(_4ID zyiUxuO9I&HM7IN69NKtR)WiCENcH>SG^!hK#bP*AlWNhAzVEh!BE^(Ri#4?D8S*db zXs1@`S5Uh+?Ryc~ZaX4|9r?HF9vqz|EMCXHOD@$Y3j$FG<#`)%=S=$)h2~>R*u(8X zs!q`l2(CG4t|JNcqF^%OTHNh-#B=M;KRfT|4dp&K-{qQpN&WoQq6>CiyzCXroclOL zKG$_gRGQOTNb5XX!;dK}s-)_?Nkp1OZ4%J1p)TA@JR4mt<~saQaOZ&E!-M+crI|_q zR{v(dFG$D{3`6?*bK4eX&r#x^@dyGyKvlQf*WGQwe-SUo*xv~?(#Ffon3-*{%@6wU(rtR<)uDEW{jb!3LJDNr8vs-LwqvOyy zK)7sfte<^6524lr+=^Am8hT5MqN`O#XC_7AsX`177Unc6$$#?VLw8QP&~}ZeD=)y@ z0ovTQ<;Sxa);l*EGf_jg^31B1ed3cgE_vO@3t$GSr=`n1BTU_a&;}t~Aw-MEQT8bi5Xrv~zGL>r^K*)#v z!`Bibr@`Z!=WK4~ZhP&sf4mg;-nX*nvz{1|ejZXf!Rq1^2uI;_m+iKrw%zxsfsn;( zmgskc3J*+xbcYh;&jd zEt&N9(;t^lbWUyW@)|lZj{oU#ew3*`NDkzojOk*wS*AK`-y1tHz;64bpo0`?_~Sha zG-tPtO#97S8!{L^YmtD^?qfCr+jXaX@|qBLAaAd{WcIpwWQSnfwh9JR zljhbEH2-gBZuw~2r5$r(K|8^1sSSb%kUzYK&)e!KF%@-BA2qkA`c12om^##&b#)k3 zs~D6_H_JDzF)hTD{qC1RUF4}7klx{iL#ea6^EJ2+yp$BU_Gm2wqk+)b7~+|#NG3K{ z4*<{!1wM+%@B~Tboy)UC;I-Eb55x}Zq`tmxLDWzqmX!8EnP|eo* zcd!JEAG65TYZA1flkSmEvyR z5f?$Wp1!4aHCxMB{`AV0i= zuDNE??7+Cpx7{`6Gu{e@x28PGUVpB)>|dj?FgI0CfLrx_k2z&3)9DIIzTKAM#*#OR z+12DyYQ4ZyUnZA1mCSIXWF}94i2q61551Bk{$HObn9Pome}dl(fIvRiPONTh+zrHP zNQO$YOh<+(#{{Ox+Eij$1C1{U5)nwxJcj2pAKYk8=_zjK?TO@>;^9g0&*0IPXP6w> ztxAU3i7S}S>~o>KcxOcPemvLXUV((U zr=uLW;jXmP-^LD3+cdlZvTte_;m#3t*BxGLue{m5@yl_1G!@HDfrY!X??w%4fLLgt zC}iS|VY*8z|2_}vN6{Z9Q+M&>gTChGjdv^@Qk3;DKs>zIvd3D0>^|39qYR>na7bOb z`s8fx=!p61gU6p#1cxLI;xKj$jx*L6evh%x2-SZJkoGH)r-*~ZAJUHAL2u;Q7M^7B zLbY3JQi#`tYfbJaSX`2y=seba-EBI%c;p?+{CFz+o>h=$0M8;RMD18EzG}{@_;BPR zCrO5E>cFQ^{_dj2oXPAfkAh5=g}^z?_JbP;-(pzN%Tw)!2aCbTju7LG$3K65a!e(w zH96@$GwFb?&KF;wvZ+3#!{*TYosQkqnP6W=7(??nHVZEQZL94yY*#($=fQFy&udg$ zN1sYjX@x@Wwb)>2a*)r}Pu|eR?>ur656=$1KX|R?=cznapK+Ue#wK9I5$3WI<<-%l zM_{*ZbVOZgjZHO^n%n#9ybUG2ilaYw!uG%6XbAA{+vu_~{&`uWwT8R8VfdKGkgpiV z`hCnNRiq~SGsPert*eB|iMg`BW-iz5X)X}8P^E&N_om|u)v9}3a!gCIR_kM54Xxfg z3c^}Zzd;Yv-u6zvtF04qoI@P#^i3!nb+F-{-Ms3@rIpG`m_EjWnGyiDQ6J?rGQY`? z*7K(pQLd|s78Or-@`vgZw^B2`1A{axR4@m3SePs@2Y>w27Gc^MeaVNHq~Bwwauq$E zrmDM{`J4pd9rQD}M3q}>9EuY8yVQ6LON(bJT1R%l57b~Nhj zBa3cmxP$gY6!GNvgLaEfv+ek!b7+!9(2WVf^Vpa`zJvN+L$kP!LU@3N)pPz`@v`(u zH#fZK&+Wi71Lw}24v}8PB>Sn}xH7nkGSSK*g%C5p-U8R+fDG8bV=faq7*O__6BL6c zrNV=XW4DekjpPYQ$8?;T+Qt3)_SK)Q7Fl>Fuh=oDjZTlM^$Nzpbf)EZ$a^Em70%hc z$SRtjlsbpLA4?gKh6+z(R@6JBpm?pA{r1xqNrN^ynxaUp2Sq3u>@K*`(FYf4#Z<>D zJo6rhnvfmW4ko=T%^BGD6>1Z*PDlUx*YZlZdgbM)lEN70Gr2V|P~~oX4R~tootXyEPK|$W5uy{yz^L!NwTNWm;1H z-+Eke5q9ESGox((APYy?)T&GRT-mtBK-D7IgSu%r`jKGXN{UDn1?292mAy^Xyl9ik z53Pr0cOO}JcGy4FOKz!X9Bx3meRToTuZxsmH(1-x=*AYy+4}<9iIG~%*Qr|4dhjYV z8@Ci%dl?qG+sIfr^A_EPbgqO@_c_ZqGM8$!ZZte>+~Tqp$_c*vSuu^)z_VrX6OVeN zE6&F~U}}xgN}&3qM+&%x_6A}jVrJM0@|A!fls$SG!S&i~oo-J>lq4l0%Bj!rKJ zcIQ(7#~fmC2-@^+PLP2hC9{vmEhF>%5eHGZKcJ~(myIMg5;#p zlergRZF0}QAvDxVs2X)OF$W6c>gR!TJlU%s8N)n)>-n??71Cu^1EYPxp6I{kxH8GZ zA2iZlBiof@{c~phkwl~0Yvk5#8(%SAoi)dr-&+giH7l9xwH<7=b~oIk?Zrr@3~;RAFR3axc&W(YaL{7ZKS2pq}<$jY*owD zz~BhLJK{mB17(O^+3vO~2|3@Cm6{>k6h5vsf38!ryOhjpZg)$J#oT(6jdd zMRzsd!-5#_zJ_;rmwC zf|YkV#4Z25UfqS%zx$%yG=4ti%)T-6kq95`ko6Ik(;vJb`SbnjIOfWoxyw7#ap$e# z(?MEevnL1OHe5AIX0HAd-jZYX`K;u}uZ~nK3zs5N{pmb;KkVBRSDBsAqKR2;hn+RP zOZ9x4gQ~~H6y&y?z=#I6>a&trTdQsMq)STYM@z@QzAE%5130GJ+~t1sg-CfzI9J)A zN$tl0XPSDb!yNHn(wYs>Q#60jnG&;|#a3k8!pXH@I8enwp~)Z4PCN?du;9)nl5<+< ztmGLj4&b+4QdC|_Jxe*to!{S3J4Fj=ie2!48!4}OjGH4Pu4s2A2&i<4DhpW9K)^*L z>tOvW-AX@jO~!!*VWUzq8;DO z#s>Ue*(a^FYo%+uJkIMPzKoJ-o9?#-`^3&g8GNYpZj~xnYFPRc^LNw;a~#g2 zxxb3Cl)di58ZVz#iwq6Dg?WqMPvh*HAUzX>(73={+9P9gtG|c9F|tCh{A?kT{-}XI zSQEj5sTK8yIPdnTpW64$v0o=V-Gq%B5<&C5Axen6GodS-(386kq~v4@XVoVt;2kG& z`fke171%fgTfxLE#5s5#g?!{C!&@fsXr|>WAWf66+(6V-yZ92ula@7gvOOPxdfbGS zC9i(9x*G6&H{u}Mge8NA!%M^Ke_p6;e-FO&H{SG0o$j;lx7TX7wTHDNM++lpe9~I; zj|@t#MXFsoMs4iM&Zhm5@*dLd=q*ju@sa|!Z~v2Yu|4>9V9nz0tp@5DMg$s{TvJP| z9sBv!cfocqB-9j^|M2SokQUpUJ3s7f5F6Rvs0UO7&0$14%PfBPU}UB^Ifhy#pl>bm%*rRjx7r&uTqcU!dV=;DDt02Cp`znQ z)eGhn0IpPSL}}5YDmSkt)LK}zJXrrG%ws5J4hY&7i@wyZN@Qy`(qjQ4%Agw}&A0yN z_u<>CS{J?oSHOD_DiBb<2-N=e2rD!jQGx(v$Mf%Ubx{z|))UG1J%a}Xv;ptKJZR`X z50ZfZ;GB%I>wgL2MTp@sA&i~r~=lQ>3fQ#Xx{r`IYzlZP9_&rl+t0*jGwpT@; z;A>J9t0e#mTl@|r1P@YS*MO{`!i#xPILaq;nx;orb12>XZ*n%Rr&@ObhJjkz3yz)h z0A#O*S%_SURr9}zX?CSv6y|~!o?Pu&xg!Fs5`{J}P8a|fLg#>$t}CCnhImRmh; z?sX>P{BJK9e)z31abHFAzk%bLF8|k0Gq-+#`o{ln1aBoE6JwBueU2V@&v;|?vm33B zd}z5u0fst{h34#4^&jRXEsu7QJeC zQO(W6gwx(cOPvdp89ma7-ExIXnV0+;(h|NGW-;@@L}TyGoU12LERgY$+4+xL6wEWX z1)&&_{m$_fz6r0gR{z141Mm$Zf|7$E#JH84#O@?WqROX(@Ak!~6_bN%@=M`Xgq_O! zTGC2r<;k59gATW$`wFUn45fG^j4r+j(+#~x@J+N&^!x+?CkiuJ$qpb2e$V_uNO0rd zH*UqzVW{6XXcu~xfQ};X<@eB zV%BQ|pCx-DFGs?*-A6ouC|Wu5{+kTm*|g$Yj;f8Hn}{CAfd zH~Nx6h89o7p;@}77@%NhtUcY(*~L*IWh*wO?6-5oMX|E4D(oV^>?6#Yy!^q_LU4%y z{;^|F_@WGU^jc}Q)31YC5_QP{vex&)YJzY>z)k+P{L{*;inF#t3adv&#=Ii z%*w6qOv44=wL4hu-1(l&cNf*CVT`IXBU31$}=CBtN^tHspy_9k-2C_QSLeT$Cs_3 zBNjJXEZ4su#U85HosL;%pV4(2s}j!aYpN92C<&TR(T|*su`V%ngjv63y@H5~l$Nd+ zTdxB2`KLZTQp};#X~lmV?uDcMstwr!BGZ8a4mUlWR{6||R`WHIlph^XV)jPFYGcm( z)tdfmvDO!BYrTwJ5V5-N$p~s4G^#!`rz?L?#=3#aj~;NCTS1=+@fNWT^4%P6Nr#%$ zEtb4^=K(Y)?<{fh7Exc2eLSFU@f)D-L7~Hcw&b@A|LwvkQr%LM5vfsz90CNRM%pj` zoM(d0>x6QA7p@mw@cWUa@74&1zg_sHJm)&zS%k}P=Es}96e8V1$HTUV<(lz3QhBY?QYt_diS)^O5 zWE$N>m2b{GLJXuu0U8KX4BJL#6yKX^q-qfgzEIUK@8KhBi>>OA73$Zc-xBFXKuRh& zH8h~j-ydj~&{cp8i~;-Pz6Q`zVAFQp2wo@i)DyG#gk!c#on7*0}>bw>^NBc3pqTKmN%J| zgPI9;Pq=v_vd$z{$Pwa>)(hs&$NiqUO4pXt9dpHUXqp>20y$j;plubZ>Rj~xpH>lg z0)i$GLqK1(+`lEgeKw&`y#joZjJOCE#9Wt0K-hC8YfHK_FXTo$cA2Zbi48t(R;zev z8ytUGou>h%ARQ~RD{z6YfhI`9yTPJXe78bTX?o`Hi%*xane5)^ri+kc%;PDwx`$?~ zUOxjk-)MNPKR>K1TxMC&HVBo~Y>%Jq3==c2ZYEo&-sMyxu#Cv!PcP*pX3hUl*-rb& z7Fj|#zOHxlZ?HhpJYN4=;WL5eVxMJ{M^_8KAH8(pzrU0*_T8Vi93kJV53fDf9lVvyOYT6xk&e@?`?%BqVX4VD2P%;0g>~3C&T11oQbtv0#82@8=-Oy+a za-Xr%3)R`Lfn}~$OEX$#tv85Dmp)8m;zSB(asns!C)QqqoKYyJ!2slQ7)d7Gd{&o* ze^hSyIfzb5*mo%y@BbPUz1KLp@t$i#kf21B-YOrp>teujN+0>IM%~vOy_Iw8Ham%# zLOcHc?#-`dV6$=Eu9HkootXT2G35v4>Cw$jNN^VgHJMHekfdA0!m#7UG?%Gf$o{9U z7|4 z_zWfr?Tr;Na!))Esb2?p&juVkIa?a3V=D4M(VaqrF##)EO&l2WIqK>gi*W~>z-vTpY_OhRZ_?z?h+PY0geJO@UFn(bk z!L#z#f6pcaOEVYF|D+j2I`OgdQD_q`Nto2-a?0nFqkOsTw?QU2E&JDv+;l;3%GL7i z1^~Sf0~3tI`)0VvRQfh0-#6fyqiwo4k^$bO6F`(!=<3@qjZueZ1~(q~DYHzkXr=gR zS()_0_Zj=oL>tEjPu=F2I1dEE(lbW9dX(W*p4G5u93>k6PEWrLgrw!%TRJdrTB7B% zwq(I0S@AX94F|p)h&aYN39KLZDS>TfGLWE1XvILCxdlJF7!GFNk?hYEAsJ%ZtycEv zGm$>ECR|GxompXJkTHJ!U1Vb)dY3X$zflI#>}8?y+p8GVprp%LMDd1B2ljEk4GY?~ z_weHcrUQScCByX#)^97P_Qb~qUJ7lk{pXSReMZm>b$!j>ILZ0SoH*)tTj81Dh-}t4 z>81)`^1gA_E{ucha>3wbr*CUIT{SuO#C?+p*?XR+nqGVE^Y6UMl<(D>(&6|l2n5nr z()&@+Ip!&RiECRH4#@$8Q5|v_Qi&*2{pFTc$;VWCu40NvUv9sFjs(2ZFih9rZGb7bilZq~Qrq&`WxHoU(-X&Fd~Z{&XZ;zUM4{wRcodKx`)|t`nq>r}zRVWcs7oEe z-Ybr9tI{C+a>!p1@}r!m>gWJKZQS8 z?iI6t2-aqq^4V^Sp|iIdgV+Tx&*J%=?80* z8YS4l6yrH8uDk2EeZ-Trd^F*W==KO;=LDC}zOJ^!Tp{nDvOh5|*s@HS zf8=x~@@Yk-*42!^b>PgzA2BJkpF>aIkz_g1?}Yq-NH}Tak|o>m%OR`CLhNIR+dg(r zL0=+g_6d9+3a!`bWNs6idTLGrexj8$y3Q3NyUE9{US!93TIu9yivtUIdx5}f6G;eW2#*s3ZwJlP?6fL)$00u~e8fqQKWs=~tYOli zho9qB`w~apJ`Ga&4;dE=xCB^}`n=V9D^+%dKp}=EgMmZ180RR%{n)+1v+)2`ePJo- zFW5MEqQ4N&0}jKgx9@_OLyFX=K~~HAfL>`%6Iwa~rh=zM+||z;fVVFE?86yW?FWx( zJ9^pr`7DYM;v{1~WtFnZ#!GQgA^7R}DSXWjMN0AV0a*ru>HUcTyZ+A&h!qBo5Esk$ zB~aUfca{#tA#i?*_KT?x5*3q#qJIY>Eu?jvrV7Lc7%dcZUNqKgRT)l$G?yvjw#y}CNtVA{L#9oQToz;=JV=iySyx%uTk{1SMd)!4V^r)B$Jmd@!a)} zzqp5)Yn#WBmaQuxy1r71ao;AmB;m+AH{CM-NHIW-`;AI_p3&<&zXu-Rp03w95i5(# zgM-qS`AvxUjU8itEVM7N08u_AyQFf>Xw>l>MH~1UPA{&c#DcIJsx0G-6wqXYO3PWjrmWXwL0-Bi`GzjIzmN3}?kZDIVEgh`VvRAhi`&=GQR zZtWl&LVveazoRTuUf6LU4pAvn|Nb8M_m7;df1naK+C8sBDeQwYJLetoCkKeh2>*f6 zf2M(^X19Hjfc0aP`S8x}ybQiDj4}t;*R=Hj3FtPn`aSDz+ns2j;4m7nllR&>1CpK| z;&6xu4s^$ElN2ornmpByQgCygeA^)?bXF znj>&xcM%Cri)t9;SD|03o*&r!sS%ltT_ zPTqPoP2xcwuy=KoV5@w*cEH`apR@VubeF^2+dq3I;Z~y6d4KOm4YqFyeT~ir6=KfF zh978T`~ATWgQWf>Ch>oxQH_!eJNC9vRu(4Ni95Jyo>?s|L^sI-oj4W$5a|+kl$_JG zG5zxAs4`fnGbImv1;*VYU;-572>L${7LWVTtV4< zn6s0@t@0KlQPUs!g(|^yR`$ZAox?eT$G{qh{#&;HZVAB(FyCuAECaNX0kqw6SkM_|dE(6U$;<#y5a8&=T zeoxFMPZy;JUEg$YXsga4Nv;9JN%X6^wC=aO5Qgl!?#a34^o(bgR@2cB|J)taq}y#x zGWzYvy2kfALayr%xiY~7gup1W%Y@Nzx1J2fgM^e@FXi; z%Bc4VJI6kPX+Cp2Rw%qN>`VO%0^Erm=cCMz%Jd^fnTDm4YaZ+xSe| zK!4tdGSgj~a%bXA>RkBrZsyL-JSyk`lSboQ6`KLh(v3r@SLXo_oywMg$R!|70Q&&2 zwEASgPEd0KU^Sy6CBUP|%G*Q^Q0WKf%O2_s(NLSf z)*|vXh5p~gz(Q=60my|=&Dv&e?O_IQ;{HQ0XqrVG3zHk^7LLsBjBwz)g zO@FQZy~SWS8VGR#*C8B6DXvv>1^{a;qBInhMW3Hle^;CDZws_nUPCd8VsxW7|B@eK zscGpb@B{P@3vEtZx=Cfm{<0r{*dWWnsP_bV4^w6U!+FO!&khh4nap*WewKIB7Rh{G zr)1q8dG%!d!u#f2uMvC(wm^-ib{P5_&um1Ge{cKL^z~^!1#|t{AsZh>O@8BUM%}!< zRmIcsDZRQ4!i4`=o9-Dx*BboXett2-8yy}x(c;xjmEn{+*yoUDq*OaXJ?~oN^ZsN% zf!z$($gM8%1KZo*eoZ`23&?dvS?PCn8v76AqmtJj{%NA0EWn|eLoofP z-9Gzq*zk5n5qMS%sVRNWpAar4eb%j@&++N^ zs7nexrF&7Vr?!R?dX7cPKRuDdp)!%4q0l-7P`U(za{Fq?rIjuuTIKYCaqJYxLmIN! z_He`LVf^dPanbPy%>2&ecX#4ed)jLI8%_B$NI5w`vThW9AK3MAVz<@E6&sS<$fk!W zdmR9guGx2=hXIyD<-r3bk8iohchI!vMNH1UM^5t% zp~wF;z?8!(@V^tmPz;~o&C8E?TzR}@N62h8zZ({&qonXndX~ab{n&{M+`&mK6A$H9sKAD$hLodBE zbe2zyTi9{!MU9e$99V0LS*D%8xO~z+$~KEdl`;*tuBTFSNM1S<+qGs}pIh0JlI#Gh znW30d036@-;n^wnw8H!$MXr3&AvJ3vNHmGd+1fMG6DQm ztUE2UBIKd+^OR_(7kO&omCZHG`iE&vyW4pfdXlWxn8 zcex4;pB++7C;(UZ0V}A#mOOA zGN#l50q}kOhSNcuq$T?7=4enrU^uwFwwHL{j`*hqXhdcW zvOy>-j5Xci7ZjMlPR}rZh-7ETI*oAazepV*hk%-NRpkZ{P{?5u-1RdZP&#^=(?tho zfGLkXd;BHpvIzzJ3n4Hh13l((G4~~?J>;Ro7s3%+8>-)P!G3S(Vd=BwL~AH1_H-q@ zbM|~JswI)2`&@h@3JFvOw>$Kjgxw2GG3Q}2nw|NJ@cofTs=$`w<)$P)YnStD`lEoFd<|BTg;Eylhfs()>=Ceu9TYW$vx{F$!}=kV zN{3;chCNKMw&2;SFQLlAl=}gtUjrDoJRLG3iq$v zXxG#Yq$GIQ{rdR*jXRqwfB(X)Ni517SO4BW!k2S2gO#>-7=|EbMu;N96ZAW}GF`#h z%z8!Sv+Eg-vEUU8&~@Dox}6T{L%l0G2~*~!97}I+Q^l6OZ1oQXo73JGMpWRtSO&oW zUZh;F*bc3N-2s8~>jf!OBN>y@xrqoB%^lmM7+mn+I(GJ0%J~Oa zTebXP+VuC}9AjCa9sh8{>Dv<{WOw4C90MqY17tje_D&j#UFwoAp=3X`Koo zxPH!Mtd3VQ%k|do(J~o`kZ8PLcVz{-+*#$KVeYTat-EV6CC2#jo)A*cQ4M(o&f)Rh;k3LpP$#8n8 z&b^-i!}PcUmDjE-vMQw{dNc6FG|SeJ9!70Xu={cU{Jc1c;L*igWyW}4(y_*hm<4D> z$jAKZ_VNeRtutFL*ehtdBP8ktQS-IZzO=yh$YT`f|CYW&G`jQx;zC;7k}@`^*nHM% zA`7Yv(fp3@vPiWCrMujtNRz2<*|C-<-)3 z=6;7BGt;IWfigpyd)Ga;5aaz{4zYM@vYP8g^JY!|H9H|~ACUTmz>JAr(nKrZ2Z4Im z5HVSjJeHcZj!p0YO3tHf{c{!EQ7P0MjcD`c;#I#kg(}`V>uS`@bCWx%9|Sr;0{E2+ z>|S;?zY$Qhc3G!12(0*nrSeq#d!Bi$=15hOaH}O8u!EciPbKQRDq|44f5pbt(fCF*W0_lCi+IwA^pzniw++3=7eYd zugket_$`F35~C}APk*lO1hT}|0*78y^LN3rt9DHn+n7Lh&HK8l%<~G?{VO+1=O(XB zM=L!+l&J+g%rX8Ljg~XJUj2PqE44xD!+jAFVOAS_8)_XYL)CRDe%AeyxPyXQNqjJ3 zA*i=z+OP1;yJc?b;oC}ODe~UsEM1b!*Ryq&ZIh}v=VaG=ix-g{RIf$&<-2xNp99du zK0v8LGxpbgJ$yLEBcwvcRweHogbLLZY~boX>|EdP*xC9Mk}5?O{4rg1%|I}sea7i- zBY#f;`NM&H(b3WDU68XswO!6#n{yOoeWD8Od6s*qxcK&`$O_jQP`$4_-!db;p#|R+ zY&_b3MrZov_@qOMQaZw@aZ;+N{w5Lp`*YbS!KWt~_i-k&{9Nj-z>O4KQtdiQZ_}*; zlp{rbd1WCr9g>GE5+}E`cEi`|9#p_%Kmph$Hp^>bE68e$9*;? zBYf@~sl^u9h0yGvg?|@|s^5hb9M6(pQThd+56=XBU2<*u>9wscd1oFJ z>o6SiAjP7FLq>~miwC4_XS#<|kN=s-Ab#WQQ#%NOSs=wh*GB{JTelvmzDZV`qd~+v4=Zr&zo9(#s z3}P$&O=l3BPv5rZlc)>tlNmJI!M9A#DPkV|l)s_6Lo(OYMw((d?C-6p@%kbI%f1S_ zHf4xNL#a1q_0A0-?`H&-+eC<8XodG=cJqZMa6$XTn>gk13Qk>Xh$Rt06Eun&{ku4O z+ZU5R^m+1%)a){iwr@2UV&(g=zF_Eswvc;-d3;QEbgE)K-{Q^_c1j90yFRz1I+`-6 z|2(Ro-FJguO=qVf6&>M=;uW2hx?)5$%0)Kx1!v3IoZR($U2uB|F{oz*z{^Vo_k_%vlq(6 zW)AhMQ#{}~{0M4ov|~ATh#gsZDV~Pe2HoT)!xhKj25qviLGxxNa8;vRBWKS@O-JmC zun2+jq~|VfTvMKv1a&*wvE~PMZ*4ZL-0R%+Jl96J^8B*#h4j8f?~Ga-ZWRE>ETA-W zm;5Sa(lz_ifRfHAfizIl7B0I$n{z*5qV59F)sE6C*2dHNVmfx(bZ}*Wd zQP!K?-^OflehQ;!zbvUV6gsbpSl{paqtFWxD%MXwPAL=siX{mArtyt>ZRdOc2QMa( AnE(I) literal 0 HcmV?d00001 diff --git a/node_modules/terraformer/docs-build/assets/images/terraformer-wktparser-b18bc9d9.png b/node_modules/terraformer/docs-build/assets/images/terraformer-wktparser-b18bc9d9.png new file mode 100644 index 0000000000000000000000000000000000000000..885d887fe4b20bf7a02401de70f23753c55fbc77 GIT binary patch literal 38482 zcmZs@2RK_{8$TRdDXK+2cda3fI5GSJM=H88{}zy+iZ_j7i+3Gs1qb1`*sf`>jPxZDSUkb95^ z>gG>L8yz9(T$2SwIZKA&c%2>@P%Mb{3aCIgDNBZ5B=IVkL6+E?3gZY5mw(dsxdnvegq+=i{SHgHg;NIH7t1mhbXmcsrN6jot)Fgjy3da<{XRs8&0-|YU2=w` zt@a~deepJTb#dtobWqt1e-o(aqmc6DXB~)iDf-qPW6q4z*(#D%yw>uAAXrGm=iM$9 zvFw5P0fz!T$XLm9L9Kt73U}>2a|Ggpi>;sjq-~`O6GWpH1e!ViVaTpFoxf3RoMteQ z8z{q^%pKsrPtWN0`?Ahu5U88nT`q^N7hX`xfSBN{Oj;H%fj%{&gMC=AdmVgF6;G0u zFwI%s0D;tML88o6k0E&}<|)=wjmDp@2R~)WXUAA2Og8Bd!vzadd(AUZ-|ZF$$S%eP z#OsBdzS3dx1`Z{~%>j3v%b69F_ml=YcUYw;j<9#|(!YTPRYp>13>QxK_mCAZn zU>rn*koHJA(u}x{kjhs02?AAp(R@wqpJ?l$R5gFs`3I{5OUAts!IPEY3<*QG0#Or0 zP)P6MdBwJun_vh3Ds(FK(vTX+U5oZB$kA#A(^m!RcN*z~rO9$-T=(gb^-*w;t?;h+ zq4ZX0Rv`8rZXZ#4iYwUjr3Brg(5rnf+Z%VrB0XiYG`S*JfC#iES`{RT8#F>XXT>t7 zxh#>eNFEtn+4xJykRHhYZk8h%JhX$no9J2nQ@?UBe4x_UbGUmS-M-u~_^kofXx8nZ zcd=|&#NEl}ZZqv`K;x}7g1+^AZd9C+EHhiW8TzNhz+PsvT}JL(GjcOhL8vnKhpSI^ zgW3=|h&4e}!+(-f{nnm`m`zeizAUk9^|HE**pNQMbnUnx8`eL^;S{&H&m3?CG-D)z zrezlQ&trAp&yq8W*5ui-=w<%01J$RJx07 zYuF=z`agr#4sTCT)PQ-mP-A{7Q6@aS^THw4KmNYBZbb9n^C#QmFIKkdaGP%fM!!MM zrAFVA0WzvlTNF`8bf4d9z%i62|7oY4U?ND|@;}2M385?mp8t#>opo1GNX&yh(x8ec z#AocW)Zq0zy#q~}`#g6bE|1krjfobym1Bc@J15P^lt)3`eT>|tPNIR=^XPqFRY{(d zrmUP7Ai1xfxZ#*;0$j*IvGI-#Xv@_&`vkktZ03xBP#8~SA7lkd`ioGro}nq6}ZDp1Dn20 zu#UH7(+EFby{+M=r+D+^?)3L3Yj34n=3JSpjm{FiS2%5-fnpr_EURx>9AAm(Ds`uF zP`b6cvR|<_IzpzPQ6^#|%|q)iHSH6PoI#&!=KEY@$Axh>FkC?6;*G`n?^LsU>Ri;NzB9y5eV!hh9}W#+FlE zdGH-F^mfr~yyb1g{#6ShK+e7gcM~0pw?v;juJ%2SFTLhDUQ04R_Yiz6Ve<9Qjs`<7 zsvmJyj4BghNJmHDW!7B;Y#L^UWnqn^7Q|_U9Wf2w=Gv?QkVD=?heFYvCYJK$eZs5n z+=Vq3jBBJczSS3!&mH@@z1DCzTXyy2bsEYsvXXtrq|DaiUxfl>)@VLN(Bq_hMUWd) ze9td~&;dK*7RLWM>$*ZD1K93g5BIpztBP2ZxP4M8VtCIcZho9am$zNsW=d48MiUJa zQFLmw%S27MKkQMh@mEgOpAgl8qyht}o@BfCTT{F`OHi+hmlzU?g>F+xao zU8Guc zu2srBiYg@sf{{H=qa?3X^L6%nl^r~u&&gd}KsUwQ=O4Jdn-h1j{@apxb zl8#%eaPH5fuWO&Sa=JDJ^`{vl?GI|i3DSJRQRTKR#8VlK<$E~a&G?GVDtlRIgHpA3 z+TbXiMOg<(Rb({_v*J`E zbRAk9otfmQ2(I5>eIIP-+1XdPg~xGA;$PZ+vG~VkaSbFRX3nfpy`;xGveh7(_O(>_ z9SU<_g6Z2M*%_5K(GOjgNn22Lr2XjH2d)-T=+aZ9ZB7;LgkHR@O7w&Dj*dR}ev@B) zRkG#*g1Oowp;0GX+mqsN&DY;_AQ-(*?fVqxGAFXYds!(+c1z2t>pBm|JS=l@lwvwK zJO{?SXB{o*B^xlV+ub)Eg>y*)(GwAA*4_H0PdimAAqrBMvE{KL&Q`r^TMZhi zdP;~zWs3P2pNZ`H^H%N-&pSM`^?-i&6Ff!Ucjpa`vt80d8JOdYvMkNP>%-PsSh~d? z6G*gJbd;efcyvtG^dtqCC&uxa&7xlTuTxGj&Ii(PJ^HXb@4HZbnSl=u{XIu+?^bfx zZzIZ_A6Jbzd1$rt_0w1HoRpOM>9>AB(gGJZAZ$Ihhg55E6lapfg{N;4{l+eHW$(%F zsGUWL?Sbx=`8tSb;;doVfE|7bkFI}5^McCWF6gNL7_tUi58CJRO>}8c`J1a|@78Kj z(~cpM9wOsSf~Rr!pFeCeomh_{t3x0QID77@kSLII+Mov3ihu=cC~K>B6T z>8!?ZM=h=4>m6y$#R|BcHrAHULVreV*H0)LfMn0Egg80Da}2b($+6Q``9Z3zEe_wh zZL(NZd5aBtuF^6Tj4-_5begRMgUtOGwk_H?A%m z<+6x`gjM|e)gmCq7$2cV$nveU>rL?Lt=+=CW|S>^d-GQ>#pUyh$Li-UGX5o$la=)K zZSi#;Ou(siQf1kraKa|~Z^hz6V)y>0d=EkGiSC4|^%V1!4_fSIN5^>a!w_7=D_aT> zCA#63tmQ5m5oKwp#QPPy{skLP~yDX=wcARJU`+vR89rphPD&qR3^^1p~$e-EOfa?}>6O1%e z$*a-8lJ~OVZ(6sWJXYvxf}UIz$aKiIG@!`93Zu!2Fe?&P-$eOKOa)9*= zyb&P#2w^7kL`qzOEU?wbJgt=0&AUesU4;-=4_{cLy`-d%IZwu&-N12zu3#n*7=@gH zY7ML&mGOP4)qdCSKZ1K7aw~1qr`nqrkDRi1NOMY9or`}t7^EAH$46|Pz#1Px>S8+W zTu&Xa@4|RMB$_JP>F$#H4k}gq7q$h6J*G{5ixDDXzis@%qwFWDl9|!C4T_B5T*?bE ztF!eOu9$DsOW?Z4w<YydBMd_;%p8WmOU4OQVti4-yZRYnJ1FOAp|-dRZ)&=Iv! z%^ogX%({?@Stj3Gf#n9iVo&~rc#Q>w#@yE)Qs;hM@c_0s!zIOUX^kk|EJ;Fs)~Vh| zmyfpb7;h3k&yRRG?d+4WCxMh?a6s}$(6W21t0APJDy=kOkx-^*~?$5@rdV(REOf(3ty?tls3|=>S{iY3w1Yvpo z$lyDZY9)ZfKusWTf=tv)A893i3Uq(d)++(bQDoZEx0jC?TX?^g4#Y2T55a?SeenZE zg_;`SCP3C=^+xK(w7G0~5##rt6Jl{sNBUlv)^->zw%hB&0JokBoI&&AfF1KGPXR%N z-(fULSnF~s0GK$O30eOIPiR#@YU;?ii?Ibu617E$3_&O z*d^BoMshZO(1q2#hfDR!XxsA6NUwV@ek*QLBd7*H$ELswkOU^Zh;vDWa(P4wAP_BP zSQ+OtnjMu1gm87qUrcGIs6}KOH0+hSAU%ma19K`J`oWbs5^}_?P`>&AU>=G-w5{|R z|8C&*)IXx7hT-&cUyDxFaqkWP*%I&M9VsJJbmagREb%{hfIt4tEtd@7g>(G+*wwmu zkL^F2xc6+Y-^9(oI&5RwU#)&I7DZhI_m{ z+_FA+#NIjIeueCU8Luw6x*x*+mCpPfhBh1dq=$#IYziT$d^0eb(xEf1%svVGdcn3YjM|Y#q`TgPC&1X8` zNc%IuKCOh$c8h=v zhs=7;%4|ujp+Z z@XqOPx=97T%xm84#jNyzZqdPYIZLLI_8pEK-LMbJ5&^H$G2=f4=skt3%3h#J0xMgV z@#xbA7l))EWd(p=>Y?t}Hk|KNA(mg*B-VO-Jn)goQq^Ubxl6jI?0WZHnN4rH^kOj0 z<2nH0Zxs^w3%k61o0s~Kb5Ctdv;is0ea#}4vHs-UNBxoJ{I*H+X6rUnac=!R4n|%; z49fgQPF!{-VRCwbzyHR1pg$1B#B2f@I<@NQ2;{;LrDm)!cnbP+-VRck8Cps5tM8pw zhyd7>6{2YfAqhuEsS_>0+^D^zRYrUEW$H548_L;(_9cZ}a(jw6 z4PdVnr}R*5-g#N}OZpRS3i>cDgt-5~QZFv;vx+x#?r2e7ZZ}Z(&8`2i%f};|h_;>k z1R5QIBZ72=bbQ!D-Qw4koY|ztxMV zL*ol{&kdCX7PXTd@VIBX=i1AW#fW>Mpzn?6J(gr;)2-gE$TFITtdDYu1I9G(d<*zRv^eX3`7o!9WUKLu<~)Hi@U1? z22zXJG+4aiTqOhIW7v}bdaD??y4h}fD=Z^4l08liFs|daFYmbc*_Pd*w4F(`6m(sTvFj2{oavJhND~lj2 zN`S0*cjTK=CS8)NvqiP5-SMdxVH~PIQ4OaUqyPHtG-i-ri2w#!MonZ=x!iSi5x{!s z_4b_B8qAMyVrQO~i`q`YlC}GdwxbjnMF{6^y>t~UQu-uU0n4;>El`nhEL3H3F|iV* z7O6`-mt;EXV8gB};=bPbo%v4~b$yIJvQl)SHtMCP20$K6*zzb}G6WnzVUM`0hI{WK z=v>!qFo(B-(*W$Cg&mo)HYCwd7G&l9KB9v)5lX_Y0Qk0BHQ2rhX9B@zo{8T|9z-Oi z$Ol(^2=W0dd5K!Vz&<#G#2<gT{Pq@+}fB6u9jzSaWY2_WyrL3psp2yo8Pp;AD zcwG69nmE24Y^R__p~3ntzjh_(<|Pnk?I~%8K0>ne$NX}>Q`rGzYMg3p3u}~O607c0 za-4MW)f?Yyjl&5gtyefcH4FH46{kNmeZE2IFP!Cw>?C;L_lx=KhlQQ%j_Brn8#26O z@~e~KR?q!G*Ji!;I&ZsD8ak}u*N&+ms(c~9%EI7rgYA!y7+n_w-x7yxRn-(YpVbJ$ z{dz)lwJ`=SwD3f`A|kYYGP4Zy`?=@`;{t4uDdgY9=}{(=d;uWY9Iup{Vs?8Z@r8u3a&e#?Ab@Xu_f|t z3Qrylc8Pd3IF%SpZ)@i~#`(%kPmDdrfzr_kcM+JwvtgwMVW;|!E)+3DKnvraLaZ@A zw@eUJBRm0RwzwP}Sv~-Vfcee(ke@S;JA{y8OC^KtDycXB`}N(vakpwB9}@@IqR%BS zRGCW)kk}`^SHZqX+Q@M&dc%VtXBRbk&zVC(yTA^oLh%cuI!Lf2h( z>>*!V&W3lFSNnH)Uq?rQy9h}G^FoBS3 zO${CcH330-0=YX?3(-qSa{9g(&-0___e!uoN|`YYR73stIe~f6Sh1U?`s3f+#QqJ2 zaJ01ETqTh2Iw1Bu=iJWo6q?Su?sq@@KNI z>#%yeGyFPwIoml!KerZ_aWdJjkar@^Blp#8sq;$zVNFJ&oMRf~*dlJeG8?y(lEAWzdM|;l>dfrI&U%R0XshR!cO!;eU|#} z50EqZ;N z5xhB2RQ8Z_5Z4kLR5dU^5^PW58aeDQ43y9aJ2-`=6)V}=QhJ@J!S80bVqFcG<@ofKGgf+i1%=9+%${)w3+YEU9?^;rioLS0tk1cn zPM;!tGfroPPa+X*6c_3q17z-Mge91doLKDUt&jiI7~+*hZ>HsriBIocSl4aWMLBzi zRwmv-7K}}`w>PGRj!J*@*M@xVR}p?=Q&_bvZ{Cag%=1s;>suC%$S!_*Z0j?0VANQsbw^O9qp@foYsj(y+`nPDh zSmceTBbxy(KltL41$oO;y{PmdQ?#%%-1y9V1L%9q(Mm@^=kwlUYWse;dLH+-@h={9 zyISZm=)OU!I?I*1K6=N>GUvjKC;#+!igNt_oULj8QDx65@3>yLlI73sHlVzpkCI`# z@>VQh&Qqy6i{jBGPZ5-y$Vki1&NDKT(-!|`i=aYNInj4l=2koE!TIa0m^|$g^9=km|Vv#4|2C4H_9R{U!bLL0fi1SK5O8 z_Ojiy!Xh!oiR)~D=Y(RxfC8vu;N#cZt|@Q`0%1DVwJu3se~}JExF}6`+By&2LO@cSi% ztqN$_0oNckc6?l%Gtrg|UkYav>n1*ndBo)eP&H_f-OML&L230b%#Tk@Kxk-j8~SOG zsfAn(mtR!gyKFybSXA$P;E`!xXlp#l3N#^->o5UH zR^YN6@OryJ=LS209Ei))#VVxQmLhHlaaJKPPjuM<(t6nfsNzSQpehM~BMan)#x+fk z!5u)=%w-y=A|c}87rs^&;ztJI6fq~Z`fzDJFI`Lx2cQUu(kp02(4*t1ZTNnminz#g zU^rmGfH{%LNsJ#O9zL^@*E_Cv6(7{V0!xg$$kztX35(dm?XLv@0|5v&X1c!`NIF7> z-A_qpt7iYFnWtr+#kq25cgrFvHRUNbscqVOvoPy$8gn6mt9S@%?@cN!d4BGbSzm%rY=2y0(ZT;j#ue?{5>% zhpXC*R~SHsx@dFe-$?v~>)G()JNe1WoInkn>>eKga1#%4VFWsme}^MsQ2bVAn-4qS zLzf9nO-L@%rDIUpm~a9$$UXilrb&MdpL728fjG(+;WI8L>|vy&hO^Fn0x-GRx^~ft zSvD5>D*FM}Xngyy0}-(#DK(8qCx{p+xw8=TAlAM5m2$l+0{Nbx?+4nyw-Bu2(tajH zP1$tO%^QtYh|gmj*?R&IDT~@93fPfyCdd=zWn{^^gY)+ttbKczaBKv>yiSnqwx%zsw1wsL4;NwrmqE1 zPOV~P!Sg0aSkvb}UxjGk5`a7z8;mW^$|c_y^~*?R>>R9eWD`5ESmnSv+L3xsp+?GT zINQ*z)!L*l@?Q^JYM{-1oEUF28V1C_=)U7<3nIh2FLwYj3tBPC^XcMW&EfdB%$FBx zBW8OIfKZgu=vuckc*0uQGB_}d@WiL24!k13Kx{K3`sp7Zx~g1U86LNhLEr%%8Z6%e zXNWqE0b*1(tiFEFJB3paA%Hs=yn;m8d+6lEq+mu-fGw&L+p0}!>LBuoddl9!H5TMb zNc$P^7|kwWd(ByXuk29>_CuvY6y==im<6gTdDY7m-@CXGoBX!{rJIK@r|95@=o_1Qo%4ciWLGe){PK0lh)${Kvulut zt2(Zz#txFj&%&l~%~|_}sQiYPe=qBz#BP(tACkm(oa51B-S3lS;i>|M2_ga9fSP5w z8|ocb{yQoJpIQ^8yr5yoIBoY-wj6oiu>`#3nh81j3 z0~rW)yes%rgQy?$xBB^Dih1(C5NNaB>@sUP-%TsSG&|#;*;K0Xo-}66@NVXdnXz067N3Jm-@r_)rzQX*#VC@jN{#STz2ywV6KB7a2B$o zg~sNdpR!@M6mWPCD?$2n@da33=oj>L-(Jaq0kQl5z}DM1SCMb%)nRM=ktD2FY(AAB z`Y1gzHS0==o2acrFRq41koFF6|A}w1MqR~-x=V(C6UqsuYPej44dzF;nj88`NrBw@ zSK@8^M&Q1U%N5Z3SKG96=S>%m?Q4@Pl*n&dF{mAwY4u{mwp&ECQ~agJF7ndV@ghOE z^@gWr@#|(SB@%#@8jSBVuKWCpWd6O9F5Zx{-|v>RlJDpl9gw!XJUl%xEhPVSh;Fic z{P}ZlkRbZf?PpqBc&o)SJ^m(6-@2T`+|W_LRH8fX_<&PcUze5HkiOowTsX#VQ`76h zz83ZT*kjEppZv?hMwch&+vFvFPF~Imgm`{`yoctG<~2)Bqwk6#Zh2J-TDItm3KYkF0yTG2pV`jm|`T&YEs`*th&(HT`si`Vzj z^IZB+W-obGPP3UK%&Zk${avq4;NN5Fz)cBC1c zT~JyW&0$wobuHkadZ#mrnz2A=o%iC~UHhgoeAce0yZR5Sw zGBw=4sBUDXhJ!_RjdqXKG+8~EzOORmL=KvyN7c@{&aJ z3$}e!&rM@pR$)K?2JF$6rkWX8j!c0?XWpQwHYJeUMz?v>F?!gp$2slOuFM_75f<3$ z2W;!Vzh5C&yGu6#m=nLom$oUri-+LIG3%)(5VZL3%%gEGnrhMfAFR}Z=*9i=QIe`F zw#oUQ>EfC<+xo;ZL$u^qCGgR`SD+ErSQpX*Ru*v|@32~}9jo~_@_>>)lA1GJr8BJg zuw_lzLn+w*o98WYw+*4_!~WHkwyV;4mejtW0#Ur#0XsamIr0`rUs{A)@9l z8$E0Ql0f6ejQ~iDi00US_LoE?>MT)o_?4?af1^<;G;dDOZ*A ztTp&)7qs0lo00MKO2QRjeQ5(SiKcnZ%D?d6&b;ZDo8|)DyqCKsA2igM<6K|C%kGsG z&w~3ebDcxPrp+dQQ~kDp`c8&}tLt)V7?!1;`~{4zcHQVQ_0wjyw@rC3R#k!e7w2G9 zX>OH<)#06-e`4h__mPhcFpSCg#fe3-o4;En9tx@lcm-|+yI>sBG>-+9h0wLQne!kX{k> z>GG+6NjJ@e_P)&ol6cYetfUxh?q+zLvTCI4>N3sG?foa>JQ104i(5kaT#}HciO_MY zvOG)!d$19xjkd-M-vMPm$VB#1>pcs#sJ*k|@mMdPiMp|h(+K4Bwi9F)DA!f*#j&9R&aeXH3#Gaq z*$-{}Z4pt&{xg(eC3<$Rd$TK4$A01?k9o&}X$%ke;%sgB7ct0xico2$dv;Rwsc2;6 z2f~FU=9$)60PZ||WqYlwa+zk(ucPMq%joPX^^5WWAl&$MAH0q4Z+Qz5t7|Sh582CZ zkB|^$#n*$gE$yeD!erH2MYJY#w}S^oc%&yeL4b5!?ln|!bxCNe3*YUq@ZEU}#hy2R z@>d*bMeGYB^g3eP|F!tRrXCsVf5Dras9g#TPwF89SxYUxN${*c1y?osR zx-f6va%SOj%E9qN6B=>K@%2g4?xoxe(>O7&M+Y^1vR7&XPMd5FplKX4hvC)NO@Y>3 z3~T|YvEA=^N4|@<6-7jG0 zkYWRIy%7B%^xn0Z(}(i>Q2IQHqN|u8f|swUnBg@LI$1y&fQ~D$XJwt;`+1!K$MuW) zf2Ka_;NMq7RTe}QIo#Qlw3edLRZO9&s_m25hE5P=~FU z;{Av1Be#_SLfIEp@3V6$Wk?sWlC7ntx*W58eNl&+q>HNn%28AxpJ%YL=vl%wDi8pu zMJ=J@eJJd`PaKfRM&mR0D{G@V)(+3j~sBay-&3UI+UiSi#fX;E!DQw%Wjv?H|=oo#9DLEEkIKAE8c-T`^8dFGm2Kdg zjn^RxFV2$%lobcKEa^^^-{ZN#z7{AR*6Rs!cj@N9<%B%z`TmPy$w70mosDLIMG}>O!y}mP+1HN76N>M zFB)ZQj}Q@v-^l1KAbkLUHrkS{n6Wf0vFCd)g-f=9ier6mMX4%c=|yk#i#{k89%<0I zB5=s1%*X@TGO0u?5^~BmnVT{+K_il}K_bk_V1>)6{>H?_tNrfbS*lqygD8%FQPZgh zw(+(S#Z3Rw1guiIX(X7(Owmeo0|(cOxrNI?MPSN)8EJ`w?Xpv(=Ih_*=eJhXZt$0m zn;9L>nVa~wJzjwESsWq8eLIxR7R{0T<(XtA$pCOll35A^Vue#8r^;qZpODt^w zvyW$|`}MW7_Rf-ntnDsXW{<-QuC^iiZs;DeL(a8%j0+e~4_qJ)nX2ayqRV1mnC{Nc zFVd%aHxNOQ$@(bj_DC2p8hJl-s1nqSa0qwVp+V>ceINP$Ia;_YJim<+gims;Rh5{W~pv9>80rwgO{Skx&}|FLDqV;$KK0!%U8zC@ox|W)oeZmlF@G_ zyjPnUQ^?Wg^HK+|#CT|HAI@b-R9LkSDK3%GQlllPubu&R$ccjLZK9oFd?jt(F( zd#NCkm5`7OV`8@w_G!`WvORCRMj>fD9w(~&;@+`-$2KzF{)**{K5!n6st zDjkz&Cuv0*TH_P5;r@%u{OP3k#ygt;^plzV(Jvlfba4Bp19I=Z`}Q-FV5Hg}dye5M z^i*&i&y_6IS6G;i$A0{wG!XhnHlb-D%iwG@Fte-t)uy{h3qUIOp4Hhuj0-PG1FY|$ zb~dgxRhsgpaAXlb=8h~fm~(TPWLvVogWE--eH(Dk z_~aWedQ)LJV5^Y607d1g=TmR_%bae#k#T5I6Yz0T2AKqLCCt>UFS8c$%UUlxQ&l1PRW`m&S`o!r~& zTp425bWtc{kFg+$YQ@>_PxwVM&!@t~Dk_5W|E79RQd&rZ@Oh3N28H{uMh;IAkIDzO zzDZ2}?!^N%>#vz5ko#(A0yI+()z}kmL{yoYv}7rupX^<{i{Q!L)32f=E0Ul>_cEBG z%M=$sKh4mjXH&6-4h7AqNKBEO*|v(;6k9y65{SVW*5mJ>F)O)$@Bhl)Z2QP|(FPl{ z%Vfp2&#m3~x%ybtS%0}IV+}JWfb5Fr1;_;$;2-uHV#gCB4B*+UfXwrGSG?; zlpJhwE|283mz9|@anavPN$)8}OOaARjhY|-X21Rf?)A+&ausH`R7H&_)12h8Lx?H@ z9k4(PmQf1_9@o*4YB}|ySD3R|!aBF1TadxEb)pKh3DaEkL?X%-z^OJ<->h;aWva6J zEzVjlFUQw>`&f);*JGjS; z^x$N@kOy*pN$8vFX8N`qqzQ7IaU&2wG$4EI$R@q5qvgt*wf8zz=No()6HqovIvF(A zxp_}w`pB8Z=PfL#bGA?0#NrvzKJc0g=Sr@)6qMZW&NPQCuS5FYyvV1Eq-l5T8gFf3 z6RzWUV??yaK|d@r!MC3)B;|1kx|Fl}L&4=vLwpb**g)j^n-87R7hMxu<1X?lHS(|X zU8?%$NvSQ39$zy+!PfC;tL!46-RXjjRT19+1x6=`YAxxZf4&ilDHThtpQlA?PdYes zTXfAEjAJi+f#%f(H1ou~gohmxJ!0=StRDvD`TRHlUzxfYW8jM@)pXRVviuaP@b0`I zpYngSexB@Gltdpt%e{u#xY?sxY+YIW#e}nJOU6_dw&WT3-o2VG3US>Q$o2AB)*dI+ zzo8{bt^*aBxGK}sK8hp#MR-r@JdI009Q5>cn)Uw4tI~NH8$TUTj5R%~a3kItFmN)| z6J(*5HS#45)v?g_2a zh?8a-($1h>!~OkNVPK2g7YPU>xmvv@8z25hkIf^n$9|^v$#1dR-u|8RGe(8+?Vo#F z$y|kC^HO`{9)_#t(c*PLvS`_5zEIdcL=D2^)RuzRt3@ko`Y29rDvWLae9O%?XXS{} z&WxVu`+PeOTn>mqUt2VyV?@_LsaiAFAgy5*fv5T5l%SN~r0$6uiRzl%-MkHPsZtW& zw=N6cPq|m{7+0hEV~-5vPTnmY5M+}P8tvnP<^ZidK_qCL!j>|=2neOHzb+q7KJV!^ z{P&Z;%Z%X^*Tom+Kn{{&_oMhIq28!jaO26-$X&*oVZxejbs_IUIt2({=s5a%EtKnB>(*;w+c`^RTL0GJ;$ZCFRy=z$RTSm}`eXQ30O&L?XIXpFI zZ-T%<=i%3(E@0Ckw4dWq!59mzqSWt!3|!C1y}e2#W>IefAS__Hz|m1jF{aTjl+td? zreMD)=03FYGRISKYg>rxHnGvY`m%>~SJtf~DnS1>CiIy!{PQ9tIR4~RE%>=F?q@E_ zfz;NGx9p#rGm``EZY&i1jK9!KixzlK3q!JU4#fov0`FrSf!%-??lSN)f{0xb*$GV& zrvW}tq7^l?R2&5RFV1&gOabWF#p{3G0~>l?$N^h`K_fe3p5h-I*pB{*TQLHkt5byw zf>oMZzx?EL1FkHptc<7NyBK((a=-yl?2Fe6qx=6JZvOAgf2g2k|IgvSgk8uyFz$bc z|C0H?nf||r|KEA>?T%C*7MOE3P^^;aJO&?~{Q@j6h=Nk}JG|Ww)(>kN1U4muVo;xK z-tG@g4&t1((UA!O-UFO;r0XV^|G^aBZrE(7 zl6n~wll%tEa23OYHJ+4WyP#i<%j^wkXtfE1H^FydpEpeSZ!HndGQzt&%`~+1jV3E-C1o^Uv-Q zo>|?b4L&Y8W9Q@Lv;6-2rF+A? zs{l0j7<;uUX80P{>c*d%#J#`A{K{vkYE4V~tiB(A|ABuQHYmTlOA*K2Q{cy0{{V+k z)SsZC>qAav4p>9OTDsfhf6;sF9KJZwT*m2rx=K$Vd_#Uj#uNS?O%XmWg>plkIv^qa zoxg%Y-_uSyP1W3UV*$m~|6i|-C#DcdK#?c^irYBP;0#aF1hMHM-`M5}0&Ox-=ZyBu zVLHa3KpJhOlheoyS^irbPd2N9VLXMxk~^|LFCDu+uz%N)@&1+kV&TIfiC~F0Z{{Sf z*8kgK?z$arB)GmGD0;eUt&iH6SB5o?dBoeU9#DU2b;#PxH`N!c; z5T&pdCaDpkHzXM>uYv2!K$plTK9zo*pK@5bEDH|Ps#07WGN~YoR#adqG_uX@z&{Ok z)j04Xg{`v}f$eJa!mNmor-o(RcmRtqC}K%s*GAJyaaOj*nyXWNU`7#ueQLl?YdSv& zw0DKc2l!!tSAmR2;U6MVZZ0B7-HCj8j%Gm*;x)Enx~D(I;sx1s2PJ~b*{|AFTADtW z*v#19)Rz*{6m`(X9W27WjGJCi2rMN-=bP=L#X#>A?~@qe3b5aqhl9**FnLR}^Z8Yg zXiv#G3F5dIu|b;>^ZnPQ%1?{28XZXi1y+j<_hJ2z>gTz$1KsZst2{G zQo&}U2f`bLA=Wriq*zKw*~0ZIHVm8lDon5lT6yhswpf2>%fQdxrwN&Fd!2Q`I?vv~ zUX~QQ`2P^~)&Ws{PuwtqfP#RCfKo~$yL7kGB_-X`g4EJ2Eg-eDlz=qs!jemhNG#pm z-QD?IzQ6Z*-oN+mx#!H8GiT;AGoO2`zH_lsI1$^uZk~DCp0(SQk#O>R=l-Q7&;P`u zR8qNkMG3X5f&>g;g$UOD9sjOf8upBpPkWsCkJUmzGn;qUIHA7pH%s{<2GiC;WLuW? zZ+Uu#bc8oDm*+AdAu8X*)AoYqQTG>AkvfbdN?&v*5{tHFF={Z|w#+%Rh)^+>C3B@5 zF67-ePTT;E>o9lc58wCAS-t=$f@6?F5$uC*`eDRRX7ax*Oq%nw6sDgP9 zb9SDGrDS?+twb2ql-7SfTv?%-TqCWDXS8x@OatkxN_)dKVO_I^Eau%O8Tv%1XTdpm zw^Fh^za{*vsV7tCo3@I`KXMYwE3tf)Rq7b?YHjMi%Q$#vL~E~@qY($U{5 zXYinD5csVJf`fakQPkDqYUIX-G&+B6d4FJ;<@&0&D{-ZbM(Yt;i~FKQr{?gk zMrP4k1@+T+?L@)Ao_v~Ihyz)piz=$ppL{a@t~)%VYg=F|pXSIf;ObbC@rnnZ6Sv45N(t4X_3^zB=ox5%QxPfi3+#RLdlC_XKkfCOi_ zY)3atUAqRvfh<$4zIFa3=BbvaJ9>q9qA7FpcP3A<09%9tIO7fFZu(|6VArol7dQS9 z`9p^z9Y3sY<3Hp*&?Xcpm56f=GG|YZ(sPOv;yun8C$Jwoljt^ld8CY`UZR*|UD_qD z*aJ@ry^}4pF3H`$t`D%3B4GueGnH^K>u~j_c@`dzh07x<4b-$+SBql4x`Z-t=f-Vf zpise&Vy9x&!Ji_vYsoavl!LzdKs+7O`N;U+y!uWxYzy3hlW@ExBGPrRqtIc8=0zgV~5|z z-xKzPnWuT;!$Qr;DoJ0m#Fk7PqCOaLJFv2k#J-D-Kk;7b`unSMBr(_U$J89``s|dC zEh9x#dd8OY{{^`)PoA^_jUpu=P?5tdy6*cKC%8KlpaGze?;gJ zj_SonoRQ;feK2LkcHVek($^((ong5l`*@PMdwNh&)-TftGZDYD)xK0tdL3q+>u@>E zaog>NxhP}HTnPP=quOILEs3)U)7&KaD(DFJ5uND|L_=-7bo;D87W`DrxZrp} z%_T$lcPPE>mVOTrW)$vZH96Q$pO_ z4z~2bG?=t{5&L8d8bcuZX%xy5@Y@ATMNdwpqp+@W@-bS|Wmfkq4v)F?)SM2#ie5DO z1E+d-4rbi3b8K0AkM_QMi5~Y)3p85sX=pQ_H+N;0TV_{6;vIb9Uzg+9 zZg>b*!mg_b9e^rPo_vyVyw=da2KmA?B&H~iMu z;C!38L(su_(8-v3us7i$@_rwAc+q(5AKP~etdlem{YM=ht&!7E<4uUG6+lJeuizykM=(BarYaXOZrH;I=LZi`rGo~EEM6I zW%)xn-l2SO58Y5b$7|TnmLJVfHXSFpfxAIyOjvsIOd)i%3z86Vb~e(2aQS1!3Up=* z@^TV~>4M_s6S=kD?{JUxQ{#tr-*&AZCKz^Fr*LelBUTzTQCDfd2Y*OX{^ZXe-f#(= zuF9&Zma=w1T8}Q{qLq+6P>W4<$tm)!o)@mTkjx<2zF(bNAFbk@vSpTwtn+zMx zie^hQfSw?}`=}ZYC4R@QSNu!_@yxz?K^pZl;rP5;vzpF^iBmIw=CUwe* z*ZKq@c2}tCD)4GGMsRZKF7Km_~vezdHgl| zP}M&pS>1(aj{#RI?JvwTC}i(60pzo>J>i++|1;2Z)+ftlwzVx6Rg7^qxV%zi8p@zV4+Hl&ojvpzM?t^0<*l~(O5N?SuzRU1sP`n>tLPzz ztc#T8$;SOc`A+eq-SGFygfphjm{~Y|4Y;xcUxbdi3QRSDeLb(TgN;`qIcX8gN@k_M zv8yO4ba2pY-)V=$Nj+9jz?Uvb`xB``gbeRm;nJ+`O(mY>WhX;c-%tIx19TC%vJXv` z0pbd_7fcjcv!=QH=rOG^a!S8MVw>rpJW|!@@9S~Kp32pS_vl3%kE+8eSGJB72&y(* zB(_`it~k^2g&)m-wesnY$oR%L*XOYkiN&goa{g0znoAOApm13Bwxg=?$f$FD=9V#q zN|sSAQwD+dYZkNk)$&7`#fTzIw4P3j(o2RnOvScGcqgFg-KAG1;HcBVz|Zn5NUqZ_ zJ`zSKjhm@36YB~KRL!C^u*O{*k?wXDPD7ttE)y~c-7EmHLi7vQXU3svW+lQYU8b?kx$Gq|B%b|RU_aD9CaxK$dAnrGT@?3$(OC< zB|%d&rK?#-BowBx@nq}%WH~CrD(kkn+E$n=o7T;{x8>T{`Xa-OZRtCHkzCXTXaTpQ zZ`Iay$I9RLfTzIDJ$74nC**2v?Pcxi=q`s4v^S`6TPuu9lpR}NnYs7kiYG*Se`|C@ zc2eJAyJovm#?PQN<+wnkS#6s-T5f6f=>t+wto{))KsQe5_f4^!!nSIbTKQ13Mr8wK zi&HmWk+5B3JBg~l*dCtu=Yc%SJeT}-)6M;^-mJdUXILJ2YcE?4&!$dI$xx2pGJ3% z-Nhax^1L2A3c86?fK<6#SU5qfKeuYkpLo7#iG|(jmJS!C&|WTDS>o8f-FGI3{S6r< zYkf|iM+&FQH{~+#9<^H6z*}0qwjouv6e0>5J8d8XoLvxLh56VB2Vphvd9K@S(=W00 z1l=O5*E65ceyw6E*f~E%E`G89+ly&oBLuenG;wMcPc)KVT3JKR`sjFf^Pdq z!m}t>N~qIyLhy2&*HF1+blsh@n%m} zp)QQusvyx&2e=Y4HegxXU?NHG$|fPA@Xwc70M3yiyRb1r#F(ikEL0(^WG0yMRHuxu zD&~7k&cF^`zRC9Tx<&hG+Xth!CsHO~GT@+zVVCX+{OIvxB_yvMO%2*F%E#NX{{0Me zBBqlaT>(oF9_F~{LX}Ie*4RFB8MiN}_>Og*XHjALnBEZ{Mq!vTLihXsa*;9?86u|u z$AOEqLRkhF%FNuN1b`UPM#%>GY|q!EOpxcln#BZPHGWpd*z*08mF0nkCNCC8elcxH zXTZy+7D?*NPZ(ja7NgFhMK*H$2^ugb`*y&id%`ZdpFF1K%FMXZrkQW2{|$!n^dFzq ze}0}TzrD|YSMLy_0R5-xe(c|qP_j_BM~dtHM)w-CfQlmC=1xnh&ypp$wBVy25KobK zgndVKw_*BZeNRtr807q*nZBFH zWsKOA$MFPyw`rp?EbDaTEpTbYfV9YdYfKwpdJn!YbK39h%cTm;D&M>9E{Dx6sYs`F z0c{$5i`!4rPhCRcWWFF`g%j3{lqTuGiU$x>XRxA-ZRX7^k1%XJMqfb{LI|WLwU=(8 zA(Dl{z|?0KpI!u{Nbj~9z&!(+Zr)~Hh1{2#5(uX;yR8CUwe%?Gmi9X!I&Gb^TDZ}O zQ0{1dL3G?o)&#`MmtEn~`^$~X0HP-deY9KtAWOx~QKgib0zVm7Jlpu1^QNA4kt|cp zkQ&v=tB}r7@!aM>Gyl{9j;B?g!uQ7)ZAjZfq4Lh$m&6Pahn zfc;Q_YLDE4qOiH_cWvrDTgknWupRK9xvUXnmj;|r#ui76-T@3xk)QJnyJsomLhoaRXU|+4RE=LzP=;?1=KH=vSwqTebz##a z0HA=-Oj`HL0N^>`x+?9h>>x9I_j$3`C-oLXm9pbl31HU*#uJ|_;c?&a>TNYa>IGqk;9h&KWmx#TnWUgqQ~tM_RAR-O2PWC5$Q*Eh+$ z2rI`+rrH9_u`kGM!+UnQzG!8Mk47uh1}S1LH|E_CNV{HXtn);ZevAG0z*r&(FW};?r`NB+jeUUhb!UUE8aGLMo_*o{{}%(%`9m{%Ws>Eq4f7vQOo;uqfHc+hd3rdPIl&(|^ICLsj`t4Wdgp z{jBq{&Iehju4dl&LMmnv)*C{k zpwYgqB;wcQJ|sgO2%t}Ic)xDCBe;BhEdn)(u|kCA^i?%#%Pn)@Le7EufqE!_HP)jA znws7mxgu|B=<{bNkFGU+_J~CEr-1R`A57%o`gxREp+|}8bhz0E+Cz8w^Itvcm}eo; zhAw;78d+z|J5Q7@1p_T1W1HI(BH57KN3uREK*b%j47d9}muII1GJS;^H94xNQ1Y#Iai0W;<;AH*Q%vp}kqrRh zhjOD8HnTy@f*0+`CrnIC9p})$U1KV^Xa4S&9Xfb?IU3+Ky-;gKdT6KIxjz16IK?us zy#dO1(6H)kyl%uZ973z(^7i92%6jloW)=3H#`1Mwc8RYFpq5G7J`>C1HVW#Q3i`uD8g4z^Bd^VuI}K4^w}#jZq@nMjn` z=r?r$*vItGilV*55Vx_4{ns{mnsOOP2`XBYAot?E5Ja!(u9}qDd-SasQ-Nxr!yHoB z`IR`vmc?6fj{4osHcm)Dj=}Z`hH|Ia=02WLr{3PL&QbE-IwEErs4pw@^c56SiJGQz zD~dIx=+E6oOL5;MY61v_Uyn`bOr@B4c)-WsAnmLoZZ7SBqBWp}>>1lcPkkXVK}Z9& zjb5=HCyB@G07EzTSNvzv$Dyr*&=Ty~GG!Va0)Vr^d0f|Mr2%li8;0hF<}QLKKTg`f zmSyeqN*5f~3z`{ks$H!xaL`KGwAnUU;GGRDkQ}|?fR1JS#`ErJ7a8LMS|{56AoGnU zN~&F zaC}wPW-4#Q%#0e}_18@ei%gnnE8-7XQU#+ec(x3M6eLCT zM99`P5#tAhmB+nn#IfIl!r&Hu@vQcD%W`!#e%Jh$c;N|-o9|zDmp$HnsJx@ zgO%N(6>oy-j`sT~Ic-@rL*dmtaL68xp^)Vz0M-|W%9g45}`{G-60=`%hRcaH$6Zp=rJmArTK2G zoH$n-WAFozg3-*b$M{bl|5b2$Oj^WF8~8rs=JZitHpIjd4B^D4U&gQ1D#9hJl zX#NLWD1N@|K1>tT2q@m>AV{~ODDf9Nu5?!TZsK(x~a&PYhg#i zl4FkuQ7^!kHQjaKq|s4Hc(p2JYBcJCWbot^tMh`mI!g9^$b<`VFCKcW&%fX_V&|UA zXLF;az(jK>H3m4BqNl--oSBWktX*D|%7f$-yIZHy=z~2i8&5K-8bC!%C;OIDn?aHY z&F9|TG>F~fU+sMVV(eSU&*0v%3b{UEVMs;dCfTv@7qEpZDj$Km;Qxu>LkD9T^8vED z|Ef+njdZ4rD9`bl>Q<pj-(Sl>UMV^Fm zh2Z~psMqOt`AkkV;JdeZ2aFB?nP0}Y)S^~?tw`rhp6vX?wR!aLRt_S|XwumenI`RXefxd6wT zrM2p6i2T)e*DD(TzMg4>ra;Np8Q5}mqogLaj`?*$G}FG)dcJ-p$jEc(i#-HFEu?8R zcM$}DQdfw|2w*237dx7v6Jhb4JY(}&*v456wQygaz#!<4)6kL|b#J-&+S#u2(&)4R*?cb`KsmvhBot1%*8vvA#Z(Wc zEz4fff!X+cG1;I%>s(;O-Ri=>HF7AibhuiE{!h2s1)hz)?JzUnrmoCRGs4F0hLkzC_xF#~&Z+O?q~iy>u)(j<^h zD#BiFiZb?H7|}wNPAQBn6&B7O8ROT;XZ(vYY$`SA4{hTbuHR;MjzHPTW#wA`brw#s zyWYhjvWLv zfs6O{HRsL+#r_HZ>~hnZes#&S^88^o64ORN3J-R-+Oz*`jli%}V)=I`GhOjpDsc{O z+`>tBi^o_-<6Slr^W=NS7md@M)Mx;I2USWMWj=WLu513yE+0X6JRHOwTeHzieh;s= zvm2WIu26LL$j|WK;l2&MPF@{*?N44ER)6E{UK;HPREFZfVAMjq=BbVH*pB(`A>gRl zDP=0%>i6}^K_0qRr;etfC%t3a+s|Ch-z0poUmBW8p7}AWM*oVvkSw5Th8@7e$Fasn zl$~2`#3St!wkAUUclM3c0B!FGHP$U(4%f7*)_| zb(40zcXmHKIayy#yJ5?V2bdqg1%&;wQw#*|kuyy*-ST#Qsa$+!=Rof(4FMuvc%Z3f zJw{db zGaq>9N|5}<4Puei!xU4tal3K0Fu3gYDp8+ebNZOkCZIs2p|FBzbF&WQi`%WX}%8A|VPYGvdvR+8oEcI3q% zJqn6_b>Baif{k*VJ#XwsTJB>+V3xggguZ=$Kq4id{a!8+tVc*Z$*iEMW8Ps-Ul^ax ze82cuBP@;+6!lfX6`3{>MW9-}BYFPC;H7LB_7f=0H_Sx-Fw^q$MyLLhgn9csOOElq zzMZqQ>)V%xc-8Bk$5$@R%FX9j=dy_Q;88l8s&n$J6;}l=^hkGa2)l;QyK=pW?1839 zRro%M0p$DEVC3lvv!l;pv-Dh=H{M5FG~@0kBs_I9xW`PnrtwNDo`v|4emc-qvM2fq zx#aOb%yjY!x1A1=(rl*4*5O#Z530&tv0$6@Ib7)L*6(?LmDVEueVpGo{PM5zdkXi9 zQi$+Rj?!$Tjx>K2STBKOt4Vw{~4waG`8jmYJIJhXb(nLeklP)VLUllsf z$c}GB7nPodsY(b>K7-QBLrwC2ylh<8rA=}=C^tBlHJA%|GKb7CD+QrF6`{I9MRG-| zRWFjt^xLlzX>0_iu3Ix}713eNHyyJB>?38Wx`Oy5JY_WWQ4Y786iAZ``3qXtiy%+# zyYWqb`t29}s4lN4I)&7*yxa(S1-s)P7E(Qa^MBF{5D9W5B4uWHab^Z17CFOA#40fT zLJ{BB5KOd*vcSrVeXk!wUYZ_Jw5-j_3-1$Lpe6EN2n77y21@YbJ1q)lA>zLrC6zCx zb;Q+(zpf)~f?I`}nGQJL<1yS|{ZbF6-E)NHI#~%_7&`MVcXA&lN^d zkOkZlqwEoEBs!20VGd+Wg)H<%X=M0)C!0?lc`|N((MFA0Dj0+hSdNyuh4@M|)rOf! zNaf7`Hv4jNS17pZE!4Majr$|VwetK_L z0xzl1lm8|r&sPGbXDc~;5#@2hA-Gw$o!l`NSJGYrFaUIpdIB%I8`E6rLP&NJ1J$ur zg8iR#LGpa_<`D1;jnV@VN!giqNynz-&3g=mF<;rl3MhTol1Dt&3J$P8 z-;8Zxs*Uml{iVkUf}y7#Y;-m@vYO+c-24=d>e&^aAOrLtl0>ONj15MH`HH?_NFl%>VloAt@EjO4i>hGWDjMgXPmiB7hp_Ii|wy>Ad)d_y6Cd z*8T-Ao8A)TR*@X{cFFMp1Yr-0eqYu_lw_`lsC1#*P9l2?j{!cC@~{TYVcD_YF;C~q zrqY8smfY|E)m^RcEFUuOSZ0D0GMvi>keQlIs=RL*|cx zzg~rog3Je)J?bR>PkcrBW_ZJ`&0p1Ei2d$1z2Jt#cRDRKE5E$Zp_tX*03i1O1d#8% zmq<@lc??=QB1jQ?byT1yfOKvO&Mp}ArvsBd{nnP| zM~YmNdG=RPpgb)Cn~AGmfn zm7v+jzyET|7pbT51Eii^)7X zm^dyO7jk=Y<{Mx<`W~UAmenjDP0n&))iOWFyjB%Ury#le$R)lQBL<|hUe_6L?q$V_KcE&-gOHaafokro38|pm)t(j{Y!`wm*Evi<);#5HE2^a*qXm9=I56_ z4!QG4LCVMrV2X%I5cqwZFNPlrJQCW!RuJy69pf91V@Q>_5je?c&L5xGmss+Jr_I;A zW|!0kv!<3$ig%xB3BXtJNTFsL9<>9JKQZ2F8Apt@(ViU0>A|#V+qUSJ6JTpHmhpWmb#_Ui z+9CRmmjB@Eoy0Yk`MWY9(eH0~H4#$-g*JcmRJJDR zK;SAkSVWuEOTTUlO3y8=OoA2zDoZftSP(>sXc&RxLDx4Fr5{AyZ)a@J?wb=6K-bqS z^8Gj|RP<}R_-7_AlTcBec^_o}~9Ro#2DYQc8;Yu^*FP5I49!1qhc?kAiO zfH(fWyww7>d-$qTg!y_$EVI=41+sO#QnE)NO9>%XHDM?IM28$UQ-!#}wnNbd?oM z>Rj!|fEM0j?_y=Lm9UKquuVRvw^?2GRJyM0&f4!i>+{%rHH$8Z7o@HjeM3 zni%yLEl;MRiMAV}0xkEuJ#IZ6nrcZSLOJF^@s6YnkBbir^$1Alx(Ue&wUQWfL;TINlj~?0Nu-TU_LbfPSjnmTf1~GxtwnEbh?RE6G zAf8VyqERDhK4pfl0x_@4XS1q9a(A)CEr>A_tLJ|;H%m@4GG8R0QRp~v?#~RikZQd7 z?fm`7#X55F6VQW=lUPHQ^3BZOBEJvPrq$TId2lFX-mxZU_g2hSe2v$YF;wucYjo=p z)={f%M?TZ81G|`w=gt|CN^%LR-c0nXwufZg5E7{4;_WyvIX09+LYGC(OtX6$6dIbl;~nu|x3~#F;H06p z7hCY8$s+1PqTXDq2kyc1l0!Ep=S6;gKKz3G|=mQDbr zVrbOzFV#2fk?^`sU-;m66Su0?Ad^mH$ldpSLsywWVEcS$Cyf1F7i}0~9Sh&KEW?-{ zcZ+phiq)M(MlCwwFkKmjxGm+8WUbkQGZIX?>lU@z_9~pz>+JcqoP}rB1ZMaa|5*G~ z_||@VRpdIgl=G+!dLwbQ&luDb!wM(z#tIm17y}u6Fh?E}a zfm`+2HjEoriwXuymM*iV_KQyf%5;uf8{b$EvnG#q^;@@wW-?K?0*FJ4%y{5_Hps>M zALX4v-mp;AR4AA8&JhKBl+LJW_p?yuD@cmJ<|+U3Ilg;L7OK8!rXzUFZ{qV`6IXHWZjIJ%_Anh-7LPRl(` z%B})*gfk0~s)AK5?I#So#rscF4$u%1qd~M$_wIq0PgQ-J#P5CHJJ?-BtaGJnFJJDc zWaJxPC+&K+LOHY-+g2;cpK$*Ku>tqLiXJcAGl6v@ADRA~^Mf+MNZQ z!YFMmwP8b%pSm1U<$TQ1vtExw2-KUH+Vl+5}Dq8Wzsfj9%fp#x{rFpH`J6XoIX|XOXHo`4A-FrUNh%( z{itRPLDMJu832pX_bKYS>?~dOzBAlr6}@Mse5AA&`m*1kBHEm!#BFGv4bGwds-oMW z@mS(4YD+!$xZvyIa>Prj7wexlem)}-FOydYv+h>o^>Cu9D315SHLTEW-6>t(@9Y{4 zoV11Qw&3S>OvfdFtkITrkX^PVOImAeKyjq`{$l}|FSG4kFaGr;G?|CdSyL9sX+Zx3 z&CNNl+US~}LLADZsfI{6-RN_dXE!1awJ$~wxmrT8qtz%y#7%g>%uv?46}oe))iJ&O zmOY`9;0XZ*E`sTfKOywE-&_`~HYp^^YWgnOcm8#}I!}u%J)HXL9@1uQ(V205VoOb= z`Jt-K{&PYS+Z3eA@L+fcDuhekGv*Y3(Xde6rc6YU5rNgBt0${1z2{V`@9lEMLciMO zcmLrB!1KP#!4v6>NZ!AFXbdJld1faQ<9)ceH95+WSvLpq( zlLyc0FJWD$B;2s<9*2UU*VGkfb9SE-kcMYR{6bDEWmA{ogKm)5yU)j{?v}@&J>4eA z1@dj@^2bEEHwP-KUQDxWX3}Owp3Bc4gWi9Zt{2D}p z%^38Y*q$hdxi?06AT4mmJ``vhLC<=W!YFdc<`c?O(P(91fYc~-%bbHiE3VzL~ zo_^Jp;AV6l0q_MD$wcGktxkAgis<}mS!7xhZfIK{oG&wFH7H~BJocUqB=((S^)xDs zsH5{))9qg98N3b&Re!)d!voibZ{6@X=-@wx1zv#jF`@e1_!?g3K=Rq+kb*&8x zf3l~9hyFI2)fX8Eyw$#JpfeNSPVIGl0ZY< zr0ureP&sp9_{PXw2;O>Lv)yoBFK$7@-(Rt$@;LgF=t+R<-F5u>C_~F}*<>?lg14d1 z?Wiu~dWUWT!h~BR;pUKfJj%Iub)CZUjo@j@+v;nDmGtAIaExnkeM7&!=Is<|sH|a2 zh4y9)h+Fj6A)Ue>2WqRHI+TQ_-#asgBug)AZJ0K~J-kzF*oGB$NCDxWub# zuOFPT;HZjpChwgCm9_QV0kYy2wU>Q_e@TM@!+ErRG*hu-5XO4#M00l5{Chu*nRcIq zoi%45Br7P-Dh?mDgBm&Sg#NB)=0hI}fEyHBIu?t9|u4MI4ZX{jJk-@kW% zn(?t$x#c~^^m$zkwp$E;1FTo_d@cBk)dICRs<;p7R+Xt78H^7>n|2oAR`fYEf;sr! zmks?2cYTtOkWq3{ZI_wpg`mqM>pwF~DBAaADz`c}ODWj@)wOPxm1r}^BQKhE(}y!g zJ~QHG6(%{_grVga1L`EU%9}$!G4q#(=V$^Krs1W-k&sR7xwRj*66?dy6Kc@WvyHyi z0B{%(h5TvWOK|Wy^y>%20s55~wEqrvGT+msw%@92LNP2~>Ch(HcOG3E)y_ zNc3NM(9?eLwX;29RCoi2N1vjV=>L1@t0ICQYd~y8K9QI5sgz+RMF_wF3ABJhF#ojE zgB}499l&f1L~8%<4-caP<3EI$vLryX2-GA40ownag#Q&SPU1J>F@VDJf0OE9XGz&= zrT+gPEnCdd9EqR+!A{>Jc&T+vvs&qjUi>#sfc^(qH51H#fnGHsCkBj756U?DGzrAn zz$$=f(YlzX2%2bjBZoL?``17?oE=lrtB^>jfcd|7J%rCFL5V6;R_~*+*Z;k5z<5_U z{8!;Bv-GB5F6~LmXb&WuESFE~k|hm}!P3;tI=CO5RBm)WB=M(Zf3`Zq>=NJJi}hs5 zic~J~xwrGW>SX?v6Me*rF`ZBJXH!IG7g(cX-!D>)fZh#ehDk-i{}(D{?xqwY$pzAx zTn50`#W+*ifX`Ib=OV0-hsIKpSWvsnrUXyt*$d#c9v- z#k1lW^5Y+`hkZ+*(r?p7CIXT|`}1y~YL*>BpF*c)`4IgMspL>q(c4h82KUL4gy23x zOSL{$eT+w=6}XvEto;tj`AJ&;sNVYyyL!LWJOij+w0j+^jws29|JJ=LFi=sEaHivJ zwic2ya2nY#zUh@GMK2QD)GI2cDCp1mS8)GT!CC-+iLWo2o6p!vl#S1@&guzgsu zZNGPvc7s9u7n?&@x%kInP7Lyu_d`#k!r+9L!h^_;0+Sl79hYBg2W)FIz8+FUJf;nIVVDXXQEm@Rh;E z{!E)i0wK+0@UQUUs|*FKT1<`6(CswK^aRl~Nmut*yQ=ZryWW#!v;ro5-`wGTe)&(UXRuJas3(%(bmG z5j2eUkpuI~{JRfD;G^~jBn2(?AC8>gvS?*9;U=~bePjH3;|0+k37`gg@DCK~1_oH#NLKc2a2c;-5DHfATt=+3!v- zzG?PXeO}TKqxFT4QPxYxgJT-=k;b2RqY6XJ)4&YIJQvDU}C)7UXgwi z`PFfQgS0$5T)-j#%1!13d@Fgc8;68|IidWLkvhuB+TLUaFL?yP|&C8AMs;?CqM%&?<98(UsHVREy;swVu2>o$TVW1Xq%J zjP@rHTOz2+JV8D2^CW`2vAA|7p{%)*%{+l*F6KrD5ue)ZaEUQWHH4FVwo5-dLEdcFi zAWxjim)1w@_A8k9ABu3!BFPDw^<_UwS!nSdu`fbs&Lw>w(_;d4M=DAR&iW)hjB$-y z`kwCWX**yts+Ykw%lFp_??%`k{ww<9ce^;QGsJL{nB#BZUD~==Xw)0>_ZL%uC-f0f63AYWbk=4SMDqq-;=!kp2YX)Zi#N@pz-4jLb}=I#m^dQT6O>WU-TOKI zWkIf)lu{&s>obBf?$3}P0*k;qv%a)ON$j<-R_Hd#XI4GD}z9zJO04g<%LgGxb zHXDjpS0(p|4`Z{IJIr1Z6(pE#Dukud=~%wiaYcgLYe?Wh6_|50KRlg5D%4Z8Mo=`9ycwt<_|j?3!<6iHFd1hXSWsZ_~2vfw>o;tfTnZe zlHQO=DQuo7osnV6D-rQC$yY6x02Q3%@6j0Lf-vdiQ zWJ~JQ*RNCGe~W`6wZ->23f$VMk6E_{1ocP9F z{RN)D#vOw-z@88=%8&P2#z`!Wg5V?UYb99K==-W6^}Lw#O>+1UdQ1t~?OEGJ-(Oou zy=9ND-7j|5#DY$~5yN?b5kLc$j{f;{52diX#XmEBlcU#~*6&9)KAXz!NY1N z!P8id*5tpAPIQGZl+mhhvAh@dD4}w*0T_NCHOh=la$AH)6 z`Wu;d8ed3#+C7ZS^Sc&59LV}5n{RhJcpO*o`au~@xw1coz*j@QmN^f1AB#c^j~|CW zeUB(Qs9!U6dubOJ2z#oU@JX6~RJD?U8ZI=kd)r(9R8T(AT;|gkzTXP|SJgJyup1FJ z16rTmXe%OT2>-=H9}#-rQ#+U7r}+}Es>5$M5uR`+m3p$?|8`uMP5FPs|GhjVS$J&nRSQ10;YGjXm5h3g%*N*Q5l zjA<~Oh#;O%AJ*Ol%-}P(m*}#IM9rT?c~!VQ(nIe(Z#PX z{CCv&MlI7uq|)hG$&ZgP)g-@ z^3-nX!p+ukxljaixQqZT_KaouI6$gYvSvmnP{$2*lgavAIP!Ky$$i}robPE^HbxD& zpi&-37Wb6kyR@so45QSI!3UN$dLZ{zajAYjw#RCMu8b=9K2X4Pc30r{^8Jd(ar zd2Hg{W228^VnoQeag1KCDf-Y+Um$@V`mnIEh0yZYlx}3CFpt{o6@-S|@uydY=y#JM zs*&g9Ou=KZ;Hk_#HKOSR*Yl64oPUv4MZMpxr*SfqZeja#S3Sz@Wp4isV^y$r8hqhY zh&pheJ3~$wc9$VqJ-q;+PAKTXBAm*73?_Jas#FM3-^Kj_@vThRXj;mWFc;rFzUMk) zeo!sl8#-Q2E|b@J)ez#o&*T;~^-hMzzSxWn7z0pf8wWg`raB^9>d4u{+{CNv$yz3* zlmxzKlf&^QQTIg7gIH{M)Shx>`7t`Wlw183VpFlXM@5T;4xvYa0q?U$>61a!xCCOu zt8q%)+kVkiV1q0P17^F?JY|1lM^btU+H7W{tHFWzMYP0>=Nwm{ncNo?q`&1V(>1) z-0o{FzD&_9Q#N!!k6FUab>_qHm77z97Soe11}tch<>jK1&{gp-{vin^PYRVH=_8_J zU%27vTKg?zzYSx6pUPcsg1rs#>zYN*CP`V1_aDNK(%JVc8^`7LjEv$QZk(IlC~B@e z^KrFhsV`#R9why&L7VFhZSb^QhMjpRR@J38U^$ciC-3@UpT1|Ke|)E7+U+Jpuajs|Tlrd$7iSM=C0P?@>%T1^5qjxH%&aE9 zr$~S&UDom7<&+Ncr;J#6^SJt21WiY$h5S>7CXj!N55);&;uvs-5)XUEEoTL$CV~_5 z4-aO8ZSal^{DBZA_{1QvVlZ7(&A#8u@Fh#`?6JfoyeVAd;hfl(wttEGnG2_9JTf(X zy}0tLJZ+=;er45JR2&-YgZon%kzIJ#E3awI+|Z%8MHxIjYBz5VsO1IzjG7x>m+0!x zp}$^u@fGuu8pJ6xnZjgLiSDvQdQy&gQUI*-9fKBPRdL@^LXqS1% z^l_jE+ScleDj!(PmfPKQ*J>d|u`vE{D3UNz+<7PX$aD1d`1^wjKt~B%GaeF~-)0fo z^ATwo7v;Gr9!^1($O-?n3+?H5w=|D&f$wzW?!S6Qx%8)AinxCGIFZ7cC3o52V`#*> z!8<=88M(6x{Uo1yr z4+{Us`a3X8si5(Wqx+ZXXJKc8e$^f?f2N<1{BtkF{HbX?zrj-%6Y%lbFgUPtNvf@qptAF)B~<)Jqy*INvp$rzy$)Gl&UuybpM zxq94VJy69y2bXE)IPwBUH9zWEM+^v5kZz5(dexNrY@;jHGNe$TDRjAxoBo#Mnw?Yh=bY_Obh2{rr%z1e_c!arCE&tEhl}PMQsSwx4UuKzLO6Rq6p zE!Hl`W9S2}e;SM#C_vJp#$IYAp}{Sg5gD*)0A=3}dERu^y_a4SKYx;BXu?{Kuv)9C zi?`tA>N~jNRN?qg1eFl8r+v?N-grc~Z_HhdUi0LtYDlZ7*|A*+6f1s8$@1rWbfb@K zVYMqi&?8ai;3aqrNV?&&c|1eYahvfj5rBB^vr?=p*vL(cc{tY-?x9du0QtKQt2*numu!Hy`rgO z=7XZ#g@!TR#Q0c{p zQD+obx~jU8rwB>2>o`hNFAiqghr|g(&w4w? zN%<@y)(4MDVj3!bAPl2Wn9jxK<;mMq>d{6s@2%|3Q;=PYtoxPXNsoEl_#$rH0#p0|-e5>$-m~ck*yf z%TlWMG@j$^2@;DvVQ2SOb}g;Xg0aD5DJU#7jIqBQs5lC>&@dGY#OGk;Up8NtNx4te zzgZXq)}0!iQ_5$KHin-v9R2sA+Ohc7+Pb|n_>|9?lUmeBmTG9gm+rTc0i#QE}_En z&4nL7QTnLz!bXZzslyV?q%s;Dp91_6R^fDhXN6dre=k;K3jO74mBrR}#AQ6tA<751 zmj~4iO^?dn^}5uBRC)#Prj?PH-_t>YkK-U)^YgU=luS=~|2XlH)( zm>7%_!_#yo0nb=)n&-28MqOAwcn`EKcxQBGBuhA@UQ`MtW(h}24x-QnQ{_FATT*TP z@M!=k6L>GZba5M)DnC*@QNy?Dx@6CK*ggj|%I5&UPbbiSgjG{;MzdQEGa#$%cy4|+q6DOG0C3&`e0GI4RFWyX zB;?jsCQ!E;FL4bLT)Wd1w8h8V5%h{B(BLb;pdOHijqL15`#DuFXG4H(;c|i7I05W4 z$t8k!#evl9zDOrS4l#<#9iZOIr*i$>4QcOryHZ`nZ?|2%3b8f13NQ@-Z)+$b+=N39 zbw*`L286Z(-bwkL>5VEpPzKddqpp@9t-C7_!~hj#+pQW-(3=11ROqZ_Da5wC{=%i{ zhuaZ~e3jz8)qdHP=L}kNxw$T}xw(peD-K`6_h(4q!jS;_L~7iPqkT!3Yb~VL>L-oX zZ>+?=E|tbAP2Rweflox*0T#Ea4=`cuc}K@qbL7X0hT|iK_B6OohW7Vn=awl_rFn3S zlbxfN%6o(BrbqanGLCWmaL(ZqxI^ywB%_Q`y&Q{cn~4{kiC@$WnYoLuH%wTFf$>%n z97NFrXfx~j2!xPfJha2l=+?coJLD3mp zQCEwpxmhvD1glX4OV@(U#nd@YLzuF0mai0GVuAfD#tiU|u8kcHQ@GLYMa>q5qLe|U zuST*Y1azb~`fMw{N8pxT6@!h=MI=iwvCKtLP$|Ly43Q)$b_sz7 zlfb^RJO8QwC}1vD9Gamo-ML1ckX0KsGl_ah>M?jlfnaWPzVb&0m}kcSYm6b^$igH( z67y>N*`MPaP@vozX!mTq$IYcC0qG$rDDY+tOozshRM?&?A@ztY4k+>DUwiV;;p~6w z^#%9J=5ldt8Tw`=5&O$}MWzFk;O>!mymylk=@}PwvrkOf@$iPPM}wI_Ms5=YpfWV0 z;6)`fb{v;Bd$Rd6GP%N)gM%$>tZ3CAwcBt`ZA<_Dx|ej*ZVK5>mbhKtqkAK0;(~RO zxdbx4-{DUBaZ|7BmL;xdp@H|$6u%fb!%zFNCG!7Bh)V;_te|J#=hHF^Ui05kAkso5^h);xh5A z$yTtWA-pt#yZ0-+n-RdVv2)zy4nS32Jb2-DnZsHxdvWEQj>v~i6V*KTe74NoTBw=7 z!YC!|WTW|k{cRfKT3l=qq0|eEXssWu7~S(`L~hmQL5iRV%sCgk>#FaE<%39upr`Z| ziEu(gp6^qMpkp%&7b!P93N1|_*xSrKx+>JOT~#@j$4w7IzG-u-f`!C2N41AWg26P- z12kxudZszhJiO+6=u4e0^!!R4Y^%?^cUPh%7I|UW!(6DJ!i$yV?Bno2v;9=>Hng{Z@T$Zy6Wun zbe5e5S{3+sb5Ge1c;`Z@>+J9IXqwrJ z6fJFGh}*UZr$`&2+7LKYcE|V4K;Cjb)F$nV)%NyR!BkB$y1hRd(m`_#J6$KQWNSrI z6#ErMIv=OqI!e6IN2q)H<1WH-hoJo2^E5EXRMop24f2mj-3?7$xl ziNNzh-|IfJW3bAp>FuxYX4214bfjfhjwCm(@~ z$tFH8y}c^iz@udAw03J;GuGo)89prg{qq8vrg;r;R)VgH1^4)NOq>i_jASxZ!&yav zH&Th%Fbfjmy13|9;_woY5!ji36O)2x8)xSFr+{J(J_VSRAGtnkLWQ2+3Y_>k@sRAs z1EYM9NmsyT%la0J! zFPFP@(fB1Hc=!Fh)#eedww5!NO*;pO@gu5Anb05-@8FwnK+cW8B&J^I`mBH}@K3OO zJyP1w6TfGct!aL=s^}WcA~i)TXfPMe6CZwJ)VP6N)oVJ`(^}*90YHNtkMpZLKaAA= zc@bIFQiAkVO!B4t+Ih~j&MIIdMDFdI90Kn%ej+!3=XOlZL3+lG{!vr1X*kZc3zzXU zX+GRCZB*1*zb)ul6L^>=EO4-kU&{ggwn!N(nO4%z)8RPeYh)@RGONG^vD8;1PHQ;Z zRZ=n@(1MF-OVd_=0JWv{%m-N~H)}F$$mT#4AOt@w=8g~ETOAK45|Yp=8z*-Lar8{6 zdHQfW2-T>HYNO5iJranDj}d!G`sv4uS%T%-eX*J(ijElMso|t;v^6^%Hja{|mmmSe zqGM{gmG-FGCRKPv-tY8~VgTTunit;qL@0RLLLPHW*d_uFZ_Rif(! z{GDpX+gZyg-gLaVS71HbA|U0J$3b=ezXCXL6$HLwoEWnvN$;ycph6?3$5k+zI-N4u z{$%((1=PFT-6!5wP-lv7(Z>XtTAloxh$jH9@%Xq0#xzPW!*}jLQCgs7h1A61#RNDu zGYy`Vqf(W2lP=p8R}|`ao3lU|l=_k8LJ%(mDl!1bYq&kW#PXx>1S4wF6N_rESqApH zq*F5M8gH}&w_Di~p>bqb{Nl>+*>ou}*F`eJ4@VB0wts)sM3xJ-pRM33O!u#l^bPB_ zd2;IQk$7(WypZubdA!?nOLN*rSE>VaCPR-1&uZ9PCVgGw%vUw(oE%p8(gTYpF|6;$ rN+(XL8>muTyn!MkpJ=>bOvbrU>d~C&K>#UhazI literal 0 HcmV?d00001 diff --git a/node_modules/terraformer/docs-build/assets/javascripts/all-da39a3ee.js b/node_modules/terraformer/docs-build/assets/javascripts/all-da39a3ee.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/terraformer/docs-build/assets/javascripts/classie-b6db1f70.js b/node_modules/terraformer/docs-build/assets/javascripts/classie-b6db1f70.js new file mode 100644 index 0000000..e481577 --- /dev/null +++ b/node_modules/terraformer/docs-build/assets/javascripts/classie-b6db1f70.js @@ -0,0 +1 @@ +!function(s){"use strict";function e(s){return new RegExp("(^|\\s+)"+s+"(\\s+|$)")}function n(s,e){var n=a(s,e)?c:t;n(s,e)}var a,t,c;"classList"in document.documentElement?(a=function(s,e){return s.classList.contains(e)},t=function(s,e){s.classList.add(e)},c=function(s,e){s.classList.remove(e)}):(a=function(s,n){return e(n).test(s.className)},t=function(s,e){a(s,e)||(s.className=s.className+" "+e)},c=function(s,n){s.className=s.className.replace(e(n)," ")});var i={hasClass:a,addClass:t,removeClass:c,toggleClass:n,has:a,add:t,remove:c,toggle:n};"function"==typeof define&&define.amd?define(i):s.classie=i}(window); \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/assets/javascripts/drawer-3a1490eb.js b/node_modules/terraformer/docs-build/assets/javascripts/drawer-3a1490eb.js new file mode 100644 index 0000000..d654731 --- /dev/null +++ b/node_modules/terraformer/docs-build/assets/javascripts/drawer-3a1490eb.js @@ -0,0 +1 @@ +var drawerHandler=function(){function e(){var e=!1;return function(a){(/(android|ipad|playbook|silk|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4)))&&(e=!0)}(navigator.userAgent||navigator.vendor||window.opera),e}function a(){var a=document.getElementById("wrap"),o=document.getElementById("drawer"),t=e()?"touchstart":"click",i=Array.prototype.slice.call(document.querySelectorAll(".toggle"));document.getElementById("main-content");var n=function(){classie.remove(o,"active-left"),classie.remove(o,"active-right"),classie.remove(o,"active-top"),classie.remove(a,"drawer-open")},c=function(e){classie.add(o,e),classie.add(a,"drawer-open")},r=function(){console.log("click"),n(),a.removeEventListener(t,r)};i.forEach(function(e){var o=e.getAttribute("data-direction");e.addEventListener(t,function(e){e.stopPropagation(),e.preventDefault(),c(o),a.addEventListener(t,r),console.log(a)})})}a()}(); \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/assets/javascripts/modernizr.custom-cadc78a2.js b/node_modules/terraformer/docs-build/assets/javascripts/modernizr.custom-cadc78a2.js new file mode 100644 index 0000000..f55b54f --- /dev/null +++ b/node_modules/terraformer/docs-build/assets/javascripts/modernizr.custom-cadc78a2.js @@ -0,0 +1 @@ +window.Modernizr=function(e,t,n){function r(e){g.cssText=e}function o(e,t){return typeof e===t}function i(e,t){return!!~(""+e).indexOf(t)}function a(e,t){for(var r in e){var o=e[r];if(!i(o,"-")&&g[o]!==n)return"pfx"==t?o:!0}return!1}function c(e,t,r){for(var i in e){var a=t[e[i]];if(a!==n)return r===!1?e[i]:o(a,"function")?a.bind(r||t):a}return!1}function l(e,t,n){var r=e.charAt(0).toUpperCase()+e.slice(1),i=(e+" "+C.join(r+" ")+r).split(" ");return o(t,"string")||o(t,"undefined")?a(i,t):(i=(e+" "+w.join(r+" ")+r).split(" "),c(i,t,n))}var s,u,f,d="2.6.2",p={},m=!0,h=t.documentElement,y="modernizr",v=t.createElement(y),g=v.style,b=({}.toString," -webkit- -moz- -o- -ms- ".split(" ")),E="Webkit Moz O ms",C=E.split(" "),w=E.toLowerCase().split(" "),j={},S=[],x=S.slice,N=function(e,n,r,o){var i,a,c,l,s=t.createElement("div"),u=t.body,f=u||t.createElement("body");if(parseInt(r,10))for(;r--;)c=t.createElement("div"),c.id=o?o[r]:y+(r+1),s.appendChild(c);return i=["­",'"].join(""),s.id=y,(u?s:f).innerHTML+=i,f.appendChild(s),u||(f.style.background="",f.style.overflow="hidden",l=h.style.overflow,h.style.overflow="hidden",h.appendChild(f)),a=n(s,e),u?s.parentNode.removeChild(s):(f.parentNode.removeChild(f),h.style.overflow=l),!!a},F={}.hasOwnProperty;f=o(F,"undefined")||o(F.call,"undefined")?function(e,t){return t in e&&o(e.constructor.prototype[t],"undefined")}:function(e,t){return F.call(e,t)},Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError;var n=x.call(arguments,1),r=function(){if(this instanceof r){var o=function(){};o.prototype=t.prototype;var i=new o,a=t.apply(i,n.concat(x.call(arguments)));return Object(a)===a?a:i}return t.apply(e,n.concat(x.call(arguments)))};return r}),j.csstransforms3d=function(){var e=!!l("perspective");return e&&"webkitPerspective"in h.style&&N("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(t){e=9===t.offsetLeft&&3===t.offsetHeight}),e};for(var k in j)f(j,k)&&(u=k.toLowerCase(),p[u]=j[k](),S.push((p[u]?"":"no-")+u));return p.addTest=function(e,t){if("object"==typeof e)for(var r in e)f(e,r)&&p.addTest(r,e[r]);else{if(e=e.toLowerCase(),p[e]!==n)return p;t="function"==typeof t?t():t,"undefined"!=typeof m&&m&&(h.className+=" "+(t?"":"no-")+e),p[e]=t}return p},r(""),v=s=null,function(e,t){function n(e,t){var n=e.createElement("p"),r=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x",r.insertBefore(n.lastChild,r.firstChild)}function r(){var e=v.elements;return"string"==typeof e?e.split(" "):e}function o(e){var t=y[e[m]];return t||(t={},h++,e[m]=h,y[h]=t),t}function i(e,n,r){if(n||(n=t),u)return n.createElement(e);r||(r=o(n));var i;return i=r.cache[e]?r.cache[e].cloneNode():p.test(e)?(r.cache[e]=r.createElem(e)).cloneNode():r.createElem(e),i.canHaveChildren&&!d.test(e)?r.frag.appendChild(i):i}function a(e,n){if(e||(e=t),u)return e.createDocumentFragment();n=n||o(e);for(var i=n.frag.cloneNode(),a=0,c=r(),l=c.length;l>a;a++)i.createElement(c[a]);return i}function c(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return v.shivMethods?i(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+r().join().replace(/\w+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(v,t.frag)}function l(e){e||(e=t);var r=o(e);return v.shivCSS&&!s&&!r.hasCSS&&(r.hasCSS=!!n(e,"article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}")),u||c(e,r),e}var s,u,f=e.html5||{},d=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,m="_html5shiv",h=0,y={};!function(){try{var e=t.createElement("a");e.innerHTML="",s="hidden"in e,u=1==e.childNodes.length||function(){t.createElement("a");var e=t.createDocumentFragment();return"undefined"==typeof e.cloneNode||"undefined"==typeof e.createDocumentFragment||"undefined"==typeof e.createElement}()}catch(n){s=!0,u=!0}}();var v={elements:f.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:f.shivCSS!==!1,supportsUnknownElements:u,shivMethods:f.shivMethods!==!1,type:"default",shivDocument:l,createElement:i,createDocumentFragment:a};e.html5=v,l(t)}(this,t),p._version=d,p._prefixes=b,p._domPrefixes=w,p._cssomPrefixes=C,p.testProp=function(e){return a([e])},p.testAllProps=l,p.testStyles=N,h.className=h.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(m?" js "+S.join(" "):""),p}(this,this.document),function(e,t,n){function r(e){return"[object Function]"==y.call(e)}function o(e){return"string"==typeof e}function i(){}function a(e){return!e||"loaded"==e||"complete"==e||"uninitialized"==e}function c(){var e=v.shift();g=1,e?e.t?m(function(){("c"==e.t?d.injectCss:d.injectJs)(e.s,0,e.a,e.x,e.e,1)},0):(e(),c()):g=0}function l(e,n,r,o,i,l,s){function u(t){if(!p&&a(f.readyState)&&(b.r=p=1,!g&&c(),f.onload=f.onreadystatechange=null,t)){"img"!=e&&m(function(){C.removeChild(f)},50);for(var r in N[n])N[n].hasOwnProperty(r)&&N[n][r].onload()}}var s=s||d.errorTimeout,f=t.createElement(e),p=0,y=0,b={t:r,s:n,e:i,a:l,x:s};1===N[n]&&(y=1,N[n]=[]),"object"==e?f.data=n:(f.src=n,f.type=e),f.width=f.height="0",f.onerror=f.onload=f.onreadystatechange=function(){u.call(this,y)},v.splice(o,0,b),"img"!=e&&(y||2===N[n]?(C.insertBefore(f,E?null:h),m(u,s)):N[n].push(f))}function s(e,t,n,r,i){return g=0,t=t||"j",o(e)?l("c"==t?j:w,e,t,this.i++,n,r,i):(v.splice(this.i++,0,e),1==v.length&&c()),this}function u(){var e=d;return e.loader={load:s,i:0},e}var f,d,p=t.documentElement,m=e.setTimeout,h=t.getElementsByTagName("script")[0],y={}.toString,v=[],g=0,b="MozAppearance"in p.style,E=b&&!!t.createRange().compareNode,C=E?p:h.parentNode,p=e.opera&&"[object Opera]"==y.call(e.opera),p=!!t.attachEvent&&!p,w=b?"object":p?"script":"img",j=p?"script":w,S=Array.isArray||function(e){return"[object Array]"==y.call(e)},x=[],N={},F={timeout:function(e,t){return t.length&&(e.timeout=t[0]),e}};d=function(e){function t(e){var t,n,r,e=e.split("!"),o=x.length,i=e.pop(),a=e.length,i={url:i,origUrl:i,prefixes:e};for(n=0;a>n;n++)r=e[n].split("="),(t=F[r.shift()])&&(i=t(i,r));for(n=0;o>n;n++)i=x[n](i);return i}function a(e,o,i,a,c){var l=t(e),s=l.autoCallback;l.url.split(".").pop().split("?").shift(),l.bypass||(o&&(o=r(o)?o:o[e]||o[a]||o[e.split("/").pop().split("?")[0]]),l.instead?l.instead(e,o,i,a,c):(N[l.url]?l.noexec=!0:N[l.url]=1,i.load(l.url,l.forceCSS||!l.forceJS&&"css"==l.url.split(".").pop().split("?").shift()?"c":n,l.noexec,l.attrs,l.timeout),(r(o)||r(s))&&i.load(function(){u(),o&&o(l.origUrl,c,a),s&&s(l.origUrl,c,a),N[l.url]=2})))}function c(e,t){function n(e,n){if(e){if(o(e))n||(f=function(){var e=[].slice.call(arguments);d.apply(this,e),p()}),a(e,f,t,0,s);else if(Object(e)===e)for(l in c=function(){var t,n=0;for(t in e)e.hasOwnProperty(t)&&n++;return n}(),e)e.hasOwnProperty(l)&&(!n&&!--c&&(r(f)?f=function(){var e=[].slice.call(arguments);d.apply(this,e),p()}:f[l]=function(e){return function(){var t=[].slice.call(arguments);e&&e.apply(this,t),p()}}(d[l])),a(e[l],f,t,l,s))}else!n&&p()}var c,l,s=!!e.test,u=e.load||e.both,f=e.callback||i,d=f,p=e.complete||i;n(s?e.yep:e.nope,!!u),u&&n(u)}var l,s,f=this.yepnope.loader;if(o(e))a(e,0,f,0);else if(S(e))for(l=0;l + + + + + + Terraformer + + + + + +

    +
    +
    + +
    +
    + +
    +

    Terraformer Core

    + +

    + + Link + Terraformer.Primitive + Back to Top +

    +

    Terraformer Primitives are JavaScript objects that map directly to their GeoJSON couterparts. Converting a GeoJSON object into a Terraformer Primitive will allow you use convenience methods like point.within(polygon).

    + +

    Every Primitive inherits from the Terraformer.Primitive base class, thus all other Primitives share the Terraformer.Primitive methods.

    + +

    There is a Primitive for every type of GeoJSON object, plus a Circle Primitive which represents a circle as a polygon.

    +

    + + Link + Constructor + Back to Top +

    +

    You create a new Terraformer.Primitive object by passing it a valid GeoJSON Object. This will return a Terraformer.Primitive with the same type as your GeoJSON object.

    +
    var point = new Terraformer.Primitive({
    +  type:"Point",
    +  coordinates:[1,2]
    +});
    +
    +point instanceof Terraformer.Point; //-> true
    +point instanceof Terraformer.Primitive; //-> true
    +
    +point.within(polygon) //-> true or false
    +
    +

    + + Link + Methods + Back to Top +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    MethodReturnsDescription
    toMercator()thisConverts this GeoJSON object’s coordinates to the web mercator spatial reference.
    toGeographic()thisConverts this GeoJSON object’s coordinates to geographic coordinates.
    envelope()EnvelopeReturns an object with x, y, w and h suitable for passing to most indexes.
    bbox()BBoxReturns the GeoJSON Bounding Box for this primitive.
    convexHull()Polygon or nullReturns the convex hull of this primitive as a Polygon. Will return null if the convex hull cannot be calculated or a valid Polygon cannot be created.
    contains(<Geometry> geometry)BooleanReturns true if the passed GeoJSON Geometry object is completely contained inside this primitive.
    within(<Geometry> geometry)BooleanReturns true if the passed GeoJSON Geometry object is completely within this primitive.
    intersects(<Geometry> geometry)BooleanReturns true if the passed GeoJSON Geometry intersects this primitive.
    +

    + + Link + Terraformer.Point + Back to Top +

    +

    A JavaScript object representing a GeoJSON Point.

    +

    + + Link + Constructor + Back to Top +

    +

    Terraformer.Point can be created by passing a GeoJSON Coordinate Pair like [longitude, latitude], with plain x,y, or a valid GeoJSON Point.

    +
    var point1 = new Terraformer.Point({
    +  type:"Point",
    +  coordinates:[1,2]
    +});
    +
    +var point2 = new Terraformer.Point(1,2);
    +
    +var point3 = new Terraformer.Point([1,2]);
    +
    +

    + + Link + Terraformer.MultiPoint + Back to Top +

    +

    A JavaScript object representing a GeoJSON MultiPoint.

    +

    + + Link + Constructor + Back to Top +

    +

    Terraformer.MultiPoint can be created by passing in a valid GeoJSON MultiPoint, or an array of GeoJSON Coordinates.

    +
    var multipoint1 = new Terraformer.MultiPoint({
    +  type:"MultiPoint",
    +  coordinates:[ [1,2],[2,1] ]
    +});
    +
    +var multipoint2 = new Terraformer.MultiPoint([ [1,2],[2,1] ]);
    +
    +

    + + Link + Methods + Back to Top +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    MethodReturnsDescription
    forEach(<Function> function)nullIterates over each point. Equivalent to multipoint.coordinates.forEach(function). The function will be called with point, index and coordinates.
    get(<Integer> index)PointReturns a Terraformer.Point for the point at index in the coordinate array.
    addPoint(<Coordinate> coordinate)thisAdds a new coordinate to the end of the coordinate array. Equivalent to multipoint.coordinates.push([3,4]).
    insertPoint(<Coordinate> coordinate, index)thisInserts the passed point at the passed index. Equivalent to multipoint.coordinates.splice(index, 0, point)
    removePoint(<Integer> index or <Coordinate> coordinate)thisRemoves the point at index or the passed Coordinate depending on the type of object passed in.
    +

    + + Link + Terraformer.LineString + Back to Top +

    +

    A JavaScript object representing a GeoJSON LineString.

    +

    + + Link + Constructor + Back to Top +

    +

    Terraformer.LineString can be created by passing in a valid GeoJSON LineString, or an array of GeoJSON Coordinates like [longitude, latitude].

    +
    var linestring = new Terraformer.LineString({
    +  type:"LineString",
    +  coordinates:[ [1,2],[2,1] ]
    +});
    +
    +var linestring = new Terraformer.LineString([ [1,2],[2,1] ]);
    +
    +

    + + Link + Methods + Back to Top +

    + + + + + + + + + + + + + + + + + + + + + + +
    MethodReturnsDescription
    addVertex(<Coordinate> coordinate)thisAdds a new coordinate to the end of the coordinate array. Equivalent to linestring.coordinates.push([3,4]).
    insertVertex(<Coordinate> coordinate, <Integer> index)thisInserts the passed coordinate at the passed index. Equivalent to linestring.coordinates.splice(index, 0, point)
    removeVertex(<Integer> index)thisRemoves the coordinate at index. Equivalent to calling linestring.coordinates.splice(remove, 1)
    +

    + + Link + Terraformer.MultiLineString + Back to Top +

    +

    A JavaScript object representing a GeoJSON MultiLineString.

    +

    + + Link + Constructor + Back to Top +

    +

    Terraformer.LineString can be created by passing in a valid GeoJSON MultiLineString, or a GeoJSON MultiLineString coordinate array.

    +
    var multilinestring = new Terraformer.MultiLineString({
    +  type:"LineString",
    +  coordinates:[ [1,2],[2,1] ]
    +});
    +
    +var multilinestring = new Terraformer.MultiLineString([
    +  [[1,1],[2,2],[3,4]],
    +  [[0,1],[0,2],[0,3]]
    +]);
    +
    +

    + + Link + Methods + Back to Top +

    + + + + + + + + + + + + + + + + + +
    MethodReturnsDescription
    forEach(<Function> function)nullIterates over each LineString. Equivalent to multilinestring.coordinates.forEach(function). The function will be called with linestring, index and coordinates.
    get(<Integer> index)LineStringReturns a Terraformer.LineString for the LineString at index in the coordinates array.
    +

    + + Link + Terraformer.Polygon + Back to Top +

    +

    A JavaScript object representing a GeoJSON Polygon.

    +

    + + Link + Constructor + Back to Top +

    +

    Terraformer.Polygon can be created by passing in a valid GeoJSON Polygon, or GeoJSON Polygon coordinate array.

    +
    var polygon1 = new Terraformer.Polygon({
    +  "type": "Polygon",
    +  "coordinates": [
    +    [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ],
    +    [ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ]
    +    ]
    + });
    +
    +var polygon2 = new Terraformer.Polygon([
    +    [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ],
    +    [ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ]
    +]);
    +
    +

    + + Link + Methods + Back to Top +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    MethodReturnsDescription
    addVertex(<Coordinate> coordinate)thisAdds a new coordinate just before the closing coordinate of the linear ring.
    insertVertex(<Coordinate> coordinate, index)thisInserts the passed coordinate at the passed index. Equivalent to polygon.coordinates.splice(index, 0, point)
    removeVertex(<Integer> index)thisRemoves the coordinate at index. Equivalent to calling polygon.coordinates.splice(remove, 1)
    close()thisEnsures that the first and last vertex of the polygon are equal to each other.
    hasHoles()BooleanTrue if this polygon has holes.
    holes()Array <Polygon>Returns an Array of Polygon objects made from each hole in this polygon.
    +

    + + Link + Terraformer.MultiPolygon + Back to Top +

    +

    A JavaScript object representing a GeoJSON MultiPolygon.

    +

    + + Link + Constructor + Back to Top +

    +

    Terraformer.MultiPolygon can be created by passing in a valid GeoJSON MultiPolygon, or an array that is a valid coordinate array for GeoJSON MultiPolygon.

    +
    var multipolygon1 = new Terraformer.MultiPolygon({
    +  "type": "MultiPolygon",
    +  "coordinates": [
    +    [
    +      [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ]
    +    ],
    +    [
    +      [ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ]
    +    ]
    +  ]
    +});
    +
    +var multipolygon2 = new Terraformer.MultiPolygon([
    +  [
    +    [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ]
    +  ],
    +  [
    +    [ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ]
    +  ]
    +]);
    +
    +

    + + Link + Methods + Back to Top +

    + + + + + + + + + + + + + + + + + +
    MethodReturnsDescription
    forEach(<Function> function)nullIterates over each LineString. Equivalent to multipolygon.coordinates.forEach(function). The function will be called with polygon, index and coordinates.
    get(<Integer> index)PolygonReturns a Terraformer.Polygon for the Polygon at index in the coordinate array.
    +

    + + Link + Terraformer.Feature + Back to Top +

    +

    A JavaScript object representing a GeoJSON Feature.

    +

    + + Link + Constructor + Back to Top +

    +

    Terraformer.Feature can be created by passing in a valid GeoJSON Feature or GeoJSON Geometry.

    +
    var feature1 = new Terraformer.Feature({
    +  "type": "Feature",
    +  "geometry": {
    +    "type": "Polygon",
    +    "coordinates": [
    +      [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ],
    +      [ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ]
    +    ]
    +  }
    +});
    +
    +var feature2 = new Terraformer.Feature({
    +  "type": "Polygon",
    +  "coordinates": [
    +    [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ],
    +    [ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ]
    +  ]
    +});
    +
    +

    + + Link + Terraformer.FeatureCollection + Back to Top +

    +

    A JavaScript object representing a GeoJSON FeatureCollection.

    +

    + + Link + Constructor + Back to Top +

    +

    Terraformer.FeatureCollection can be created by passing a valid GeoJSON Feature Collection or an array of GeoJSON Features.

    +
    var featurecollection1 = new Terraformer.FeatureCollection(
    +  "type": "FeatureCollection",
    +  "features": [feature1, feature2]
    +});
    +
    +var featurecollection2 = new Terraformer.FeatureCollection([feature1, feature2]);
    +
    +

    + + Link + Methods + Back to Top +

    + + + + + + + + + + + + + + + + + +
    MethodReturnsDescription
    forEach(<Function> function)nullIterates over each Feature. Equivalent to featurecollection.features.forEach(function). The function will be called with feature, index and coordinates.
    get(<Integer> index)FeatureReturns a Terraformer.Feature for the Feature at index in the features array.
    +

    + + Link + Terraformer.GeometryCollection + Back to Top +

    +

    A JavaScript object representing a GeoJSON Geometry Collection.

    +

    + + Link + Constructor + Back to Top +

    +

    Terraformer.GeometryCollection can be created by passing a valid GeoJSON Geometry Collection or an array of GeoJSON Geometries.

    +
    var geometrycollection1 = new Terraformer.GeometryCollection(
    +  "type": "FeatureCollection",
    +  "features": [geometry1, geometry2]
    +});
    +
    +var geometrycollection2 = new Terraformer.GeometryCollection([geometry1, geometry2]);
    +
    +

    + + Link + Methods + Back to Top +

    + + + + + + + + + + + + + + + + + +
    MethodReturnsDescription
    forEach(<Function> function)nullIterates over each LineString. Equivalent to geometrycollection.coordinates.forEach(function). The function will be called with geometry, index and coordinates.
    get(<Integer> index)PrimitiveReturns a Terraformer.Primitive for the Geometry at index in the coordinate array.
    +

    + + Link + Terraformer.Circle + Back to Top +

    +

    The GeoJSON spec does not provide a way to visualize circles. Terraformer.Circle is actual a GeoJSON Feature object that contains a Polygon representing a circle with a certain number of sides.

    +

    + + Link + Constructor + Back to Top +

    +

    Terraformer.Circle is created with a center, radius, and steps.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    OptionTypeDefaultDescription
    centerCoordinatenullRequired A GeoJSON Coordinate in [x,y] format.
    radiusInteger250The radius of the circle in meters.
    stepsInteger32How many steps will be used to create the polygon that represents the circle.
    +
    circle = new Terraformer.Circle([45.65, -122.27], 500, 64);
    +
    +circle.contains(point);
    +
    +

    + + Link + Methods + Back to Top +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    MethodReturnsDescription
    recalculate()thisRecalculates the circle
    steps(<Integer optional> steps)IntegerReturns the number of steps to produce the polygon representing the circle. If the steps parameter is passed the circle will be recalculated witht he new step count before returning.
    radius(<Integer optional> radius)IntegerReturns the radius circle. If the radius parameter is passed the circle will be recalculated witht he new radius before returning.
    center(<Coordinate optional> center)CoordinatesReturns the center of the circle. If the center parameter is passed the circle will be recalculated with the new center before returning.
    +

    + + Link + Terraformer.Tools + Back to Top +

    +

    Terraformer also has numerous helper methods for working with GeoJSON and geographic data. These tools work with a mix of lower level GeoJSON constructs like Coordinates, Coordinate Arrays and GeoJSON objects and Terraformer Primitives

    +

    + + Link + Spatial Reference Conversions + Back to Top +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    MethodReturnsDescription
    toMercator(<GeoJSON> geojson)GeoJSONConverts this GeoJSON object’s coordinates to the web mercator spatial reference. This is an in-place modification of the passed object.
    toGeographic(<GeoJSON> geojson)GeoJSONConverts this GeoJSON object’s coordinates to geographic coordinates. This is an in-place modification of the passed object.
    applyConverter(<GeoJSON> geojson), function)GeoJSONRuns the passed functionagainst every Coordinate in the geojson object. Your function will be passed a Coordinate and will be expected to return a Coordinate.
    positionToMercator(<Coordinate> coordinate)CoordinateConverts the passed Coordinate to web mercator spatial reference.
    positionToGeographic(<Coordinate> coordinate)CoordinateConverts the passed Coordinate to geographic coordinates.
    +

    + + Link + Calculations + Back to Top +

    + + + + + + + + + + + + + + + + + + + + + + +
    MethodReturnsDescription
    calculateBounds(<GeoJSON> geojson)BBoxReturns a GeoJSON bounding box for the passed geoJSON.
    calculateEnvelope(<GeoJSON> geojson)EnvelopeReturns an object with x, y, w, h. Suitable for passing to most indexes.
    convexHull(<GeoJSON> geojson)CoordinatesReturns an array of coordinates representing the convex hull the the passed geoJSON.
    +

    + + Link + Comparisons + Back to Top +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    MethodReturnsDescription
    coordinatesContainPoint(<[Coordinates]> coordinates, <Coordinate> coordinate)BooleanAccepts an array of coordinates and a coordinate and returns true if the point falls within the coordinate array.
    polygonContainsPoint(<Polygon> polygon, <Coordinate> coordinate)BooleanAccepts the geometry of a polygon and a coordinate and returns true if the point falls within the polygon.
    arrayIntersectsArray(<[Coordinates]> coordinates, <[Coordinates]> coordinates)BooleanAccepts two arrays of coordinates and returns true if they cross each other at any point.
    coordinatesEqual(<Coordinate> coordinate, <Coordinate> coordinate)BooleanAccepts two individual coordinate pairs and returns true if the passed coordinate pairs are equal to each other.
    +
    var pt = [0,0];
    +var pt2 = [-111.873779, 40.647303];
    +
    +var polygon = {
    +  "type": "Polygon",
    +  "coordinates": [[
    +    [-112.074279, 40.52215],
    +    [-112.074279, 40.853293],
    +    [-111.610107, 40.853293],
    +    [-111.610107, 40.52215],
    +    [-112.074279, 40.52215]
    +  ]]
    +};
    +
    +var polygonGeometry = polygon.coordinates;
    +
    +Terraformer.Tools.polygonContainsPoint(polygonGeometry, pt);
    +// returns false
    +Terraformer.Tools.polygonContainsPoint(polygonGeometry, pt2);
    +// returns true
    +
    + +
    + + + + + + + + \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/favicon.ico b/node_modules/terraformer/docs-build/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..37904b6c7075e99025fef173197d83477721abb8 GIT binary patch literal 6518 zcmeHLd32Li7LV)5c#fkZE{xzHBW0%xEiGM=rb(KmY0_qI_Owa5g>GruEGKbXT&(Aa1iqbW2aJWdUVL*oN~066{S z=x1Myoxfn|Y_-w*>g&4?WWDm*Zn@f6wQK%@6@WG+fm_*H~s0l_) zoNR{K;ptTCZJk`P7hK6a2;`xYZ@qIMZQ#0|-kuxgKKxX(Ilt-vPu2)?;q#EH8jmu)Id1~eCd;TUtuFe6iqZQVY?GP)c!?0T{KAt+5tkS_7UUQh^$ zY94fsXQ4FvA<=We&k;eS5+jbEjCqf>w!E?XJ)uPDIG$fnjA~yENtP?(Ty;X|MjKyP%zRak;7b@B1H-#N%<_Hgj<$I%8$$+3#cD!7Y0^nWReip${l z`%zOYsOF1Lj($CsS^w6aeL`uDXw6t4kzT87M`;dZ-=FDJK5e3X&#sCC4fLp>m8-Y z%uzsL6+oyGL9Hu5jzfifUvbxwkB+f6ShV!H2L;L}SpUix{~86zHVYvjn=$J}N(H2b zbnq1dC~~dHcG$3DUE8dP{kpr)-B>qs;ToVQwa?cYc8fnYl_h0|vP3 z3t+HS?VtDP^5*XD-Www8BkgOizbD}UJvH2n+|u#dureQ zPm?3_uhbqod^DzcN$cZAw|DQWukV+>ylc18ROs8g@afjaKKSsn3E?%peP@0kANHHh4*Xro)>j$3=FpK(;#RMJzWjj)m$ZCyqBANo@2g|SMm5fTvU%;Z zJ4%my{AEmJ{QuGZ*md@{bsM&pYb}+#$HeAz54~TE!Na)FSVAA3?C2W$?YAd}Nmb5+ zgNLPJ$bABgidLM{T58@{zj0@A*SYh5`d@T-?Ty{K44LE8yYCZXc$6GtCaOr(h@Py5 zN@s!27C0oyDLO39G7vA?!4=gbCBuhtadr%gQb3SB^~l@r9ufaq9U5jo+;-a#F2+Y| z5R+g=YK9krtR~7qT9yOz%nryDX4Hjz#M7lPy0;Riw^3f$43m2!?vHk&>7i9m{1W_* zj*g-0Hne+JuiNI!b5!mh9b<${D)!wv$2!8-vHVw5>cM259`UIf#PbR%muzD5 z5tEZ_CEJK6W*~uQIU(0p>?`#?y6tpl*N~sm9?A&H}sQ@Fchpqj%hjZ?=p;xRlw|Oc zdv3Xk4%gMx&1%1M7#}0X%GunYH`^grHxvJEVc*N(t1PXUkf5RbQv++h6PfA->|PoD zF2&yf6YGa9|V+sJ-Z#PM9h7qa{vHA#T>7xy~*>u|cWV@R?Vfm`H zO+!a!LGM@#Gwo$uyyaKpUyd!HyeI4v1?A7NNnEU4_iBK_?;?It>We9Q-Oj;$4H_=&Y0GIwx5(bIml~FIGVr?c8g(4&fgnh#FlQIRkKSqxCKRm|oINfn)Ma|4D zcMea1F3&-=jT2^DA-rB6%E~KYvKCw>4rd8!Yim(i<)!&9`rnQz0w=_p3)rS`osl9F zA~`(|4yqL_wi4K>=3w4^&&Ui^_*=Ggp6U8CBUWv_+xeG=^j*EF>ULZSQ&g&TLuDtR_g15^!@=tIx+i?2%~FKMh--}3@FLJ zjL&myLZoJq53;P7M%cCf8ca--!c)DF!5-8fJM!Gy+jC<@P2;BV@!4#B>!DgXM`J~< zwx3YnV0N?o!|b2YArPoVJXe9}v_lp{?t6Di{9RG&5=f$ztt7$w!v)oc!8@R|J=xJqF#6;iES z)F(`zsjnIRk~35YH9oVFFt51+E{FC$sIs=HZDK+;?a5Cz3$pk!efa!Yi`(e_!koXg z#J}20@EIL~6ccsimx03gk+Bm~?rt09Vwzw$@cKvjUzXpn# zJc@m><|6-^i?$H|tz!9~!DM2Jc|Y?Uj>7@?6gP|=*|~Kgit8X!g^V4R_UX`h=FAa4ge(w}0)n;h)HuARxdOG_&Q7$A}!YABtexdWNsm8bjx)W-g&>CEHuVU=$ht*L8 z4fUC^h-maqx;K@vv65$T)A=r>dzO=G6Cr{#m##T`_S`LRzw@>xDppNCo{nTui1;Oh zDXavkUk9~~xo2*^z%4$OTaqOr#PWm~If>8eQC}ax#3VVzN(LtJ1&B)*AfDP$33RuU zTHvkrA}TJE9gpJ)*!$Y3NlF~};H&hrXFG4tHCBF}Yxz6n(RNsixAv28EfeN7AA8S~ zU*MJ;d-!~-v@X=s`A^^~k*O83=T8wie{umE|5aWuVp1iPf5PX}Ql+JuA^1_(xt^Pu zICy&5ig|IoS{Ao|4)3$M_9Av9moR5MNi0Bre4&cTvHkc*b`d{1MFNqAhsrsWv-5OV zynJUvBnD5O{O(?^B)>yxT6w|NR6F$L@5`~-T>1;~$0v#~wJ{%|Cn}MiRq}1e>8`sY z_)NQg!$$wuL^qq~ern&pX8+~o6?A9K$CEG2MS@6y=Qh9T>5mr70#A`l-$MA1<%#-ghsfR~divHuTp!235dRnAPmn8sM8{{v%EXx4fC=$* z50Gea#|R#@)@l3CoH=*%D859nSL-otkrzvL&PPGO4V5wU-jWp?ealz3dA~pT!_WxM&$Ych z-~^^UxP3%SB61y>WCuRg6X|3V9wrf1Fc5-*_)4a*5WXL&Vk2fOuE$e59>kJ=Jc1Rw z9)>($gZidbSFCq`4xjn|rU*^{j^)ddS8hT1EaJNc8=Gr0Bs#KZXrEF)^+O>& z3v--kZhMsQ=OEZp4Us`d-)ag!f919PhW`fZYI9DXK0RdFiVXps&9_&Q=RB_|c4Fx0 zbjFu^I;n;|b?W4>9DVWo_l}bx$5}u%h`C#3s@}6?dApbHJ3r~`t6^Sgytk+44{z?? zoAJ;i%Vv3l3pRfD{SWs==6!wq>oFDnIh*G%Skv^@o`byJUR?GK=6v@#%CQ%}k3`lE S{2uUo|91=gZh_y91^xpodZm#7 literal 0 HcmV?d00001 diff --git a/node_modules/terraformer/docs-build/geostore/alternate-indexes/index.html b/node_modules/terraformer/docs-build/geostore/alternate-indexes/index.html new file mode 100644 index 0000000..ec22d5a --- /dev/null +++ b/node_modules/terraformer/docs-build/geostore/alternate-indexes/index.html @@ -0,0 +1,210 @@ + + + + + + + Terraformer + + + + + + +
    +
    + +
    +
    + +
    +

    GeoStore Alternate Indexes

    +

    Alternate Indexes are a very powerful way to apply additional filters to your searches on properties of a Feature.

    +

    + + Link + Using Alternate Indexes + Back to Top +

    +

    Alternate Indexes can be added to an existing GeoStore very easily:

    +
    // create an index on the properties.street value
    +gs.addIndex({
    +  property: "street",
    +  index: new BTree()
    +});
    +
    +// create an index on the properties.crime value
    +gs.addIndex({
    +  property: "crime",
    +  index: new BTree()
    +});
    +
    + +

    Queries against Alternate Indexes are very specific to the index, but the basic syntax of a query is straightforward:

    +
    gs.within(
    +  geojson,
    +  {
    +    "name": {
    +      "equals": "Main"
    +    },
    +    "crime": {
    +      "equals": "Arson"
    +    }
    +  },
    +  function (err, res) {
    +    // node.js style callback
    +  }
    +);
    +
    + +

    In this example, first every Feature that is within the GeoJSON is found in the Spatial Index, then each of those entries are searched for in the B-Tree indexes. Only those entries that have a properties.street of “Main” and a properties.crime of “Arson” are returned.

    +

    + + Link + Indexable Data + Back to Top +

    +

    Only data that is available in properties is indexable. When a Feature is added to the GeoStore, the list of Alternate Indexes is scanned, and any property that is found is added to that Alternate Index.

    + +

    Alternate Indexes are asyncronous and use Node.js style callbacks.

    +

    + + Link + Existing Alternate Indexes + Back to Top +

    +

    Terraformer currently ships with a single alternate index, with more coming soon.

    + + +

    + + Link + Writing an Alternate Index + Back to Top +

    +

    Alternate Indexes rely on two methods to be exposed to the GeoStore to add and remove data. Additional methods can be added for querying and are introspected for searching.

    + +

    For instance, when a equals query is made against an Alternate Index, if the equals method is on the index, then it is called with all arguments from the contains or within.

    +

    + + Link + Index.add(value, id, callback) + Back to Top +

    +

    Add a value to the Alternate Index by id.

    + + + + + + + + + + + + + + + + + + + + + + + +
    OptionValueDescription
    valueString or NumberThe value to add to the index
    idString or NumberThe id of the Feature to be added
    callbackfunctionCallback to be fired when the add has been completed
    + +

    Example:

    +
    idx.add(value, id, function (err, res) {
    +  // Node.js style callback
    +});
    +
    +

    + + Link + Index.remove(value, id, callback) + Back to Top +

    +

    Add a value to the Alternate Index by id.

    + + + + + + + + + + + + + + + + + + + + + + + +
    OptionValueDescription
    valueString or NumberThe value to remove from the index
    idString or NumberThe id of the Feature to be removed
    callbackfunctionCallback to be fired when the remove has been completed
    + +

    Example:

    +
    idx.add(value, id, function (err, res) {
    +  // Node.js style callback
    +});
    +
    + +
    + + + + + + + + \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/geostore/core-concepts/index.html b/node_modules/terraformer/docs-build/geostore/core-concepts/index.html new file mode 100644 index 0000000..088e482 --- /dev/null +++ b/node_modules/terraformer/docs-build/geostore/core-concepts/index.html @@ -0,0 +1,97 @@ + + + + + + + Terraformer + + + + + + +
    +
    + +
    +
    + +
    +

    GeoStore Core Concepts

    +

    The GeoStore is a spatial database builder. With the GeoStore, you can store your data, index it, and search it.

    +

    + + Link + Indexing + Back to Top +

    +

    Indexes are key to GeoStore performance. The GeoStore uses indexes to look up potential candidates during a search.

    +

    + + Link + Geospatial Indexes + Back to Top +

    +

    Each GeoStore instance requires a Geospatial index (like RTree). These indexes allow for a quick search of possible data that could be within or contain the polygon that you pass in to the GeoStore for a search. It is then later up to math to determine whether the correct data is found.

    +

    + + Link + Alternate Indexes + Back to Top +

    +

    A GeoStore can also have one or more alternate indexes associated with it. These allow for other properties of a Feature to be indexed, such as Crime or Year in order to quickly remove the data from being checked with math.

    +

    + + Link + Storing of the Data + Back to Top +

    +

    Data in a GeoStore can be stored in multiple ways. These Stores can be local, a database, or remote. As long as they conform to the data store model, it does not matter how or where the data is stored.

    + +
    + + + + + + + + \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/geostore/data-stores/index.html b/node_modules/terraformer/docs-build/geostore/data-stores/index.html new file mode 100644 index 0000000..7bba77c --- /dev/null +++ b/node_modules/terraformer/docs-build/geostore/data-stores/index.html @@ -0,0 +1,251 @@ + + + + + + + Terraformer + + + + + + +
    +
    + +
    +
    + +
    +

    GeoStore Data Stores

    + + +

    Data stores are the foundation of the GeoStore. They are key/value storage devices that allow for creating entries, updating, deleting, and retrieving single Feature objects in GeoJSON.

    + +

    Data Stores are designed to be asyncronous, using Node.js style callbacks. In syncronough stores, like Terraformer.Store.Memory and Terraformer.Store.LocalStorage callbacks are executed immediately, but in truly asyncronous stores they behave as expected.

    +

    + + Link + Existing Data Stores + Back to Top +

    +

    There are a couple of existing Data Stores that help you get started storing data immediately.

    + + +

    + + Link + Writing a DataStore + Back to Top +

    +

    Since Data Stores are simply key/value stores, it is very easy to write additional Data Stores as long as the method signatures are correct.

    +

    + + Link + Methods + Back to Top +

    + + Link + new DataStore() + Back to Top +

    +

    Instantiating a DataStore should return a new object containing method signatures conforming to the DataStore interface.

    + +

    You can pass any needed arguments while instantiating.

    + +

    Example:

    +
    var ds = new DataStore({
    +  "path": "some_path",
    +  "username": "me",
    +  "password": "mypass"
    +});
    +
    +

    + + Link + DataStore.add(geostore, callback) + Back to Top +

    +

    Add a geojson object to a DataStore. In the case of a Feature, the id should be used as the primary key for storage and retrieval:

    +
    // get the id
    +var id = geojson.id;
    +
    +// store the data
    +this.magicdb.put(geojson.id, JSON.stringify(geojson));
    +
    + +

    If a FeatureCollection is passed in instead, each Feature inside of the FeatureCollection needs to be added before the callback is called.

    + + + + + + + + + + + + + + + + + + +
    OptionValueDescription
    GeoJSONobjectMust be either a Feature or FeatureCollection and contain an id
    callbackfunctionCallback to be fired when the add has been completed
    + +

    Example:

    +
    ds.add(geojson, function (err, res) {
    +  // Node.js style callback
    +});
    +
    +

    + + Link + DataStore.update(geostore, callback) + Back to Top +

    +

    Update a geojson object already in a DataStore. Only a Feature should be able to be updated, the id should be used as the primary key for update:

    + + + + + + + + + + + + + + + + + + +
    OptionValueDescription
    GeoJSONobjectMust be a Feature and contain an id
    callbackfunctionCallback to be fired when the update has been completed
    + +

    Example:

    +
    ds.update(geojson, function (err, res) {
    +  // Node.js style callback
    +});
    +
    +

    + + Link + DataStore.remove(id, callback) + Back to Top +

    +

    Remove a geojson object from the DataStore by id.

    + + + + + + + + + + + + + + + + + + +
    OptionValueDescription
    idString or NumberThe id of the Feature to be removed
    callbackfunctionCallback to be fired when the remove has been completed
    + +

    Example:

    +
    ds.remove(id, function (err, res) {
    +  // Node.js style callback
    +});
    +
    +

    + + Link + DataStore.get(id, callback) + Back to Top +

    +

    Retrieves a geojson object from the DataStore by id.

    + + + + + + + + + + + + + + + + + + +
    OptionValueDescription
    idString or NumberThe id of the Feature to be retrieved
    callbackfunctionCallback to be fired when the remove has been completed
    + +

    Example:

    +
    ds.get(id, function (err, res) {
    +  // Node.js style callback
    +});
    +
    + +
    + + + + + + + + \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/geostore/index.html b/node_modules/terraformer/docs-build/geostore/index.html new file mode 100644 index 0000000..55bb3f1 --- /dev/null +++ b/node_modules/terraformer/docs-build/geostore/index.html @@ -0,0 +1,409 @@ + + + + + + + Terraformer + + + + + + +
    +
    + +
    +
    + +
    +

    GeoStore

    + + +

    The Terraformer GeoStore is a set of building blocks for managing spatial data as a GeoJSON Feature or FeatureCollection. It includes functionality for storing and querying data in primarily a spatial manner.

    + +

    GeoStores are broken into three parts: Data Stores, Spatial Indexes, and Alternate Indexes.

    + +

    More in-depth information can be found in Core Concepts.

    +

    + + Link + Using the GeoStore + Back to Top +

    +

    The GeoStore can be used in both the browser and server-side via Node.js. Functionally, they behave the same, but some Data Stores and Indexes will only work in one environment. For instance, LocalStorage will not work by default in Node.js.

    + +

    The GeoStore uses Node.js style callbacks, so most method signatures require a callback function that expects error and response: function (err, res) { }.

    + +

    The GeoStore manages data that is made available as either a Feature or a FeatureCollection. In order to work, there must be an id field.

    +
    {
    +  "type": "Feature",
    +  "properties": {},
    +  "id": "my id",
    +  "geometry": {
    +    "type": "Polygon",
    +    "coordinates": [
    +      [
    +        [
    +          -111.09374, 41.50857
    +        ],
    +        [
    +          -111.09374, 45.08903
    +        ],
    +        [
    +          -105.11718, 45.08903
    +        ],
    +        [
    +          -105.11718, 41.50857
    +        ],
    +        [
    +          -111.09374, 41.50857
    +        ]
    +      ]
    +    ]
    +  }
    +}
    +
    +

    + + Link + Using in the Browser + Back to Top +

    +

    Using the GeoStore in the browser requires including both Terraformer and the GeoStore:

    +
    <script src="https://unpkg.com/terraformer@1.0.7"></script>
    +<script src="https://unpkg.com/terraformer-geostore@1.0.4/browser/terraformer-geostore.js"></script>
    +
    + +

    Once those are included, you can create a new Store. You will need to include both a Data Store and a Spatial Index to instantiate a GeoStore.

    +
    // create a new GeoStore using Memory and an RTree Index
    +var store = new Terraformer.GeoStore({
    +  store: new Terraformer.Store.Memory(),
    +  index: new Terraformer.RTree()
    +});
    +
    + +

    Once the store has been created, you can start using it right away.

    +

    + + Link + Using in Node.js + Back to Top +

    +

    In Node.js, the components are available via require().

    +
    // require geostore, an RTree index, and a LevelDB data store
    +var GeoStore = require('terraformer-geostore').GeoStore;
    +var RTree = require('terraformer-rtree').RTree;
    +var LevelStore = require('terraformer-geostore-leveldb');
    +
    + +

    Once the packages are in scope, it is very similar as using the GeoStore in the browser.

    +
    var store = new GeoStore({
    +  store: new LevelStore(),
    +  index: new RTree()
    +});
    +
    +

    + + Link + Methods + Back to Top +

    + + Link + GeoStore.add(geojson, callback) + Back to Top +

    +

    Add a geojson object to the GeoStore.

    + + + + + + + + + + + + + + + + + + +
    OptionValueDescription
    GeoJSONobjectMust be either a Feature or FeatureCollection and contain an id
    callbackfunctionCallback to be fired when the add has been completed
    + +

    Example:

    +
    store.add(geojson, function (err, res) {
    +  // Node.js style callback
    +});
    +
    +

    + + Link + GeoStore.update(geojson, callback) + Back to Top +

    +

    Update a single geojson Feature in the GeoStore.

    + + + + + + + + + + + + + + + + + + +
    OptionValueDescription
    GeoJSONobjectMust be a Feature and contain an id
    callbackfunctionCallback to be fired when the update has been completed
    + +

    Example:

    +
    store.update(geojson, function (err, res) {
    +  // Node.js style callback
    +});
    +
    +

    + + Link + GeoStore.remove(id, callback) + Back to Top +

    +

    Removes a single geojson Feature by id.

    + + + + + + + + + + + + + + + + + + +
    OptionValueDescription
    idString or NumberThe id of the Feature to be removed
    callbackfunctionCallback to be fired when the remove has been completed
    + +

    Example:

    +
    store.remove(id, function (err, res) {
    +  // Node.js style callback
    +});
    +
    +

    + + Link + GeoStore.get(id, callback) + Back to Top +

    +

    Retrieves a single geojson Feature by id.

    + + + + + + + + + + + + + + + + + + +
    OptionValueDescription
    idString or NumberThe id of the Feature to be retrieved
    callbackfunctionCallback to be fired when the get has been completed
    + +

    Example:

    +
    store.get(id, function (err, res) {
    +  // Node.js style callback
    +});
    +
    +

    + + Link + GeoStore.contains(geojson, search, callback) + Back to Top +

    +

    Find all Features that contain the geojson primitive passed in. contains can use additional indexes to do set elimination on properties of a Feature.

    + + + + + + + + + + + + + + + + + + + + + + + +
    OptionValueDescription
    GeoJSONobjectA GeoJSON primitive to search with
    search (optional)objectThe second argument is optional. If provided it contains additional search criteria for set elimination
    callbackfunctionCallback to be fired when the contains has been completed
    + +

    Example:

    +
    store.contains(geojson, function (err, res) {
    +  // Node.js style callback
    +});
    +
    +store.contains(
    +  geojson,
    +  {
    +    "name":
    +    {
    +      "equals": "Multnomah"
    +    }
    +  },
    +  function (err, res) {
    +    // Node.js style callback
    +  }
    +);
    +
    +

    + + Link + GeoStore.within(geojson, search, callback) + Back to Top +

    +

    Find all Features that are within the geojson primitive passed in. within can use additional indexes to do set elimination on properties of a Feature.

    + + + + + + + + + + + + + + + + + + + + + + + +
    OptionValueDescription
    GeoJSONobjectA GeoJSON primitive to search with
    search (optional)objectThe second argument is optional. If provided it contains additional search criteria for set elimination
    callbackfunctionCallback to be fired when the within has been completed
    + +

    Example:

    +
    store.within(geojson, function (err, res) {
    +  // Node.js style callback
    +});
    +
    +store.within(
    +  geojson,
    +  {
    +    "name":
    +    {
    +      "equals": "Multnomah"
    +    }
    +  },
    +  function (err, res) {
    +    // Node.js style callback
    +  }
    +);
    +
    +

    + + Link + GeoStore.createReadStream() + Back to Top +

    +

    GeoStore supports readable streams in both the browser and Nodejs. Currently only flowing streams are supported. Streams can be created with the createReadStream() method. When a stream has been created, the next within or contains request uses that stream in place of a callback. It is important to note that the stream only lasts for the duration of a single search via within or contains.

    + +

    The stream will emit data on any data, and end with the final entry found.

    + +

    Since streams are not reentrant in the GeoStore, it is recommended to create a new GeoStore for each stream. Streams are destroyed after the end event has been called.

    + +

    Example:

    +
    var stream = store.createReadStream();
    +
    +stream.on("data", function (geojson) {
    +  // found geojson
    +});
    +
    +stream.on("end", function (geojson) {
    +  // final geojson object
    +});
    +
    + +
    + + + + + + + + \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/geostore/spatial-indexes/index.html b/node_modules/terraformer/docs-build/geostore/spatial-indexes/index.html new file mode 100644 index 0000000..2835187 --- /dev/null +++ b/node_modules/terraformer/docs-build/geostore/spatial-indexes/index.html @@ -0,0 +1,250 @@ + + + + + + + Terraformer + + + + + + +
    +
    + +
    +
    + +
    +

    GeoStore Spatial Indexes

    + + +

    Spatial Indexes are an extremely important part of the GeoStore. Spatial Indexes allow for very quick elimination of Features and are part of the core of the GeoStore.

    + +

    Spatial Indexes are asyncronous and use Node.js style callbacks.

    +

    + + Link + Existing Spatial Indexes + Back to Top +

    +

    Terraformer currently ships with a single spatial index, with more coming soon.

    + +
      +
    • RTree - RTree Index, works in Node.js and the browser
    • +
    +

    + + Link + Writing a Spatial Index + Back to Top +

    +

    Spatial Indexes are designed for searching spatial data, whether in 2D or 3D. The Terraformer GeoStore platform has defined a set of indexes that allow for multiple spatial index types to be used. As long as the methods are asyncronous and conform to the Terraformer GeoStore interface, any type of spatial index can be used.

    +

    + + Link + Methods + Back to Top +

    + + Link + new SpatialIndex() + Back to Top +

    +

    Instantiating a SpatialIndex should return a new object containing method signatures conforming to the SpatialIndex interface.

    + +

    You can pass any needed arguments while instantiating.

    + +

    Example:

    +
    var si = new SpatialIndex({
    +  "width": 45,
    +  "dateline": false
    +});
    +
    +

    + + Link + SpatialIndex.insert(geojson | envelope, id, callback) + Back to Top +

    +

    Add a geojson object or envelope to a SpatialIndex. It is important to include an id, as this is the key that is returned from searches.

    + + + + + + + + + + + + + + + + + + + + + + + +
    OptionValueDescription
    GeoJSON or EnvelopeobjectMust be either GeoJSON or Envelope
    idString or NumberThe id of the spatial area
    callbackfunctionCallback to be fired when the insert has been completed
    + +

    Example:

    +
    si.insert(geojson, id, function (err, res) {
    +  // Node.js style callback
    +});
    +
    +

    + + Link + SpatialIndex.remove(geojson | envelope, id, callback) + Back to Top +

    +

    Remove a geojson or envelope object already in a SpatialIndex.

    + + + + + + + + + + + + + + + + + + + + + + + +
    OptionValueDescription
    GeoJSON or EnvelopeobjectMust be either GeoJSON or Envelope
    idString or NumberThe id of the spatial area
    callbackfunctionCallback to be fired when the remove has been completed
    + +

    Example:

    +
    si.remove(geojson, id, function (err, res) {
    +  // Node.js style callback
    +});
    +
    +

    + + Link + SpatialIndex.search(geojson | envelope, callback) + Back to Top +

    +

    Searches for any id’s that can contain the geojson or envelope passed in. These are returned as an Array.

    + + + + + + + + + + + + + + + + + + +
    OptionValueDescription
    GeoJSON or EnvelopeobjectMust be either GeoJSON or Envelope
    callbackfunctionCallback to be fired when the search has been completed
    + +

    Example:

    +
    si.search(geojson, function (err, res) {
    +  // Node.js style callback
    +});
    +
    +

    + + Link + SpatialIndex.within(geojson | envelope, callback) + Back to Top +

    +

    Searches for any id’s that are within the geojson or envelope passed in. These are returned as an Array.

    + + + + + + + + + + + + + + + + + + +
    OptionValueDescription
    GeoJSON or EnvelopeobjectMust be either GeoJSON or Envelope
    callbackfunctionCallback to be fired when the search has been completed
    + +

    Example:

    +
    si.within(geojson, function (err, res) {
    +  // Node.js style callback
    +});
    +
    + +
    + + + + + + + + \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/getting-started/index.html b/node_modules/terraformer/docs-build/getting-started/index.html new file mode 100644 index 0000000..8961ccd --- /dev/null +++ b/node_modules/terraformer/docs-build/getting-started/index.html @@ -0,0 +1,177 @@ + + + + + + + Terraformer + + + + + + +
    +
    + +
    +
    + +
    +

    Terraformer

    + + +

    Terraformer is an open source (MIT licensed) Javascript geo toolkit, built for the server and the browser.

    +

    + + Link + Getting Started + Back to Top +

    +

    Terraformer is broken into multiple small packages to give you the functionality you need while still remaining extremely lightweight.

    + +

    There are currently several packages in the Terraformer ecosystem.

    + +
      +
    • Terraformer - The core library for manipilating GeoJSON and performaing calculations. Most other modules rely on terraformer.
    • +
    • ArcGIS Parser - Parses ArcGIS geometry objects to GeoJSON and vice-versa.
    • +
    • WKT Parser - Parses basic WKT (Well Known Text) strings to and from GeoJSON.
    • +
    • GeoStore - A JavaScript database for storing and querying collections of GeoJSON Features. GeoStores also need an index module and a backing store which are distributed as seperate modules.
    • +
    +

    + + Link + Node.js + Back to Top +

    +

    Install the core module with NPM and then require it in your Node program.

    +
    $ npm install terraformer
    +
    +
    var Terraformer = require('terraformer');
    +
    + +

    If needed, supporting packages can be added too.

    +
    require('terraformer-arcgis-parser');
    +require('terraformer-wkt-parser');
    +require('terraformer-geostore');
    +
    +

    + + Link + Browser + Back to Top +

    +

    To use the Terraformer library, include a reference to it using a <script> tag.

    +
    <script src="https://unpkg.com/terraformer@1.0.7"></script>
    +
    + +

    To utilize supporting packages, you must load their source as well.

    +
    <script src="https://unpkg.com/terraformer-arcgis-parser@1.0.5"></script>
    +<script src="https://unpkg.com/terraformer-wkt-parser@1.1.2"></script> 
    +
    + +

    To see Terraformer in action in the browser, check out our live demos.

    +

    + + Link + Working with Primitives + Back to Top +

    +

    Most of the core Terraformer libray centers around using Primitives, which wrap GeoJSON objects and provide additional functionality.

    + +

    You can create a new Terraformer.Primitive with any GeoJSON object.

    +
    
    +var polygon = new Terraformer.Primitive({
    +  "type": "Polygon",
    +  "coordinates": [
    +    [
    +      [-122.66589403152467, 45.52290150862236],
    +      [-122.66926288604736, 45.52291654238294],
    +      [-122.67115116119385, 45.518406234030586],
    +      [-122.67325401306151, 45.514000817199715],
    +      [-122.6684260368347, 45.5127377671934],
    +      [-122.66765356063841, 45.51694782364431],
    +      [-122.66589403152467, 45.52290150862236 ]
    +    ]
    +  ]
    +});
    +
    +var point = new Terraformer.Primitive({
    +  "type": "Point",
    +  "coordinates": [-122.66947746276854, 45.51775972687403]
    +});
    +
    + +

    Now that you have a point and a polygon primitive, you can use many of the primitive helper methods.

    +
    // add a new vertex to our polygon
    +polygon.insertVertex([-122.6708507537842, 45.513188859735436], 2);
    +
    +// figure out if our point is within our polygon
    +point.within(polygon); // returns true
    +
    + +

    You can also have Terraformer perform many geometric operations like convex hulls and bounding boxes.

    +
    var convexHull = polygon.convexHull();
    +
    +point.within(convexHull); // returns true
    +
    +var boundingBox = polygon.bbox(); // returns the geojson bounding box for this object.
    +
    +

    + + Link + Whats Next? + Back to Top +

    +

    Start exploring all the options you have working with Primitives and the core library. Then start exploring other modules.

    + +

    Terraformer GeoStore is a JavaScript database for indexing and querying large amounds of GeoJSON. You can use multiple types of spatial indexes and backing stores for your data.

    + +

    You can also convert data between different formats like ArcGIS Geometries and Well Known Text. Since Terraformer is a modular framework, you can pick and choose the pieces to use in your own application.

    + +
    + + + + + + + + \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/glossary/index.html b/node_modules/terraformer/docs-build/glossary/index.html new file mode 100644 index 0000000..3bd33d9 --- /dev/null +++ b/node_modules/terraformer/docs-build/glossary/index.html @@ -0,0 +1,449 @@ + + + + + + + Terraformer + + + + + + +
    +
    + +
    +
    + +
    +

    Glossary

    + +

    + + Link + GeoJSON + Back to Top +

    +

    Terraformer uses the GeoJSON specification as a guide on how to format all representation of geographical data.

    +

    + + Link + Coordinate + Back to Top +

    +

    A coordinate is the building block for the rest of the GeoJSON specification. It is represented by an array of x, y integers. The ordering of x and y are important, this means that when representing latitude and longitiude the order is [longitude, latitude].

    +
    [-122.680, 45.528]
    +
    + +

    GeoJSON Coordinate

    +

    + + Link + Coordinates + Back to Top +

    +

    An array of Coordinate objects that are used to define a line or polygon.

    +
    [
    +  [-122.680, 45.58],
    +  [-123.230, 45.62],
    +  [-122.80, 45.22]
    +]
    +
    + +

    GeoJSON Coordinate

    +

    + + Link + Bbox + Back to Top +

    +

    A GeoJSON bounding box is usually a 4-item array representing the rectangle that will contain the GeoJSON object.

    +
    [-122.70, 45.51, -122.64, 45.53]
    +
    + +

    GeoJSON BBox

    +

    + + Link + Geometry + Back to Top +

    +

    “GeoJSON Geometry” refers to any of the single geometry objects from the geoJSON specification like Point, MultiPoint, LineString, MultiLineString, Polygon, or MultiPolygon.

    + +

    GeoJSON Geometry

    +

    + + Link + Point + Back to Top +

    +

    An object representing a single point.

    +
    {
    +  "type": "Point",
    +  "coordinates": [-105.01621, 39.57422]
    +}
    +
    + +

    GeoJSON Point

    +

    + + Link + MultiPoint + Back to Top +

    +

    An object representing multiple points as a single coordinate array.

    +
    {
    +  "type": "MultiPoint",
    +  "coordinates": [ [-105.01, 39.57], [-80.66, 35.05] ]
    +}
    +
    + +

    GeoJSON MultiPoint

    +

    + + Link + LineString + Back to Top +

    +

    A series of coordinates that form a line.

    +
    {
    +  "type": "LineString",
    +  "coordinates": [
    +    [-101.5, 39.662],
    +    [-101.75, 39.2415],
    +    [-101.64, 39.2415],
    +  ]
    +}
    +
    + +

    GeoJSON LineString

    +

    + + Link + MultiLineString + Back to Top +

    +

    An object that represents multiple linestrings in a single object.

    +
    {
    +  "type": "MultiLineString",
    +  "coordinates": [
    +    [
    +      [-101.5, 39.662],
    +      [-101.75, 39.2415],
    +      [-101.23, 39.2415],
    +      [-101.749, 39.7984],
    +      [-101.5, 39.011]
    +    ],[
    +      [-99.23, 38.6605],
    +      [-99.56, 38.727],
    +      [-99.25, 38.018]
    +    ],[
    +      [-98.499, 38.913],
    +      [-98.499, 38.913],
    +      [-98.38, 38.15],
    +      [-97.5, 38.629]
    +    ]
    +  ]
    +}
    +
    + +

    GeoJSON MultiLineString

    +

    + + Link + Polygon + Back to Top +

    +

    An array of coordinates defining a polygon.

    +
    {
    +  "type": "Polygon",
    +  "coordinates": [
    +    [ [41.83, 71.01], [56.95, 33.75], [21.79, 36.56], [41.83, 71.01] ]
    +  ]
    +}
    +
    + +

    GeoJSON Polygon

    +

    + + Link + MultiPolygon + Back to Top +

    +

    An object that represents multiple polygons in a single object.

    +
    {
    +  "type": "MultiPolygon",
    +  "coordinates": [
    +    [
    +      [ [102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0] ]
    +    ],
    +    [
    +      [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ]
    +    ]
    +  ]
    +}
    +
    + +

    GeoJSON MultiPolygon

    +

    + + Link + Feature + Back to Top +

    +

    GeoJSON Features combine a Geometry object with a unique identifier and set of metadata.

    +
    {
    +  "type": "Feature",
    +  "id": "stadium",
    +  "geometry": {
    +    "type": "Point",
    +    "coordinates": [-104.99404, 39.75621]
    +  },
    +  "properties": {
    +    "name": "Coors Field",
    +    "amenity": "Baseball Stadium",
    +    "popupContent": "This is where the Rockies play!"
    +  }
    +}
    +
    + +

    Feature

    +

    + + Link + FeatureCollection + Back to Top +

    +

    Contains multiple Features objects in a single object.

    +
    {
    +  "type": "FeatureCollection",
    +  "features": [
    +    {
    +      "type": "Feature",
    +      "geometry": {
    +        "type": "Point",
    +        "coordinates": [-80.83775386582222, 35.24980190252168]
    +      },
    +      "properties": {
    +        "name": "DOUBLE OAKS CENTER",
    +        "address": "1326 WOODWARD AV"
    +      }
    +    },
    +    {
    +      "type": "Feature",
    +      "geometry": {
    +        "type": "Point",
    +        "coordinates": [-80.83827000459532, 35.25674709224663]
    +      },
    +      "properties": {
    +        "name": "DOUBLE OAKS NEIGHBORHOOD PARK",
    +        "address": "2605  DOUBLE OAKS RD"
    +      }
    +    }
    +  ]
    +}
    +
    + +

    FeatureCollection

    +

    + + Link + GeometryCollection + Back to Top +

    +

    Contains multiple Geometry objects in a single object.

    +
    {
    +  "type": "GeometryCollection",
    +  "geometries": [{
    +    "type": "Polygon",
    +    "coordinates": [
    +      [ [41.83, 71.01], [56.95, 33.75], [21.79, 36.56], [41.83, 71.01] ]
    +    ]
    +    },{
    +      "type": "MultiPoint",
    +      "coordinates": [ [100, 0], [45, -122] ]
    +    }
    +  ]
    +}
    +
    + +

    GeometryCollection

    +

    + + Link + Terraformer Primitives + Back to Top +

    +

    Terraformer Primitives wrap their GeoJSON counterparts to provide extra functionality.

    +

    + + Link + Point Primitive + Back to Top +

    +

    An object respresenting a GeoJSON Point

    + +

    Point

    +

    + + Link + MultiPoint Primitive + Back to Top +

    +

    An object respresenting a GeoJSON MultiPoint

    + +

    MultiPoint

    +

    + + Link + LineString Primitive + Back to Top +

    +

    An object respresenting a GeoJSON LineString

    + +

    LineString

    +

    + + Link + MultiLineString Primitive + Back to Top +

    +

    An object respresenting a GeoJSON MultiLineString

    + +

    MultiLineString

    +

    + + Link + Polygon Primitive + Back to Top +

    +

    An object respresenting a GeoJSON Polygon

    + +

    Polygon

    +

    + + Link + MultiPolygon Primitive + Back to Top +

    +

    An object respresenting a GeoJSON MultiPolygon

    + +

    MultiPolygon

    +

    + + Link + Feature Primitive + Back to Top +

    +

    An object respresenting a GeoJSON Feature

    + +

    Feature

    +

    + + Link + FeatureCollection Primitive + Back to Top +

    +

    An object respresenting a GeoJSON FeatureCollection

    + +

    FeatureCollection

    +

    + + Link + GeometryCollection Primitive + Back to Top +

    +

    An object respresenting a GeoJSON GeometryCollection

    + +

    GeometryCollection

    +

    + + Link + Circle Primitive + Back to Top +

    +

    An object representing a GeoJSON Feature which contains a polygonal representation of a circle.

    + +

    Circle

    +

    + + Link + Misc + Back to Top +

    + + Link + Envelope + Back to Top +

    +

    Envelopes are a common structure for indexes like Terraformer.RTree.

    +
    {
    +  x: 1,
    +  y: 1,
    +  w: 15
    +  h: 15
    +}
    +
    +

    + + Link + Convex Hull + Back to Top +

    +

    Convex

    +
    {
    +  x: 1,
    +  y: 1,
    +  w: 15
    +  h: 15
    +}
    +
    + +
    + + + + + + + + \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/index.html b/node_modules/terraformer/docs-build/index.html new file mode 100644 index 0000000..9535705 --- /dev/null +++ b/node_modules/terraformer/docs-build/index.html @@ -0,0 +1,172 @@ + + + + + + + + + + Home | Terraformer + + + + + + + + +
    +
    + +
    +
    +
    +
    +

    terraformer

    +

    A thing that does stuff to your data so you can map gooder.

    + +
    +
    + +
    +
    + terraformer core +

    Terraformer Core

    +

    + Documentation + Get Core +

    +
    + +
    +

    Tools and objects for working with and transforming GeoJSON.

    +
    + +

    The core Terraformer library provides a series of Terraformer.Primitives which wrap GeoJSON objects for additional functionality and a series of Terraformer.Tools for manipulating and performing calculations on coordinates.

    + +

    You can also use the core library to see if an object contains or intersects another object, convert an object to a different spatial reference, or transform an object’s coordinates.

    + +

    The core library is also used in most other components of Terraformer for performing basic tasks and calculations.

    + +
    + terraformer geostore +

    GeoStore

    +

    + Documentation + Get GeoStore +

    +
    + +
    +

    A lightweight API that allows you to store, index and query geographic data.

    +
    + +

    GeoStore is a lightweight API that allows you to store, index and query geographic data with a variety of indexes and persistence methods. Each GeoStore consists of…

    + +
      +
    1. A spatial index which is responsible for indexing and optimizing the geographic data in the store.

    2. +
    3. A data store which is responsible for persisting data, either holding it in memory or persisting it to a backend database.

    4. +
    5. Any number of secondary indexes which index properties associated with your geographic data.

    6. +
    + +
    + terraformer ArcGIS Parser +

    ArcGIS Parser

    +

    + Documentation + Get ArcGIS Parser +

    +
    + +

    Allows you to convert between Terraformer Primitives or GeoJSON and the ArcGIS Geometry Objects.

    +
    // parse ArcGIS JSON, convert it to a Terraformer.Primitive
    +var primitive = Terraformer.ArcGIS.parse({
    +  x:"-122.6764",
    +  y:"45.5165",
    +  spatialReference: {
    +    wkid: 4326
    +  }
    +});
    +
    +// take a Terraformer.Primitive or GeoJSON and convert it to ArcGIS JSON
    +var point = Terraformer.ArcGIS.convert({
    +  "type": "Point",
    +  "coordinates": [45.5165, -122.6764]
    +});
    +
    + +
    + terraformer WKT Parser +

    Well Known Text Parser

    +

    + Documentation + Get WKT Parser +

    +
    + +

    Well Known Text is a format used by databases like PostGIS. With Terraformer’s WKT parser you can convert between this format and GeoJSON.

    +
    // parse a WKT file, convert it into a primitive
    +var primitive = Terraformer.WKT.parse('LINESTRING (30 10, 10 30, 40 40)');
    +
    +// take a primitive and convert it into a WKT representation
    +var polygon = Terraformer.WKT.convert({
    +  "type": "Polygon",
    +  "coordinates": [
    +    [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ],
    +    [ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ]
    +  ]
    +});
    +
    + +
    + + + + + + \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/install/index.html b/node_modules/terraformer/docs-build/install/index.html new file mode 100644 index 0000000..127d511 --- /dev/null +++ b/node_modules/terraformer/docs-build/install/index.html @@ -0,0 +1,155 @@ + + + + + + + Terraformer + + + + + + +
    +
    + +
    +
    + +
    +

    Getting Terraformer

    + + +

    We make Terraformer available via npm, bower and via a CDN.

    +

    + + Link + Terraformer Core + Back to Top +

    +

    Node npm install terraformer

    + +

    Bower bower install terraformer

    + +

    Download +CDN

    +

    + + Link + ArcGIS Parser + Back to Top +

    +

    Node npm install terraformer-arcgis-parser

    + +

    Bower bower install terraformer-arcgis-parser

    + +

    Download +CDN

    +

    + + Link + WKT Parser + Back to Top +

    +

    Node npm install terraformer-wkt-parser

    + +

    Bower bower install terraformer-wkt-parser

    + +

    Download +CDN

    +

    + + Link + GeoStore + Back to Top +

    +

    Node npm install terraformer-geostore

    + +

    Bower bower install terraformer-geostore

    + +

    Download +CDN

    +

    + + Link + RTree Index + Back to Top +

    +

    Node npm install terraformer-rtree

    + +

    Bower bower install terraformer-rtree

    + +

    Download +CDN

    +

    + + Link + Memory Store + Back to Top +

    +

    Node npm install terraformer-geostore-memory

    + +

    Bower bower install terraformer-geostore-memory

    + +

    Download +CDN

    +

    + + Link + LocalStorage Store + Back to Top +

    +

    Node npm install terraformer-geostore-localstorage

    + +

    Bower bower install terraformer-geostore-localstorage

    + +

    Download +CDN

    + +
    + + + + + + + + \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/partials/cover/index.html b/node_modules/terraformer/docs-build/partials/cover/index.html new file mode 100644 index 0000000..e63b478 --- /dev/null +++ b/node_modules/terraformer/docs-build/partials/cover/index.html @@ -0,0 +1,10 @@ +
    +
    +

    terraformer

    +

    A thing that does stuff to your data so you can map gooder.

    + +
    +
    \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/partials/doctoc/index.html b/node_modules/terraformer/docs-build/partials/doctoc/index.html new file mode 100644 index 0000000..809e67d --- /dev/null +++ b/node_modules/terraformer/docs-build/partials/doctoc/index.html @@ -0,0 +1,23 @@ +
    +
    + +
    +
    \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/partials/footer/index.html b/node_modules/terraformer/docs-build/partials/footer/index.html new file mode 100644 index 0000000..4e95355 --- /dev/null +++ b/node_modules/terraformer/docs-build/partials/footer/index.html @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/partials/index_partials/arcgis_parser/index.html b/node_modules/terraformer/docs-build/partials/index_partials/arcgis_parser/index.html new file mode 100644 index 0000000..819f197 --- /dev/null +++ b/node_modules/terraformer/docs-build/partials/index_partials/arcgis_parser/index.html @@ -0,0 +1,25 @@ +
    + terraformer ArcGIS Parser +

    ArcGIS Parser

    +

    + Documentation + Get ArcGIS Parser +

    +
    + +

    Allows you to convert between Terraformer Primitives or GeoJSON and the ArcGIS Geometry Objects.

    +
    // parse ArcGIS JSON, convert it to a Terraformer.Primitive
    +var primitive = Terraformer.ArcGIS.parse({
    +  x:"-122.6764",
    +  y:"45.5165",
    +  spatialReference: {
    +    wkid: 4326
    +  }
    +});
    +
    +// take a Terraformer.Primitive or GeoJSON and convert it to ArcGIS JSON
    +var point = Terraformer.ArcGIS.convert({
    +  "type": "Point",
    +  "coordinates": [45.5165, -122.6764]
    +});
    +
    diff --git a/node_modules/terraformer/docs-build/partials/index_partials/geostore/index.html b/node_modules/terraformer/docs-build/partials/index_partials/geostore/index.html new file mode 100644 index 0000000..98235ea --- /dev/null +++ b/node_modules/terraformer/docs-build/partials/index_partials/geostore/index.html @@ -0,0 +1,20 @@ +
    + terraformer geostore +

    GeoStore

    +

    + Documentation + Get GeoStore +

    +
    + +
    +

    A lightweight API that allows you to store, index and query geographic data.

    +
    + +

    GeoStore is a lightweight API that allows you to store, index and query geographic data with a variety of indexes and persistence methods. Each GeoStore consists of…

    + +
      +
    1. A spatial index which is responsible for indexing and optimizing the geographic data in the store.

    2. +
    3. A data store which is responsible for persisting data, either holding it in memory or persisting it to a backend database.

    4. +
    5. Any number of secondary indexes which index properties associated with your geographic data.

    6. +
    diff --git a/node_modules/terraformer/docs-build/partials/index_partials/terraformer_core/index.html b/node_modules/terraformer/docs-build/partials/index_partials/terraformer_core/index.html new file mode 100644 index 0000000..0f8ba53 --- /dev/null +++ b/node_modules/terraformer/docs-build/partials/index_partials/terraformer_core/index.html @@ -0,0 +1,18 @@ +
    + terraformer core +

    Terraformer Core

    +

    + Documentation + Get Core +

    +
    + +
    +

    Tools and objects for working with and transforming GeoJSON.

    +
    + +

    The core Terraformer library provides a series of Terraformer.Primitives which wrap GeoJSON objects for additional functionality and a series of Terraformer.Tools for manipulating and performing calculations on coordinates.

    + +

    You can also use the core library to see if an object contains or intersects another object, convert an object to a different spatial reference, or transform an object’s coordinates.

    + +

    The core library is also used in most other components of Terraformer for performing basic tasks and calculations.

    diff --git a/node_modules/terraformer/docs-build/partials/index_partials/wkt_parser/index.html b/node_modules/terraformer/docs-build/partials/index_partials/wkt_parser/index.html new file mode 100644 index 0000000..b842eca --- /dev/null +++ b/node_modules/terraformer/docs-build/partials/index_partials/wkt_parser/index.html @@ -0,0 +1,22 @@ +
    + terraformer WKT Parser +

    Well Known Text Parser

    +

    + Documentation + Get WKT Parser +

    +
    + +

    Well Known Text is a format used by databases like PostGIS. With Terraformer’s WKT parser you can convert between this format and GeoJSON.

    +
    // parse a WKT file, convert it into a primitive
    +var primitive = Terraformer.WKT.parse('LINESTRING (30 10, 10 30, 40 40)');
    +
    +// take a primitive and convert it into a WKT representation
    +var polygon = Terraformer.WKT.convert({
    +  "type": "Polygon",
    +  "coordinates": [
    +    [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ],
    +    [ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ]
    +  ]
    +});
    +
    diff --git a/node_modules/terraformer/docs-build/partials/nav/index.html b/node_modules/terraformer/docs-build/partials/nav/index.html new file mode 100644 index 0000000..b832bf0 --- /dev/null +++ b/node_modules/terraformer/docs-build/partials/nav/index.html @@ -0,0 +1,16 @@ + \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/partials/subnav/index.html b/node_modules/terraformer/docs-build/partials/subnav/index.html new file mode 100644 index 0000000..001cf49 --- /dev/null +++ b/node_modules/terraformer/docs-build/partials/subnav/index.html @@ -0,0 +1,30 @@ + \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/wkt-parser/index.html b/node_modules/terraformer/docs-build/wkt-parser/index.html new file mode 100644 index 0000000..1e0687a --- /dev/null +++ b/node_modules/terraformer/docs-build/wkt-parser/index.html @@ -0,0 +1,147 @@ + + + + + + + Terraformer + + + + + + +
    +
    + +
    +
    + +
    +

    WKT Parser

    + + +

    Well Known Text is a format used by databases like PostGIS. With Terraformer’s WKT parser you can convert between this format and GeoJSON.

    +

    + + Link + Using the WKT Parser + Back to Top +

    +

    The WKT parser can be used client-side in a browser and server-side via Node.js.

    +
    // parse a WKT string, converting it into a Terraformer.Primitive
    +var geojson = Terraformer.WKT.parse('LINESTRING (30 10, 10 30, 40 40)');
    +
    +// take a primitive and convert it into a WKT representation
    +var polygon = Terraformer.WKT.convert({
    +  "type": "Polygon",
    +  "coordinates": [
    +    [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ],
    +    [ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ]
    +  ]
    +});
    +
    +

    + + Link + Using in the Browser + Back to Top +

    +

    In the browser, the core Terraformer library is required.

    +
    <script src="terraformer.min.js"></script>
    +<script src="terraformer-wkt-parser.min.js"></script>
    +<script>
    +  //Terraformer and Terraformer.WKT will be defined.
    +</script>
    +
    + +

    You can also use Bower to install the components if you like, or download them and host them yourself.

    +
    $ bower install terraformer-wkt-parser
    +
    +

    + + Link + Using in Node.js + Back to Top +

    +

    Just install the package from NPM with $ npm install terraformer-wkt-parser. Then include it in your application.

    +
    var WKT = require('terraformer-wkt-parser');
    +
    +// Start using the parse and convert methods!
    +
    +

    + + Link + Methods + Back to Top +

    + + Link + WKT.parse(string) + Back to Top +

    +

    Terraformer.WKT.parse(string) - Used to convert a POINT, MULTIPOINT, LINESTRING, MULTILINESTRING, POLYGON or MULTIPOLYGON WKT string into a Terraformer.Primitive.

    +
    var geojson = Terraformer.WKT.parse('LINESTRING (30 10, 10 30, 40 40)');
    +
    +

    + + Link + WKT.convert(geojson) + Back to Top +

    +

    Terraformer.WKT.convert(geoJSON) will turn a GeoJSON Point, MultiPoint, LineString, MultiLineString, Polygon or MultiPolygon geometry object or a Terraformer Primitive into WKT.

    +
    Example
    var polygon = Terraformer.WKT.convert({
    +  "type": "Polygon",
    +  "coordinates": [
    +    [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ],
    +    [ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ]
    +  ]
    +});
    +
    + +
    + + + + + + + + \ No newline at end of file diff --git a/node_modules/terraformer/gruntfile.js b/node_modules/terraformer/gruntfile.js new file mode 100755 index 0000000..79e459d --- /dev/null +++ b/node_modules/terraformer/gruntfile.js @@ -0,0 +1,161 @@ +var fs = require('fs'); + +module.exports = function (grunt) { + + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + + jshint: { + files: [ 'gruntfile.js', 'terraformer.js' ], + options: { + node: true + } + }, + + uglify: { + options: { + report: 'gzip', + banner: '/*! Terraformer JS - <%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %>\n' + + '* https://github.com/esri/Terraformer\n' + + '* Copyright (c) <%= grunt.template.today("yyyy") %> Environmental Systems Research Institute, Inc.\n' + + '* Licensed MIT */' + }, + terraformer: { + src: ['terraformer.js'], + dest: 'terraformer.min.js' + }, + versioned: { + src: ['terraformer.js'], + dest: 'terraformer-<%= pkg.version %>.min.js' + } + }, + + jasmine: { + coverage: { + src: [ + "terraformer.js" + ], + options: { + specs: 'spec/*Spec.js', + helpers: 'spec/*Helpers.js', + //keepRunner: true, + outfile: 'SpecRunner.html', + template: require('grunt-template-jasmine-istanbul'), + templateOptions: { + coverage: './.coverage/coverage.json', + report: './.coverage', + thresholds: { + lines: 90, + statements: 90, + branches: 90, + functions: 90 + } + } + } + } + }, + + jasmine_node: { + options: { + forceExit: true, + match: '.', + matchall: false, + extensions: 'js', + specNameMatcher: 'Spec', + helperNameMatcher: 'Helpers' + }, + all: ['spec/'] + }, + + complexity: { + generic: { + src: [ 'terraformer.js' ], + options: { + jsLintXML: 'complexity.xml', // create XML JSLint-like report + errorsOnly: false, // show only maintainability errors + cyclomatic: 6, + halstead: 15, + maintainability: 65 + } + } + }, + + s3: { + options: { + key: '<%= aws.key %>', + secret: '<%= aws.secret %>', + bucket: '<%= aws.bucket %>', + access: 'public-read', + headers: { + // 1 Year cache policy (1000 * 60 * 60 * 24 * 365) + "Cache-Control": "max-age=630720000, public", + "Expires": new Date(Date.now() + 63072000000).toUTCString() + } + }, + dev: { + upload: [ + { + src: 'terraformer-<%= pkg.version %>.min.js', + dest: 'terraformer/<%= pkg.version %>/terraformer.min.js' + } + ] + }, + }, + + 'gh-pages': { + options: { + base: 'docs-build', + repo: 'git@github.com:Esri/Terraformer.git', + branch: 'gh-pages' + }, + src: ['**'] + }, + + middleman: { + server: { + options: { + useBundle: true + } + }, + build: { + options: { + useBundle: true, + server: false, + command: "build" + } + } + }, + + copy: { + main: { + files: [ + // includes files within path and its sub-directories + {expand: true, src: ['examples/browser/**'], dest: 'docs-build/'} + ], + }, + } + + }); + + var awsExists = fs.existsSync(process.env.HOME + '/terraformer-s3.json'); + + if (awsExists) { + grunt.config.set('aws', grunt.file.readJSON(process.env.HOME + '/terraformer-s3.json')); + } + + grunt.loadNpmTasks('grunt-contrib-jshint'); + grunt.loadNpmTasks('grunt-contrib-uglify'); + grunt.loadNpmTasks('grunt-complexity'); + grunt.loadNpmTasks('grunt-contrib-jasmine'); + grunt.loadNpmTasks('grunt-contrib-copy'); + grunt.loadNpmTasks('grunt-jasmine-node'); + grunt.loadNpmTasks('grunt-s3'); + grunt.loadNpmTasks('grunt-gh-pages'); + grunt.loadNpmTasks('grunt-middleman'); + + grunt.registerTask('test', ['jshint', 'jasmine_node', 'jasmine']); + grunt.registerTask('version', ['test', 'uglify', 's3']); + grunt.registerTask('default', ['test']); + grunt.registerTask('docs-build', ['middleman:build', 'copy']); + grunt.registerTask('deploy-docs', ['middleman:build', 'copy', 'gh-pages']); +}; diff --git a/node_modules/terraformer/package.json b/node_modules/terraformer/package.json new file mode 100644 index 0000000..84a25e7 --- /dev/null +++ b/node_modules/terraformer/package.json @@ -0,0 +1,121 @@ +{ + "_args": [ + [ + { + "raw": "terraformer@~1.0.5", + "scope": null, + "escapedName": "terraformer", + "name": "terraformer", + "rawSpec": "~1.0.5", + "spec": ">=1.0.5 <1.1.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/terraformer-wkt-parser" + ] + ], + "_from": "terraformer@>=1.0.5 <1.1.0", + "_id": "terraformer@1.0.8", + "_inCache": true, + "_location": "/terraformer", + "_nodeVersion": "6.9.3", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/terraformer-1.0.8.tgz_1493067380311_0.3925482884515077" + }, + "_npmUser": { + "name": "esri_dev", + "email": "dev_tools@esri.com" + }, + "_npmVersion": "3.10.10", + "_phantomChildren": {}, + "_requested": { + "raw": "terraformer@~1.0.5", + "scope": null, + "escapedName": "terraformer", + "name": "terraformer", + "rawSpec": "~1.0.5", + "spec": ">=1.0.5 <1.1.0", + "type": "range" + }, + "_requiredBy": [ + "/terraformer-wkt-parser" + ], + "_resolved": "https://registry.npmjs.org/terraformer/-/terraformer-1.0.8.tgz", + "_shasum": "51e0ad89746fcf2161dc6f65aa70e42377c8b593", + "_shrinkwrap": null, + "_spec": "terraformer@~1.0.5", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/terraformer-wkt-parser", + "author": { + "name": "Patrick Arlt", + "email": "parlt@esri.com", + "url": "http://patrickarlt.com" + }, + "bugs": { + "url": "https://github.com/esri/terraformer/issues" + }, + "contributors": [ + { + "name": "Patrick Arlt", + "email": "parlt@esri.com", + "url": "http://patrickarlt.com" + }, + { + "name": "Jerry Sievert", + "email": "jsievert@esri.com", + "url": "http://legitimatesounding.com" + } + ], + "dependencies": { + "@types/geojson": "^1.0.0" + }, + "description": "A Geo-toolkit built in Javascript.", + "devDependencies": { + "gh-release": "^2.1.0", + "grunt": "0.4.x", + "grunt-complexity": "~0.1.3", + "grunt-contrib-copy": "^1.0.0", + "grunt-contrib-jasmine": "~0.4.2", + "grunt-contrib-jshint": "0.6.x", + "grunt-contrib-uglify": "~2.0.0", + "grunt-gh-pages": "~0.8.1", + "grunt-jasmine-node": "^0.3.1", + "grunt-middleman": "~0.1.0", + "grunt-s3": "~0.2.0-alpha.3", + "grunt-template-jasmine-istanbul": "~0.2.4", + "phantomjs-prebuilt": "^2.1.4", + "tslint": "^4.5.1", + "typescript": "^2.2.1" + }, + "directories": {}, + "dist": { + "shasum": "51e0ad89746fcf2161dc6f65aa70e42377c8b593", + "tarball": "https://registry.npmjs.org/terraformer/-/terraformer-1.0.8.tgz" + }, + "engines": { + "node": ">=4.2.6" + }, + "gitHead": "df0b546925f6193d6b3b1e24c2880ca53d8118ef", + "homepage": "https://github.com/esri/terraformer#readme", + "license": "MIT", + "main": "terraformer.js", + "maintainers": [ + { + "name": "esri_dev", + "email": "dev_tools@esri.com" + } + ], + "name": "terraformer", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/esri/terraformer.git" + }, + "scripts": { + "release": "./release.sh", + "test": "grunt test", + "test:ts": "tslint test.ts index.d.ts && tsc -p tsconfig.json && node test.js" + }, + "typings": "terraformer.d.ts", + "version": "1.0.8" +} diff --git a/node_modules/terraformer/release.sh b/node_modules/terraformer/release.sh new file mode 100755 index 0000000..8b4aebb --- /dev/null +++ b/node_modules/terraformer/release.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +# config +VERSION=$(node --eval "console.log(require('./package.json').version);") +NAME=$(node --eval "console.log(require('./package.json').name);") + +# build and test +npm test || exit 1 + +# checkout temp branch for release +git checkout -b gh-release + +# create built library (and versioned copy) +grunt uglify + +# force add files +git add terraformer.min.js -f + +# commit changes with a versioned commit message +git commit -m "build $VERSION" + +# push commit so it exists on GitHub when we run gh-release +git push upstream gh-release + +# run gh-release to create the tag and push release to github +gh-release --assets $NAME-$VERSION.min.js + +# checkout master and delete release branch locally and on GitHub +git checkout master +git branch -D gh-release +git push upstream :gh-release + +# publish release on NPM +npm publish + +# push to s3 bucket +grunt s3 \ No newline at end of file diff --git a/node_modules/terraformer/spec/geojsonHelpers.js b/node_modules/terraformer/spec/geojsonHelpers.js new file mode 100755 index 0000000..07dfd9b --- /dev/null +++ b/node_modules/terraformer/spec/geojsonHelpers.js @@ -0,0 +1,392 @@ +(function (root, factory) { + + if(typeof module === 'object' && typeof module.exports === 'object') { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like enviroments that support module.exports, + // like Node. + exports = module.exports = factory(); + }else if(typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(factory); + } else { + root.GeoJSON = factory(); + } + + if(typeof jasmine === "object") { + root.GeoJSON = factory(); + } + +}(this, function(){ + var exports = { + points : [ + { + "type": "Point", + "coordinates": [112, 0] + }, + { + "type": "Point", + "coordinates": [-105.01621,39.57422] + }, + { + "type": "Point", + "coordinates": [100, 0] + } + ], + multiPoints : [ + { + "type": "MultiPoint", + "coordinates": [ [100, 0],[45, -122] ] + }, + { + "type": "MultiPoint", + "coordinates": [ [-105.01621,39.57422],[-80.6665134,35.0539943] ] + } + ], + lineStrings : [ + { + "type": "LineString", + "coordinates": [ [100, 0],[45, -122], [-60, 45] ] + }, + { + "type": "LineString", + "coordinates": [ [-100, 40], [-105, 45], [-110, 55] ] + }, + { + "type": "LineString", + "coordinates": [ [-105, 40], [-110, 45], [-115, 55] ] + }, + { + "type": "LineString", + "coordinates": [ [-101.744384765625,39.32155002466662],[-101.5521240234375,39.330048552942415],[-101.40380859375,39.330048552942415],[-101.33239746093749,39.364032338047984],[-101.041259765625,39.36827914916011],[-100.975341796875,39.30454987014581],[-100.9149169921875,39.24501680713314],[-100.843505859375,39.16414104768742],[-100.8050537109375,39.104488809440475],[-100.491943359375,39.10022600175347],[-100.43701171875,39.095962936305476],[-100.338134765625,39.095962936305476],[-100.1953125,39.027718840211605],[-100.008544921875,39.01064750994083],[-99.86572265625,39.00211029922512],[-99.6844482421875,38.97222194853654],[-99.51416015625,38.929502416386605],[-99.38232421875,38.92095542046727],[-99.3218994140625,38.89530825492018],[-99.1131591796875,38.86965182408357],[-99.0802001953125,38.85682013474361],[-98.82202148437499,38.85682013474361],[-98.44848632812499,38.84826438869913],[-98.20678710937499,38.84826438869913],[-98.02001953125,38.8782049970615],[-97.635498046875,38.87392853923629] ] + } + ], + multiLineStrings : [ + { + "type": "MultiLineString", + "coordinates": [ + [ [41.83,71.01],[56.95,33.75] ], + [ [21.79,36.56],[47.83,71.01] ] + ] + }, + { + "type": "MultiLineString", + "coordinates": [ + [ [-105.0214433670044,39.57805759162015],[-105.02150774002075,39.57780951131517],[-105.02157211303711,39.57749527498758],[-105.02157211303711,39.57716449836683],[-105.02157211303711,39.57703218727656],[-105.02152919769287,39.57678410330158] ], + [ [-105.01989841461182,39.574997872470774],[-105.01959800720215,39.57489863607502],[-105.01906156539916,39.57478286010041] ], + [ [-105.01717329025269,39.5744024519653],[-105.01698017120361,39.574385912433804],[-105.0166368484497,39.574385912433804],[-105.01650810241699,39.5744024519653],[-105.0159502029419,39.574270135602866] ], + [ [-105.0142765045166,39.57397242286402],[-105.01412630081175,39.57403858136094],[-105.0138258934021,39.57417089816531],[-105.01331090927124,39.57445207053608] ] + ] + } + ], + polygons : [ + { + "type": "Polygon", + "coordinates": [ + [ [41.83,71.01],[56.95,33.75],[21.79,36.56],[41.83,71.01] ] + ] + }, + { + "type": "Polygon", + "coordinates": [ + [ [-84.32281494140625,34.9895035675793],[-84.29122924804688,35.21981940793435],[-84.24041748046875,35.25459097465022],[-84.22531127929688,35.266925688950074],[-84.20745849609375,35.26580442886754],[-84.19921875,35.24674063355999],[-84.16213989257812,35.24113278166642],[-84.12368774414062,35.24898366572645],[-84.09072875976562,35.24898366572645],[-84.08798217773438,35.264683153268116],[-84.04266357421875,35.27701633139884],[-84.03030395507812,35.291589484566124],[-84.0234375,35.306160014550784],[-84.03305053710936,35.32745068492882],[-84.03579711914062,35.34313496028189],[-84.03579711914062,35.348735749472546],[-84.01657104492188,35.35545618392078],[-84.01107788085938,35.37337460834958],[-84.00970458984374,35.39128905521763],[-84.01931762695312,35.41479572901859],[-84.00283813476562,35.429344044107154],[-83.93692016601562,35.47409160773029],[-83.91220092773438,35.47632833265728],[-83.88885498046875,35.504282143299655],[-83.88473510742186,35.516578738902936],[-83.8751220703125,35.52104976129943],[-83.85314941406249,35.52104976129943],[-83.82843017578125,35.52104976129943],[-83.8092041015625,35.53446133418443],[-83.80233764648438,35.54116627999813],[-83.76800537109374,35.56239491058853],[-83.7432861328125,35.56239491058853],[-83.71994018554688,35.56239491058853],[-83.67050170898438,35.569097520776054],[-83.6334228515625,35.570214567965984],[-83.61007690429688,35.576916524038616],[-83.59634399414061,35.574682600980914],[-83.5894775390625,35.55904339525896],[-83.55239868164062,35.56574628576276],[-83.49746704101562,35.563512051219696],[-83.47000122070312,35.586968406786475],[-83.4466552734375,35.60818490437746],[-83.37936401367188,35.63609277863135],[-83.35739135742188,35.65618041632016],[-83.32305908203124,35.66622234103479],[-83.3148193359375,35.65394870599763],[-83.29971313476561,35.660643649881614],[-83.28598022460938,35.67180064238771],[-83.26126098632811,35.6907639509368],[-83.25714111328125,35.69968630125201],[-83.25576782226562,35.715298012125295],[-83.23516845703125,35.72310272092263],[-83.19808959960936,35.72756221127198],[-83.16238403320312,35.753199435570316],[-83.15826416015625,35.76322914549896],[-83.10333251953125,35.76991491635478],[-83.08685302734375,35.7843988251953],[-83.0511474609375,35.787740890986576],[-83.01681518554688,35.78328477203738],[-83.001708984375,35.77882840327371],[-82.96737670898438,35.793310688351724],[-82.94540405273438,35.820040281161],[-82.9193115234375,35.85121343450061],[-82.9083251953125,35.86902116501695],[-82.90557861328125,35.87792352995116],[-82.91244506835938,35.92353244718235],[-82.88360595703125,35.94688293218141],[-82.85614013671875,35.951329861522666],[-82.8424072265625,35.94243575255426],[-82.825927734375,35.92464453144099],[-82.80670166015625,35.927980690382704],[-82.80532836914062,35.94243575255426],[-82.77923583984375,35.97356075349624],[-82.78060913085938,35.99245209055831],[-82.76138305664062,36.00356252895066],[-82.69546508789062,36.04465753921525],[-82.64465332031249,36.060201412392914],[-82.61306762695312,36.060201412392914],[-82.60620117187499,36.033552893400376],[-82.60620117187499,35.991340960635405],[-82.60620117187499,35.97911749857497],[-82.5787353515625,35.96133453736691],[-82.5677490234375,35.951329861522666],[-82.53067016601562,35.97244935753683],[-82.46475219726562,36.006895355244666],[-82.41668701171875,36.070192281208456],[-82.37960815429686,36.10126686921446],[-82.35488891601562,36.117908916563685],[-82.34115600585936,36.113471382052175],[-82.29583740234375,36.13343831245866],[-82.26287841796874,36.13565654678543],[-82.23403930664062,36.13565654678543],[-82.2216796875,36.154509006695],[-82.20382690429688,36.15561783381855],[-82.19009399414062,36.144528857027744],[-82.15438842773438,36.15007354140755],[-82.14065551757812,36.134547437460064],[-82.1337890625,36.116799556445024],[-82.12142944335938,36.10570509327921],[-82.08984375,36.10792411128649],[-82.05276489257811,36.12678323326429],[-82.03628540039062,36.12900165569652],[-81.91268920898438,36.29409768373033],[-81.89071655273438,36.30959215409138],[-81.86325073242188,36.33504067209607],[-81.83029174804688,36.34499652561904],[-81.80145263671875,36.35605709240176],[-81.77947998046874,36.34610265300638],[-81.76162719726562,36.33835943134047],[-81.73690795898438,36.33835943134047],[-81.71905517578125,36.33835943134047],[-81.70669555664062,36.33504067209607],[-81.70669555664062,36.342784223707234],[-81.72317504882812,36.357163062654365],[-81.73278808593749,36.379279167407965],[-81.73690795898438,36.40028364332352],[-81.73690795898438,36.41354670392876],[-81.72454833984374,36.423492513472326],[-81.71768188476562,36.445589751779174],[-81.69845581054688,36.47541104282962],[-81.69845581054688,36.51073994146672],[-81.705322265625,36.53060536411363],[-81.69158935546875,36.55929085774001],[-81.68060302734375,36.56480607840351],[-81.68197631835938,36.58686302344181],[-81.04202270507812,36.56370306576917],[-80.74264526367186,36.561496993252575],[-79.89120483398438,36.54053616262899],[-78.68408203124999,36.53943280355122],[-77.88345336914062,36.54053616262899],[-76.91665649414062,36.54163950596125],[-76.91665649414062,36.55046568575947],[-76.31103515625,36.551568887374],[-75.79605102539062,36.54936246839778],[-75.6298828125,36.07574221562703],[-75.4925537109375,35.82226734114509],[-75.3936767578125,35.639441068973916],[-75.41015624999999,35.43829554739668],[-75.43212890625,35.263561862152095],[-75.487060546875,35.18727767598896],[-75.5914306640625,35.17380831799959],[-75.9210205078125,35.04798673426734],[-76.17919921875,34.867904962568744],[-76.41540527343749,34.62868797377061],[-76.4593505859375,34.57442951865274],[-76.53076171875,34.53371242139567],[-76.5911865234375,34.551811369170494],[-76.651611328125,34.615126683462194],[-76.761474609375,34.63320791137959],[-77.069091796875,34.59704151614417],[-77.376708984375,34.45674800347809],[-77.5909423828125,34.3207552752374],[-77.8326416015625,33.97980872872457],[-77.9150390625,33.80197351806589],[-77.9754638671875,33.73804486328907],[-78.11279296875,33.8521697014074],[-78.2830810546875,33.8521697014074],[-78.4808349609375,33.815666308702774],[-79.6728515625,34.8047829195724],[-80.782470703125,34.836349990763864],[-80.782470703125,34.91746688928252],[-80.9307861328125,35.092945313732635],[-81.0516357421875,35.02999636902566],[-81.0516357421875,35.05248370662468],[-81.0516357421875,35.137879119634185],[-82.3150634765625,35.19625600786368],[-82.3590087890625,35.19625600786368],[-82.40295410156249,35.22318504970181],[-82.4688720703125,35.16931803601131],[-82.6885986328125,35.1154153142536],[-82.781982421875,35.06147690849717],[-83.1060791015625,35.003003395276714],[-83.616943359375,34.99850370014629],[-84.05639648437499,34.985003130171066],[-84.22119140625,34.985003130171066],[-84.32281494140625,34.9895035675793] ], + [ [-75.69030761718749,35.74205383068037], [-75.5914306640625,35.74205383068037], [-75.5419921875,35.585851593232356], [-75.56396484375,35.32633026307483], [-75.69030761718749,35.285984736065735], [-75.970458984375,35.16482750605027], [-76.2066650390625,34.994003757575776], [-76.300048828125,35.02999636902566], [-76.409912109375,35.07946034047981], [-76.5252685546875,35.10642805736423], [-76.4208984375,35.25907654252574], [-76.3385009765625,35.294952147406576], [-76.0858154296875,35.29943548054543], [-75.948486328125,35.44277092585766], [-75.8660888671875,35.53669637839501], [-75.772705078125,35.567980458012094], [-75.706787109375,35.634976650677295], [-75.706787109375,35.74205383068037], [-75.69030761718749,35.74205383068037] ] + ] + }, + { + "type": "Polygon", + "coordinates": [ + [ [100.0, 0.0],[101.0, 0.0],[101.0, 1.0],[100.0, 1.0],[100.0, 0.0] ], + [ [100.2, 0.2],[100.8, 0.2],[100.8, 0.8],[100.2, 0.8],[100.2, 0.2] ] + ] + } + ], + multiPolygons : [ + { + "type": "MultiPolygon", + "coordinates": [ + [ + [ [102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0] ] + ], + [ + [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ] + ] + ] + }, + { + "type": "MultiPolygon", + "coordinates": [ + [ + [ [-84.32281494140625,34.9895035675793],[-84.29122924804688,35.21981940793435],[-84.24041748046875,35.25459097465022],[-84.22531127929688,35.266925688950074],[-84.20745849609375,35.26580442886754],[-84.19921875,35.24674063355999],[-84.16213989257812,35.24113278166642],[-84.12368774414062,35.24898366572645],[-84.09072875976562,35.24898366572645],[-84.08798217773438,35.264683153268116],[-84.04266357421875,35.27701633139884],[-84.03030395507812,35.291589484566124],[-84.0234375,35.306160014550784],[-84.03305053710936,35.32745068492882],[-84.03579711914062,35.34313496028189],[-84.03579711914062,35.348735749472546],[-84.01657104492188,35.35545618392078],[-84.01107788085938,35.37337460834958],[-84.00970458984374,35.39128905521763],[-84.01931762695312,35.41479572901859],[-84.00283813476562,35.429344044107154],[-83.93692016601562,35.47409160773029],[-83.91220092773438,35.47632833265728],[-83.88885498046875,35.504282143299655],[-83.88473510742186,35.516578738902936],[-83.8751220703125,35.52104976129943],[-83.85314941406249,35.52104976129943],[-83.82843017578125,35.52104976129943],[-83.8092041015625,35.53446133418443],[-83.80233764648438,35.54116627999813],[-83.76800537109374,35.56239491058853],[-83.7432861328125,35.56239491058853],[-83.71994018554688,35.56239491058853],[-83.67050170898438,35.569097520776054],[-83.6334228515625,35.570214567965984],[-83.61007690429688,35.576916524038616],[-83.59634399414061,35.574682600980914],[-83.5894775390625,35.55904339525896],[-83.55239868164062,35.56574628576276],[-83.49746704101562,35.563512051219696],[-83.47000122070312,35.586968406786475],[-83.4466552734375,35.60818490437746],[-83.37936401367188,35.63609277863135],[-83.35739135742188,35.65618041632016],[-83.32305908203124,35.66622234103479],[-83.3148193359375,35.65394870599763],[-83.29971313476561,35.660643649881614],[-83.28598022460938,35.67180064238771],[-83.26126098632811,35.6907639509368],[-83.25714111328125,35.69968630125201],[-83.25576782226562,35.715298012125295],[-83.23516845703125,35.72310272092263],[-83.19808959960936,35.72756221127198],[-83.16238403320312,35.753199435570316],[-83.15826416015625,35.76322914549896],[-83.10333251953125,35.76991491635478],[-83.08685302734375,35.7843988251953],[-83.0511474609375,35.787740890986576],[-83.01681518554688,35.78328477203738],[-83.001708984375,35.77882840327371],[-82.96737670898438,35.793310688351724],[-82.94540405273438,35.820040281161],[-82.9193115234375,35.85121343450061],[-82.9083251953125,35.86902116501695],[-82.90557861328125,35.87792352995116],[-82.91244506835938,35.92353244718235],[-82.88360595703125,35.94688293218141],[-82.85614013671875,35.951329861522666],[-82.8424072265625,35.94243575255426],[-82.825927734375,35.92464453144099],[-82.80670166015625,35.927980690382704],[-82.80532836914062,35.94243575255426],[-82.77923583984375,35.97356075349624],[-82.78060913085938,35.99245209055831],[-82.76138305664062,36.00356252895066],[-82.69546508789062,36.04465753921525],[-82.64465332031249,36.060201412392914],[-82.61306762695312,36.060201412392914],[-82.60620117187499,36.033552893400376],[-82.60620117187499,35.991340960635405],[-82.60620117187499,35.97911749857497],[-82.5787353515625,35.96133453736691],[-82.5677490234375,35.951329861522666],[-82.53067016601562,35.97244935753683],[-82.46475219726562,36.006895355244666],[-82.41668701171875,36.070192281208456],[-82.37960815429686,36.10126686921446],[-82.35488891601562,36.117908916563685],[-82.34115600585936,36.113471382052175],[-82.29583740234375,36.13343831245866],[-82.26287841796874,36.13565654678543],[-82.23403930664062,36.13565654678543],[-82.2216796875,36.154509006695],[-82.20382690429688,36.15561783381855],[-82.19009399414062,36.144528857027744],[-82.15438842773438,36.15007354140755],[-82.14065551757812,36.134547437460064],[-82.1337890625,36.116799556445024],[-82.12142944335938,36.10570509327921],[-82.08984375,36.10792411128649],[-82.05276489257811,36.12678323326429],[-82.03628540039062,36.12900165569652],[-81.91268920898438,36.29409768373033],[-81.89071655273438,36.30959215409138],[-81.86325073242188,36.33504067209607],[-81.83029174804688,36.34499652561904],[-81.80145263671875,36.35605709240176],[-81.77947998046874,36.34610265300638],[-81.76162719726562,36.33835943134047],[-81.73690795898438,36.33835943134047],[-81.71905517578125,36.33835943134047],[-81.70669555664062,36.33504067209607],[-81.70669555664062,36.342784223707234],[-81.72317504882812,36.357163062654365],[-81.73278808593749,36.379279167407965],[-81.73690795898438,36.40028364332352],[-81.73690795898438,36.41354670392876],[-81.72454833984374,36.423492513472326],[-81.71768188476562,36.445589751779174],[-81.69845581054688,36.47541104282962],[-81.69845581054688,36.51073994146672],[-81.705322265625,36.53060536411363],[-81.69158935546875,36.55929085774001],[-81.68060302734375,36.56480607840351],[-81.68197631835938,36.58686302344181],[-81.04202270507812,36.56370306576917],[-80.74264526367186,36.561496993252575],[-79.89120483398438,36.54053616262899],[-78.68408203124999,36.53943280355122],[-77.88345336914062,36.54053616262899],[-76.91665649414062,36.54163950596125],[-76.91665649414062,36.55046568575947],[-76.31103515625,36.551568887374],[-75.79605102539062,36.54936246839778],[-75.6298828125,36.07574221562703],[-75.4925537109375,35.82226734114509],[-75.3936767578125,35.639441068973916],[-75.41015624999999,35.43829554739668],[-75.43212890625,35.263561862152095],[-75.487060546875,35.18727767598896],[-75.5914306640625,35.17380831799959],[-75.9210205078125,35.04798673426734],[-76.17919921875,34.867904962568744],[-76.41540527343749,34.62868797377061],[-76.4593505859375,34.57442951865274],[-76.53076171875,34.53371242139567],[-76.5911865234375,34.551811369170494],[-76.651611328125,34.615126683462194],[-76.761474609375,34.63320791137959],[-77.069091796875,34.59704151614417],[-77.376708984375,34.45674800347809],[-77.5909423828125,34.3207552752374],[-77.8326416015625,33.97980872872457],[-77.9150390625,33.80197351806589],[-77.9754638671875,33.73804486328907],[-78.11279296875,33.8521697014074],[-78.2830810546875,33.8521697014074],[-78.4808349609375,33.815666308702774],[-79.6728515625,34.8047829195724],[-80.782470703125,34.836349990763864],[-80.782470703125,34.91746688928252],[-80.9307861328125,35.092945313732635],[-81.0516357421875,35.02999636902566],[-81.0516357421875,35.05248370662468],[-81.0516357421875,35.137879119634185],[-82.3150634765625,35.19625600786368],[-82.3590087890625,35.19625600786368],[-82.40295410156249,35.22318504970181],[-82.4688720703125,35.16931803601131],[-82.6885986328125,35.1154153142536],[-82.781982421875,35.06147690849717],[-83.1060791015625,35.003003395276714],[-83.616943359375,34.99850370014629],[-84.05639648437499,34.985003130171066],[-84.22119140625,34.985003130171066],[-84.32281494140625,34.9895035675793] ], + [ [-75.69030761718749,35.74205383068037],[-75.5914306640625,35.74205383068037],[-75.5419921875,35.585851593232356],[-75.56396484375,35.32633026307483],[-75.69030761718749,35.285984736065735],[-75.970458984375,35.16482750605027],[-76.2066650390625,34.994003757575776],[-76.300048828125,35.02999636902566],[-76.409912109375,35.07946034047981],[-76.5252685546875,35.10642805736423],[-76.4208984375,35.25907654252574],[-76.3385009765625,35.294952147406576],[-76.0858154296875,35.29943548054543],[-75.948486328125,35.44277092585766],[-75.8660888671875,35.53669637839501],[-75.772705078125,35.567980458012094],[-75.706787109375,35.634976650677295],[-75.706787109375,35.74205383068037],[-75.69030761718749,35.74205383068037] ] + ], + [ + [ [-109.0283203125,36.98500309285596],[-109.0283203125,40.97989806962013],[-102.06298828125,40.97989806962013],[-102.06298828125,37.00255267215955],[-109.0283203125,36.98500309285596] ] + ] + ] + }, + { + "type": "MultiPolygon", + "coordinates": [ + [ + [[102.0, 2.0],[103.0, 2.0],[103.0, 3.0],[102.0, 3.0],[102.0, 2.0]] + ], + [ + [[100.0, 0.0],[101.0, 0.0],[101.0, 1.0],[100.0, 1.0],[100.0, 0.0]], + [[100.2, 0.2],[100.8, 0.2],[100.8, 0.8],[100.2, 0.8],[100.2, 0.2]] + ] + ] + } + ], + features : [ + { + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [41.83,71.01],[56.95,33.75],[21.79,36.56],[41.83,71.01] ] + ] + }, + "id": "foo", + "properties": { + "bar": "baz" + } + }, + { + "type": "Feature", + "id": "stadium", + "properties": { + "name": "Coors Field", + "amenity": "Baseball Stadium", + "popupContent": "This is where the Rockies play!" + }, + "geometry": { + "type": "Point", + "coordinates": [-104.99404, 39.75621] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [-80.72487831115721,35.26545403190955],[-80.72135925292969,35.26727607954368],[-80.71517944335938,35.26769654625573],[-80.7125186920166,35.27035945142482],[-80.70857048034668,35.268257165144064],[-80.70479393005371,35.268397319259996],[-80.70324897766113,35.26503355355979],[-80.71088790893555,35.2553619492954],[-80.71681022644043,35.2553619492954],[-80.7150936126709,35.26054831539319],[-80.71869850158691,35.26026797976481],[-80.72032928466797,35.26061839914875],[-80.72264671325684,35.26033806376283],[-80.72487831115721,35.26545403190955] ] + ] + }, + "properties": { + "name": "Plaza Road Park" + } + } + ], + featureCollections : [ + { + "type": "FeatureCollection", + "features": [{ + "type": "Feature", + "id": "foo", + "properties": { + "foo": "bar" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [41.83,71.01],[56.95,33.75],[21.79,36.56],[41.83,71.01] ] + ] + } + }], + "properties": { + "bar": "baz" + } + }, + { + "type": "FeatureCollection", + "features": [{ + "type": "Feature", + "properties": {"party": "Republican"}, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [-104.05, 48.99],[-97.22, 48.98],[-96.58, 45.94],[-104.03, 45.94],[-104.05, 48.99] ] + ] + } + },{ + "type": "Feature", + "properties": {"party": "Democrat"}, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [-109.05, 41.00],[-102.06, 40.99],[-102.03, 36.99],[-109.04, 36.99],[-109.05, 41.00] ] + ] + } + }] + }, + { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [-80.87088507656375,35.21515162500578] + }, + "properties": { + "name": "ABBOTT NEIGHBORHOOD PARK", + "address": "1300 SPRUCE ST" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [-80.83775386582222,35.24980190252168] + }, + "properties": { + "name": "DOUBLE OAKS CENTER", + "address": "1326 WOODWARD AV" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [-80.83827000459532,35.25674709224663] + }, + "properties": { + "name": "DOUBLE OAKS NEIGHBORHOOD PARK", + "address": "2605 DOUBLE OAKS RD" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [-80.83697759172735,35.25751734669229] + }, + "properties": { + "name": "DOUBLE OAKS POOL", + "address": "1200 NEWLAND RD" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [-80.81647652154736,35.40148708491418] + }, + "properties": { + "name": "DAVID B. WAYMER FLYING REGIONAL PARK", + "address": "15401 HOLBROOKS RD" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [-80.83556459443902,35.39917224760999] + }, + "properties": { + "name": "DAVID B. WAYMER COMMUNITY PARK", + "address": "302 HOLBROOKS RD" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [-80.72487831115721,35.26545403190955],[-80.72135925292969,35.26727607954368],[-80.71517944335938,35.26769654625573],[-80.7125186920166,35.27035945142482],[-80.70857048034668,35.268257165144064],[-80.70479393005371,35.268397319259996],[-80.70324897766113,35.26503355355979],[-80.71088790893555,35.2553619492954],[-80.71681022644043,35.2553619492954],[-80.7150936126709,35.26054831539319],[-80.71869850158691,35.26026797976481],[-80.72032928466797,35.26061839914875],[-80.72264671325684,35.26033806376283],[-80.72487831115721,35.26545403190955] ] + ] + }, + "properties": { + "name": "Plaza Road Park" + } + } + ] + }, + { + "type": "FeatureCollection", + "features": [{ + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [102.0, 0.5] + }, + "properties": { + "prop0": "value0" + } + }, { + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [102.0, 0.0], + [103.0, 1.0], + [104.0, 0.0], + [105.0, 1.0] + ] + }, + "properties": { + "prop0": "value0", + "prop1": 0.0 + } + }, { + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [100.0, 0.0], + [101.0, 0.0], + [101.0, 1.0], + [100.0, 1.0], + [100.0, 0.0] + ] + ] + }, + "properties": { + "prop0": "value0", + "prop1": { + "this": "that" + } + } + }] + } + ], + geometryCollections : [ + { + "type": "GeometryCollection", + "geometries": [{ + "type": "Polygon", + "coordinates": [ + [ [41.8359375,71.015625],[56.953125,33.75],[21.796875,36.5625],[41.8359375,71.015625] ] + ] + },{ + "type": "MultiPoint", + "coordinates": [ [100, 0],[45, -122] ] + } + ] + }, + { + "type": "GeometryCollection", + "geometries": [ + { + "type": "Point", + "coordinates": [-80.66080570220947,35.04939206472683] + }, + { + "type": "Polygon", + "coordinates": [ + [ [-80.66458225250244,35.04496519190309],[-80.66344499588013,35.04603679820616],[-80.66258668899536,35.045580049697556],[-80.66387414932251,35.044280059194946],[-80.66458225250244,35.04496519190309] ] + ] + }, + { + "type": "LineString", + "coordinates": [ [-80.66237211227417,35.05950973022538],[-80.66269397735596,35.0592638296087],[-80.66284418106079,35.05893010615862],[-80.66308021545409,35.05833291342246],[-80.66359519958496,35.057753281001425],[-80.66387414932251,35.05740198662245],[-80.66441059112549,35.05703312589789],[-80.66486120223999,35.056787217822475],[-80.66541910171509,35.05650617911516],[-80.66563367843628,35.05631296444281],[-80.66601991653441,35.055891403570705],[-80.66619157791138,35.05545227534804],[-80.66619157791138,35.05517123204622],[-80.66625595092773,35.05489018777713],[-80.6662130355835,35.054222703761525],[-80.6662130355835,35.05392409072499],[-80.66595554351807,35.05290528508858],[-80.66569805145262,35.052044560077285],[-80.66550493240356,35.0514824490509],[-80.665762424469,35.05048117920187],[-80.66617012023926,35.04972582715769],[-80.66651344299316,35.049286665781096],[-80.66692113876343,35.0485313026898],[-80.66700696945189,35.048215102112344],[-80.66707134246826,35.04777593261294],[-80.66704988479614,35.04738946150025],[-80.66696405410767,35.04698542156371],[-80.66681385040283,35.046353007216055],[-80.66659927368164,35.04596652937105],[-80.66640615463257,35.04561518428889],[-80.6659984588623,35.045193568195565],[-80.66552639007568,35.044877354697526],[-80.6649899482727,35.04454357245502],[-80.66449642181396,35.04417465365292],[-80.66385269165039,35.04387600387859],[-80.66303730010986,35.043717894732545] ] + } + ] + } + ] + }; + + return exports; + +})); \ No newline at end of file diff --git a/node_modules/terraformer/spec/spatialReferenceSpec.js b/node_modules/terraformer/spec/spatialReferenceSpec.js new file mode 100755 index 0000000..e651c22 --- /dev/null +++ b/node_modules/terraformer/spec/spatialReferenceSpec.js @@ -0,0 +1,537 @@ +if(typeof module === "object"){ + var Terraformer = require("../terraformer.js"); +} + +describe("Spatial Reference Converters", function(){ + it("should convert a GeoJSON Point to Web Mercator", function(){ + var input = { + "type": "Point", + "coordinates": [-122, 45] + }; + var expectedOutput = { + "type": "Point", + "coordinates": [-13580977.876779145, 5621521.486191948], + "crs": { + "type": "link", + "properties": { + "href": "http://spatialreference.org/ref/sr-org/6928/ogcwkt/", + "type": "ogcwkt" + } + } + }; + var output = Terraformer.toMercator(input); + expect(output).toEqual(expectedOutput); + }); + + it("should convert a GeoJSON MultiPoint to Web Mercator", function(){ + var input = { + "type": "MultiPoint", + "coordinates": [ [-122, 45], [100,0], [45, 62] ] + }; + var expectedOutput = { + "type": "MultiPoint", + "coordinates": [ [-13580977.876779145,5621521.486191948],[11131949.079327168,0],[5009377.085697226,8859142.800565446] ], + "crs": { + "type": "link", + "properties": { + "href": "http://spatialreference.org/ref/sr-org/6928/ogcwkt/", + "type": "ogcwkt" + } + } + }; + var output = Terraformer.toMercator(input); + // expect(output).toEqual(expectedOutput); + expect(output.type).toEqual(expectedOutput.type); + expect(output.crs).toEqual(expectedOutput.crs); + expect(output.coordinates[0][0]).toBeCloseTo(expectedOutput.coordinates[0][0], 9); + expect(output.coordinates[0][1]).toBeCloseTo(expectedOutput.coordinates[0][1], 9); + expect(output.coordinates[1][0]).toBeCloseTo(expectedOutput.coordinates[1][0], 9); + expect(output.coordinates[1][1]).toBeCloseTo(expectedOutput.coordinates[1][1], 9); + }); + + it("should convert a GeoJSON LineString to Web Mercator", function(){ + var input = { + "type": "LineString", + "coordinates": [ [-122, 45], [100,0], [45, 62] ] + }; + var expectedOutput = { + "type": "LineString", + "coordinates": [ [-13580977.876779145,5621521.486191948],[11131949.079327168,0],[5009377.085697226,8859142.800565446] ], + "crs": { + "type": "link", + "properties": { + "href": "http://spatialreference.org/ref/sr-org/6928/ogcwkt/", + "type": "ogcwkt" + } + } + }; + var output = Terraformer.toMercator(input); + expect(output).toEqual(expectedOutput); + }); + + it("should convert a GeoJSON MultiLineString to Web Mercator", function(){ + var input = { + "type": "MultiLineString", + "coordinates": [ + [ [41.8359375,71.015625],[56.953125,33.75] ], + [ [21.796875,36.5625],[47.8359375,71.015625] ] + ] + }; + var expectedOutput = { + "type": "MultiLineString", + "coordinates": [ + [ [4657155.25935914,11407616.835043576],[6339992.874085551,3995282.329624161] ], + [ [2426417.025884594,4378299.115616046],[5325072.20411877,11407616.835043576] ] + ], + "crs": { + "type": "link", + "properties": { + "href": "http://spatialreference.org/ref/sr-org/6928/ogcwkt/", + "type": "ogcwkt" + } + } + }; + var output = Terraformer.toMercator(input); + expect(output).toEqual(expectedOutput); + }); + + it("should convert a GeoJSON Polygon to Web Mercator", function(){ + var input = { + "type": "Polygon", + "coordinates": [ + [ [41.8359375,71.015625],[56.953125,33.75],[21.796875,36.5625],[41.8359375,71.015625] ] + ] + }; + var expectedOutput = { + "type": "Polygon", + "coordinates": [ + [ [4657155.25935914,11407616.835043576],[6339992.874085551,3995282.329624161],[2426417.025884594,4378299.115616046],[4657155.25935914,11407616.835043576] ] + ], + "crs": { + "type": "link", + "properties": { + "href": "http://spatialreference.org/ref/sr-org/6928/ogcwkt/", + "type": "ogcwkt" + } + } + }; + var output = Terraformer.toMercator(input); + expect(output).toEqual(expectedOutput); + }); + + it("should convert a GeoJSON MultiPolygon to Web Mercator", function(){ + var input = { + "type": "MultiPolygon", + "coordinates": [ + [ + [ [102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0] ] + ], + [ + [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ] + ] + ] + }; + + var expectedOutput = { + "type": "MultiPolygon", + "coordinates": [ + [ + [ [11354588.060913712,222684.20850554065],[11465907.551706985,222684.20850554065],[11465907.551706985,334111.1714019535],[11354588.060913712,334111.1714019535],[11354588.060913712,222684.20850554065] ] + ], + [ + [ [11131949.079327168,0],[11243268.57012044,0],[11243268.57012044,111325.1428663833],[11131949.079327168,111325.1428663833],[11131949.079327168,0] ] + ] + ], + "crs": { + "type": "link", + "properties": { + "href": "http://spatialreference.org/ref/sr-org/6928/ogcwkt/", + "type": "ogcwkt" + } + } + }; + var output = Terraformer.toMercator(input); + expect(output.type).toEqual(expectedOutput.type); + expect(output.crs).toEqual(expectedOutput.crs); + for (var i=0; i < output.coordinates[0].length; i++) { + var segments = output.coordinates[0][i]; + for (var j=0; j < segments.length; j++) { + expect(segments[j][0]).toBeCloseTo(expectedOutput.coordinates[0][i][j][0], 9); + expect(segments[j][1]).toBeCloseTo(expectedOutput.coordinates[0][i][j][1], 9); + } + } + }); + + it("should convert a GeoJSON Feature to Web Mercator", function(){ + var input = { + "type": "Feature", + "id": "foo", + "geometry":{ + "type": "Point", + "coordinates": [-122, 45] + }, + "properties": { + "bar": "baz" + } + }; + var expectedOutput = { + "type": "Feature", + "id": "foo", + "geometry":{ + "type": "Point", + "coordinates": [-13580977.876779145, 5621521.486191948] + }, + "properties": { + "bar": "baz" + }, + "crs": { + "type": "link", + "properties": { + "href": "http://spatialreference.org/ref/sr-org/6928/ogcwkt/", + "type": "ogcwkt" + } + } + }; + var output = Terraformer.toMercator(input); + expect(output).toEqual(expectedOutput); + }); + + it("should convert a GeoJSON Feature Collection to Web Mercator", function(){ + var input = { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "id": "foo", + "geometry":{ + "type": "Point", + "coordinates": [-122, 45] + }, + "properties": { + "bar": "baz" + } + },{ + "type": "Feature", + "id": "bar", + "geometry":{ + "type": "Point", + "coordinates": [-122, 45] + }, + "properties": { + "bar": "baz" + } + } + ] + }; + var expectedOutput = { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "id": "foo", + "geometry":{ + "type": "Point", + "coordinates": [-13580977.876779145, 5621521.486191948] + }, + "properties": { + "bar": "baz" + } + },{ + "type": "Feature", + "id": "bar", + "geometry":{ + "type": "Point", + "coordinates": [-13580977.876779145, 5621521.486191948] + }, + "properties": { + "bar": "baz" + } + } + ], + "crs": { + "type": "link", + "properties": { + "href": "http://spatialreference.org/ref/sr-org/6928/ogcwkt/", + "type": "ogcwkt" + } + } + }; + var output = Terraformer.toMercator(input); + expect(output).toEqual(expectedOutput); + }); + + it("should convert a GeoJSON Geometry Collection to Web Mercator", function(){ + var input = { + "type": "GeometryCollection", + "geometries": [ + { + "type": "Point", + "coordinates": [-122, 45] + },{ + "type": "Point", + "coordinates": [-122, 45] + } + ] + }; + var expectedOutput = { + "type": "GeometryCollection", + "geometries": [ + { + "type": "Point", + "coordinates": [-13580977.876779145, 5621521.486191948] + },{ + "type": "Point", + "coordinates": [-13580977.876779145, 5621521.486191948] + } + ], + "crs": { + "type": "link", + "properties": { + "href": "http://spatialreference.org/ref/sr-org/6928/ogcwkt/", + "type": "ogcwkt" + } + } + }; + var output = Terraformer.toMercator(input); + expect(output).toEqual(expectedOutput); + }); + + it("should convert a GeoJSON Point to Geographic coordinates", function(){ + var input = { + "type": "Point", + "coordinates": [-13656274.38035172, 5703203.67194997] + }; + var expectedOutput = { + "type": "Point", + "coordinates": [-122.67639999999798, 45.51649999999925] + }; + var output = Terraformer.toGeographic(input); + expect(output).toEqual(expectedOutput); + }); + + it("should convert a GeoJSON MultiPoint to Geographic coordinates", function(){ + var input = { + "type": "MultiPoint", + "coordinates": [ [-13656274.380351715,5703203.671949966],[11131949.079327168,0],[-13619241.057432571,6261718.09354067] ] + }; + var expectedOutput = { + "type": "MultiPoint", + "coordinates": [ [-122.67639999999793,45.51649999999922],[99.99999999999831,0],[-122.34372399999793,48.92247999999917] ] + }; + var output = Terraformer.toGeographic(input); + + expect(expectedOutput.coordinates[0][0]).toBeCloseTo(-122.6764000000, 10); + expect(expectedOutput.coordinates[0][1]).toBeCloseTo(45.5165000000, 10); + expect(expectedOutput.coordinates[1][0]).toBeCloseTo(100.0000000000, 10); + expect(expectedOutput.coordinates[1][1]).toBeCloseTo(0.0000000000, 10); + expect(expectedOutput.coordinates[2][0]).toBeCloseTo(-122.3437240000, 10); + expect(expectedOutput.coordinates[2][1]).toBeCloseTo(48.9224800000, 10); + }); + + it("should convert a GeoJSON LineString to Geographic coordinates", function(){ + var input = { + "type": "LineString", + "coordinates": [ [743579.411158182,6075718.008992066],[-7279251.077653782,6869641.046935855],[-5831228.013819427,5242073.5675988225] ] + }; + var expectedOutput = { + "type": "LineString", + "coordinates": [ [6.679687499999886,47.8124999999992],[-65.3906249999989,52.38281249999912],[-52.38281249999912,42.539062499999275] ] + }; + var output = Terraformer.toGeographic(input); + + expect(expectedOutput.coordinates[0][0]).toBeCloseTo(6.6796875000, 10); + expect(expectedOutput.coordinates[0][1]).toBeCloseTo(47.8125000000, 10); + expect(expectedOutput.coordinates[1][0]).toBeCloseTo(-65.3906250000, 10); + expect(expectedOutput.coordinates[1][1]).toBeCloseTo(52.3828125000, 10); + expect(expectedOutput.coordinates[2][0]).toBeCloseTo(-52.3828125000, 10); + expect(expectedOutput.coordinates[2][1]).toBeCloseTo(42.5390625000, 10); + }); + + it("should convert a GeoJSON MultiLineString to Geographic coordinates", function(){ + var input = { + "type": "MultiLineString", + "coordinates": [ + [ [41.8359375,71.015625],[56.953125,33.75] ], + [ [21.796875,36.5625],[47.8359375,71.015625] ] + ] + }; + var expectedOutput = { + "type": "MultiLineString", + "coordinates": [ + [ [0.00037581862081719045,0.0006379442134689308],[0.0005116186266586962,0.00030318140838354136]],[[0.00019580465958542694,0.00032844652575519755],[0.0004297175378643617,0.0006379442134689308] ] + ] + }; + var output = Terraformer.toGeographic(input); + expect(output).toEqual(expectedOutput); + }); + + it("should convert a GeoJSON Polygon to Geographic coordinates", function(){ + var input = { + "type": "Polygon", + "coordinates": [ + [ [41.8359375,71.015625],[56.953125,33.75],[21.796875,36.5625],[41.8359375,71.015625] ] + ] + }; + var expectedOutput = { + "type": "Polygon", + "coordinates": [ + [ [0.00037581862081719045,0.0006379442134689308],[0.0005116186266586962,0.00030318140838354136],[0.00019580465958542694,0.00032844652575519755],[0.00037581862081719045,0.0006379442134689308] ] + ] + }; + var output = Terraformer.toGeographic(input); + expect(output).toEqual(expectedOutput); + }); + + it("should convert a GeoJSON MultiPolygon to Geographic coordinates", function(){ + var input = { + "type": "MultiPolygon", + "coordinates": [ + [ + [ [102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0] ] + ], + [ + [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ] + ] + ] + }; + + var expectedOutput = { + "type": "MultiPolygon", + "coordinates": [ + [ + [ [0.000916281589801912,0.000017966305681987637],[0.0009252647426431071,0.000017966305681987637],[0.0009252647426431071,0.000026949458522981454],[0.000916281589801912,0.000026949458522981454],[0.000916281589801912,0.000017966305681987637] ] + ], + [ + [ [0.0008983152841195215,0],[0.0009072984369607167,0],[0.0009072984369607167,0.000008983152840993819],[0.0008983152841195215,0.000008983152840993819],[0.0008983152841195215,0] ] + ] + ] + }; + var output = Terraformer.toGeographic(input); + expect(output).toEqual(expectedOutput); + }); + + it("should convert a GeoJSON Feature to Geographic coordinates", function(){ + var input = { + "type": "Feature", + "id": "foo", + "geometry":{ + "type": "Point", + "coordinates": [-13656274.380351715, 5703203.671949966] + }, + "properties": { + "bar": "baz" + } + }; + var expectedOutput = { + "type": "Feature", + "id": "foo", + "geometry":{ + "type": "Point", + "coordinates": [-122.67639999999793, 45.51649999999923] + }, + "properties": { + "bar": "baz" + } + }; + var output = Terraformer.toGeographic(input); + + expect(expectedOutput.geometry.coordinates[0]).toBeCloseTo(-122.6764000000, 10); + expect(expectedOutput.geometry.coordinates[1]).toBeCloseTo(45.5165000000, 10); + }); + + it("should convert a GeoJSON Feature Collection to Geographic coordinates", function(){ + var input = { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "id": "foo", + "geometry":{ + "type": "Point", + "coordinates": [-13656274.380351715, 5703203.671949966] + }, + "properties": { + "bar": "baz" + } + },{ + "type": "Feature", + "id": "bar", + "geometry":{ + "type": "Point", + "coordinates": [-13656274.380351715, 5703203.671949966] + }, + "properties": { + "bar": "baz" + } + } + ] + }; + var expectedOutput = { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "id": "foo", + "geometry":{ + "type": "Point", + "coordinates": [-122.67639999999793, 45.51649999999923] + }, + "properties": { + "bar": "baz" + } + },{ + "type": "Feature", + "id": "bar", + "geometry":{ + "type": "Point", + "coordinates": [-122.67639999999793, 45.51649999999923] + }, + "properties": { + "bar": "baz" + } + } + ] + }; + var output = Terraformer.toGeographic(input); + + expect(expectedOutput.features[0].geometry.coordinates[0]).toBeCloseTo(-122.6764000000, 10); + expect(expectedOutput.features[0].geometry.coordinates[1]).toBeCloseTo(45.5165000000, 10); + + expect(expectedOutput.features[1].geometry.coordinates[0]).toBeCloseTo(-122.6764000000, 10); + expect(expectedOutput.features[1].geometry.coordinates[1]).toBeCloseTo(45.5165000000, 10); + }); + + it("should convert a GeoJSON Geometry Collection to Geographic coordinates", function(){ + var input = { + "type": "GeometryCollection", + "geometries": [ + { + "type": "Point", + "coordinates": [-13656274.380351715, 5703203.671949966] + },{ + "type": "Point", + "coordinates": [-13656274.380351715, 5703203.671949966] + } + ] + }; + var expectedOutput = { + "type": "GeometryCollection", + "geometries": [ + { + "type": "Point", + "coordinates": [-122.67639999999793, 45.51649999999923] + },{ + "type": "Point", + "coordinates": [-122.67639999999793, 45.51649999999923] + } + ] + }; + var output = Terraformer.toGeographic(input); + + expect(expectedOutput.geometries[0].coordinates[0]).toBeCloseTo(-122.6764000000, 10); + expect(expectedOutput.geometries[0].coordinates[1]).toBeCloseTo(45.5165000000, 10); + + expect(expectedOutput.geometries[1].coordinates[0]).toBeCloseTo(-122.6764000000, 10); + expect(expectedOutput.geometries[1].coordinates[1]).toBeCloseTo(45.5165000000, 10); + }); +}); diff --git a/node_modules/terraformer/spec/terraformerSpec.js b/node_modules/terraformer/spec/terraformerSpec.js new file mode 100755 index 0000000..b9065f4 --- /dev/null +++ b/node_modules/terraformer/spec/terraformerSpec.js @@ -0,0 +1,1145 @@ +if(typeof module === "object"){ + var Terraformer = require("../terraformer.js"); + var GeoJSON = require("./geojsonHelpers.js"); +} + +beforeEach(function() { + this.addMatchers({ + toBeInstanceOfClass: function(classRef){ + return this.actual instanceof classRef; + } + }); +}); + +describe("Primitives", function(){ + + it("should create a Point from GeoJSON", function(){ + var point = new Terraformer.Primitive(GeoJSON.points[1]); + + expect(point).toBeInstanceOfClass(Terraformer.Point); + expect(point.coordinates).toEqual(GeoJSON.points[1].coordinates); + }); + + it("should create a MultiPoint from GeoJSON", function(){ + var multiPoint = new Terraformer.Primitive(GeoJSON.multiPoints[1]); + + expect(multiPoint).toBeInstanceOfClass(Terraformer.MultiPoint); + expect(multiPoint.coordinates).toEqual(GeoJSON.multiPoints[1].coordinates); + }); + + it("should create a LineString from GeoJSON", function(){ + var lineString = new Terraformer.Primitive(GeoJSON.lineStrings[3]); + + expect(lineString).toBeInstanceOfClass(Terraformer.LineString); + expect(lineString.coordinates).toEqual(GeoJSON.lineStrings[3].coordinates); + }); + + it("should create a MultiLineString from GeoJSON", function(){ + var multiLineString = new Terraformer.Primitive(GeoJSON.multiLineStrings[1]); + + expect(multiLineString).toBeInstanceOfClass(Terraformer.MultiLineString); + expect(multiLineString.coordinates).toEqual(GeoJSON.multiLineStrings[1].coordinates); + }); + + it("should create a Polygon from GeoJSON", function(){ + var polygon = new Terraformer.Primitive(GeoJSON.polygons[2]); + expect(polygon).toBeInstanceOfClass(Terraformer.Polygon); + expect(polygon.coordinates).toEqual(GeoJSON.polygons[2].coordinates); + }); + + it("should create a MultiPolygon from GeoJSON", function(){ + var multiPolygon = new Terraformer.Primitive(GeoJSON.multiPolygons[1]); + expect(multiPolygon).toBeInstanceOfClass(Terraformer.MultiPolygon); + expect(multiPolygon.coordinates).toEqual(GeoJSON.multiPolygons[1].coordinates); + }); + + it("should create a Feature from GeoJSON", function(){ + var feature = new Terraformer.Primitive(GeoJSON.features[0]); + expect(feature).toBeInstanceOfClass(Terraformer.Feature); + expect(feature.geometry.coordinates).toEqual(GeoJSON.features[0].geometry.coordinates); + expect(feature.geometry.type).toEqual("Polygon"); + }); + + it("should create a Feature from GeoJSON with null geometry and properties", function(){ + var feature = new Terraformer.Primitive({ + type: "Feature", + geometry: null, + properties: null + }); + + expect(feature).toBeInstanceOfClass(Terraformer.Feature); + expect(feature.geometry).toEqual(null); + expect(feature.properties).toEqual(null); + expect(feature.type).toEqual("Feature"); + }); + + it("should create a FeatureCollection from GeoJSON", function(){ + var featureCollection = new Terraformer.Primitive(GeoJSON.featureCollections[0]); + + expect(featureCollection).toBeInstanceOfClass(Terraformer.FeatureCollection); + expect(featureCollection.features[0].geometry.coordinates).toEqual(featureCollection.features[0].geometry.coordinates); + expect(featureCollection.features[0].geometry.type).toEqual("Polygon"); + }); + + it("should create a GeometryCollection from GeoJSON", function(){ + var geometryCollection = new Terraformer.Primitive(GeoJSON.geometryCollections[0]); + + expect(geometryCollection).toBeInstanceOfClass(Terraformer.GeometryCollection); + expect(geometryCollection.geometries.length).toEqual(2); + }); + + describe("Helper Methods", function(){ + it("should convert a Primitive to Web Mercator", function(){ + var point = new Terraformer.Primitive(GeoJSON.points[2]); + + var mercator = point.toMercator(); + + expect(mercator.coordinates).toEqual([11131949.079327168, 0]); + expect(mercator.crs).toEqual(Terraformer.MercatorCRS); + }); + + it("should convert a Primitive to Geographic coordinates", function(){ + var point = new Terraformer.Primitive({ + "type": "Point", + "coordinates": [11354588.06,222684.20] + }); + + var mercator = point.toGeographic(); + + expect(mercator.coordinates[0]).toBeCloseTo(101.99999999179026, 10); + expect(mercator.coordinates[1]).toBeCloseTo(1.9999999236399357, 10); + }); + + it("should convert a Primitive to JSON", function(){ + var geometryCollection = new Terraformer.Primitive(GeoJSON.geometryCollections[0]); + var json = geometryCollection.toJSON(); + expect(json.bbox).toBeTruthy(); + expect(json.type).toBeTruthy(); + expect(json.geometries).toBeTruthy(); + expect(json.length).toBeFalsy(); + }); + + it("should convert a Circle Primitive to JSON", function(){ + var circle = new Terraformer.Circle([45.5165, -1226764], 100); + var json = circle.toJSON(); + expect(json.bbox).toBeTruthy(); + expect(json.type).toEqual("Feature"); + expect(json.geometry).toBeTruthy(); + expect(json.geometry.coordinates).toBeTruthy(); + expect(json.geometry.bbox).toBeFalsy(); + expect(json.center).toBeFalsy(); + expect(json.steps).toBeFalsy(); + expect(json.radius).toBeFalsy(); + expect(json.properties.center).toBeTruthy(); + expect(json.properties.steps).toBeTruthy(); + expect(json.properties.radius).toBeTruthy(); + }); + }); + + describe("Point", function(){ + var point; + + beforeEach(function(){ + point = new Terraformer.Point(45, 60); + }); + + it("should create a Point from a 'x' and 'y'", function(){ + expect(point.coordinates).toEqual([45,60]); + }); + + it("should create a Point from a GeoJSON Position", function(){ + var point = new Terraformer.Point([45, 60]); + expect(point.coordinates).toEqual([45,60]); + }); + + it("should throw an error when called invalid data", function(){ + expect(function(){ + point = new Terraformer.Point(GeoJSON.multiPoints[1]); + }).toThrow("Terraformer: invalid input for Terraformer.Point"); + }); + + it("should calculate bounds", function(){ + expect(point.bbox()).toEqual([45, 60, 45, 60]); + }); + + it("should calculate convex hull", function(){ + expect(point.convexHull()).toEqual(null); + }); + + it("should calculate convex hull using Tools", function(){ + expect(Terraformer.Tools.convexHull([ point.coordinates ])).toEqual([[45, 60]]); + }); + + it("should be able to tell a non-convex polygon using Tools", function(){ + expect(Terraformer.Tools.isConvex(GeoJSON.polygons[1].coordinates[0])).toEqual(false); + }); + + it("should be able to tell a convex polygon using Tools", function(){ + expect(Terraformer.Tools.isConvex(GeoJSON.polygons[0].coordinates[0])).toEqual(true); + }); + + it("should calculate envelope", function(){ + expect(point.envelope()).toEqual({ x: 45, y: 60, w: 0, h: 0 }); + }); + }); + + describe("MultiPoint", function(){ + var multiPoint; + + beforeEach(function(){ + multiPoint = new Terraformer.MultiPoint([ [100,0], [-45, 122] ]); + }); + + it("should create a MultiPoint from an array of GeoJSON Positions", function(){ + expect(multiPoint.coordinates).toEqual([ [100,0], [-45, 122] ]); + expect(multiPoint.type).toEqual("MultiPoint"); + }); + + it("should throw an error when called invalid data", function(){ + expect(function(){ + multiPoint = new Terraformer.MultiPoint(GeoJSON.points[1]); + }).toThrow("Terraformer: invalid input for Terraformer.MultiPoint"); + }); + + it("should be able to add a point", function(){ + multiPoint.addPoint([80,-60]); + expect(multiPoint.coordinates).toEqual([ [100,0],[-45, 122],[80,-60] ]); + }); + + it("should be able to insert a point", function(){ + multiPoint.insertPoint([80,-60], 1); + expect(multiPoint.coordinates).toEqual([ [100,0],[80,-60],[-45, 122] ]); + }); + + it("should be able to remove a point by index", function(){ + multiPoint.removePoint(1); + expect(multiPoint.coordinates).toEqual([ [100, 0] ]); + }); + + it("should be able to remove a point by position", function(){ + multiPoint.removePoint([-45, 122]); + expect(multiPoint.coordinates).toEqual([ [100,0] ]); + }); + + it("should be able to itterate over all points", function(){ + var spy = jasmine.createSpy(); + multiPoint.forEach(spy); + expect(spy.callCount).toEqual(multiPoint.coordinates.length); + expect(spy).toHaveBeenCalledWith([100,0], 0, multiPoint.coordinates); + expect(spy).toHaveBeenCalledWith([-45,122], 1, multiPoint.coordinates); + }); + + it("should calculate bounds", function(){ + expect(multiPoint.bbox()).toEqual([-45, 0, 100, 122]); + }); + + it("should calculate convex hull", function(){ + multiPoint.addPoint([80,-60]); + expect(multiPoint.convexHull().type).toEqual("Polygon"); + expect(multiPoint.convexHull().coordinates).toEqual( + [ [ [ 100, 0 ], [ -45, 122 ], [ 80, -60 ], [ 100, 0 ] ] ] + ); + }); + + it("should return null when a convex hull cannot return a valid Polygon", function(){ + expect(multiPoint.convexHull()).toEqual(null); + }); + + it("should calculate envelope", function(){ + expect(multiPoint.envelope()).toEqual({ x : -45, y : 0, w : 145, h : 122 }); + }); + + it("should get a point as a Primitive", function(){ + expect(multiPoint.get(0)).toBeInstanceOfClass(Terraformer.Point); + expect(multiPoint.get(0).coordinates).toEqual([100,0]); + }); + }); + + describe("LineString", function(){ + var lineString; + + beforeEach(function(){ + lineString = new Terraformer.LineString([ [100,0], [-45, 122] ]); + }); + + it("should create a Line from an array of GeoJSON Positions", function(){ + expect(lineString.type).toEqual("LineString"); + expect(lineString.coordinates).toEqual([ [100,0], [-45, 122] ]); + }); + + it("should throw an error when called invalid data", function(){ + expect(function(){ + new Terraformer.LineString(GeoJSON.features[1]).toThrow(); + }).toThrow("Terraformer: invalid input for Terraformer.LineString"); + }); + + it("should be able to add a vertex", function(){ + lineString.addVertex([80,-60]); + expect(lineString.coordinates).toEqual([ [100,0],[-45, 122],[80,-60] ]); + }); + + it("should be able to insert a vertex", function(){ + lineString.insertVertex([80,-60], 1); + expect(lineString.coordinates).toEqual([ [100,0],[80,-60],[-45, 122] ]); + }); + + it("should be able to remove a vertex by index", function(){ + lineString.removeVertex(1); + expect(lineString.coordinates).toEqual([ [100, 0] ]); + }); + + it("should calculate bounds", function(){ + expect(lineString.bbox()).toEqual([-45, 0, 100, 122]); + }); + + it("should calculate convex hull", function(){ + lineString.addVertex([80,-60]); + expect(lineString.convexHull().type).toEqual("Polygon"); + expect(lineString.convexHull().coordinates).toEqual([ + [ [ 100, 0 ], [ -45, 122 ], [ 80, -60 ], [ 100, 0 ] ] + ]); + }); + + it("should return null when a convex hull cannot return a valid Polygon", function(){ + expect(lineString.convexHull()).toEqual(null); + }); + + it("should calculate envelope", function(){ + expect(lineString.envelope()).toEqual({ x : -45, y : 0, w : 145, h : 122 }); + }); + }); + + describe("MultiLineString", function(){ + var multiLineString; + + beforeEach(function(){ + multiLineString = new Terraformer.MultiLineString([ + [ [-105, 40], [-110, 45], [-115, 55] ], + [ [-100, 40], [-105, 45], [-110, 55] ] + ]); + }); + + it("should create a MultiLineString from an array of GeoJSON LineStrings", function(){ + expect(multiLineString.type).toEqual("MultiLineString"); + expect(multiLineString.coordinates).toEqual([ + [ [-105, 40], [-110, 45], [-115, 55] ], + [ [-100, 40], [-105, 45], [-110, 55] ] + ]); + }); + + it("should throw an error when called invalid data", function(){ + expect(function(){ + new Terraformer.MultiLineString(GeoJSON.features[1]).toThrow(); + }).toThrow("Terraformer: invalid input for Terraformer.MultiLineString"); + }); + + it("should have a getter for length", function(){ + expect(multiLineString.coordinates.length).toEqual(2); + }); + + it("should calculate bounds", function(){ + expect(multiLineString.bbox()).toEqual([-115, 40, -100, 55]); + }); + + it("should calculate convex hull", function(){ + expect(multiLineString.convexHull().type).toEqual("Polygon"); + expect(multiLineString.convexHull().coordinates).toEqual([ + [ [ -100, 40 ], [ -110, 55 ], [ -115, 55 ], [ -110, 45 ], [ -105, 40 ], [ -100, 40 ] ] + ]); + }); + + it("should calculate envelope", function(){ + expect(multiLineString.envelope()).toEqual({ x : -115, y : 40, w : 15, h : 15 }); + }); + + it("should get a line as a Primitive", function(){ + expect(multiLineString.get(0)).toBeInstanceOfClass(Terraformer.LineString); + expect(multiLineString.get(0).coordinates).toEqual([ [-105, 40], [-110, 45], [-115, 55] ]); + }); + + it("should work with forEach correctly", function(){ + var count = 0; + multiLineString.forEach(function () { + count++; + }); + + expect(count).toEqual(2); + }); + + }); + + describe("Polygon", function(){ + var polygon; + var polygonWithHoles; + + beforeEach(function(){ + polygon = new Terraformer.Polygon([ [ [100.0, 0.0],[101.0, 0.0],[101.0, 1.0],[100.0, 1.0],[100.0, 0.0] ] ]); + polygonWithHoles = new Terraformer.Polygon([ + [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ], + [ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ] + ]); + }); + + it("should create a Polygon from an array of GeoJSON Positions", function(){ + expect(polygon.type).toEqual("Polygon"); + expect(polygon.coordinates).toEqual([ [ [100.0, 0.0],[101.0, 0.0],[101.0, 1.0],[100.0, 1.0],[100.0, 0.0] ] ]); + }); + + it("should throw an error when called invalid data", function(){ + expect(function(){ + polygon = new Terraformer.Polygon(GeoJSON.features[1]); + }).toThrow("Terraformer: invalid input for Terraformer.Polygon"); + }); + + it("should be able to add a vertex", function(){ + polygon.addVertex([45, 100]); + expect(polygon.coordinates).toEqual([ [ [100.0, 0.0],[101.0, 0.0],[101.0, 1.0],[100.0, 1.0],[45, 100],[100.0, 0.0] ] ]); + }); + + it("should be able to insert a vertex", function(){ + polygon.insertVertex([45, 100], 1); + expect(polygon.coordinates).toEqual([ [ [100.0, 0.0],[45, 100],[101.0, 0.0],[101.0, 1.0],[100.0, 1.0],[100.0, 0.0] ] ]); + }); + + it("should be able to remove a vertex by index", function(){ + polygon.removeVertex(0); + expect(polygon.coordinates).toEqual([ [ [101.0, 0.0],[101.0, 1.0],[100.0, 1.0],[100.0, 0.0] ] ]); + }); + + it("should calculate bounds", function(){ + expect(polygon.bbox()).toEqual([100, 0, 101, 1]); + }); + + it("should calculate convex hull", function(){ + expect(polygon.convexHull().coordinates).toEqual([ + [ [ 101, 1 ], [ 100, 1 ], [ 100, 0 ], [ 101, 0 ], [ 101, 1 ] ] + ]); + expect(polygon.convexHull().type).toEqual("Polygon"); + }); + + it("should calculate envelope", function(){ + expect(polygon.envelope()).toEqual({ x : 100.0, y : 0, w : 1, h : 1 }); + }); + + it("should report hole presence properly", function() { + expect(polygon.hasHoles()).toEqual(false); + expect(polygonWithHoles.hasHoles()).toEqual(true); + }); + + it("should return an array of polygons of each hole", function() { + var hole = new Terraformer.Polygon([[[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]]]); + expect(polygonWithHoles.holes()).toEqual([hole]); + }); + }); + + describe("MultiPolygon", function(){ + var multiPolygon, mp; + + beforeEach(function(){ + multiPolygon = new Terraformer.MultiPolygon(GeoJSON.multiPolygons[0].coordinates); + }); + + it("should create a MultiPolygon from an array of GeoJSON Polygons", function(){ + expect(multiPolygon.type).toEqual("MultiPolygon"); + expect(multiPolygon.coordinates).toEqual(GeoJSON.multiPolygons[0].coordinates); + }); + + it("should return true when a MultiPolygon intersects another", function(){ + mp = new Terraformer.MultiPolygon([ + [ + [ [102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0] ] + ], + [ + [ [100.0, 0.0], [102.0, 0.0], [102.0, 1.0], [100.0, 1.0], [100.0, 0.0] ] + ] + ]); + + expect(multiPolygon.intersects(mp)).toEqual(true); + }); + + it("should throw an error when called invalid data", function(){ + expect(function(){ + multiPolygon = new Terraformer.MultiPolygon(GeoJSON.multiPoints[0]); + }).toThrow("Terraformer: invalid input for Terraformer.MultiPolygon"); + }); + + it("should have a getter for length", function(){ + expect(multiPolygon.coordinates.length).toEqual(2); + }); + + it("should calculate bounds", function(){ + expect(multiPolygon.bbox()).toEqual([100, 0, 103, 3]); + }); + + it("should calculate convex hull", function (){ + expect(mp.convexHull().coordinates).toEqual([ + [ [ 103, 3 ], + [ 102, 3 ], + [ 100, 1 ], + [ 100, 0 ], + [ 102, 0 ], + [ 103, 2 ], + [ 103, 3 ] ] + ]); + expect(multiPolygon.convexHull().type).toEqual("Polygon"); + }); + + it("should calculate envelope", function(){ + expect(multiPolygon.envelope()).toEqual({ x : 100, y : 0, w : 3, h : 3 }); + }); + + it("should get a polygon as a Primitive", function(){ + expect(multiPolygon.get(0)).toBeInstanceOfClass(Terraformer.Polygon); + expect(multiPolygon.get(0).coordinates).toEqual(GeoJSON.multiPolygons[0].coordinates[0]); + }); + + it("should work with forEach correctly", function(){ + var count = 0; + multiPolygon.forEach(function () { + count++; + }); + + expect(count).toEqual(2); + }); + + it("should be able to be closed", function(){ + var unclosed = new Terraformer.MultiPolygon({ + "type": "MultiPolygon", + "coordinates": [ + [ + [ [102.0, 2.0],[103.0, 2.0],[103.0, 3.0],[102.0, 3.0] ], + [ [102.2, 2.2],[102.8, 2.2],[102.8, 2.8],[102.2, 2.8] ] + ], + [ + [ [100.0, 0.0],[101.0, 0.0],[101.0, 1.0],[100.0, 1.0] ], + [ [100.2, 0.2],[100.8, 0.2],[100.8, 0.8],[100.2, 0.8] ] + ] + ] + }); + + unclosed.close(); + + unclosed.forEach(function(poly){ + expect(poly[0].length).toEqual(5); + expect(poly[0][0][0]).toEqual(poly[0][poly[0].length-1][0]); + expect(poly[0][0][1]).toEqual(poly[0][poly[0].length-1][1]); + }); + + }); + + }); + + describe("Circle", function(){ + var circle; + + beforeEach(function(){ + circle = new Terraformer.Circle([-122, 45], 1000, 128); + }); + + it("should create a Circle Feature from a GeoJSON Position and a radius", function(){ + expect(circle.type).toEqual("Feature"); + expect(circle.geometry.type).toEqual("Polygon"); + expect(circle.geometry.coordinates[0].length).toEqual(129); // 128 + 1 to close the circle + }); + + it("should throw an error when called invalid data", function(){ + expect(function(){ + circle = new Terraformer.Circle(); + }).toThrow("Terraformer: missing parameter for Terraformer.Circle"); + }); + + it("should form a closed polygon", function(){ + expect(circle.geometry.coordinates[0][0][0]).toEqual(circle.geometry.coordinates[0][circle.geometry.coordinates[0].length-1][0]); + expect(circle.geometry.coordinates[0][0][1]).toEqual(circle.geometry.coordinates[0][circle.geometry.coordinates[0].length-1][1]); + }); + + it("should have a getter for steps", function(){ + expect(circle.steps()).toEqual(128); + }); + + it("should have a setter for steps", function(){ + circle.steps(64); + expect(circle.properties.steps).toEqual(64); + }); + + it("should have a getter for radius", function(){ + expect(circle.radius()).toEqual(1000); + }); + + it("should have a setter for radius", function(){ + circle.radius(500); + expect(circle.properties.radius).toEqual(500); + }); + + it("should have a getter for center", function(){ + expect(circle.center()).toEqual([-122,45]); + }); + + it("should have a setter for center", function(){ + circle.center([80,50]); + expect(circle.properties.center).toEqual([80,50]); + }); + + it("should calculate bounds", function(){ + expect(circle.bbox()[0]).toBeCloseTo(-122.0089831528, 10); + expect(circle.bbox()[1]).toBeCloseTo(44.9936475996, 10); + expect(circle.bbox()[2]).toBeCloseTo(-121.9910168472, 10); + expect(circle.bbox()[3]).toBeCloseTo(45.0063516962, 10); + + }); + + it("should calculate envelope", function(){ + expect(circle.envelope().x).toBeCloseTo(-122.0089831528, 10); + expect(circle.envelope().y).toBeCloseTo(44.9936475996, 10); + expect(circle.envelope().w).toBeCloseTo(0.0179663057, 10); + expect(circle.envelope().h).toBeCloseTo(0.0127040966, 10); + }); + + }); + + describe("Feature", function(){ + var feature; + + beforeEach(function(){ + feature = new Terraformer.Feature(GeoJSON.polygons[0]); + }); + + it("should create a Feature from a GeoJSON Geometry", function(){ + expect(feature.type).toEqual("Feature"); + expect(feature.geometry.type).toEqual("Polygon"); + expect(feature.geometry.coordinates).toEqual(GeoJSON.polygons[0].coordinates); + }); + + it("should throw an error when called invalid data", function(){ + expect(function(){ + new Terraformer.Feature({ + type: "Polygon" + }).toThrow("Terraformer: invalid input for Terraformer.Feature"); + }); + }); + + it("should calculate bounds", function(){ + expect(feature.bbox()).toEqual([21.79, 33.75, 56.95, 71.01]); + }); + + it("should calculate envelope", function(){ + expect(feature.envelope()).toEqual({ x : 21.79, y : 33.75, w : 35.160000000000004, h : 37.260000000000005 }); + }); + + it("should calculate convex hull", function(){ + expect(feature.convexHull().type).toEqual("Polygon"); + expect(feature.convexHull().coordinates).toEqual([ + [ [ 56.95, 33.75 ], [ 41.83, 71.01 ], [ 21.79, 36.56 ], [ 56.95, 33.75 ] ] + ]); + }); + + }); + + describe("FeatureCollection", function(){ + var featureCollection; + + beforeEach(function(){ + featureCollection = new Terraformer.FeatureCollection([ + GeoJSON.features[0], GeoJSON.features[1] + ]); + }); + + it("should create a FeatureCollection from an array of GeoJSON Features", function(){ + expect(featureCollection.features.length).toEqual(2); + expect(featureCollection.features[0]).toEqual(GeoJSON.features[0]); + expect(featureCollection.features[1]).toEqual(GeoJSON.features[1]); + }); + + it("should throw an error when called invalid data", function(){ + expect(function(){ + new Terraformer.FeatureCollection({ + "type": "Polygon" + }).toThrow("Terraformer: invalid input for Terraformer.FeatureCollection"); + }); + }); + + it("should calculate bounds", function(){ + expect(featureCollection.bbox()).toEqual([ -104.99404, 33.75, 56.95, 71.01 ] ); + }); + + it("should calculate envelope", function(){ + expect(featureCollection.envelope()).toEqual({ x : -104.99404, y : 33.75, w : 161.94404, h : 37.260000000000005 }); + }); + + it("should get a Feature as a Primitive", function(){ + expect(featureCollection.get("foo")).toBeInstanceOfClass(Terraformer.Feature); + expect(featureCollection.get("foo").geometry.coordinates).toEqual(GeoJSON.features[0].geometry.coordinates); + }); + }); + + describe("GeometryCollection", function(){ + var geometryCollection; + + beforeEach(function() { + geometryCollection = new Terraformer.GeometryCollection([GeoJSON.polygons[0], GeoJSON.polygons[1]]); + }); + + it("should create a GeometryCollection from an array of GeoJSON Geometries", function(){ + expect(geometryCollection.geometries.length).toEqual(2); + expect(geometryCollection.geometries[0]).toEqual(GeoJSON.polygons[0]); + expect(geometryCollection.geometries[1]).toEqual(GeoJSON.polygons[1]); + }); + + it("should throw an error when called invalid data", function(){ + expect(function(){ + new Terraformer.GeometryCollection({ + "type": "Polygon" + }).toThrow("Terraformer: invalid input for Terraformer.GeometryCollection"); + }); + }); + + it("should calculate bounds", function(){ + expect(geometryCollection.bbox()).toEqual([ -84.32281494140625, 33.73804486328907, 56.95, 71.01 ]); + }); + + it("should calculate envelope", function(){ + expect(geometryCollection.envelope()).toEqual({ x : -84.32281494140625, y : 33.73804486328907, w : 141.27281494140624, h : 37.271955136710936 }); + }); + + it("should get a Geometry as a Primitive", function(){ + expect(geometryCollection.get(0)).toBeInstanceOfClass(Terraformer.Polygon); + expect(geometryCollection.get(0).coordinates).toEqual(GeoJSON.polygons[0].coordinates); + }); + + it("should work with forEach correctly", function(){ + var count = 0; + geometryCollection.forEach(function () { + count++; + }); + + expect(count).toEqual(2); + }); + + }); +}); + +describe("Intersection", function(){ + var multiLineString; + + describe("MultiLineString", function(){ + beforeEach(function() { + multiLineString = new Terraformer.MultiLineString([ [ [ 0, 0 ], [ 10, 10 ] ], [ [ 5, 5 ], [ 15, 15 ] ] ]); + }); + + it("should correctly figure out intersection with a LineString", function() { + expect(multiLineString.intersects(new Terraformer.LineString([ [ 0, 10 ], [ 15, 5 ] ]))).toEqual(true); + }); + + it("should correctly figure out intersection with a MultiLineString", function (){ + expect(multiLineString.intersects(new Terraformer.MultiLineString([ [ [ 0, 10 ], [ 15, 5 ] ] ]))).toEqual(true); + }); + + it("should correctly figure out intersection with a Polygon", function (){ + expect(multiLineString.intersects(new Terraformer.Polygon([ [ [ 0, 5 ], [ 10, 5 ], [ 10, 0 ], [ 0, 0 ] ] ]))).toEqual(true); + }); + + it("should correctly figure out intersection with a MultiPolygon", function (){ + expect(multiLineString.intersects(new Terraformer.MultiPolygon([ [ [ [ 0, 5 ], [ 10, 5 ], [ 10, 0 ], [ 0, 0 ] ] ] ]))).toEqual(true); + }); + }); + + describe("Polygon", function(){ + var polygon; + + beforeEach(function() { + polygon = new Terraformer.Polygon([ [ [ 0, 0 ], [ 10, 0 ], [ 10, 5 ], [ 0, 5 ] ] ]); + }); + + it("should correctly figure out intersection of the same object", function(){ + expect(polygon.intersects(polygon)).toEqual(true); + }); + + it("should correctly figure out intersection with a Polygon", function(){ + expect(polygon.intersects(new Terraformer.Polygon([ [ [ 1, 1 ], [ 11, 1 ], [ 11, 6 ], [ 1, 6 ] ] ]))).toEqual(true); + }); + + it("should correctly figure out intersection with a MultiPolygon", function(){ + expect(polygon.intersects(new Terraformer.MultiPolygon([ [ [ [ 1, 1 ], [ 11, 1 ], [ 11, 6 ], [ 1, 6 ] ] ] ]))).toEqual(true); + }); + + it("should correctly figure out intersection with a Polygon", function(){ + expect(polygon.intersects(new Terraformer.Polygon([ [ [ 1, 1 ], [ 11, 1 ], [ 11, 6 ], [ 1, 6 ] ] ]))).toEqual(true); + }); + + it("should correctly figure out intersection with a MultiLineString", function(){ + expect(polygon.intersects(new Terraformer.MultiLineString([ [ [ 1, 1 ], [ 11, 1 ], [ 11, 6 ], [ 1, 6 ] ] ]))).toEqual(true); + }); + + it("should correctly figure out intersection with a LineString", function(){ + expect(polygon.intersects(new Terraformer.LineString([ [ 1, 1 ], [ 11, 1 ], [ 11, 6 ], [ 1, 6 ] ]))).toEqual(true); + }); + + it("should correctly figure out intersection with a MultiPolygon", function(){ + expect(polygon.intersects(new Terraformer.MultiPolygon([ [ [ [ 1, 1 ], [ 11, 1 ], [ 11, 6 ], [ 1, 6 ] ] ] ]))).toEqual(true); + }); + + it("should correctly figure out intersection with a MultiPolygon in reverse", function(){ + var mp = new Terraformer.MultiPolygon([ [ [ [ 1, 1 ], [ 11, 1 ], [ 11, 6 ], [ 1, 6 ] ] ] ]); + expect(mp.intersects(polygon)).toEqual(true); + }); + + }); + + describe("MultiPolygon", function(){ + var multiPolygon; + + beforeEach(function() { + multiPolygon = new Terraformer.MultiPolygon([ [ [ [ 48.5, -122.5 ], [ 50, -123 ], [ 48.5, -122.5 ] ] ] ]); + }); + + it("should return false if two MultiPolygons do not intersect", function() { + var mp = new Terraformer.MultiPolygon([ [ [ [ 1, 2 ], [ 3, 4 ], [ 5, 6 ] ] ] ]); + expect(multiPolygon.intersects(mp)).toEqual(false); + }); + }); + + describe("Feature", function(){ + var feature; + + beforeEach(function() { + feature = new Terraformer.Feature( { + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ [ [ 0, 0 ], [ 10, 0 ], [ 10, 5 ], [ 0, 5 ] ] ] + } + }); + }); + + }); + + describe("LineString", function(){ + var lineString; + + beforeEach(function() { + lineString = new Terraformer.LineString([ [ 45, -122 ], [ 46, -123 ] ]); + }); + + it("should correctly figure out intersection with a LineString", function(){ + expect(lineString.intersects(new Terraformer.LineString([ [46, -121], [44, -124] ]))).toEqual(true); + }); + + it("should correctly figure out that parallel lines are not intersections", function(){ + expect(lineString.intersects(new Terraformer.LineString([ [44,-121], [45, -122] ]))).toEqual(false); + }); + + it("should correctly figure out that the same lines are not intersections", function(){ + expect(lineString.intersects(new Terraformer.LineString([ [45,-122], [46, -123] ]))).toEqual(false); + }); + + it("should correctly figure out intersection with Polygon", function(){ + expect(lineString.intersects(new Terraformer.Polygon([ [ [ 45.5, -122.5 ], [ 47, -123 ], [ 45.5, -122.5 ] ] ]))).toEqual(true); + }); + + it("should correctly figure out lack of intersection with Polygon", function(){ + expect(lineString.intersects(new Terraformer.Polygon([ [ [ 48.5, -122.5 ], [ 50, -123 ], [ 48.5, -122.5 ] ] ]))).toEqual(false); + }); + + it("should correctly figure out intersection with MultiLineString", function(){ + expect(lineString.intersects(new Terraformer.MultiLineString([ [ [ 45.5, -122.5 ], [ 47, -123 ], [ 45.5, -122.5 ] ] ]))).toEqual(true); + }); + + it("should correctly figure out lack of intersection with MultiLineString", function(){ + expect(lineString.intersects(new Terraformer.MultiLineString([ [ [ 48.5, -122.5 ], [ 50, -123 ], [ 48.5, -122.5 ] ] ]))).toEqual(false); + }); + + it("should correctly figure out intersection with MultiPolygon", function(){ + expect(lineString.intersects(new Terraformer.MultiPolygon([ [ [ [ 45.5, -122.5 ], [ 47, -123 ], [ 45.5, -122.5 ] ] ] ]))).toEqual(true); + }); + + it("should correctly figure out lack of intersection with MultiPolygon", function(){ + expect(lineString.intersects(new Terraformer.MultiPolygon([ [ [ [ 48.5, -122.5 ], [ 50, -123 ], [ 48.5, -122.5 ] ] ] ]))).toEqual(false); + }); + + it("should correctly figure out lack of intersection with MultiPolygon in reverse", function(){ + var mp = new Terraformer.MultiPolygon([ [ [ [ 48.5, -122.5 ], [ 50, -123 ], [ 48.5, -122.5 ] ] ] ]); + expect(mp.intersects(lineString)).toEqual(false); + }); + + }); + + describe("Point Within", function(){ + var point; + + beforeEach(function(){ + point = new Terraformer.Point([ 10, 10 ]); + }); + + it("should return true when inside a polygon", function(){ + var polygon = new Terraformer.Polygon([ [ [ 5, 5 ], [ 5, 15 ], [ 15, 15 ], [ 15, 5 ], [ 5, 5 ] ] ]); + expect(point.within(polygon)).toEqual(true); + }); + + it("should return false when not inside a polygon", function(){ + var polygon = new Terraformer.Polygon([ [ [ 25, 25 ], [ 25, 35 ], [ 35, 35 ], [ 35, 25 ], [ 25, 25 ] ] ]); + expect(point.within(polygon)).toEqual(false); + }); + + it("should return true when it is the same point", function(){ + var npoint = new Terraformer.Point([ 10, 10 ]); + expect(point.within(npoint)).toEqual(true); + }); + + it("should return false when it is not the same point", function(){ + var npoint = new Terraformer.Point([ 11, 11 ]); + expect(point.within(npoint)).toEqual(false); + }); + + it("should return true when inside a multipolygon", function() { + var mp = new Terraformer.MultiPolygon([ [ [ [ 25, 25 ], [ 25, 35 ], [ 35, 35 ], [ 35, 25 ], [ 25, 25 ] ] ], [ [ [ 5, 5 ], [ 15, 5 ], [ 15, 15 ], [ 5, 15 ], [ 5, 5 ] ] ] ]); + expect(point.within(mp)).toEqual(true); + }); + + it("should return false when not inside a multipolygon", function() { + var mp = new Terraformer.MultiPolygon([ [ [ [ 25, 25 ], [ 25, 35 ], [ 35, 35 ], [ 35, 25 ], [ 25, 25 ] ] ], [ [ [ 15, 15 ], [ 25, 15 ], [ 25, 25 ], [ 15, 25 ], [ 15, 15 ] ] ] ]); + expect(point.within(mp)).toEqual(false); + }); + + it("should return false when inside a hole of a polygon", function(){ + var polygon = new Terraformer.Polygon([ [ [ 5, 5 ], [ 5, 15 ], [ 15, 15 ], [ 15, 5 ], [ 5, 5 ] ], [ [ 9, 9 ], [ 9, 11 ], [ 11, 11 ], [ 11, 9 ], [ 9, 9 ] ] ]); + expect(point.within(polygon)).toEqual(false); + }); + + it("should return true when not inside a hole of a polygon", function(){ + var polygon = new Terraformer.Polygon([ [ [ 5, 5 ], [ 5, 15 ], [ 15, 15 ], [ 15, 5 ], [ 5, 5 ] ], [ [ 9, 9 ], [ 9, 9.5 ], [ 9.5, 9.5 ], [ 9.5, 9 ], [ 9, 9 ] ] ]); + expect(point.within(polygon)).toEqual(true); + }); + + it("should return true when inside a circle", function(){ + var circle = new Terraformer.Circle([ 10, 10 ], 50, 64); + expect(point.within(circle)).toEqual(true); + }); + + }); + + describe("MultiPolygon Within", function(){ + var multipolygon; + + beforeEach(function(){ + multipolygon = new Terraformer.MultiPolygon([ [ [ [ 5, 5 ], [ 5, 15 ], [ 15, 15 ], [ 15, 5 ], [ 5, 5 ] ] ], [ [ [ 25, 25 ], [ 25, 35 ], [ 35, 35 ], [ 35, 25 ], [ 25, 25 ] ] ] ]); + }); + + it("should return true if a linestring is within a multipolygon", function(){ + var linestring = new Terraformer.LineString([ [ 6, 6 ], [ 6, 14 ] ]); + expect(linestring.within(multipolygon)).toEqual(true); + }); + + it("should return true if a multipoint is within a multipolygon", function(){ + var linestring = new Terraformer.MultiPoint([ [ 6, 6 ], [ 6, 14 ] ]); + expect(linestring.within(multipolygon)).toEqual(true); + }); + + it("should return true if a multilinestring is within a multipolygon", function () { + var mls = new Terraformer.MultiLineString([ [ [ 6, 6 ], [ 6, 14 ] ] ]); + expect(mls.within(multipolygon)).toEqual(true); + }); + + it("should return false if a part of a multilinestring is not within a multipolygon", function () { + var mls = new Terraformer.MultiLineString([ [ [ 6, 6 ], [ 6, 14 ] ], [ [ 1, 1 ], [ 1, 2 ] ] ]); + expect(mls.within(multipolygon)).toEqual(false); + }); + + it("should return true if a multipolygon is within a multipolygon", function () { + var mp = new Terraformer.MultiPolygon([ [ [ [ 1, 1 ], [ 1, 40 ], [ 40, 40 ], [ 40, 1 ], [ 1, 1 ] ] ] ]); + expect(multipolygon.within(mp)).toEqual(true); + }); + + }); + + describe("More Point Within", function() { + var point; + + beforeEach(function(){ + point = new Terraformer.Point([ 6, 6 ]); + }); + + it("should return true if a point is within a multipoint", function(){ + var multipoint = new Terraformer.MultiPoint([ [ 1, 1 ], [ 2, 2 ], [ 3, 3 ], [ 6, 6 ] ]); + expect(point.within(multipoint)).toEqual(true); + }); + + it("should return false if a point is within a multipoint with different length", function(){ + var multipoint = new Terraformer.MultiPoint([ [ 1, 1, 1 ], [ 2, 2, 2 ], [ 3, 3, 3 ], [ 6, 6, 6 ] ]); + expect(point.within(multipoint)).toEqual(false); + }); + + it("should return true if a point is within a linestring", function(){ + var linestring = new Terraformer.LineString([ [ 1, 1 ], [ 2, 2 ], [ 3, 3 ], [ 6, 6 ] ]); + expect(point.within(linestring)).toEqual(true); + }); + + it("should return true if a point is within a multilinestring", function(){ + var linestring = new Terraformer.MultiLineString([ [ [ 1, 1 ], [ 2, 2 ], [ 3, 3 ], [ 6, 6 ] ] ]); + expect(point.within(linestring)).toEqual(true); + }); + + }); + + describe("Polygon Within", function(){ + var polygon; + + beforeEach(function(){ + polygon = new Terraformer.Polygon([ [ [ 5, 5 ], [ 5, 15 ], [ 15, 15 ], [ 15, 5 ], [ 5, 5 ] ] ]); + }); + + it("should return true when inside a polygon", function(){ + var polygon2 = new Terraformer.Polygon([ [ [ 3, 3 ], [ 3, 18 ], [ 18, 18 ], [ 18, 3 ], [ 3, 3 ] ] ]); + expect(polygon.within(polygon2)).toEqual(true); + }); + + it("should return false when not inside a polygon", function(){ + var polygon2 = new Terraformer.Polygon([ [ [ 25, 25 ], [ 25, 35 ], [ 35, 35 ], [ 35, 25 ], [ 25, 25 ] ] ]); + expect(polygon.within(polygon2)).toEqual(false); + }); + + it("should return true when it is the same polygon", function(){ + var polygon2 = new Terraformer.Polygon([ [ [ 5, 5 ], [ 5, 15 ], [ 15, 15 ], [ 15, 5 ], [ 5, 5 ] ] ]); + expect(polygon.within(polygon2)).toEqual(true); + }); + + it("should return true when inside a multipolygon", function() { + var mp = new Terraformer.MultiPolygon([ [ [ [ 25, 25 ], [ 25, 35 ], [ 35, 35 ], [ 35, 25 ], [ 25, 25 ] ] ], [ [ [ 3, 3 ], [ 18, 3 ], [ 18, 18 ], [ 3, 18 ], [ 3, 3 ] ] ] ]); + expect(polygon.within(mp)).toEqual(true); + }); + + it("should return false when not inside a multipolygon", function() { + var mp = new Terraformer.MultiPolygon([ [ [ [ 25, 25 ], [ 25, 35 ], [ 35, 35 ], [ 35, 25 ], [ 25, 25 ] ] ], [ [ [ 15, 15 ], [ 25, 15 ], [ 25, 25 ], [ 15, 25 ], [ 15, 15 ] ] ] ]); + expect(polygon.within(mp)).toEqual(false); + }); + + it("should return true when one of the polygons is the same polygon", function(){ + var mp = new Terraformer.MultiPolygon([ [ [ [ 5, 5 ], [ 5, 15 ], [ 15, 15 ], [ 15, 5 ], [ 5, 5 ] ] ], [ [ [ 1, 1 ], [ 1, 2 ], [ 2, 1 ] ] ] ]); + expect(polygon.within(mp)).toEqual(true); + }); + + it("should return true if all of the points in a linestring are in the same polygon", function(){ + var ls = new Terraformer.LineString([ [ 6, 6 ], [ 6, 14 ], [ 14, 14 ] ]); + expect(ls.within(polygon)).toEqual(true); + }); + + it("should return true if all of the points in a multipoint are in the same polygon", function(){ + var ls = new Terraformer.MultiPoint([ [ 6, 6 ], [ 6, 14 ], [ 14, 14 ] ]); + expect(ls.within(polygon)).toEqual(true); + }); + + it("should return false if one of the points in a linestring leave the polygon", function(){ + var ls = new Terraformer.LineString([ [ 6, 6 ], [ 6, 14 ], [ 16, 16 ] ]); + expect(ls.within(polygon)).toEqual(false); + }); + + it("should return false if one of the points in a multipoint leave the polygon", function(){ + var ls = new Terraformer.MultiPoint([ [ 6, 6 ], [ 6, 14 ], [ 16, 16 ] ]); + expect(ls.within(polygon)).toEqual(false); + }); + + it("should return true if a multilinestring is within a polygon", function () { + var mls = new Terraformer.MultiLineString([ [ [ 6, 6 ], [ 6, 14 ] ] ]); + expect(mls.within(polygon)).toEqual(true); + }); + + it("should return false if a part of a multilinestring is not within a polygon", function () { + var mls = new Terraformer.MultiLineString([ [ [ 6, 6 ], [ 6, 14 ] ], [ [ 1, 1 ], [ 1, 2 ] ] ]); + expect(mls.within(polygon)).toEqual(false); + }); + + it("should return true if a multipolygon is within a polygon", function () { + var mp = new Terraformer.MultiPolygon([ [ [ [ 6, 14 ], [ 14, 14 ], [ 14, 6 ], [ 6, 6 ], [ 6, 14 ] ] ] ]); + expect(mp.within(polygon)).toEqual(true); + }); + + it("should return false if an empty LineString is checked within a polygon", function(){ + var ls = new Terraformer.LineString([]); + expect(ls.within(polygon)).toEqual(false); + }); + + }); + + describe("Catch All", function(){ + it("should return an empty array for an empty convexHull", function() { + expect(Terraformer.Tools.convexHull([])).toEqual([]); + }); + + it("should return null for convexHull of empty Point", function() { + var point = new Terraformer.Point([]); + expect(point.convexHull()).toEqual(null); + }); + + it("should return null for an empty convexHull for LineString", function() { + var ls = new Terraformer.LineString([]); + expect(ls.convexHull()).toEqual(null); + }); + + it("should return an empty array for an empty convexHull for Polygon", function() { + var p = new Terraformer.Polygon([]); + expect(p.convexHull()).toEqual(null); + }); + + it("should return an empty array for an empty convexHull for MultiPolygon", function() { + var mp = new Terraformer.MultiPolygon([]); + expect(mp.convexHull()).toEqual(null); + }); + + it("should return an empty array for an empty convexHull for Feature", function() { + var f = new Terraformer.Feature({ + type: "Feature", + geometry: { + type: "Polygon", + coordinates: [] + } + }); + expect(f.convexHull()).toEqual(null); + }); + + it("should throw an error for an unknow type in Primitive", function(){ + expect(function(){ + var f = new Terraformer.Primitive({type: "foobar"}); + }).toThrow("Unknown type: foobar"); + }); + + it("should throw an error for an unknow type in calculateBounds", function(){ + expect(function(){ + Terraformer.Tools.calculateBounds({type: "foobar"}); + }).toThrow("Unknown type: foobar"); + }); + + it("should return null when there is no geometry in a Feature in calculateBounds", function(){ + var bounds = Terraformer.Tools.calculateBounds({type: "Feature", geomertry: null}); + expect(bounds).toEqual(null); + }); + + it("should return true when polygonContainsPoint is passed the right stuff", function() { + expect(Terraformer.Tools.polygonContainsPoint([], [])).toEqual(false); + }); + + it("should return false when polygonContainsPoint is passed an empty polygon", function() { + var pt = [-111.873779, 40.647303]; + var polygon = [[ + [-112.074279, 40.52215], + [-112.074279, 40.853293], + [-111.610107, 40.853293], + [-111.610107, 40.52215], + [-112.074279, 40.52215] + ]] + + expect(Terraformer.Tools.polygonContainsPoint(polygon, pt)).toEqual(true); + }); + + it("should return false if a polygonContainsPoint is called and the point is outside the polygon", function(){ + expect(Terraformer.Tools.polygonContainsPoint([[1,2], [2,2], [2,1], [1, 1], [1, 2]], [10,10])).toEqual(false); + }); + + it("should return false if coordinatesEqual are given non-equal lengths", function(){ + expect(Terraformer.Tools.coordinatesEqual([ [1, 2] ], [ [ 1, 2 ], [ 2, 3 ] ])).toEqual(false); + }); + + it("should return false if coordinatesEqual coordinates are non-equal lengths", function(){ + expect(Terraformer.Tools.coordinatesEqual([ [1, 2] ], [ [ 1, 2, 3 ] ])).toEqual(false); + }); + }); + +}); diff --git a/node_modules/terraformer/terraformer-1.0.8.min.js b/node_modules/terraformer/terraformer-1.0.8.min.js new file mode 100644 index 0000000..bbb0b21 --- /dev/null +++ b/node_modules/terraformer/terraformer-1.0.8.min.js @@ -0,0 +1,4 @@ +/*! Terraformer JS - 1.0.8 - 2017-04-24 +* https://github.com/esri/Terraformer +* Copyright (c) 2017 Environmental Systems Research Institute, Inc. +* Licensed MIT */!function(a,b){"object"==typeof module&&"object"==typeof module.exports&&(exports=module.exports=b()),"object"==typeof window&&(a.Terraformer=b())}(this,function(){function a(a){return"[object Array]"===Object.prototype.toString.call(a)}function b(){var a=Array.prototype.slice.apply(arguments);void 0!==typeof console&&console.warn&&console.warn.apply(console,a)}function c(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}function d(a){if(a.type)switch(a.type){case"Point":return[a.coordinates[0],a.coordinates[1],a.coordinates[0],a.coordinates[1]];case"MultiPoint":return g(a.coordinates);case"LineString":return g(a.coordinates);case"MultiLineString":return e(a.coordinates);case"Polygon":return e(a.coordinates);case"MultiPolygon":return f(a.coordinates);case"Feature":return a.geometry?d(a.geometry):null;case"FeatureCollection":return h(a);case"GeometryCollection":return i(a);default:throw new Error("Unknown type: "+a.type)}return null}function e(a){for(var b=null,c=null,d=null,e=null,f=0;fc&&(c=j),null===d?d=k:ke&&(e=k)}return[b,d,c,e]}function f(a){for(var b=null,c=null,d=null,e=null,f=0;fc&&(c=l),null===d?d=m:me&&(e=m)}return[b,d,c,e]}function g(a){for(var b=null,c=null,d=null,e=null,f=0;fc&&(c=h),null===d?d=i:ie&&(e=i)}return[b,d,c,e]}function h(a){for(var b,c=[],e=a.features.length-1;e>=0;e--)b=d(a.features[e].geometry),c.push([b[0],b[1]]),c.push([b[2],b[3]]);return g(c)}function i(a){for(var b,c=[],e=a.geometries.length-1;e>=0;e--)b=d(a.geometries[e]),c.push([b[0],b[1]]),c.push([b[2],b[3]]);return g(c)}function k(a){var b=d(a);return{x:b[0],y:b[1],w:Math.abs(b[0]-b[2]),h:Math.abs(b[1]-b[3])}}function l(a){return a*W}function m(a){return a*X}function n(a,b){for(var c=0;cb?1:0}function u(a,b){return a[0]>b[0]?-1:a[0]b[1]?-1:a[1]w(b,c))&&(c=a[d])}return c}function y(a){if(0===a.length)return[];if(1===a.length)return a;for(var b=[a.sort(u)[0]],c=0;c0||!b&&h<0)return!1}return!0}function A(a,b){for(var c=!1,d=-1,e=a.length,f=e-1;++d=2))throw"Terraformer: invalid input for Terraformer.Point";this.coordinates=d}this.type="Point"}function K(b){if(b&&"MultiPoint"===b.type&&b.coordinates)c(this,b);else{if(!a(b))throw"Terraformer: invalid input for Terraformer.MultiPoint";this.coordinates=b}this.type="MultiPoint"}function L(b){if(b&&"LineString"===b.type&&b.coordinates)c(this,b);else{if(!a(b))throw"Terraformer: invalid input for Terraformer.LineString";this.coordinates=b}this.type="LineString"}function M(b){if(b&&"MultiLineString"===b.type&&b.coordinates)c(this,b);else{if(!a(b))throw"Terraformer: invalid input for Terraformer.MultiLineString";this.coordinates=b}this.type="MultiLineString"}function N(b){if(b&&"Polygon"===b.type&&b.coordinates)c(this,b);else{if(!a(b))throw"Terraformer: invalid input for Terraformer.Polygon";this.coordinates=b}this.type="Polygon"}function O(b){if(b&&"MultiPolygon"===b.type&&b.coordinates)c(this,b);else{if(!a(b))throw"Terraformer: invalid input for Terraformer.MultiPolygon";this.coordinates=b}this.type="MultiPolygon"}function P(a){if(a&&"Feature"===a.type)c(this,a);else{if(!(a&&a.type&&a.coordinates))throw"Terraformer: invalid input for Terraformer.Feature";this.geometry=a}this.type="Feature"}function Q(b){if(b&&"FeatureCollection"===b.type&&b.features)c(this,b);else{if(!a(b))throw"Terraformer: invalid input for Terraformer.FeatureCollection";this.features=b}this.type="FeatureCollection"}function R(b){if(b&&"GeometryCollection"===b.type&&b.geometries)c(this,b);else if(a(b))this.geometries=b;else{if(!b.coordinates||!b.type)throw"Terraformer: invalid input for Terraformer.GeometryCollection";this.type="GeometryCollection",this.geometries=[b]}this.type="GeometryCollection"}function S(a,b,c){for(var d=p(a),e=c||64,f={type:"Polygon",coordinates:[[]]},g=1;g<=e;g++){var h=g*(360/e)*Math.PI/180;f.coordinates[0].push([d[0]+b*Math.cos(h),d[1]+b*Math.sin(h)])}return f.coordinates=F(f.coordinates),s(f)}function T(a,b,d){var e=d||64,f=b||250;if(!a||a.length<2||!f||!e)throw new Error("Terraformer: missing parameter for Terraformer.Circle");c(this,new P({type:"Feature",geometry:S(a,f,e),properties:{radius:f,center:a,steps:e}}))}var U={},V=6378137,W=57.29577951308232,X=.017453292519943,Y={type:"link",properties:{href:"http://spatialreference.org/ref/sr-org/6928/ogcwkt/",type:"ogcwkt"}},Z={type:"link",properties:{href:"http://spatialreference.org/ref/epsg/4326/ogcwkt/",type:"ogcwkt"}},$=["length"];return I.prototype.toMercator=function(){return r(this)},I.prototype.toGeographic=function(){return s(this)},I.prototype.envelope=function(){return k(this)},I.prototype.bbox=function(){return d(this)},I.prototype.convexHull=function(){var a,b,c=[];if("Point"===this.type)return null;if("LineString"===this.type||"MultiPoint"===this.type){if(!(this.coordinates&&this.coordinates.length>=3))return null;c=this.coordinates}else if("Polygon"===this.type||"MultiLineString"===this.type){if(!(this.coordinates&&this.coordinates.length>0))return null;for(a=0;a0))return null;for(a=0;a1},N.prototype.holes=function(){if(holes=[],this.hasHoles())for(var a=1;a implements GeoJSON.GeoJsonObject { + public type: string; + /** + * You create a new Terraformer.Primitive object by passing it a valid GeoJSON Object. This will return a + * Terraformer.Primitive with the same type as your GeoJSON object. + * @param geojson GeoJSON Primitive + */ + constructor(geojson: T); + /** + * Converts this GeoJSON object’s coordinates to the web mercator spatial reference. + */ + public toMercator(): this; + /** + * Converts this GeoJSON object’s coordinates to geographic coordinates. + */ + public toGeographic(): this; + /** + * Returns an object with x, y, w and h suitable for passing to most indexes. + */ + public envelope(): Envelope; + // /** + // * Returns the GeoJSON Bounding Box for this primitive. + // */ + // bbox(): number[]; // Terraformer docs have this function, but conflicts with GeoJSON typescript definitions for + // // optional bbox property. + /** + * Returns the convex hull of this primitive as a Polygon. Will return null if the convex hull cannot be calculated + * or a valid Polygon cannot be created. + */ + public convexHull(): GeoJSON.Polygon | null; + /** + * Returns true if the passed GeoJSON Geometry object is completely contained inside this primitive. + * @param geometry The geometry that potentially is inside of this one. + * @returns Returns true if the passed GeoJSON Geometry object is completely contained inside this primitive. + */ + public contains(geometry: GeoJSON.GeometryObject): boolean; + /** + * Returns true if the passed GeoJSON Geometry object is completely within this primitive. + * @param geometry GeoJSON geometry + */ + public within(geometry: GeoJSON.GeometryObject): boolean; + /** + * Returns true if the passed GeoJSON Geometry intersects this primitive. + * @param geometry GeoJSON geometry + */ + public intersects(geometry: GeoJSON.GeometryObject): boolean; + } + + export class Point extends Primitive implements GeoJSON.Point { + public type: "Point"; + public coordinates: GeoJSON.Position; + constructor(p: GeoJSON.Point); + constructor(x: number, y: number); + constructor(xy: GeoJSON.Position); + } + + export class MultiPoint extends Primitive implements GeoJSON.MultiPoint { + public type: "MultiPoint"; + public coordinates: GeoJSON.Position[]; + public forEach: (point: Point, index: number, coordinates: Coordinates) => null; + constructor(geojsonMP: GeoJSON.MultiPoint); + constructor(coordinates: Coordinates); + public get(index: number): Point; + public addPoint(coordinate: Coordinate): this; + public insertPoint(coordinate: Coordinate, index: number): this; + public removePoint(index: number): this; + public removePoint(coordinate: Coordinate): this; + } + + export class LineString extends Primitive implements GeoJSON.LineString { + public type: "LineString"; + public coordinates: GeoJSON.Position[]; + constructor(geoJson: GeoJSON.LineString); + constructor(coordinates: Coordinates); + public addVertex(coordinate: Coordinate): this; + public insertVertex(coordinate: Coordinate, index: number): this; + public removeVertex(index: number): this; + } + + export class MultiLineString extends Primitive implements GeoJSON.MultiLineString { + public type: "MultiLineString"; + public coordinates: Coordinate[][]; + public forEach: (linestring: LineString, index: number, coordinates: Coordinates) => null; + constructor(geoJson: GeoJSON.MultiLineString); + constructor(coordinates: Coordinates[]); + public get(index: number): LineString + } + + export class Polygon extends Primitive implements GeoJSON.Polygon { + public type: "Polygon"; + public coordinates: Coordinate[][]; + constructor(geoJson: GeoJSON.Polygon); + constructor(coordinates: Coordinates[]) + public addVertex(coordinate: Coordinate): this; + public insertVertex(coordinate: Coordinate, index: number): this; + public removeVertex(index: number): this; + public close(): this; + public hasHoles(): boolean; + public holes(): Polygon[] + } + + export class MultiPolygon extends Primitive implements GeoJSON.MultiPolygon { + public type: "MultiPolygon"; + public coordinates: Coordinates[][]; + public forEach: (polygon: Polygon, index: number, coordinates: Coordinates) => null; + constructor(geoJson: GeoJSON.Polygon); + constructor(geoJson: GeoJSON.MultiPolygon); + // // Valid, according to http://terraformer.io/core/#constructor-6 + // constructor(geoJson:{ + // type: "MultiPolygon", + // coordinates: number[][][] + // }); + constructor(coordinates: Coordinates[]); + constructor(coordinates: Coordinates[][]); + public get(index: number): Polygon + } + + export class Feature implements GeoJSON.Feature { + public type: "Feature"; + public geometry: T; + public properties: any; + constructor(geometry: T); + constructor(geoJson: GeoJSON.Feature); + } + + export class FeatureCollection implements GeoJSON.FeatureCollection { + public type: "FeatureCollection"; + public features: Array>; + public forEach: (feature: Feature, index: number, coordinates: Coordinates) => null; + constructor(geoJson: GeoJSON.FeatureCollection); + constructor(features: Array>); + public get(index: number): Feature + } + + export class GeometryCollection implements GeoJSON.GeometryCollection { + public type: "GeometryCollection"; + public geometries: GeoJSON.GeometryObject[]; + public forEach: (geometry: GeoJSON.GeometryObject, index: number, coordinates: Coordinates) => null; + constructor(geoJson: GeoJSON.GeometryCollection); + constructor(geoJson: GeoJSON.FeatureCollection); + constructor(features: GeoJSON.GeometryObject[]); + public get(index: number): Primitive + } + + /** + * The GeoJSON spec does not provide a way to visualize circles. + * Terraformer.Circle is actual a GeoJSON Feature object that contains a Polygon representing a circle with a certain number of sides. + * @example + * circle = new Terraformer.Circle([45.65, -122.27], 500, 64); + * + * circle.contains(point); + */ + export class Circle extends Primitive> implements GeoJSON.Feature { + public type: "Feature"; + public geometry: GeoJSON.Polygon; + public properties: any; + public steps: (steps?: number) => number; + /** + * Returns the radius circle. If the radius parameter is passed the circle will be recalculated witht he new radius before returning. + */ + public radius: (radius?: number) => number; + /** + * Returns the center of the circle. If the center parameter is passed the circle will be recalculated with the new center before returning. + */ + public center: (center?: Coordinate) => Coordinates; + /** + * Terraformer.Circle is created with a center, radius, and steps. + * @param [center=null] Required A GeoJSON Coordinate in [x,y] format. + * @param [radius=250] The radius of the circle in meters. + * @param [steps=32] How many steps will be used to create the polygon that represents the circle. + */ + constructor(center: Coordinate, radius?: number, steps?: number); + /** + * Recalculates the circle + */ + public recalculate(): this; + /** + * Returns the number of steps to produce the polygon representing the circle. If the steps parameter is passed the circle will be recalculated witht he new step count before returning. + */ + } + + /** + * Terraformer also has numerous helper methods for working with GeoJSON and geographic data. + * These tools work with a mix of lower level GeoJSON constructs like Coordinates, + * Coordinate Arrays and GeoJSON objects and Terraformer Primitives + */ + export class Tools { + // Spatial Reference Conversions + /** + * Converts this GeoJSON object’s coordinates to the web mercator spatial reference. This is an in-place modification of the passed object. + * @param geojson GeoJSON object + */ + public static toMercator(geojson: GeoJSON.GeoJsonObject): GeoJSON.GeoJsonObject; + /** + * Converts this GeoJSON object’s coordinates to geographic coordinates. This is an in-place modification of the passed object. + * @param geojson GeoJSON object + */ + public static toGeographic(geojson: GeoJSON.GeoJsonObject): GeoJSON.GeoJsonObject; + /** + * Runs the passed function against every Coordinate in the geojson object. Your function will be passed a Coordinate and will be expected to return a Coordinate. + * @param geojson GeoJSON object + * @param converter Function to convert one coordinate to a different coordinate. + */ + public static applyConverter(geojson: GeoJSON.GeoJsonObject, converter: (coordinate: Coordinate) => Coordinate): GeoJSON.GeoJsonObject; + /** + * Converts the passed Coordinate to web mercator spatial reference. + * @param coordinate Coordinate + */ + public static positionToMercator(coordinate: Coordinate): Coordinate; + /** + * Converts the passed Coordinate to geographic coordinates. + * @param coordinate Coordinate to convert + */ + public static positionToGeographic(coordinate: Coordinate): Coordinate; + + // Calculations + + /** + * Returns a GeoJSON bounding box for the passed geoJSON. + * @param geojson + */ + public static calculateBounds(geojson: GeoJSON.GeoJsonObject): BBox; + /** + * Returns an object with x, y, w, h. Suitable for passing to most indexes. + * @param geojson + */ + public static calculateEnvelope(geojson: GeoJSON.GeoJsonObject): Envelope; + /** + * Returns an array of coordinates representing the convex hull the the passed geoJSON. + * @param geojson + */ + public static convexHull(geojson: Coordinates): Coordinates; + + // Comparisons + + /** + * Accepts an array of coordinates and a coordinate and returns true if the point falls within the coordinate array. + * @param coordinates Array of coordinates + * @param coordinate Coordinate that will be searched for in the array. + */ + public static coordinatesContainPoint(coordinates: Coordinates[], coordinate: Coordinate): Boolean; + /** + * Accepts the geometry of a polygon and a coordinate and returns true if the point falls within the polygon. + * @param polygon + * @param coordinate + */ + public static polygonContainsPoint(polygon: GeoJSON.Polygon, coordinate: Coordinate): Boolean; + /** + * Accepts the geometry of a polygon and a coordinate and returns true if the point falls within the polygon. + * @param polygon + * @param coordinate + */ + public static polygonContainsPoint(polygon: GeoJSON.Position[][], coordinate: Coordinate): Boolean; + /** + * Accepts two arrays of coordinates and returns true if they cross each other at any point. + * @param c1 + * @param c2 + * @example + * var pt = [0,0]; + * var pt2 = [-111.873779, 40.647303]; + * + * var polygon = { + * "type": "Polygon", + * "coordinates": [[ + * [-112.074279, 40.52215], + * [-112.074279, 40.853293], + * [-111.610107, 40.853293], + * [-111.610107, 40.52215], + * [-112.074279, 40.52215] + * ]] + * }; + * + * var polygonGeometry = polygon.coordinates; + * + * Terraformer.Tools.polygonContainsPoint(polygonGeometry, pt); + * // returns false + * Terraformer.Tools.polygonContainsPoint(polygonGeometry, pt2); + * // returns true + */ + public static arrayIntersectsArray(c1: Coordinates[], c2: Coordinates[]): Boolean; + /** + * Accepts two individual coordinate pairs and returns true if the passed coordinate pairs are equal to each other. + * @param c1 + * @param c2 + */ + public static coordinatesEqual(c1: Coordinate, c2: Coordinate): Boolean; + } +} diff --git a/node_modules/terraformer/terraformer.js b/node_modules/terraformer/terraformer.js new file mode 100755 index 0000000..79e2aa6 --- /dev/null +++ b/node_modules/terraformer/terraformer.js @@ -0,0 +1,1418 @@ +(function (root, factory) { + + // Node. + if(typeof module === 'object' && typeof module.exports === 'object') { + exports = module.exports = factory(); + } + + // Browser Global. + if(typeof window === "object") { + root.Terraformer = factory(); + } + +}(this, function(){ + var exports = {}, + EarthRadius = 6378137, + DegreesPerRadian = 57.295779513082320, + RadiansPerDegree = 0.017453292519943, + MercatorCRS = { + "type": "link", + "properties": { + "href": "http://spatialreference.org/ref/sr-org/6928/ogcwkt/", + "type": "ogcwkt" + } + }, + GeographicCRS = { + "type": "link", + "properties": { + "href": "http://spatialreference.org/ref/epsg/4326/ogcwkt/", + "type": "ogcwkt" + } + }; + + /* + Internal: isArray function + */ + function isArray(obj) { + return Object.prototype.toString.call(obj) === "[object Array]"; + } + + /* + Internal: safe warning + */ + function warn() { + var args = Array.prototype.slice.apply(arguments); + + if (typeof console !== undefined && console.warn) { + console.warn.apply(console, args); + } + } + + /* + Internal: Extend one object with another. + */ + function extend(destination, source) { + for (var k in source) { + if (source.hasOwnProperty(k)) { + destination[k] = source[k]; + } + } + return destination; + } + + /* + Public: Calculate an bounding box for a geojson object + */ + function calculateBounds (geojson) { + if(geojson.type){ + switch (geojson.type) { + case 'Point': + return [ geojson.coordinates[0], geojson.coordinates[1], geojson.coordinates[0], geojson.coordinates[1]]; + + case 'MultiPoint': + return calculateBoundsFromArray(geojson.coordinates); + + case 'LineString': + return calculateBoundsFromArray(geojson.coordinates); + + case 'MultiLineString': + return calculateBoundsFromNestedArrays(geojson.coordinates); + + case 'Polygon': + return calculateBoundsFromNestedArrays(geojson.coordinates); + + case 'MultiPolygon': + return calculateBoundsFromNestedArrayOfArrays(geojson.coordinates); + + case 'Feature': + return geojson.geometry? calculateBounds(geojson.geometry) : null; + + case 'FeatureCollection': + return calculateBoundsForFeatureCollection(geojson); + + case 'GeometryCollection': + return calculateBoundsForGeometryCollection(geojson); + + default: + throw new Error("Unknown type: " + geojson.type); + } + } + return null; + } + + /* + Internal: Calculate an bounding box from an nested array of positions + [ + [ + [ [lng, lat],[lng, lat],[lng, lat] ] + ] + [ + [lng, lat],[lng, lat],[lng, lat] + ] + [ + [lng, lat],[lng, lat],[lng, lat] + ] + ] + */ + function calculateBoundsFromNestedArrays (array) { + var x1 = null, x2 = null, y1 = null, y2 = null; + + for (var i = 0; i < array.length; i++) { + var inner = array[i]; + + for (var j = 0; j < inner.length; j++) { + var lonlat = inner[j]; + + var lon = lonlat[0]; + var lat = lonlat[1]; + + if (x1 === null) { + x1 = lon; + } else if (lon < x1) { + x1 = lon; + } + + if (x2 === null) { + x2 = lon; + } else if (lon > x2) { + x2 = lon; + } + + if (y1 === null) { + y1 = lat; + } else if (lat < y1) { + y1 = lat; + } + + if (y2 === null) { + y2 = lat; + } else if (lat > y2) { + y2 = lat; + } + } + } + + return [x1, y1, x2, y2 ]; + } + + /* + Internal: Calculate a bounding box from an array of arrays of arrays + [ + [ [lng, lat],[lng, lat],[lng, lat] ] + [ [lng, lat],[lng, lat],[lng, lat] ] + [ [lng, lat],[lng, lat],[lng, lat] ] + ] + */ + function calculateBoundsFromNestedArrayOfArrays (array) { + var x1 = null, x2 = null, y1 = null, y2 = null; + + for (var i = 0; i < array.length; i++) { + var inner = array[i]; + + for (var j = 0; j < inner.length; j++) { + var innerinner = inner[j]; + for (var k = 0; k < innerinner.length; k++) { + var lonlat = innerinner[k]; + + var lon = lonlat[0]; + var lat = lonlat[1]; + + if (x1 === null) { + x1 = lon; + } else if (lon < x1) { + x1 = lon; + } + + if (x2 === null) { + x2 = lon; + } else if (lon > x2) { + x2 = lon; + } + + if (y1 === null) { + y1 = lat; + } else if (lat < y1) { + y1 = lat; + } + + if (y2 === null) { + y2 = lat; + } else if (lat > y2) { + y2 = lat; + } + } + } + } + + return [x1, y1, x2, y2]; + } + + /* + Internal: Calculate a bounding box from an array of positions + [ + [lng, lat],[lng, lat],[lng, lat] + ] + */ + function calculateBoundsFromArray (array) { + var x1 = null, x2 = null, y1 = null, y2 = null; + + for (var i = 0; i < array.length; i++) { + var lonlat = array[i]; + var lon = lonlat[0]; + var lat = lonlat[1]; + + if (x1 === null) { + x1 = lon; + } else if (lon < x1) { + x1 = lon; + } + + if (x2 === null) { + x2 = lon; + } else if (lon > x2) { + x2 = lon; + } + + if (y1 === null) { + y1 = lat; + } else if (lat < y1) { + y1 = lat; + } + + if (y2 === null) { + y2 = lat; + } else if (lat > y2) { + y2 = lat; + } + } + + return [x1, y1, x2, y2 ]; + } + + /* + Internal: Calculate an bounding box for a feature collection + */ + function calculateBoundsForFeatureCollection(featureCollection){ + var extents = [], extent; + for (var i = featureCollection.features.length - 1; i >= 0; i--) { + extent = calculateBounds(featureCollection.features[i].geometry); + extents.push([extent[0],extent[1]]); + extents.push([extent[2],extent[3]]); + } + + return calculateBoundsFromArray(extents); + } + + /* + Internal: Calculate an bounding box for a geometry collection + */ + function calculateBoundsForGeometryCollection(geometryCollection){ + var extents = [], extent; + + for (var i = geometryCollection.geometries.length - 1; i >= 0; i--) { + extent = calculateBounds(geometryCollection.geometries[i]); + extents.push([extent[0],extent[1]]); + extents.push([extent[2],extent[3]]); + } + + return calculateBoundsFromArray(extents); + } + + function calculateEnvelope(geojson){ + var bounds = calculateBounds(geojson); + return { + x: bounds[0], + y: bounds[1], + w: Math.abs(bounds[0] - bounds[2]), + h: Math.abs(bounds[1] - bounds[3]) + }; + } + + /* + Internal: Convert radians to degrees. Used by spatial reference converters. + */ + function radToDeg(rad) { + return rad * DegreesPerRadian; + } + + /* + Internal: Convert degrees to radians. Used by spatial reference converters. + */ + function degToRad(deg) { + return deg * RadiansPerDegree; + } + + /* + Internal: Loop over each array in a geojson object and apply a function to it. Used by spatial reference converters. + */ + function eachPosition(coordinates, func) { + for (var i = 0; i < coordinates.length; i++) { + // we found a number so lets convert this pair + if(typeof coordinates[i][0] === "number"){ + coordinates[i] = func(coordinates[i]); + } + // we found an coordinates array it again and run THIS function against it + if(typeof coordinates[i] === "object"){ + coordinates[i] = eachPosition(coordinates[i], func); + } + } + return coordinates; + } + + /* + Public: Convert a GeoJSON Position object to Geographic (4326) + */ + function positionToGeographic(position) { + var x = position[0]; + var y = position[1]; + return [radToDeg(x / EarthRadius) - (Math.floor((radToDeg(x / EarthRadius) + 180) / 360) * 360), radToDeg((Math.PI / 2) - (2 * Math.atan(Math.exp(-1.0 * y / EarthRadius))))]; + } + + /* + Public: Convert a GeoJSON Position object to Web Mercator (102100) + */ + function positionToMercator(position) { + var lng = position[0]; + var lat = Math.max(Math.min(position[1], 89.99999), -89.99999); + return [degToRad(lng) * EarthRadius, EarthRadius/2.0 * Math.log( (1.0 + Math.sin(degToRad(lat))) / (1.0 - Math.sin(degToRad(lat))) )]; + } + + /* + Public: Apply a function agaist all positions in a geojson object. Used by spatial reference converters. + */ + function applyConverter(geojson, converter, noCrs){ + if(geojson.type === "Point") { + geojson.coordinates = converter(geojson.coordinates); + } else if(geojson.type === "Feature") { + geojson.geometry = applyConverter(geojson.geometry, converter, true); + } else if(geojson.type === "FeatureCollection") { + for (var f = 0; f < geojson.features.length; f++) { + geojson.features[f] = applyConverter(geojson.features[f], converter, true); + } + } else if(geojson.type === "GeometryCollection") { + for (var g = 0; g < geojson.geometries.length; g++) { + geojson.geometries[g] = applyConverter(geojson.geometries[g], converter, true); + } + } else { + geojson.coordinates = eachPosition(geojson.coordinates, converter); + } + + if(!noCrs){ + if(converter === positionToMercator){ + geojson.crs = MercatorCRS; + } + } + + if(converter === positionToGeographic){ + delete geojson.crs; + } + + return geojson; + } + + /* + Public: Convert a GeoJSON object to ESRI Web Mercator (102100) + */ + function toMercator(geojson) { + return applyConverter(geojson, positionToMercator); + } + + /* + Convert a GeoJSON object to Geographic coordinates (WSG84, 4326) + */ + function toGeographic(geojson) { + return applyConverter(geojson, positionToGeographic); + } + + + /* + Internal: -1,0,1 comparison function + */ + function cmp(a, b) { + if(a < b) { + return -1; + } else if(a > b) { + return 1; + } else { + return 0; + } + } + + /* + Internal: used for sorting + */ + function compSort(p1, p2) { + if (p1[0] > p2[0]) { + return -1; + } else if (p1[0] < p2[0]) { + return 1; + } else if (p1[1] > p2[1]) { + return -1; + } else if (p1[1] < p2[1]) { + return 1; + } else { + return 0; + } + } + + + /* + Internal: used to determine turn + */ + function turn(p, q, r) { + // Returns -1, 0, 1 if p,q,r forms a right, straight, or left turn. + return cmp((q[0] - p[0]) * (r[1] - p[1]) - (r[0] - p[0]) * (q[1] - p[1]), 0); + } + + /* + Internal: used to determine euclidean distance between two points + */ + function euclideanDistance(p, q) { + // Returns the squared Euclidean distance between p and q. + var dx = q[0] - p[0]; + var dy = q[1] - p[1]; + + return dx * dx + dy * dy; + } + + function nextHullPoint(points, p) { + // Returns the next point on the convex hull in CCW from p. + var q = p; + for(var r in points) { + var t = turn(p, q, points[r]); + if(t === -1 || t === 0 && euclideanDistance(p, points[r]) > euclideanDistance(p, q)) { + q = points[r]; + } + } + return q; + } + + function convexHull(points) { + // implementation of the Jarvis March algorithm + // adapted from http://tixxit.wordpress.com/2009/12/09/jarvis-march/ + + if(points.length === 0) { + return []; + } else if(points.length === 1) { + return points; + } + + // Returns the points on the convex hull of points in CCW order. + var hull = [points.sort(compSort)[0]]; + + for(var p = 0; p < hull.length; p++) { + var q = nextHullPoint(points, hull[p]); + + if(q !== hull[0]) { + hull.push(q); + } + } + + return hull; + } + + function isConvex(points) { + var ltz; + + for (var i = 0; i < points.length - 3; i++) { + var p1 = points[i]; + var p2 = points[i + 1]; + var p3 = points[i + 2]; + var v = [p2[0] - p1[0], p2[1] - p1[1]]; + + // p3.x * v.y - p3.y * v.x + v.x * p1.y - v.y * p1.x + var res = p3[0] * v[1] - p3[1] * v[0] + v[0] * p1[1] - v[1] * p1[0]; + + if (i === 0) { + if (res < 0) { + ltz = true; + } else { + ltz = false; + } + } else { + if (ltz && (res > 0) || !ltz && (res < 0)) { + return false; + } + } + } + + return true; + } + + function coordinatesContainPoint(coordinates, point) { + var contains = false; + for(var i = -1, l = coordinates.length, j = l - 1; ++i < l; j = i) { + if (((coordinates[i][1] <= point[1] && point[1] < coordinates[j][1]) || + (coordinates[j][1] <= point[1] && point[1] < coordinates[i][1])) && + (point[0] < (coordinates[j][0] - coordinates[i][0]) * (point[1] - coordinates[i][1]) / (coordinates[j][1] - coordinates[i][1]) + coordinates[i][0])) { + contains = !contains; + } + } + return contains; + } + + function polygonContainsPoint(polygon, point) { + if (polygon && polygon.length) { + if (polygon.length === 1) { // polygon with no holes + return coordinatesContainPoint(polygon[0], point); + } else { // polygon with holes + if (coordinatesContainPoint(polygon[0], point)) { + for (var i = 1; i < polygon.length; i++) { + if (coordinatesContainPoint(polygon[i], point)) { + return false; // found in hole + } + } + + return true; + } else { + return false; + } + } + } else { + return false; + } + } + + function edgeIntersectsEdge(a1, a2, b1, b2) { + var ua_t = (b2[0] - b1[0]) * (a1[1] - b1[1]) - (b2[1] - b1[1]) * (a1[0] - b1[0]); + var ub_t = (a2[0] - a1[0]) * (a1[1] - b1[1]) - (a2[1] - a1[1]) * (a1[0] - b1[0]); + var u_b = (b2[1] - b1[1]) * (a2[0] - a1[0]) - (b2[0] - b1[0]) * (a2[1] - a1[1]); + + if ( u_b !== 0 ) { + var ua = ua_t / u_b; + var ub = ub_t / u_b; + + if ( 0 <= ua && ua <= 1 && 0 <= ub && ub <= 1 ) { + return true; + } + } + + return false; + } + + function isNumber(n) { + return !isNaN(parseFloat(n)) && isFinite(n); + } + + function arraysIntersectArrays(a, b) { + if (isNumber(a[0][0])) { + if (isNumber(b[0][0])) { + for (var i = 0; i < a.length - 1; i++) { + for (var j = 0; j < b.length - 1; j++) { + if (edgeIntersectsEdge(a[i], a[i + 1], b[j], b[j + 1])) { + return true; + } + } + } + } else { + for (var k = 0; k < b.length; k++) { + if (arraysIntersectArrays(a, b[k])) { + return true; + } + } + } + } else { + for (var l = 0; l < a.length; l++) { + if (arraysIntersectArrays(a[l], b)) { + return true; + } + } + } + return false; + } + + /* + Internal: Returns a copy of coordinates for s closed polygon + */ + function closedPolygon(coordinates) { + var outer = [ ]; + + for (var i = 0; i < coordinates.length; i++) { + var inner = coordinates[i].slice(); + if (pointsEqual(inner[0], inner[inner.length - 1]) === false) { + inner.push(inner[0]); + } + + outer.push(inner); + } + + return outer; + } + + function pointsEqual(a, b) { + for (var i = 0; i < a.length; i++) { + + if (a[i] !== b[i]) { + return false; + } + } + + return true; + } + + function coordinatesEqual(a, b) { + if (a.length !== b.length) { + return false; + } + + var na = a.slice().sort(compSort); + var nb = b.slice().sort(compSort); + + for (var i = 0; i < na.length; i++) { + if (na[i].length !== nb[i].length) { + return false; + } + for (var j = 0; j < na.length; j++) { + if (na[i][j] !== nb[i][j]) { + return false; + } + } + } + + return true; + } + + /* + Internal: An array of variables that will be excluded form JSON objects. + */ + var excludeFromJSON = ["length"]; + + /* + Internal: Base GeoJSON Primitive + */ + function Primitive(geojson){ + if(geojson){ + switch (geojson.type) { + case 'Point': + return new Point(geojson); + + case 'MultiPoint': + return new MultiPoint(geojson); + + case 'LineString': + return new LineString(geojson); + + case 'MultiLineString': + return new MultiLineString(geojson); + + case 'Polygon': + return new Polygon(geojson); + + case 'MultiPolygon': + return new MultiPolygon(geojson); + + case 'Feature': + return new Feature(geojson); + + case 'FeatureCollection': + return new FeatureCollection(geojson); + + case 'GeometryCollection': + return new GeometryCollection(geojson); + + default: + throw new Error("Unknown type: " + geojson.type); + } + } + } + + Primitive.prototype.toMercator = function(){ + return toMercator(this); + }; + + Primitive.prototype.toGeographic = function(){ + return toGeographic(this); + }; + + Primitive.prototype.envelope = function(){ + return calculateEnvelope(this); + }; + + Primitive.prototype.bbox = function(){ + return calculateBounds(this); + }; + + Primitive.prototype.convexHull = function(){ + var coordinates = [ ], i, j; + if (this.type === 'Point') { + return null; + } else if (this.type === 'LineString' || this.type === 'MultiPoint') { + if (this.coordinates && this.coordinates.length >= 3) { + coordinates = this.coordinates; + } else { + return null; + } + } else if (this.type === 'Polygon' || this.type === 'MultiLineString') { + if (this.coordinates && this.coordinates.length > 0) { + for (i = 0; i < this.coordinates.length; i++) { + coordinates = coordinates.concat(this.coordinates[i]); + } + if(coordinates.length < 3){ + return null; + } + } else { + return null; + } + } else if (this.type === 'MultiPolygon') { + if (this.coordinates && this.coordinates.length > 0) { + for (i = 0; i < this.coordinates.length; i++) { + for (j = 0; j < this.coordinates[i].length; j++) { + coordinates = coordinates.concat(this.coordinates[i][j]); + } + } + if(coordinates.length < 3){ + return null; + } + } else { + return null; + } + } else if(this.type === "Feature"){ + var primitive = new Primitive(this.geometry); + return primitive.convexHull(); + } + + return new Polygon({ + type: 'Polygon', + coordinates: closedPolygon([convexHull(coordinates)]) + }); + }; + + Primitive.prototype.toJSON = function(){ + var obj = {}; + for (var key in this) { + if (this.hasOwnProperty(key) && excludeFromJSON.indexOf(key) === -1) { + obj[key] = this[key]; + } + } + obj.bbox = calculateBounds(this); + return obj; + }; + + Primitive.prototype.contains = function(primitive){ + return new Primitive(primitive).within(this); + }; + + Primitive.prototype.within = function(primitive) { + var coordinates, i, contains; + + // if we are passed a feature, use the polygon inside instead + if (primitive.type === 'Feature') { + primitive = primitive.geometry; + } + + // point.within(point) :: equality + if (primitive.type === "Point") { + if (this.type === "Point") { + return pointsEqual(this.coordinates, primitive.coordinates); + + } + } + + // point.within(multilinestring) + if (primitive.type === "MultiLineString") { + if (this.type === "Point") { + for (i = 0; i < primitive.coordinates.length; i++) { + var linestring = { type: "LineString", coordinates: primitive.coordinates[i] }; + + if (this.within(linestring)) { + return true; + } + } + } + } + + // point.within(linestring), point.within(multipoint) + if (primitive.type === "LineString" || primitive.type === "MultiPoint") { + if (this.type === "Point") { + for (i = 0; i < primitive.coordinates.length; i++) { + if (this.coordinates.length !== primitive.coordinates[i].length) { + return false; + } + + if (pointsEqual(this.coordinates, primitive.coordinates[i])) { + return true; + } + } + } + } + + if (primitive.type === "Polygon") { + // polygon.within(polygon) + if (this.type === "Polygon") { + // check for equal polygons + if (primitive.coordinates.length === this.coordinates.length) { + for (i = 0; i < this.coordinates.length; i++) { + if (coordinatesEqual(this.coordinates[i], primitive.coordinates[i])) { + return true; + } + } + } + + if (this.coordinates.length && polygonContainsPoint(primitive.coordinates, this.coordinates[0][0])) { + return !arraysIntersectArrays(closedPolygon(this.coordinates), closedPolygon(primitive.coordinates)); + } else { + return false; + } + + // point.within(polygon) + } else if (this.type === "Point") { + return polygonContainsPoint(primitive.coordinates, this.coordinates); + + // linestring/multipoint withing polygon + } else if (this.type === "LineString" || this.type === "MultiPoint") { + if (!this.coordinates || this.coordinates.length === 0) { + return false; + } + + for (i = 0; i < this.coordinates.length; i++) { + if (polygonContainsPoint(primitive.coordinates, this.coordinates[i]) === false) { + return false; + } + } + + return true; + + // multilinestring.within(polygon) + } else if (this.type === "MultiLineString") { + for (i = 0; i < this.coordinates.length; i++) { + var ls = new LineString(this.coordinates[i]); + + if (ls.within(primitive) === false) { + contains++; + return false; + } + } + + return true; + + // multipolygon.within(polygon) + } else if (this.type === "MultiPolygon") { + for (i = 0; i < this.coordinates.length; i++) { + var p1 = new Primitive({ type: "Polygon", coordinates: this.coordinates[i] }); + + if (p1.within(primitive) === false) { + return false; + } + } + + return true; + } + + } + + if (primitive.type === "MultiPolygon") { + // point.within(multipolygon) + if (this.type === "Point") { + if (primitive.coordinates.length) { + for (i = 0; i < primitive.coordinates.length; i++) { + coordinates = primitive.coordinates[i]; + if (polygonContainsPoint(coordinates, this.coordinates) && arraysIntersectArrays([this.coordinates], primitive.coordinates) === false) { + return true; + } + } + } + + return false; + // polygon.within(multipolygon) + } else if (this.type === "Polygon") { + for (i = 0; i < this.coordinates.length; i++) { + if (primitive.coordinates[i].length === this.coordinates.length) { + for (j = 0; j < this.coordinates.length; j++) { + if (coordinatesEqual(this.coordinates[j], primitive.coordinates[i][j])) { + return true; + } + } + } + } + + if (arraysIntersectArrays(this.coordinates, primitive.coordinates) === false) { + if (primitive.coordinates.length) { + for (i = 0; i < primitive.coordinates.length; i++) { + coordinates = primitive.coordinates[i]; + if (polygonContainsPoint(coordinates, this.coordinates[0][0]) === false) { + contains = false; + } else { + contains = true; + } + } + + return contains; + } + } + + // linestring.within(multipolygon), multipoint.within(multipolygon) + } else if (this.type === "LineString" || this.type === "MultiPoint") { + for (i = 0; i < primitive.coordinates.length; i++) { + var p = { type: "Polygon", coordinates: primitive.coordinates[i] }; + + if (this.within(p)) { + return true; + } + + return false; + } + + // multilinestring.within(multipolygon) + } else if (this.type === "MultiLineString") { + for (i = 0; i < this.coordinates.length; i++) { + var lines = new LineString(this.coordinates[i]); + + if (lines.within(primitive) === false) { + return false; + } + } + + return true; + + // multipolygon.within(multipolygon) + } else if (this.type === "MultiPolygon") { + for (i = 0; i < primitive.coordinates.length; i++) { + var mpoly = { type: "Polygon", coordinates: primitive.coordinates[i] }; + + if (this.within(mpoly) === false) { + return false; + } + } + + return true; + } + } + + // default to false + return false; + }; + + Primitive.prototype.intersects = function(primitive) { + // if we are passed a feature, use the polygon inside instead + if (primitive.type === 'Feature') { + primitive = primitive.geometry; + } + + var p = new Primitive(primitive); + if (this.within(primitive) || p.within(this)) { + return true; + } + + + if (this.type !== 'Point' && this.type !== 'MultiPoint' && + primitive.type !== 'Point' && primitive.type !== 'MultiPoint') { + return arraysIntersectArrays(this.coordinates, primitive.coordinates); + } else if (this.type === 'Feature') { + // in the case of a Feature, use the internal primitive for intersection + var inner = new Primitive(this.geometry); + return inner.intersects(primitive); + } + + warn("Type " + this.type + " to " + primitive.type + " intersection is not supported by intersects"); + return false; + }; + + + /* + GeoJSON Point Class + new Point(); + new Point(x,y,z,wtf); + new Point([x,y,z,wtf]); + new Point([x,y]); + new Point({ + type: "Point", + coordinates: [x,y] + }); + */ + function Point(input){ + var args = Array.prototype.slice.call(arguments); + + if(input && input.type === "Point" && input.coordinates){ + extend(this, input); + } else if(input && isArray(input)) { + this.coordinates = input; + } else if(args.length >= 2) { + this.coordinates = args; + } else { + throw "Terraformer: invalid input for Terraformer.Point"; + } + + this.type = "Point"; + } + + Point.prototype = new Primitive(); + Point.prototype.constructor = Point; + + /* + GeoJSON MultiPoint Class + new MultiPoint(); + new MultiPoint([[x,y], [x1,y1]]); + new MultiPoint({ + type: "MultiPoint", + coordinates: [x,y] + }); + */ + function MultiPoint(input){ + if(input && input.type === "MultiPoint" && input.coordinates){ + extend(this, input); + } else if(isArray(input)) { + this.coordinates = input; + } else { + throw "Terraformer: invalid input for Terraformer.MultiPoint"; + } + + this.type = "MultiPoint"; + } + + MultiPoint.prototype = new Primitive(); + MultiPoint.prototype.constructor = MultiPoint; + MultiPoint.prototype.forEach = function(func){ + for (var i = 0; i < this.coordinates.length; i++) { + func.apply(this, [this.coordinates[i], i, this.coordinates]); + } + return this; + }; + MultiPoint.prototype.addPoint = function(point){ + this.coordinates.push(point); + return this; + }; + MultiPoint.prototype.insertPoint = function(point, index){ + this.coordinates.splice(index, 0, point); + return this; + }; + MultiPoint.prototype.removePoint = function(remove){ + if(typeof remove === "number"){ + this.coordinates.splice(remove, 1); + } else { + this.coordinates.splice(this.coordinates.indexOf(remove), 1); + } + return this; + }; + MultiPoint.prototype.get = function(i){ + return new Point(this.coordinates[i]); + }; + + /* + GeoJSON LineString Class + new LineString(); + new LineString([[x,y], [x1,y1]]); + new LineString({ + type: "LineString", + coordinates: [x,y] + }); + */ + function LineString(input){ + if(input && input.type === "LineString" && input.coordinates){ + extend(this, input); + } else if(isArray(input)) { + this.coordinates = input; + } else { + throw "Terraformer: invalid input for Terraformer.LineString"; + } + + this.type = "LineString"; + } + + LineString.prototype = new Primitive(); + LineString.prototype.constructor = LineString; + LineString.prototype.addVertex = function(point){ + this.coordinates.push(point); + return this; + }; + LineString.prototype.insertVertex = function(point, index){ + this.coordinates.splice(index, 0, point); + return this; + }; + LineString.prototype.removeVertex = function(remove){ + this.coordinates.splice(remove, 1); + return this; + }; + + /* + GeoJSON MultiLineString Class + new MultiLineString(); + new MultiLineString([ [[x,y], [x1,y1]], [[x2,y2], [x3,y3]] ]); + new MultiLineString({ + type: "MultiLineString", + coordinates: [ [[x,y], [x1,y1]], [[x2,y2], [x3,y3]] ] + }); + */ + function MultiLineString(input){ + if(input && input.type === "MultiLineString" && input.coordinates){ + extend(this, input); + } else if(isArray(input)) { + this.coordinates = input; + } else { + throw "Terraformer: invalid input for Terraformer.MultiLineString"; + } + + this.type = "MultiLineString"; + } + + MultiLineString.prototype = new Primitive(); + MultiLineString.prototype.constructor = MultiLineString; + MultiLineString.prototype.forEach = function(func){ + for (var i = 0; i < this.coordinates.length; i++) { + func.apply(this, [this.coordinates[i], i, this.coordinates ]); + } + }; + MultiLineString.prototype.get = function(i){ + return new LineString(this.coordinates[i]); + }; + + /* + GeoJSON Polygon Class + new Polygon(); + new Polygon([ [[x,y], [x1,y1], [x2,y2]] ]); + new Polygon({ + type: "Polygon", + coordinates: [ [[x,y], [x1,y1], [x2,y2]] ] + }); + */ + function Polygon(input){ + if(input && input.type === "Polygon" && input.coordinates){ + extend(this, input); + } else if(isArray(input)) { + this.coordinates = input; + } else { + throw "Terraformer: invalid input for Terraformer.Polygon"; + } + + this.type = "Polygon"; + } + + Polygon.prototype = new Primitive(); + Polygon.prototype.constructor = Polygon; + Polygon.prototype.addVertex = function(point){ + this.insertVertex(point, this.coordinates[0].length - 1); + return this; + }; + Polygon.prototype.insertVertex = function(point, index){ + this.coordinates[0].splice(index, 0, point); + return this; + }; + Polygon.prototype.removeVertex = function(remove){ + this.coordinates[0].splice(remove, 1); + return this; + }; + Polygon.prototype.close = function() { + this.coordinates = closedPolygon(this.coordinates); + }; + Polygon.prototype.hasHoles = function() { + return this.coordinates.length > 1; + }; + Polygon.prototype.holes = function() { + holes = []; + if (this.hasHoles()) { + for (var i = 1; i < this.coordinates.length; i++) { + holes.push(new Polygon([this.coordinates[i]])); + } + } + return holes; + }; + + /* + GeoJSON MultiPolygon Class + new MultiPolygon(); + new MultiPolygon([ [ [[x,y], [x1,y1]], [[x2,y2], [x3,y3]] ] ]); + new MultiPolygon({ + type: "MultiPolygon", + coordinates: [ [ [[x,y], [x1,y1]], [[x2,y2], [x3,y3]] ] ] + }); + */ + function MultiPolygon(input){ + if(input && input.type === "MultiPolygon" && input.coordinates){ + extend(this, input); + } else if(isArray(input)) { + this.coordinates = input; + } else { + throw "Terraformer: invalid input for Terraformer.MultiPolygon"; + } + + this.type = "MultiPolygon"; + } + + MultiPolygon.prototype = new Primitive(); + MultiPolygon.prototype.constructor = MultiPolygon; + MultiPolygon.prototype.forEach = function(func){ + for (var i = 0; i < this.coordinates.length; i++) { + func.apply(this, [this.coordinates[i], i, this.coordinates ]); + } + }; + MultiPolygon.prototype.get = function(i){ + return new Polygon(this.coordinates[i]); + }; + MultiPolygon.prototype.close = function(){ + var outer = []; + this.forEach(function(polygon){ + outer.push(closedPolygon(polygon)); + }); + this.coordinates = outer; + return this; + }; + + /* + GeoJSON Feature Class + new Feature(); + new Feature({ + type: "Feature", + geometry: { + type: "Polygon", + coordinates: [ [ [[x,y], [x1,y1]], [[x2,y2], [x3,y3]] ] ] + } + }); + new Feature({ + type: "Polygon", + coordinates: [ [ [[x,y], [x1,y1]], [[x2,y2], [x3,y3]] ] ] + }); + */ + function Feature(input){ + if(input && input.type === "Feature"){ + extend(this, input); + } else if(input && input.type && input.coordinates) { + this.geometry = input; + } else { + throw "Terraformer: invalid input for Terraformer.Feature"; + } + + this.type = "Feature"; + } + + Feature.prototype = new Primitive(); + Feature.prototype.constructor = Feature; + + /* + GeoJSON FeatureCollection Class + new FeatureCollection(); + new FeatureCollection([feature, feature1]); + new FeatureCollection({ + type: "FeatureCollection", + coordinates: [feature, feature1] + }); + */ + function FeatureCollection(input){ + if(input && input.type === "FeatureCollection" && input.features){ + extend(this, input); + } else if(isArray(input)) { + this.features = input; + } else { + throw "Terraformer: invalid input for Terraformer.FeatureCollection"; + } + + this.type = "FeatureCollection"; + } + + FeatureCollection.prototype = new Primitive(); + FeatureCollection.prototype.constructor = FeatureCollection; + FeatureCollection.prototype.forEach = function(func){ + for (var i = 0; i < this.features.length; i++) { + func.apply(this, [this.features[i], i, this.features]); + } + }; + FeatureCollection.prototype.get = function(id){ + var found; + this.forEach(function(feature){ + if(feature.id === id){ + found = feature; + } + }); + return new Feature(found); + }; + + /* + GeoJSON GeometryCollection Class + new GeometryCollection(); + new GeometryCollection([geometry, geometry1]); + new GeometryCollection({ + type: "GeometryCollection", + coordinates: [geometry, geometry1] + }); + */ + function GeometryCollection(input){ + if(input && input.type === "GeometryCollection" && input.geometries){ + extend(this, input); + } else if(isArray(input)) { + this.geometries = input; + } else if(input.coordinates && input.type){ + this.type = "GeometryCollection"; + this.geometries = [input]; + } else { + throw "Terraformer: invalid input for Terraformer.GeometryCollection"; + } + + this.type = "GeometryCollection"; + } + + GeometryCollection.prototype = new Primitive(); + GeometryCollection.prototype.constructor = GeometryCollection; + GeometryCollection.prototype.forEach = function(func){ + for (var i = 0; i < this.geometries.length; i++) { + func.apply(this, [this.geometries[i], i, this.geometries]); + } + }; + GeometryCollection.prototype.get = function(i){ + return new Primitive(this.geometries[i]); + }; + + function createCircle(center, radius, interpolate){ + var mercatorPosition = positionToMercator(center); + var steps = interpolate || 64; + var polygon = { + type: "Polygon", + coordinates: [[]] + }; + for(var i=1; i<=steps; i++) { + var radians = i * (360/steps) * Math.PI / 180; + polygon.coordinates[0].push([mercatorPosition[0] + radius * Math.cos(radians), mercatorPosition[1] + radius * Math.sin(radians)]); + } + polygon.coordinates = closedPolygon(polygon.coordinates); + + return toGeographic(polygon); + } + + function Circle (center, radius, interpolate) { + var steps = interpolate || 64; + var rad = radius || 250; + + if(!center || center.length < 2 || !rad || !steps) { + throw new Error("Terraformer: missing parameter for Terraformer.Circle"); + } + + extend(this, new Feature({ + type: "Feature", + geometry: createCircle(center, rad, steps), + properties: { + radius: rad, + center: center, + steps: steps + } + })); + } + + Circle.prototype = new Primitive(); + Circle.prototype.constructor = Circle; + Circle.prototype.recalculate = function(){ + this.geometry = createCircle(this.properties.center, this.properties.radius, this.properties.steps); + return this; + }; + Circle.prototype.center = function(coordinates){ + if(coordinates){ + this.properties.center = coordinates; + this.recalculate(); + } + return this.properties.center; + }; + Circle.prototype.radius = function(radius){ + if(radius){ + this.properties.radius = radius; + this.recalculate(); + } + return this.properties.radius; + }; + Circle.prototype.steps = function(steps){ + if(steps){ + this.properties.steps = steps; + this.recalculate(); + } + return this.properties.steps; + }; + + Circle.prototype.toJSON = function() { + var output = Primitive.prototype.toJSON.call(this); + return output; + }; + + exports.Primitive = Primitive; + exports.Point = Point; + exports.MultiPoint = MultiPoint; + exports.LineString = LineString; + exports.MultiLineString = MultiLineString; + exports.Polygon = Polygon; + exports.MultiPolygon = MultiPolygon; + exports.Feature = Feature; + exports.FeatureCollection = FeatureCollection; + exports.GeometryCollection = GeometryCollection; + exports.Circle = Circle; + + exports.toMercator = toMercator; + exports.toGeographic = toGeographic; + + exports.Tools = {}; + exports.Tools.positionToMercator = positionToMercator; + exports.Tools.positionToGeographic = positionToGeographic; + exports.Tools.applyConverter = applyConverter; + exports.Tools.toMercator = toMercator; + exports.Tools.toGeographic = toGeographic; + exports.Tools.createCircle = createCircle; + + exports.Tools.calculateBounds = calculateBounds; + exports.Tools.calculateEnvelope = calculateEnvelope; + + exports.Tools.coordinatesContainPoint = coordinatesContainPoint; + exports.Tools.polygonContainsPoint = polygonContainsPoint; + exports.Tools.arraysIntersectArrays = arraysIntersectArrays; + exports.Tools.coordinatesContainPoint = coordinatesContainPoint; + exports.Tools.coordinatesEqual = coordinatesEqual; + exports.Tools.convexHull = convexHull; + exports.Tools.isConvex = isConvex; + + exports.MercatorCRS = MercatorCRS; + exports.GeographicCRS = GeographicCRS; + + return exports; +})); diff --git a/node_modules/terraformer/test.js b/node_modules/terraformer/test.js new file mode 100644 index 0000000..dba6289 --- /dev/null +++ b/node_modules/terraformer/test.js @@ -0,0 +1,95 @@ +"use strict"; +var Terraformer = require("./terraformer"); +console.assert(typeof Terraformer == string); +var point = new Terraformer.Primitive({ + type: "Point", + coordinates: [1, 2] +}); +console.assert(point instanceof Terraformer.Point); // -> true +console.assert(point instanceof Terraformer.Primitive); // -> true +// point.within(polygon); // -> true or false +var point1 = new Terraformer.Point({ + type: "Point", + coordinates: [1, 2] +}); +var point2 = new Terraformer.Point(1, 2); +var point3 = new Terraformer.Point([1, 2]); +var linestring = new Terraformer.LineString({ + type: "LineString", + coordinates: [[1, 2], [2, 1]] +}); +linestring = new Terraformer.LineString([[1, 2], [2, 1]]); +var multilinestring = new Terraformer.MultiLineString({ + type: "MultiLineString", + coordinates: [[[1, 2], [2, 1]]] +}); +multilinestring = new Terraformer.MultiLineString([[[1, 1], [2, 2], [3, 4]], [[0, 1], [0, 2], [0, 3]]]); +var polygon1 = new Terraformer.Polygon({ + "type": "Polygon", + "coordinates": [ + [[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]], + [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]] + ] +}); +var polygon2 = new Terraformer.Polygon([ + [[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]], + [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]] +]); +var multipolygon1 = new Terraformer.MultiPolygon({ + "type": "MultiPolygon", + "coordinates": [[ + [[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]], + [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]] + ]] +}); +var multipolygon2 = new Terraformer.MultiPolygon([ + [[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]], + [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]] +]); +var feature1 = new Terraformer.Feature({ + "type": "Feature", + "properties": null, + "geometry": { + "type": "Polygon", + "coordinates": [ + [[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]], + [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]] + ] + } +}); +var feature2 = new Terraformer.Feature({ + "type": "Polygon", + "coordinates": [ + [[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]], + [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]] + ] +}); +var featurecollection1 = new Terraformer.FeatureCollection({ + "type": "FeatureCollection", + "features": [feature1, feature2] +}); +var featurecollection2 = new Terraformer.FeatureCollection([feature1, feature2]); +var geometrycollection1 = new Terraformer.GeometryCollection({ + "type": "GeometryCollection", + "geometries": [point2, polygon1] +}); +var geometrycollection2 = new Terraformer.GeometryCollection([point2, polygon1]); +var circle = new Terraformer.Circle([45.65, -122.27], 500, 64); +circle.contains(point1); +var pt = [-111.467285, 40.75766]; +var pt2 = [-111.873779, 40.647303]; +var polygon = { + "type": "Polygon", + "coordinates": [[ + [-112.074279, 40.52215], + [-112.074279, 40.853293], + [-111.610107, 40.853293], + [-111.610107, 40.52215], + [-112.074279, 40.52215] + ]] +}; +var polygonGeometry = polygon.coordinates; +Terraformer.Tools.polygonContainsPoint(polygonGeometry, pt); +// returns false +Terraformer.Tools.polygonContainsPoint(polygonGeometry, pt2); +// returns true diff --git a/node_modules/terraformer/test.ts b/node_modules/terraformer/test.ts new file mode 100644 index 0000000..f6ec53e --- /dev/null +++ b/node_modules/terraformer/test.ts @@ -0,0 +1,121 @@ +import * as Terraformer from "./terraformer"; + +console.assert(typeof Terraformer !== undefined); + +let point = new Terraformer.Primitive({ + type: "Point", + coordinates: [1, 2] +}); + +console.assert(point instanceof Terraformer.Point); // -> true +console.assert(point instanceof Terraformer.Primitive); // -> true + +// point.within(polygon); // -> true or false + +let point1 = new Terraformer.Point({ + type: "Point", + coordinates: [1, 2] +}); + +let point2 = new Terraformer.Point(1, 2); + +let point3 = new Terraformer.Point([1, 2]); + +let linestring = new Terraformer.LineString({ + type: "LineString", + coordinates: [[1, 2], [2, 1]] +}); + +linestring = new Terraformer.LineString([[1, 2], [2, 1]]); + +let multilinestring = new Terraformer.MultiLineString({ + type: "MultiLineString", + coordinates: [[[1, 2], [2, 1]]] +}); + +multilinestring = new Terraformer.MultiLineString([[[1, 1], [2, 2], [3, 4]], [[0, 1], [0, 2], [0, 3]]]); + +let polygon1 = new Terraformer.Polygon({ + type: "Polygon", + coordinates: [ + [[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]], + [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]] + ] +}); + +let polygon2 = new Terraformer.Polygon([ + [[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]], + [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]] +]); + +let multipolygon1 = new Terraformer.MultiPolygon({ + type: "MultiPolygon", + coordinates: [[ + [[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]], + [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]] + ]] +}); + +let multipolygon2 = new Terraformer.MultiPolygon([ + [[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]], + [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]] +]); + +let feature1 = new Terraformer.Feature({ + type: "Feature", + properties: null, + geometry: { + type: "Polygon", + coordinates: [ + [[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]], + [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]] + ] + } +}); + +let feature2 = new Terraformer.Feature({ + type: "Polygon", + coordinates: [ + [[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]], + [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]] + ] +}); + +let featurecollection1 = new Terraformer.FeatureCollection({ + type: "FeatureCollection", + features: [feature1, feature2] +}); + +let featurecollection2 = new Terraformer.FeatureCollection([feature1, feature2]); + +let geometrycollection1 = new Terraformer.GeometryCollection({ + type: "GeometryCollection", + geometries: [point2, polygon1] +}); + +let geometrycollection2 = new Terraformer.GeometryCollection([point2, polygon1]); + +let circle = new Terraformer.Circle([45.65, -122.27], 500, 64); + +circle.contains(point1); + +let pt = [-111.467285, 40.75766]; +let pt2 = [-111.873779, 40.647303]; + +let polygon = { + type: "Polygon", + coordinates: [[ + [-112.074279, 40.52215], + [-112.074279, 40.853293], + [-111.610107, 40.853293], + [-111.610107, 40.52215], + [-112.074279, 40.52215] + ]] +}; + +let polygonGeometry = polygon.coordinates; + +Terraformer.Tools.polygonContainsPoint(polygonGeometry, pt); +// returns false +Terraformer.Tools.polygonContainsPoint(polygonGeometry, pt2); +// returns true diff --git a/node_modules/terraformer/tsconfig.json b/node_modules/terraformer/tsconfig.json new file mode 100644 index 0000000..79017e6 --- /dev/null +++ b/node_modules/terraformer/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "noImplicitAny": true, + "strictNullChecks": true, + "sourceMap": false + }, + "exclude": [ + "node_modules" + ] +} diff --git a/node_modules/terraformer/tslint.json b/node_modules/terraformer/tslint.json new file mode 100644 index 0000000..6502ee0 --- /dev/null +++ b/node_modules/terraformer/tslint.json @@ -0,0 +1,17 @@ +{ + "extends": "tslint:recommended", + "rules": { + "interface-name": [ true, "never-prefix" ], + "jsdoc-format": false, + "max-line-length": [ false ], + "max-classes-per-file": [ false ], + "no-namespace": false, + "object-literal-sort-keys": false, + "trailing-comma": [ + true, { + "multiline": "never", + "singleline": "never" + } + ] + } +} diff --git a/node_modules/through/.travis.yml b/node_modules/through/.travis.yml new file mode 100644 index 0000000..c693a93 --- /dev/null +++ b/node_modules/through/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - 0.6 + - 0.8 + - "0.10" diff --git a/node_modules/through/LICENSE.APACHE2 b/node_modules/through/LICENSE.APACHE2 new file mode 100644 index 0000000..6366c04 --- /dev/null +++ b/node_modules/through/LICENSE.APACHE2 @@ -0,0 +1,15 @@ +Apache License, Version 2.0 + +Copyright (c) 2011 Dominic Tarr + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/node_modules/through/LICENSE.MIT b/node_modules/through/LICENSE.MIT new file mode 100644 index 0000000..6eafbd7 --- /dev/null +++ b/node_modules/through/LICENSE.MIT @@ -0,0 +1,24 @@ +The MIT License + +Copyright (c) 2011 Dominic Tarr + +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. diff --git a/node_modules/through/index.js b/node_modules/through/index.js new file mode 100644 index 0000000..ca5fc59 --- /dev/null +++ b/node_modules/through/index.js @@ -0,0 +1,108 @@ +var Stream = require('stream') + +// through +// +// a stream that does nothing but re-emit the input. +// useful for aggregating a series of changing but not ending streams into one stream) + +exports = module.exports = through +through.through = through + +//create a readable writable stream. + +function through (write, end, opts) { + write = write || function (data) { this.queue(data) } + end = end || function () { this.queue(null) } + + var ended = false, destroyed = false, buffer = [], _ended = false + var stream = new Stream() + stream.readable = stream.writable = true + stream.paused = false + +// stream.autoPause = !(opts && opts.autoPause === false) + stream.autoDestroy = !(opts && opts.autoDestroy === false) + + stream.write = function (data) { + write.call(this, data) + return !stream.paused + } + + function drain() { + while(buffer.length && !stream.paused) { + var data = buffer.shift() + if(null === data) + return stream.emit('end') + else + stream.emit('data', data) + } + } + + stream.queue = stream.push = function (data) { +// console.error(ended) + if(_ended) return stream + if(data === null) _ended = true + buffer.push(data) + drain() + return stream + } + + //this will be registered as the first 'end' listener + //must call destroy next tick, to make sure we're after any + //stream piped from here. + //this is only a problem if end is not emitted synchronously. + //a nicer way to do this is to make sure this is the last listener for 'end' + + stream.on('end', function () { + stream.readable = false + if(!stream.writable && stream.autoDestroy) + process.nextTick(function () { + stream.destroy() + }) + }) + + function _end () { + stream.writable = false + end.call(stream) + if(!stream.readable && stream.autoDestroy) + stream.destroy() + } + + stream.end = function (data) { + if(ended) return + ended = true + if(arguments.length) stream.write(data) + _end() // will emit or queue + return stream + } + + stream.destroy = function () { + if(destroyed) return + destroyed = true + ended = true + buffer.length = 0 + stream.writable = stream.readable = false + stream.emit('close') + return stream + } + + stream.pause = function () { + if(stream.paused) return + stream.paused = true + return stream + } + + stream.resume = function () { + if(stream.paused) { + stream.paused = false + stream.emit('resume') + } + drain() + //may have become paused again, + //as drain emits 'data'. + if(!stream.paused) + stream.emit('drain') + return stream + } + return stream +} + diff --git a/node_modules/through/package.json b/node_modules/through/package.json new file mode 100644 index 0000000..196935d --- /dev/null +++ b/node_modules/through/package.json @@ -0,0 +1,100 @@ +{ + "_args": [ + [ + { + "raw": "through@2", + "scope": null, + "escapedName": "through", + "name": "through", + "rawSpec": "2", + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/split" + ] + ], + "_from": "through@>=2.0.0 <3.0.0", + "_id": "through@2.3.8", + "_inCache": true, + "_location": "/through", + "_nodeVersion": "2.3.1", + "_npmUser": { + "name": "dominictarr", + "email": "dominic.tarr@gmail.com" + }, + "_npmVersion": "2.12.0", + "_phantomChildren": {}, + "_requested": { + "raw": "through@2", + "scope": null, + "escapedName": "through", + "name": "through", + "rawSpec": "2", + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/split" + ], + "_resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "_shasum": "0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5", + "_shrinkwrap": null, + "_spec": "through@2", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/split", + "author": { + "name": "Dominic Tarr", + "email": "dominic.tarr@gmail.com", + "url": "dominictarr.com" + }, + "bugs": { + "url": "https://github.com/dominictarr/through/issues" + }, + "dependencies": {}, + "description": "simplified stream construction", + "devDependencies": { + "from": "~0.1.3", + "stream-spec": "~0.3.5", + "tape": "~2.3.2" + }, + "directories": {}, + "dist": { + "shasum": "0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5", + "tarball": "https://registry.npmjs.org/through/-/through-2.3.8.tgz" + }, + "gitHead": "2c5a6f9a0cc54da759b6e10964f2081c358e49dc", + "homepage": "https://github.com/dominictarr/through", + "keywords": [ + "stream", + "streams", + "user-streams", + "pipe" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "dominictarr", + "email": "dominic.tarr@gmail.com" + } + ], + "name": "through", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/dominictarr/through.git" + }, + "scripts": { + "test": "set -e; for t in test/*.js; do node $t; done" + }, + "testling": { + "browsers": [ + "ie/8..latest", + "ff/15..latest", + "chrome/20..latest", + "safari/5.1..latest" + ], + "files": "test/*.js" + }, + "version": "2.3.8" +} diff --git a/node_modules/through/readme.markdown b/node_modules/through/readme.markdown new file mode 100644 index 0000000..cb34c81 --- /dev/null +++ b/node_modules/through/readme.markdown @@ -0,0 +1,64 @@ +#through + +[![build status](https://secure.travis-ci.org/dominictarr/through.png)](http://travis-ci.org/dominictarr/through) +[![testling badge](https://ci.testling.com/dominictarr/through.png)](https://ci.testling.com/dominictarr/through) + +Easy way to create a `Stream` that is both `readable` and `writable`. + +* Pass in optional `write` and `end` methods. +* `through` takes care of pause/resume logic if you use `this.queue(data)` instead of `this.emit('data', data)`. +* Use `this.pause()` and `this.resume()` to manage flow. +* Check `this.paused` to see current flow state. (`write` always returns `!this.paused`). + +This function is the basis for most of the synchronous streams in +[event-stream](http://github.com/dominictarr/event-stream). + +``` js +var through = require('through') + +through(function write(data) { + this.queue(data) //data *must* not be null + }, + function end () { //optional + this.queue(null) + }) +``` + +Or, can also be used _without_ buffering on pause, use `this.emit('data', data)`, +and this.emit('end') + +``` js +var through = require('through') + +through(function write(data) { + this.emit('data', data) + //this.pause() + }, + function end () { //optional + this.emit('end') + }) +``` + +## Extended Options + +You will probably not need these 99% of the time. + +### autoDestroy=false + +By default, `through` emits close when the writable +and readable side of the stream has ended. +If that is not desired, set `autoDestroy=false`. + +``` js +var through = require('through') + +//like this +var ts = through(write, end, {autoDestroy: false}) +//or like this +var ts = through(write, end) +ts.autoDestroy = false +``` + +## License + +MIT / Apache2 diff --git a/node_modules/through/test/async.js b/node_modules/through/test/async.js new file mode 100644 index 0000000..46bdbae --- /dev/null +++ b/node_modules/through/test/async.js @@ -0,0 +1,28 @@ +var from = require('from') +var through = require('../') + +var tape = require('tape') + +tape('simple async example', function (t) { + + var n = 0, expected = [1,2,3,4,5], actual = [] + from(expected) + .pipe(through(function(data) { + this.pause() + n ++ + setTimeout(function(){ + console.log('pushing data', data) + this.push(data) + this.resume() + }.bind(this), 300) + })).pipe(through(function(data) { + console.log('pushing data second time', data); + this.push(data) + })).on('data', function (d) { + actual.push(d) + }).on('end', function() { + t.deepEqual(actual, expected) + t.end() + }) + +}) diff --git a/node_modules/through/test/auto-destroy.js b/node_modules/through/test/auto-destroy.js new file mode 100644 index 0000000..9a8fd00 --- /dev/null +++ b/node_modules/through/test/auto-destroy.js @@ -0,0 +1,30 @@ +var test = require('tape') +var through = require('../') + +// must emit end before close. + +test('end before close', function (assert) { + var ts = through() + ts.autoDestroy = false + var ended = false, closed = false + + ts.on('end', function () { + assert.ok(!closed) + ended = true + }) + ts.on('close', function () { + assert.ok(ended) + closed = true + }) + + ts.write(1) + ts.write(2) + ts.write(3) + ts.end() + assert.ok(ended) + assert.notOk(closed) + ts.destroy() + assert.ok(closed) + assert.end() +}) + diff --git a/node_modules/through/test/buffering.js b/node_modules/through/test/buffering.js new file mode 100644 index 0000000..b0084bf --- /dev/null +++ b/node_modules/through/test/buffering.js @@ -0,0 +1,71 @@ +var test = require('tape') +var through = require('../') + +// must emit end before close. + +test('buffering', function(assert) { + var ts = through(function (data) { + this.queue(data) + }, function () { + this.queue(null) + }) + + var ended = false, actual = [] + + ts.on('data', actual.push.bind(actual)) + ts.on('end', function () { + ended = true + }) + + ts.write(1) + ts.write(2) + ts.write(3) + assert.deepEqual(actual, [1, 2, 3]) + ts.pause() + ts.write(4) + ts.write(5) + ts.write(6) + assert.deepEqual(actual, [1, 2, 3]) + ts.resume() + assert.deepEqual(actual, [1, 2, 3, 4, 5, 6]) + ts.pause() + ts.end() + assert.ok(!ended) + ts.resume() + assert.ok(ended) + assert.end() +}) + +test('buffering has data in queue, when ends', function (assert) { + + /* + * If stream ends while paused with data in the queue, + * stream should still emit end after all data is written + * on resume. + */ + + var ts = through(function (data) { + this.queue(data) + }, function () { + this.queue(null) + }) + + var ended = false, actual = [] + + ts.on('data', actual.push.bind(actual)) + ts.on('end', function () { + ended = true + }) + + ts.pause() + ts.write(1) + ts.write(2) + ts.write(3) + ts.end() + assert.deepEqual(actual, [], 'no data written yet, still paused') + assert.ok(!ended, 'end not emitted yet, still paused') + ts.resume() + assert.deepEqual(actual, [1, 2, 3], 'resumed, all data should be delivered') + assert.ok(ended, 'end should be emitted once all data was delivered') + assert.end(); +}) diff --git a/node_modules/through/test/end.js b/node_modules/through/test/end.js new file mode 100644 index 0000000..fa113f5 --- /dev/null +++ b/node_modules/through/test/end.js @@ -0,0 +1,45 @@ +var test = require('tape') +var through = require('../') + +// must emit end before close. + +test('end before close', function (assert) { + var ts = through() + var ended = false, closed = false + + ts.on('end', function () { + assert.ok(!closed) + ended = true + }) + ts.on('close', function () { + assert.ok(ended) + closed = true + }) + + ts.write(1) + ts.write(2) + ts.write(3) + ts.end() + assert.ok(ended) + assert.ok(closed) + assert.end() +}) + +test('end only once', function (t) { + + var ts = through() + var ended = false, closed = false + + ts.on('end', function () { + t.equal(ended, false) + ended = true + }) + + ts.queue(null) + ts.queue(null) + ts.queue(null) + + ts.resume() + + t.end() +}) diff --git a/node_modules/through/test/index.js b/node_modules/through/test/index.js new file mode 100644 index 0000000..96da82f --- /dev/null +++ b/node_modules/through/test/index.js @@ -0,0 +1,133 @@ + +var test = require('tape') +var spec = require('stream-spec') +var through = require('../') + +/* + I'm using these two functions, and not streams and pipe + so there is less to break. if this test fails it must be + the implementation of _through_ +*/ + +function write(array, stream) { + array = array.slice() + function next() { + while(array.length) + if(stream.write(array.shift()) === false) + return stream.once('drain', next) + + stream.end() + } + + next() +} + +function read(stream, callback) { + var actual = [] + stream.on('data', function (data) { + actual.push(data) + }) + stream.once('end', function () { + callback(null, actual) + }) + stream.once('error', function (err) { + callback(err) + }) +} + +test('simple defaults', function(assert) { + + var l = 1000 + , expected = [] + + while(l--) expected.push(l * Math.random()) + + var t = through() + var s = spec(t).through().pausable() + + read(t, function (err, actual) { + assert.ifError(err) + assert.deepEqual(actual, expected) + assert.end() + }) + + t.on('close', s.validate) + + write(expected, t) +}); + +test('simple functions', function(assert) { + + var l = 1000 + , expected = [] + + while(l--) expected.push(l * Math.random()) + + var t = through(function (data) { + this.emit('data', data*2) + }) + var s = spec(t).through().pausable() + + + read(t, function (err, actual) { + assert.ifError(err) + assert.deepEqual(actual, expected.map(function (data) { + return data*2 + })) + assert.end() + }) + + t.on('close', s.validate) + + write(expected, t) +}) + +test('pauses', function(assert) { + + var l = 1000 + , expected = [] + + while(l--) expected.push(l) //Math.random()) + + var t = through() + + var s = spec(t) + .through() + .pausable() + + t.on('data', function () { + if(Math.random() > 0.1) return + t.pause() + process.nextTick(function () { + t.resume() + }) + }) + + read(t, function (err, actual) { + assert.ifError(err) + assert.deepEqual(actual, expected) + }) + + t.on('close', function () { + s.validate() + assert.end() + }) + + write(expected, t) +}) + +test('does not soft-end on `undefined`', function(assert) { + var stream = through() + , count = 0 + + stream.on('data', function (data) { + count++ + }) + + stream.write(undefined) + stream.write(undefined) + + assert.equal(count, 2) + + assert.end() +}) diff --git a/node_modules/through2/.npmignore b/node_modules/through2/.npmignore new file mode 100644 index 0000000..1e1dcab --- /dev/null +++ b/node_modules/through2/.npmignore @@ -0,0 +1,3 @@ +test +.jshintrc +.travis.yml \ No newline at end of file diff --git a/node_modules/through2/LICENSE.html b/node_modules/through2/LICENSE.html new file mode 100644 index 0000000..ac47818 --- /dev/null +++ b/node_modules/through2/LICENSE.html @@ -0,0 +1,336 @@ + + + + + + + + + + + + + + +
    +

    The MIT License (MIT)

    +

    Copyright (c) 2016 Rod Vagg (the "Original Author") and additional 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.

    +
    +
    + + \ No newline at end of file diff --git a/node_modules/through2/LICENSE.md b/node_modules/through2/LICENSE.md new file mode 100644 index 0000000..7f0b93d --- /dev/null +++ b/node_modules/through2/LICENSE.md @@ -0,0 +1,9 @@ +# The MIT License (MIT) + +**Copyright (c) 2016 Rod Vagg (the "Original Author") and additional 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. \ No newline at end of file diff --git a/node_modules/through2/README.md b/node_modules/through2/README.md new file mode 100644 index 0000000..a916f15 --- /dev/null +++ b/node_modules/through2/README.md @@ -0,0 +1,136 @@ +# through2 + +[![NPM](https://nodei.co/npm/through2.png?downloads&downloadRank)](https://nodei.co/npm/through2/) + +**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise** + +Inspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`. + +Note: As 2.x.x this module starts using **Streams3** instead of Stream2. To continue using a Streams2 version use `npm install through2@0` to fetch the latest version of 0.x.x. More information about Streams2 vs Streams3 and recommendations see the article **[Why I don't use Node's core 'stream' module](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html)**. + +```js +fs.createReadStream('ex.txt') + .pipe(through2(function (chunk, enc, callback) { + for (var i = 0; i < chunk.length; i++) + if (chunk[i] == 97) + chunk[i] = 122 // swap 'a' for 'z' + + this.push(chunk) + + callback() + })) + .pipe(fs.createWriteStream('out.txt')) + .on('finish', function () { + doSomethingSpecial() + }) +``` + +Or object streams: + +```js +var all = [] + +fs.createReadStream('data.csv') + .pipe(csv2()) + .pipe(through2.obj(function (chunk, enc, callback) { + var data = { + name : chunk[0] + , address : chunk[3] + , phone : chunk[10] + } + this.push(data) + + callback() + })) + .on('data', function (data) { + all.push(data) + }) + .on('end', function () { + doSomethingSpecial(all) + }) +``` + +Note that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`. + +## API + +through2([ options, ] [ transformFunction ] [, flushFunction ]) + +Consult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`). + +### options + +The options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`). + +The `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call: + +```js +fs.createReadStream('/tmp/important.dat') + .pipe(through2({ objectMode: true, allowHalfOpen: false }, + function (chunk, enc, cb) { + cb(null, 'wut?') // note we can use the second argument on the callback + // to provide data as an alternative to this.push('wut?') + } + ) + .pipe(fs.createWriteStream('/tmp/wut.txt')) +``` + +### transformFunction + +The `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk. + +To queue a new chunk, call `this.push(chunk)`—this can be called as many times as required before the `callback()` if you have multiple pieces to send on. + +Alternatively, you may use `callback(err, chunk)` as shorthand for emitting a single chunk or an error. + +If you **do not provide a `transformFunction`** then you will get a simple pass-through stream. + +### flushFunction + +The optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress. + +```js +fs.createReadStream('/tmp/important.dat') + .pipe(through2( + function (chunk, enc, cb) { cb(null, chunk) }, // transform is a noop + function (cb) { // flush function + this.push('tacking on an extra buffer to the end'); + cb(); + } + )) + .pipe(fs.createWriteStream('/tmp/wut.txt')); +``` + +through2.ctor([ options, ] transformFunction[, flushFunction ]) + +Instead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances. + +```js +var FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) { + if (record.temp != null && record.unit == "F") { + record.temp = ( ( record.temp - 32 ) * 5 ) / 9 + record.unit = "C" + } + this.push(record) + callback() +}) + +// Create instances of FToC like so: +var converter = new FToC() +// Or: +var converter = FToC() +// Or specify/override options when you instantiate, if you prefer: +var converter = FToC({objectMode: true}) +``` + +## See Also + + - [through2-map](https://github.com/brycebaril/through2-map) - Array.prototype.map analog for streams. + - [through2-filter](https://github.com/brycebaril/through2-filter) - Array.prototype.filter analog for streams. + - [through2-reduce](https://github.com/brycebaril/through2-reduce) - Array.prototype.reduce analog for streams. + - [through2-spy](https://github.com/brycebaril/through2-spy) - Wrapper for simple stream.PassThrough spies. + - the [mississippi stream utility collection](https://github.com/maxogden/mississippi) includes `through2` as well as many more useful stream modules similar to this one + +## License + +**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. diff --git a/node_modules/through2/node_modules/readable-stream/.npmignore b/node_modules/through2/node_modules/readable-stream/.npmignore new file mode 100644 index 0000000..6d270c6 --- /dev/null +++ b/node_modules/through2/node_modules/readable-stream/.npmignore @@ -0,0 +1,9 @@ +build/ +test/ +examples/ +fs.js +zlib.js +.zuul.yml +.nyc_output +coverage +docs/ diff --git a/node_modules/through2/node_modules/readable-stream/.travis.yml b/node_modules/through2/node_modules/readable-stream/.travis.yml new file mode 100644 index 0000000..76b4b0c --- /dev/null +++ b/node_modules/through2/node_modules/readable-stream/.travis.yml @@ -0,0 +1,49 @@ +sudo: false +language: node_js +before_install: + - npm install -g npm@2 + - npm install -g npm +notifications: + email: false +matrix: + fast_finish: true + include: + - node_js: '0.8' + env: TASK=test + - node_js: '0.10' + env: TASK=test + - node_js: '0.11' + env: TASK=test + - node_js: '0.12' + env: TASK=test + - node_js: 1 + env: TASK=test + - node_js: 2 + env: TASK=test + - node_js: 3 + env: TASK=test + - node_js: 4 + env: TASK=test + - node_js: 5 + env: TASK=test + - node_js: 6 + env: TASK=test + - node_js: 7 + env: TASK=test + - node_js: 5 + env: TASK=browser BROWSER_NAME=ie BROWSER_VERSION="9..latest" + - node_js: 5 + env: TASK=browser BROWSER_NAME=opera BROWSER_VERSION="11..latest" + - node_js: 5 + env: TASK=browser BROWSER_NAME=chrome BROWSER_VERSION="-3..latest" + - node_js: 5 + env: TASK=browser BROWSER_NAME=firefox BROWSER_VERSION="-3..latest" + - node_js: 5 + env: TASK=browser BROWSER_NAME=safari BROWSER_VERSION="5..latest" + - node_js: 5 + env: TASK=browser BROWSER_NAME=microsoftedge BROWSER_VERSION=latest +script: "npm run $TASK" +env: + global: + - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc= + - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI= diff --git a/node_modules/through2/node_modules/readable-stream/CONTRIBUTING.md b/node_modules/through2/node_modules/readable-stream/CONTRIBUTING.md new file mode 100644 index 0000000..f478d58 --- /dev/null +++ b/node_modules/through2/node_modules/readable-stream/CONTRIBUTING.md @@ -0,0 +1,38 @@ +# Developer's Certificate of Origin 1.1 + +By making a contribution to this project, I certify that: + +* (a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + +* (b) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or + +* (c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + +* (d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + this project or the open source license(s) involved. + +## Moderation Policy + +The [Node.js Moderation Policy] applies to this WG. + +## Code of Conduct + +The [Node.js Code of Conduct][] applies to this WG. + +[Node.js Code of Conduct]: +https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md +[Node.js Moderation Policy]: +https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md diff --git a/node_modules/through2/node_modules/readable-stream/GOVERNANCE.md b/node_modules/through2/node_modules/readable-stream/GOVERNANCE.md new file mode 100644 index 0000000..16ffb93 --- /dev/null +++ b/node_modules/through2/node_modules/readable-stream/GOVERNANCE.md @@ -0,0 +1,136 @@ +### Streams Working Group + +The Node.js Streams is jointly governed by a Working Group +(WG) +that is responsible for high-level guidance of the project. + +The WG has final authority over this project including: + +* Technical direction +* Project governance and process (including this policy) +* Contribution policy +* GitHub repository hosting +* Conduct guidelines +* Maintaining the list of additional Collaborators + +For the current list of WG members, see the project +[README.md](./README.md#current-project-team-members). + +### Collaborators + +The readable-stream GitHub repository is +maintained by the WG and additional Collaborators who are added by the +WG on an ongoing basis. + +Individuals making significant and valuable contributions are made +Collaborators and given commit-access to the project. These +individuals are identified by the WG and their addition as +Collaborators is discussed during the WG meeting. + +_Note:_ If you make a significant contribution and are not considered +for commit-access log an issue or contact a WG member directly and it +will be brought up in the next WG meeting. + +Modifications of the contents of the readable-stream repository are +made on +a collaborative basis. Anybody with a GitHub account may propose a +modification via pull request and it will be considered by the project +Collaborators. All pull requests must be reviewed and accepted by a +Collaborator with sufficient expertise who is able to take full +responsibility for the change. In the case of pull requests proposed +by an existing Collaborator, an additional Collaborator is required +for sign-off. Consensus should be sought if additional Collaborators +participate and there is disagreement around a particular +modification. See _Consensus Seeking Process_ below for further detail +on the consensus model used for governance. + +Collaborators may opt to elevate significant or controversial +modifications, or modifications that have not found consensus to the +WG for discussion by assigning the ***WG-agenda*** tag to a pull +request or issue. The WG should serve as the final arbiter where +required. + +For the current list of Collaborators, see the project +[README.md](./README.md#members). + +### WG Membership + +WG seats are not time-limited. There is no fixed size of the WG. +However, the expected target is between 6 and 12, to ensure adequate +coverage of important areas of expertise, balanced with the ability to +make decisions efficiently. + +There is no specific set of requirements or qualifications for WG +membership beyond these rules. + +The WG may add additional members to the WG by unanimous consensus. + +A WG member may be removed from the WG by voluntary resignation, or by +unanimous consensus of all other WG members. + +Changes to WG membership should be posted in the agenda, and may be +suggested as any other agenda item (see "WG Meetings" below). + +If an addition or removal is proposed during a meeting, and the full +WG is not in attendance to participate, then the addition or removal +is added to the agenda for the subsequent meeting. This is to ensure +that all members are given the opportunity to participate in all +membership decisions. If a WG member is unable to attend a meeting +where a planned membership decision is being made, then their consent +is assumed. + +No more than 1/3 of the WG members may be affiliated with the same +employer. If removal or resignation of a WG member, or a change of +employment by a WG member, creates a situation where more than 1/3 of +the WG membership shares an employer, then the situation must be +immediately remedied by the resignation or removal of one or more WG +members affiliated with the over-represented employer(s). + +### WG Meetings + +The WG meets occasionally on a Google Hangout On Air. A designated moderator +approved by the WG runs the meeting. Each meeting should be +published to YouTube. + +Items are added to the WG agenda that are considered contentious or +are modifications of governance, contribution policy, WG membership, +or release process. + +The intention of the agenda is not to approve or review all patches; +that should happen continuously on GitHub and be handled by the larger +group of Collaborators. + +Any community member or contributor can ask that something be added to +the next meeting's agenda by logging a GitHub Issue. Any Collaborator, +WG member or the moderator can add the item to the agenda by adding +the ***WG-agenda*** tag to the issue. + +Prior to each WG meeting the moderator will share the Agenda with +members of the WG. WG members can add any items they like to the +agenda at the beginning of each meeting. The moderator and the WG +cannot veto or remove items. + +The WG may invite persons or representatives from certain projects to +participate in a non-voting capacity. + +The moderator is responsible for summarizing the discussion of each +agenda item and sends it as a pull request after the meeting. + +### Consensus Seeking Process + +The WG follows a +[Consensus +Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making) +decision-making model. + +When an agenda item has appeared to reach a consensus the moderator +will ask "Does anyone object?" as a final call for dissent from the +consensus. + +If an agenda item cannot reach a consensus a WG member can call for +either a closing vote or a vote to table the issue to the next +meeting. The call for a vote must be seconded by a majority of the WG +or else the discussion will continue. Simple majority wins. + +Note that changes to WG membership require a majority consensus. See +"WG Membership" above. diff --git a/node_modules/through2/node_modules/readable-stream/LICENSE b/node_modules/through2/node_modules/readable-stream/LICENSE new file mode 100644 index 0000000..2873b3b --- /dev/null +++ b/node_modules/through2/node_modules/readable-stream/LICENSE @@ -0,0 +1,47 @@ +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. All rights reserved. + +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. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +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. +""" diff --git a/node_modules/through2/node_modules/readable-stream/README.md b/node_modules/through2/node_modules/readable-stream/README.md new file mode 100644 index 0000000..8b6e5d3 --- /dev/null +++ b/node_modules/through2/node_modules/readable-stream/README.md @@ -0,0 +1,57 @@ +# readable-stream + +***Node-core v7.0.0 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream) + + +[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) +[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) + + +[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream) + +```bash +npm install --save readable-stream +``` + +***Node-core streams for userland*** + +This package is a mirror of the Streams2 and Streams3 implementations in +Node-core. + +Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v7.8.0/docs/api/). + +If you want to guarantee a stable streams base, regardless of what version of +Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). + +As of version 2.0.0 **readable-stream** uses semantic versioning. + +# Streams Working Group + +`readable-stream` is maintained by the Streams Working Group, which +oversees the development and maintenance of the Streams API within +Node.js. The responsibilities of the Streams Working Group include: + +* Addressing stream issues on the Node.js issue tracker. +* Authoring and editing stream documentation within the Node.js project. +* Reviewing changes to stream subclasses within the Node.js project. +* Redirecting changes to streams from the Node.js project to this + project. +* Assisting in the implementation of stream providers within Node.js. +* Recommending versions of `readable-stream` to be included in Node.js. +* Messaging about the future of streams to give the community advance + notice of changes. + + +## Team Members + +* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) <christopher.s.dickinson@gmail.com> + - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B +* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com> + - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242 +* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) <rod@vagg.org> + - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D +* **Sam Newman** ([@sonewman](https://github.com/sonewman)) <newmansam@outlook.com> +* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com> +* **Domenic Denicola** ([@domenic](https://github.com/domenic)) <d@domenic.me> +* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) <matteo.collina@gmail.com> + - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E diff --git a/node_modules/through2/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/node_modules/through2/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md new file mode 100644 index 0000000..83275f1 --- /dev/null +++ b/node_modules/through2/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md @@ -0,0 +1,60 @@ +# streams WG Meeting 2015-01-30 + +## Links + +* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg +* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106 +* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/ + +## Agenda + +Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting. + +* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105) +* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101) +* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102) +* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99) + +## Minutes + +### adopt a charter + +* group: +1's all around + +### What versioning scheme should be adopted? +* group: +1’s 3.0.0 +* domenic+group: pulling in patches from other sources where appropriate +* mikeal: version independently, suggesting versions for io.js +* mikeal+domenic: work with TC to notify in advance of changes +simpler stream creation + +### streamline creation of streams +* sam: streamline creation of streams +* domenic: nice simple solution posted + but, we lose the opportunity to change the model + may not be backwards incompatible (double check keys) + + **action item:** domenic will check + +### remove implicit flowing of streams on(‘data’) +* add isFlowing / isPaused +* mikeal: worrying that we’re documenting polyfill methods – confuses users +* domenic: more reflective API is probably good, with warning labels for users +* new section for mad scientists (reflective stream access) +* calvin: name the “third state” +* mikeal: maybe borrow the name from whatwg? +* domenic: we’re missing the “third state” +* consensus: kind of difficult to name the third state +* mikeal: figure out differences in states / compat +* mathias: always flow on data – eliminates third state + * explore what it breaks + +**action items:** +* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream) +* ask rod/build for infrastructure +* **chris**: explore the “flow on data” approach +* add isPaused/isFlowing +* add new docs section +* move isPaused to that section + + diff --git a/node_modules/through2/node_modules/readable-stream/duplex-browser.js b/node_modules/through2/node_modules/readable-stream/duplex-browser.js new file mode 100644 index 0000000..f8b2db8 --- /dev/null +++ b/node_modules/through2/node_modules/readable-stream/duplex-browser.js @@ -0,0 +1 @@ +module.exports = require('./lib/_stream_duplex.js'); diff --git a/node_modules/through2/node_modules/readable-stream/duplex.js b/node_modules/through2/node_modules/readable-stream/duplex.js new file mode 100644 index 0000000..46924cb --- /dev/null +++ b/node_modules/through2/node_modules/readable-stream/duplex.js @@ -0,0 +1 @@ +module.exports = require('./readable').Duplex diff --git a/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js new file mode 100644 index 0000000..736693b --- /dev/null +++ b/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js @@ -0,0 +1,75 @@ +// a duplex stream is just a stream that is both readable and writable. +// Since JS doesn't have multiple prototypal inheritance, this class +// prototypally inherits from Readable, and then parasitically from +// Writable. + +'use strict'; + +/**/ + +var objectKeys = Object.keys || function (obj) { + var keys = []; + for (var key in obj) { + keys.push(key); + }return keys; +}; +/**/ + +module.exports = Duplex; + +/**/ +var processNextTick = require('process-nextick-args'); +/**/ + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +var Readable = require('./_stream_readable'); +var Writable = require('./_stream_writable'); + +util.inherits(Duplex, Readable); + +var keys = objectKeys(Writable.prototype); +for (var v = 0; v < keys.length; v++) { + var method = keys[v]; + if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; +} + +function Duplex(options) { + if (!(this instanceof Duplex)) return new Duplex(options); + + Readable.call(this, options); + Writable.call(this, options); + + if (options && options.readable === false) this.readable = false; + + if (options && options.writable === false) this.writable = false; + + this.allowHalfOpen = true; + if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; + + this.once('end', onend); +} + +// the no-half-open enforcer +function onend() { + // if we allow half-open state, or if the writable side ended, + // then we're ok. + if (this.allowHalfOpen || this._writableState.ended) return; + + // no more data can be written. + // But allow more writes to happen in this tick. + processNextTick(onEndNT, this); +} + +function onEndNT(self) { + self.end(); +} + +function forEach(xs, f) { + for (var i = 0, l = xs.length; i < l; i++) { + f(xs[i], i); + } +} \ No newline at end of file diff --git a/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js new file mode 100644 index 0000000..d06f71f --- /dev/null +++ b/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js @@ -0,0 +1,26 @@ +// a passthrough stream. +// basically just the most minimal sort of Transform stream. +// Every written chunk gets output as-is. + +'use strict'; + +module.exports = PassThrough; + +var Transform = require('./_stream_transform'); + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +util.inherits(PassThrough, Transform); + +function PassThrough(options) { + if (!(this instanceof PassThrough)) return new PassThrough(options); + + Transform.call(this, options); +} + +PassThrough.prototype._transform = function (chunk, encoding, cb) { + cb(null, chunk); +}; \ No newline at end of file diff --git a/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js new file mode 100644 index 0000000..b19b208 --- /dev/null +++ b/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js @@ -0,0 +1,935 @@ +'use strict'; + +module.exports = Readable; + +/**/ +var processNextTick = require('process-nextick-args'); +/**/ + +/**/ +var isArray = require('isarray'); +/**/ + +/**/ +var Duplex; +/**/ + +Readable.ReadableState = ReadableState; + +/**/ +var EE = require('events').EventEmitter; + +var EElistenerCount = function (emitter, type) { + return emitter.listeners(type).length; +}; +/**/ + +/**/ +var Stream = require('./internal/streams/stream'); +/**/ + +var Buffer = require('buffer').Buffer; +/**/ +var bufferShim = require('buffer-shims'); +/**/ + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +/**/ +var debugUtil = require('util'); +var debug = void 0; +if (debugUtil && debugUtil.debuglog) { + debug = debugUtil.debuglog('stream'); +} else { + debug = function () {}; +} +/**/ + +var BufferList = require('./internal/streams/BufferList'); +var StringDecoder; + +util.inherits(Readable, Stream); + +var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; + +function prependListener(emitter, event, fn) { + // Sadly this is not cacheable as some libraries bundle their own + // event emitter implementation with them. + if (typeof emitter.prependListener === 'function') { + return emitter.prependListener(event, fn); + } else { + // This is a hack to make sure that our error handler is attached before any + // userland ones. NEVER DO THIS. This is here only because this code needs + // to continue to work with older versions of Node.js that do not include + // the prependListener() method. The goal is to eventually remove this hack. + if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; + } +} + +function ReadableState(options, stream) { + Duplex = Duplex || require('./_stream_duplex'); + + options = options || {}; + + // object stream flag. Used to make read(n) ignore n and to + // make all the buffer merging and length checks go away + this.objectMode = !!options.objectMode; + + if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.readableObjectMode; + + // the point at which it stops calling _read() to fill the buffer + // Note: 0 is a valid value, means "don't call _read preemptively ever" + var hwm = options.highWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; + + // cast to ints. + this.highWaterMark = ~~this.highWaterMark; + + // A linked list is used to store data chunks instead of an array because the + // linked list can remove elements from the beginning faster than + // array.shift() + this.buffer = new BufferList(); + this.length = 0; + this.pipes = null; + this.pipesCount = 0; + this.flowing = null; + this.ended = false; + this.endEmitted = false; + this.reading = false; + + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, because any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; + + // whenever we return null, then we set a flag to say + // that we're awaiting a 'readable' event emission. + this.needReadable = false; + this.emittedReadable = false; + this.readableListening = false; + this.resumeScheduled = false; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // when piping, we only care about 'readable' events that happen + // after read()ing all the bytes and not getting any pushback. + this.ranOut = false; + + // the number of writers that are awaiting a drain event in .pipe()s + this.awaitDrain = 0; + + // if true, a maybeReadMore has been scheduled + this.readingMore = false; + + this.decoder = null; + this.encoding = null; + if (options.encoding) { + if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; + } +} + +function Readable(options) { + Duplex = Duplex || require('./_stream_duplex'); + + if (!(this instanceof Readable)) return new Readable(options); + + this._readableState = new ReadableState(options, this); + + // legacy + this.readable = true; + + if (options && typeof options.read === 'function') this._read = options.read; + + Stream.call(this); +} + +// Manually shove something into the read() buffer. +// This returns true if the highWaterMark has not been hit yet, +// similar to how Writable.write() returns true if you should +// write() some more. +Readable.prototype.push = function (chunk, encoding) { + var state = this._readableState; + + if (!state.objectMode && typeof chunk === 'string') { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = bufferShim.from(chunk, encoding); + encoding = ''; + } + } + + return readableAddChunk(this, state, chunk, encoding, false); +}; + +// Unshift should *always* be something directly out of read() +Readable.prototype.unshift = function (chunk) { + var state = this._readableState; + return readableAddChunk(this, state, chunk, '', true); +}; + +Readable.prototype.isPaused = function () { + return this._readableState.flowing === false; +}; + +function readableAddChunk(stream, state, chunk, encoding, addToFront) { + var er = chunkInvalid(state, chunk); + if (er) { + stream.emit('error', er); + } else if (chunk === null) { + state.reading = false; + onEofChunk(stream, state); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (state.ended && !addToFront) { + var e = new Error('stream.push() after EOF'); + stream.emit('error', e); + } else if (state.endEmitted && addToFront) { + var _e = new Error('stream.unshift() after end event'); + stream.emit('error', _e); + } else { + var skipAdd; + if (state.decoder && !addToFront && !encoding) { + chunk = state.decoder.write(chunk); + skipAdd = !state.objectMode && chunk.length === 0; + } + + if (!addToFront) state.reading = false; + + // Don't add to the buffer if we've decoded to an empty string chunk and + // we're not in object mode + if (!skipAdd) { + // if we want the data now, just emit it. + if (state.flowing && state.length === 0 && !state.sync) { + stream.emit('data', chunk); + stream.read(0); + } else { + // update the buffer info. + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); + + if (state.needReadable) emitReadable(stream); + } + } + + maybeReadMore(stream, state); + } + } else if (!addToFront) { + state.reading = false; + } + + return needMoreData(state); +} + +// if it's past the high water mark, we can push in some more. +// Also, if we have no data yet, we can stand some +// more bytes. This is to work around cases where hwm=0, +// such as the repl. Also, if the push() triggered a +// readable event, and the user called read(largeNumber) such that +// needReadable was set, then we ought to push more, so that another +// 'readable' event will be triggered. +function needMoreData(state) { + return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); +} + +// backwards compatibility. +Readable.prototype.setEncoding = function (enc) { + if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; + this._readableState.decoder = new StringDecoder(enc); + this._readableState.encoding = enc; + return this; +}; + +// Don't raise the hwm > 8MB +var MAX_HWM = 0x800000; +function computeNewHighWaterMark(n) { + if (n >= MAX_HWM) { + n = MAX_HWM; + } else { + // Get the next highest power of 2 to prevent increasing hwm excessively in + // tiny amounts + n--; + n |= n >>> 1; + n |= n >>> 2; + n |= n >>> 4; + n |= n >>> 8; + n |= n >>> 16; + n++; + } + return n; +} + +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function howMuchToRead(n, state) { + if (n <= 0 || state.length === 0 && state.ended) return 0; + if (state.objectMode) return 1; + if (n !== n) { + // Only flow one buffer at a time + if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; + } + // If we're asking for more than the current hwm, then raise the hwm. + if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); + if (n <= state.length) return n; + // Don't have enough + if (!state.ended) { + state.needReadable = true; + return 0; + } + return state.length; +} + +// you can override either this method, or the async _read(n) below. +Readable.prototype.read = function (n) { + debug('read', n); + n = parseInt(n, 10); + var state = this._readableState; + var nOrig = n; + + if (n !== 0) state.emittedReadable = false; + + // if we're doing read(0) to trigger a readable event, but we + // already have a bunch of data in the buffer, then just trigger + // the 'readable' event and move on. + if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { + debug('read: emitReadable', state.length, state.ended); + if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); + return null; + } + + n = howMuchToRead(n, state); + + // if we've ended, and we're now clear, then finish it up. + if (n === 0 && state.ended) { + if (state.length === 0) endReadable(this); + return null; + } + + // All the actual chunk generation logic needs to be + // *below* the call to _read. The reason is that in certain + // synthetic stream cases, such as passthrough streams, _read + // may be a completely synchronous operation which may change + // the state of the read buffer, providing enough data when + // before there was *not* enough. + // + // So, the steps are: + // 1. Figure out what the state of things will be after we do + // a read from the buffer. + // + // 2. If that resulting state will trigger a _read, then call _read. + // Note that this may be asynchronous, or synchronous. Yes, it is + // deeply ugly to write APIs this way, but that still doesn't mean + // that the Readable class should behave improperly, as streams are + // designed to be sync/async agnostic. + // Take note if the _read call is sync or async (ie, if the read call + // has returned yet), so that we know whether or not it's safe to emit + // 'readable' etc. + // + // 3. Actually pull the requested chunks out of the buffer and return. + + // if we need a readable event, then we need to do some reading. + var doRead = state.needReadable; + debug('need readable', doRead); + + // if we currently have less than the highWaterMark, then also read some + if (state.length === 0 || state.length - n < state.highWaterMark) { + doRead = true; + debug('length less than watermark', doRead); + } + + // however, if we've ended, then there's no point, and if we're already + // reading, then it's unnecessary. + if (state.ended || state.reading) { + doRead = false; + debug('reading or ended', doRead); + } else if (doRead) { + debug('do read'); + state.reading = true; + state.sync = true; + // if the length is currently zero, then we *need* a readable event. + if (state.length === 0) state.needReadable = true; + // call internal read method + this._read(state.highWaterMark); + state.sync = false; + // If _read pushed data synchronously, then `reading` will be false, + // and we need to re-evaluate how much data we can return to the user. + if (!state.reading) n = howMuchToRead(nOrig, state); + } + + var ret; + if (n > 0) ret = fromList(n, state);else ret = null; + + if (ret === null) { + state.needReadable = true; + n = 0; + } else { + state.length -= n; + } + + if (state.length === 0) { + // If we have nothing in the buffer, then we want to know + // as soon as we *do* get something into the buffer. + if (!state.ended) state.needReadable = true; + + // If we tried to read() past the EOF, then emit end on the next tick. + if (nOrig !== n && state.ended) endReadable(this); + } + + if (ret !== null) this.emit('data', ret); + + return ret; +}; + +function chunkInvalid(state, chunk) { + var er = null; + if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + return er; +} + +function onEofChunk(stream, state) { + if (state.ended) return; + if (state.decoder) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); + state.length += state.objectMode ? 1 : chunk.length; + } + } + state.ended = true; + + // emit 'readable' now to make sure it gets picked up. + emitReadable(stream); +} + +// Don't emit readable right away in sync mode, because this can trigger +// another read() call => stack overflow. This way, it might trigger +// a nextTick recursion warning, but that's not so bad. +function emitReadable(stream) { + var state = stream._readableState; + state.needReadable = false; + if (!state.emittedReadable) { + debug('emitReadable', state.flowing); + state.emittedReadable = true; + if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream); + } +} + +function emitReadable_(stream) { + debug('emit readable'); + stream.emit('readable'); + flow(stream); +} + +// at this point, the user has presumably seen the 'readable' event, +// and called read() to consume some data. that may have triggered +// in turn another _read(n) call, in which case reading = true if +// it's in progress. +// However, if we're not ended, or reading, and the length < hwm, +// then go ahead and try to read some more preemptively. +function maybeReadMore(stream, state) { + if (!state.readingMore) { + state.readingMore = true; + processNextTick(maybeReadMore_, stream, state); + } +} + +function maybeReadMore_(stream, state) { + var len = state.length; + while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { + debug('maybeReadMore read 0'); + stream.read(0); + if (len === state.length) + // didn't get any data, stop spinning. + break;else len = state.length; + } + state.readingMore = false; +} + +// abstract method. to be overridden in specific implementation classes. +// call cb(er, data) where data is <= n in length. +// for virtual (non-string, non-buffer) streams, "length" is somewhat +// arbitrary, and perhaps not very meaningful. +Readable.prototype._read = function (n) { + this.emit('error', new Error('_read() is not implemented')); +}; + +Readable.prototype.pipe = function (dest, pipeOpts) { + var src = this; + var state = this._readableState; + + switch (state.pipesCount) { + case 0: + state.pipes = dest; + break; + case 1: + state.pipes = [state.pipes, dest]; + break; + default: + state.pipes.push(dest); + break; + } + state.pipesCount += 1; + debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); + + var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; + + var endFn = doEnd ? onend : cleanup; + if (state.endEmitted) processNextTick(endFn);else src.once('end', endFn); + + dest.on('unpipe', onunpipe); + function onunpipe(readable) { + debug('onunpipe'); + if (readable === src) { + cleanup(); + } + } + + function onend() { + debug('onend'); + dest.end(); + } + + // when the dest drains, it reduces the awaitDrain counter + // on the source. This would be more elegant with a .once() + // handler in flow(), but adding and removing repeatedly is + // too slow. + var ondrain = pipeOnDrain(src); + dest.on('drain', ondrain); + + var cleanedUp = false; + function cleanup() { + debug('cleanup'); + // cleanup event handlers once the pipe is broken + dest.removeListener('close', onclose); + dest.removeListener('finish', onfinish); + dest.removeListener('drain', ondrain); + dest.removeListener('error', onerror); + dest.removeListener('unpipe', onunpipe); + src.removeListener('end', onend); + src.removeListener('end', cleanup); + src.removeListener('data', ondata); + + cleanedUp = true; + + // if the reader is waiting for a drain event from this + // specific writer, then it would cause it to never start + // flowing again. + // So, if this is awaiting a drain, then we just call it now. + // If we don't know, then assume that we are waiting for one. + if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); + } + + // If the user pushes more data while we're writing to dest then we'll end up + // in ondata again. However, we only want to increase awaitDrain once because + // dest will only emit one 'drain' event for the multiple writes. + // => Introduce a guard on increasing awaitDrain. + var increasedAwaitDrain = false; + src.on('data', ondata); + function ondata(chunk) { + debug('ondata'); + increasedAwaitDrain = false; + var ret = dest.write(chunk); + if (false === ret && !increasedAwaitDrain) { + // If the user unpiped during `dest.write()`, it is possible + // to get stuck in a permanently paused state if that write + // also returned false. + // => Check whether `dest` is still a piping destination. + if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { + debug('false write response, pause', src._readableState.awaitDrain); + src._readableState.awaitDrain++; + increasedAwaitDrain = true; + } + src.pause(); + } + } + + // if the dest has an error, then stop piping into it. + // however, don't suppress the throwing behavior for this. + function onerror(er) { + debug('onerror', er); + unpipe(); + dest.removeListener('error', onerror); + if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); + } + + // Make sure our error handler is attached before userland ones. + prependListener(dest, 'error', onerror); + + // Both close and finish should trigger unpipe, but only once. + function onclose() { + dest.removeListener('finish', onfinish); + unpipe(); + } + dest.once('close', onclose); + function onfinish() { + debug('onfinish'); + dest.removeListener('close', onclose); + unpipe(); + } + dest.once('finish', onfinish); + + function unpipe() { + debug('unpipe'); + src.unpipe(dest); + } + + // tell the dest that it's being piped to + dest.emit('pipe', src); + + // start the flow if it hasn't been started already. + if (!state.flowing) { + debug('pipe resume'); + src.resume(); + } + + return dest; +}; + +function pipeOnDrain(src) { + return function () { + var state = src._readableState; + debug('pipeOnDrain', state.awaitDrain); + if (state.awaitDrain) state.awaitDrain--; + if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { + state.flowing = true; + flow(src); + } + }; +} + +Readable.prototype.unpipe = function (dest) { + var state = this._readableState; + + // if we're not piping anywhere, then do nothing. + if (state.pipesCount === 0) return this; + + // just one destination. most common case. + if (state.pipesCount === 1) { + // passed in one, but it's not the right one. + if (dest && dest !== state.pipes) return this; + + if (!dest) dest = state.pipes; + + // got a match. + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + if (dest) dest.emit('unpipe', this); + return this; + } + + // slow case. multiple pipe destinations. + + if (!dest) { + // remove all. + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + + for (var i = 0; i < len; i++) { + dests[i].emit('unpipe', this); + }return this; + } + + // try to find the right one. + var index = indexOf(state.pipes, dest); + if (index === -1) return this; + + state.pipes.splice(index, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) state.pipes = state.pipes[0]; + + dest.emit('unpipe', this); + + return this; +}; + +// set up data events if they are asked for +// Ensure readable listeners eventually get something +Readable.prototype.on = function (ev, fn) { + var res = Stream.prototype.on.call(this, ev, fn); + + if (ev === 'data') { + // Start flowing on next tick if stream isn't explicitly paused + if (this._readableState.flowing !== false) this.resume(); + } else if (ev === 'readable') { + var state = this._readableState; + if (!state.endEmitted && !state.readableListening) { + state.readableListening = state.needReadable = true; + state.emittedReadable = false; + if (!state.reading) { + processNextTick(nReadingNextTick, this); + } else if (state.length) { + emitReadable(this, state); + } + } + } + + return res; +}; +Readable.prototype.addListener = Readable.prototype.on; + +function nReadingNextTick(self) { + debug('readable nexttick read 0'); + self.read(0); +} + +// pause() and resume() are remnants of the legacy readable stream API +// If the user uses them, then switch into old mode. +Readable.prototype.resume = function () { + var state = this._readableState; + if (!state.flowing) { + debug('resume'); + state.flowing = true; + resume(this, state); + } + return this; +}; + +function resume(stream, state) { + if (!state.resumeScheduled) { + state.resumeScheduled = true; + processNextTick(resume_, stream, state); + } +} + +function resume_(stream, state) { + if (!state.reading) { + debug('resume read 0'); + stream.read(0); + } + + state.resumeScheduled = false; + state.awaitDrain = 0; + stream.emit('resume'); + flow(stream); + if (state.flowing && !state.reading) stream.read(0); +} + +Readable.prototype.pause = function () { + debug('call pause flowing=%j', this._readableState.flowing); + if (false !== this._readableState.flowing) { + debug('pause'); + this._readableState.flowing = false; + this.emit('pause'); + } + return this; +}; + +function flow(stream) { + var state = stream._readableState; + debug('flow', state.flowing); + while (state.flowing && stream.read() !== null) {} +} + +// wrap an old-style stream as the async data source. +// This is *not* part of the readable stream interface. +// It is an ugly unfortunate mess of history. +Readable.prototype.wrap = function (stream) { + var state = this._readableState; + var paused = false; + + var self = this; + stream.on('end', function () { + debug('wrapped end'); + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) self.push(chunk); + } + + self.push(null); + }); + + stream.on('data', function (chunk) { + debug('wrapped data'); + if (state.decoder) chunk = state.decoder.write(chunk); + + // don't skip over falsy values in objectMode + if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; + + var ret = self.push(chunk); + if (!ret) { + paused = true; + stream.pause(); + } + }); + + // proxy all the other methods. + // important when wrapping filters and duplexes. + for (var i in stream) { + if (this[i] === undefined && typeof stream[i] === 'function') { + this[i] = function (method) { + return function () { + return stream[method].apply(stream, arguments); + }; + }(i); + } + } + + // proxy certain important events. + for (var n = 0; n < kProxyEvents.length; n++) { + stream.on(kProxyEvents[n], self.emit.bind(self, kProxyEvents[n])); + } + + // when we try to consume some more bytes, simply unpause the + // underlying stream. + self._read = function (n) { + debug('wrapped _read', n); + if (paused) { + paused = false; + stream.resume(); + } + }; + + return self; +}; + +// exposed for testing purposes only. +Readable._fromList = fromList; + +// Pluck off n bytes from an array of buffers. +// Length is the combined lengths of all the buffers in the list. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function fromList(n, state) { + // nothing buffered + if (state.length === 0) return null; + + var ret; + if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { + // read it all, truncate the list + if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length); + state.buffer.clear(); + } else { + // read part of list + ret = fromListPartial(n, state.buffer, state.decoder); + } + + return ret; +} + +// Extracts only enough buffered data to satisfy the amount requested. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function fromListPartial(n, list, hasStrings) { + var ret; + if (n < list.head.data.length) { + // slice is the same for buffers and strings + ret = list.head.data.slice(0, n); + list.head.data = list.head.data.slice(n); + } else if (n === list.head.data.length) { + // first chunk is a perfect match + ret = list.shift(); + } else { + // result spans more than one buffer + ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list); + } + return ret; +} + +// Copies a specified amount of characters from the list of buffered data +// chunks. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function copyFromBufferString(n, list) { + var p = list.head; + var c = 1; + var ret = p.data; + n -= ret.length; + while (p = p.next) { + var str = p.data; + var nb = n > str.length ? str.length : n; + if (nb === str.length) ret += str;else ret += str.slice(0, n); + n -= nb; + if (n === 0) { + if (nb === str.length) { + ++c; + if (p.next) list.head = p.next;else list.head = list.tail = null; + } else { + list.head = p; + p.data = str.slice(nb); + } + break; + } + ++c; + } + list.length -= c; + return ret; +} + +// Copies a specified amount of bytes from the list of buffered data chunks. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function copyFromBuffer(n, list) { + var ret = bufferShim.allocUnsafe(n); + var p = list.head; + var c = 1; + p.data.copy(ret); + n -= p.data.length; + while (p = p.next) { + var buf = p.data; + var nb = n > buf.length ? buf.length : n; + buf.copy(ret, ret.length - n, 0, nb); + n -= nb; + if (n === 0) { + if (nb === buf.length) { + ++c; + if (p.next) list.head = p.next;else list.head = list.tail = null; + } else { + list.head = p; + p.data = buf.slice(nb); + } + break; + } + ++c; + } + list.length -= c; + return ret; +} + +function endReadable(stream) { + var state = stream._readableState; + + // If we get here before consuming all the bytes, then that is a + // bug in node. Should never happen. + if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream'); + + if (!state.endEmitted) { + state.ended = true; + processNextTick(endReadableNT, state, stream); + } +} + +function endReadableNT(state, stream) { + // Check that we didn't get one last unshift. + if (!state.endEmitted && state.length === 0) { + state.endEmitted = true; + stream.readable = false; + stream.emit('end'); + } +} + +function forEach(xs, f) { + for (var i = 0, l = xs.length; i < l; i++) { + f(xs[i], i); + } +} + +function indexOf(xs, x) { + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) return i; + } + return -1; +} \ No newline at end of file diff --git a/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js new file mode 100644 index 0000000..cd25832 --- /dev/null +++ b/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js @@ -0,0 +1,182 @@ +// a transform stream is a readable/writable stream where you do +// something with the data. Sometimes it's called a "filter", +// but that's not a great name for it, since that implies a thing where +// some bits pass through, and others are simply ignored. (That would +// be a valid example of a transform, of course.) +// +// While the output is causally related to the input, it's not a +// necessarily symmetric or synchronous transformation. For example, +// a zlib stream might take multiple plain-text writes(), and then +// emit a single compressed chunk some time in the future. +// +// Here's how this works: +// +// The Transform stream has all the aspects of the readable and writable +// stream classes. When you write(chunk), that calls _write(chunk,cb) +// internally, and returns false if there's a lot of pending writes +// buffered up. When you call read(), that calls _read(n) until +// there's enough pending readable data buffered up. +// +// In a transform stream, the written data is placed in a buffer. When +// _read(n) is called, it transforms the queued up data, calling the +// buffered _write cb's as it consumes chunks. If consuming a single +// written chunk would result in multiple output chunks, then the first +// outputted bit calls the readcb, and subsequent chunks just go into +// the read buffer, and will cause it to emit 'readable' if necessary. +// +// This way, back-pressure is actually determined by the reading side, +// since _read has to be called to start processing a new chunk. However, +// a pathological inflate type of transform can cause excessive buffering +// here. For example, imagine a stream where every byte of input is +// interpreted as an integer from 0-255, and then results in that many +// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in +// 1kb of data being output. In this case, you could write a very small +// amount of input, and end up with a very large amount of output. In +// such a pathological inflating mechanism, there'd be no way to tell +// the system to stop doing the transform. A single 4MB write could +// cause the system to run out of memory. +// +// However, even in such a pathological case, only a single written chunk +// would be consumed, and then the rest would wait (un-transformed) until +// the results of the previous transformed chunk were consumed. + +'use strict'; + +module.exports = Transform; + +var Duplex = require('./_stream_duplex'); + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +util.inherits(Transform, Duplex); + +function TransformState(stream) { + this.afterTransform = function (er, data) { + return afterTransform(stream, er, data); + }; + + this.needTransform = false; + this.transforming = false; + this.writecb = null; + this.writechunk = null; + this.writeencoding = null; +} + +function afterTransform(stream, er, data) { + var ts = stream._transformState; + ts.transforming = false; + + var cb = ts.writecb; + + if (!cb) return stream.emit('error', new Error('no writecb in Transform class')); + + ts.writechunk = null; + ts.writecb = null; + + if (data !== null && data !== undefined) stream.push(data); + + cb(er); + + var rs = stream._readableState; + rs.reading = false; + if (rs.needReadable || rs.length < rs.highWaterMark) { + stream._read(rs.highWaterMark); + } +} + +function Transform(options) { + if (!(this instanceof Transform)) return new Transform(options); + + Duplex.call(this, options); + + this._transformState = new TransformState(this); + + var stream = this; + + // start out asking for a readable event once data is transformed. + this._readableState.needReadable = true; + + // we have implemented the _read method, and done the other things + // that Readable wants before the first _read call, so unset the + // sync guard flag. + this._readableState.sync = false; + + if (options) { + if (typeof options.transform === 'function') this._transform = options.transform; + + if (typeof options.flush === 'function') this._flush = options.flush; + } + + // When the writable side finishes, then flush out anything remaining. + this.once('prefinish', function () { + if (typeof this._flush === 'function') this._flush(function (er, data) { + done(stream, er, data); + });else done(stream); + }); +} + +Transform.prototype.push = function (chunk, encoding) { + this._transformState.needTransform = false; + return Duplex.prototype.push.call(this, chunk, encoding); +}; + +// This is the part where you do stuff! +// override this function in implementation classes. +// 'chunk' is an input chunk. +// +// Call `push(newChunk)` to pass along transformed output +// to the readable side. You may call 'push' zero or more times. +// +// Call `cb(err)` when you are done with this chunk. If you pass +// an error, then that'll put the hurt on the whole operation. If you +// never call cb(), then you'll never get another chunk. +Transform.prototype._transform = function (chunk, encoding, cb) { + throw new Error('_transform() is not implemented'); +}; + +Transform.prototype._write = function (chunk, encoding, cb) { + var ts = this._transformState; + ts.writecb = cb; + ts.writechunk = chunk; + ts.writeencoding = encoding; + if (!ts.transforming) { + var rs = this._readableState; + if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); + } +}; + +// Doesn't matter what the args are here. +// _transform does all the work. +// That we got here means that the readable side wants more data. +Transform.prototype._read = function (n) { + var ts = this._transformState; + + if (ts.writechunk !== null && ts.writecb && !ts.transforming) { + ts.transforming = true; + this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); + } else { + // mark that we need a transform, so that any data that comes in + // will get processed, now that we've asked for it. + ts.needTransform = true; + } +}; + +function done(stream, er, data) { + if (er) return stream.emit('error', er); + + if (data !== null && data !== undefined) stream.push(data); + + // if there's nothing in the write buffer, then that means + // that nothing more will ever be provided + var ws = stream._writableState; + var ts = stream._transformState; + + if (ws.length) throw new Error('Calling transform done when ws.length != 0'); + + if (ts.transforming) throw new Error('Calling transform done when still transforming'); + + return stream.push(null); +} \ No newline at end of file diff --git a/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js new file mode 100644 index 0000000..15db038 --- /dev/null +++ b/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js @@ -0,0 +1,544 @@ +// A bit simpler than readable streams. +// Implement an async ._write(chunk, encoding, cb), and it'll handle all +// the drain event emission and buffering. + +'use strict'; + +module.exports = Writable; + +/**/ +var processNextTick = require('process-nextick-args'); +/**/ + +/**/ +var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : processNextTick; +/**/ + +/**/ +var Duplex; +/**/ + +Writable.WritableState = WritableState; + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +/**/ +var internalUtil = { + deprecate: require('util-deprecate') +}; +/**/ + +/**/ +var Stream = require('./internal/streams/stream'); +/**/ + +var Buffer = require('buffer').Buffer; +/**/ +var bufferShim = require('buffer-shims'); +/**/ + +util.inherits(Writable, Stream); + +function nop() {} + +function WriteReq(chunk, encoding, cb) { + this.chunk = chunk; + this.encoding = encoding; + this.callback = cb; + this.next = null; +} + +function WritableState(options, stream) { + Duplex = Duplex || require('./_stream_duplex'); + + options = options || {}; + + // object stream flag to indicate whether or not this stream + // contains buffers or objects. + this.objectMode = !!options.objectMode; + + if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.writableObjectMode; + + // the point at which write() starts returning false + // Note: 0 is a valid value, means that we always return false if + // the entire buffer is not flushed immediately on write() + var hwm = options.highWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; + + // cast to ints. + this.highWaterMark = ~~this.highWaterMark; + + // drain event flag. + this.needDrain = false; + // at the start of calling end() + this.ending = false; + // when end() has been called, and returned + this.ended = false; + // when 'finish' is emitted + this.finished = false; + + // should we decode strings into buffers before passing to _write? + // this is here so that some node-core streams can optimize string + // handling at a lower level. + var noDecode = options.decodeStrings === false; + this.decodeStrings = !noDecode; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // not an actual buffer we keep track of, but a measurement + // of how much we're waiting to get pushed to some underlying + // socket or file. + this.length = 0; + + // a flag to see when we're in the middle of a write. + this.writing = false; + + // when true all writes will be buffered until .uncork() call + this.corked = 0; + + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, because any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; + + // a flag to know if we're processing previously buffered items, which + // may call the _write() callback in the same tick, so that we don't + // end up in an overlapped onwrite situation. + this.bufferProcessing = false; + + // the callback that's passed to _write(chunk,cb) + this.onwrite = function (er) { + onwrite(stream, er); + }; + + // the callback that the user supplies to write(chunk,encoding,cb) + this.writecb = null; + + // the amount that is being written when _write is called. + this.writelen = 0; + + this.bufferedRequest = null; + this.lastBufferedRequest = null; + + // number of pending user-supplied write callbacks + // this must be 0 before 'finish' can be emitted + this.pendingcb = 0; + + // emit prefinish if the only thing we're waiting for is _write cbs + // This is relevant for synchronous Transform streams + this.prefinished = false; + + // True if the error was already emitted and should not be thrown again + this.errorEmitted = false; + + // count buffered requests + this.bufferedRequestCount = 0; + + // allocate the first CorkedRequest, there is always + // one allocated and free to use, and we maintain at most two + this.corkedRequestsFree = new CorkedRequest(this); +} + +WritableState.prototype.getBuffer = function getBuffer() { + var current = this.bufferedRequest; + var out = []; + while (current) { + out.push(current); + current = current.next; + } + return out; +}; + +(function () { + try { + Object.defineProperty(WritableState.prototype, 'buffer', { + get: internalUtil.deprecate(function () { + return this.getBuffer(); + }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.') + }); + } catch (_) {} +})(); + +// Test _writableState for inheritance to account for Duplex streams, +// whose prototype chain only points to Readable. +var realHasInstance; +if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { + realHasInstance = Function.prototype[Symbol.hasInstance]; + Object.defineProperty(Writable, Symbol.hasInstance, { + value: function (object) { + if (realHasInstance.call(this, object)) return true; + + return object && object._writableState instanceof WritableState; + } + }); +} else { + realHasInstance = function (object) { + return object instanceof this; + }; +} + +function Writable(options) { + Duplex = Duplex || require('./_stream_duplex'); + + // Writable ctor is applied to Duplexes, too. + // `realHasInstance` is necessary because using plain `instanceof` + // would return false, as no `_writableState` property is attached. + + // Trying to use the custom `instanceof` for Writable here will also break the + // Node.js LazyTransform implementation, which has a non-trivial getter for + // `_writableState` that would lead to infinite recursion. + if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) { + return new Writable(options); + } + + this._writableState = new WritableState(options, this); + + // legacy. + this.writable = true; + + if (options) { + if (typeof options.write === 'function') this._write = options.write; + + if (typeof options.writev === 'function') this._writev = options.writev; + } + + Stream.call(this); +} + +// Otherwise people can pipe Writable streams, which is just wrong. +Writable.prototype.pipe = function () { + this.emit('error', new Error('Cannot pipe, not readable')); +}; + +function writeAfterEnd(stream, cb) { + var er = new Error('write after end'); + // TODO: defer error events consistently everywhere, not just the cb + stream.emit('error', er); + processNextTick(cb, er); +} + +// Checks that a user-supplied chunk is valid, especially for the particular +// mode the stream is in. Currently this means that `null` is never accepted +// and undefined/non-string values are only allowed in object mode. +function validChunk(stream, state, chunk, cb) { + var valid = true; + var er = false; + + if (chunk === null) { + er = new TypeError('May not write null values to stream'); + } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + if (er) { + stream.emit('error', er); + processNextTick(cb, er); + valid = false; + } + return valid; +} + +Writable.prototype.write = function (chunk, encoding, cb) { + var state = this._writableState; + var ret = false; + var isBuf = Buffer.isBuffer(chunk); + + if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; + + if (typeof cb !== 'function') cb = nop; + + if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { + state.pendingcb++; + ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); + } + + return ret; +}; + +Writable.prototype.cork = function () { + var state = this._writableState; + + state.corked++; +}; + +Writable.prototype.uncork = function () { + var state = this._writableState; + + if (state.corked) { + state.corked--; + + if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); + } +}; + +Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { + // node::ParseEncoding() requires lower case. + if (typeof encoding === 'string') encoding = encoding.toLowerCase(); + if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); + this._writableState.defaultEncoding = encoding; + return this; +}; + +function decodeChunk(state, chunk, encoding) { + if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { + chunk = bufferShim.from(chunk, encoding); + } + return chunk; +} + +// if we're already writing something, then just put this +// in the queue, and wait our turn. Otherwise, call _write +// If we return false, then we need a drain event, so set that flag. +function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { + if (!isBuf) { + chunk = decodeChunk(state, chunk, encoding); + if (Buffer.isBuffer(chunk)) encoding = 'buffer'; + } + var len = state.objectMode ? 1 : chunk.length; + + state.length += len; + + var ret = state.length < state.highWaterMark; + // we must ensure that previous needDrain will not be reset to false. + if (!ret) state.needDrain = true; + + if (state.writing || state.corked) { + var last = state.lastBufferedRequest; + state.lastBufferedRequest = new WriteReq(chunk, encoding, cb); + if (last) { + last.next = state.lastBufferedRequest; + } else { + state.bufferedRequest = state.lastBufferedRequest; + } + state.bufferedRequestCount += 1; + } else { + doWrite(stream, state, false, len, chunk, encoding, cb); + } + + return ret; +} + +function doWrite(stream, state, writev, len, chunk, encoding, cb) { + state.writelen = len; + state.writecb = cb; + state.writing = true; + state.sync = true; + if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); + state.sync = false; +} + +function onwriteError(stream, state, sync, er, cb) { + --state.pendingcb; + if (sync) processNextTick(cb, er);else cb(er); + + stream._writableState.errorEmitted = true; + stream.emit('error', er); +} + +function onwriteStateUpdate(state) { + state.writing = false; + state.writecb = null; + state.length -= state.writelen; + state.writelen = 0; +} + +function onwrite(stream, er) { + var state = stream._writableState; + var sync = state.sync; + var cb = state.writecb; + + onwriteStateUpdate(state); + + if (er) onwriteError(stream, state, sync, er, cb);else { + // Check if we're actually ready to finish, but don't emit yet + var finished = needFinish(state); + + if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { + clearBuffer(stream, state); + } + + if (sync) { + /**/ + asyncWrite(afterWrite, stream, state, finished, cb); + /**/ + } else { + afterWrite(stream, state, finished, cb); + } + } +} + +function afterWrite(stream, state, finished, cb) { + if (!finished) onwriteDrain(stream, state); + state.pendingcb--; + cb(); + finishMaybe(stream, state); +} + +// Must force callback to be called on nextTick, so that we don't +// emit 'drain' before the write() consumer gets the 'false' return +// value, and has a chance to attach a 'drain' listener. +function onwriteDrain(stream, state) { + if (state.length === 0 && state.needDrain) { + state.needDrain = false; + stream.emit('drain'); + } +} + +// if there's something in the buffer waiting, then process it +function clearBuffer(stream, state) { + state.bufferProcessing = true; + var entry = state.bufferedRequest; + + if (stream._writev && entry && entry.next) { + // Fast case, write everything using _writev() + var l = state.bufferedRequestCount; + var buffer = new Array(l); + var holder = state.corkedRequestsFree; + holder.entry = entry; + + var count = 0; + while (entry) { + buffer[count] = entry; + entry = entry.next; + count += 1; + } + + doWrite(stream, state, true, state.length, buffer, '', holder.finish); + + // doWrite is almost always async, defer these to save a bit of time + // as the hot path ends with doWrite + state.pendingcb++; + state.lastBufferedRequest = null; + if (holder.next) { + state.corkedRequestsFree = holder.next; + holder.next = null; + } else { + state.corkedRequestsFree = new CorkedRequest(state); + } + } else { + // Slow case, write chunks one-by-one + while (entry) { + var chunk = entry.chunk; + var encoding = entry.encoding; + var cb = entry.callback; + var len = state.objectMode ? 1 : chunk.length; + + doWrite(stream, state, false, len, chunk, encoding, cb); + entry = entry.next; + // if we didn't call the onwrite immediately, then + // it means that we need to wait until it does. + // also, that means that the chunk and cb are currently + // being processed, so move the buffer counter past them. + if (state.writing) { + break; + } + } + + if (entry === null) state.lastBufferedRequest = null; + } + + state.bufferedRequestCount = 0; + state.bufferedRequest = entry; + state.bufferProcessing = false; +} + +Writable.prototype._write = function (chunk, encoding, cb) { + cb(new Error('_write() is not implemented')); +}; + +Writable.prototype._writev = null; + +Writable.prototype.end = function (chunk, encoding, cb) { + var state = this._writableState; + + if (typeof chunk === 'function') { + cb = chunk; + chunk = null; + encoding = null; + } else if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); + + // .end() fully uncorks + if (state.corked) { + state.corked = 1; + this.uncork(); + } + + // ignore unnecessary end() calls. + if (!state.ending && !state.finished) endWritable(this, state, cb); +}; + +function needFinish(state) { + return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; +} + +function prefinish(stream, state) { + if (!state.prefinished) { + state.prefinished = true; + stream.emit('prefinish'); + } +} + +function finishMaybe(stream, state) { + var need = needFinish(state); + if (need) { + if (state.pendingcb === 0) { + prefinish(stream, state); + state.finished = true; + stream.emit('finish'); + } else { + prefinish(stream, state); + } + } + return need; +} + +function endWritable(stream, state, cb) { + state.ending = true; + finishMaybe(stream, state); + if (cb) { + if (state.finished) processNextTick(cb);else stream.once('finish', cb); + } + state.ended = true; + stream.writable = false; +} + +// It seems a linked list but it is not +// there will be only 2 of these for each stream +function CorkedRequest(state) { + var _this = this; + + this.next = null; + this.entry = null; + this.finish = function (err) { + var entry = _this.entry; + _this.entry = null; + while (entry) { + var cb = entry.callback; + state.pendingcb--; + cb(err); + entry = entry.next; + } + if (state.corkedRequestsFree) { + state.corkedRequestsFree.next = _this; + } else { + state.corkedRequestsFree = _this; + } + }; +} \ No newline at end of file diff --git a/node_modules/through2/node_modules/readable-stream/lib/internal/streams/BufferList.js b/node_modules/through2/node_modules/readable-stream/lib/internal/streams/BufferList.js new file mode 100644 index 0000000..e4bfcf0 --- /dev/null +++ b/node_modules/through2/node_modules/readable-stream/lib/internal/streams/BufferList.js @@ -0,0 +1,64 @@ +'use strict'; + +var Buffer = require('buffer').Buffer; +/**/ +var bufferShim = require('buffer-shims'); +/**/ + +module.exports = BufferList; + +function BufferList() { + this.head = null; + this.tail = null; + this.length = 0; +} + +BufferList.prototype.push = function (v) { + var entry = { data: v, next: null }; + if (this.length > 0) this.tail.next = entry;else this.head = entry; + this.tail = entry; + ++this.length; +}; + +BufferList.prototype.unshift = function (v) { + var entry = { data: v, next: this.head }; + if (this.length === 0) this.tail = entry; + this.head = entry; + ++this.length; +}; + +BufferList.prototype.shift = function () { + if (this.length === 0) return; + var ret = this.head.data; + if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; + --this.length; + return ret; +}; + +BufferList.prototype.clear = function () { + this.head = this.tail = null; + this.length = 0; +}; + +BufferList.prototype.join = function (s) { + if (this.length === 0) return ''; + var p = this.head; + var ret = '' + p.data; + while (p = p.next) { + ret += s + p.data; + }return ret; +}; + +BufferList.prototype.concat = function (n) { + if (this.length === 0) return bufferShim.alloc(0); + if (this.length === 1) return this.head.data; + var ret = bufferShim.allocUnsafe(n >>> 0); + var p = this.head; + var i = 0; + while (p) { + p.data.copy(ret, i); + i += p.data.length; + p = p.next; + } + return ret; +}; \ No newline at end of file diff --git a/node_modules/through2/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/node_modules/through2/node_modules/readable-stream/lib/internal/streams/stream-browser.js new file mode 100644 index 0000000..9332a3f --- /dev/null +++ b/node_modules/through2/node_modules/readable-stream/lib/internal/streams/stream-browser.js @@ -0,0 +1 @@ +module.exports = require('events').EventEmitter; diff --git a/node_modules/through2/node_modules/readable-stream/lib/internal/streams/stream.js b/node_modules/through2/node_modules/readable-stream/lib/internal/streams/stream.js new file mode 100644 index 0000000..ce2ad5b --- /dev/null +++ b/node_modules/through2/node_modules/readable-stream/lib/internal/streams/stream.js @@ -0,0 +1 @@ +module.exports = require('stream'); diff --git a/node_modules/through2/node_modules/readable-stream/package.json b/node_modules/through2/node_modules/readable-stream/package.json new file mode 100644 index 0000000..53d4691 --- /dev/null +++ b/node_modules/through2/node_modules/readable-stream/package.json @@ -0,0 +1,134 @@ +{ + "_args": [ + [ + { + "raw": "readable-stream@^2.1.5", + "scope": null, + "escapedName": "readable-stream", + "name": "readable-stream", + "rawSpec": "^2.1.5", + "spec": ">=2.1.5 <3.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/through2" + ] + ], + "_from": "readable-stream@>=2.1.5 <3.0.0", + "_id": "readable-stream@2.2.9", + "_inCache": true, + "_location": "/through2/readable-stream", + "_nodeVersion": "6.10.1", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/readable-stream-2.2.9.tgz_1491638759718_0.9035766560118645" + }, + "_npmUser": { + "name": "matteo.collina", + "email": "hello@matteocollina.com" + }, + "_npmVersion": "3.10.10", + "_phantomChildren": {}, + "_requested": { + "raw": "readable-stream@^2.1.5", + "scope": null, + "escapedName": "readable-stream", + "name": "readable-stream", + "rawSpec": "^2.1.5", + "spec": ">=2.1.5 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/through2" + ], + "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.9.tgz", + "_shasum": "cf78ec6f4a6d1eb43d26488cac97f042e74b7fc8", + "_shrinkwrap": null, + "_spec": "readable-stream@^2.1.5", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/through2", + "browser": { + "util": false, + "./readable.js": "./readable-browser.js", + "./writable.js": "./writable-browser.js", + "./duplex.js": "./duplex-browser.js", + "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js" + }, + "bugs": { + "url": "https://github.com/nodejs/readable-stream/issues" + }, + "dependencies": { + "buffer-shims": "~1.0.0", + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "string_decoder": "~1.0.0", + "util-deprecate": "~1.0.1" + }, + "description": "Streams3, a user-land copy of the stream library from Node.js", + "devDependencies": { + "assert": "~1.4.0", + "babel-polyfill": "^6.9.1", + "buffer": "^4.9.0", + "nyc": "^6.4.0", + "tap": "~0.7.1", + "tape": "~4.5.1", + "zuul": "~3.10.0" + }, + "directories": {}, + "dist": { + "shasum": "cf78ec6f4a6d1eb43d26488cac97f042e74b7fc8", + "tarball": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.9.tgz" + }, + "gitHead": "16eca30fe46a937403502a391859ef51625bcc53", + "homepage": "https://github.com/nodejs/readable-stream#readme", + "keywords": [ + "readable", + "stream", + "pipe" + ], + "license": "MIT", + "main": "readable.js", + "maintainers": [ + { + "name": "cwmma", + "email": "calvin.metcalf@gmail.com" + }, + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "matteo.collina", + "email": "hello@matteocollina.com" + }, + { + "name": "rvagg", + "email": "rod@vagg.org" + }, + { + "name": "tootallnate", + "email": "nathan@tootallnate.net" + } + ], + "name": "readable-stream", + "nyc": { + "include": [ + "lib/**.js" + ] + }, + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/nodejs/readable-stream.git" + }, + "scripts": { + "browser": "npm run write-zuul && zuul --browser-retries 2 -- test/browser.js", + "cover": "nyc npm test", + "local": "zuul --local 3000 --no-coverage -- test/browser.js", + "report": "nyc report --reporter=lcov", + "test": "tap test/parallel/*.js test/ours/*.js", + "write-zuul": "printf \"ui: tape\nbrowsers:\n - name: $BROWSER_NAME\n version: $BROWSER_VERSION\n\">.zuul.yml" + }, + "version": "2.2.9" +} diff --git a/node_modules/through2/node_modules/readable-stream/passthrough.js b/node_modules/through2/node_modules/readable-stream/passthrough.js new file mode 100644 index 0000000..ffd791d --- /dev/null +++ b/node_modules/through2/node_modules/readable-stream/passthrough.js @@ -0,0 +1 @@ +module.exports = require('./readable').PassThrough diff --git a/node_modules/through2/node_modules/readable-stream/readable-browser.js b/node_modules/through2/node_modules/readable-stream/readable-browser.js new file mode 100644 index 0000000..e503725 --- /dev/null +++ b/node_modules/through2/node_modules/readable-stream/readable-browser.js @@ -0,0 +1,7 @@ +exports = module.exports = require('./lib/_stream_readable.js'); +exports.Stream = exports; +exports.Readable = exports; +exports.Writable = require('./lib/_stream_writable.js'); +exports.Duplex = require('./lib/_stream_duplex.js'); +exports.Transform = require('./lib/_stream_transform.js'); +exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/node_modules/through2/node_modules/readable-stream/readable.js b/node_modules/through2/node_modules/readable-stream/readable.js new file mode 100644 index 0000000..ec89ec5 --- /dev/null +++ b/node_modules/through2/node_modules/readable-stream/readable.js @@ -0,0 +1,19 @@ +var Stream = require('stream'); +if (process.env.READABLE_STREAM === 'disable' && Stream) { + module.exports = Stream; + exports = module.exports = Stream.Readable; + exports.Readable = Stream.Readable; + exports.Writable = Stream.Writable; + exports.Duplex = Stream.Duplex; + exports.Transform = Stream.Transform; + exports.PassThrough = Stream.PassThrough; + exports.Stream = Stream; +} else { + exports = module.exports = require('./lib/_stream_readable.js'); + exports.Stream = Stream || exports; + exports.Readable = exports; + exports.Writable = require('./lib/_stream_writable.js'); + exports.Duplex = require('./lib/_stream_duplex.js'); + exports.Transform = require('./lib/_stream_transform.js'); + exports.PassThrough = require('./lib/_stream_passthrough.js'); +} diff --git a/node_modules/through2/node_modules/readable-stream/transform.js b/node_modules/through2/node_modules/readable-stream/transform.js new file mode 100644 index 0000000..b1baba2 --- /dev/null +++ b/node_modules/through2/node_modules/readable-stream/transform.js @@ -0,0 +1 @@ +module.exports = require('./readable').Transform diff --git a/node_modules/through2/node_modules/readable-stream/writable-browser.js b/node_modules/through2/node_modules/readable-stream/writable-browser.js new file mode 100644 index 0000000..ebdde6a --- /dev/null +++ b/node_modules/through2/node_modules/readable-stream/writable-browser.js @@ -0,0 +1 @@ +module.exports = require('./lib/_stream_writable.js'); diff --git a/node_modules/through2/node_modules/readable-stream/writable.js b/node_modules/through2/node_modules/readable-stream/writable.js new file mode 100644 index 0000000..634ddcb --- /dev/null +++ b/node_modules/through2/node_modules/readable-stream/writable.js @@ -0,0 +1,8 @@ +var Stream = require("stream") +var Writable = require("./lib/_stream_writable.js") + +if (process.env.READABLE_STREAM === 'disable') { + module.exports = Stream && Stream.Writable || Writable +} + +module.exports = Writable diff --git a/node_modules/through2/node_modules/string_decoder/.npmignore b/node_modules/through2/node_modules/string_decoder/.npmignore new file mode 100644 index 0000000..206320c --- /dev/null +++ b/node_modules/through2/node_modules/string_decoder/.npmignore @@ -0,0 +1,2 @@ +build +test diff --git a/node_modules/through2/node_modules/string_decoder/LICENSE b/node_modules/through2/node_modules/string_decoder/LICENSE new file mode 100644 index 0000000..778edb2 --- /dev/null +++ b/node_modules/through2/node_modules/string_decoder/LICENSE @@ -0,0 +1,48 @@ +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. All rights reserved. + +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. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +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. +""" + diff --git a/node_modules/through2/node_modules/string_decoder/README.md b/node_modules/through2/node_modules/string_decoder/README.md new file mode 100644 index 0000000..13d827d --- /dev/null +++ b/node_modules/through2/node_modules/string_decoder/README.md @@ -0,0 +1,30 @@ +# string_decoder + +***Node-core v7.0.0 string_decoder for userland*** + + +[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/) +[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/) + + +[![Sauce Test Status](https://saucelabs.com/browser-matrix/string_decoder.svg)](https://saucelabs.com/u/string_decoder) + +```bash +npm install --save string_decoder +``` + +***Node-core string_decoderstring_decoder for userland*** + +This package is a mirror of the string_decoder implementation in Node-core. + +Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v7.8.0/docs/api/). + +As of version 1.0.0 **string_decoder** uses semantic versioning. + +## Previous versions + +Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. + +## Update + +The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version. diff --git a/node_modules/through2/node_modules/string_decoder/lib/string_decoder.js b/node_modules/through2/node_modules/string_decoder/lib/string_decoder.js new file mode 100644 index 0000000..696d7ab --- /dev/null +++ b/node_modules/through2/node_modules/string_decoder/lib/string_decoder.js @@ -0,0 +1,273 @@ +'use strict'; + +var Buffer = require('buffer').Buffer; +var bufferShim = require('buffer-shims'); + +var isEncoding = Buffer.isEncoding || function (encoding) { + encoding = '' + encoding; + switch (encoding && encoding.toLowerCase()) { + case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw': + return true; + default: + return false; + } +}; + +function _normalizeEncoding(enc) { + if (!enc) return 'utf8'; + var retried; + while (true) { + switch (enc) { + case 'utf8': + case 'utf-8': + return 'utf8'; + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return 'utf16le'; + case 'latin1': + case 'binary': + return 'latin1'; + case 'base64': + case 'ascii': + case 'hex': + return enc; + default: + if (retried) return; // undefined + enc = ('' + enc).toLowerCase(); + retried = true; + } + } +}; + +// Do not cache `Buffer.isEncoding` when checking encoding names as some +// modules monkey-patch it to support additional encodings +function normalizeEncoding(enc) { + var nenc = _normalizeEncoding(enc); + if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc); + return nenc || enc; +} + +// StringDecoder provides an interface for efficiently splitting a series of +// buffers into a series of JS strings without breaking apart multi-byte +// characters. +exports.StringDecoder = StringDecoder; +function StringDecoder(encoding) { + this.encoding = normalizeEncoding(encoding); + var nb; + switch (this.encoding) { + case 'utf16le': + this.text = utf16Text; + this.end = utf16End; + nb = 4; + break; + case 'utf8': + this.fillLast = utf8FillLast; + nb = 4; + break; + case 'base64': + this.text = base64Text; + this.end = base64End; + nb = 3; + break; + default: + this.write = simpleWrite; + this.end = simpleEnd; + return; + } + this.lastNeed = 0; + this.lastTotal = 0; + this.lastChar = bufferShim.allocUnsafe(nb); +} + +StringDecoder.prototype.write = function (buf) { + if (buf.length === 0) return ''; + var r; + var i; + if (this.lastNeed) { + r = this.fillLast(buf); + if (r === undefined) return ''; + i = this.lastNeed; + this.lastNeed = 0; + } else { + i = 0; + } + if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); + return r || ''; +}; + +StringDecoder.prototype.end = utf8End; + +// Returns only complete characters in a Buffer +StringDecoder.prototype.text = utf8Text; + +// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer +StringDecoder.prototype.fillLast = function (buf) { + if (this.lastNeed <= buf.length) { + buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); + return this.lastChar.toString(this.encoding, 0, this.lastTotal); + } + buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); + this.lastNeed -= buf.length; +}; + +// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a +// continuation byte. +function utf8CheckByte(byte) { + if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4; + return -1; +} + +// Checks at most 3 bytes at the end of a Buffer in order to detect an +// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4) +// needed to complete the UTF-8 character (if applicable) are returned. +function utf8CheckIncomplete(self, buf, i) { + var j = buf.length - 1; + if (j < i) return 0; + var nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) self.lastNeed = nb - 1; + return nb; + } + if (--j < i) return 0; + nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) self.lastNeed = nb - 2; + return nb; + } + if (--j < i) return 0; + nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) { + if (nb === 2) nb = 0;else self.lastNeed = nb - 3; + } + return nb; + } + return 0; +} + +// Validates as many continuation bytes for a multi-byte UTF-8 character as +// needed or are available. If we see a non-continuation byte where we expect +// one, we "replace" the validated continuation bytes we've seen so far with +// UTF-8 replacement characters ('\ufffd'), to match v8's UTF-8 decoding +// behavior. The continuation byte check is included three times in the case +// where all of the continuation bytes for a character exist in the same buffer. +// It is also done this way as a slight performance increase instead of using a +// loop. +function utf8CheckExtraBytes(self, buf, p) { + if ((buf[0] & 0xC0) !== 0x80) { + self.lastNeed = 0; + return '\ufffd'.repeat(p); + } + if (self.lastNeed > 1 && buf.length > 1) { + if ((buf[1] & 0xC0) !== 0x80) { + self.lastNeed = 1; + return '\ufffd'.repeat(p + 1); + } + if (self.lastNeed > 2 && buf.length > 2) { + if ((buf[2] & 0xC0) !== 0x80) { + self.lastNeed = 2; + return '\ufffd'.repeat(p + 2); + } + } + } +} + +// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer. +function utf8FillLast(buf) { + var p = this.lastTotal - this.lastNeed; + var r = utf8CheckExtraBytes(this, buf, p); + if (r !== undefined) return r; + if (this.lastNeed <= buf.length) { + buf.copy(this.lastChar, p, 0, this.lastNeed); + return this.lastChar.toString(this.encoding, 0, this.lastTotal); + } + buf.copy(this.lastChar, p, 0, buf.length); + this.lastNeed -= buf.length; +} + +// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a +// partial character, the character's bytes are buffered until the required +// number of bytes are available. +function utf8Text(buf, i) { + var total = utf8CheckIncomplete(this, buf, i); + if (!this.lastNeed) return buf.toString('utf8', i); + this.lastTotal = total; + var end = buf.length - (total - this.lastNeed); + buf.copy(this.lastChar, 0, end); + return buf.toString('utf8', i, end); +} + +// For UTF-8, a replacement character for each buffered byte of a (partial) +// character needs to be added to the output. +function utf8End(buf) { + var r = buf && buf.length ? this.write(buf) : ''; + if (this.lastNeed) return r + '\ufffd'.repeat(this.lastTotal - this.lastNeed); + return r; +} + +// UTF-16LE typically needs two bytes per character, but even if we have an even +// number of bytes available, we need to check if we end on a leading/high +// surrogate. In that case, we need to wait for the next two bytes in order to +// decode the last character properly. +function utf16Text(buf, i) { + if ((buf.length - i) % 2 === 0) { + var r = buf.toString('utf16le', i); + if (r) { + var c = r.charCodeAt(r.length - 1); + if (c >= 0xD800 && c <= 0xDBFF) { + this.lastNeed = 2; + this.lastTotal = 4; + this.lastChar[0] = buf[buf.length - 2]; + this.lastChar[1] = buf[buf.length - 1]; + return r.slice(0, -1); + } + } + return r; + } + this.lastNeed = 1; + this.lastTotal = 2; + this.lastChar[0] = buf[buf.length - 1]; + return buf.toString('utf16le', i, buf.length - 1); +} + +// For UTF-16LE we do not explicitly append special replacement characters if we +// end on a partial character, we simply let v8 handle that. +function utf16End(buf) { + var r = buf && buf.length ? this.write(buf) : ''; + if (this.lastNeed) { + var end = this.lastTotal - this.lastNeed; + return r + this.lastChar.toString('utf16le', 0, end); + } + return r; +} + +function base64Text(buf, i) { + var n = (buf.length - i) % 3; + if (n === 0) return buf.toString('base64', i); + this.lastNeed = 3 - n; + this.lastTotal = 3; + if (n === 1) { + this.lastChar[0] = buf[buf.length - 1]; + } else { + this.lastChar[0] = buf[buf.length - 2]; + this.lastChar[1] = buf[buf.length - 1]; + } + return buf.toString('base64', i, buf.length - n); +} + +function base64End(buf) { + var r = buf && buf.length ? this.write(buf) : ''; + if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed); + return r; +} + +// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex) +function simpleWrite(buf) { + return buf.toString(this.encoding); +} + +function simpleEnd(buf) { + return buf && buf.length ? this.write(buf) : ''; +} \ No newline at end of file diff --git a/node_modules/through2/node_modules/string_decoder/package.json b/node_modules/through2/node_modules/string_decoder/package.json new file mode 100644 index 0000000..8d99ba8 --- /dev/null +++ b/node_modules/through2/node_modules/string_decoder/package.json @@ -0,0 +1,95 @@ +{ + "_args": [ + [ + { + "raw": "string_decoder@~1.0.0", + "scope": null, + "escapedName": "string_decoder", + "name": "string_decoder", + "rawSpec": "~1.0.0", + "spec": ">=1.0.0 <1.1.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/through2/node_modules/readable-stream" + ] + ], + "_from": "string_decoder@>=1.0.0 <1.1.0", + "_id": "string_decoder@1.0.0", + "_inCache": true, + "_location": "/through2/string_decoder", + "_nodeVersion": "7.8.0", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/string_decoder-1.0.0.tgz_1491485897373_0.9406327686738223" + }, + "_npmUser": { + "name": "rvagg", + "email": "rod@vagg.org" + }, + "_npmVersion": "4.4.4", + "_phantomChildren": {}, + "_requested": { + "raw": "string_decoder@~1.0.0", + "scope": null, + "escapedName": "string_decoder", + "name": "string_decoder", + "rawSpec": "~1.0.0", + "spec": ">=1.0.0 <1.1.0", + "type": "range" + }, + "_requiredBy": [ + "/through2/readable-stream" + ], + "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.0.tgz", + "_shasum": "f06f41157b664d86069f84bdbdc9b0d8ab281667", + "_shrinkwrap": null, + "_spec": "string_decoder@~1.0.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/through2/node_modules/readable-stream", + "bugs": { + "url": "https://github.com/rvagg/string_decoder/issues" + }, + "dependencies": { + "buffer-shims": "~1.0.0" + }, + "description": "The string_decoder module from Node core", + "devDependencies": { + "babel-polyfill": "^6.23.0", + "tap": "~0.4.8" + }, + "directories": {}, + "dist": { + "shasum": "f06f41157b664d86069f84bdbdc9b0d8ab281667", + "tarball": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.0.tgz" + }, + "gitHead": "847f2f513a5648857af03adf680c90d833a499d2", + "homepage": "https://github.com/rvagg/string_decoder", + "keywords": [ + "string", + "decoder", + "browser", + "browserify" + ], + "license": "MIT", + "main": "lib/string_decoder.js", + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + }, + { + "name": "rvagg", + "email": "rod@vagg.org" + } + ], + "name": "string_decoder", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/rvagg/string_decoder.git" + }, + "scripts": { + "test": "tap test/parallel/*.js" + }, + "version": "1.0.0" +} diff --git a/node_modules/through2/package.json b/node_modules/through2/package.json new file mode 100644 index 0000000..33ac641 --- /dev/null +++ b/node_modules/through2/package.json @@ -0,0 +1,111 @@ +{ + "_args": [ + [ + { + "raw": "through2@^2.0.0", + "scope": null, + "escapedName": "through2", + "name": "through2", + "rawSpec": "^2.0.0", + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/gulp-util" + ] + ], + "_from": "through2@>=2.0.0 <3.0.0", + "_id": "through2@2.0.3", + "_inCache": true, + "_location": "/through2", + "_nodeVersion": "7.2.0", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/through2-2.0.3.tgz_1480373529377_0.264686161885038" + }, + "_npmUser": { + "name": "rvagg", + "email": "rod@vagg.org" + }, + "_npmVersion": "3.10.9", + "_phantomChildren": { + "buffer-shims": "1.0.0", + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "util-deprecate": "1.0.2" + }, + "_requested": { + "raw": "through2@^2.0.0", + "scope": null, + "escapedName": "through2", + "name": "through2", + "rawSpec": "^2.0.0", + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/gulp-util" + ], + "_resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "_shasum": "0004569b37c7c74ba39c43f3ced78d1ad94140be", + "_shrinkwrap": null, + "_spec": "through2@^2.0.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/gulp-util", + "author": { + "name": "Rod Vagg", + "email": "r@va.gg", + "url": "https://github.com/rvagg" + }, + "bugs": { + "url": "https://github.com/rvagg/through2/issues" + }, + "dependencies": { + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" + }, + "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise", + "devDependencies": { + "bl": "~1.1.2", + "faucet": "0.0.1", + "stream-spigot": "~3.0.5", + "tape": "~4.6.2" + }, + "directories": {}, + "dist": { + "shasum": "0004569b37c7c74ba39c43f3ced78d1ad94140be", + "tarball": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz" + }, + "gitHead": "4383b10b2cb6a32ae215760715b317513abe609f", + "homepage": "https://github.com/rvagg/through2#readme", + "keywords": [ + "stream", + "streams2", + "through", + "transform" + ], + "license": "MIT", + "main": "through2.js", + "maintainers": [ + { + "name": "rvagg", + "email": "rod@vagg.org" + }, + { + "name": "bryce", + "email": "bryce@ravenwall.com" + } + ], + "name": "through2", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/rvagg/through2.git" + }, + "scripts": { + "test": "node test/test.js | faucet", + "test-local": "brtapsauce-local test/basic-test.js" + }, + "version": "2.0.3" +} diff --git a/node_modules/through2/through2.js b/node_modules/through2/through2.js new file mode 100644 index 0000000..5b7a880 --- /dev/null +++ b/node_modules/through2/through2.js @@ -0,0 +1,96 @@ +var Transform = require('readable-stream/transform') + , inherits = require('util').inherits + , xtend = require('xtend') + +function DestroyableTransform(opts) { + Transform.call(this, opts) + this._destroyed = false +} + +inherits(DestroyableTransform, Transform) + +DestroyableTransform.prototype.destroy = function(err) { + if (this._destroyed) return + this._destroyed = true + + var self = this + process.nextTick(function() { + if (err) + self.emit('error', err) + self.emit('close') + }) +} + +// a noop _transform function +function noop (chunk, enc, callback) { + callback(null, chunk) +} + + +// create a new export function, used by both the main export and +// the .ctor export, contains common logic for dealing with arguments +function through2 (construct) { + return function (options, transform, flush) { + if (typeof options == 'function') { + flush = transform + transform = options + options = {} + } + + if (typeof transform != 'function') + transform = noop + + if (typeof flush != 'function') + flush = null + + return construct(options, transform, flush) + } +} + + +// main export, just make me a transform stream! +module.exports = through2(function (options, transform, flush) { + var t2 = new DestroyableTransform(options) + + t2._transform = transform + + if (flush) + t2._flush = flush + + return t2 +}) + + +// make me a reusable prototype that I can `new`, or implicitly `new` +// with a constructor call +module.exports.ctor = through2(function (options, transform, flush) { + function Through2 (override) { + if (!(this instanceof Through2)) + return new Through2(override) + + this.options = xtend(options, override) + + DestroyableTransform.call(this, this.options) + } + + inherits(Through2, DestroyableTransform) + + Through2.prototype._transform = transform + + if (flush) + Through2.prototype._flush = flush + + return Through2 +}) + + +module.exports.obj = through2(function (options, transform, flush) { + var t2 = new DestroyableTransform(xtend({ objectMode: true, highWaterMark: 16 }, options)) + + t2._transform = transform + + if (flush) + t2._flush = flush + + return t2 +}) diff --git a/node_modules/tildify/index.js b/node_modules/tildify/index.js new file mode 100644 index 0000000..ee8eb93 --- /dev/null +++ b/node_modules/tildify/index.js @@ -0,0 +1,9 @@ +'use strict'; +var path = require('path'); +var osHomedir = require('os-homedir'); +var home = osHomedir(); + +module.exports = function (str) { + str = path.normalize(str) + path.sep; + return (str.indexOf(home) === 0 ? str.replace(home + path.sep, '~' + path.sep) : str).slice(0, -1); +}; diff --git a/node_modules/tildify/license b/node_modules/tildify/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/tildify/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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. diff --git a/node_modules/tildify/package.json b/node_modules/tildify/package.json new file mode 100644 index 0000000..f0632a8 --- /dev/null +++ b/node_modules/tildify/package.json @@ -0,0 +1,108 @@ +{ + "_args": [ + [ + { + "raw": "tildify@^1.0.0", + "scope": null, + "escapedName": "tildify", + "name": "tildify", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/gulp" + ] + ], + "_from": "tildify@>=1.0.0 <2.0.0", + "_id": "tildify@1.2.0", + "_inCache": true, + "_location": "/tildify", + "_nodeVersion": "4.4.2", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/tildify-1.2.0.tgz_1460447164123_0.6345257461071014" + }, + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "2.15.0", + "_phantomChildren": {}, + "_requested": { + "raw": "tildify@^1.0.0", + "scope": null, + "escapedName": "tildify", + "name": "tildify", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/gulp" + ], + "_resolved": "https://registry.npmjs.org/tildify/-/tildify-1.2.0.tgz", + "_shasum": "dcec03f55dca9b7aa3e5b04f21817eb56e63588a", + "_shrinkwrap": null, + "_spec": "tildify@^1.0.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/gulp", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/tildify/issues" + }, + "dependencies": { + "os-homedir": "^1.0.0" + }, + "description": "Convert an absolute path to a tilde path: `/Users/sindresorhus/dev` → `~/dev`", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "dcec03f55dca9b7aa3e5b04f21817eb56e63588a", + "tarball": "https://registry.npmjs.org/tildify/-/tildify-1.2.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "c323a7ebf1098dfbf3e333a93c3f0c51c6ca48e0", + "homepage": "https://github.com/sindresorhus/tildify#readme", + "keywords": [ + "unexpand", + "homedir", + "tilde", + "tildify", + "collapse", + "path", + "home", + "dir", + "directory", + "user", + "expand" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "tildify", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/tildify.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.2.0" +} diff --git a/node_modules/tildify/readme.md b/node_modules/tildify/readme.md new file mode 100644 index 0000000..2a70d69 --- /dev/null +++ b/node_modules/tildify/readme.md @@ -0,0 +1,30 @@ +# tildify [![Build Status](https://travis-ci.org/sindresorhus/tildify.svg?branch=master)](https://travis-ci.org/sindresorhus/tildify) + +> Convert an absolute path to a tilde path: `/Users/sindresorhus/dev` → `~/dev` + + +## Install + +``` +$ npm install --save tildify +``` + + +## Usage + +```js +const tildify = require('tildify'); + +tildify('/Users/sindresorhus/dev'); +//=> '~/dev' +``` + + +## Related + +See [untildify](https://github.com/sindresorhus/untildify) for the inverse. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/time-stamp/LICENSE b/node_modules/time-stamp/LICENSE new file mode 100644 index 0000000..1e49edf --- /dev/null +++ b/node_modules/time-stamp/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2016, Jon Schlinkert. + +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. diff --git a/node_modules/time-stamp/README.md b/node_modules/time-stamp/README.md new file mode 100644 index 0000000..d4dd0bf --- /dev/null +++ b/node_modules/time-stamp/README.md @@ -0,0 +1,121 @@ +# time-stamp [![NPM version](https://img.shields.io/npm/v/time-stamp.svg?style=flat)](https://www.npmjs.com/package/time-stamp) [![NPM downloads](https://img.shields.io/npm/dm/time-stamp.svg?style=flat)](https://npmjs.org/package/time-stamp) [![Build Status](https://img.shields.io/travis/jonschlinkert/time-stamp.svg?style=flat)](https://travis-ci.org/jonschlinkert/time-stamp) + +> Get a formatted timestamp. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install time-stamp --save +``` + +## Usage + +```js +var timestamp = require('time-stamp'); + +timestamp(); +//=> '2015:04:01' + +timestamp('YYYY:MM:DD'); +//=> '2015:04:01' + +timestamp('[YYYY:MM:DD]'); +//=> '[2015:04:01]' + +timestamp('YYYY/MM/DD'); +//=> '2015/04/01' + +timestamp('YYYY:MM'); +//=> '2015:04' + +timestamp('YYYY'); +//=> '2015' + +timestamp('MM'); +//=> '04' + +timestamp('DD'); +//=> '01' + +timestamp('HH'); +//=> '01' + +timestamp('mm'); +//=> '59' + +timestamp('ss'); +//=> '09' + +timestamp('ms'); +//=> '783' +``` + +**Valid patterns** + +* `YYYY`: full year (ex: **2015**) +* `MM`: month (ex: **04**) +* `DD`: day (ex: **01**) +* `HH`: hours (ex: **12**) +* `mm`: minutes (ex: **59**) +* `ss`: seconds (ex: **09**) +* `ms`: milliseconds (ex: **532**) + +## Related projects + +You might also be interested in these projects: + +* [days](https://www.npmjs.com/package/days): Days of the week. | [homepage](https://github.com/jonschlinkert/days) +* [iso-week](https://www.npmjs.com/package/iso-week): Get the ISO week of the year. | [homepage](https://github.com/jonschlinkert/iso-week) +* [month](https://www.npmjs.com/package/month): Get the name or number of the current month or any month of the year. | [homepage](https://github.com/datetime/month) +* [months](https://www.npmjs.com/package/months): Months of the year. | [homepage](https://github.com/jonschlinkert/months) +* [o-clock](https://www.npmjs.com/package/o-clock): Simple utility for displaying the time in 12-hour clock format. | [homepage](https://github.com/jonschlinkert/o-clock) +* [seconds](https://www.npmjs.com/package/seconds): Get the number of seconds for a minute, hour, day and week. | [homepage](https://github.com/jonschlinkert/seconds) +* [week](https://www.npmjs.com/package/week): Get the current week number. | [homepage](https://github.com/jonschlinkert/week) +* [weekday](https://www.npmjs.com/package/weekday): Get the name and number of the current weekday. Or get the name of the… [more](https://www.npmjs.com/package/weekday) | [homepage](https://github.com/jonschlinkert/weekday) +* [year](https://www.npmjs.com/package/year): Simple utility to get the current year with 2 or 4 digits. | [homepage](https://github.com/jonschlinkert/year) + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/time-stamp/issues/new). + +## Building docs + +Generate readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install verb && npm run docs +``` + +Or, if [verb](https://github.com/verbose/verb) is installed globally: + +```sh +$ verb +``` + +## Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +## Author + +**Jon Schlinkert** + +Follow me on GitHub or Twitter for updates about time-stamp and my other libraries: + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/time-stamp/blob/master/LICENSE). + +*** + +_This file was generated by [verb](https://github.com/verbose/verb), v, on April 07, 2016._ \ No newline at end of file diff --git a/node_modules/time-stamp/index.js b/node_modules/time-stamp/index.js new file mode 100644 index 0000000..1a400ad --- /dev/null +++ b/node_modules/time-stamp/index.js @@ -0,0 +1,47 @@ +/*! + * time-stamp + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +/** + * Parse the given pattern and return a formatted + * timestamp. + * + * @param {String} `pattern` Date pattern. + * @param {Date} `date` Date object. + * @return {String} + */ + +module.exports = function timestamp(pattern, date) { + if (typeof pattern !== 'string') { + date = pattern; + pattern = 'YYYY:MM:DD'; + } + date = date || new Date(); + return pattern.replace(/([YMDHms]{2,4})(:\/)?/g, function(_, key, sep) { + var increment = method(key); + if (!increment) return _; + sep = sep || ''; + + var res = '00' + String(date[increment[0]]() + (increment[2] || 0)); + return res.slice(-increment[1]) + sep; + }); +}; + +function method(key) { + return ({ + YYYY: ['getFullYear', 4], + YY: ['getFullYear', 2], + // getMonth is zero-based, thus the extra increment field + MM: ['getMonth', 2, 1], + DD: ['getDate', 2], + HH: ['getHours', 2], + mm: ['getMinutes', 2], + ss: ['getSeconds', 2], + ms: ['getMilliseconds', 3] + })[key]; +} diff --git a/node_modules/time-stamp/package.json b/node_modules/time-stamp/package.json new file mode 100644 index 0000000..7de6b80 --- /dev/null +++ b/node_modules/time-stamp/package.json @@ -0,0 +1,136 @@ +{ + "_args": [ + [ + { + "raw": "time-stamp@^1.0.0", + "scope": null, + "escapedName": "time-stamp", + "name": "time-stamp", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/fancy-log" + ] + ], + "_from": "time-stamp@>=1.0.0 <2.0.0", + "_id": "time-stamp@1.0.1", + "_inCache": true, + "_location": "/time-stamp", + "_nodeVersion": "5.5.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/time-stamp-1.0.1.tgz_1460014127254_0.9380003691185266" + }, + "_npmUser": { + "name": "jonschlinkert", + "email": "github@sellside.com" + }, + "_npmVersion": "3.6.0", + "_phantomChildren": {}, + "_requested": { + "raw": "time-stamp@^1.0.0", + "scope": null, + "escapedName": "time-stamp", + "name": "time-stamp", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fancy-log" + ], + "_resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.0.1.tgz", + "_shasum": "9f4bd23559c9365966f3302dbba2b07c6b99b151", + "_shrinkwrap": null, + "_spec": "time-stamp@^1.0.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/fancy-log", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/time-stamp/issues" + }, + "dependencies": {}, + "description": "Get a formatted timestamp.", + "devDependencies": { + "gulp-format-md": "^0.1.7", + "mocha": "^2.4.5", + "pad-left": "^2.0.3" + }, + "directories": {}, + "dist": { + "shasum": "9f4bd23559c9365966f3302dbba2b07c6b99b151", + "tarball": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.0.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "66fc623cf26a5f85fe22a6a7acc91568cddf301c", + "homepage": "https://github.com/jonschlinkert/time-stamp", + "keywords": [ + "console", + "date", + "format", + "formatting", + "log", + "pretty", + "stamp", + "terminal", + "time", + "time-stamp" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "jonschlinkert", + "email": "github@sellside.com" + } + ], + "name": "time-stamp", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/time-stamp.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "days", + "iso-week", + "month", + "months", + "o-clock", + "seconds", + "week", + "weekday", + "year" + ] + }, + "reflinks": [ + "verb" + ], + "lint": { + "reflinks": true + } + }, + "version": "1.0.1" +} diff --git a/node_modules/timers-ext/.lint b/node_modules/timers-ext/.lint new file mode 100644 index 0000000..756d6c1 --- /dev/null +++ b/node_modules/timers-ext/.lint @@ -0,0 +1,17 @@ +@root + +es5 +module + +tabs +indent 2 +maxlen 100 + +ass +nomen +plusplus + +predef+ clearInterval, clearTimeout, setInterval, setTimeout + +./once.js +bitwise diff --git a/node_modules/timers-ext/.npmignore b/node_modules/timers-ext/.npmignore new file mode 100644 index 0000000..155e41f --- /dev/null +++ b/node_modules/timers-ext/.npmignore @@ -0,0 +1,4 @@ +.DS_Store +/node_modules +/npm-debug.log +/.lintcache diff --git a/node_modules/timers-ext/.travis.yml b/node_modules/timers-ext/.travis.yml new file mode 100644 index 0000000..bdfa45b --- /dev/null +++ b/node_modules/timers-ext/.travis.yml @@ -0,0 +1,12 @@ +sudo: false # http://docs.travis-ci.com/user/workers/container-based-infrastructure/ +language: node_js +node_js: + - 4 + - 6 + - 7 + +notifications: + email: + - medikoo+timers-ext@medikoo.com + +script: "npm test && npm run lint" diff --git a/node_modules/timers-ext/CHANGES b/node_modules/timers-ext/CHANGES new file mode 100644 index 0000000..eecc275 --- /dev/null +++ b/node_modules/timers-ext/CHANGES @@ -0,0 +1,21 @@ +v0.1.2 -- 2017.04.03 +* `throttle` util + +v0.1.1 -- 2017.03.15 +* Workaround IE8 resolution issue +* Support any callable objects as callbacks +* Improve documentation +* Fix spelling of LICENSE +* Configure lint scripts +* Update dependencies + +v0.1.0 -- 2014.04.27 +First production ready version +- Depend strictly on npm hosted package versions +- Full documentation +- Add `once` (moved from next-tick project) +- Make timeout value optional in delay +- Rename MAX_VALUE into MAX_TIMEOUT + +v0.0.0 -- 2013.08.27 +Initial (dev) version diff --git a/node_modules/timers-ext/LICENSE b/node_modules/timers-ext/LICENSE new file mode 100644 index 0000000..d7c36d5 --- /dev/null +++ b/node_modules/timers-ext/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (C) 2013-2017 Mariusz Nowak (www.medikoo.com) + +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. diff --git a/node_modules/timers-ext/README.md b/node_modules/timers-ext/README.md new file mode 100644 index 0000000..904b3c0 --- /dev/null +++ b/node_modules/timers-ext/README.md @@ -0,0 +1,55 @@ +# timers-ext +## Timers extensions + +### Installation + + $ npm install timers-ext + +To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/) + +### API + +#### MAX\_TIMEOUT _(timers-ext/max-timeout)_ + +Maximum possible timeout value in milliseconds. It equals to maximum positive value for 32bit signed integer, so _2³¹ (2147483647)_, which makes it around 24.9 days + +#### delay(fn[, timeout]) _(timers-ext/delay)_ + +Returns function which when invoked will call _fn_ function after specified +_timeout_. If _timeout_ is not provided [nextTick](https://github.com/medikoo/next-tick/#next-tick) propagation is used. + +#### once(fn[, timeout]) _(timers-ext/once)_ + +Makes sure to execute _fn_ function only once after a defined interval of time (debounce). If _timeout_ is not provided [nextTick](https://github.com/medikoo/next-tick/#next-tick) propagation is used. + + +```javascript +var nextTick = require('next-tick'); +var logFoo = function () { console.log('foo'); }; +var logFooOnce = require('timers-ext/once')(logFoo); + +logFooOnce(); +logFooOnce(); // ignored, logFoo will be logged only once +logFooOnce(); // ignored + + +nextTick(function () { + logFooOnce(); // Invokes another log (as tick passed) + logFooOnce(); // ignored + logFooOnce(); // ignored +}); + +``` + +#### validTimeout(timeout) _(timers-ext/valid-timeout)_ + +Validates timeout value. +For `NaN` resolved _timeout_ `0` is returned. +If _timeout_ resolves to a number: +- for _timeout < 0_ `0` is returned +- for _0 >= timeout <= [MAX_TIMEOUT](#max_timeout-timers-extmax-timeout)_, `timeout` value is returned +- for _timeout > [MAX_TIMEOUT](#max_timeout-timers-extmax-timeout)_ exception is thrown + +### Tests [![Build Status](https://travis-ci.org/medikoo/timers-ext.png)](https://travis-ci.org/medikoo/timers-ext) + + $ npm test diff --git a/node_modules/timers-ext/delay.js b/node_modules/timers-ext/delay.js new file mode 100644 index 0000000..4de6e99 --- /dev/null +++ b/node_modules/timers-ext/delay.js @@ -0,0 +1,19 @@ +'use strict'; + +var callable = require('es5-ext/object/valid-callable') + , nextTick = require('next-tick') + , validTimeout = require('./valid-timeout') + + , apply = Function.prototype.apply; + +module.exports = function (fn/*, timeout*/) { + var delay, timeout = arguments[1]; + callable(fn); + if (timeout === undefined) { + delay = nextTick; + } else { + timeout = validTimeout(timeout); + delay = setTimeout; + } + return function () { return delay(apply.bind(fn, this, arguments), timeout); }; +}; diff --git a/node_modules/timers-ext/max-timeout.js b/node_modules/timers-ext/max-timeout.js new file mode 100644 index 0000000..671fd24 --- /dev/null +++ b/node_modules/timers-ext/max-timeout.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = 2147483647; diff --git a/node_modules/timers-ext/once.js b/node_modules/timers-ext/once.js new file mode 100644 index 0000000..8195e12 --- /dev/null +++ b/node_modules/timers-ext/once.js @@ -0,0 +1,41 @@ +// It's actually "debounce" + +'use strict'; + +var callable = require('es5-ext/object/valid-callable') + , nextTick = require('next-tick') + , validTimeout = require('./valid-timeout') + + , apply = Function.prototype.apply; + +module.exports = function (fn/*, timeout*/) { + var scheduled, run, context, args, delay, timeout = arguments[1], handle; + callable(fn); + if (timeout == null) { + delay = nextTick; + } else { + timeout = validTimeout(timeout); + delay = setTimeout; + } + run = function () { + if (!scheduled) return; // IE8 tends to not clear immediate timeouts properly + scheduled = false; + handle = null; + apply.call(fn, context, args); + context = null; + args = null; + }; + return function () { + if (scheduled) { + if (handle == null) { + // 'nextTick' based, no room for debounce + return; + } + clearTimeout(handle); + } + scheduled = true; + context = this; + args = arguments; + handle = delay(run, timeout); + }; +}; diff --git a/node_modules/timers-ext/package.json b/node_modules/timers-ext/package.json new file mode 100644 index 0000000..dd5a63d --- /dev/null +++ b/node_modules/timers-ext/package.json @@ -0,0 +1,102 @@ +{ + "_args": [ + [ + { + "raw": "timers-ext@0.1", + "scope": null, + "escapedName": "timers-ext", + "name": "timers-ext", + "rawSpec": "0.1", + "spec": ">=0.1.0 <0.2.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/cli-color" + ] + ], + "_from": "timers-ext@>=0.1.0 <0.2.0", + "_id": "timers-ext@0.1.2", + "_inCache": true, + "_location": "/timers-ext", + "_nodeVersion": "7.8.0", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/timers-ext-0.1.2.tgz_1491225304574_0.5325026088394225" + }, + "_npmUser": { + "name": "medikoo", + "email": "medikoo+npm@medikoo.com" + }, + "_npmVersion": "4.2.0", + "_phantomChildren": {}, + "_requested": { + "raw": "timers-ext@0.1", + "scope": null, + "escapedName": "timers-ext", + "name": "timers-ext", + "rawSpec": "0.1", + "spec": ">=0.1.0 <0.2.0", + "type": "range" + }, + "_requiredBy": [ + "/cli-color", + "/memoizee" + ], + "_resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.2.tgz", + "_shasum": "61cc47a76c1abd3195f14527f978d58ae94c5204", + "_shrinkwrap": null, + "_spec": "timers-ext@0.1", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/cli-color", + "author": { + "name": "Mariusz Nowak", + "email": "medyk@medikoo.com", + "url": "http://www.medikoo.com/" + }, + "bugs": { + "url": "https://github.com/medikoo/timers-ext/issues" + }, + "dependencies": { + "es5-ext": "~0.10.14", + "next-tick": "1" + }, + "description": "Timers extensions", + "devDependencies": { + "tad": "~0.2.7", + "xlint": "~0.2.2", + "xlint-jslint-medikoo": "~0.1.4" + }, + "directories": {}, + "dist": { + "shasum": "61cc47a76c1abd3195f14527f978d58ae94c5204", + "tarball": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.2.tgz" + }, + "gitHead": "a793f9bd4264fe197f833402ddd45e82ffa2e32d", + "homepage": "https://github.com/medikoo/timers-ext#readme", + "keywords": [ + "timeout", + "delay", + "interval", + "time", + "timer", + "timers" + ], + "license": "MIT", + "maintainers": [ + { + "name": "medikoo", + "email": "medikoo+npm@medikoo.com" + } + ], + "name": "timers-ext", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/medikoo/timers-ext.git" + }, + "scripts": { + "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream", + "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch", + "test": "node node_modules/tad/bin/tad" + }, + "version": "0.1.2" +} diff --git a/node_modules/timers-ext/test/delay.js b/node_modules/timers-ext/test/delay.js new file mode 100644 index 0000000..96aae6b --- /dev/null +++ b/node_modules/timers-ext/test/delay.js @@ -0,0 +1,23 @@ +'use strict'; + +module.exports = function (t, a, d) { + var data, count = 0 + , x = function (a, b, c) { data = [this, a, b, c, ++count]; } + , y = t(x, 200), z = {}; + + a(data, undefined, "Setup"); + y.call(z, 111, 'foo', false); + a(data, undefined, "Immediately"); + setTimeout(function () { + a(data, undefined, "100ms"); + setTimeout(function () { + a.deep(data, [z, 111, 'foo', false, 1], "250ms"); + data = null; + clearTimeout(y()); + setTimeout(function () { + a(data, null, "Clear"); + d(); + }, 300); + }, 150); + }, 100); +}; diff --git a/node_modules/timers-ext/test/max-timeout.js b/node_modules/timers-ext/test/max-timeout.js new file mode 100644 index 0000000..e58f29d --- /dev/null +++ b/node_modules/timers-ext/test/max-timeout.js @@ -0,0 +1,11 @@ +'use strict'; + +module.exports = function (t, a, d) { + var invoked, id; + id = setTimeout(function () { invoked = true; }, t); + setTimeout(function () { + a(invoked, undefined); + clearTimeout(id); + d(); + }, 100); +}; diff --git a/node_modules/timers-ext/test/once.js b/node_modules/timers-ext/test/once.js new file mode 100644 index 0000000..0ceec4e --- /dev/null +++ b/node_modules/timers-ext/test/once.js @@ -0,0 +1,38 @@ +'use strict'; + +module.exports = function (t, a, d) { + var called = 0, fn = t(function () { ++called; }); + + fn(); + fn(); + fn(); + setTimeout(function () { + a(called, 1); + + called = 0; + fn = t(function () { ++called; }, 50); + fn(); + fn(); + fn(); + + setTimeout(function () { + fn(); + fn(); + + setTimeout(function () { + fn(); + fn(); + + setTimeout(function () { + fn(); + fn(); + + setTimeout(function () { + a(called, 1); + d(); + }, 70); + }, 30); + }, 30); + }, 30); + }, 10); +}; diff --git a/node_modules/timers-ext/test/throttle.js b/node_modules/timers-ext/test/throttle.js new file mode 100644 index 0000000..dee66c6 --- /dev/null +++ b/node_modules/timers-ext/test/throttle.js @@ -0,0 +1,33 @@ +'use strict'; + +module.exports = function (t, a, d) { + var called = 0, fn = t(function () { ++called; }, 50); + + fn(); + a(called, 1); + fn(); + fn(); + a(called, 1); + setTimeout(function () { + a(called, 1); + fn(); + setTimeout(function () { + a(called, 2); + fn(); + fn(); + + setTimeout(function () { + a(called, 2); + + setTimeout(function () { + a(called, 3); + + setTimeout(function () { + a(called, 3); + d(); + }, 100); + }, 30); + }, 20); + }, 30); + }, 30); +}; diff --git a/node_modules/timers-ext/test/valid-timeout.js b/node_modules/timers-ext/test/valid-timeout.js new file mode 100644 index 0000000..a4ba817 --- /dev/null +++ b/node_modules/timers-ext/test/valid-timeout.js @@ -0,0 +1,8 @@ +'use strict'; + +module.exports = function (t, a) { + a(t(NaN), 0, "NaN"); + a(t(-343), 0, "Negative"); + a(t(232342), 232342, "Positive"); + a.throws(function () { t(1e23); }, TypeError, "Too large"); +}; diff --git a/node_modules/timers-ext/throttle.js b/node_modules/timers-ext/throttle.js new file mode 100644 index 0000000..4aef38f --- /dev/null +++ b/node_modules/timers-ext/throttle.js @@ -0,0 +1,33 @@ +'use strict'; + +var callable = require('es5-ext/object/valid-callable') + , validTimeout = require('./valid-timeout') + + , apply = Function.prototype.apply; + +module.exports = function (fn, timeout) { + var isScheduled = false, context, args, run; + callable(fn); + timeout = validTimeout(timeout); + run = function () { + var currentContext = context, currentArgs = args; + if (!args) { + isScheduled = false; + return; + } + context = null; + args = null; + setTimeout(run, timeout); + apply.call(fn, currentContext, currentArgs); + }; + return function () { + if (isScheduled) { + context = this; + args = arguments; + return; + } + isScheduled = true; + setTimeout(run, timeout); + apply.call(fn, this, arguments); + }; +}; diff --git a/node_modules/timers-ext/valid-timeout.js b/node_modules/timers-ext/valid-timeout.js new file mode 100644 index 0000000..c7824ca --- /dev/null +++ b/node_modules/timers-ext/valid-timeout.js @@ -0,0 +1,10 @@ +'use strict'; + +var toPosInt = require('es5-ext/number/to-pos-integer') + , maxTimeout = require('./max-timeout'); + +module.exports = function (value) { + value = toPosInt(value); + if (value > maxTimeout) throw new TypeError(value + " exceeds maximum possible timeout"); + return value; +}; diff --git a/node_modules/toposort-class/.eslintrc b/node_modules/toposort-class/.eslintrc new file mode 100644 index 0000000..e36568a --- /dev/null +++ b/node_modules/toposort-class/.eslintrc @@ -0,0 +1,35 @@ +{ + "parser": "babel-eslint", + "env": { + "node": true, + "mocha": true, + "browser": true + }, + "rules": { + "strict": 0, //taken care of automatically by babel + "no-mixed-spaces-and-tabs": 2, + "eqeqeq": 2, + "no-eq-null": 2, + "consistent-this": 2, + "guard-for-in": 2, + "no-caller": 2, + "no-underscore-dangle": 2, + "curly": 2, + "no-multi-spaces": 2, + "key-spacing": 0, + "no-return-assign": 2, + "consistent-return": 2, + "no-shadow": 2, + "comma-dangle": 2, + "no-use-before-define": 2, + "no-empty": 2, + "new-parens": 2, + "no-cond-assign": 2, + "no-fallthrough": 2, + "new-cap": 2, + "no-loop-func": 2, + "no-unreachable": 2, + "no-process-exit": 2, + "quotes": [2, "double", "avoid-escape"] + } +} diff --git a/node_modules/toposort-class/.gitattributes b/node_modules/toposort-class/.gitattributes new file mode 100644 index 0000000..44b4224 --- /dev/null +++ b/node_modules/toposort-class/.gitattributes @@ -0,0 +1 @@ +* eol=lf \ No newline at end of file diff --git a/node_modules/toposort-class/.npmignore b/node_modules/toposort-class/.npmignore new file mode 100644 index 0000000..e64c184 --- /dev/null +++ b/node_modules/toposort-class/.npmignore @@ -0,0 +1,44 @@ +# Development stuff +test/ +Gruntfile.js + +# Configuration files +.jscsrc +.jshintrc +.travis.yml +bower.json + +# Logs +logs +*.log + +# Runtime data +pids +*.pid +*.seed + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directory +# Deployed apps should consider commenting this line out: +# see https://npmjs.org/doc/faq.html#Should-I-check-my-node_modules-folder-into-git +node_modules + +# JetBrains exclusion +.idea + +# Source files +src + +# example files +examples diff --git a/node_modules/toposort-class/LICENSE b/node_modules/toposort-class/LICENSE new file mode 100644 index 0000000..aa93e0f --- /dev/null +++ b/node_modules/toposort-class/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Gustavo Henke and Aaron Trent + +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. diff --git a/node_modules/toposort-class/README.md b/node_modules/toposort-class/README.md new file mode 100644 index 0000000..427691a --- /dev/null +++ b/node_modules/toposort-class/README.md @@ -0,0 +1,93 @@ +# Toposort +[![Build Status](http://img.shields.io/travis/gustavohenke/toposort.svg?branch=master&style=flat)](https://travis-ci.org/gustavohenke/toposort) +[![Dependency Status](http://img.shields.io/gemnasium/gustavohenke/toposort.png?style=flat)](https://gemnasium.com/gustavohenke/toposort) + +__Sorting directed acyclic graphs, for Node.js, io.js and the browser__ +_This was originally done by Marcel Klehr. [Why not checkout his original repo?](https://github.com/marcelklehr/toposort)_ + +## Installation +There are a few ways for installing Toposort. Here are them: + +* Via NPM: `npm install toposort-class` +* Via Bower: `bower install toposort` +* Via Git: `git clone git://github.com/gustavohenke/toposort.git` +* [Direct download](https://raw.githubusercontent.com/gustavohenke/toposort/master/build/toposort.js) ([Minified](https://raw.githubusercontent.com/gustavohenke/toposort/master/build/toposort.min.js)) for use in the browser + +## Example +Let's say you have the following dependency graph: + +* Plugin depends on Backbone and jQuery UI Button; +* Backbone depends on jQuery and Underscore; +* jQuery UI Button depends on jQuery UI Core and jQuery UI Widget; +* jQuery UI Widget and jQuery UI Core depend on jQuery; +* jQuery and Underscore don't depend on anyone. + +Now, how would you sort this in a way that each asset will be correctly placed? You'll probably need the following sorting: + +* `jQuery`, `jQuery UI Core`, `jQuery UI Widget`, `jQuery UI Button`, `Underscore`, `Backbone`, `Plugin` + +You can achieve it with the following code, using `toposort-class`: +```javascript +var Toposort = require('toposort-class'), + t = new Toposort(); + +t.add("jquery-ui-core", "jquery") + .add("jquery-ui-widget", "jquery") + .add("jquery-ui-button", ["jquery-ui-core", "jquery-ui-widget"]) + .add("plugin", ["backbone", "jquery-ui-button"]) + .add("backbone", ["underscore", "jquery"]); + +console.log(t.sort().reverse()); + +/* Will output: + * ['jquery', 'jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-button', 'underscore', 'backbone', 'plugin'] + * + * And you're done. + */ +``` + +## Usage +CommonJS (Node.js and io.js): +```javascript +var Toposort = require('toposort-class'), + t = new Toposort(); +``` + +Browser with AMD: +```javascript +define("myModule", ["Toposort"], function(Toposort) { + var t = new Toposort(); +}); +``` + +Browser without AMD: +```javascript +var t = new window.Toposort(); +``` + +or whatever global object there is instead of `window`. + +## API + +#### `.add(item, deps)` +* _{String}_ `item` - The name of the dependent item that is being added +* _{Array|String}_ `deps` - A dependency or list of dependencies of `item` + +__Returns:__ _{Toposort}_ The Toposort instance, for chaining. + +#### `.sort()` +__Returns:__ _{Array}_ The list of dependencies topologically sorted. + +This method will check for cyclic dependencies, like "A is dependent of A". + +#### `.clear()` +__Returns:__ _{Toposort}_ The Toposort instance, for chaining. + +Clears all edges, effectively resetting the instance. + +#### `.Toposort` + +Reference to the Toposort constructor. + +## Legal +MIT License diff --git a/node_modules/toposort-class/benchmark/0.3.1/toposort.js b/node_modules/toposort-class/benchmark/0.3.1/toposort.js new file mode 100644 index 0000000..92fcb65 --- /dev/null +++ b/node_modules/toposort-class/benchmark/0.3.1/toposort.js @@ -0,0 +1,128 @@ +!function() { + "use strict"; + + /** + * Topological sort class. + * Original by Marcel Klehr, contributed by Gustavo Henke. + * + * @class + * @since 0.1.0 + * @see https://github.com/marcelklehr/toposort + * @author Marcel Klehr + * + * @see https://github.com/gustavohenke/toposort + * @author Gustavo Henke + */ + function Toposort() { + var self = this; + var edges = []; + + /** + * Adds dependency edges. + * + * @since 0.1.0 + * @param {String} item An dependent name. Must be an string and not empty + * @param {String[]|String} [deps] An dependency or array of dependencies + * @returns {Toposort} The Toposort instance + */ + self.add = function( item, deps ) { + if( typeof item !== "string" || !item ) { + throw new TypeError( "Dependent name must be given as a not empty string" ); + } + + deps = Array.isArray( deps ) ? deps.slice() : [deps]; + if( deps.length ) { + deps.forEach( function( dep ) { + if( typeof dep !== "string" || !dep ) { + throw new TypeError( + "Dependency name must be given as a not empty string" + ); + } + + edges.push( [item, dep] ); + } ); + } else { + edges.push( [item] ); + } + + return self; + }; + + /** + * Runs the toposorting and return an ordered array of strings + * + * @since 0.1.0 + * @returns {String[]} The list of items topologically sorted. + */ + self.sort = function() { + var nodes = []; + var sorted = []; + + edges.forEach( function( edge ) { + edge.forEach( function( n ) { + if( nodes.indexOf( n ) === -1 ) { + nodes.push( n ); + } + } ); + } ); + + function visit( node, predecessors, i ) { + var index, predsCopy; + predecessors = predecessors || []; + + if( predecessors.indexOf( node ) > -1 ) { + throw new Error( + "Cyclic dependency found. '" + node + "' is dependent of itself.\n" + + "Dependency Chain: " + predecessors.join( " -> " ) + " => " + node + ); + } + + index = nodes.indexOf( node ); + if( index === -1 ) { + return i; + } + + nodes.splice( index, 1 ); + if( predecessors.length === 0 ) { + i--; + } + + predsCopy = predecessors.slice(); + predsCopy.push( node ); + + edges.filter( function( e ) { + return e[0] === node; + } ).forEach( function( e ) { + i = visit( e[1], predsCopy, i ); + } ); + + sorted.unshift( node ); + return i; + } + + for( var i = 0; i < nodes.length; i++ ) { + i = visit( nodes[i], null, i ); + } + + return sorted; + }; + + } + + if( typeof module === "object" && module && typeof module.exports === "object" ) { + // Expose toposort to CommonJS loaders (aka Node) + module.exports = exports.Toposort = Toposort; + } else { + // Expose toposort to AMD loaders (aka Require.js) + if( typeof define === "function" && define.amd ) { + define( function() { + return Toposort; + } ); + } + + // Expose toposort as a browser global + if( typeof window === "object" ) { + window.Toposort = Toposort; + } + } +}(); diff --git a/node_modules/toposort-class/benchmark/README.md b/node_modules/toposort-class/benchmark/README.md new file mode 100644 index 0000000..362f630 --- /dev/null +++ b/node_modules/toposort-class/benchmark/README.md @@ -0,0 +1,11 @@ +Benchmarks +========== + +Since I'm obsessed with performance, here is a tiny benchmark comparing the performance of the 0.3.1 version and the current version written in ES6 + +| Description | Library | Op/s | % | +|------------------------------|-----------------|-----------:|-----:| +| simple dependency chains | 0.3.1 version | 66,722.22 | 8% | +| | current version | 837,416.60 | 100% | +| slightly more complex chains | 0.3.1 version | 24,530.85 | 6% | +| | current version | 386,620.50 | 100% | diff --git a/node_modules/toposort-class/benchmark/general.js b/node_modules/toposort-class/benchmark/general.js new file mode 100644 index 0000000..fc99c83 --- /dev/null +++ b/node_modules/toposort-class/benchmark/general.js @@ -0,0 +1,56 @@ +var Toposort = require( "../index.js" ); +var OldToposort = require( "./0.3.1/toposort.js" ); + +suite( "simple dependency chains", function() { + set( "delay", 0 ); + set( "mintime", 1750 ); + + bench( "0.3.1 version", function() { + var t = new OldToposort(); + + t.add( "3", "2" ) + .add( "2", "1" ) + .add( "6", "5" ) + .add( "5", ["2", "4"] ).sort(); + } ); + + bench( "current version", function() { + var t = new Toposort(); + + t.add( "3", "2" ) + .add( "2", "1" ) + .add( "6", "5" ) + .add( "5", ["2", "4"] ).sort(); + } ); +} ); + +suite( "slightly more complex chains", function() { + set( "delay", 0 ); + set( "mintime", 1750 ); + + bench( "0.3.1 version", function() { + var t = new OldToposort(); + + t.add( "3", "1" ) + .add( "2", "3" ) + .add( "4", ["2", "3"] ) + .add( "5", ["3", "4"] ) + .add( "6", ["3", "4", "5"] ) + .add( "7", "1" ) + .add( "8", ["1", "2", "3", "4", "5"] ) + .add( "9", ["8", "6", "7"] ).sort(); + } ); + + bench( "current version", function() { + var t = new Toposort(); + + t.add( "3", "1" ) + .add( "2", "3" ) + .add( "4", ["2", "3"] ) + .add( "5", ["3", "4"] ) + .add( "6", ["3", "4", "5"] ) + .add( "7", "1" ) + .add( "8", ["1", "2", "3", "4", "5"] ) + .add( "9", ["8", "6", "7"] ).sort(); + } ); +} ); diff --git a/node_modules/toposort-class/benchmark/results.csv b/node_modules/toposort-class/benchmark/results.csv new file mode 100644 index 0000000..88f6e23 --- /dev/null +++ b/node_modules/toposort-class/benchmark/results.csv @@ -0,0 +1,4 @@ +2015-07-31 22:37:51,"simple dependency chains","0.3.1 version",2295.217390,153142 +2015-07-31 22:37:51,"simple dependency chains","current version",3299.024625,2762658 +2015-07-31 22:37:51,"slightly more complex chains","0.3.1 version",3313.337523,81279 +2015-07-31 22:37:51,"slightly more complex chains","current version",1797.512029,694955 diff --git a/node_modules/toposort-class/build/toposort.js b/node_modules/toposort-class/build/toposort.js new file mode 100644 index 0000000..616fee6 --- /dev/null +++ b/node_modules/toposort-class/build/toposort.js @@ -0,0 +1,281 @@ +/**** + * The MIT License (MIT) + * + * Copyright (c) 2015 Gustavo Henke and Aaron Trent + * + * 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. + * + ****/ +(function( global, factory ) { + if( typeof define === "function" && define.amd ) { + define( "Toposort", ["exports", "module"], factory ); + } else if( typeof exports !== "undefined" && typeof module !== "undefined" ) { + factory( exports, module ); + } else { + var mod = { + exports: {} + }; + factory( mod.exports, mod ); + global.Toposort = mod.exports; + } +})( this, function( exports, module ) { + "use strict"; + + function _classCallCheck( instance, Constructor ) { + if( !(instance instanceof Constructor) ) { + throw new TypeError( "Cannot call a class as a function" ); + } + } + + var Toposort = (function() { + function Toposort() { + _classCallCheck( this, Toposort ); + + this.edges = []; + this.Toposort = Toposort; + } + + /** + * Adds dependency edges. + * + * @since 0.1.0 + * @param {String} item An dependent name. Must be an string and not empty + * @param {String[]|String} [deps] An dependency or array of dependencies + * @returns {Toposort} The Toposort instance + */ + + Toposort.prototype.add = function add( item, deps ) { + if( typeof item !== "string" || !item ) { + throw new TypeError( "Dependent name must be given as a not empty string" ); + } + + deps = Array.isArray( deps ) ? deps : [deps]; + + if( deps.length > 0 ) { + for( var _iterator = deps, _isArray = Array.isArray( _iterator ), _i = 0, _iterator = _isArray ? + _iterator : + _iterator[Symbol.iterator](); ; ) { + var _ref; + + if( _isArray ) { + if( _i >= _iterator.length ) { + break; + } + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if( _i.done ) { + break; + } + _ref = _i.value; + } + + var dep = _ref; + + if( typeof dep !== "string" || !dep ) { + throw new TypeError( "Dependency name must be given as a not empty string" ); + } + + this.edges.push( [item, dep] ); + } + } else { + this.edges.push( [item] ); + } + + return this; + }; + + /** + * Runs the toposorting and return an ordered array of strings + * + * @since 0.1.0 + * @returns {String[]} The list of items topologically sorted. + */ + + Toposort.prototype.sort = function sort() { + var _this = this; + + var nodes = []; + + //accumulate unique nodes into a large list + for( var _iterator2 = this.edges, _isArray2 = Array.isArray( _iterator2 ), _i2 = 0, _iterator2 = _isArray2 ? + _iterator2 : + _iterator2[Symbol.iterator](); ; ) { + var _ref2; + + if( _isArray2 ) { + if( _i2 >= _iterator2.length ) { + break; + } + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if( _i2.done ) { + break; + } + _ref2 = _i2.value; + } + + var edge = _ref2; + + for( var _iterator3 = edge, _isArray3 = Array.isArray( _iterator3 ), _i3 = 0, _iterator3 = _isArray3 ? + _iterator3 : + _iterator3[Symbol.iterator](); ; ) { + var _ref3; + + if( _isArray3 ) { + if( _i3 >= _iterator3.length ) { + break; + } + _ref3 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if( _i3.done ) { + break; + } + _ref3 = _i3.value; + } + + var node = _ref3; + + if( nodes.indexOf( node ) === -1 ) { + nodes.push( node ); + } + } + } + + //initialize the placement of nodes into the sorted array at the end + var place = nodes.length; + + //initialize the sorted array with the same length as the unique nodes array + var sorted = new Array( nodes.length ); + + //define a visitor function that recursively traverses dependencies. + var visit = function visit( node, predecessors ) { + //check if a node is dependent of itself + if( predecessors.length !== 0 && predecessors.indexOf( node ) !== -1 ) { + throw new Error( "Cyclic dependency found. " + node + " is dependent of itself.\nDependency chain: " + + predecessors.join( " -> " ) + " => " + node ); + } + + var index = nodes.indexOf( node ); + + //if the node still exists, traverse its dependencies + if( index !== -1 ) { + var copy = false; + + //mark the node as false to exclude it from future iterations + nodes[index] = false; + + //loop through all edges and follow dependencies of the current node + for( var _iterator4 = _this.edges, _isArray4 = Array.isArray( _iterator4 ), _i4 = 0, _iterator4 = _isArray4 ? + _iterator4 : + _iterator4[Symbol.iterator](); ; ) { + var _ref4; + + if( _isArray4 ) { + if( _i4 >= _iterator4.length ) { + break; + } + _ref4 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if( _i4.done ) { + break; + } + _ref4 = _i4.value; + } + + var edge = _ref4; + + if( edge[0] === node ) { + //lazily create a copy of predecessors with the current node concatenated onto it + copy = copy || predecessors.concat( [node] ); + + //recurse to node dependencies + visit( edge[1], copy ); + } + } + + //add the node to the next place in the sorted array + sorted[--place] = node; + } + }; + + for( var i = 0; i < nodes.length; i++ ) { + var node = nodes[i]; + + //ignore nodes that have been excluded + if( node !== false ) { + //mark the node as false to exclude it from future iterations + nodes[i] = false; + + //loop through all edges and follow dependencies of the current node + for( var _iterator5 = this.edges, _isArray5 = Array.isArray( _iterator5 ), _i5 = 0, _iterator5 = _isArray5 ? + _iterator5 : + _iterator5[Symbol.iterator](); ; ) { + var _ref5; + + if( _isArray5 ) { + if( _i5 >= _iterator5.length ) { + break; + } + _ref5 = _iterator5[_i5++]; + } else { + _i5 = _iterator5.next(); + if( _i5.done ) { + break; + } + _ref5 = _i5.value; + } + + var edge = _ref5; + + if( edge[0] === node ) { + //recurse to node dependencies + visit( edge[1], [node] ); + } + } + + //add the node to the next place in the sorted array + sorted[--place] = node; + } + } + + return sorted; + }; + + /** + * Clears edges + * + * @since 0.4.0 + * @returns {Toposort} The Toposort instance + */ + + Toposort.prototype.clear = function clear() { + this.edges = []; + + return this; + }; + + return Toposort; + })(); + + module.exports = Toposort; +} ); diff --git a/node_modules/toposort-class/build/toposort.min.js b/node_modules/toposort-class/build/toposort.min.js new file mode 100644 index 0000000..97e40f6 --- /dev/null +++ b/node_modules/toposort-class/build/toposort.min.js @@ -0,0 +1 @@ +!function(a,b){if("function"==typeof define&&define.amd)define("Toposort",["exports","module"],b);else if("undefined"!=typeof exports&&"undefined"!=typeof module)b(exports,module);else{var c={exports:{}};b(c.exports,c),a.Toposort=c.exports}}(this,function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d=function(){function a(){c(this,a),this.edges=[],this.Toposort=a}return a.prototype.add=function(a,b){if("string"!=typeof a||!a)throw new TypeError("Dependent name must be given as a not empty string");if(b=Array.isArray(b)?b:[b],b.length>0)for(var c=b,d=Array.isArray(c),e=0,c=d?c:c[Symbol.iterator]();;){var f;if(d){if(e>=c.length)break;f=c[e++]}else{if(e=c.next(),e.done)break;f=e.value}var g=f;if("string"!=typeof g||!g)throw new TypeError("Dependency name must be given as a not empty string");this.edges.push([a,g])}else this.edges.push([a]);return this},a.prototype.sort=function(){for(var a=this,b=[],c=this.edges,d=Array.isArray(c),e=0,c=d?c:c[Symbol.iterator]();;){var f;if(d){if(e>=c.length)break;f=c[e++]}else{if(e=c.next(),e.done)break;f=e.value}for(var g=f,h=g,i=Array.isArray(h),j=0,h=i?h:h[Symbol.iterator]();;){var k;if(i){if(j>=h.length)break;k=h[j++]}else{if(j=h.next(),j.done)break;k=j.value}var l=k;-1===b.indexOf(l)&&b.push(l)}}for(var m=b.length,n=new Array(b.length),o=function u(c,d){if(0!==d.length&&-1!==d.indexOf(c))throw new Error("Cyclic dependency found. "+c+" is dependent of itself.\nDependency chain: "+d.join(" -> ")+" => "+c);var e=b.indexOf(c);if(-1!==e){var f=!1;b[e]=!1;for(var g=a.edges,h=Array.isArray(g),i=0,g=h?g:g[Symbol.iterator]();;){var j;if(h){if(i>=g.length)break;j=g[i++]}else{if(i=g.next(),i.done)break;j=i.value}var k=j;k[0]===c&&(f=f||d.concat([c]),u(k[1],f))}n[--m]=c}},p=0;p=q.length)break;t=q[s++]}else{if(s=q.next(),s.done)break;t=s.value}var g=t;g[0]===l&&o(g[1],[l])}n[--m]=l}}return n},a.prototype.clear=function(){return this.edges=[],this},a}();b.exports=d}); \ No newline at end of file diff --git a/node_modules/toposort-class/index.js b/node_modules/toposort-class/index.js new file mode 100644 index 0000000..f7ff1f2 --- /dev/null +++ b/node_modules/toposort-class/index.js @@ -0,0 +1 @@ +module.exports = require( './build/toposort.js' ); diff --git a/node_modules/toposort-class/package.json b/node_modules/toposort-class/package.json new file mode 100644 index 0000000..ca352ab --- /dev/null +++ b/node_modules/toposort-class/package.json @@ -0,0 +1,102 @@ +{ + "_args": [ + [ + { + "raw": "toposort-class@^1.0.1", + "scope": null, + "escapedName": "toposort-class", + "name": "toposort-class", + "rawSpec": "^1.0.1", + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/sequelize" + ] + ], + "_from": "toposort-class@>=1.0.1 <2.0.0", + "_id": "toposort-class@1.0.1", + "_inCache": true, + "_location": "/toposort-class", + "_nodeVersion": "2.3.3", + "_npmUser": { + "name": "gustavohenke", + "email": "gustavo@injoin.io" + }, + "_npmVersion": "2.13.0", + "_phantomChildren": {}, + "_requested": { + "raw": "toposort-class@^1.0.1", + "scope": null, + "escapedName": "toposort-class", + "name": "toposort-class", + "rawSpec": "^1.0.1", + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/sequelize" + ], + "_resolved": "https://registry.npmjs.org/toposort-class/-/toposort-class-1.0.1.tgz", + "_shasum": "7ffd1f78c8be28c3ba45cd4e1a3f5ee193bd9988", + "_shrinkwrap": null, + "_spec": "toposort-class@^1.0.1", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/sequelize", + "author": "", + "bugs": { + "url": "https://github.com/gustavohenke/toposort/issues" + }, + "dependencies": {}, + "description": "Topological sort of directed acyclic graphs (like dependecy lists)", + "devDependencies": { + "babel-eslint": "^4.0.5", + "eslint": "^1.0.0", + "grunt": "^0.4.5", + "grunt-babel": "^5.0.1", + "grunt-banner": "^0.4.0", + "grunt-contrib-clean": "^0.6.0", + "grunt-contrib-uglify": "^0.9.1", + "matcha": "^0.6.0", + "mocha": "^2.2.5" + }, + "directories": {}, + "dist": { + "shasum": "7ffd1f78c8be28c3ba45cd4e1a3f5ee193bd9988", + "tarball": "https://registry.npmjs.org/toposort-class/-/toposort-class-1.0.1.tgz" + }, + "gitHead": "25700cd0d9c6be5b828df1e372a88ac2bb64a581", + "homepage": "https://github.com/gustavohenke/toposort#readme", + "keywords": [ + "topological", + "sort", + "sorting", + "graphs", + "graph", + "dependency", + "list", + "dependencies", + "acyclic", + "browser" + ], + "license": "MIT", + "main": "./index.js", + "maintainers": [ + { + "name": "gustavohenke", + "email": "gustavo@injoin.com.br" + } + ], + "name": "toposort-class", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/gustavohenke/toposort.git" + }, + "scripts": { + "benchmark": "matcha benchmark/general.js", + "benchmark-save": "matcha -R csv benchmark/general.js > benchmark/results.csv", + "eslint": "eslint src/toposort.js test/spec.js Gruntfile.js", + "test": "mocha -b test" + }, + "version": "1.0.1" +} diff --git a/node_modules/transformers/.npmignore b/node_modules/transformers/.npmignore new file mode 100644 index 0000000..2a72174 --- /dev/null +++ b/node_modules/transformers/.npmignore @@ -0,0 +1,2 @@ +test/ +.travis.yml \ No newline at end of file diff --git a/node_modules/transformers/README.md b/node_modules/transformers/README.md new file mode 100644 index 0000000..0caf6d2 --- /dev/null +++ b/node_modules/transformers/README.md @@ -0,0 +1,141 @@ +[![Build Status](https://travis-ci.org/ForbesLindesay/transformers.png?branch=master)](https://travis-ci.org/ForbesLindesay/transformers) +# transformers + + String/Data transformations for use in templating libraries, static site generators and web frameworks. This gathers the most useful transformations you can apply to text or data into one library with a consistent API. Transformations can be pretty much anything but most are either compilers or templating engines. + +## Supported transforms + + To use each of these transforms you will also need to install the associated npm module for that transformer. + +### Template engines + + - [atpl](http://documentup.com/soywiz/atpl.js) - Compatible with twig templates + - [coffeecup](http://documentup.com/gradus/coffeecup) - pure coffee-script templates (fork of coffeekup) + - [dot](http://documentup.com/olado/doT) [(website)](https://github.com/Katahdin/dot-packer) - focused on speed + - [dust](http://documentup.com/akdubya/dustjs) [(website)](http://akdubya.github.com/dustjs/) - asyncronous templates + - [eco](http://documentup.com/sstephenson/eco) - Embedded CoffeeScript templates + - [ect](http://documentup.com/baryshev/ect) [(website)](http://ectjs.com/) - Embedded CoffeeScript templates + - [ejs](http://documentup.com/visionmedia/ejs) - Embedded JavaScript templates + - [haml](http://documentup.com/visionmedia/haml.js) [(website)](http://haml-lang.com/) - dry indented markup + - [haml-coffee](http://documentup.com/netzpirat/haml-coffee/) [(website)](http://haml-lang.com/) - haml with embedded CoffeeScript + - [handlebars](http://documentup.com/wycats/handlebars.js/) [(website)](http://handlebarsjs.com/) - extension of mustache templates + - [hogan](http://documentup.com/twitter/hogan.js) [(website)](http://twitter.github.com/hogan.js/) - Mustache templates + - [jade](http://documentup.com/visionmedia/jade) [(website)](http://jade-lang.com/) - robust, elegant, feature rich template engine + - [jazz](http://documentup.com/shinetech/jazz) + - [jqtpl](http://documentup.com/kof/jqtpl) [(website)](http://api.jquery.com/category/plugins/templates/) - extensible logic-less templates + - [JUST](http://documentup.com/baryshev/just) - EJS style template with some special syntax for layouts/partials etc. + - [liquor](http://documentup.com/chjj/liquor) - extended EJS with significant white space + - [mustache](http://documentup.com/janl/mustache.js) - logic less templates + - [QEJS](http://documentup.com/jepso/QEJS) - Promises + EJS for async templating + - [swig](http://documentup.com/paularmstrong/swig) [(website)](http://paularmstrong.github.com/swig/) - Django-like templating engine + - [templayed](http://documentup.com/archan937/templayed.js/) [(website)](http://archan937.github.com/templayed.js/) - Mustache focused on performance + - [toffee](http://documentup.com/malgorithms/toffee) - templating language based on coffeescript + - [underscore](http://documentup.com/documentcloud/underscore) [(website)](http://documentcloud.github.com/underscore/) + - [walrus](http://documentup.com/jeremyruppel/walrus) - A bolder kind of mustache + - [whiskers](http://documentup.com/gsf/whiskers.js/tree/) - logic-less focused on readability + +### Stylesheet Languages + + - [less](http://documentup.com/cloudhead/less.js) [(website)](http://lesscss.org/) - LESS extends CSS with dynamic behavior such as variables, mixins, operations and functions. + - [stylus](http://documentup.com/learnboost/stylus) [(website)](http://learnboost.github.com/stylus/) - revolutionary CSS generator making braces optional + - [sass](http://documentup.com/visionmedia/sass.js) [(website)](http://sass-lang.com/) - Sassy CSS + +### Minifiers + + - [uglify-js](http://documentup.com/mishoo/UglifyJS2) - No need to install anything, just minifies/beautifies JavaScript + - [uglify-css](https://github.com/visionmedia/css) - No need to install anything, just minifies/beautifies CSS + - ugilify-json - No need to install anything, just minifies/beautifies JSON + +### Other + + - cdata - No need to install anything, just wraps input as `` with the standard escape for `]]>` (`]]]]>`). + - cdata-js - as `cdata`, but with surrounding comments suitable for inclusion into a HTML/JavaScript ` + +-------------------------------------------------------------------------------- + + + + + +## Table of Contents + +- [Examples](#examples) + - [Consuming a source map](#consuming-a-source-map) + - [Generating a source map](#generating-a-source-map) + - [With SourceNode (high level API)](#with-sourcenode-high-level-api) + - [With SourceMapGenerator (low level API)](#with-sourcemapgenerator-low-level-api) +- [API](#api) + - [SourceMapConsumer](#sourcemapconsumer) + - [new SourceMapConsumer(rawSourceMap)](#new-sourcemapconsumerrawsourcemap) + - [SourceMapConsumer.prototype.computeColumnSpans()](#sourcemapconsumerprototypecomputecolumnspans) + - [SourceMapConsumer.prototype.originalPositionFor(generatedPosition)](#sourcemapconsumerprototypeoriginalpositionforgeneratedposition) + - [SourceMapConsumer.prototype.generatedPositionFor(originalPosition)](#sourcemapconsumerprototypegeneratedpositionfororiginalposition) + - [SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)](#sourcemapconsumerprototypeallgeneratedpositionsfororiginalposition) + - [SourceMapConsumer.prototype.hasContentsOfAllSources()](#sourcemapconsumerprototypehascontentsofallsources) + - [SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])](#sourcemapconsumerprototypesourcecontentforsource-returnnullonmissing) + - [SourceMapConsumer.prototype.eachMapping(callback, context, order)](#sourcemapconsumerprototypeeachmappingcallback-context-order) + - [SourceMapGenerator](#sourcemapgenerator) + - [new SourceMapGenerator([startOfSourceMap])](#new-sourcemapgeneratorstartofsourcemap) + - [SourceMapGenerator.fromSourceMap(sourceMapConsumer)](#sourcemapgeneratorfromsourcemapsourcemapconsumer) + - [SourceMapGenerator.prototype.addMapping(mapping)](#sourcemapgeneratorprototypeaddmappingmapping) + - [SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)](#sourcemapgeneratorprototypesetsourcecontentsourcefile-sourcecontent) + - [SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])](#sourcemapgeneratorprototypeapplysourcemapsourcemapconsumer-sourcefile-sourcemappath) + - [SourceMapGenerator.prototype.toString()](#sourcemapgeneratorprototypetostring) + - [SourceNode](#sourcenode) + - [new SourceNode([line, column, source[, chunk[, name]]])](#new-sourcenodeline-column-source-chunk-name) + - [SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath])](#sourcenodefromstringwithsourcemapcode-sourcemapconsumer-relativepath) + - [SourceNode.prototype.add(chunk)](#sourcenodeprototypeaddchunk) + - [SourceNode.prototype.prepend(chunk)](#sourcenodeprototypeprependchunk) + - [SourceNode.prototype.setSourceContent(sourceFile, sourceContent)](#sourcenodeprototypesetsourcecontentsourcefile-sourcecontent) + - [SourceNode.prototype.walk(fn)](#sourcenodeprototypewalkfn) + - [SourceNode.prototype.walkSourceContents(fn)](#sourcenodeprototypewalksourcecontentsfn) + - [SourceNode.prototype.join(sep)](#sourcenodeprototypejoinsep) + - [SourceNode.prototype.replaceRight(pattern, replacement)](#sourcenodeprototypereplacerightpattern-replacement) + - [SourceNode.prototype.toString()](#sourcenodeprototypetostring) + - [SourceNode.prototype.toStringWithSourceMap([startOfSourceMap])](#sourcenodeprototypetostringwithsourcemapstartofsourcemap) + + + +## Examples + +### Consuming a source map + +```js +var rawSourceMap = { + version: 3, + file: 'min.js', + names: ['bar', 'baz', 'n'], + sources: ['one.js', 'two.js'], + sourceRoot: 'http://example.com/www/js/', + mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA' +}; + +var smc = new SourceMapConsumer(rawSourceMap); + +console.log(smc.sources); +// [ 'http://example.com/www/js/one.js', +// 'http://example.com/www/js/two.js' ] + +console.log(smc.originalPositionFor({ + line: 2, + column: 28 +})); +// { source: 'http://example.com/www/js/two.js', +// line: 2, +// column: 10, +// name: 'n' } + +console.log(smc.generatedPositionFor({ + source: 'http://example.com/www/js/two.js', + line: 2, + column: 10 +})); +// { line: 2, column: 28 } + +smc.eachMapping(function (m) { + // ... +}); +``` + +### Generating a source map + +In depth guide: +[**Compiling to JavaScript, and Debugging with Source Maps**](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/) + +#### With SourceNode (high level API) + +```js +function compile(ast) { + switch (ast.type) { + case 'BinaryExpression': + return new SourceNode( + ast.location.line, + ast.location.column, + ast.location.source, + [compile(ast.left), " + ", compile(ast.right)] + ); + case 'Literal': + return new SourceNode( + ast.location.line, + ast.location.column, + ast.location.source, + String(ast.value) + ); + // ... + default: + throw new Error("Bad AST"); + } +} + +var ast = parse("40 + 2", "add.js"); +console.log(compile(ast).toStringWithSourceMap({ + file: 'add.js' +})); +// { code: '40 + 2', +// map: [object SourceMapGenerator] } +``` + +#### With SourceMapGenerator (low level API) + +```js +var map = new SourceMapGenerator({ + file: "source-mapped.js" +}); + +map.addMapping({ + generated: { + line: 10, + column: 35 + }, + source: "foo.js", + original: { + line: 33, + column: 2 + }, + name: "christopher" +}); + +console.log(map.toString()); +// '{"version":3,"file":"source-mapped.js","sources":["foo.js"],"names":["christopher"],"mappings":";;;;;;;;;mCAgCEA"}' +``` + +## API + +Get a reference to the module: + +```js +// Node.js +var sourceMap = require('source-map'); + +// Browser builds +var sourceMap = window.sourceMap; + +// Inside Firefox +const sourceMap = require("devtools/toolkit/sourcemap/source-map.js"); +``` + +### SourceMapConsumer + +A SourceMapConsumer instance represents a parsed source map which we can query +for information about the original file positions by giving it a file position +in the generated source. + +#### new SourceMapConsumer(rawSourceMap) + +The only parameter is the raw source map (either as a string which can be +`JSON.parse`'d, or an object). According to the spec, source maps have the +following attributes: + +* `version`: Which version of the source map spec this map is following. + +* `sources`: An array of URLs to the original source files. + +* `names`: An array of identifiers which can be referenced by individual + mappings. + +* `sourceRoot`: Optional. The URL root from which all sources are relative. + +* `sourcesContent`: Optional. An array of contents of the original source files. + +* `mappings`: A string of base64 VLQs which contain the actual mappings. + +* `file`: Optional. The generated filename this source map is associated with. + +```js +var consumer = new sourceMap.SourceMapConsumer(rawSourceMapJsonData); +``` + +#### SourceMapConsumer.prototype.computeColumnSpans() + +Compute the last column for each generated mapping. The last column is +inclusive. + +```js +// Before: +consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" }) +// [ { line: 2, +// column: 1 }, +// { line: 2, +// column: 10 }, +// { line: 2, +// column: 20 } ] + +consumer.computeColumnSpans(); + +// After: +consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" }) +// [ { line: 2, +// column: 1, +// lastColumn: 9 }, +// { line: 2, +// column: 10, +// lastColumn: 19 }, +// { line: 2, +// column: 20, +// lastColumn: Infinity } ] + +``` + +#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition) + +Returns the original source, line, and column information for the generated +source's line and column positions provided. The only argument is an object with +the following properties: + +* `line`: The line number in the generated source. + +* `column`: The column number in the generated source. + +* `bias`: Either `SourceMapConsumer.GREATEST_LOWER_BOUND` or + `SourceMapConsumer.LEAST_UPPER_BOUND`. Specifies whether to return the closest + element that is smaller than or greater than the one we are searching for, + respectively, if the exact element cannot be found. Defaults to + `SourceMapConsumer.GREATEST_LOWER_BOUND`. + +and an object is returned with the following properties: + +* `source`: The original source file, or null if this information is not + available. + +* `line`: The line number in the original source, or null if this information is + not available. + +* `column`: The column number in the original source, or null or null if this + information is not available. + +* `name`: The original identifier, or null if this information is not available. + +```js +consumer.originalPositionFor({ line: 2, column: 10 }) +// { source: 'foo.coffee', +// line: 2, +// column: 2, +// name: null } + +consumer.originalPositionFor({ line: 99999999999999999, column: 999999999999999 }) +// { source: null, +// line: null, +// column: null, +// name: null } +``` + +#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition) + +Returns the generated line and column information for the original source, +line, and column positions provided. The only argument is an object with +the following properties: + +* `source`: The filename of the original source. + +* `line`: The line number in the original source. + +* `column`: The column number in the original source. + +and an object is returned with the following properties: + +* `line`: The line number in the generated source, or null. + +* `column`: The column number in the generated source, or null. + +```js +consumer.generatedPositionFor({ source: "example.js", line: 2, column: 10 }) +// { line: 1, +// column: 56 } +``` + +#### SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition) + +Returns all generated line and column information for the original source, line, +and column provided. If no column is provided, returns all mappings +corresponding to a either the line we are searching for or the next closest line +that has any mappings. Otherwise, returns all mappings corresponding to the +given line and either the column we are searching for or the next closest column +that has any offsets. + +The only argument is an object with the following properties: + +* `source`: The filename of the original source. + +* `line`: The line number in the original source. + +* `column`: Optional. The column number in the original source. + +and an array of objects is returned, each with the following properties: + +* `line`: The line number in the generated source, or null. + +* `column`: The column number in the generated source, or null. + +```js +consumer.allGeneratedpositionsfor({ line: 2, source: "foo.coffee" }) +// [ { line: 2, +// column: 1 }, +// { line: 2, +// column: 10 }, +// { line: 2, +// column: 20 } ] +``` + +#### SourceMapConsumer.prototype.hasContentsOfAllSources() + +Return true if we have the embedded source content for every source listed in +the source map, false otherwise. + +In other words, if this method returns `true`, then +`consumer.sourceContentFor(s)` will succeed for every source `s` in +`consumer.sources`. + +```js +// ... +if (consumer.hasContentsOfAllSources()) { + consumerReadyCallback(consumer); +} else { + fetchSources(consumer, consumerReadyCallback); +} +// ... +``` + +#### SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing]) + +Returns the original source content for the source provided. The only +argument is the URL of the original source file. + +If the source content for the given source is not found, then an error is +thrown. Optionally, pass `true` as the second param to have `null` returned +instead. + +```js +consumer.sources +// [ "my-cool-lib.clj" ] + +consumer.sourceContentFor("my-cool-lib.clj") +// "..." + +consumer.sourceContentFor("this is not in the source map"); +// Error: "this is not in the source map" is not in the source map + +consumer.sourceContentFor("this is not in the source map", true); +// null +``` + +#### SourceMapConsumer.prototype.eachMapping(callback, context, order) + +Iterate over each mapping between an original source/line/column and a +generated line/column in this source map. + +* `callback`: The function that is called with each mapping. Mappings have the + form `{ source, generatedLine, generatedColumn, originalLine, originalColumn, + name }` + +* `context`: Optional. If specified, this object will be the value of `this` + every time that `callback` is called. + +* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or + `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over + the mappings sorted by the generated file's line/column order or the + original's source/line/column order, respectively. Defaults to + `SourceMapConsumer.GENERATED_ORDER`. + +```js +consumer.eachMapping(function (m) { console.log(m); }) +// ... +// { source: 'illmatic.js', +// generatedLine: 1, +// generatedColumn: 0, +// originalLine: 1, +// originalColumn: 0, +// name: null } +// { source: 'illmatic.js', +// generatedLine: 2, +// generatedColumn: 0, +// originalLine: 2, +// originalColumn: 0, +// name: null } +// ... +``` +### SourceMapGenerator + +An instance of the SourceMapGenerator represents a source map which is being +built incrementally. + +#### new SourceMapGenerator([startOfSourceMap]) + +You may pass an object with the following properties: + +* `file`: The filename of the generated source that this source map is + associated with. + +* `sourceRoot`: A root for all relative URLs in this source map. + +* `skipValidation`: Optional. When `true`, disables validation of mappings as + they are added. This can improve performance but should be used with + discretion, as a last resort. Even then, one should avoid using this flag when + running tests, if possible. + +```js +var generator = new sourceMap.SourceMapGenerator({ + file: "my-generated-javascript-file.js", + sourceRoot: "http://example.com/app/js/" +}); +``` + +#### SourceMapGenerator.fromSourceMap(sourceMapConsumer) + +Creates a new `SourceMapGenerator` from an existing `SourceMapConsumer` instance. + +* `sourceMapConsumer` The SourceMap. + +```js +var generator = sourceMap.SourceMapGenerator.fromSourceMap(consumer); +``` + +#### SourceMapGenerator.prototype.addMapping(mapping) + +Add a single mapping from original source line and column to the generated +source's line and column for this source map being created. The mapping object +should have the following properties: + +* `generated`: An object with the generated line and column positions. + +* `original`: An object with the original line and column positions. + +* `source`: The original source file (relative to the sourceRoot). + +* `name`: An optional original token name for this mapping. + +```js +generator.addMapping({ + source: "module-one.scm", + original: { line: 128, column: 0 }, + generated: { line: 3, column: 456 } +}) +``` + +#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent) + +Set the source content for an original source file. + +* `sourceFile` the URL of the original source file. + +* `sourceContent` the content of the source file. + +```js +generator.setSourceContent("module-one.scm", + fs.readFileSync("path/to/module-one.scm")) +``` + +#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]]) + +Applies a SourceMap for a source file to the SourceMap. +Each mapping to the supplied source file is rewritten using the +supplied SourceMap. Note: The resolution for the resulting mappings +is the minimum of this map and the supplied map. + +* `sourceMapConsumer`: The SourceMap to be applied. + +* `sourceFile`: Optional. The filename of the source file. + If omitted, sourceMapConsumer.file will be used, if it exists. + Otherwise an error will be thrown. + +* `sourceMapPath`: Optional. The dirname of the path to the SourceMap + to be applied. If relative, it is relative to the SourceMap. + + This parameter is needed when the two SourceMaps aren't in the same + directory, and the SourceMap to be applied contains relative source + paths. If so, those relative source paths need to be rewritten + relative to the SourceMap. + + If omitted, it is assumed that both SourceMaps are in the same directory, + thus not needing any rewriting. (Supplying `'.'` has the same effect.) + +#### SourceMapGenerator.prototype.toString() + +Renders the source map being generated to a string. + +```js +generator.toString() +// '{"version":3,"sources":["module-one.scm"],"names":[],"mappings":"...snip...","file":"my-generated-javascript-file.js","sourceRoot":"http://example.com/app/js/"}' +``` + +### SourceNode + +SourceNodes provide a way to abstract over interpolating and/or concatenating +snippets of generated JavaScript source code, while maintaining the line and +column information associated between those snippets and the original source +code. This is useful as the final intermediate representation a compiler might +use before outputting the generated JS and source map. + +#### new SourceNode([line, column, source[, chunk[, name]]]) + +* `line`: The original line number associated with this source node, or null if + it isn't associated with an original line. + +* `column`: The original column number associated with this source node, or null + if it isn't associated with an original column. + +* `source`: The original source's filename; null if no filename is provided. + +* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see + below. + +* `name`: Optional. The original identifier. + +```js +var node = new SourceNode(1, 2, "a.cpp", [ + new SourceNode(3, 4, "b.cpp", "extern int status;\n"), + new SourceNode(5, 6, "c.cpp", "std::string* make_string(size_t n);\n"), + new SourceNode(7, 8, "d.cpp", "int main(int argc, char** argv) {}\n"), +]); +``` + +#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath]) + +Creates a SourceNode from generated code and a SourceMapConsumer. + +* `code`: The generated code + +* `sourceMapConsumer` The SourceMap for the generated code + +* `relativePath` The optional path that relative sources in `sourceMapConsumer` + should be relative to. + +```js +var consumer = new SourceMapConsumer(fs.readFileSync("path/to/my-file.js.map")); +var node = SourceNode.fromStringWithSourceMap(fs.readFileSync("path/to/my-file.js"), + consumer); +``` + +#### SourceNode.prototype.add(chunk) + +Add a chunk of generated JS to this source node. + +* `chunk`: A string snippet of generated JS code, another instance of + `SourceNode`, or an array where each member is one of those things. + +```js +node.add(" + "); +node.add(otherNode); +node.add([leftHandOperandNode, " + ", rightHandOperandNode]); +``` + +#### SourceNode.prototype.prepend(chunk) + +Prepend a chunk of generated JS to this source node. + +* `chunk`: A string snippet of generated JS code, another instance of + `SourceNode`, or an array where each member is one of those things. + +```js +node.prepend("/** Build Id: f783haef86324gf **/\n\n"); +``` + +#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent) + +Set the source content for a source file. This will be added to the +`SourceMap` in the `sourcesContent` field. + +* `sourceFile`: The filename of the source file + +* `sourceContent`: The content of the source file + +```js +node.setSourceContent("module-one.scm", + fs.readFileSync("path/to/module-one.scm")) +``` + +#### SourceNode.prototype.walk(fn) + +Walk over the tree of JS snippets in this node and its children. The walking +function is called once for each snippet of JS and is passed that snippet and +the its original associated source's line/column location. + +* `fn`: The traversal function. + +```js +var node = new SourceNode(1, 2, "a.js", [ + new SourceNode(3, 4, "b.js", "uno"), + "dos", + [ + "tres", + new SourceNode(5, 6, "c.js", "quatro") + ] +]); + +node.walk(function (code, loc) { console.log("WALK:", code, loc); }) +// WALK: uno { source: 'b.js', line: 3, column: 4, name: null } +// WALK: dos { source: 'a.js', line: 1, column: 2, name: null } +// WALK: tres { source: 'a.js', line: 1, column: 2, name: null } +// WALK: quatro { source: 'c.js', line: 5, column: 6, name: null } +``` + +#### SourceNode.prototype.walkSourceContents(fn) + +Walk over the tree of SourceNodes. The walking function is called for each +source file content and is passed the filename and source content. + +* `fn`: The traversal function. + +```js +var a = new SourceNode(1, 2, "a.js", "generated from a"); +a.setSourceContent("a.js", "original a"); +var b = new SourceNode(1, 2, "b.js", "generated from b"); +b.setSourceContent("b.js", "original b"); +var c = new SourceNode(1, 2, "c.js", "generated from c"); +c.setSourceContent("c.js", "original c"); + +var node = new SourceNode(null, null, null, [a, b, c]); +node.walkSourceContents(function (source, contents) { console.log("WALK:", source, ":", contents); }) +// WALK: a.js : original a +// WALK: b.js : original b +// WALK: c.js : original c +``` + +#### SourceNode.prototype.join(sep) + +Like `Array.prototype.join` except for SourceNodes. Inserts the separator +between each of this source node's children. + +* `sep`: The separator. + +```js +var lhs = new SourceNode(1, 2, "a.rs", "my_copy"); +var operand = new SourceNode(3, 4, "a.rs", "="); +var rhs = new SourceNode(5, 6, "a.rs", "orig.clone()"); + +var node = new SourceNode(null, null, null, [ lhs, operand, rhs ]); +var joinedNode = node.join(" "); +``` + +#### SourceNode.prototype.replaceRight(pattern, replacement) + +Call `String.prototype.replace` on the very right-most source snippet. Useful +for trimming white space from the end of a source node, etc. + +* `pattern`: The pattern to replace. + +* `replacement`: The thing to replace the pattern with. + +```js +// Trim trailing white space. +node.replaceRight(/\s*$/, ""); +``` + +#### SourceNode.prototype.toString() + +Return the string representation of this source node. Walks over the tree and +concatenates all the various snippets together to one string. + +```js +var node = new SourceNode(1, 2, "a.js", [ + new SourceNode(3, 4, "b.js", "uno"), + "dos", + [ + "tres", + new SourceNode(5, 6, "c.js", "quatro") + ] +]); + +node.toString() +// 'unodostresquatro' +``` + +#### SourceNode.prototype.toStringWithSourceMap([startOfSourceMap]) + +Returns the string representation of this tree of source nodes, plus a +SourceMapGenerator which contains all the mappings between the generated and +original sources. + +The arguments are the same as those to `new SourceMapGenerator`. + +```js +var node = new SourceNode(1, 2, "a.js", [ + new SourceNode(3, 4, "b.js", "uno"), + "dos", + [ + "tres", + new SourceNode(5, 6, "c.js", "quatro") + ] +]); + +node.toStringWithSourceMap({ file: "my-output-file.js" }) +// { code: 'unodostresquatro', +// map: [object SourceMapGenerator] } +``` diff --git a/node_modules/uglify-js/node_modules/source-map/dist/source-map.debug.js b/node_modules/uglify-js/node_modules/source-map/dist/source-map.debug.js new file mode 100644 index 0000000..a3bcda1 --- /dev/null +++ b/node_modules/uglify-js/node_modules/source-map/dist/source-map.debug.js @@ -0,0 +1,3056 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["sourceMap"] = factory(); + else + root["sourceMap"] = factory(); +})(this, function() { +return /******/ (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] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.loaded = 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; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ function(module, exports, __webpack_require__) { + + /* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ + exports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; + exports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer; + exports.SourceNode = __webpack_require__(10).SourceNode; + + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var base64VLQ = __webpack_require__(2); + var util = __webpack_require__(4); + var ArraySet = __webpack_require__(5).ArraySet; + var MappingList = __webpack_require__(6).MappingList; + + /** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ + function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; + } + + SourceMapGenerator.prototype._version = 3; + + /** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ + SourceMapGenerator.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator({ + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + }); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + + /** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ + SourceMapGenerator.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + this._validateMapping(generated, original, source, name); + } + + if (source != null) { + source = String(source); + if (!this._sources.has(source)) { + this._sources.add(source); + } + } + + if (name != null) { + name = String(name); + if (!this._names.has(name)) { + this._names.add(name); + } + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + + /** + * Set the source content for a source file. + */ + SourceMapGenerator.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = Object.create(null); + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + + /** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ + SourceMapGenerator.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + + 'or the source map\'s "file" property. Both were omitted.' + ); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "sourceFile" relative if an absolute Url is passed. + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + // Find mappings for the "sourceFile" + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source) + } + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + + /** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ + SourceMapGenerator.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aOriginal && 'line' in aOriginal && 'column' in aOriginal + && aGenerated.line > 0 && aGenerated.column >= 0 + && aOriginal.line > 0 && aOriginal.column >= 0 + && aSource) { + // Cases 2 and 3. + return; + } + else { + throw new Error('Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + })); + } + }; + + /** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ + SourceMapGenerator.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var next; + var mapping; + var nameIdx; + var sourceIdx; + + var mappings = this._mappings.toArray(); + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + next = '' + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + next += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + next += ','; + } + } + + next += base64VLQ.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + next += base64VLQ.encode(sourceIdx - previousSource); + previousSource = sourceIdx; + + // lines are stored 0-based in SourceMap spec version 3 + next += base64VLQ.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + next += base64VLQ.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + next += base64VLQ.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + + result += next; + } + + return result; + }; + + SourceMapGenerator.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) + ? this._sourcesContents[key] + : null; + }, this); + }; + + /** + * Externalize the source map. + */ + SourceMapGenerator.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + + /** + * Render the source map being generated to a string. + */ + SourceMapGenerator.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + + exports.SourceMapGenerator = SourceMapGenerator; + + +/***/ }, +/* 2 */ +/***/ function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + var base64 = __webpack_require__(3); + + // A single base 64 digit can contain 6 bits of data. For the base 64 variable + // length quantities we use in the source map spec, the first bit is the sign, + // the next four bits are the actual value, and the 6th bit is the + // continuation bit. The continuation bit tells us whether there are more + // digits in this value following this digit. + // + // Continuation + // | Sign + // | | + // V V + // 101011 + + var VLQ_BASE_SHIFT = 5; + + // binary: 100000 + var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + + // binary: 011111 + var VLQ_BASE_MASK = VLQ_BASE - 1; + + // binary: 100000 + var VLQ_CONTINUATION_BIT = VLQ_BASE; + + /** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ + function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; + } + + /** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ + function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; + } + + /** + * Returns the base 64 VLQ encoded value. + */ + exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; + }; + + /** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ + exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + + digit = base64.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; + }; + + +/***/ }, +/* 3 */ +/***/ function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); + + /** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ + exports.encode = function (number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + throw new TypeError("Must be between 0 and 63: " + number); + }; + + /** + * Decode a single base 64 character code digit to an integer. Returns -1 on + * failure. + */ + exports.decode = function (charCode) { + var bigA = 65; // 'A' + var bigZ = 90; // 'Z' + + var littleA = 97; // 'a' + var littleZ = 122; // 'z' + + var zero = 48; // '0' + var nine = 57; // '9' + + var plus = 43; // '+' + var slash = 47; // '/' + + var littleOffset = 26; + var numberOffset = 52; + + // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ + if (bigA <= charCode && charCode <= bigZ) { + return (charCode - bigA); + } + + // 26 - 51: abcdefghijklmnopqrstuvwxyz + if (littleA <= charCode && charCode <= littleZ) { + return (charCode - littleA + littleOffset); + } + + // 52 - 61: 0123456789 + if (zero <= charCode && charCode <= nine) { + return (charCode - zero + numberOffset); + } + + // 62: + + if (charCode == plus) { + return 62; + } + + // 63: / + if (charCode == slash) { + return 63; + } + + // Invalid base64 digit. + return -1; + }; + + +/***/ }, +/* 4 */ +/***/ function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + /** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ + function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } + } + exports.getArg = getArg; + + var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; + var dataUrlRegexp = /^data:.+\,.+$/; + + function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; + } + exports.urlParse = urlParse; + + function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; + } + exports.urlGenerate = urlGenerate; + + /** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consequtive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ + function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = exports.isAbsolute(path); + + var parts = path.split(/\/+/); + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; + } + exports.normalize = normalize; + + /** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ + function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; + } + exports.join = join; + + exports.isAbsolute = function (aPath) { + return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp); + }; + + /** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ + function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); + + // It is possible for the path to be above the root. In this case, simply + // checking whether the root is a prefix of the path won't work. Instead, we + // need to remove components from the root one by one, until either we find + // a prefix that fits, or we run out of components to remove. + var level = 0; + while (aPath.indexOf(aRoot + '/') !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + + // If the only part of the root that is left is the scheme (i.e. http://, + // file:///, etc.), one or more slashes (/), or simply nothing at all, we + // have exhausted all components, so the path is not relative to the root. + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + + ++level; + } + + // Make sure we add a "../" for each component we removed from the root. + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); + } + exports.relative = relative; + + var supportsNullProto = (function () { + var obj = Object.create(null); + return !('__proto__' in obj); + }()); + + function identity (s) { + return s; + } + + /** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ + function toSetString(aStr) { + if (isProtoString(aStr)) { + return '$' + aStr; + } + + return aStr; + } + exports.toSetString = supportsNullProto ? identity : toSetString; + + function fromSetString(aStr) { + if (isProtoString(aStr)) { + return aStr.slice(1); + } + + return aStr; + } + exports.fromSetString = supportsNullProto ? identity : fromSetString; + + function isProtoString(s) { + if (!s) { + return false; + } + + var length = s.length; + + if (length < 9 /* "__proto__".length */) { + return false; + } + + if (s.charCodeAt(length - 1) !== 95 /* '_' */ || + s.charCodeAt(length - 2) !== 95 /* '_' */ || + s.charCodeAt(length - 3) !== 111 /* 'o' */ || + s.charCodeAt(length - 4) !== 116 /* 't' */ || + s.charCodeAt(length - 5) !== 111 /* 'o' */ || + s.charCodeAt(length - 6) !== 114 /* 'r' */ || + s.charCodeAt(length - 7) !== 112 /* 'p' */ || + s.charCodeAt(length - 8) !== 95 /* '_' */ || + s.charCodeAt(length - 9) !== 95 /* '_' */) { + return false; + } + + for (var i = length - 10; i >= 0; i--) { + if (s.charCodeAt(i) !== 36 /* '$' */) { + return false; + } + } + + return true; + } + + /** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ + function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = mappingA.source - mappingB.source; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return mappingA.name - mappingB.name; + } + exports.compareByOriginalPositions = compareByOriginalPositions; + + /** + * Comparator between two mappings with deflated source and name indices where + * the generated positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ + function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = mappingA.source - mappingB.source; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return mappingA.name - mappingB.name; + } + exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + + function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + + if (aStr1 > aStr2) { + return 1; + } + + return -1; + } + + /** + * Comparator between two mappings with inflated source and name strings where + * the generated positions are compared. + */ + function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; + + +/***/ }, +/* 5 */ +/***/ function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = __webpack_require__(4); + var has = Object.prototype.hasOwnProperty; + + /** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ + function ArraySet() { + this._array = []; + this._set = Object.create(null); + } + + /** + * Static method for creating ArraySet instances from an existing array. + */ + ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; + }; + + /** + * Return how many unique items are in this ArraySet. If duplicates have been + * added, than those do not count towards the size. + * + * @returns Number + */ + ArraySet.prototype.size = function ArraySet_size() { + return Object.getOwnPropertyNames(this._set).length; + }; + + /** + * Add the given string to this set. + * + * @param String aStr + */ + ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = util.toSetString(aStr); + var isDuplicate = has.call(this._set, sStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + this._set[sStr] = idx; + } + }; + + /** + * Is the given string a member of this set? + * + * @param String aStr + */ + ArraySet.prototype.has = function ArraySet_has(aStr) { + var sStr = util.toSetString(aStr); + return has.call(this._set, sStr); + }; + + /** + * What is the index of the given string in the array? + * + * @param String aStr + */ + ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + var sStr = util.toSetString(aStr); + if (has.call(this._set, sStr)) { + return this._set[sStr]; + } + throw new Error('"' + aStr + '" is not in the set.'); + }; + + /** + * What is the element at the given index? + * + * @param Number aIdx + */ + ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); + }; + + /** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ + ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); + }; + + exports.ArraySet = ArraySet; + + +/***/ }, +/* 6 */ +/***/ function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = __webpack_require__(4); + + /** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ + function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || + util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; + } + + /** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ + function MappingList() { + this._array = []; + this._sorted = true; + // Serves as infimum + this._last = {generatedLine: -1, generatedColumn: 0}; + } + + /** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ + MappingList.prototype.unsortedForEach = + function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + + /** + * Add the given source mapping. + * + * @param Object aMapping + */ + MappingList.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } + }; + + /** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ + MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositionsInflated); + this._sorted = true; + } + return this._array; + }; + + exports.MappingList = MappingList; + + +/***/ }, +/* 7 */ +/***/ function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = __webpack_require__(4); + var binarySearch = __webpack_require__(8); + var ArraySet = __webpack_require__(5).ArraySet; + var base64VLQ = __webpack_require__(2); + var quickSort = __webpack_require__(9).quickSort; + + function SourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + return sourceMap.sections != null + ? new IndexedSourceMapConsumer(sourceMap) + : new BasicSourceMapConsumer(sourceMap); + } + + SourceMapConsumer.fromSourceMap = function(aSourceMap) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap); + } + + /** + * The version of the source mapping spec that we are consuming. + */ + SourceMapConsumer.prototype._version = 3; + + // `__generatedMappings` and `__originalMappings` are arrays that hold the + // parsed mapping coordinates from the source map's "mappings" attribute. They + // are lazily instantiated, accessed via the `_generatedMappings` and + // `_originalMappings` getters respectively, and we only parse the mappings + // and create these arrays once queried for a source location. We jump through + // these hoops because there can be many thousands of mappings, and parsing + // them is expensive, so we only want to do it if we must. + // + // Each object in the arrays is of the form: + // + // { + // generatedLine: The line number in the generated code, + // generatedColumn: The column number in the generated code, + // source: The path to the original source file that generated this + // chunk of code, + // originalLine: The line number in the original source that + // corresponds to this chunk of generated code, + // originalColumn: The column number in the original source that + // corresponds to this chunk of generated code, + // name: The name of the original symbol which generated this chunk of + // code. + // } + // + // All properties except for `generatedLine` and `generatedColumn` can be + // `null`. + // + // `_generatedMappings` is ordered by the generated positions. + // + // `_originalMappings` is ordered by the original positions. + + SourceMapConsumer.prototype.__generatedMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + get: function () { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } + }); + + SourceMapConsumer.prototype.__originalMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + get: function () { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } + }); + + SourceMapConsumer.prototype._charIsMappingSeparator = + function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + SourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + + SourceMapConsumer.GENERATED_ORDER = 1; + SourceMapConsumer.ORIGINAL_ORDER = 2; + + SourceMapConsumer.GREATEST_LOWER_BOUND = 1; + SourceMapConsumer.LEAST_UPPER_BOUND = 2; + + /** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ + SourceMapConsumer.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + mappings.map(function (mapping) { + var source = mapping.source === null ? null : this._sources.at(mapping.source); + if (source != null && sourceRoot != null) { + source = util.join(sourceRoot, source); + } + return { + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : this._names.at(mapping.name) + }; + }, this).forEach(aCallback, context); + }; + + /** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a either the line we are searching for or the next + * closest line that has any mappings. Otherwise, returns all mappings + * corresponding to the given line and either the column we are searching for + * or the next closest column that has any offsets. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: Optional. the column number in the original source. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + SourceMapConsumer.prototype.allGeneratedPositionsFor = + function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util.getArg(aArgs, 'line'); + + // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: line, + originalColumn: util.getArg(aArgs, 'column', 0) + }; + + if (this.sourceRoot != null) { + needle.source = util.relative(this.sourceRoot, needle.source); + } + if (!this._sources.has(needle.source)) { + return []; + } + needle.source = this._sources.indexOf(needle.source); + + var mappings = []; + + var index = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + binarySearch.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (aArgs.column === undefined) { + var originalLine = mapping.originalLine; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we found. Since + // mappings are sorted, this is guaranteed to find all mappings for + // the line we found. + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we were searching for. + // Since mappings are sorted, this is guaranteed to find all mappings for + // the line we are searching for. + while (mapping && + mapping.originalLine === line && + mapping.originalColumn == originalColumn) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } + } + + return mappings; + }; + + exports.SourceMapConsumer = SourceMapConsumer; + + /** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The only parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ + function BasicSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + sources = sources + .map(String) + // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + .map(util.normalize) + // Always ensure that absolute sources are internally stored relative to + // the source root, if the source root is absolute. Not doing this would + // be particularly problematic when the source root is a prefix of the + // source (valid, but why??). See github issue #199 and bugzil.la/1188982. + .map(function (source) { + return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) + ? util.relative(sourceRoot, source) + : source; + }); + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names.map(String), true); + this._sources = ArraySet.fromArray(sources, true); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this.file = file; + } + + BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + + /** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @returns BasicSourceMapConsumer + */ + BasicSourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + + // Because we are modifying the entries (by converting string sources and + // names to indices into the sources and names ArraySets), we have to make + // a copy of the entry or else bad things happen. Shared mutable state + // strikes again! See github issue #191. + + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping; + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + + destOriginalMappings.push(destMapping); + } + + destGeneratedMappings.push(destMapping); + } + + quickSort(smc.__originalMappings, util.compareByOriginalPositions); + + return smc; + }; + + /** + * The version of the source mapping spec that we are consuming. + */ + BasicSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function () { + return this._sources.toArray().map(function (s) { + return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; + }, this); + } + }); + + /** + * Provide the JIT with a nice shape / hidden class. + */ + function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; + } + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + BasicSourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedSegments = {}; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; + + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + index++; + previousGeneratedColumn = 0; + } + else if (aStr.charAt(index) === ',') { + index++; + } + else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; + + // Because each offset is encoded relative to the previous one, + // many segments often have the same encoding. We can exploit this + // fact by caching the parsed variable length fields of each segment, + // allowing us to avoid a second parse if we encounter the same + // segment again. + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + str = aStr.slice(index, end); + + segment = cachedSegments[str]; + if (segment) { + index += str.length; + } else { + segment = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + + if (segment.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + if (segment.length === 3) { + throw new Error('Found a source and line, but no column'); + } + + cachedSegments[str] = segment; + } + + // Generated column. + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + + if (segment.length > 1) { + // Original source. + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + + // Original line. + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + + // Original column. + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + + if (segment.length > 4) { + // Original name. + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + + generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + originalMappings.push(mapping); + } + } + } + + quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); + this.__generatedMappings = generatedMappings; + + quickSort(originalMappings, util.compareByOriginalPositions); + this.__originalMappings = originalMappings; + }; + + /** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ + BasicSourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; + + /** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ + BasicSourceMapConsumer.prototype.computeColumnSpans = + function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + + // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + + // The last mapping for each line spans the entire line. + mapping.lastGeneratedColumn = Infinity; + } + }; + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ + BasicSourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util.compareByGeneratedPositionsDeflated, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + if (source !== null) { + source = this._sources.at(source); + if (this.sourceRoot != null) { + source = util.join(this.sourceRoot, source); + } + } + var name = util.getArg(mapping, 'name', null); + if (name !== null) { + name = this._names.at(name); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: name + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + BasicSourceMapConsumer.prototype.hasContentsOfAllSources = + function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && + !this.sourcesContent.some(function (sc) { return sc == null; }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + BasicSourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + if (this.sourceRoot != null) { + aSource = util.relative(this.sourceRoot, aSource); + } + + if (this._sources.has(aSource)) { + return this.sourcesContent[this._sources.indexOf(aSource)]; + } + + var url; + if (this.sourceRoot != null + && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + aSource)) { + return this.sourcesContent[this._sources.indexOf("/" + aSource)]; + } + } + + // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + BasicSourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util.getArg(aArgs, 'source'); + if (this.sourceRoot != null) { + source = util.relative(this.sourceRoot, source); + } + if (!this._sources.has(source)) { + return { + line: null, + column: null, + lastColumn: null + }; + } + source = this._sources.indexOf(source); + + var needle = { + source: source, + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + + return { + line: null, + column: null, + lastColumn: null + }; + }; + + exports.BasicSourceMapConsumer = BasicSourceMapConsumer; + + /** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The only parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ + function IndexedSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + this._sources = new ArraySet(); + this._names = new ArraySet(); + + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || + (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + lastOffset = offset; + + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map')) + } + }); + } + + IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + + /** + * The version of the source mapping spec that we are consuming. + */ + IndexedSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function () { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + return sources; + } + }); + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ + IndexedSourceMapConsumer.prototype.originalPositionFor = + function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + // Find the section containing the generated position we're trying to map + // to an original position. + var sectionIndex = binarySearch.search(needle, this._sections, + function(needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + + return (needle.generatedColumn - + section.generatedOffset.generatedColumn); + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - + (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - + (section.generatedOffset.generatedLine === needle.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + bias: aArgs.bias + }); + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = + function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function (s) { + return s.consumer.hasContentsOfAllSources(); + }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + IndexedSourceMapConsumer.prototype.sourceContentFor = + function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + var content = section.consumer.sourceContentFor(aSource, true); + if (content) { + return content; + } + } + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + IndexedSourceMapConsumer.prototype.generatedPositionFor = + function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + // Only consider this section if the requested source is in the list of + // sources of the consumer. + if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + + (section.generatedOffset.generatedLine === generatedPosition.line + ? section.generatedOffset.generatedColumn - 1 + : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + IndexedSourceMapConsumer.prototype._parseMappings = + function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + + var source = section.consumer._sources.at(mapping.source); + if (section.consumer.sourceRoot !== null) { + source = util.join(section.consumer.sourceRoot, source); + } + this._sources.add(source); + source = this._sources.indexOf(source); + + var name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); + + // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + + (section.generatedOffset.generatedLine === mapping.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: name + }; + + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + } + } + + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); + }; + + exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; + + +/***/ }, +/* 8 */ +/***/ function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + exports.GREATEST_LOWER_BOUND = 1; + exports.LEAST_UPPER_BOUND = 2; + + /** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ + function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } + else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } + else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } + } + + /** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ + exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, + aCompare, aBias || exports.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } + + // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + + return index; + }; + + +/***/ }, +/* 9 */ +/***/ function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + // It turns out that some (most?) JavaScript engines don't self-host + // `Array.prototype.sort`. This makes sense because C++ will likely remain + // faster than JS when doing raw CPU-intensive sorting. However, when using a + // custom comparator function, calling back and forth between the VM's C++ and + // JIT'd JS is rather slow *and* loses JIT type information, resulting in + // worse generated code for the comparator function than would be optimal. In + // fact, when sorting with a comparator, these costs outweigh the benefits of + // sorting in C++. By using our own JS-implemented Quick Sort (below), we get + // a ~3500ms mean speed-up in `bench/bench.html`. + + /** + * Swap the elements indexed by `x` and `y` in the array `ary`. + * + * @param {Array} ary + * The array. + * @param {Number} x + * The index of the first item. + * @param {Number} y + * The index of the second item. + */ + function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; + } + + /** + * Returns a random integer within the range `low .. high` inclusive. + * + * @param {Number} low + * The lower bound on the range. + * @param {Number} high + * The upper bound on the range. + */ + function randomIntInRange(low, high) { + return Math.round(low + (Math.random() * (high - low))); + } + + /** + * The Quick Sort algorithm. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + * @param {Number} p + * Start index of the array + * @param {Number} r + * End index of the array + */ + function doQuickSort(ary, comparator, p, r) { + // If our lower bound is less than our upper bound, we (1) partition the + // array into two pieces and (2) recurse on each half. If it is not, this is + // the empty array and our base case. + + if (p < r) { + // (1) Partitioning. + // + // The partitioning chooses a pivot between `p` and `r` and moves all + // elements that are less than or equal to the pivot to the before it, and + // all the elements that are greater than it after it. The effect is that + // once partition is done, the pivot is in the exact place it will be when + // the array is put in sorted order, and it will not need to be moved + // again. This runs in O(n) time. + + // Always choose a random pivot so that an input array which is reverse + // sorted does not cause O(n^2) running time. + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + + swap(ary, pivotIndex, r); + var pivot = ary[r]; + + // Immediately after `j` is incremented in this loop, the following hold + // true: + // + // * Every element in `ary[p .. i]` is less than or equal to the pivot. + // + // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot) <= 0) { + i += 1; + swap(ary, i, j); + } + } + + swap(ary, i + 1, j); + var q = i + 1; + + // (2) Recurse on each half. + + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } + } + + /** + * Sort the given array in-place with the given comparator function. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + */ + exports.quickSort = function (ary, comparator) { + doQuickSort(ary, comparator, 0, ary.length - 1); + }; + + +/***/ }, +/* 10 */ +/***/ function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; + var util = __webpack_require__(4); + + // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other + // operating systems these days (capturing the result). + var REGEX_NEWLINE = /(\r?\n)/; + + // Newline character code for charCodeAt() comparisons + var NEWLINE_CODE = 10; + + // Private symbol for identifying `SourceNode`s when multiple versions of + // the source-map library are loaded. This MUST NOT CHANGE across + // versions! + var isSourceNode = "$$$isSourceNode$$$"; + + /** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ + function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); + } + + /** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ + SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are removed from this array, by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var shiftNextLine = function() { + var lineContents = remainingLines.shift(); + // The last line of a file might not have a newline. + var newLine = remainingLines.shift() || ""; + return lineContents + newLine; + }; + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[0]; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[0] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[0]; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[0] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + if (remainingLines.length > 0) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.join("")); + } + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath + ? util.join(aRelativePath, mapping.source) + : mapping.source; + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name)); + } + } + }; + + /** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } + }; + + /** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ + SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; + }; + + /** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ + SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; + }; + + /** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ + SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + + /** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + + /** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ + SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; + }; + + /** + * Returns the string representation of this source node along with a source + * map. + */ + SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; + }; + + exports.SourceNode = SourceNode; + + +/***/ } +/******/ ]) +}); +; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay91bml2ZXJzYWxNb2R1bGVEZWZpbml0aW9uIiwid2VicGFjazovLy93ZWJwYWNrL2Jvb3RzdHJhcCBlMTM0NGZmMjJhYzA2Zjk0NWVlNCIsIndlYnBhY2s6Ly8vLi9zb3VyY2UtbWFwLmpzIiwid2VicGFjazovLy8uL2xpYi9zb3VyY2UtbWFwLWdlbmVyYXRvci5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmFzZTY0LXZscS5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmFzZTY0LmpzIiwid2VicGFjazovLy8uL2xpYi91dGlsLmpzIiwid2VicGFjazovLy8uL2xpYi9hcnJheS1zZXQuanMiLCJ3ZWJwYWNrOi8vLy4vbGliL21hcHBpbmctbGlzdC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvc291cmNlLW1hcC1jb25zdW1lci5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmluYXJ5LXNlYXJjaC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvcXVpY2stc29ydC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvc291cmNlLW5vZGUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsQ0FBQztBQUNELE87QUNWQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQSx1QkFBZTtBQUNmO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOzs7QUFHQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBOzs7Ozs7O0FDdENBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7Ozs7QUNQQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQSxNQUFLO0FBQ0w7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxVQUFTO0FBQ1Q7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUEsTUFBSztBQUNMO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsUUFBTztBQUNQO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBLDJDQUEwQyxTQUFTO0FBQ25EO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0EscUJBQW9CO0FBQ3BCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7Ozs7OztBQ25aQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSw0REFBMkQ7QUFDM0QscUJBQW9CO0FBQ3BCO0FBQ0E7QUFDQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBRzs7QUFFSDtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLElBQUc7O0FBRUg7QUFDQTtBQUNBOzs7Ozs7O0FDM0lBLGlCQUFnQixvQkFBb0I7QUFDcEM7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGlCQUFnQjtBQUNoQixpQkFBZ0I7O0FBRWhCLG9CQUFtQjtBQUNuQixxQkFBb0I7O0FBRXBCLGlCQUFnQjtBQUNoQixpQkFBZ0I7O0FBRWhCLGlCQUFnQjtBQUNoQixrQkFBaUI7O0FBRWpCO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOzs7Ozs7O0FDbEVBLGlCQUFnQixvQkFBb0I7QUFDcEM7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLElBQUc7QUFDSDtBQUNBLElBQUc7QUFDSDtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBLCtDQUE4QyxRQUFRO0FBQ3REO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDtBQUNBLE1BQUs7QUFDTDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxRQUFPO0FBQ1A7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0EsRUFBQzs7QUFFRDtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQSw0QkFBMkIsUUFBUTtBQUNuQztBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOzs7Ozs7O0FDaGFBLGlCQUFnQixvQkFBb0I7QUFDcEM7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSx1Q0FBc0MsU0FBUztBQUMvQztBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7Ozs7Ozs7QUN2R0EsaUJBQWdCLG9CQUFvQjtBQUNwQztBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGlCQUFnQjtBQUNoQjs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxJQUFHO0FBQ0g7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7Ozs7Ozs7QUM5RUEsaUJBQWdCLG9CQUFvQjtBQUNwQztBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0EsdURBQXNEO0FBQ3REOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0EsRUFBQzs7QUFFRDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBLEVBQUM7O0FBRUQ7QUFDQTtBQUNBO0FBQ0Esb0JBQW1CO0FBQ25COztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxNQUFLO0FBQ0w7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxZQUFXOztBQUVYO0FBQ0E7QUFDQSxRQUFPO0FBQ1A7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFlBQVc7O0FBRVg7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLDRCQUEyQixNQUFNO0FBQ2pDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsdURBQXNEO0FBQ3REOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxNQUFLOztBQUVMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQSx1REFBc0QsWUFBWTtBQUNsRTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxNQUFLO0FBQ0w7QUFDQSxFQUFDOztBQUVEO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBLG9DQUFtQztBQUNuQztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsMEJBQXlCLGNBQWM7QUFDdkM7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxVQUFTO0FBQ1Q7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLHdCQUF1Qix3Q0FBd0M7QUFDL0Q7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGdEQUErQyxtQkFBbUIsRUFBRTtBQUNwRTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxrQkFBaUIsb0JBQW9CO0FBQ3JDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSw4QkFBNkIsTUFBTTtBQUNuQztBQUNBLFFBQU87QUFDUDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLHVEQUFzRDtBQUN0RDs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsUUFBTztBQUNQO0FBQ0E7QUFDQSxJQUFHO0FBQ0g7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxvQkFBbUIsMkJBQTJCO0FBQzlDLHNCQUFxQiwrQ0FBK0M7QUFDcEU7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLEVBQUM7O0FBRUQ7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBLFFBQU87QUFDUDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxNQUFLO0FBQ0w7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLG9CQUFtQiwyQkFBMkI7QUFDOUM7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0Esb0JBQW1CLDJCQUEyQjtBQUM5Qzs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxvQkFBbUIsMkJBQTJCO0FBQzlDO0FBQ0E7QUFDQSxzQkFBcUIsNEJBQTRCO0FBQ2pEOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTs7Ozs7OztBQ3pqQ0EsaUJBQWdCLG9CQUFvQjtBQUNwQztBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7Ozs7Ozs7QUM5R0EsaUJBQWdCLG9CQUFvQjtBQUNwQztBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxZQUFXLE1BQU07QUFDakI7QUFDQSxZQUFXLE9BQU87QUFDbEI7QUFDQSxZQUFXLE9BQU87QUFDbEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0EsWUFBVyxPQUFPO0FBQ2xCO0FBQ0EsWUFBVyxPQUFPO0FBQ2xCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0EsWUFBVyxNQUFNO0FBQ2pCO0FBQ0EsWUFBVyxTQUFTO0FBQ3BCO0FBQ0EsWUFBVyxPQUFPO0FBQ2xCO0FBQ0EsWUFBVyxPQUFPO0FBQ2xCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxvQkFBbUIsT0FBTztBQUMxQjtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0EsWUFBVyxNQUFNO0FBQ2pCO0FBQ0EsWUFBVyxTQUFTO0FBQ3BCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7Ozs7QUNqSEEsaUJBQWdCLG9CQUFvQjtBQUNwQztBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsVUFBUztBQUNUO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxNQUFLO0FBQ0w7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7O0FBRUw7O0FBRUE7QUFDQTtBQUNBO0FBQ0EsUUFBTztBQUNQO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxNQUFLO0FBQ0w7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGtDQUFpQyxRQUFRO0FBQ3pDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLDhDQUE2QyxTQUFTO0FBQ3REO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLHFCQUFvQjtBQUNwQjtBQUNBO0FBQ0EsdUNBQXNDO0FBQ3RDO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGdCQUFlLFdBQVc7QUFDMUI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGdEQUErQyxTQUFTO0FBQ3hEO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0EsMENBQXlDLFNBQVM7QUFDbEQ7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxJQUFHO0FBQ0g7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxZQUFXO0FBQ1g7QUFDQTtBQUNBO0FBQ0EsWUFBVztBQUNYO0FBQ0EsVUFBUztBQUNUO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsUUFBTztBQUNQO0FBQ0E7QUFDQTtBQUNBLDZDQUE0QyxjQUFjO0FBQzFEO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsVUFBUztBQUNUO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxjQUFhO0FBQ2I7QUFDQTtBQUNBO0FBQ0EsY0FBYTtBQUNiO0FBQ0EsWUFBVztBQUNYO0FBQ0EsUUFBTztBQUNQO0FBQ0E7QUFDQTtBQUNBLElBQUc7QUFDSDtBQUNBO0FBQ0EsSUFBRzs7QUFFSCxXQUFVO0FBQ1Y7O0FBRUEiLCJmaWxlIjoic291cmNlLW1hcC5kZWJ1Zy5qcyIsInNvdXJjZXNDb250ZW50IjpbIihmdW5jdGlvbiB3ZWJwYWNrVW5pdmVyc2FsTW9kdWxlRGVmaW5pdGlvbihyb290LCBmYWN0b3J5KSB7XG5cdGlmKHR5cGVvZiBleHBvcnRzID09PSAnb2JqZWN0JyAmJiB0eXBlb2YgbW9kdWxlID09PSAnb2JqZWN0Jylcblx0XHRtb2R1bGUuZXhwb3J0cyA9IGZhY3RvcnkoKTtcblx0ZWxzZSBpZih0eXBlb2YgZGVmaW5lID09PSAnZnVuY3Rpb24nICYmIGRlZmluZS5hbWQpXG5cdFx0ZGVmaW5lKFtdLCBmYWN0b3J5KTtcblx0ZWxzZSBpZih0eXBlb2YgZXhwb3J0cyA9PT0gJ29iamVjdCcpXG5cdFx0ZXhwb3J0c1tcInNvdXJjZU1hcFwiXSA9IGZhY3RvcnkoKTtcblx0ZWxzZVxuXHRcdHJvb3RbXCJzb3VyY2VNYXBcIl0gPSBmYWN0b3J5KCk7XG59KSh0aGlzLCBmdW5jdGlvbigpIHtcbnJldHVybiBcblxuXG4vKiogV0VCUEFDSyBGT09URVIgKipcbiAqKiB3ZWJwYWNrL3VuaXZlcnNhbE1vZHVsZURlZmluaXRpb25cbiAqKi8iLCIgXHQvLyBUaGUgbW9kdWxlIGNhY2hlXG4gXHR2YXIgaW5zdGFsbGVkTW9kdWxlcyA9IHt9O1xuXG4gXHQvLyBUaGUgcmVxdWlyZSBmdW5jdGlvblxuIFx0ZnVuY3Rpb24gX193ZWJwYWNrX3JlcXVpcmVfXyhtb2R1bGVJZCkge1xuXG4gXHRcdC8vIENoZWNrIGlmIG1vZHVsZSBpcyBpbiBjYWNoZVxuIFx0XHRpZihpbnN0YWxsZWRNb2R1bGVzW21vZHVsZUlkXSlcbiBcdFx0XHRyZXR1cm4gaW5zdGFsbGVkTW9kdWxlc1ttb2R1bGVJZF0uZXhwb3J0cztcblxuIFx0XHQvLyBDcmVhdGUgYSBuZXcgbW9kdWxlIChhbmQgcHV0IGl0IGludG8gdGhlIGNhY2hlKVxuIFx0XHR2YXIgbW9kdWxlID0gaW5zdGFsbGVkTW9kdWxlc1ttb2R1bGVJZF0gPSB7XG4gXHRcdFx0ZXhwb3J0czoge30sXG4gXHRcdFx0aWQ6IG1vZHVsZUlkLFxuIFx0XHRcdGxvYWRlZDogZmFsc2VcbiBcdFx0fTtcblxuIFx0XHQvLyBFeGVjdXRlIHRoZSBtb2R1bGUgZnVuY3Rpb25cbiBcdFx0bW9kdWxlc1ttb2R1bGVJZF0uY2FsbChtb2R1bGUuZXhwb3J0cywgbW9kdWxlLCBtb2R1bGUuZXhwb3J0cywgX193ZWJwYWNrX3JlcXVpcmVfXyk7XG5cbiBcdFx0Ly8gRmxhZyB0aGUgbW9kdWxlIGFzIGxvYWRlZFxuIFx0XHRtb2R1bGUubG9hZGVkID0gdHJ1ZTtcblxuIFx0XHQvLyBSZXR1cm4gdGhlIGV4cG9ydHMgb2YgdGhlIG1vZHVsZVxuIFx0XHRyZXR1cm4gbW9kdWxlLmV4cG9ydHM7XG4gXHR9XG5cblxuIFx0Ly8gZXhwb3NlIHRoZSBtb2R1bGVzIG9iamVjdCAoX193ZWJwYWNrX21vZHVsZXNfXylcbiBcdF9fd2VicGFja19yZXF1aXJlX18ubSA9IG1vZHVsZXM7XG5cbiBcdC8vIGV4cG9zZSB0aGUgbW9kdWxlIGNhY2hlXG4gXHRfX3dlYnBhY2tfcmVxdWlyZV9fLmMgPSBpbnN0YWxsZWRNb2R1bGVzO1xuXG4gXHQvLyBfX3dlYnBhY2tfcHVibGljX3BhdGhfX1xuIFx0X193ZWJwYWNrX3JlcXVpcmVfXy5wID0gXCJcIjtcblxuIFx0Ly8gTG9hZCBlbnRyeSBtb2R1bGUgYW5kIHJldHVybiBleHBvcnRzXG4gXHRyZXR1cm4gX193ZWJwYWNrX3JlcXVpcmVfXygwKTtcblxuXG5cbi8qKiBXRUJQQUNLIEZPT1RFUiAqKlxuICoqIHdlYnBhY2svYm9vdHN0cmFwIGUxMzQ0ZmYyMmFjMDZmOTQ1ZWU0XG4gKiovIiwiLypcbiAqIENvcHlyaWdodCAyMDA5LTIwMTEgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFLnR4dCBvcjpcbiAqIGh0dHA6Ly9vcGVuc291cmNlLm9yZy9saWNlbnNlcy9CU0QtMy1DbGF1c2VcbiAqL1xuZXhwb3J0cy5Tb3VyY2VNYXBHZW5lcmF0b3IgPSByZXF1aXJlKCcuL2xpYi9zb3VyY2UtbWFwLWdlbmVyYXRvcicpLlNvdXJjZU1hcEdlbmVyYXRvcjtcbmV4cG9ydHMuU291cmNlTWFwQ29uc3VtZXIgPSByZXF1aXJlKCcuL2xpYi9zb3VyY2UtbWFwLWNvbnN1bWVyJykuU291cmNlTWFwQ29uc3VtZXI7XG5leHBvcnRzLlNvdXJjZU5vZGUgPSByZXF1aXJlKCcuL2xpYi9zb3VyY2Utbm9kZScpLlNvdXJjZU5vZGU7XG5cblxuXG4vKioqKioqKioqKioqKioqKipcbiAqKiBXRUJQQUNLIEZPT1RFUlxuICoqIC4vc291cmNlLW1hcC5qc1xuICoqIG1vZHVsZSBpZCA9IDBcbiAqKiBtb2R1bGUgY2h1bmtzID0gMFxuICoqLyIsIi8qIC0qLSBNb2RlOiBqczsganMtaW5kZW50LWxldmVsOiAyOyAtKi0gKi9cbi8qXG4gKiBDb3B5cmlnaHQgMjAxMSBNb3ppbGxhIEZvdW5kYXRpb24gYW5kIGNvbnRyaWJ1dG9yc1xuICogTGljZW5zZWQgdW5kZXIgdGhlIE5ldyBCU0QgbGljZW5zZS4gU2VlIExJQ0VOU0Ugb3I6XG4gKiBodHRwOi8vb3BlbnNvdXJjZS5vcmcvbGljZW5zZXMvQlNELTMtQ2xhdXNlXG4gKi9cblxudmFyIGJhc2U2NFZMUSA9IHJlcXVpcmUoJy4vYmFzZTY0LXZscScpO1xudmFyIHV0aWwgPSByZXF1aXJlKCcuL3V0aWwnKTtcbnZhciBBcnJheVNldCA9IHJlcXVpcmUoJy4vYXJyYXktc2V0JykuQXJyYXlTZXQ7XG52YXIgTWFwcGluZ0xpc3QgPSByZXF1aXJlKCcuL21hcHBpbmctbGlzdCcpLk1hcHBpbmdMaXN0O1xuXG4vKipcbiAqIEFuIGluc3RhbmNlIG9mIHRoZSBTb3VyY2VNYXBHZW5lcmF0b3IgcmVwcmVzZW50cyBhIHNvdXJjZSBtYXAgd2hpY2ggaXNcbiAqIGJlaW5nIGJ1aWx0IGluY3JlbWVudGFsbHkuIFlvdSBtYXkgcGFzcyBhbiBvYmplY3Qgd2l0aCB0aGUgZm9sbG93aW5nXG4gKiBwcm9wZXJ0aWVzOlxuICpcbiAqICAgLSBmaWxlOiBUaGUgZmlsZW5hbWUgb2YgdGhlIGdlbmVyYXRlZCBzb3VyY2UuXG4gKiAgIC0gc291cmNlUm9vdDogQSByb290IGZvciBhbGwgcmVsYXRpdmUgVVJMcyBpbiB0aGlzIHNvdXJjZSBtYXAuXG4gKi9cbmZ1bmN0aW9uIFNvdXJjZU1hcEdlbmVyYXRvcihhQXJncykge1xuICBpZiAoIWFBcmdzKSB7XG4gICAgYUFyZ3MgPSB7fTtcbiAgfVxuICB0aGlzLl9maWxlID0gdXRpbC5nZXRBcmcoYUFyZ3MsICdmaWxlJywgbnVsbCk7XG4gIHRoaXMuX3NvdXJjZVJvb3QgPSB1dGlsLmdldEFyZyhhQXJncywgJ3NvdXJjZVJvb3QnLCBudWxsKTtcbiAgdGhpcy5fc2tpcFZhbGlkYXRpb24gPSB1dGlsLmdldEFyZyhhQXJncywgJ3NraXBWYWxpZGF0aW9uJywgZmFsc2UpO1xuICB0aGlzLl9zb3VyY2VzID0gbmV3IEFycmF5U2V0KCk7XG4gIHRoaXMuX25hbWVzID0gbmV3IEFycmF5U2V0KCk7XG4gIHRoaXMuX21hcHBpbmdzID0gbmV3IE1hcHBpbmdMaXN0KCk7XG4gIHRoaXMuX3NvdXJjZXNDb250ZW50cyA9IG51bGw7XG59XG5cblNvdXJjZU1hcEdlbmVyYXRvci5wcm90b3R5cGUuX3ZlcnNpb24gPSAzO1xuXG4vKipcbiAqIENyZWF0ZXMgYSBuZXcgU291cmNlTWFwR2VuZXJhdG9yIGJhc2VkIG9uIGEgU291cmNlTWFwQ29uc3VtZXJcbiAqXG4gKiBAcGFyYW0gYVNvdXJjZU1hcENvbnN1bWVyIFRoZSBTb3VyY2VNYXAuXG4gKi9cblNvdXJjZU1hcEdlbmVyYXRvci5mcm9tU291cmNlTWFwID1cbiAgZnVuY3Rpb24gU291cmNlTWFwR2VuZXJhdG9yX2Zyb21Tb3VyY2VNYXAoYVNvdXJjZU1hcENvbnN1bWVyKSB7XG4gICAgdmFyIHNvdXJjZVJvb3QgPSBhU291cmNlTWFwQ29uc3VtZXIuc291cmNlUm9vdDtcbiAgICB2YXIgZ2VuZXJhdG9yID0gbmV3IFNvdXJjZU1hcEdlbmVyYXRvcih7XG4gICAgICBmaWxlOiBhU291cmNlTWFwQ29uc3VtZXIuZmlsZSxcbiAgICAgIHNvdXJjZVJvb3Q6IHNvdXJjZVJvb3RcbiAgICB9KTtcbiAgICBhU291cmNlTWFwQ29uc3VtZXIuZWFjaE1hcHBpbmcoZnVuY3Rpb24gKG1hcHBpbmcpIHtcbiAgICAgIHZhciBuZXdNYXBwaW5nID0ge1xuICAgICAgICBnZW5lcmF0ZWQ6IHtcbiAgICAgICAgICBsaW5lOiBtYXBwaW5nLmdlbmVyYXRlZExpbmUsXG4gICAgICAgICAgY29sdW1uOiBtYXBwaW5nLmdlbmVyYXRlZENvbHVtblxuICAgICAgICB9XG4gICAgICB9O1xuXG4gICAgICBpZiAobWFwcGluZy5zb3VyY2UgIT0gbnVsbCkge1xuICAgICAgICBuZXdNYXBwaW5nLnNvdXJjZSA9IG1hcHBpbmcuc291cmNlO1xuICAgICAgICBpZiAoc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICAgICAgbmV3TWFwcGluZy5zb3VyY2UgPSB1dGlsLnJlbGF0aXZlKHNvdXJjZVJvb3QsIG5ld01hcHBpbmcuc291cmNlKTtcbiAgICAgICAgfVxuXG4gICAgICAgIG5ld01hcHBpbmcub3JpZ2luYWwgPSB7XG4gICAgICAgICAgbGluZTogbWFwcGluZy5vcmlnaW5hbExpbmUsXG4gICAgICAgICAgY29sdW1uOiBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uXG4gICAgICAgIH07XG5cbiAgICAgICAgaWYgKG1hcHBpbmcubmFtZSAhPSBudWxsKSB7XG4gICAgICAgICAgbmV3TWFwcGluZy5uYW1lID0gbWFwcGluZy5uYW1lO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIGdlbmVyYXRvci5hZGRNYXBwaW5nKG5ld01hcHBpbmcpO1xuICAgIH0pO1xuICAgIGFTb3VyY2VNYXBDb25zdW1lci5zb3VyY2VzLmZvckVhY2goZnVuY3Rpb24gKHNvdXJjZUZpbGUpIHtcbiAgICAgIHZhciBjb250ZW50ID0gYVNvdXJjZU1hcENvbnN1bWVyLnNvdXJjZUNvbnRlbnRGb3Ioc291cmNlRmlsZSk7XG4gICAgICBpZiAoY29udGVudCAhPSBudWxsKSB7XG4gICAgICAgIGdlbmVyYXRvci5zZXRTb3VyY2VDb250ZW50KHNvdXJjZUZpbGUsIGNvbnRlbnQpO1xuICAgICAgfVxuICAgIH0pO1xuICAgIHJldHVybiBnZW5lcmF0b3I7XG4gIH07XG5cbi8qKlxuICogQWRkIGEgc2luZ2xlIG1hcHBpbmcgZnJvbSBvcmlnaW5hbCBzb3VyY2UgbGluZSBhbmQgY29sdW1uIHRvIHRoZSBnZW5lcmF0ZWRcbiAqIHNvdXJjZSdzIGxpbmUgYW5kIGNvbHVtbiBmb3IgdGhpcyBzb3VyY2UgbWFwIGJlaW5nIGNyZWF0ZWQuIFRoZSBtYXBwaW5nXG4gKiBvYmplY3Qgc2hvdWxkIGhhdmUgdGhlIGZvbGxvd2luZyBwcm9wZXJ0aWVzOlxuICpcbiAqICAgLSBnZW5lcmF0ZWQ6IEFuIG9iamVjdCB3aXRoIHRoZSBnZW5lcmF0ZWQgbGluZSBhbmQgY29sdW1uIHBvc2l0aW9ucy5cbiAqICAgLSBvcmlnaW5hbDogQW4gb2JqZWN0IHdpdGggdGhlIG9yaWdpbmFsIGxpbmUgYW5kIGNvbHVtbiBwb3NpdGlvbnMuXG4gKiAgIC0gc291cmNlOiBUaGUgb3JpZ2luYWwgc291cmNlIGZpbGUgKHJlbGF0aXZlIHRvIHRoZSBzb3VyY2VSb290KS5cbiAqICAgLSBuYW1lOiBBbiBvcHRpb25hbCBvcmlnaW5hbCB0b2tlbiBuYW1lIGZvciB0aGlzIG1hcHBpbmcuXG4gKi9cblNvdXJjZU1hcEdlbmVyYXRvci5wcm90b3R5cGUuYWRkTWFwcGluZyA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcEdlbmVyYXRvcl9hZGRNYXBwaW5nKGFBcmdzKSB7XG4gICAgdmFyIGdlbmVyYXRlZCA9IHV0aWwuZ2V0QXJnKGFBcmdzLCAnZ2VuZXJhdGVkJyk7XG4gICAgdmFyIG9yaWdpbmFsID0gdXRpbC5nZXRBcmcoYUFyZ3MsICdvcmlnaW5hbCcsIG51bGwpO1xuICAgIHZhciBzb3VyY2UgPSB1dGlsLmdldEFyZyhhQXJncywgJ3NvdXJjZScsIG51bGwpO1xuICAgIHZhciBuYW1lID0gdXRpbC5nZXRBcmcoYUFyZ3MsICduYW1lJywgbnVsbCk7XG5cbiAgICBpZiAoIXRoaXMuX3NraXBWYWxpZGF0aW9uKSB7XG4gICAgICB0aGlzLl92YWxpZGF0ZU1hcHBpbmcoZ2VuZXJhdGVkLCBvcmlnaW5hbCwgc291cmNlLCBuYW1lKTtcbiAgICB9XG5cbiAgICBpZiAoc291cmNlICE9IG51bGwpIHtcbiAgICAgIHNvdXJjZSA9IFN0cmluZyhzb3VyY2UpO1xuICAgICAgaWYgKCF0aGlzLl9zb3VyY2VzLmhhcyhzb3VyY2UpKSB7XG4gICAgICAgIHRoaXMuX3NvdXJjZXMuYWRkKHNvdXJjZSk7XG4gICAgICB9XG4gICAgfVxuXG4gICAgaWYgKG5hbWUgIT0gbnVsbCkge1xuICAgICAgbmFtZSA9IFN0cmluZyhuYW1lKTtcbiAgICAgIGlmICghdGhpcy5fbmFtZXMuaGFzKG5hbWUpKSB7XG4gICAgICAgIHRoaXMuX25hbWVzLmFkZChuYW1lKTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICB0aGlzLl9tYXBwaW5ncy5hZGQoe1xuICAgICAgZ2VuZXJhdGVkTGluZTogZ2VuZXJhdGVkLmxpbmUsXG4gICAgICBnZW5lcmF0ZWRDb2x1bW46IGdlbmVyYXRlZC5jb2x1bW4sXG4gICAgICBvcmlnaW5hbExpbmU6IG9yaWdpbmFsICE9IG51bGwgJiYgb3JpZ2luYWwubGluZSxcbiAgICAgIG9yaWdpbmFsQ29sdW1uOiBvcmlnaW5hbCAhPSBudWxsICYmIG9yaWdpbmFsLmNvbHVtbixcbiAgICAgIHNvdXJjZTogc291cmNlLFxuICAgICAgbmFtZTogbmFtZVxuICAgIH0pO1xuICB9O1xuXG4vKipcbiAqIFNldCB0aGUgc291cmNlIGNvbnRlbnQgZm9yIGEgc291cmNlIGZpbGUuXG4gKi9cblNvdXJjZU1hcEdlbmVyYXRvci5wcm90b3R5cGUuc2V0U291cmNlQ29udGVudCA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcEdlbmVyYXRvcl9zZXRTb3VyY2VDb250ZW50KGFTb3VyY2VGaWxlLCBhU291cmNlQ29udGVudCkge1xuICAgIHZhciBzb3VyY2UgPSBhU291cmNlRmlsZTtcbiAgICBpZiAodGhpcy5fc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICBzb3VyY2UgPSB1dGlsLnJlbGF0aXZlKHRoaXMuX3NvdXJjZVJvb3QsIHNvdXJjZSk7XG4gICAgfVxuXG4gICAgaWYgKGFTb3VyY2VDb250ZW50ICE9IG51bGwpIHtcbiAgICAgIC8vIEFkZCB0aGUgc291cmNlIGNvbnRlbnQgdG8gdGhlIF9zb3VyY2VzQ29udGVudHMgbWFwLlxuICAgICAgLy8gQ3JlYXRlIGEgbmV3IF9zb3VyY2VzQ29udGVudHMgbWFwIGlmIHRoZSBwcm9wZXJ0eSBpcyBudWxsLlxuICAgICAgaWYgKCF0aGlzLl9zb3VyY2VzQ29udGVudHMpIHtcbiAgICAgICAgdGhpcy5fc291cmNlc0NvbnRlbnRzID0gT2JqZWN0LmNyZWF0ZShudWxsKTtcbiAgICAgIH1cbiAgICAgIHRoaXMuX3NvdXJjZXNDb250ZW50c1t1dGlsLnRvU2V0U3RyaW5nKHNvdXJjZSldID0gYVNvdXJjZUNvbnRlbnQ7XG4gICAgfSBlbHNlIGlmICh0aGlzLl9zb3VyY2VzQ29udGVudHMpIHtcbiAgICAgIC8vIFJlbW92ZSB0aGUgc291cmNlIGZpbGUgZnJvbSB0aGUgX3NvdXJjZXNDb250ZW50cyBtYXAuXG4gICAgICAvLyBJZiB0aGUgX3NvdXJjZXNDb250ZW50cyBtYXAgaXMgZW1wdHksIHNldCB0aGUgcHJvcGVydHkgdG8gbnVsbC5cbiAgICAgIGRlbGV0ZSB0aGlzLl9zb3VyY2VzQ29udGVudHNbdXRpbC50b1NldFN0cmluZyhzb3VyY2UpXTtcbiAgICAgIGlmIChPYmplY3Qua2V5cyh0aGlzLl9zb3VyY2VzQ29udGVudHMpLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICB0aGlzLl9zb3VyY2VzQ29udGVudHMgPSBudWxsO1xuICAgICAgfVxuICAgIH1cbiAgfTtcblxuLyoqXG4gKiBBcHBsaWVzIHRoZSBtYXBwaW5ncyBvZiBhIHN1Yi1zb3VyY2UtbWFwIGZvciBhIHNwZWNpZmljIHNvdXJjZSBmaWxlIHRvIHRoZVxuICogc291cmNlIG1hcCBiZWluZyBnZW5lcmF0ZWQuIEVhY2ggbWFwcGluZyB0byB0aGUgc3VwcGxpZWQgc291cmNlIGZpbGUgaXNcbiAqIHJld3JpdHRlbiB1c2luZyB0aGUgc3VwcGxpZWQgc291cmNlIG1hcC4gTm90ZTogVGhlIHJlc29sdXRpb24gZm9yIHRoZVxuICogcmVzdWx0aW5nIG1hcHBpbmdzIGlzIHRoZSBtaW5pbWl1bSBvZiB0aGlzIG1hcCBhbmQgdGhlIHN1cHBsaWVkIG1hcC5cbiAqXG4gKiBAcGFyYW0gYVNvdXJjZU1hcENvbnN1bWVyIFRoZSBzb3VyY2UgbWFwIHRvIGJlIGFwcGxpZWQuXG4gKiBAcGFyYW0gYVNvdXJjZUZpbGUgT3B0aW9uYWwuIFRoZSBmaWxlbmFtZSBvZiB0aGUgc291cmNlIGZpbGUuXG4gKiAgICAgICAgSWYgb21pdHRlZCwgU291cmNlTWFwQ29uc3VtZXIncyBmaWxlIHByb3BlcnR5IHdpbGwgYmUgdXNlZC5cbiAqIEBwYXJhbSBhU291cmNlTWFwUGF0aCBPcHRpb25hbC4gVGhlIGRpcm5hbWUgb2YgdGhlIHBhdGggdG8gdGhlIHNvdXJjZSBtYXBcbiAqICAgICAgICB0byBiZSBhcHBsaWVkLiBJZiByZWxhdGl2ZSwgaXQgaXMgcmVsYXRpdmUgdG8gdGhlIFNvdXJjZU1hcENvbnN1bWVyLlxuICogICAgICAgIFRoaXMgcGFyYW1ldGVyIGlzIG5lZWRlZCB3aGVuIHRoZSB0d28gc291cmNlIG1hcHMgYXJlbid0IGluIHRoZSBzYW1lXG4gKiAgICAgICAgZGlyZWN0b3J5LCBhbmQgdGhlIHNvdXJjZSBtYXAgdG8gYmUgYXBwbGllZCBjb250YWlucyByZWxhdGl2ZSBzb3VyY2VcbiAqICAgICAgICBwYXRocy4gSWYgc28sIHRob3NlIHJlbGF0aXZlIHNvdXJjZSBwYXRocyBuZWVkIHRvIGJlIHJld3JpdHRlblxuICogICAgICAgIHJlbGF0aXZlIHRvIHRoZSBTb3VyY2VNYXBHZW5lcmF0b3IuXG4gKi9cblNvdXJjZU1hcEdlbmVyYXRvci5wcm90b3R5cGUuYXBwbHlTb3VyY2VNYXAgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBHZW5lcmF0b3JfYXBwbHlTb3VyY2VNYXAoYVNvdXJjZU1hcENvbnN1bWVyLCBhU291cmNlRmlsZSwgYVNvdXJjZU1hcFBhdGgpIHtcbiAgICB2YXIgc291cmNlRmlsZSA9IGFTb3VyY2VGaWxlO1xuICAgIC8vIElmIGFTb3VyY2VGaWxlIGlzIG9taXR0ZWQsIHdlIHdpbGwgdXNlIHRoZSBmaWxlIHByb3BlcnR5IG9mIHRoZSBTb3VyY2VNYXBcbiAgICBpZiAoYVNvdXJjZUZpbGUgPT0gbnVsbCkge1xuICAgICAgaWYgKGFTb3VyY2VNYXBDb25zdW1lci5maWxlID09IG51bGwpIHtcbiAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxuICAgICAgICAgICdTb3VyY2VNYXBHZW5lcmF0b3IucHJvdG90eXBlLmFwcGx5U291cmNlTWFwIHJlcXVpcmVzIGVpdGhlciBhbiBleHBsaWNpdCBzb3VyY2UgZmlsZSwgJyArXG4gICAgICAgICAgJ29yIHRoZSBzb3VyY2UgbWFwXFwncyBcImZpbGVcIiBwcm9wZXJ0eS4gQm90aCB3ZXJlIG9taXR0ZWQuJ1xuICAgICAgICApO1xuICAgICAgfVxuICAgICAgc291cmNlRmlsZSA9IGFTb3VyY2VNYXBDb25zdW1lci5maWxlO1xuICAgIH1cbiAgICB2YXIgc291cmNlUm9vdCA9IHRoaXMuX3NvdXJjZVJvb3Q7XG4gICAgLy8gTWFrZSBcInNvdXJjZUZpbGVcIiByZWxhdGl2ZSBpZiBhbiBhYnNvbHV0ZSBVcmwgaXMgcGFzc2VkLlxuICAgIGlmIChzb3VyY2VSb290ICE9IG51bGwpIHtcbiAgICAgIHNvdXJjZUZpbGUgPSB1dGlsLnJlbGF0aXZlKHNvdXJjZVJvb3QsIHNvdXJjZUZpbGUpO1xuICAgIH1cbiAgICAvLyBBcHBseWluZyB0aGUgU291cmNlTWFwIGNhbiBhZGQgYW5kIHJlbW92ZSBpdGVtcyBmcm9tIHRoZSBzb3VyY2VzIGFuZFxuICAgIC8vIHRoZSBuYW1lcyBhcnJheS5cbiAgICB2YXIgbmV3U291cmNlcyA9IG5ldyBBcnJheVNldCgpO1xuICAgIHZhciBuZXdOYW1lcyA9IG5ldyBBcnJheVNldCgpO1xuXG4gICAgLy8gRmluZCBtYXBwaW5ncyBmb3IgdGhlIFwic291cmNlRmlsZVwiXG4gICAgdGhpcy5fbWFwcGluZ3MudW5zb3J0ZWRGb3JFYWNoKGZ1bmN0aW9uIChtYXBwaW5nKSB7XG4gICAgICBpZiAobWFwcGluZy5zb3VyY2UgPT09IHNvdXJjZUZpbGUgJiYgbWFwcGluZy5vcmlnaW5hbExpbmUgIT0gbnVsbCkge1xuICAgICAgICAvLyBDaGVjayBpZiBpdCBjYW4gYmUgbWFwcGVkIGJ5IHRoZSBzb3VyY2UgbWFwLCB0aGVuIHVwZGF0ZSB0aGUgbWFwcGluZy5cbiAgICAgICAgdmFyIG9yaWdpbmFsID0gYVNvdXJjZU1hcENvbnN1bWVyLm9yaWdpbmFsUG9zaXRpb25Gb3Ioe1xuICAgICAgICAgIGxpbmU6IG1hcHBpbmcub3JpZ2luYWxMaW5lLFxuICAgICAgICAgIGNvbHVtbjogbWFwcGluZy5vcmlnaW5hbENvbHVtblxuICAgICAgICB9KTtcbiAgICAgICAgaWYgKG9yaWdpbmFsLnNvdXJjZSAhPSBudWxsKSB7XG4gICAgICAgICAgLy8gQ29weSBtYXBwaW5nXG4gICAgICAgICAgbWFwcGluZy5zb3VyY2UgPSBvcmlnaW5hbC5zb3VyY2U7XG4gICAgICAgICAgaWYgKGFTb3VyY2VNYXBQYXRoICE9IG51bGwpIHtcbiAgICAgICAgICAgIG1hcHBpbmcuc291cmNlID0gdXRpbC5qb2luKGFTb3VyY2VNYXBQYXRoLCBtYXBwaW5nLnNvdXJjZSlcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKHNvdXJjZVJvb3QgIT0gbnVsbCkge1xuICAgICAgICAgICAgbWFwcGluZy5zb3VyY2UgPSB1dGlsLnJlbGF0aXZlKHNvdXJjZVJvb3QsIG1hcHBpbmcuc291cmNlKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgbWFwcGluZy5vcmlnaW5hbExpbmUgPSBvcmlnaW5hbC5saW5lO1xuICAgICAgICAgIG1hcHBpbmcub3JpZ2luYWxDb2x1bW4gPSBvcmlnaW5hbC5jb2x1bW47XG4gICAgICAgICAgaWYgKG9yaWdpbmFsLm5hbWUgIT0gbnVsbCkge1xuICAgICAgICAgICAgbWFwcGluZy5uYW1lID0gb3JpZ2luYWwubmFtZTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgdmFyIHNvdXJjZSA9IG1hcHBpbmcuc291cmNlO1xuICAgICAgaWYgKHNvdXJjZSAhPSBudWxsICYmICFuZXdTb3VyY2VzLmhhcyhzb3VyY2UpKSB7XG4gICAgICAgIG5ld1NvdXJjZXMuYWRkKHNvdXJjZSk7XG4gICAgICB9XG5cbiAgICAgIHZhciBuYW1lID0gbWFwcGluZy5uYW1lO1xuICAgICAgaWYgKG5hbWUgIT0gbnVsbCAmJiAhbmV3TmFtZXMuaGFzKG5hbWUpKSB7XG4gICAgICAgIG5ld05hbWVzLmFkZChuYW1lKTtcbiAgICAgIH1cblxuICAgIH0sIHRoaXMpO1xuICAgIHRoaXMuX3NvdXJjZXMgPSBuZXdTb3VyY2VzO1xuICAgIHRoaXMuX25hbWVzID0gbmV3TmFtZXM7XG5cbiAgICAvLyBDb3B5IHNvdXJjZXNDb250ZW50cyBvZiBhcHBsaWVkIG1hcC5cbiAgICBhU291cmNlTWFwQ29uc3VtZXIuc291cmNlcy5mb3JFYWNoKGZ1bmN0aW9uIChzb3VyY2VGaWxlKSB7XG4gICAgICB2YXIgY29udGVudCA9IGFTb3VyY2VNYXBDb25zdW1lci5zb3VyY2VDb250ZW50Rm9yKHNvdXJjZUZpbGUpO1xuICAgICAgaWYgKGNvbnRlbnQgIT0gbnVsbCkge1xuICAgICAgICBpZiAoYVNvdXJjZU1hcFBhdGggIT0gbnVsbCkge1xuICAgICAgICAgIHNvdXJjZUZpbGUgPSB1dGlsLmpvaW4oYVNvdXJjZU1hcFBhdGgsIHNvdXJjZUZpbGUpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChzb3VyY2VSb290ICE9IG51bGwpIHtcbiAgICAgICAgICBzb3VyY2VGaWxlID0gdXRpbC5yZWxhdGl2ZShzb3VyY2VSb290LCBzb3VyY2VGaWxlKTtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLnNldFNvdXJjZUNvbnRlbnQoc291cmNlRmlsZSwgY29udGVudCk7XG4gICAgICB9XG4gICAgfSwgdGhpcyk7XG4gIH07XG5cbi8qKlxuICogQSBtYXBwaW5nIGNhbiBoYXZlIG9uZSBvZiB0aGUgdGhyZWUgbGV2ZWxzIG9mIGRhdGE6XG4gKlxuICogICAxLiBKdXN0IHRoZSBnZW5lcmF0ZWQgcG9zaXRpb24uXG4gKiAgIDIuIFRoZSBHZW5lcmF0ZWQgcG9zaXRpb24sIG9yaWdpbmFsIHBvc2l0aW9uLCBhbmQgb3JpZ2luYWwgc291cmNlLlxuICogICAzLiBHZW5lcmF0ZWQgYW5kIG9yaWdpbmFsIHBvc2l0aW9uLCBvcmlnaW5hbCBzb3VyY2UsIGFzIHdlbGwgYXMgYSBuYW1lXG4gKiAgICAgIHRva2VuLlxuICpcbiAqIFRvIG1haW50YWluIGNvbnNpc3RlbmN5LCB3ZSB2YWxpZGF0ZSB0aGF0IGFueSBuZXcgbWFwcGluZyBiZWluZyBhZGRlZCBmYWxsc1xuICogaW4gdG8gb25lIG9mIHRoZXNlIGNhdGVnb3JpZXMuXG4gKi9cblNvdXJjZU1hcEdlbmVyYXRvci5wcm90b3R5cGUuX3ZhbGlkYXRlTWFwcGluZyA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcEdlbmVyYXRvcl92YWxpZGF0ZU1hcHBpbmcoYUdlbmVyYXRlZCwgYU9yaWdpbmFsLCBhU291cmNlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFOYW1lKSB7XG4gICAgaWYgKGFHZW5lcmF0ZWQgJiYgJ2xpbmUnIGluIGFHZW5lcmF0ZWQgJiYgJ2NvbHVtbicgaW4gYUdlbmVyYXRlZFxuICAgICAgICAmJiBhR2VuZXJhdGVkLmxpbmUgPiAwICYmIGFHZW5lcmF0ZWQuY29sdW1uID49IDBcbiAgICAgICAgJiYgIWFPcmlnaW5hbCAmJiAhYVNvdXJjZSAmJiAhYU5hbWUpIHtcbiAgICAgIC8vIENhc2UgMS5cbiAgICAgIHJldHVybjtcbiAgICB9XG4gICAgZWxzZSBpZiAoYUdlbmVyYXRlZCAmJiAnbGluZScgaW4gYUdlbmVyYXRlZCAmJiAnY29sdW1uJyBpbiBhR2VuZXJhdGVkXG4gICAgICAgICAgICAgJiYgYU9yaWdpbmFsICYmICdsaW5lJyBpbiBhT3JpZ2luYWwgJiYgJ2NvbHVtbicgaW4gYU9yaWdpbmFsXG4gICAgICAgICAgICAgJiYgYUdlbmVyYXRlZC5saW5lID4gMCAmJiBhR2VuZXJhdGVkLmNvbHVtbiA+PSAwXG4gICAgICAgICAgICAgJiYgYU9yaWdpbmFsLmxpbmUgPiAwICYmIGFPcmlnaW5hbC5jb2x1bW4gPj0gMFxuICAgICAgICAgICAgICYmIGFTb3VyY2UpIHtcbiAgICAgIC8vIENhc2VzIDIgYW5kIDMuXG4gICAgICByZXR1cm47XG4gICAgfVxuICAgIGVsc2Uge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKCdJbnZhbGlkIG1hcHBpbmc6ICcgKyBKU09OLnN0cmluZ2lmeSh7XG4gICAgICAgIGdlbmVyYXRlZDogYUdlbmVyYXRlZCxcbiAgICAgICAgc291cmNlOiBhU291cmNlLFxuICAgICAgICBvcmlnaW5hbDogYU9yaWdpbmFsLFxuICAgICAgICBuYW1lOiBhTmFtZVxuICAgICAgfSkpO1xuICAgIH1cbiAgfTtcblxuLyoqXG4gKiBTZXJpYWxpemUgdGhlIGFjY3VtdWxhdGVkIG1hcHBpbmdzIGluIHRvIHRoZSBzdHJlYW0gb2YgYmFzZSA2NCBWTFFzXG4gKiBzcGVjaWZpZWQgYnkgdGhlIHNvdXJjZSBtYXAgZm9ybWF0LlxuICovXG5Tb3VyY2VNYXBHZW5lcmF0b3IucHJvdG90eXBlLl9zZXJpYWxpemVNYXBwaW5ncyA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcEdlbmVyYXRvcl9zZXJpYWxpemVNYXBwaW5ncygpIHtcbiAgICB2YXIgcHJldmlvdXNHZW5lcmF0ZWRDb2x1bW4gPSAwO1xuICAgIHZhciBwcmV2aW91c0dlbmVyYXRlZExpbmUgPSAxO1xuICAgIHZhciBwcmV2aW91c09yaWdpbmFsQ29sdW1uID0gMDtcbiAgICB2YXIgcHJldmlvdXNPcmlnaW5hbExpbmUgPSAwO1xuICAgIHZhciBwcmV2aW91c05hbWUgPSAwO1xuICAgIHZhciBwcmV2aW91c1NvdXJjZSA9IDA7XG4gICAgdmFyIHJlc3VsdCA9ICcnO1xuICAgIHZhciBuZXh0O1xuICAgIHZhciBtYXBwaW5nO1xuICAgIHZhciBuYW1lSWR4O1xuICAgIHZhciBzb3VyY2VJZHg7XG5cbiAgICB2YXIgbWFwcGluZ3MgPSB0aGlzLl9tYXBwaW5ncy50b0FycmF5KCk7XG4gICAgZm9yICh2YXIgaSA9IDAsIGxlbiA9IG1hcHBpbmdzLmxlbmd0aDsgaSA8IGxlbjsgaSsrKSB7XG4gICAgICBtYXBwaW5nID0gbWFwcGluZ3NbaV07XG4gICAgICBuZXh0ID0gJydcblxuICAgICAgaWYgKG1hcHBpbmcuZ2VuZXJhdGVkTGluZSAhPT0gcHJldmlvdXNHZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgIHByZXZpb3VzR2VuZXJhdGVkQ29sdW1uID0gMDtcbiAgICAgICAgd2hpbGUgKG1hcHBpbmcuZ2VuZXJhdGVkTGluZSAhPT0gcHJldmlvdXNHZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgICAgbmV4dCArPSAnOyc7XG4gICAgICAgICAgcHJldmlvdXNHZW5lcmF0ZWRMaW5lKys7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGVsc2Uge1xuICAgICAgICBpZiAoaSA+IDApIHtcbiAgICAgICAgICBpZiAoIXV0aWwuY29tcGFyZUJ5R2VuZXJhdGVkUG9zaXRpb25zSW5mbGF0ZWQobWFwcGluZywgbWFwcGluZ3NbaSAtIDFdKSkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuICAgICAgICAgIG5leHQgKz0gJywnO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShtYXBwaW5nLmdlbmVyYXRlZENvbHVtblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSBwcmV2aW91c0dlbmVyYXRlZENvbHVtbik7XG4gICAgICBwcmV2aW91c0dlbmVyYXRlZENvbHVtbiA9IG1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uO1xuXG4gICAgICBpZiAobWFwcGluZy5zb3VyY2UgIT0gbnVsbCkge1xuICAgICAgICBzb3VyY2VJZHggPSB0aGlzLl9zb3VyY2VzLmluZGV4T2YobWFwcGluZy5zb3VyY2UpO1xuICAgICAgICBuZXh0ICs9IGJhc2U2NFZMUS5lbmNvZGUoc291cmNlSWR4IC0gcHJldmlvdXNTb3VyY2UpO1xuICAgICAgICBwcmV2aW91c1NvdXJjZSA9IHNvdXJjZUlkeDtcblxuICAgICAgICAvLyBsaW5lcyBhcmUgc3RvcmVkIDAtYmFzZWQgaW4gU291cmNlTWFwIHNwZWMgdmVyc2lvbiAzXG4gICAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShtYXBwaW5nLm9yaWdpbmFsTGluZSAtIDFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSBwcmV2aW91c09yaWdpbmFsTGluZSk7XG4gICAgICAgIHByZXZpb3VzT3JpZ2luYWxMaW5lID0gbWFwcGluZy5vcmlnaW5hbExpbmUgLSAxO1xuXG4gICAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShtYXBwaW5nLm9yaWdpbmFsQ29sdW1uXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gcHJldmlvdXNPcmlnaW5hbENvbHVtbik7XG4gICAgICAgIHByZXZpb3VzT3JpZ2luYWxDb2x1bW4gPSBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uO1xuXG4gICAgICAgIGlmIChtYXBwaW5nLm5hbWUgIT0gbnVsbCkge1xuICAgICAgICAgIG5hbWVJZHggPSB0aGlzLl9uYW1lcy5pbmRleE9mKG1hcHBpbmcubmFtZSk7XG4gICAgICAgICAgbmV4dCArPSBiYXNlNjRWTFEuZW5jb2RlKG5hbWVJZHggLSBwcmV2aW91c05hbWUpO1xuICAgICAgICAgIHByZXZpb3VzTmFtZSA9IG5hbWVJZHg7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgcmVzdWx0ICs9IG5leHQ7XG4gICAgfVxuXG4gICAgcmV0dXJuIHJlc3VsdDtcbiAgfTtcblxuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5fZ2VuZXJhdGVTb3VyY2VzQ29udGVudCA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcEdlbmVyYXRvcl9nZW5lcmF0ZVNvdXJjZXNDb250ZW50KGFTb3VyY2VzLCBhU291cmNlUm9vdCkge1xuICAgIHJldHVybiBhU291cmNlcy5tYXAoZnVuY3Rpb24gKHNvdXJjZSkge1xuICAgICAgaWYgKCF0aGlzLl9zb3VyY2VzQ29udGVudHMpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICBpZiAoYVNvdXJjZVJvb3QgIT0gbnVsbCkge1xuICAgICAgICBzb3VyY2UgPSB1dGlsLnJlbGF0aXZlKGFTb3VyY2VSb290LCBzb3VyY2UpO1xuICAgICAgfVxuICAgICAgdmFyIGtleSA9IHV0aWwudG9TZXRTdHJpbmcoc291cmNlKTtcbiAgICAgIHJldHVybiBPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwodGhpcy5fc291cmNlc0NvbnRlbnRzLCBrZXkpXG4gICAgICAgID8gdGhpcy5fc291cmNlc0NvbnRlbnRzW2tleV1cbiAgICAgICAgOiBudWxsO1xuICAgIH0sIHRoaXMpO1xuICB9O1xuXG4vKipcbiAqIEV4dGVybmFsaXplIHRoZSBzb3VyY2UgbWFwLlxuICovXG5Tb3VyY2VNYXBHZW5lcmF0b3IucHJvdG90eXBlLnRvSlNPTiA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcEdlbmVyYXRvcl90b0pTT04oKSB7XG4gICAgdmFyIG1hcCA9IHtcbiAgICAgIHZlcnNpb246IHRoaXMuX3ZlcnNpb24sXG4gICAgICBzb3VyY2VzOiB0aGlzLl9zb3VyY2VzLnRvQXJyYXkoKSxcbiAgICAgIG5hbWVzOiB0aGlzLl9uYW1lcy50b0FycmF5KCksXG4gICAgICBtYXBwaW5nczogdGhpcy5fc2VyaWFsaXplTWFwcGluZ3MoKVxuICAgIH07XG4gICAgaWYgKHRoaXMuX2ZpbGUgIT0gbnVsbCkge1xuICAgICAgbWFwLmZpbGUgPSB0aGlzLl9maWxlO1xuICAgIH1cbiAgICBpZiAodGhpcy5fc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICBtYXAuc291cmNlUm9vdCA9IHRoaXMuX3NvdXJjZVJvb3Q7XG4gICAgfVxuICAgIGlmICh0aGlzLl9zb3VyY2VzQ29udGVudHMpIHtcbiAgICAgIG1hcC5zb3VyY2VzQ29udGVudCA9IHRoaXMuX2dlbmVyYXRlU291cmNlc0NvbnRlbnQobWFwLnNvdXJjZXMsIG1hcC5zb3VyY2VSb290KTtcbiAgICB9XG5cbiAgICByZXR1cm4gbWFwO1xuICB9O1xuXG4vKipcbiAqIFJlbmRlciB0aGUgc291cmNlIG1hcCBiZWluZyBnZW5lcmF0ZWQgdG8gYSBzdHJpbmcuXG4gKi9cblNvdXJjZU1hcEdlbmVyYXRvci5wcm90b3R5cGUudG9TdHJpbmcgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBHZW5lcmF0b3JfdG9TdHJpbmcoKSB7XG4gICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHRoaXMudG9KU09OKCkpO1xuICB9O1xuXG5leHBvcnRzLlNvdXJjZU1hcEdlbmVyYXRvciA9IFNvdXJjZU1hcEdlbmVyYXRvcjtcblxuXG5cbi8qKioqKioqKioqKioqKioqKlxuICoqIFdFQlBBQ0sgRk9PVEVSXG4gKiogLi9saWIvc291cmNlLW1hcC1nZW5lcmF0b3IuanNcbiAqKiBtb2R1bGUgaWQgPSAxXG4gKiogbW9kdWxlIGNodW5rcyA9IDBcbiAqKi8iLCIvKiAtKi0gTW9kZToganM7IGpzLWluZGVudC1sZXZlbDogMjsgLSotICovXG4vKlxuICogQ29weXJpZ2h0IDIwMTEgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFIG9yOlxuICogaHR0cDovL29wZW5zb3VyY2Uub3JnL2xpY2Vuc2VzL0JTRC0zLUNsYXVzZVxuICpcbiAqIEJhc2VkIG9uIHRoZSBCYXNlIDY0IFZMUSBpbXBsZW1lbnRhdGlvbiBpbiBDbG9zdXJlIENvbXBpbGVyOlxuICogaHR0cHM6Ly9jb2RlLmdvb2dsZS5jb20vcC9jbG9zdXJlLWNvbXBpbGVyL3NvdXJjZS9icm93c2UvdHJ1bmsvc3JjL2NvbS9nb29nbGUvZGVidWdnaW5nL3NvdXJjZW1hcC9CYXNlNjRWTFEuamF2YVxuICpcbiAqIENvcHlyaWdodCAyMDExIFRoZSBDbG9zdXJlIENvbXBpbGVyIEF1dGhvcnMuIEFsbCByaWdodHMgcmVzZXJ2ZWQuXG4gKiBSZWRpc3RyaWJ1dGlvbiBhbmQgdXNlIGluIHNvdXJjZSBhbmQgYmluYXJ5IGZvcm1zLCB3aXRoIG9yIHdpdGhvdXRcbiAqIG1vZGlmaWNhdGlvbiwgYXJlIHBlcm1pdHRlZCBwcm92aWRlZCB0aGF0IHRoZSBmb2xsb3dpbmcgY29uZGl0aW9ucyBhcmVcbiAqIG1ldDpcbiAqXG4gKiAgKiBSZWRpc3RyaWJ1dGlvbnMgb2Ygc291cmNlIGNvZGUgbXVzdCByZXRhaW4gdGhlIGFib3ZlIGNvcHlyaWdodFxuICogICAgbm90aWNlLCB0aGlzIGxpc3Qgb2YgY29uZGl0aW9ucyBhbmQgdGhlIGZvbGxvd2luZyBkaXNjbGFpbWVyLlxuICogICogUmVkaXN0cmlidXRpb25zIGluIGJpbmFyeSBmb3JtIG11c3QgcmVwcm9kdWNlIHRoZSBhYm92ZVxuICogICAgY29weXJpZ2h0IG5vdGljZSwgdGhpcyBsaXN0IG9mIGNvbmRpdGlvbnMgYW5kIHRoZSBmb2xsb3dpbmdcbiAqICAgIGRpc2NsYWltZXIgaW4gdGhlIGRvY3VtZW50YXRpb24gYW5kL29yIG90aGVyIG1hdGVyaWFscyBwcm92aWRlZFxuICogICAgd2l0aCB0aGUgZGlzdHJpYnV0aW9uLlxuICogICogTmVpdGhlciB0aGUgbmFtZSBvZiBHb29nbGUgSW5jLiBub3IgdGhlIG5hbWVzIG9mIGl0c1xuICogICAgY29udHJpYnV0b3JzIG1heSBiZSB1c2VkIHRvIGVuZG9yc2Ugb3IgcHJvbW90ZSBwcm9kdWN0cyBkZXJpdmVkXG4gKiAgICBmcm9tIHRoaXMgc29mdHdhcmUgd2l0aG91dCBzcGVjaWZpYyBwcmlvciB3cml0dGVuIHBlcm1pc3Npb24uXG4gKlxuICogVEhJUyBTT0ZUV0FSRSBJUyBQUk9WSURFRCBCWSBUSEUgQ09QWVJJR0hUIEhPTERFUlMgQU5EIENPTlRSSUJVVE9SU1xuICogXCJBUyBJU1wiIEFORCBBTlkgRVhQUkVTUyBPUiBJTVBMSUVEIFdBUlJBTlRJRVMsIElOQ0xVRElORywgQlVUIE5PVFxuICogTElNSVRFRCBUTywgVEhFIElNUExJRUQgV0FSUkFOVElFUyBPRiBNRVJDSEFOVEFCSUxJVFkgQU5EIEZJVE5FU1MgRk9SXG4gKiBBIFBBUlRJQ1VMQVIgUFVSUE9TRSBBUkUgRElTQ0xBSU1FRC4gSU4gTk8gRVZFTlQgU0hBTEwgVEhFIENPUFlSSUdIVFxuICogT1dORVIgT1IgQ09OVFJJQlVUT1JTIEJFIExJQUJMRSBGT1IgQU5ZIERJUkVDVCwgSU5ESVJFQ1QsIElOQ0lERU5UQUwsXG4gKiBTUEVDSUFMLCBFWEVNUExBUlksIE9SIENPTlNFUVVFTlRJQUwgREFNQUdFUyAoSU5DTFVESU5HLCBCVVQgTk9UXG4gKiBMSU1JVEVEIFRPLCBQUk9DVVJFTUVOVCBPRiBTVUJTVElUVVRFIEdPT0RTIE9SIFNFUlZJQ0VTOyBMT1NTIE9GIFVTRSxcbiAqIERBVEEsIE9SIFBST0ZJVFM7IE9SIEJVU0lORVNTIElOVEVSUlVQVElPTikgSE9XRVZFUiBDQVVTRUQgQU5EIE9OIEFOWVxuICogVEhFT1JZIE9GIExJQUJJTElUWSwgV0hFVEhFUiBJTiBDT05UUkFDVCwgU1RSSUNUIExJQUJJTElUWSwgT1IgVE9SVFxuICogKElOQ0xVRElORyBORUdMSUdFTkNFIE9SIE9USEVSV0lTRSkgQVJJU0lORyBJTiBBTlkgV0FZIE9VVCBPRiBUSEUgVVNFXG4gKiBPRiBUSElTIFNPRlRXQVJFLCBFVkVOIElGIEFEVklTRUQgT0YgVEhFIFBPU1NJQklMSVRZIE9GIFNVQ0ggREFNQUdFLlxuICovXG5cbnZhciBiYXNlNjQgPSByZXF1aXJlKCcuL2Jhc2U2NCcpO1xuXG4vLyBBIHNpbmdsZSBiYXNlIDY0IGRpZ2l0IGNhbiBjb250YWluIDYgYml0cyBvZiBkYXRhLiBGb3IgdGhlIGJhc2UgNjQgdmFyaWFibGVcbi8vIGxlbmd0aCBxdWFudGl0aWVzIHdlIHVzZSBpbiB0aGUgc291cmNlIG1hcCBzcGVjLCB0aGUgZmlyc3QgYml0IGlzIHRoZSBzaWduLFxuLy8gdGhlIG5leHQgZm91ciBiaXRzIGFyZSB0aGUgYWN0dWFsIHZhbHVlLCBhbmQgdGhlIDZ0aCBiaXQgaXMgdGhlXG4vLyBjb250aW51YXRpb24gYml0LiBUaGUgY29udGludWF0aW9uIGJpdCB0ZWxscyB1cyB3aGV0aGVyIHRoZXJlIGFyZSBtb3JlXG4vLyBkaWdpdHMgaW4gdGhpcyB2YWx1ZSBmb2xsb3dpbmcgdGhpcyBkaWdpdC5cbi8vXG4vLyAgIENvbnRpbnVhdGlvblxuLy8gICB8ICAgIFNpZ25cbi8vICAgfCAgICB8XG4vLyAgIFYgICAgVlxuLy8gICAxMDEwMTFcblxudmFyIFZMUV9CQVNFX1NISUZUID0gNTtcblxuLy8gYmluYXJ5OiAxMDAwMDBcbnZhciBWTFFfQkFTRSA9IDEgPDwgVkxRX0JBU0VfU0hJRlQ7XG5cbi8vIGJpbmFyeTogMDExMTExXG52YXIgVkxRX0JBU0VfTUFTSyA9IFZMUV9CQVNFIC0gMTtcblxuLy8gYmluYXJ5OiAxMDAwMDBcbnZhciBWTFFfQ09OVElOVUFUSU9OX0JJVCA9IFZMUV9CQVNFO1xuXG4vKipcbiAqIENvbnZlcnRzIGZyb20gYSB0d28tY29tcGxlbWVudCB2YWx1ZSB0byBhIHZhbHVlIHdoZXJlIHRoZSBzaWduIGJpdCBpc1xuICogcGxhY2VkIGluIHRoZSBsZWFzdCBzaWduaWZpY2FudCBiaXQuICBGb3IgZXhhbXBsZSwgYXMgZGVjaW1hbHM6XG4gKiAgIDEgYmVjb21lcyAyICgxMCBiaW5hcnkpLCAtMSBiZWNvbWVzIDMgKDExIGJpbmFyeSlcbiAqICAgMiBiZWNvbWVzIDQgKDEwMCBiaW5hcnkpLCAtMiBiZWNvbWVzIDUgKDEwMSBiaW5hcnkpXG4gKi9cbmZ1bmN0aW9uIHRvVkxRU2lnbmVkKGFWYWx1ZSkge1xuICByZXR1cm4gYVZhbHVlIDwgMFxuICAgID8gKCgtYVZhbHVlKSA8PCAxKSArIDFcbiAgICA6IChhVmFsdWUgPDwgMSkgKyAwO1xufVxuXG4vKipcbiAqIENvbnZlcnRzIHRvIGEgdHdvLWNvbXBsZW1lbnQgdmFsdWUgZnJvbSBhIHZhbHVlIHdoZXJlIHRoZSBzaWduIGJpdCBpc1xuICogcGxhY2VkIGluIHRoZSBsZWFzdCBzaWduaWZpY2FudCBiaXQuICBGb3IgZXhhbXBsZSwgYXMgZGVjaW1hbHM6XG4gKiAgIDIgKDEwIGJpbmFyeSkgYmVjb21lcyAxLCAzICgxMSBiaW5hcnkpIGJlY29tZXMgLTFcbiAqICAgNCAoMTAwIGJpbmFyeSkgYmVjb21lcyAyLCA1ICgxMDEgYmluYXJ5KSBiZWNvbWVzIC0yXG4gKi9cbmZ1bmN0aW9uIGZyb21WTFFTaWduZWQoYVZhbHVlKSB7XG4gIHZhciBpc05lZ2F0aXZlID0gKGFWYWx1ZSAmIDEpID09PSAxO1xuICB2YXIgc2hpZnRlZCA9IGFWYWx1ZSA+PiAxO1xuICByZXR1cm4gaXNOZWdhdGl2ZVxuICAgID8gLXNoaWZ0ZWRcbiAgICA6IHNoaWZ0ZWQ7XG59XG5cbi8qKlxuICogUmV0dXJucyB0aGUgYmFzZSA2NCBWTFEgZW5jb2RlZCB2YWx1ZS5cbiAqL1xuZXhwb3J0cy5lbmNvZGUgPSBmdW5jdGlvbiBiYXNlNjRWTFFfZW5jb2RlKGFWYWx1ZSkge1xuICB2YXIgZW5jb2RlZCA9IFwiXCI7XG4gIHZhciBkaWdpdDtcblxuICB2YXIgdmxxID0gdG9WTFFTaWduZWQoYVZhbHVlKTtcblxuICBkbyB7XG4gICAgZGlnaXQgPSB2bHEgJiBWTFFfQkFTRV9NQVNLO1xuICAgIHZscSA+Pj49IFZMUV9CQVNFX1NISUZUO1xuICAgIGlmICh2bHEgPiAwKSB7XG4gICAgICAvLyBUaGVyZSBhcmUgc3RpbGwgbW9yZSBkaWdpdHMgaW4gdGhpcyB2YWx1ZSwgc28gd2UgbXVzdCBtYWtlIHN1cmUgdGhlXG4gICAgICAvLyBjb250aW51YXRpb24gYml0IGlzIG1hcmtlZC5cbiAgICAgIGRpZ2l0IHw9IFZMUV9DT05USU5VQVRJT05fQklUO1xuICAgIH1cbiAgICBlbmNvZGVkICs9IGJhc2U2NC5lbmNvZGUoZGlnaXQpO1xuICB9IHdoaWxlICh2bHEgPiAwKTtcblxuICByZXR1cm4gZW5jb2RlZDtcbn07XG5cbi8qKlxuICogRGVjb2RlcyB0aGUgbmV4dCBiYXNlIDY0IFZMUSB2YWx1ZSBmcm9tIHRoZSBnaXZlbiBzdHJpbmcgYW5kIHJldHVybnMgdGhlXG4gKiB2YWx1ZSBhbmQgdGhlIHJlc3Qgb2YgdGhlIHN0cmluZyB2aWEgdGhlIG91dCBwYXJhbWV0ZXIuXG4gKi9cbmV4cG9ydHMuZGVjb2RlID0gZnVuY3Rpb24gYmFzZTY0VkxRX2RlY29kZShhU3RyLCBhSW5kZXgsIGFPdXRQYXJhbSkge1xuICB2YXIgc3RyTGVuID0gYVN0ci5sZW5ndGg7XG4gIHZhciByZXN1bHQgPSAwO1xuICB2YXIgc2hpZnQgPSAwO1xuICB2YXIgY29udGludWF0aW9uLCBkaWdpdDtcblxuICBkbyB7XG4gICAgaWYgKGFJbmRleCA+PSBzdHJMZW4pIHtcbiAgICAgIHRocm93IG5ldyBFcnJvcihcIkV4cGVjdGVkIG1vcmUgZGlnaXRzIGluIGJhc2UgNjQgVkxRIHZhbHVlLlwiKTtcbiAgICB9XG5cbiAgICBkaWdpdCA9IGJhc2U2NC5kZWNvZGUoYVN0ci5jaGFyQ29kZUF0KGFJbmRleCsrKSk7XG4gICAgaWYgKGRpZ2l0ID09PSAtMSkge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKFwiSW52YWxpZCBiYXNlNjQgZGlnaXQ6IFwiICsgYVN0ci5jaGFyQXQoYUluZGV4IC0gMSkpO1xuICAgIH1cblxuICAgIGNvbnRpbnVhdGlvbiA9ICEhKGRpZ2l0ICYgVkxRX0NPTlRJTlVBVElPTl9CSVQpO1xuICAgIGRpZ2l0ICY9IFZMUV9CQVNFX01BU0s7XG4gICAgcmVzdWx0ID0gcmVzdWx0ICsgKGRpZ2l0IDw8IHNoaWZ0KTtcbiAgICBzaGlmdCArPSBWTFFfQkFTRV9TSElGVDtcbiAgfSB3aGlsZSAoY29udGludWF0aW9uKTtcblxuICBhT3V0UGFyYW0udmFsdWUgPSBmcm9tVkxRU2lnbmVkKHJlc3VsdCk7XG4gIGFPdXRQYXJhbS5yZXN0ID0gYUluZGV4O1xufTtcblxuXG5cbi8qKioqKioqKioqKioqKioqKlxuICoqIFdFQlBBQ0sgRk9PVEVSXG4gKiogLi9saWIvYmFzZTY0LXZscS5qc1xuICoqIG1vZHVsZSBpZCA9IDJcbiAqKiBtb2R1bGUgY2h1bmtzID0gMFxuICoqLyIsIi8qIC0qLSBNb2RlOiBqczsganMtaW5kZW50LWxldmVsOiAyOyAtKi0gKi9cbi8qXG4gKiBDb3B5cmlnaHQgMjAxMSBNb3ppbGxhIEZvdW5kYXRpb24gYW5kIGNvbnRyaWJ1dG9yc1xuICogTGljZW5zZWQgdW5kZXIgdGhlIE5ldyBCU0QgbGljZW5zZS4gU2VlIExJQ0VOU0Ugb3I6XG4gKiBodHRwOi8vb3BlbnNvdXJjZS5vcmcvbGljZW5zZXMvQlNELTMtQ2xhdXNlXG4gKi9cblxudmFyIGludFRvQ2hhck1hcCA9ICdBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6MDEyMzQ1Njc4OSsvJy5zcGxpdCgnJyk7XG5cbi8qKlxuICogRW5jb2RlIGFuIGludGVnZXIgaW4gdGhlIHJhbmdlIG9mIDAgdG8gNjMgdG8gYSBzaW5nbGUgYmFzZSA2NCBkaWdpdC5cbiAqL1xuZXhwb3J0cy5lbmNvZGUgPSBmdW5jdGlvbiAobnVtYmVyKSB7XG4gIGlmICgwIDw9IG51bWJlciAmJiBudW1iZXIgPCBpbnRUb0NoYXJNYXAubGVuZ3RoKSB7XG4gICAgcmV0dXJuIGludFRvQ2hhck1hcFtudW1iZXJdO1xuICB9XG4gIHRocm93IG5ldyBUeXBlRXJyb3IoXCJNdXN0IGJlIGJldHdlZW4gMCBhbmQgNjM6IFwiICsgbnVtYmVyKTtcbn07XG5cbi8qKlxuICogRGVjb2RlIGEgc2luZ2xlIGJhc2UgNjQgY2hhcmFjdGVyIGNvZGUgZGlnaXQgdG8gYW4gaW50ZWdlci4gUmV0dXJucyAtMSBvblxuICogZmFpbHVyZS5cbiAqL1xuZXhwb3J0cy5kZWNvZGUgPSBmdW5jdGlvbiAoY2hhckNvZGUpIHtcbiAgdmFyIGJpZ0EgPSA2NTsgICAgIC8vICdBJ1xuICB2YXIgYmlnWiA9IDkwOyAgICAgLy8gJ1onXG5cbiAgdmFyIGxpdHRsZUEgPSA5NzsgIC8vICdhJ1xuICB2YXIgbGl0dGxlWiA9IDEyMjsgLy8gJ3onXG5cbiAgdmFyIHplcm8gPSA0ODsgICAgIC8vICcwJ1xuICB2YXIgbmluZSA9IDU3OyAgICAgLy8gJzknXG5cbiAgdmFyIHBsdXMgPSA0MzsgICAgIC8vICcrJ1xuICB2YXIgc2xhc2ggPSA0NzsgICAgLy8gJy8nXG5cbiAgdmFyIGxpdHRsZU9mZnNldCA9IDI2O1xuICB2YXIgbnVtYmVyT2Zmc2V0ID0gNTI7XG5cbiAgLy8gMCAtIDI1OiBBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWlxuICBpZiAoYmlnQSA8PSBjaGFyQ29kZSAmJiBjaGFyQ29kZSA8PSBiaWdaKSB7XG4gICAgcmV0dXJuIChjaGFyQ29kZSAtIGJpZ0EpO1xuICB9XG5cbiAgLy8gMjYgLSA1MTogYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXpcbiAgaWYgKGxpdHRsZUEgPD0gY2hhckNvZGUgJiYgY2hhckNvZGUgPD0gbGl0dGxlWikge1xuICAgIHJldHVybiAoY2hhckNvZGUgLSBsaXR0bGVBICsgbGl0dGxlT2Zmc2V0KTtcbiAgfVxuXG4gIC8vIDUyIC0gNjE6IDAxMjM0NTY3ODlcbiAgaWYgKHplcm8gPD0gY2hhckNvZGUgJiYgY2hhckNvZGUgPD0gbmluZSkge1xuICAgIHJldHVybiAoY2hhckNvZGUgLSB6ZXJvICsgbnVtYmVyT2Zmc2V0KTtcbiAgfVxuXG4gIC8vIDYyOiArXG4gIGlmIChjaGFyQ29kZSA9PSBwbHVzKSB7XG4gICAgcmV0dXJuIDYyO1xuICB9XG5cbiAgLy8gNjM6IC9cbiAgaWYgKGNoYXJDb2RlID09IHNsYXNoKSB7XG4gICAgcmV0dXJuIDYzO1xuICB9XG5cbiAgLy8gSW52YWxpZCBiYXNlNjQgZGlnaXQuXG4gIHJldHVybiAtMTtcbn07XG5cblxuXG4vKioqKioqKioqKioqKioqKipcbiAqKiBXRUJQQUNLIEZPT1RFUlxuICoqIC4vbGliL2Jhc2U2NC5qc1xuICoqIG1vZHVsZSBpZCA9IDNcbiAqKiBtb2R1bGUgY2h1bmtzID0gMFxuICoqLyIsIi8qIC0qLSBNb2RlOiBqczsganMtaW5kZW50LWxldmVsOiAyOyAtKi0gKi9cbi8qXG4gKiBDb3B5cmlnaHQgMjAxMSBNb3ppbGxhIEZvdW5kYXRpb24gYW5kIGNvbnRyaWJ1dG9yc1xuICogTGljZW5zZWQgdW5kZXIgdGhlIE5ldyBCU0QgbGljZW5zZS4gU2VlIExJQ0VOU0Ugb3I6XG4gKiBodHRwOi8vb3BlbnNvdXJjZS5vcmcvbGljZW5zZXMvQlNELTMtQ2xhdXNlXG4gKi9cblxuLyoqXG4gKiBUaGlzIGlzIGEgaGVscGVyIGZ1bmN0aW9uIGZvciBnZXR0aW5nIHZhbHVlcyBmcm9tIHBhcmFtZXRlci9vcHRpb25zXG4gKiBvYmplY3RzLlxuICpcbiAqIEBwYXJhbSBhcmdzIFRoZSBvYmplY3Qgd2UgYXJlIGV4dHJhY3RpbmcgdmFsdWVzIGZyb21cbiAqIEBwYXJhbSBuYW1lIFRoZSBuYW1lIG9mIHRoZSBwcm9wZXJ0eSB3ZSBhcmUgZ2V0dGluZy5cbiAqIEBwYXJhbSBkZWZhdWx0VmFsdWUgQW4gb3B0aW9uYWwgdmFsdWUgdG8gcmV0dXJuIGlmIHRoZSBwcm9wZXJ0eSBpcyBtaXNzaW5nXG4gKiBmcm9tIHRoZSBvYmplY3QuIElmIHRoaXMgaXMgbm90IHNwZWNpZmllZCBhbmQgdGhlIHByb3BlcnR5IGlzIG1pc3NpbmcsIGFuXG4gKiBlcnJvciB3aWxsIGJlIHRocm93bi5cbiAqL1xuZnVuY3Rpb24gZ2V0QXJnKGFBcmdzLCBhTmFtZSwgYURlZmF1bHRWYWx1ZSkge1xuICBpZiAoYU5hbWUgaW4gYUFyZ3MpIHtcbiAgICByZXR1cm4gYUFyZ3NbYU5hbWVdO1xuICB9IGVsc2UgaWYgKGFyZ3VtZW50cy5sZW5ndGggPT09IDMpIHtcbiAgICByZXR1cm4gYURlZmF1bHRWYWx1ZTtcbiAgfSBlbHNlIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoJ1wiJyArIGFOYW1lICsgJ1wiIGlzIGEgcmVxdWlyZWQgYXJndW1lbnQuJyk7XG4gIH1cbn1cbmV4cG9ydHMuZ2V0QXJnID0gZ2V0QXJnO1xuXG52YXIgdXJsUmVnZXhwID0gL14oPzooW1xcdytcXC0uXSspOik/XFwvXFwvKD86KFxcdys6XFx3KylAKT8oW1xcdy5dKikoPzo6KFxcZCspKT8oXFxTKikkLztcbnZhciBkYXRhVXJsUmVnZXhwID0gL15kYXRhOi4rXFwsLiskLztcblxuZnVuY3Rpb24gdXJsUGFyc2UoYVVybCkge1xuICB2YXIgbWF0Y2ggPSBhVXJsLm1hdGNoKHVybFJlZ2V4cCk7XG4gIGlmICghbWF0Y2gpIHtcbiAgICByZXR1cm4gbnVsbDtcbiAgfVxuICByZXR1cm4ge1xuICAgIHNjaGVtZTogbWF0Y2hbMV0sXG4gICAgYXV0aDogbWF0Y2hbMl0sXG4gICAgaG9zdDogbWF0Y2hbM10sXG4gICAgcG9ydDogbWF0Y2hbNF0sXG4gICAgcGF0aDogbWF0Y2hbNV1cbiAgfTtcbn1cbmV4cG9ydHMudXJsUGFyc2UgPSB1cmxQYXJzZTtcblxuZnVuY3Rpb24gdXJsR2VuZXJhdGUoYVBhcnNlZFVybCkge1xuICB2YXIgdXJsID0gJyc7XG4gIGlmIChhUGFyc2VkVXJsLnNjaGVtZSkge1xuICAgIHVybCArPSBhUGFyc2VkVXJsLnNjaGVtZSArICc6JztcbiAgfVxuICB1cmwgKz0gJy8vJztcbiAgaWYgKGFQYXJzZWRVcmwuYXV0aCkge1xuICAgIHVybCArPSBhUGFyc2VkVXJsLmF1dGggKyAnQCc7XG4gIH1cbiAgaWYgKGFQYXJzZWRVcmwuaG9zdCkge1xuICAgIHVybCArPSBhUGFyc2VkVXJsLmhvc3Q7XG4gIH1cbiAgaWYgKGFQYXJzZWRVcmwucG9ydCkge1xuICAgIHVybCArPSBcIjpcIiArIGFQYXJzZWRVcmwucG9ydFxuICB9XG4gIGlmIChhUGFyc2VkVXJsLnBhdGgpIHtcbiAgICB1cmwgKz0gYVBhcnNlZFVybC5wYXRoO1xuICB9XG4gIHJldHVybiB1cmw7XG59XG5leHBvcnRzLnVybEdlbmVyYXRlID0gdXJsR2VuZXJhdGU7XG5cbi8qKlxuICogTm9ybWFsaXplcyBhIHBhdGgsIG9yIHRoZSBwYXRoIHBvcnRpb24gb2YgYSBVUkw6XG4gKlxuICogLSBSZXBsYWNlcyBjb25zZXF1dGl2ZSBzbGFzaGVzIHdpdGggb25lIHNsYXNoLlxuICogLSBSZW1vdmVzIHVubmVjZXNzYXJ5ICcuJyBwYXJ0cy5cbiAqIC0gUmVtb3ZlcyB1bm5lY2Vzc2FyeSAnPGRpcj4vLi4nIHBhcnRzLlxuICpcbiAqIEJhc2VkIG9uIGNvZGUgaW4gdGhlIE5vZGUuanMgJ3BhdGgnIGNvcmUgbW9kdWxlLlxuICpcbiAqIEBwYXJhbSBhUGF0aCBUaGUgcGF0aCBvciB1cmwgdG8gbm9ybWFsaXplLlxuICovXG5mdW5jdGlvbiBub3JtYWxpemUoYVBhdGgpIHtcbiAgdmFyIHBhdGggPSBhUGF0aDtcbiAgdmFyIHVybCA9IHVybFBhcnNlKGFQYXRoKTtcbiAgaWYgKHVybCkge1xuICAgIGlmICghdXJsLnBhdGgpIHtcbiAgICAgIHJldHVybiBhUGF0aDtcbiAgICB9XG4gICAgcGF0aCA9IHVybC5wYXRoO1xuICB9XG4gIHZhciBpc0Fic29sdXRlID0gZXhwb3J0cy5pc0Fic29sdXRlKHBhdGgpO1xuXG4gIHZhciBwYXJ0cyA9IHBhdGguc3BsaXQoL1xcLysvKTtcbiAgZm9yICh2YXIgcGFydCwgdXAgPSAwLCBpID0gcGFydHMubGVuZ3RoIC0gMTsgaSA+PSAwOyBpLS0pIHtcbiAgICBwYXJ0ID0gcGFydHNbaV07XG4gICAgaWYgKHBhcnQgPT09ICcuJykge1xuICAgICAgcGFydHMuc3BsaWNlKGksIDEpO1xuICAgIH0gZWxzZSBpZiAocGFydCA9PT0gJy4uJykge1xuICAgICAgdXArKztcbiAgICB9IGVsc2UgaWYgKHVwID4gMCkge1xuICAgICAgaWYgKHBhcnQgPT09ICcnKSB7XG4gICAgICAgIC8vIFRoZSBmaXJzdCBwYXJ0IGlzIGJsYW5rIGlmIHRoZSBwYXRoIGlzIGFic29sdXRlLiBUcnlpbmcgdG8gZ29cbiAgICAgICAgLy8gYWJvdmUgdGhlIHJvb3QgaXMgYSBuby1vcC4gVGhlcmVmb3JlIHdlIGNhbiByZW1vdmUgYWxsICcuLicgcGFydHNcbiAgICAgICAgLy8gZGlyZWN0bHkgYWZ0ZXIgdGhlIHJvb3QuXG4gICAgICAgIHBhcnRzLnNwbGljZShpICsgMSwgdXApO1xuICAgICAgICB1cCA9IDA7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBwYXJ0cy5zcGxpY2UoaSwgMik7XG4gICAgICAgIHVwLS07XG4gICAgICB9XG4gICAgfVxuICB9XG4gIHBhdGggPSBwYXJ0cy5qb2luKCcvJyk7XG5cbiAgaWYgKHBhdGggPT09ICcnKSB7XG4gICAgcGF0aCA9IGlzQWJzb2x1dGUgPyAnLycgOiAnLic7XG4gIH1cblxuICBpZiAodXJsKSB7XG4gICAgdXJsLnBhdGggPSBwYXRoO1xuICAgIHJldHVybiB1cmxHZW5lcmF0ZSh1cmwpO1xuICB9XG4gIHJldHVybiBwYXRoO1xufVxuZXhwb3J0cy5ub3JtYWxpemUgPSBub3JtYWxpemU7XG5cbi8qKlxuICogSm9pbnMgdHdvIHBhdGhzL1VSTHMuXG4gKlxuICogQHBhcmFtIGFSb290IFRoZSByb290IHBhdGggb3IgVVJMLlxuICogQHBhcmFtIGFQYXRoIFRoZSBwYXRoIG9yIFVSTCB0byBiZSBqb2luZWQgd2l0aCB0aGUgcm9vdC5cbiAqXG4gKiAtIElmIGFQYXRoIGlzIGEgVVJMIG9yIGEgZGF0YSBVUkksIGFQYXRoIGlzIHJldHVybmVkLCB1bmxlc3MgYVBhdGggaXMgYVxuICogICBzY2hlbWUtcmVsYXRpdmUgVVJMOiBUaGVuIHRoZSBzY2hlbWUgb2YgYVJvb3QsIGlmIGFueSwgaXMgcHJlcGVuZGVkXG4gKiAgIGZpcnN0LlxuICogLSBPdGhlcndpc2UgYVBhdGggaXMgYSBwYXRoLiBJZiBhUm9vdCBpcyBhIFVSTCwgdGhlbiBpdHMgcGF0aCBwb3J0aW9uXG4gKiAgIGlzIHVwZGF0ZWQgd2l0aCB0aGUgcmVzdWx0IGFuZCBhUm9vdCBpcyByZXR1cm5lZC4gT3RoZXJ3aXNlIHRoZSByZXN1bHRcbiAqICAgaXMgcmV0dXJuZWQuXG4gKiAgIC0gSWYgYVBhdGggaXMgYWJzb2x1dGUsIHRoZSByZXN1bHQgaXMgYVBhdGguXG4gKiAgIC0gT3RoZXJ3aXNlIHRoZSB0d28gcGF0aHMgYXJlIGpvaW5lZCB3aXRoIGEgc2xhc2guXG4gKiAtIEpvaW5pbmcgZm9yIGV4YW1wbGUgJ2h0dHA6Ly8nIGFuZCAnd3d3LmV4YW1wbGUuY29tJyBpcyBhbHNvIHN1cHBvcnRlZC5cbiAqL1xuZnVuY3Rpb24gam9pbihhUm9vdCwgYVBhdGgpIHtcbiAgaWYgKGFSb290ID09PSBcIlwiKSB7XG4gICAgYVJvb3QgPSBcIi5cIjtcbiAgfVxuICBpZiAoYVBhdGggPT09IFwiXCIpIHtcbiAgICBhUGF0aCA9IFwiLlwiO1xuICB9XG4gIHZhciBhUGF0aFVybCA9IHVybFBhcnNlKGFQYXRoKTtcbiAgdmFyIGFSb290VXJsID0gdXJsUGFyc2UoYVJvb3QpO1xuICBpZiAoYVJvb3RVcmwpIHtcbiAgICBhUm9vdCA9IGFSb290VXJsLnBhdGggfHwgJy8nO1xuICB9XG5cbiAgLy8gYGpvaW4oZm9vLCAnLy93d3cuZXhhbXBsZS5vcmcnKWBcbiAgaWYgKGFQYXRoVXJsICYmICFhUGF0aFVybC5zY2hlbWUpIHtcbiAgICBpZiAoYVJvb3RVcmwpIHtcbiAgICAgIGFQYXRoVXJsLnNjaGVtZSA9IGFSb290VXJsLnNjaGVtZTtcbiAgICB9XG4gICAgcmV0dXJuIHVybEdlbmVyYXRlKGFQYXRoVXJsKTtcbiAgfVxuXG4gIGlmIChhUGF0aFVybCB8fCBhUGF0aC5tYXRjaChkYXRhVXJsUmVnZXhwKSkge1xuICAgIHJldHVybiBhUGF0aDtcbiAgfVxuXG4gIC8vIGBqb2luKCdodHRwOi8vJywgJ3d3dy5leGFtcGxlLmNvbScpYFxuICBpZiAoYVJvb3RVcmwgJiYgIWFSb290VXJsLmhvc3QgJiYgIWFSb290VXJsLnBhdGgpIHtcbiAgICBhUm9vdFVybC5ob3N0ID0gYVBhdGg7XG4gICAgcmV0dXJuIHVybEdlbmVyYXRlKGFSb290VXJsKTtcbiAgfVxuXG4gIHZhciBqb2luZWQgPSBhUGF0aC5jaGFyQXQoMCkgPT09ICcvJ1xuICAgID8gYVBhdGhcbiAgICA6IG5vcm1hbGl6ZShhUm9vdC5yZXBsYWNlKC9cXC8rJC8sICcnKSArICcvJyArIGFQYXRoKTtcblxuICBpZiAoYVJvb3RVcmwpIHtcbiAgICBhUm9vdFVybC5wYXRoID0gam9pbmVkO1xuICAgIHJldHVybiB1cmxHZW5lcmF0ZShhUm9vdFVybCk7XG4gIH1cbiAgcmV0dXJuIGpvaW5lZDtcbn1cbmV4cG9ydHMuam9pbiA9IGpvaW47XG5cbmV4cG9ydHMuaXNBYnNvbHV0ZSA9IGZ1bmN0aW9uIChhUGF0aCkge1xuICByZXR1cm4gYVBhdGguY2hhckF0KDApID09PSAnLycgfHwgISFhUGF0aC5tYXRjaCh1cmxSZWdleHApO1xufTtcblxuLyoqXG4gKiBNYWtlIGEgcGF0aCByZWxhdGl2ZSB0byBhIFVSTCBvciBhbm90aGVyIHBhdGguXG4gKlxuICogQHBhcmFtIGFSb290IFRoZSByb290IHBhdGggb3IgVVJMLlxuICogQHBhcmFtIGFQYXRoIFRoZSBwYXRoIG9yIFVSTCB0byBiZSBtYWRlIHJlbGF0aXZlIHRvIGFSb290LlxuICovXG5mdW5jdGlvbiByZWxhdGl2ZShhUm9vdCwgYVBhdGgpIHtcbiAgaWYgKGFSb290ID09PSBcIlwiKSB7XG4gICAgYVJvb3QgPSBcIi5cIjtcbiAgfVxuXG4gIGFSb290ID0gYVJvb3QucmVwbGFjZSgvXFwvJC8sICcnKTtcblxuICAvLyBJdCBpcyBwb3NzaWJsZSBmb3IgdGhlIHBhdGggdG8gYmUgYWJvdmUgdGhlIHJvb3QuIEluIHRoaXMgY2FzZSwgc2ltcGx5XG4gIC8vIGNoZWNraW5nIHdoZXRoZXIgdGhlIHJvb3QgaXMgYSBwcmVmaXggb2YgdGhlIHBhdGggd29uJ3Qgd29yay4gSW5zdGVhZCwgd2VcbiAgLy8gbmVlZCB0byByZW1vdmUgY29tcG9uZW50cyBmcm9tIHRoZSByb290IG9uZSBieSBvbmUsIHVudGlsIGVpdGhlciB3ZSBmaW5kXG4gIC8vIGEgcHJlZml4IHRoYXQgZml0cywgb3Igd2UgcnVuIG91dCBvZiBjb21wb25lbnRzIHRvIHJlbW92ZS5cbiAgdmFyIGxldmVsID0gMDtcbiAgd2hpbGUgKGFQYXRoLmluZGV4T2YoYVJvb3QgKyAnLycpICE9PSAwKSB7XG4gICAgdmFyIGluZGV4ID0gYVJvb3QubGFzdEluZGV4T2YoXCIvXCIpO1xuICAgIGlmIChpbmRleCA8IDApIHtcbiAgICAgIHJldHVybiBhUGF0aDtcbiAgICB9XG5cbiAgICAvLyBJZiB0aGUgb25seSBwYXJ0IG9mIHRoZSByb290IHRoYXQgaXMgbGVmdCBpcyB0aGUgc2NoZW1lIChpLmUuIGh0dHA6Ly8sXG4gICAgLy8gZmlsZTovLy8sIGV0Yy4pLCBvbmUgb3IgbW9yZSBzbGFzaGVzICgvKSwgb3Igc2ltcGx5IG5vdGhpbmcgYXQgYWxsLCB3ZVxuICAgIC8vIGhhdmUgZXhoYXVzdGVkIGFsbCBjb21wb25lbnRzLCBzbyB0aGUgcGF0aCBpcyBub3QgcmVsYXRpdmUgdG8gdGhlIHJvb3QuXG4gICAgYVJvb3QgPSBhUm9vdC5zbGljZSgwLCBpbmRleCk7XG4gICAgaWYgKGFSb290Lm1hdGNoKC9eKFteXFwvXSs6XFwvKT9cXC8qJC8pKSB7XG4gICAgICByZXR1cm4gYVBhdGg7XG4gICAgfVxuXG4gICAgKytsZXZlbDtcbiAgfVxuXG4gIC8vIE1ha2Ugc3VyZSB3ZSBhZGQgYSBcIi4uL1wiIGZvciBlYWNoIGNvbXBvbmVudCB3ZSByZW1vdmVkIGZyb20gdGhlIHJvb3QuXG4gIHJldHVybiBBcnJheShsZXZlbCArIDEpLmpvaW4oXCIuLi9cIikgKyBhUGF0aC5zdWJzdHIoYVJvb3QubGVuZ3RoICsgMSk7XG59XG5leHBvcnRzLnJlbGF0aXZlID0gcmVsYXRpdmU7XG5cbnZhciBzdXBwb3J0c051bGxQcm90byA9IChmdW5jdGlvbiAoKSB7XG4gIHZhciBvYmogPSBPYmplY3QuY3JlYXRlKG51bGwpO1xuICByZXR1cm4gISgnX19wcm90b19fJyBpbiBvYmopO1xufSgpKTtcblxuZnVuY3Rpb24gaWRlbnRpdHkgKHMpIHtcbiAgcmV0dXJuIHM7XG59XG5cbi8qKlxuICogQmVjYXVzZSBiZWhhdmlvciBnb2VzIHdhY2t5IHdoZW4geW91IHNldCBgX19wcm90b19fYCBvbiBvYmplY3RzLCB3ZVxuICogaGF2ZSB0byBwcmVmaXggYWxsIHRoZSBzdHJpbmdzIGluIG91ciBzZXQgd2l0aCBhbiBhcmJpdHJhcnkgY2hhcmFjdGVyLlxuICpcbiAqIFNlZSBodHRwczovL2dpdGh1Yi5jb20vbW96aWxsYS9zb3VyY2UtbWFwL3B1bGwvMzEgYW5kXG4gKiBodHRwczovL2dpdGh1Yi5jb20vbW96aWxsYS9zb3VyY2UtbWFwL2lzc3Vlcy8zMFxuICpcbiAqIEBwYXJhbSBTdHJpbmcgYVN0clxuICovXG5mdW5jdGlvbiB0b1NldFN0cmluZyhhU3RyKSB7XG4gIGlmIChpc1Byb3RvU3RyaW5nKGFTdHIpKSB7XG4gICAgcmV0dXJuICckJyArIGFTdHI7XG4gIH1cblxuICByZXR1cm4gYVN0cjtcbn1cbmV4cG9ydHMudG9TZXRTdHJpbmcgPSBzdXBwb3J0c051bGxQcm90byA/IGlkZW50aXR5IDogdG9TZXRTdHJpbmc7XG5cbmZ1bmN0aW9uIGZyb21TZXRTdHJpbmcoYVN0cikge1xuICBpZiAoaXNQcm90b1N0cmluZyhhU3RyKSkge1xuICAgIHJldHVybiBhU3RyLnNsaWNlKDEpO1xuICB9XG5cbiAgcmV0dXJuIGFTdHI7XG59XG5leHBvcnRzLmZyb21TZXRTdHJpbmcgPSBzdXBwb3J0c051bGxQcm90byA/IGlkZW50aXR5IDogZnJvbVNldFN0cmluZztcblxuZnVuY3Rpb24gaXNQcm90b1N0cmluZyhzKSB7XG4gIGlmICghcykge1xuICAgIHJldHVybiBmYWxzZTtcbiAgfVxuXG4gIHZhciBsZW5ndGggPSBzLmxlbmd0aDtcblxuICBpZiAobGVuZ3RoIDwgOSAvKiBcIl9fcHJvdG9fX1wiLmxlbmd0aCAqLykge1xuICAgIHJldHVybiBmYWxzZTtcbiAgfVxuXG4gIGlmIChzLmNoYXJDb2RlQXQobGVuZ3RoIC0gMSkgIT09IDk1ICAvKiAnXycgKi8gfHxcbiAgICAgIHMuY2hhckNvZGVBdChsZW5ndGggLSAyKSAhPT0gOTUgIC8qICdfJyAqLyB8fFxuICAgICAgcy5jaGFyQ29kZUF0KGxlbmd0aCAtIDMpICE9PSAxMTEgLyogJ28nICovIHx8XG4gICAgICBzLmNoYXJDb2RlQXQobGVuZ3RoIC0gNCkgIT09IDExNiAvKiAndCcgKi8gfHxcbiAgICAgIHMuY2hhckNvZGVBdChsZW5ndGggLSA1KSAhPT0gMTExIC8qICdvJyAqLyB8fFxuICAgICAgcy5jaGFyQ29kZUF0KGxlbmd0aCAtIDYpICE9PSAxMTQgLyogJ3InICovIHx8XG4gICAgICBzLmNoYXJDb2RlQXQobGVuZ3RoIC0gNykgIT09IDExMiAvKiAncCcgKi8gfHxcbiAgICAgIHMuY2hhckNvZGVBdChsZW5ndGggLSA4KSAhPT0gOTUgIC8qICdfJyAqLyB8fFxuICAgICAgcy5jaGFyQ29kZUF0KGxlbmd0aCAtIDkpICE9PSA5NSAgLyogJ18nICovKSB7XG4gICAgcmV0dXJuIGZhbHNlO1xuICB9XG5cbiAgZm9yICh2YXIgaSA9IGxlbmd0aCAtIDEwOyBpID49IDA7IGktLSkge1xuICAgIGlmIChzLmNoYXJDb2RlQXQoaSkgIT09IDM2IC8qICckJyAqLykge1xuICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiB0cnVlO1xufVxuXG4vKipcbiAqIENvbXBhcmF0b3IgYmV0d2VlbiB0d28gbWFwcGluZ3Mgd2hlcmUgdGhlIG9yaWdpbmFsIHBvc2l0aW9ucyBhcmUgY29tcGFyZWQuXG4gKlxuICogT3B0aW9uYWxseSBwYXNzIGluIGB0cnVlYCBhcyBgb25seUNvbXBhcmVHZW5lcmF0ZWRgIHRvIGNvbnNpZGVyIHR3b1xuICogbWFwcGluZ3Mgd2l0aCB0aGUgc2FtZSBvcmlnaW5hbCBzb3VyY2UvbGluZS9jb2x1bW4sIGJ1dCBkaWZmZXJlbnQgZ2VuZXJhdGVkXG4gKiBsaW5lIGFuZCBjb2x1bW4gdGhlIHNhbWUuIFVzZWZ1bCB3aGVuIHNlYXJjaGluZyBmb3IgYSBtYXBwaW5nIHdpdGggYVxuICogc3R1YmJlZCBvdXQgbWFwcGluZy5cbiAqL1xuZnVuY3Rpb24gY29tcGFyZUJ5T3JpZ2luYWxQb3NpdGlvbnMobWFwcGluZ0EsIG1hcHBpbmdCLCBvbmx5Q29tcGFyZU9yaWdpbmFsKSB7XG4gIHZhciBjbXAgPSBtYXBwaW5nQS5zb3VyY2UgLSBtYXBwaW5nQi5zb3VyY2U7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0Eub3JpZ2luYWxMaW5lIC0gbWFwcGluZ0Iub3JpZ2luYWxMaW5lO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IG1hcHBpbmdBLm9yaWdpbmFsQ29sdW1uIC0gbWFwcGluZ0Iub3JpZ2luYWxDb2x1bW47XG4gIGlmIChjbXAgIT09IDAgfHwgb25seUNvbXBhcmVPcmlnaW5hbCkge1xuICAgIHJldHVybiBjbXA7XG4gIH1cblxuICBjbXAgPSBtYXBwaW5nQS5nZW5lcmF0ZWRDb2x1bW4gLSBtYXBwaW5nQi5nZW5lcmF0ZWRDb2x1bW47XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0EuZ2VuZXJhdGVkTGluZSAtIG1hcHBpbmdCLmdlbmVyYXRlZExpbmU7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgcmV0dXJuIG1hcHBpbmdBLm5hbWUgLSBtYXBwaW5nQi5uYW1lO1xufVxuZXhwb3J0cy5jb21wYXJlQnlPcmlnaW5hbFBvc2l0aW9ucyA9IGNvbXBhcmVCeU9yaWdpbmFsUG9zaXRpb25zO1xuXG4vKipcbiAqIENvbXBhcmF0b3IgYmV0d2VlbiB0d28gbWFwcGluZ3Mgd2l0aCBkZWZsYXRlZCBzb3VyY2UgYW5kIG5hbWUgaW5kaWNlcyB3aGVyZVxuICogdGhlIGdlbmVyYXRlZCBwb3NpdGlvbnMgYXJlIGNvbXBhcmVkLlxuICpcbiAqIE9wdGlvbmFsbHkgcGFzcyBpbiBgdHJ1ZWAgYXMgYG9ubHlDb21wYXJlR2VuZXJhdGVkYCB0byBjb25zaWRlciB0d29cbiAqIG1hcHBpbmdzIHdpdGggdGhlIHNhbWUgZ2VuZXJhdGVkIGxpbmUgYW5kIGNvbHVtbiwgYnV0IGRpZmZlcmVudFxuICogc291cmNlL25hbWUvb3JpZ2luYWwgbGluZSBhbmQgY29sdW1uIHRoZSBzYW1lLiBVc2VmdWwgd2hlbiBzZWFyY2hpbmcgZm9yIGFcbiAqIG1hcHBpbmcgd2l0aCBhIHN0dWJiZWQgb3V0IG1hcHBpbmcuXG4gKi9cbmZ1bmN0aW9uIGNvbXBhcmVCeUdlbmVyYXRlZFBvc2l0aW9uc0RlZmxhdGVkKG1hcHBpbmdBLCBtYXBwaW5nQiwgb25seUNvbXBhcmVHZW5lcmF0ZWQpIHtcbiAgdmFyIGNtcCA9IG1hcHBpbmdBLmdlbmVyYXRlZExpbmUgLSBtYXBwaW5nQi5nZW5lcmF0ZWRMaW5lO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IG1hcHBpbmdBLmdlbmVyYXRlZENvbHVtbiAtIG1hcHBpbmdCLmdlbmVyYXRlZENvbHVtbjtcbiAgaWYgKGNtcCAhPT0gMCB8fCBvbmx5Q29tcGFyZUdlbmVyYXRlZCkge1xuICAgIHJldHVybiBjbXA7XG4gIH1cblxuICBjbXAgPSBtYXBwaW5nQS5zb3VyY2UgLSBtYXBwaW5nQi5zb3VyY2U7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0Eub3JpZ2luYWxMaW5lIC0gbWFwcGluZ0Iub3JpZ2luYWxMaW5lO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IG1hcHBpbmdBLm9yaWdpbmFsQ29sdW1uIC0gbWFwcGluZ0Iub3JpZ2luYWxDb2x1bW47XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgcmV0dXJuIG1hcHBpbmdBLm5hbWUgLSBtYXBwaW5nQi5uYW1lO1xufVxuZXhwb3J0cy5jb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNEZWZsYXRlZCA9IGNvbXBhcmVCeUdlbmVyYXRlZFBvc2l0aW9uc0RlZmxhdGVkO1xuXG5mdW5jdGlvbiBzdHJjbXAoYVN0cjEsIGFTdHIyKSB7XG4gIGlmIChhU3RyMSA9PT0gYVN0cjIpIHtcbiAgICByZXR1cm4gMDtcbiAgfVxuXG4gIGlmIChhU3RyMSA+IGFTdHIyKSB7XG4gICAgcmV0dXJuIDE7XG4gIH1cblxuICByZXR1cm4gLTE7XG59XG5cbi8qKlxuICogQ29tcGFyYXRvciBiZXR3ZWVuIHR3byBtYXBwaW5ncyB3aXRoIGluZmxhdGVkIHNvdXJjZSBhbmQgbmFtZSBzdHJpbmdzIHdoZXJlXG4gKiB0aGUgZ2VuZXJhdGVkIHBvc2l0aW9ucyBhcmUgY29tcGFyZWQuXG4gKi9cbmZ1bmN0aW9uIGNvbXBhcmVCeUdlbmVyYXRlZFBvc2l0aW9uc0luZmxhdGVkKG1hcHBpbmdBLCBtYXBwaW5nQikge1xuICB2YXIgY21wID0gbWFwcGluZ0EuZ2VuZXJhdGVkTGluZSAtIG1hcHBpbmdCLmdlbmVyYXRlZExpbmU7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0EuZ2VuZXJhdGVkQ29sdW1uIC0gbWFwcGluZ0IuZ2VuZXJhdGVkQ29sdW1uO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IHN0cmNtcChtYXBwaW5nQS5zb3VyY2UsIG1hcHBpbmdCLnNvdXJjZSk7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0Eub3JpZ2luYWxMaW5lIC0gbWFwcGluZ0Iub3JpZ2luYWxMaW5lO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IG1hcHBpbmdBLm9yaWdpbmFsQ29sdW1uIC0gbWFwcGluZ0Iub3JpZ2luYWxDb2x1bW47XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgcmV0dXJuIHN0cmNtcChtYXBwaW5nQS5uYW1lLCBtYXBwaW5nQi5uYW1lKTtcbn1cbmV4cG9ydHMuY29tcGFyZUJ5R2VuZXJhdGVkUG9zaXRpb25zSW5mbGF0ZWQgPSBjb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNJbmZsYXRlZDtcblxuXG5cbi8qKioqKioqKioqKioqKioqKlxuICoqIFdFQlBBQ0sgRk9PVEVSXG4gKiogLi9saWIvdXRpbC5qc1xuICoqIG1vZHVsZSBpZCA9IDRcbiAqKiBtb2R1bGUgY2h1bmtzID0gMFxuICoqLyIsIi8qIC0qLSBNb2RlOiBqczsganMtaW5kZW50LWxldmVsOiAyOyAtKi0gKi9cbi8qXG4gKiBDb3B5cmlnaHQgMjAxMSBNb3ppbGxhIEZvdW5kYXRpb24gYW5kIGNvbnRyaWJ1dG9yc1xuICogTGljZW5zZWQgdW5kZXIgdGhlIE5ldyBCU0QgbGljZW5zZS4gU2VlIExJQ0VOU0Ugb3I6XG4gKiBodHRwOi8vb3BlbnNvdXJjZS5vcmcvbGljZW5zZXMvQlNELTMtQ2xhdXNlXG4gKi9cblxudmFyIHV0aWwgPSByZXF1aXJlKCcuL3V0aWwnKTtcbnZhciBoYXMgPSBPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5O1xuXG4vKipcbiAqIEEgZGF0YSBzdHJ1Y3R1cmUgd2hpY2ggaXMgYSBjb21iaW5hdGlvbiBvZiBhbiBhcnJheSBhbmQgYSBzZXQuIEFkZGluZyBhIG5ld1xuICogbWVtYmVyIGlzIE8oMSksIHRlc3RpbmcgZm9yIG1lbWJlcnNoaXAgaXMgTygxKSwgYW5kIGZpbmRpbmcgdGhlIGluZGV4IG9mIGFuXG4gKiBlbGVtZW50IGlzIE8oMSkuIFJlbW92aW5nIGVsZW1lbnRzIGZyb20gdGhlIHNldCBpcyBub3Qgc3VwcG9ydGVkLiBPbmx5XG4gKiBzdHJpbmdzIGFyZSBzdXBwb3J0ZWQgZm9yIG1lbWJlcnNoaXAuXG4gKi9cbmZ1bmN0aW9uIEFycmF5U2V0KCkge1xuICB0aGlzLl9hcnJheSA9IFtdO1xuICB0aGlzLl9zZXQgPSBPYmplY3QuY3JlYXRlKG51bGwpO1xufVxuXG4vKipcbiAqIFN0YXRpYyBtZXRob2QgZm9yIGNyZWF0aW5nIEFycmF5U2V0IGluc3RhbmNlcyBmcm9tIGFuIGV4aXN0aW5nIGFycmF5LlxuICovXG5BcnJheVNldC5mcm9tQXJyYXkgPSBmdW5jdGlvbiBBcnJheVNldF9mcm9tQXJyYXkoYUFycmF5LCBhQWxsb3dEdXBsaWNhdGVzKSB7XG4gIHZhciBzZXQgPSBuZXcgQXJyYXlTZXQoKTtcbiAgZm9yICh2YXIgaSA9IDAsIGxlbiA9IGFBcnJheS5sZW5ndGg7IGkgPCBsZW47IGkrKykge1xuICAgIHNldC5hZGQoYUFycmF5W2ldLCBhQWxsb3dEdXBsaWNhdGVzKTtcbiAgfVxuICByZXR1cm4gc2V0O1xufTtcblxuLyoqXG4gKiBSZXR1cm4gaG93IG1hbnkgdW5pcXVlIGl0ZW1zIGFyZSBpbiB0aGlzIEFycmF5U2V0LiBJZiBkdXBsaWNhdGVzIGhhdmUgYmVlblxuICogYWRkZWQsIHRoYW4gdGhvc2UgZG8gbm90IGNvdW50IHRvd2FyZHMgdGhlIHNpemUuXG4gKlxuICogQHJldHVybnMgTnVtYmVyXG4gKi9cbkFycmF5U2V0LnByb3RvdHlwZS5zaXplID0gZnVuY3Rpb24gQXJyYXlTZXRfc2l6ZSgpIHtcbiAgcmV0dXJuIE9iamVjdC5nZXRPd25Qcm9wZXJ0eU5hbWVzKHRoaXMuX3NldCkubGVuZ3RoO1xufTtcblxuLyoqXG4gKiBBZGQgdGhlIGdpdmVuIHN0cmluZyB0byB0aGlzIHNldC5cbiAqXG4gKiBAcGFyYW0gU3RyaW5nIGFTdHJcbiAqL1xuQXJyYXlTZXQucHJvdG90eXBlLmFkZCA9IGZ1bmN0aW9uIEFycmF5U2V0X2FkZChhU3RyLCBhQWxsb3dEdXBsaWNhdGVzKSB7XG4gIHZhciBzU3RyID0gdXRpbC50b1NldFN0cmluZyhhU3RyKTtcbiAgdmFyIGlzRHVwbGljYXRlID0gaGFzLmNhbGwodGhpcy5fc2V0LCBzU3RyKTtcbiAgdmFyIGlkeCA9IHRoaXMuX2FycmF5Lmxlbmd0aDtcbiAgaWYgKCFpc0R1cGxpY2F0ZSB8fCBhQWxsb3dEdXBsaWNhdGVzKSB7XG4gICAgdGhpcy5fYXJyYXkucHVzaChhU3RyKTtcbiAgfVxuICBpZiAoIWlzRHVwbGljYXRlKSB7XG4gICAgdGhpcy5fc2V0W3NTdHJdID0gaWR4O1xuICB9XG59O1xuXG4vKipcbiAqIElzIHRoZSBnaXZlbiBzdHJpbmcgYSBtZW1iZXIgb2YgdGhpcyBzZXQ/XG4gKlxuICogQHBhcmFtIFN0cmluZyBhU3RyXG4gKi9cbkFycmF5U2V0LnByb3RvdHlwZS5oYXMgPSBmdW5jdGlvbiBBcnJheVNldF9oYXMoYVN0cikge1xuICB2YXIgc1N0ciA9IHV0aWwudG9TZXRTdHJpbmcoYVN0cik7XG4gIHJldHVybiBoYXMuY2FsbCh0aGlzLl9zZXQsIHNTdHIpO1xufTtcblxuLyoqXG4gKiBXaGF0IGlzIHRoZSBpbmRleCBvZiB0aGUgZ2l2ZW4gc3RyaW5nIGluIHRoZSBhcnJheT9cbiAqXG4gKiBAcGFyYW0gU3RyaW5nIGFTdHJcbiAqL1xuQXJyYXlTZXQucHJvdG90eXBlLmluZGV4T2YgPSBmdW5jdGlvbiBBcnJheVNldF9pbmRleE9mKGFTdHIpIHtcbiAgdmFyIHNTdHIgPSB1dGlsLnRvU2V0U3RyaW5nKGFTdHIpO1xuICBpZiAoaGFzLmNhbGwodGhpcy5fc2V0LCBzU3RyKSkge1xuICAgIHJldHVybiB0aGlzLl9zZXRbc1N0cl07XG4gIH1cbiAgdGhyb3cgbmV3IEVycm9yKCdcIicgKyBhU3RyICsgJ1wiIGlzIG5vdCBpbiB0aGUgc2V0LicpO1xufTtcblxuLyoqXG4gKiBXaGF0IGlzIHRoZSBlbGVtZW50IGF0IHRoZSBnaXZlbiBpbmRleD9cbiAqXG4gKiBAcGFyYW0gTnVtYmVyIGFJZHhcbiAqL1xuQXJyYXlTZXQucHJvdG90eXBlLmF0ID0gZnVuY3Rpb24gQXJyYXlTZXRfYXQoYUlkeCkge1xuICBpZiAoYUlkeCA+PSAwICYmIGFJZHggPCB0aGlzLl9hcnJheS5sZW5ndGgpIHtcbiAgICByZXR1cm4gdGhpcy5fYXJyYXlbYUlkeF07XG4gIH1cbiAgdGhyb3cgbmV3IEVycm9yKCdObyBlbGVtZW50IGluZGV4ZWQgYnkgJyArIGFJZHgpO1xufTtcblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBhcnJheSByZXByZXNlbnRhdGlvbiBvZiB0aGlzIHNldCAod2hpY2ggaGFzIHRoZSBwcm9wZXIgaW5kaWNlc1xuICogaW5kaWNhdGVkIGJ5IGluZGV4T2YpLiBOb3RlIHRoYXQgdGhpcyBpcyBhIGNvcHkgb2YgdGhlIGludGVybmFsIGFycmF5IHVzZWRcbiAqIGZvciBzdG9yaW5nIHRoZSBtZW1iZXJzIHNvIHRoYXQgbm8gb25lIGNhbiBtZXNzIHdpdGggaW50ZXJuYWwgc3RhdGUuXG4gKi9cbkFycmF5U2V0LnByb3RvdHlwZS50b0FycmF5ID0gZnVuY3Rpb24gQXJyYXlTZXRfdG9BcnJheSgpIHtcbiAgcmV0dXJuIHRoaXMuX2FycmF5LnNsaWNlKCk7XG59O1xuXG5leHBvcnRzLkFycmF5U2V0ID0gQXJyYXlTZXQ7XG5cblxuXG4vKioqKioqKioqKioqKioqKipcbiAqKiBXRUJQQUNLIEZPT1RFUlxuICoqIC4vbGliL2FycmF5LXNldC5qc1xuICoqIG1vZHVsZSBpZCA9IDVcbiAqKiBtb2R1bGUgY2h1bmtzID0gMFxuICoqLyIsIi8qIC0qLSBNb2RlOiBqczsganMtaW5kZW50LWxldmVsOiAyOyAtKi0gKi9cbi8qXG4gKiBDb3B5cmlnaHQgMjAxNCBNb3ppbGxhIEZvdW5kYXRpb24gYW5kIGNvbnRyaWJ1dG9yc1xuICogTGljZW5zZWQgdW5kZXIgdGhlIE5ldyBCU0QgbGljZW5zZS4gU2VlIExJQ0VOU0Ugb3I6XG4gKiBodHRwOi8vb3BlbnNvdXJjZS5vcmcvbGljZW5zZXMvQlNELTMtQ2xhdXNlXG4gKi9cblxudmFyIHV0aWwgPSByZXF1aXJlKCcuL3V0aWwnKTtcblxuLyoqXG4gKiBEZXRlcm1pbmUgd2hldGhlciBtYXBwaW5nQiBpcyBhZnRlciBtYXBwaW5nQSB3aXRoIHJlc3BlY3QgdG8gZ2VuZXJhdGVkXG4gKiBwb3NpdGlvbi5cbiAqL1xuZnVuY3Rpb24gZ2VuZXJhdGVkUG9zaXRpb25BZnRlcihtYXBwaW5nQSwgbWFwcGluZ0IpIHtcbiAgLy8gT3B0aW1pemVkIGZvciBtb3N0IGNvbW1vbiBjYXNlXG4gIHZhciBsaW5lQSA9IG1hcHBpbmdBLmdlbmVyYXRlZExpbmU7XG4gIHZhciBsaW5lQiA9IG1hcHBpbmdCLmdlbmVyYXRlZExpbmU7XG4gIHZhciBjb2x1bW5BID0gbWFwcGluZ0EuZ2VuZXJhdGVkQ29sdW1uO1xuICB2YXIgY29sdW1uQiA9IG1hcHBpbmdCLmdlbmVyYXRlZENvbHVtbjtcbiAgcmV0dXJuIGxpbmVCID4gbGluZUEgfHwgbGluZUIgPT0gbGluZUEgJiYgY29sdW1uQiA+PSBjb2x1bW5BIHx8XG4gICAgICAgICB1dGlsLmNvbXBhcmVCeUdlbmVyYXRlZFBvc2l0aW9uc0luZmxhdGVkKG1hcHBpbmdBLCBtYXBwaW5nQikgPD0gMDtcbn1cblxuLyoqXG4gKiBBIGRhdGEgc3RydWN0dXJlIHRvIHByb3ZpZGUgYSBzb3J0ZWQgdmlldyBvZiBhY2N1bXVsYXRlZCBtYXBwaW5ncyBpbiBhXG4gKiBwZXJmb3JtYW5jZSBjb25zY2lvdXMgbWFubmVyLiBJdCB0cmFkZXMgYSBuZWdsaWJhYmxlIG92ZXJoZWFkIGluIGdlbmVyYWxcbiAqIGNhc2UgZm9yIGEgbGFyZ2Ugc3BlZWR1cCBpbiBjYXNlIG9mIG1hcHBpbmdzIGJlaW5nIGFkZGVkIGluIG9yZGVyLlxuICovXG5mdW5jdGlvbiBNYXBwaW5nTGlzdCgpIHtcbiAgdGhpcy5fYXJyYXkgPSBbXTtcbiAgdGhpcy5fc29ydGVkID0gdHJ1ZTtcbiAgLy8gU2VydmVzIGFzIGluZmltdW1cbiAgdGhpcy5fbGFzdCA9IHtnZW5lcmF0ZWRMaW5lOiAtMSwgZ2VuZXJhdGVkQ29sdW1uOiAwfTtcbn1cblxuLyoqXG4gKiBJdGVyYXRlIHRocm91Z2ggaW50ZXJuYWwgaXRlbXMuIFRoaXMgbWV0aG9kIHRha2VzIHRoZSBzYW1lIGFyZ3VtZW50cyB0aGF0XG4gKiBgQXJyYXkucHJvdG90eXBlLmZvckVhY2hgIHRha2VzLlxuICpcbiAqIE5PVEU6IFRoZSBvcmRlciBvZiB0aGUgbWFwcGluZ3MgaXMgTk9UIGd1YXJhbnRlZWQuXG4gKi9cbk1hcHBpbmdMaXN0LnByb3RvdHlwZS51bnNvcnRlZEZvckVhY2ggPVxuICBmdW5jdGlvbiBNYXBwaW5nTGlzdF9mb3JFYWNoKGFDYWxsYmFjaywgYVRoaXNBcmcpIHtcbiAgICB0aGlzLl9hcnJheS5mb3JFYWNoKGFDYWxsYmFjaywgYVRoaXNBcmcpO1xuICB9O1xuXG4vKipcbiAqIEFkZCB0aGUgZ2l2ZW4gc291cmNlIG1hcHBpbmcuXG4gKlxuICogQHBhcmFtIE9iamVjdCBhTWFwcGluZ1xuICovXG5NYXBwaW5nTGlzdC5wcm90b3R5cGUuYWRkID0gZnVuY3Rpb24gTWFwcGluZ0xpc3RfYWRkKGFNYXBwaW5nKSB7XG4gIGlmIChnZW5lcmF0ZWRQb3NpdGlvbkFmdGVyKHRoaXMuX2xhc3QsIGFNYXBwaW5nKSkge1xuICAgIHRoaXMuX2xhc3QgPSBhTWFwcGluZztcbiAgICB0aGlzLl9hcnJheS5wdXNoKGFNYXBwaW5nKTtcbiAgfSBlbHNlIHtcbiAgICB0aGlzLl9zb3J0ZWQgPSBmYWxzZTtcbiAgICB0aGlzLl9hcnJheS5wdXNoKGFNYXBwaW5nKTtcbiAgfVxufTtcblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBmbGF0LCBzb3J0ZWQgYXJyYXkgb2YgbWFwcGluZ3MuIFRoZSBtYXBwaW5ncyBhcmUgc29ydGVkIGJ5XG4gKiBnZW5lcmF0ZWQgcG9zaXRpb24uXG4gKlxuICogV0FSTklORzogVGhpcyBtZXRob2QgcmV0dXJucyBpbnRlcm5hbCBkYXRhIHdpdGhvdXQgY29weWluZywgZm9yXG4gKiBwZXJmb3JtYW5jZS4gVGhlIHJldHVybiB2YWx1ZSBtdXN0IE5PVCBiZSBtdXRhdGVkLCBhbmQgc2hvdWxkIGJlIHRyZWF0ZWQgYXNcbiAqIGFuIGltbXV0YWJsZSBib3Jyb3cuIElmIHlvdSB3YW50IHRvIHRha2Ugb3duZXJzaGlwLCB5b3UgbXVzdCBtYWtlIHlvdXIgb3duXG4gKiBjb3B5LlxuICovXG5NYXBwaW5nTGlzdC5wcm90b3R5cGUudG9BcnJheSA9IGZ1bmN0aW9uIE1hcHBpbmdMaXN0X3RvQXJyYXkoKSB7XG4gIGlmICghdGhpcy5fc29ydGVkKSB7XG4gICAgdGhpcy5fYXJyYXkuc29ydCh1dGlsLmNvbXBhcmVCeUdlbmVyYXRlZFBvc2l0aW9uc0luZmxhdGVkKTtcbiAgICB0aGlzLl9zb3J0ZWQgPSB0cnVlO1xuICB9XG4gIHJldHVybiB0aGlzLl9hcnJheTtcbn07XG5cbmV4cG9ydHMuTWFwcGluZ0xpc3QgPSBNYXBwaW5nTGlzdDtcblxuXG5cbi8qKioqKioqKioqKioqKioqKlxuICoqIFdFQlBBQ0sgRk9PVEVSXG4gKiogLi9saWIvbWFwcGluZy1saXN0LmpzXG4gKiogbW9kdWxlIGlkID0gNlxuICoqIG1vZHVsZSBjaHVua3MgPSAwXG4gKiovIiwiLyogLSotIE1vZGU6IGpzOyBqcy1pbmRlbnQtbGV2ZWw6IDI7IC0qLSAqL1xuLypcbiAqIENvcHlyaWdodCAyMDExIE1vemlsbGEgRm91bmRhdGlvbiBhbmQgY29udHJpYnV0b3JzXG4gKiBMaWNlbnNlZCB1bmRlciB0aGUgTmV3IEJTRCBsaWNlbnNlLiBTZWUgTElDRU5TRSBvcjpcbiAqIGh0dHA6Ly9vcGVuc291cmNlLm9yZy9saWNlbnNlcy9CU0QtMy1DbGF1c2VcbiAqL1xuXG52YXIgdXRpbCA9IHJlcXVpcmUoJy4vdXRpbCcpO1xudmFyIGJpbmFyeVNlYXJjaCA9IHJlcXVpcmUoJy4vYmluYXJ5LXNlYXJjaCcpO1xudmFyIEFycmF5U2V0ID0gcmVxdWlyZSgnLi9hcnJheS1zZXQnKS5BcnJheVNldDtcbnZhciBiYXNlNjRWTFEgPSByZXF1aXJlKCcuL2Jhc2U2NC12bHEnKTtcbnZhciBxdWlja1NvcnQgPSByZXF1aXJlKCcuL3F1aWNrLXNvcnQnKS5xdWlja1NvcnQ7XG5cbmZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyKGFTb3VyY2VNYXApIHtcbiAgdmFyIHNvdXJjZU1hcCA9IGFTb3VyY2VNYXA7XG4gIGlmICh0eXBlb2YgYVNvdXJjZU1hcCA9PT0gJ3N0cmluZycpIHtcbiAgICBzb3VyY2VNYXAgPSBKU09OLnBhcnNlKGFTb3VyY2VNYXAucmVwbGFjZSgvXlxcKVxcXVxcfScvLCAnJykpO1xuICB9XG5cbiAgcmV0dXJuIHNvdXJjZU1hcC5zZWN0aW9ucyAhPSBudWxsXG4gICAgPyBuZXcgSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyKHNvdXJjZU1hcClcbiAgICA6IG5ldyBCYXNpY1NvdXJjZU1hcENvbnN1bWVyKHNvdXJjZU1hcCk7XG59XG5cblNvdXJjZU1hcENvbnN1bWVyLmZyb21Tb3VyY2VNYXAgPSBmdW5jdGlvbihhU291cmNlTWFwKSB7XG4gIHJldHVybiBCYXNpY1NvdXJjZU1hcENvbnN1bWVyLmZyb21Tb3VyY2VNYXAoYVNvdXJjZU1hcCk7XG59XG5cbi8qKlxuICogVGhlIHZlcnNpb24gb2YgdGhlIHNvdXJjZSBtYXBwaW5nIHNwZWMgdGhhdCB3ZSBhcmUgY29uc3VtaW5nLlxuICovXG5Tb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX3ZlcnNpb24gPSAzO1xuXG4vLyBgX19nZW5lcmF0ZWRNYXBwaW5nc2AgYW5kIGBfX29yaWdpbmFsTWFwcGluZ3NgIGFyZSBhcnJheXMgdGhhdCBob2xkIHRoZVxuLy8gcGFyc2VkIG1hcHBpbmcgY29vcmRpbmF0ZXMgZnJvbSB0aGUgc291cmNlIG1hcCdzIFwibWFwcGluZ3NcIiBhdHRyaWJ1dGUuIFRoZXlcbi8vIGFyZSBsYXppbHkgaW5zdGFudGlhdGVkLCBhY2Nlc3NlZCB2aWEgdGhlIGBfZ2VuZXJhdGVkTWFwcGluZ3NgIGFuZFxuLy8gYF9vcmlnaW5hbE1hcHBpbmdzYCBnZXR0ZXJzIHJlc3BlY3RpdmVseSwgYW5kIHdlIG9ubHkgcGFyc2UgdGhlIG1hcHBpbmdzXG4vLyBhbmQgY3JlYXRlIHRoZXNlIGFycmF5cyBvbmNlIHF1ZXJpZWQgZm9yIGEgc291cmNlIGxvY2F0aW9uLiBXZSBqdW1wIHRocm91Z2hcbi8vIHRoZXNlIGhvb3BzIGJlY2F1c2UgdGhlcmUgY2FuIGJlIG1hbnkgdGhvdXNhbmRzIG9mIG1hcHBpbmdzLCBhbmQgcGFyc2luZ1xuLy8gdGhlbSBpcyBleHBlbnNpdmUsIHNvIHdlIG9ubHkgd2FudCB0byBkbyBpdCBpZiB3ZSBtdXN0LlxuLy9cbi8vIEVhY2ggb2JqZWN0IGluIHRoZSBhcnJheXMgaXMgb2YgdGhlIGZvcm06XG4vL1xuLy8gICAgIHtcbi8vICAgICAgIGdlbmVyYXRlZExpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgZ2VuZXJhdGVkIGNvZGUsXG4vLyAgICAgICBnZW5lcmF0ZWRDb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgY29kZSxcbi8vICAgICAgIHNvdXJjZTogVGhlIHBhdGggdG8gdGhlIG9yaWdpbmFsIHNvdXJjZSBmaWxlIHRoYXQgZ2VuZXJhdGVkIHRoaXNcbi8vICAgICAgICAgICAgICAgY2h1bmsgb2YgY29kZSxcbi8vICAgICAgIG9yaWdpbmFsTGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UgdGhhdFxuLy8gICAgICAgICAgICAgICAgICAgICBjb3JyZXNwb25kcyB0byB0aGlzIGNodW5rIG9mIGdlbmVyYXRlZCBjb2RlLFxuLy8gICAgICAgb3JpZ2luYWxDb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UgdGhhdFxuLy8gICAgICAgICAgICAgICAgICAgICAgIGNvcnJlc3BvbmRzIHRvIHRoaXMgY2h1bmsgb2YgZ2VuZXJhdGVkIGNvZGUsXG4vLyAgICAgICBuYW1lOiBUaGUgbmFtZSBvZiB0aGUgb3JpZ2luYWwgc3ltYm9sIHdoaWNoIGdlbmVyYXRlZCB0aGlzIGNodW5rIG9mXG4vLyAgICAgICAgICAgICBjb2RlLlxuLy8gICAgIH1cbi8vXG4vLyBBbGwgcHJvcGVydGllcyBleGNlcHQgZm9yIGBnZW5lcmF0ZWRMaW5lYCBhbmQgYGdlbmVyYXRlZENvbHVtbmAgY2FuIGJlXG4vLyBgbnVsbGAuXG4vL1xuLy8gYF9nZW5lcmF0ZWRNYXBwaW5nc2AgaXMgb3JkZXJlZCBieSB0aGUgZ2VuZXJhdGVkIHBvc2l0aW9ucy5cbi8vXG4vLyBgX29yaWdpbmFsTWFwcGluZ3NgIGlzIG9yZGVyZWQgYnkgdGhlIG9yaWdpbmFsIHBvc2l0aW9ucy5cblxuU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLl9fZ2VuZXJhdGVkTWFwcGluZ3MgPSBudWxsO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZSwgJ19nZW5lcmF0ZWRNYXBwaW5ncycsIHtcbiAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgaWYgKCF0aGlzLl9fZ2VuZXJhdGVkTWFwcGluZ3MpIHtcbiAgICAgIHRoaXMuX3BhcnNlTWFwcGluZ3ModGhpcy5fbWFwcGluZ3MsIHRoaXMuc291cmNlUm9vdCk7XG4gICAgfVxuXG4gICAgcmV0dXJuIHRoaXMuX19nZW5lcmF0ZWRNYXBwaW5ncztcbiAgfVxufSk7XG5cblNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fX29yaWdpbmFsTWFwcGluZ3MgPSBudWxsO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZSwgJ19vcmlnaW5hbE1hcHBpbmdzJywge1xuICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICBpZiAoIXRoaXMuX19vcmlnaW5hbE1hcHBpbmdzKSB7XG4gICAgICB0aGlzLl9wYXJzZU1hcHBpbmdzKHRoaXMuX21hcHBpbmdzLCB0aGlzLnNvdXJjZVJvb3QpO1xuICAgIH1cblxuICAgIHJldHVybiB0aGlzLl9fb3JpZ2luYWxNYXBwaW5ncztcbiAgfVxufSk7XG5cblNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fY2hhcklzTWFwcGluZ1NlcGFyYXRvciA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyX2NoYXJJc01hcHBpbmdTZXBhcmF0b3IoYVN0ciwgaW5kZXgpIHtcbiAgICB2YXIgYyA9IGFTdHIuY2hhckF0KGluZGV4KTtcbiAgICByZXR1cm4gYyA9PT0gXCI7XCIgfHwgYyA9PT0gXCIsXCI7XG4gIH07XG5cbi8qKlxuICogUGFyc2UgdGhlIG1hcHBpbmdzIGluIGEgc3RyaW5nIGluIHRvIGEgZGF0YSBzdHJ1Y3R1cmUgd2hpY2ggd2UgY2FuIGVhc2lseVxuICogcXVlcnkgKHRoZSBvcmRlcmVkIGFycmF5cyBpbiB0aGUgYHRoaXMuX19nZW5lcmF0ZWRNYXBwaW5nc2AgYW5kXG4gKiBgdGhpcy5fX29yaWdpbmFsTWFwcGluZ3NgIHByb3BlcnRpZXMpLlxuICovXG5Tb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX3BhcnNlTWFwcGluZ3MgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBDb25zdW1lcl9wYXJzZU1hcHBpbmdzKGFTdHIsIGFTb3VyY2VSb290KSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKFwiU3ViY2xhc3NlcyBtdXN0IGltcGxlbWVudCBfcGFyc2VNYXBwaW5nc1wiKTtcbiAgfTtcblxuU291cmNlTWFwQ29uc3VtZXIuR0VORVJBVEVEX09SREVSID0gMTtcblNvdXJjZU1hcENvbnN1bWVyLk9SSUdJTkFMX09SREVSID0gMjtcblxuU291cmNlTWFwQ29uc3VtZXIuR1JFQVRFU1RfTE9XRVJfQk9VTkQgPSAxO1xuU291cmNlTWFwQ29uc3VtZXIuTEVBU1RfVVBQRVJfQk9VTkQgPSAyO1xuXG4vKipcbiAqIEl0ZXJhdGUgb3ZlciBlYWNoIG1hcHBpbmcgYmV0d2VlbiBhbiBvcmlnaW5hbCBzb3VyY2UvbGluZS9jb2x1bW4gYW5kIGFcbiAqIGdlbmVyYXRlZCBsaW5lL2NvbHVtbiBpbiB0aGlzIHNvdXJjZSBtYXAuXG4gKlxuICogQHBhcmFtIEZ1bmN0aW9uIGFDYWxsYmFja1xuICogICAgICAgIFRoZSBmdW5jdGlvbiB0aGF0IGlzIGNhbGxlZCB3aXRoIGVhY2ggbWFwcGluZy5cbiAqIEBwYXJhbSBPYmplY3QgYUNvbnRleHRcbiAqICAgICAgICBPcHRpb25hbC4gSWYgc3BlY2lmaWVkLCB0aGlzIG9iamVjdCB3aWxsIGJlIHRoZSB2YWx1ZSBvZiBgdGhpc2AgZXZlcnlcbiAqICAgICAgICB0aW1lIHRoYXQgYGFDYWxsYmFja2AgaXMgY2FsbGVkLlxuICogQHBhcmFtIGFPcmRlclxuICogICAgICAgIEVpdGhlciBgU291cmNlTWFwQ29uc3VtZXIuR0VORVJBVEVEX09SREVSYCBvclxuICogICAgICAgIGBTb3VyY2VNYXBDb25zdW1lci5PUklHSU5BTF9PUkRFUmAuIFNwZWNpZmllcyB3aGV0aGVyIHlvdSB3YW50IHRvXG4gKiAgICAgICAgaXRlcmF0ZSBvdmVyIHRoZSBtYXBwaW5ncyBzb3J0ZWQgYnkgdGhlIGdlbmVyYXRlZCBmaWxlJ3MgbGluZS9jb2x1bW5cbiAqICAgICAgICBvcmRlciBvciB0aGUgb3JpZ2luYWwncyBzb3VyY2UvbGluZS9jb2x1bW4gb3JkZXIsIHJlc3BlY3RpdmVseS4gRGVmYXVsdHMgdG9cbiAqICAgICAgICBgU291cmNlTWFwQ29uc3VtZXIuR0VORVJBVEVEX09SREVSYC5cbiAqL1xuU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLmVhY2hNYXBwaW5nID1cbiAgZnVuY3Rpb24gU291cmNlTWFwQ29uc3VtZXJfZWFjaE1hcHBpbmcoYUNhbGxiYWNrLCBhQ29udGV4dCwgYU9yZGVyKSB7XG4gICAgdmFyIGNvbnRleHQgPSBhQ29udGV4dCB8fCBudWxsO1xuICAgIHZhciBvcmRlciA9IGFPcmRlciB8fCBTb3VyY2VNYXBDb25zdW1lci5HRU5FUkFURURfT1JERVI7XG5cbiAgICB2YXIgbWFwcGluZ3M7XG4gICAgc3dpdGNoIChvcmRlcikge1xuICAgIGNhc2UgU291cmNlTWFwQ29uc3VtZXIuR0VORVJBVEVEX09SREVSOlxuICAgICAgbWFwcGluZ3MgPSB0aGlzLl9nZW5lcmF0ZWRNYXBwaW5ncztcbiAgICAgIGJyZWFrO1xuICAgIGNhc2UgU291cmNlTWFwQ29uc3VtZXIuT1JJR0lOQUxfT1JERVI6XG4gICAgICBtYXBwaW5ncyA9IHRoaXMuX29yaWdpbmFsTWFwcGluZ3M7XG4gICAgICBicmVhaztcbiAgICBkZWZhdWx0OlxuICAgICAgdGhyb3cgbmV3IEVycm9yKFwiVW5rbm93biBvcmRlciBvZiBpdGVyYXRpb24uXCIpO1xuICAgIH1cblxuICAgIHZhciBzb3VyY2VSb290ID0gdGhpcy5zb3VyY2VSb290O1xuICAgIG1hcHBpbmdzLm1hcChmdW5jdGlvbiAobWFwcGluZykge1xuICAgICAgdmFyIHNvdXJjZSA9IG1hcHBpbmcuc291cmNlID09PSBudWxsID8gbnVsbCA6IHRoaXMuX3NvdXJjZXMuYXQobWFwcGluZy5zb3VyY2UpO1xuICAgICAgaWYgKHNvdXJjZSAhPSBudWxsICYmIHNvdXJjZVJvb3QgIT0gbnVsbCkge1xuICAgICAgICBzb3VyY2UgPSB1dGlsLmpvaW4oc291cmNlUm9vdCwgc291cmNlKTtcbiAgICAgIH1cbiAgICAgIHJldHVybiB7XG4gICAgICAgIHNvdXJjZTogc291cmNlLFxuICAgICAgICBnZW5lcmF0ZWRMaW5lOiBtYXBwaW5nLmdlbmVyYXRlZExpbmUsXG4gICAgICAgIGdlbmVyYXRlZENvbHVtbjogbWFwcGluZy5nZW5lcmF0ZWRDb2x1bW4sXG4gICAgICAgIG9yaWdpbmFsTGluZTogbWFwcGluZy5vcmlnaW5hbExpbmUsXG4gICAgICAgIG9yaWdpbmFsQ29sdW1uOiBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uLFxuICAgICAgICBuYW1lOiBtYXBwaW5nLm5hbWUgPT09IG51bGwgPyBudWxsIDogdGhpcy5fbmFtZXMuYXQobWFwcGluZy5uYW1lKVxuICAgICAgfTtcbiAgICB9LCB0aGlzKS5mb3JFYWNoKGFDYWxsYmFjaywgY29udGV4dCk7XG4gIH07XG5cbi8qKlxuICogUmV0dXJucyBhbGwgZ2VuZXJhdGVkIGxpbmUgYW5kIGNvbHVtbiBpbmZvcm1hdGlvbiBmb3IgdGhlIG9yaWdpbmFsIHNvdXJjZSxcbiAqIGxpbmUsIGFuZCBjb2x1bW4gcHJvdmlkZWQuIElmIG5vIGNvbHVtbiBpcyBwcm92aWRlZCwgcmV0dXJucyBhbGwgbWFwcGluZ3NcbiAqIGNvcnJlc3BvbmRpbmcgdG8gYSBlaXRoZXIgdGhlIGxpbmUgd2UgYXJlIHNlYXJjaGluZyBmb3Igb3IgdGhlIG5leHRcbiAqIGNsb3Nlc3QgbGluZSB0aGF0IGhhcyBhbnkgbWFwcGluZ3MuIE90aGVyd2lzZSwgcmV0dXJucyBhbGwgbWFwcGluZ3NcbiAqIGNvcnJlc3BvbmRpbmcgdG8gdGhlIGdpdmVuIGxpbmUgYW5kIGVpdGhlciB0aGUgY29sdW1uIHdlIGFyZSBzZWFyY2hpbmcgZm9yXG4gKiBvciB0aGUgbmV4dCBjbG9zZXN0IGNvbHVtbiB0aGF0IGhhcyBhbnkgb2Zmc2V0cy5cbiAqXG4gKiBUaGUgb25seSBhcmd1bWVudCBpcyBhbiBvYmplY3Qgd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIHNvdXJjZTogVGhlIGZpbGVuYW1lIG9mIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gY29sdW1uOiBPcHRpb25hbC4gdGhlIGNvbHVtbiBudW1iZXIgaW4gdGhlIG9yaWdpbmFsIHNvdXJjZS5cbiAqXG4gKiBhbmQgYW4gYXJyYXkgb2Ygb2JqZWN0cyBpcyByZXR1cm5lZCwgZWFjaCB3aXRoIHRoZSBmb2xsb3dpbmcgcHJvcGVydGllczpcbiAqXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLCBvciBudWxsLlxuICogICAtIGNvbHVtbjogVGhlIGNvbHVtbiBudW1iZXIgaW4gdGhlIGdlbmVyYXRlZCBzb3VyY2UsIG9yIG51bGwuXG4gKi9cblNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5hbGxHZW5lcmF0ZWRQb3NpdGlvbnNGb3IgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBDb25zdW1lcl9hbGxHZW5lcmF0ZWRQb3NpdGlvbnNGb3IoYUFyZ3MpIHtcbiAgICB2YXIgbGluZSA9IHV0aWwuZ2V0QXJnKGFBcmdzLCAnbGluZScpO1xuXG4gICAgLy8gV2hlbiB0aGVyZSBpcyBubyBleGFjdCBtYXRjaCwgQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX2ZpbmRNYXBwaW5nXG4gICAgLy8gcmV0dXJucyB0aGUgaW5kZXggb2YgdGhlIGNsb3Nlc3QgbWFwcGluZyBsZXNzIHRoYW4gdGhlIG5lZWRsZS4gQnlcbiAgICAvLyBzZXR0aW5nIG5lZWRsZS5vcmlnaW5hbENvbHVtbiB0byAwLCB3ZSB0aHVzIGZpbmQgdGhlIGxhc3QgbWFwcGluZyBmb3JcbiAgICAvLyB0aGUgZ2l2ZW4gbGluZSwgcHJvdmlkZWQgc3VjaCBhIG1hcHBpbmcgZXhpc3RzLlxuICAgIHZhciBuZWVkbGUgPSB7XG4gICAgICBzb3VyY2U6IHV0aWwuZ2V0QXJnKGFBcmdzLCAnc291cmNlJyksXG4gICAgICBvcmlnaW5hbExpbmU6IGxpbmUsXG4gICAgICBvcmlnaW5hbENvbHVtbjogdXRpbC5nZXRBcmcoYUFyZ3MsICdjb2x1bW4nLCAwKVxuICAgIH07XG5cbiAgICBpZiAodGhpcy5zb3VyY2VSb290ICE9IG51bGwpIHtcbiAgICAgIG5lZWRsZS5zb3VyY2UgPSB1dGlsLnJlbGF0aXZlKHRoaXMuc291cmNlUm9vdCwgbmVlZGxlLnNvdXJjZSk7XG4gICAgfVxuICAgIGlmICghdGhpcy5fc291cmNlcy5oYXMobmVlZGxlLnNvdXJjZSkpIHtcbiAgICAgIHJldHVybiBbXTtcbiAgICB9XG4gICAgbmVlZGxlLnNvdXJjZSA9IHRoaXMuX3NvdXJjZXMuaW5kZXhPZihuZWVkbGUuc291cmNlKTtcblxuICAgIHZhciBtYXBwaW5ncyA9IFtdO1xuXG4gICAgdmFyIGluZGV4ID0gdGhpcy5fZmluZE1hcHBpbmcobmVlZGxlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX29yaWdpbmFsTWFwcGluZ3MsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJvcmlnaW5hbExpbmVcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIm9yaWdpbmFsQ29sdW1uXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXRpbC5jb21wYXJlQnlPcmlnaW5hbFBvc2l0aW9ucyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaW5hcnlTZWFyY2guTEVBU1RfVVBQRVJfQk9VTkQpO1xuICAgIGlmIChpbmRleCA+PSAwKSB7XG4gICAgICB2YXIgbWFwcGluZyA9IHRoaXMuX29yaWdpbmFsTWFwcGluZ3NbaW5kZXhdO1xuXG4gICAgICBpZiAoYUFyZ3MuY29sdW1uID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgdmFyIG9yaWdpbmFsTGluZSA9IG1hcHBpbmcub3JpZ2luYWxMaW5lO1xuXG4gICAgICAgIC8vIEl0ZXJhdGUgdW50aWwgZWl0aGVyIHdlIHJ1biBvdXQgb2YgbWFwcGluZ3MsIG9yIHdlIHJ1biBpbnRvXG4gICAgICAgIC8vIGEgbWFwcGluZyBmb3IgYSBkaWZmZXJlbnQgbGluZSB0aGFuIHRoZSBvbmUgd2UgZm91bmQuIFNpbmNlXG4gICAgICAgIC8vIG1hcHBpbmdzIGFyZSBzb3J0ZWQsIHRoaXMgaXMgZ3VhcmFudGVlZCB0byBmaW5kIGFsbCBtYXBwaW5ncyBmb3JcbiAgICAgICAgLy8gdGhlIGxpbmUgd2UgZm91bmQuXG4gICAgICAgIHdoaWxlIChtYXBwaW5nICYmIG1hcHBpbmcub3JpZ2luYWxMaW5lID09PSBvcmlnaW5hbExpbmUpIHtcbiAgICAgICAgICBtYXBwaW5ncy5wdXNoKHtcbiAgICAgICAgICAgIGxpbmU6IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdnZW5lcmF0ZWRMaW5lJywgbnVsbCksXG4gICAgICAgICAgICBjb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdnZW5lcmF0ZWRDb2x1bW4nLCBudWxsKSxcbiAgICAgICAgICAgIGxhc3RDb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdsYXN0R2VuZXJhdGVkQ29sdW1uJywgbnVsbClcbiAgICAgICAgICB9KTtcblxuICAgICAgICAgIG1hcHBpbmcgPSB0aGlzLl9vcmlnaW5hbE1hcHBpbmdzWysraW5kZXhdO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB2YXIgb3JpZ2luYWxDb2x1bW4gPSBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uO1xuXG4gICAgICAgIC8vIEl0ZXJhdGUgdW50aWwgZWl0aGVyIHdlIHJ1biBvdXQgb2YgbWFwcGluZ3MsIG9yIHdlIHJ1biBpbnRvXG4gICAgICAgIC8vIGEgbWFwcGluZyBmb3IgYSBkaWZmZXJlbnQgbGluZSB0aGFuIHRoZSBvbmUgd2Ugd2VyZSBzZWFyY2hpbmcgZm9yLlxuICAgICAgICAvLyBTaW5jZSBtYXBwaW5ncyBhcmUgc29ydGVkLCB0aGlzIGlzIGd1YXJhbnRlZWQgdG8gZmluZCBhbGwgbWFwcGluZ3MgZm9yXG4gICAgICAgIC8vIHRoZSBsaW5lIHdlIGFyZSBzZWFyY2hpbmcgZm9yLlxuICAgICAgICB3aGlsZSAobWFwcGluZyAmJlxuICAgICAgICAgICAgICAgbWFwcGluZy5vcmlnaW5hbExpbmUgPT09IGxpbmUgJiZcbiAgICAgICAgICAgICAgIG1hcHBpbmcub3JpZ2luYWxDb2x1bW4gPT0gb3JpZ2luYWxDb2x1bW4pIHtcbiAgICAgICAgICBtYXBwaW5ncy5wdXNoKHtcbiAgICAgICAgICAgIGxpbmU6IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdnZW5lcmF0ZWRMaW5lJywgbnVsbCksXG4gICAgICAgICAgICBjb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdnZW5lcmF0ZWRDb2x1bW4nLCBudWxsKSxcbiAgICAgICAgICAgIGxhc3RDb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdsYXN0R2VuZXJhdGVkQ29sdW1uJywgbnVsbClcbiAgICAgICAgICB9KTtcblxuICAgICAgICAgIG1hcHBpbmcgPSB0aGlzLl9vcmlnaW5hbE1hcHBpbmdzWysraW5kZXhdO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuXG4gICAgcmV0dXJuIG1hcHBpbmdzO1xuICB9O1xuXG5leHBvcnRzLlNvdXJjZU1hcENvbnN1bWVyID0gU291cmNlTWFwQ29uc3VtZXI7XG5cbi8qKlxuICogQSBCYXNpY1NvdXJjZU1hcENvbnN1bWVyIGluc3RhbmNlIHJlcHJlc2VudHMgYSBwYXJzZWQgc291cmNlIG1hcCB3aGljaCB3ZSBjYW5cbiAqIHF1ZXJ5IGZvciBpbmZvcm1hdGlvbiBhYm91dCB0aGUgb3JpZ2luYWwgZmlsZSBwb3NpdGlvbnMgYnkgZ2l2aW5nIGl0IGEgZmlsZVxuICogcG9zaXRpb24gaW4gdGhlIGdlbmVyYXRlZCBzb3VyY2UuXG4gKlxuICogVGhlIG9ubHkgcGFyYW1ldGVyIGlzIHRoZSByYXcgc291cmNlIG1hcCAoZWl0aGVyIGFzIGEgSlNPTiBzdHJpbmcsIG9yXG4gKiBhbHJlYWR5IHBhcnNlZCB0byBhbiBvYmplY3QpLiBBY2NvcmRpbmcgdG8gdGhlIHNwZWMsIHNvdXJjZSBtYXBzIGhhdmUgdGhlXG4gKiBmb2xsb3dpbmcgYXR0cmlidXRlczpcbiAqXG4gKiAgIC0gdmVyc2lvbjogV2hpY2ggdmVyc2lvbiBvZiB0aGUgc291cmNlIG1hcCBzcGVjIHRoaXMgbWFwIGlzIGZvbGxvd2luZy5cbiAqICAgLSBzb3VyY2VzOiBBbiBhcnJheSBvZiBVUkxzIHRvIHRoZSBvcmlnaW5hbCBzb3VyY2UgZmlsZXMuXG4gKiAgIC0gbmFtZXM6IEFuIGFycmF5IG9mIGlkZW50aWZpZXJzIHdoaWNoIGNhbiBiZSByZWZlcnJlbmNlZCBieSBpbmRpdmlkdWFsIG1hcHBpbmdzLlxuICogICAtIHNvdXJjZVJvb3Q6IE9wdGlvbmFsLiBUaGUgVVJMIHJvb3QgZnJvbSB3aGljaCBhbGwgc291cmNlcyBhcmUgcmVsYXRpdmUuXG4gKiAgIC0gc291cmNlc0NvbnRlbnQ6IE9wdGlvbmFsLiBBbiBhcnJheSBvZiBjb250ZW50cyBvZiB0aGUgb3JpZ2luYWwgc291cmNlIGZpbGVzLlxuICogICAtIG1hcHBpbmdzOiBBIHN0cmluZyBvZiBiYXNlNjQgVkxRcyB3aGljaCBjb250YWluIHRoZSBhY3R1YWwgbWFwcGluZ3MuXG4gKiAgIC0gZmlsZTogT3B0aW9uYWwuIFRoZSBnZW5lcmF0ZWQgZmlsZSB0aGlzIHNvdXJjZSBtYXAgaXMgYXNzb2NpYXRlZCB3aXRoLlxuICpcbiAqIEhlcmUgaXMgYW4gZXhhbXBsZSBzb3VyY2UgbWFwLCB0YWtlbiBmcm9tIHRoZSBzb3VyY2UgbWFwIHNwZWNbMF06XG4gKlxuICogICAgIHtcbiAqICAgICAgIHZlcnNpb24gOiAzLFxuICogICAgICAgZmlsZTogXCJvdXQuanNcIixcbiAqICAgICAgIHNvdXJjZVJvb3QgOiBcIlwiLFxuICogICAgICAgc291cmNlczogW1wiZm9vLmpzXCIsIFwiYmFyLmpzXCJdLFxuICogICAgICAgbmFtZXM6IFtcInNyY1wiLCBcIm1hcHNcIiwgXCJhcmVcIiwgXCJmdW5cIl0sXG4gKiAgICAgICBtYXBwaW5nczogXCJBQSxBQjs7QUJDREU7XCJcbiAqICAgICB9XG4gKlxuICogWzBdOiBodHRwczovL2RvY3MuZ29vZ2xlLmNvbS9kb2N1bWVudC9kLzFVMVJHQWVoUXdSeXBVVG92RjFLUmxwaU9GemUwYi1fMmdjNmZBSDBLWTBrL2VkaXQ/cGxpPTEjXG4gKi9cbmZ1bmN0aW9uIEJhc2ljU291cmNlTWFwQ29uc3VtZXIoYVNvdXJjZU1hcCkge1xuICB2YXIgc291cmNlTWFwID0gYVNvdXJjZU1hcDtcbiAgaWYgKHR5cGVvZiBhU291cmNlTWFwID09PSAnc3RyaW5nJykge1xuICAgIHNvdXJjZU1hcCA9IEpTT04ucGFyc2UoYVNvdXJjZU1hcC5yZXBsYWNlKC9eXFwpXFxdXFx9Jy8sICcnKSk7XG4gIH1cblxuICB2YXIgdmVyc2lvbiA9IHV0aWwuZ2V0QXJnKHNvdXJjZU1hcCwgJ3ZlcnNpb24nKTtcbiAgdmFyIHNvdXJjZXMgPSB1dGlsLmdldEFyZyhzb3VyY2VNYXAsICdzb3VyY2VzJyk7XG4gIC8vIFNhc3MgMy4zIGxlYXZlcyBvdXQgdGhlICduYW1lcycgYXJyYXksIHNvIHdlIGRldmlhdGUgZnJvbSB0aGUgc3BlYyAod2hpY2hcbiAgLy8gcmVxdWlyZXMgdGhlIGFycmF5KSB0byBwbGF5IG5pY2UgaGVyZS5cbiAgdmFyIG5hbWVzID0gdXRpbC5nZXRBcmcoc291cmNlTWFwLCAnbmFtZXMnLCBbXSk7XG4gIHZhciBzb3VyY2VSb290ID0gdXRpbC5nZXRBcmcoc291cmNlTWFwLCAnc291cmNlUm9vdCcsIG51bGwpO1xuICB2YXIgc291cmNlc0NvbnRlbnQgPSB1dGlsLmdldEFyZyhzb3VyY2VNYXAsICdzb3VyY2VzQ29udGVudCcsIG51bGwpO1xuICB2YXIgbWFwcGluZ3MgPSB1dGlsLmdldEFyZyhzb3VyY2VNYXAsICdtYXBwaW5ncycpO1xuICB2YXIgZmlsZSA9IHV0aWwuZ2V0QXJnKHNvdXJjZU1hcCwgJ2ZpbGUnLCBudWxsKTtcblxuICAvLyBPbmNlIGFnYWluLCBTYXNzIGRldmlhdGVzIGZyb20gdGhlIHNwZWMgYW5kIHN1cHBsaWVzIHRoZSB2ZXJzaW9uIGFzIGFcbiAgLy8gc3RyaW5nIHJhdGhlciB0aGFuIGEgbnVtYmVyLCBzbyB3ZSB1c2UgbG9vc2UgZXF1YWxpdHkgY2hlY2tpbmcgaGVyZS5cbiAgaWYgKHZlcnNpb24gIT0gdGhpcy5fdmVyc2lvbikge1xuICAgIHRocm93IG5ldyBFcnJvcignVW5zdXBwb3J0ZWQgdmVyc2lvbjogJyArIHZlcnNpb24pO1xuICB9XG5cbiAgc291cmNlcyA9IHNvdXJjZXNcbiAgICAubWFwKFN0cmluZylcbiAgICAvLyBTb21lIHNvdXJjZSBtYXBzIHByb2R1Y2UgcmVsYXRpdmUgc291cmNlIHBhdGhzIGxpa2UgXCIuL2Zvby5qc1wiIGluc3RlYWQgb2ZcbiAgICAvLyBcImZvby5qc1wiLiAgTm9ybWFsaXplIHRoZXNlIGZpcnN0IHNvIHRoYXQgZnV0dXJlIGNvbXBhcmlzb25zIHdpbGwgc3VjY2VlZC5cbiAgICAvLyBTZWUgYnVnemlsLmxhLzEwOTA3NjguXG4gICAgLm1hcCh1dGlsLm5vcm1hbGl6ZSlcbiAgICAvLyBBbHdheXMgZW5zdXJlIHRoYXQgYWJzb2x1dGUgc291cmNlcyBhcmUgaW50ZXJuYWxseSBzdG9yZWQgcmVsYXRpdmUgdG9cbiAgICAvLyB0aGUgc291cmNlIHJvb3QsIGlmIHRoZSBzb3VyY2Ugcm9vdCBpcyBhYnNvbHV0ZS4gTm90IGRvaW5nIHRoaXMgd291bGRcbiAgICAvLyBiZSBwYXJ0aWN1bGFybHkgcHJvYmxlbWF0aWMgd2hlbiB0aGUgc291cmNlIHJvb3QgaXMgYSBwcmVmaXggb2YgdGhlXG4gICAgLy8gc291cmNlICh2YWxpZCwgYnV0IHdoeT8/KS4gU2VlIGdpdGh1YiBpc3N1ZSAjMTk5IGFuZCBidWd6aWwubGEvMTE4ODk4Mi5cbiAgICAubWFwKGZ1bmN0aW9uIChzb3VyY2UpIHtcbiAgICAgIHJldHVybiBzb3VyY2VSb290ICYmIHV0aWwuaXNBYnNvbHV0ZShzb3VyY2VSb290KSAmJiB1dGlsLmlzQWJzb2x1dGUoc291cmNlKVxuICAgICAgICA/IHV0aWwucmVsYXRpdmUoc291cmNlUm9vdCwgc291cmNlKVxuICAgICAgICA6IHNvdXJjZTtcbiAgICB9KTtcblxuICAvLyBQYXNzIGB0cnVlYCBiZWxvdyB0byBhbGxvdyBkdXBsaWNhdGUgbmFtZXMgYW5kIHNvdXJjZXMuIFdoaWxlIHNvdXJjZSBtYXBzXG4gIC8vIGFyZSBpbnRlbmRlZCB0byBiZSBjb21wcmVzc2VkIGFuZCBkZWR1cGxpY2F0ZWQsIHRoZSBUeXBlU2NyaXB0IGNvbXBpbGVyXG4gIC8vIHNvbWV0aW1lcyBnZW5lcmF0ZXMgc291cmNlIG1hcHMgd2l0aCBkdXBsaWNhdGVzIGluIHRoZW0uIFNlZSBHaXRodWIgaXNzdWVcbiAgLy8gIzcyIGFuZCBidWd6aWwubGEvODg5NDkyLlxuICB0aGlzLl9uYW1lcyA9IEFycmF5U2V0LmZyb21BcnJheShuYW1lcy5tYXAoU3RyaW5nKSwgdHJ1ZSk7XG4gIHRoaXMuX3NvdXJjZXMgPSBBcnJheVNldC5mcm9tQXJyYXkoc291cmNlcywgdHJ1ZSk7XG5cbiAgdGhpcy5zb3VyY2VSb290ID0gc291cmNlUm9vdDtcbiAgdGhpcy5zb3VyY2VzQ29udGVudCA9IHNvdXJjZXNDb250ZW50O1xuICB0aGlzLl9tYXBwaW5ncyA9IG1hcHBpbmdzO1xuICB0aGlzLmZpbGUgPSBmaWxlO1xufVxuXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZSA9IE9iamVjdC5jcmVhdGUoU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlKTtcbkJhc2ljU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLmNvbnN1bWVyID0gU291cmNlTWFwQ29uc3VtZXI7XG5cbi8qKlxuICogQ3JlYXRlIGEgQmFzaWNTb3VyY2VNYXBDb25zdW1lciBmcm9tIGEgU291cmNlTWFwR2VuZXJhdG9yLlxuICpcbiAqIEBwYXJhbSBTb3VyY2VNYXBHZW5lcmF0b3IgYVNvdXJjZU1hcFxuICogICAgICAgIFRoZSBzb3VyY2UgbWFwIHRoYXQgd2lsbCBiZSBjb25zdW1lZC5cbiAqIEByZXR1cm5zIEJhc2ljU291cmNlTWFwQ29uc3VtZXJcbiAqL1xuQmFzaWNTb3VyY2VNYXBDb25zdW1lci5mcm9tU291cmNlTWFwID1cbiAgZnVuY3Rpb24gU291cmNlTWFwQ29uc3VtZXJfZnJvbVNvdXJjZU1hcChhU291cmNlTWFwKSB7XG4gICAgdmFyIHNtYyA9IE9iamVjdC5jcmVhdGUoQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUpO1xuXG4gICAgdmFyIG5hbWVzID0gc21jLl9uYW1lcyA9IEFycmF5U2V0LmZyb21BcnJheShhU291cmNlTWFwLl9uYW1lcy50b0FycmF5KCksIHRydWUpO1xuICAgIHZhciBzb3VyY2VzID0gc21jLl9zb3VyY2VzID0gQXJyYXlTZXQuZnJvbUFycmF5KGFTb3VyY2VNYXAuX3NvdXJjZXMudG9BcnJheSgpLCB0cnVlKTtcbiAgICBzbWMuc291cmNlUm9vdCA9IGFTb3VyY2VNYXAuX3NvdXJjZVJvb3Q7XG4gICAgc21jLnNvdXJjZXNDb250ZW50ID0gYVNvdXJjZU1hcC5fZ2VuZXJhdGVTb3VyY2VzQ29udGVudChzbWMuX3NvdXJjZXMudG9BcnJheSgpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc21jLnNvdXJjZVJvb3QpO1xuICAgIHNtYy5maWxlID0gYVNvdXJjZU1hcC5fZmlsZTtcblxuICAgIC8vIEJlY2F1c2Ugd2UgYXJlIG1vZGlmeWluZyB0aGUgZW50cmllcyAoYnkgY29udmVydGluZyBzdHJpbmcgc291cmNlcyBhbmRcbiAgICAvLyBuYW1lcyB0byBpbmRpY2VzIGludG8gdGhlIHNvdXJjZXMgYW5kIG5hbWVzIEFycmF5U2V0cyksIHdlIGhhdmUgdG8gbWFrZVxuICAgIC8vIGEgY29weSBvZiB0aGUgZW50cnkgb3IgZWxzZSBiYWQgdGhpbmdzIGhhcHBlbi4gU2hhcmVkIG11dGFibGUgc3RhdGVcbiAgICAvLyBzdHJpa2VzIGFnYWluISBTZWUgZ2l0aHViIGlzc3VlICMxOTEuXG5cbiAgICB2YXIgZ2VuZXJhdGVkTWFwcGluZ3MgPSBhU291cmNlTWFwLl9tYXBwaW5ncy50b0FycmF5KCkuc2xpY2UoKTtcbiAgICB2YXIgZGVzdEdlbmVyYXRlZE1hcHBpbmdzID0gc21jLl9fZ2VuZXJhdGVkTWFwcGluZ3MgPSBbXTtcbiAgICB2YXIgZGVzdE9yaWdpbmFsTWFwcGluZ3MgPSBzbWMuX19vcmlnaW5hbE1hcHBpbmdzID0gW107XG5cbiAgICBmb3IgKHZhciBpID0gMCwgbGVuZ3RoID0gZ2VuZXJhdGVkTWFwcGluZ3MubGVuZ3RoOyBpIDwgbGVuZ3RoOyBpKyspIHtcbiAgICAgIHZhciBzcmNNYXBwaW5nID0gZ2VuZXJhdGVkTWFwcGluZ3NbaV07XG4gICAgICB2YXIgZGVzdE1hcHBpbmcgPSBuZXcgTWFwcGluZztcbiAgICAgIGRlc3RNYXBwaW5nLmdlbmVyYXRlZExpbmUgPSBzcmNNYXBwaW5nLmdlbmVyYXRlZExpbmU7XG4gICAgICBkZXN0TWFwcGluZy5nZW5lcmF0ZWRDb2x1bW4gPSBzcmNNYXBwaW5nLmdlbmVyYXRlZENvbHVtbjtcblxuICAgICAgaWYgKHNyY01hcHBpbmcuc291cmNlKSB7XG4gICAgICAgIGRlc3RNYXBwaW5nLnNvdXJjZSA9IHNvdXJjZXMuaW5kZXhPZihzcmNNYXBwaW5nLnNvdXJjZSk7XG4gICAgICAgIGRlc3RNYXBwaW5nLm9yaWdpbmFsTGluZSA9IHNyY01hcHBpbmcub3JpZ2luYWxMaW5lO1xuICAgICAgICBkZXN0TWFwcGluZy5vcmlnaW5hbENvbHVtbiA9IHNyY01hcHBpbmcub3JpZ2luYWxDb2x1bW47XG5cbiAgICAgICAgaWYgKHNyY01hcHBpbmcubmFtZSkge1xuICAgICAgICAgIGRlc3RNYXBwaW5nLm5hbWUgPSBuYW1lcy5pbmRleE9mKHNyY01hcHBpbmcubmFtZSk7XG4gICAgICAgIH1cblxuICAgICAgICBkZXN0T3JpZ2luYWxNYXBwaW5ncy5wdXNoKGRlc3RNYXBwaW5nKTtcbiAgICAgIH1cblxuICAgICAgZGVzdEdlbmVyYXRlZE1hcHBpbmdzLnB1c2goZGVzdE1hcHBpbmcpO1xuICAgIH1cblxuICAgIHF1aWNrU29ydChzbWMuX19vcmlnaW5hbE1hcHBpbmdzLCB1dGlsLmNvbXBhcmVCeU9yaWdpbmFsUG9zaXRpb25zKTtcblxuICAgIHJldHVybiBzbWM7XG4gIH07XG5cbi8qKlxuICogVGhlIHZlcnNpb24gb2YgdGhlIHNvdXJjZSBtYXBwaW5nIHNwZWMgdGhhdCB3ZSBhcmUgY29uc3VtaW5nLlxuICovXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fdmVyc2lvbiA9IDM7XG5cbi8qKlxuICogVGhlIGxpc3Qgb2Ygb3JpZ2luYWwgc291cmNlcy5cbiAqL1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KEJhc2ljU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLCAnc291cmNlcycsIHtcbiAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgcmV0dXJuIHRoaXMuX3NvdXJjZXMudG9BcnJheSgpLm1hcChmdW5jdGlvbiAocykge1xuICAgICAgcmV0dXJuIHRoaXMuc291cmNlUm9vdCAhPSBudWxsID8gdXRpbC5qb2luKHRoaXMuc291cmNlUm9vdCwgcykgOiBzO1xuICAgIH0sIHRoaXMpO1xuICB9XG59KTtcblxuLyoqXG4gKiBQcm92aWRlIHRoZSBKSVQgd2l0aCBhIG5pY2Ugc2hhcGUgLyBoaWRkZW4gY2xhc3MuXG4gKi9cbmZ1bmN0aW9uIE1hcHBpbmcoKSB7XG4gIHRoaXMuZ2VuZXJhdGVkTGluZSA9IDA7XG4gIHRoaXMuZ2VuZXJhdGVkQ29sdW1uID0gMDtcbiAgdGhpcy5zb3VyY2UgPSBudWxsO1xuICB0aGlzLm9yaWdpbmFsTGluZSA9IG51bGw7XG4gIHRoaXMub3JpZ2luYWxDb2x1bW4gPSBudWxsO1xuICB0aGlzLm5hbWUgPSBudWxsO1xufVxuXG4vKipcbiAqIFBhcnNlIHRoZSBtYXBwaW5ncyBpbiBhIHN0cmluZyBpbiB0byBhIGRhdGEgc3RydWN0dXJlIHdoaWNoIHdlIGNhbiBlYXNpbHlcbiAqIHF1ZXJ5ICh0aGUgb3JkZXJlZCBhcnJheXMgaW4gdGhlIGB0aGlzLl9fZ2VuZXJhdGVkTWFwcGluZ3NgIGFuZFxuICogYHRoaXMuX19vcmlnaW5hbE1hcHBpbmdzYCBwcm9wZXJ0aWVzKS5cbiAqL1xuQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX3BhcnNlTWFwcGluZ3MgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBDb25zdW1lcl9wYXJzZU1hcHBpbmdzKGFTdHIsIGFTb3VyY2VSb290KSB7XG4gICAgdmFyIGdlbmVyYXRlZExpbmUgPSAxO1xuICAgIHZhciBwcmV2aW91c0dlbmVyYXRlZENvbHVtbiA9IDA7XG4gICAgdmFyIHByZXZpb3VzT3JpZ2luYWxMaW5lID0gMDtcbiAgICB2YXIgcHJldmlvdXNPcmlnaW5hbENvbHVtbiA9IDA7XG4gICAgdmFyIHByZXZpb3VzU291cmNlID0gMDtcbiAgICB2YXIgcHJldmlvdXNOYW1lID0gMDtcbiAgICB2YXIgbGVuZ3RoID0gYVN0ci5sZW5ndGg7XG4gICAgdmFyIGluZGV4ID0gMDtcbiAgICB2YXIgY2FjaGVkU2VnbWVudHMgPSB7fTtcbiAgICB2YXIgdGVtcCA9IHt9O1xuICAgIHZhciBvcmlnaW5hbE1hcHBpbmdzID0gW107XG4gICAgdmFyIGdlbmVyYXRlZE1hcHBpbmdzID0gW107XG4gICAgdmFyIG1hcHBpbmcsIHN0ciwgc2VnbWVudCwgZW5kLCB2YWx1ZTtcblxuICAgIHdoaWxlIChpbmRleCA8IGxlbmd0aCkge1xuICAgICAgaWYgKGFTdHIuY2hhckF0KGluZGV4KSA9PT0gJzsnKSB7XG4gICAgICAgIGdlbmVyYXRlZExpbmUrKztcbiAgICAgICAgaW5kZXgrKztcbiAgICAgICAgcHJldmlvdXNHZW5lcmF0ZWRDb2x1bW4gPSAwO1xuICAgICAgfVxuICAgICAgZWxzZSBpZiAoYVN0ci5jaGFyQXQoaW5kZXgpID09PSAnLCcpIHtcbiAgICAgICAgaW5kZXgrKztcbiAgICAgIH1cbiAgICAgIGVsc2Uge1xuICAgICAgICBtYXBwaW5nID0gbmV3IE1hcHBpbmcoKTtcbiAgICAgICAgbWFwcGluZy5nZW5lcmF0ZWRMaW5lID0gZ2VuZXJhdGVkTGluZTtcblxuICAgICAgICAvLyBCZWNhdXNlIGVhY2ggb2Zmc2V0IGlzIGVuY29kZWQgcmVsYXRpdmUgdG8gdGhlIHByZXZpb3VzIG9uZSxcbiAgICAgICAgLy8gbWFueSBzZWdtZW50cyBvZnRlbiBoYXZlIHRoZSBzYW1lIGVuY29kaW5nLiBXZSBjYW4gZXhwbG9pdCB0aGlzXG4gICAgICAgIC8vIGZhY3QgYnkgY2FjaGluZyB0aGUgcGFyc2VkIHZhcmlhYmxlIGxlbmd0aCBmaWVsZHMgb2YgZWFjaCBzZWdtZW50LFxuICAgICAgICAvLyBhbGxvd2luZyB1cyB0byBhdm9pZCBhIHNlY29uZCBwYXJzZSBpZiB3ZSBlbmNvdW50ZXIgdGhlIHNhbWVcbiAgICAgICAgLy8gc2VnbWVudCBhZ2Fpbi5cbiAgICAgICAgZm9yIChlbmQgPSBpbmRleDsgZW5kIDwgbGVuZ3RoOyBlbmQrKykge1xuICAgICAgICAgIGlmICh0aGlzLl9jaGFySXNNYXBwaW5nU2VwYXJhdG9yKGFTdHIsIGVuZCkpIHtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBzdHIgPSBhU3RyLnNsaWNlKGluZGV4LCBlbmQpO1xuXG4gICAgICAgIHNlZ21lbnQgPSBjYWNoZWRTZWdtZW50c1tzdHJdO1xuICAgICAgICBpZiAoc2VnbWVudCkge1xuICAgICAgICAgIGluZGV4ICs9IHN0ci5sZW5ndGg7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgc2VnbWVudCA9IFtdO1xuICAgICAgICAgIHdoaWxlIChpbmRleCA8IGVuZCkge1xuICAgICAgICAgICAgYmFzZTY0VkxRLmRlY29kZShhU3RyLCBpbmRleCwgdGVtcCk7XG4gICAgICAgICAgICB2YWx1ZSA9IHRlbXAudmFsdWU7XG4gICAgICAgICAgICBpbmRleCA9IHRlbXAucmVzdDtcbiAgICAgICAgICAgIHNlZ21lbnQucHVzaCh2YWx1ZSk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKHNlZ21lbnQubGVuZ3RoID09PSAyKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0ZvdW5kIGEgc291cmNlLCBidXQgbm8gbGluZSBhbmQgY29sdW1uJyk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKHNlZ21lbnQubGVuZ3RoID09PSAzKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0ZvdW5kIGEgc291cmNlIGFuZCBsaW5lLCBidXQgbm8gY29sdW1uJyk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY2FjaGVkU2VnbWVudHNbc3RyXSA9IHNlZ21lbnQ7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBHZW5lcmF0ZWQgY29sdW1uLlxuICAgICAgICBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbiA9IHByZXZpb3VzR2VuZXJhdGVkQ29sdW1uICsgc2VnbWVudFswXTtcbiAgICAgICAgcHJldmlvdXNHZW5lcmF0ZWRDb2x1bW4gPSBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbjtcblxuICAgICAgICBpZiAoc2VnbWVudC5sZW5ndGggPiAxKSB7XG4gICAgICAgICAgLy8gT3JpZ2luYWwgc291cmNlLlxuICAgICAgICAgIG1hcHBpbmcuc291cmNlID0gcHJldmlvdXNTb3VyY2UgKyBzZWdtZW50WzFdO1xuICAgICAgICAgIHByZXZpb3VzU291cmNlICs9IHNlZ21lbnRbMV07XG5cbiAgICAgICAgICAvLyBPcmlnaW5hbCBsaW5lLlxuICAgICAgICAgIG1hcHBpbmcub3JpZ2luYWxMaW5lID0gcHJldmlvdXNPcmlnaW5hbExpbmUgKyBzZWdtZW50WzJdO1xuICAgICAgICAgIHByZXZpb3VzT3JpZ2luYWxMaW5lID0gbWFwcGluZy5vcmlnaW5hbExpbmU7XG4gICAgICAgICAgLy8gTGluZXMgYXJlIHN0b3JlZCAwLWJhc2VkXG4gICAgICAgICAgbWFwcGluZy5vcmlnaW5hbExpbmUgKz0gMTtcblxuICAgICAgICAgIC8vIE9yaWdpbmFsIGNvbHVtbi5cbiAgICAgICAgICBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uID0gcHJldmlvdXNPcmlnaW5hbENvbHVtbiArIHNlZ21lbnRbM107XG4gICAgICAgICAgcHJldmlvdXNPcmlnaW5hbENvbHVtbiA9IG1hcHBpbmcub3JpZ2luYWxDb2x1bW47XG5cbiAgICAgICAgICBpZiAoc2VnbWVudC5sZW5ndGggPiA0KSB7XG4gICAgICAgICAgICAvLyBPcmlnaW5hbCBuYW1lLlxuICAgICAgICAgICAgbWFwcGluZy5uYW1lID0gcHJldmlvdXNOYW1lICsgc2VnbWVudFs0XTtcbiAgICAgICAgICAgIHByZXZpb3VzTmFtZSArPSBzZWdtZW50WzRdO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGdlbmVyYXRlZE1hcHBpbmdzLnB1c2gobWFwcGluZyk7XG4gICAgICAgIGlmICh0eXBlb2YgbWFwcGluZy5vcmlnaW5hbExpbmUgPT09ICdudW1iZXInKSB7XG4gICAgICAgICAgb3JpZ2luYWxNYXBwaW5ncy5wdXNoKG1hcHBpbmcpO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuXG4gICAgcXVpY2tTb3J0KGdlbmVyYXRlZE1hcHBpbmdzLCB1dGlsLmNvbXBhcmVCeUdlbmVyYXRlZFBvc2l0aW9uc0RlZmxhdGVkKTtcbiAgICB0aGlzLl9fZ2VuZXJhdGVkTWFwcGluZ3MgPSBnZW5lcmF0ZWRNYXBwaW5ncztcblxuICAgIHF1aWNrU29ydChvcmlnaW5hbE1hcHBpbmdzLCB1dGlsLmNvbXBhcmVCeU9yaWdpbmFsUG9zaXRpb25zKTtcbiAgICB0aGlzLl9fb3JpZ2luYWxNYXBwaW5ncyA9IG9yaWdpbmFsTWFwcGluZ3M7XG4gIH07XG5cbi8qKlxuICogRmluZCB0aGUgbWFwcGluZyB0aGF0IGJlc3QgbWF0Y2hlcyB0aGUgaHlwb3RoZXRpY2FsIFwibmVlZGxlXCIgbWFwcGluZyB0aGF0XG4gKiB3ZSBhcmUgc2VhcmNoaW5nIGZvciBpbiB0aGUgZ2l2ZW4gXCJoYXlzdGFja1wiIG9mIG1hcHBpbmdzLlxuICovXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fZmluZE1hcHBpbmcgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBDb25zdW1lcl9maW5kTWFwcGluZyhhTmVlZGxlLCBhTWFwcGluZ3MsIGFMaW5lTmFtZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYUNvbHVtbk5hbWUsIGFDb21wYXJhdG9yLCBhQmlhcykge1xuICAgIC8vIFRvIHJldHVybiB0aGUgcG9zaXRpb24gd2UgYXJlIHNlYXJjaGluZyBmb3IsIHdlIG11c3QgZmlyc3QgZmluZCB0aGVcbiAgICAvLyBtYXBwaW5nIGZvciB0aGUgZ2l2ZW4gcG9zaXRpb24gYW5kIHRoZW4gcmV0dXJuIHRoZSBvcHBvc2l0ZSBwb3NpdGlvbiBpdFxuICAgIC8vIHBvaW50cyB0by4gQmVjYXVzZSB0aGUgbWFwcGluZ3MgYXJlIHNvcnRlZCwgd2UgY2FuIHVzZSBiaW5hcnkgc2VhcmNoIHRvXG4gICAgLy8gZmluZCB0aGUgYmVzdCBtYXBwaW5nLlxuXG4gICAgaWYgKGFOZWVkbGVbYUxpbmVOYW1lXSA8PSAwKSB7XG4gICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCdMaW5lIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvIDEsIGdvdCAnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICsgYU5lZWRsZVthTGluZU5hbWVdKTtcbiAgICB9XG4gICAgaWYgKGFOZWVkbGVbYUNvbHVtbk5hbWVdIDwgMCkge1xuICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcignQ29sdW1uIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvIDAsIGdvdCAnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICsgYU5lZWRsZVthQ29sdW1uTmFtZV0pO1xuICAgIH1cblxuICAgIHJldHVybiBiaW5hcnlTZWFyY2guc2VhcmNoKGFOZWVkbGUsIGFNYXBwaW5ncywgYUNvbXBhcmF0b3IsIGFCaWFzKTtcbiAgfTtcblxuLyoqXG4gKiBDb21wdXRlIHRoZSBsYXN0IGNvbHVtbiBmb3IgZWFjaCBnZW5lcmF0ZWQgbWFwcGluZy4gVGhlIGxhc3QgY29sdW1uIGlzXG4gKiBpbmNsdXNpdmUuXG4gKi9cbkJhc2ljU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLmNvbXB1dGVDb2x1bW5TcGFucyA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyX2NvbXB1dGVDb2x1bW5TcGFucygpIHtcbiAgICBmb3IgKHZhciBpbmRleCA9IDA7IGluZGV4IDwgdGhpcy5fZ2VuZXJhdGVkTWFwcGluZ3MubGVuZ3RoOyArK2luZGV4KSB7XG4gICAgICB2YXIgbWFwcGluZyA9IHRoaXMuX2dlbmVyYXRlZE1hcHBpbmdzW2luZGV4XTtcblxuICAgICAgLy8gTWFwcGluZ3MgZG8gbm90IGNvbnRhaW4gYSBmaWVsZCBmb3IgdGhlIGxhc3QgZ2VuZXJhdGVkIGNvbHVtbnQuIFdlXG4gICAgICAvLyBjYW4gY29tZSB1cCB3aXRoIGFuIG9wdGltaXN0aWMgZXN0aW1hdGUsIGhvd2V2ZXIsIGJ5IGFzc3VtaW5nIHRoYXRcbiAgICAgIC8vIG1hcHBpbmdzIGFyZSBjb250aWd1b3VzIChpLmUuIGdpdmVuIHR3byBjb25zZWN1dGl2ZSBtYXBwaW5ncywgdGhlXG4gICAgICAvLyBmaXJzdCBtYXBwaW5nIGVuZHMgd2hlcmUgdGhlIHNlY29uZCBvbmUgc3RhcnRzKS5cbiAgICAgIGlmIChpbmRleCArIDEgPCB0aGlzLl9nZW5lcmF0ZWRNYXBwaW5ncy5sZW5ndGgpIHtcbiAgICAgICAgdmFyIG5leHRNYXBwaW5nID0gdGhpcy5fZ2VuZXJhdGVkTWFwcGluZ3NbaW5kZXggKyAxXTtcblxuICAgICAgICBpZiAobWFwcGluZy5nZW5lcmF0ZWRMaW5lID09PSBuZXh0TWFwcGluZy5nZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgICAgbWFwcGluZy5sYXN0R2VuZXJhdGVkQ29sdW1uID0gbmV4dE1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uIC0gMTtcbiAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICAvLyBUaGUgbGFzdCBtYXBwaW5nIGZvciBlYWNoIGxpbmUgc3BhbnMgdGhlIGVudGlyZSBsaW5lLlxuICAgICAgbWFwcGluZy5sYXN0R2VuZXJhdGVkQ29sdW1uID0gSW5maW5pdHk7XG4gICAgfVxuICB9O1xuXG4vKipcbiAqIFJldHVybnMgdGhlIG9yaWdpbmFsIHNvdXJjZSwgbGluZSwgYW5kIGNvbHVtbiBpbmZvcm1hdGlvbiBmb3IgdGhlIGdlbmVyYXRlZFxuICogc291cmNlJ3MgbGluZSBhbmQgY29sdW1uIHBvc2l0aW9ucyBwcm92aWRlZC4gVGhlIG9ubHkgYXJndW1lbnQgaXMgYW4gb2JqZWN0XG4gKiB3aXRoIHRoZSBmb2xsb3dpbmcgcHJvcGVydGllczpcbiAqXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLlxuICogICAtIGNvbHVtbjogVGhlIGNvbHVtbiBudW1iZXIgaW4gdGhlIGdlbmVyYXRlZCBzb3VyY2UuXG4gKiAgIC0gYmlhczogRWl0aGVyICdTb3VyY2VNYXBDb25zdW1lci5HUkVBVEVTVF9MT1dFUl9CT1VORCcgb3JcbiAqICAgICAnU291cmNlTWFwQ29uc3VtZXIuTEVBU1RfVVBQRVJfQk9VTkQnLiBTcGVjaWZpZXMgd2hldGhlciB0byByZXR1cm4gdGhlXG4gKiAgICAgY2xvc2VzdCBlbGVtZW50IHRoYXQgaXMgc21hbGxlciB0aGFuIG9yIGdyZWF0ZXIgdGhhbiB0aGUgb25lIHdlIGFyZVxuICogICAgIHNlYXJjaGluZyBmb3IsIHJlc3BlY3RpdmVseSwgaWYgdGhlIGV4YWN0IGVsZW1lbnQgY2Fubm90IGJlIGZvdW5kLlxuICogICAgIERlZmF1bHRzIHRvICdTb3VyY2VNYXBDb25zdW1lci5HUkVBVEVTVF9MT1dFUl9CT1VORCcuXG4gKlxuICogYW5kIGFuIG9iamVjdCBpcyByZXR1cm5lZCB3aXRoIHRoZSBmb2xsb3dpbmcgcHJvcGVydGllczpcbiAqXG4gKiAgIC0gc291cmNlOiBUaGUgb3JpZ2luYWwgc291cmNlIGZpbGUsIG9yIG51bGwuXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UsIG9yIG51bGwuXG4gKiAgIC0gY29sdW1uOiBUaGUgY29sdW1uIG51bWJlciBpbiB0aGUgb3JpZ2luYWwgc291cmNlLCBvciBudWxsLlxuICogICAtIG5hbWU6IFRoZSBvcmlnaW5hbCBpZGVudGlmaWVyLCBvciBudWxsLlxuICovXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5vcmlnaW5hbFBvc2l0aW9uRm9yID1cbiAgZnVuY3Rpb24gU291cmNlTWFwQ29uc3VtZXJfb3JpZ2luYWxQb3NpdGlvbkZvcihhQXJncykge1xuICAgIHZhciBuZWVkbGUgPSB7XG4gICAgICBnZW5lcmF0ZWRMaW5lOiB1dGlsLmdldEFyZyhhQXJncywgJ2xpbmUnKSxcbiAgICAgIGdlbmVyYXRlZENvbHVtbjogdXRpbC5nZXRBcmcoYUFyZ3MsICdjb2x1bW4nKVxuICAgIH07XG5cbiAgICB2YXIgaW5kZXggPSB0aGlzLl9maW5kTWFwcGluZyhcbiAgICAgIG5lZWRsZSxcbiAgICAgIHRoaXMuX2dlbmVyYXRlZE1hcHBpbmdzLFxuICAgICAgXCJnZW5lcmF0ZWRMaW5lXCIsXG4gICAgICBcImdlbmVyYXRlZENvbHVtblwiLFxuICAgICAgdXRpbC5jb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNEZWZsYXRlZCxcbiAgICAgIHV0aWwuZ2V0QXJnKGFBcmdzLCAnYmlhcycsIFNvdXJjZU1hcENvbnN1bWVyLkdSRUFURVNUX0xPV0VSX0JPVU5EKVxuICAgICk7XG5cbiAgICBpZiAoaW5kZXggPj0gMCkge1xuICAgICAgdmFyIG1hcHBpbmcgPSB0aGlzLl9nZW5lcmF0ZWRNYXBwaW5nc1tpbmRleF07XG5cbiAgICAgIGlmIChtYXBwaW5nLmdlbmVyYXRlZExpbmUgPT09IG5lZWRsZS5nZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgIHZhciBzb3VyY2UgPSB1dGlsLmdldEFyZyhtYXBwaW5nLCAnc291cmNlJywgbnVsbCk7XG4gICAgICAgIGlmIChzb3VyY2UgIT09IG51bGwpIHtcbiAgICAgICAgICBzb3VyY2UgPSB0aGlzLl9zb3VyY2VzLmF0KHNvdXJjZSk7XG4gICAgICAgICAgaWYgKHRoaXMuc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICAgICAgICBzb3VyY2UgPSB1dGlsLmpvaW4odGhpcy5zb3VyY2VSb290LCBzb3VyY2UpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICB2YXIgbmFtZSA9IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICduYW1lJywgbnVsbCk7XG4gICAgICAgIGlmIChuYW1lICE9PSBudWxsKSB7XG4gICAgICAgICAgbmFtZSA9IHRoaXMuX25hbWVzLmF0KG5hbWUpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgc291cmNlOiBzb3VyY2UsXG4gICAgICAgICAgbGluZTogdXRpbC5nZXRBcmcobWFwcGluZywgJ29yaWdpbmFsTGluZScsIG51bGwpLFxuICAgICAgICAgIGNvbHVtbjogdXRpbC5nZXRBcmcobWFwcGluZywgJ29yaWdpbmFsQ29sdW1uJywgbnVsbCksXG4gICAgICAgICAgbmFtZTogbmFtZVxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiB7XG4gICAgICBzb3VyY2U6IG51bGwsXG4gICAgICBsaW5lOiBudWxsLFxuICAgICAgY29sdW1uOiBudWxsLFxuICAgICAgbmFtZTogbnVsbFxuICAgIH07XG4gIH07XG5cbi8qKlxuICogUmV0dXJuIHRydWUgaWYgd2UgaGF2ZSB0aGUgc291cmNlIGNvbnRlbnQgZm9yIGV2ZXJ5IHNvdXJjZSBpbiB0aGUgc291cmNlXG4gKiBtYXAsIGZhbHNlIG90aGVyd2lzZS5cbiAqL1xuQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuaGFzQ29udGVudHNPZkFsbFNvdXJjZXMgPVxuICBmdW5jdGlvbiBCYXNpY1NvdXJjZU1hcENvbnN1bWVyX2hhc0NvbnRlbnRzT2ZBbGxTb3VyY2VzKCkge1xuICAgIGlmICghdGhpcy5zb3VyY2VzQ29udGVudCkge1xuICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cbiAgICByZXR1cm4gdGhpcy5zb3VyY2VzQ29udGVudC5sZW5ndGggPj0gdGhpcy5fc291cmNlcy5zaXplKCkgJiZcbiAgICAgICF0aGlzLnNvdXJjZXNDb250ZW50LnNvbWUoZnVuY3Rpb24gKHNjKSB7IHJldHVybiBzYyA9PSBudWxsOyB9KTtcbiAgfTtcblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBvcmlnaW5hbCBzb3VyY2UgY29udGVudC4gVGhlIG9ubHkgYXJndW1lbnQgaXMgdGhlIHVybCBvZiB0aGVcbiAqIG9yaWdpbmFsIHNvdXJjZSBmaWxlLiBSZXR1cm5zIG51bGwgaWYgbm8gb3JpZ2luYWwgc291cmNlIGNvbnRlbnQgaXNcbiAqIGF2YWlsYWJsZS5cbiAqL1xuQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuc291cmNlQ29udGVudEZvciA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyX3NvdXJjZUNvbnRlbnRGb3IoYVNvdXJjZSwgbnVsbE9uTWlzc2luZykge1xuICAgIGlmICghdGhpcy5zb3VyY2VzQ29udGVudCkge1xuICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuXG4gICAgaWYgKHRoaXMuc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICBhU291cmNlID0gdXRpbC5yZWxhdGl2ZSh0aGlzLnNvdXJjZVJvb3QsIGFTb3VyY2UpO1xuICAgIH1cblxuICAgIGlmICh0aGlzLl9zb3VyY2VzLmhhcyhhU291cmNlKSkge1xuICAgICAgcmV0dXJuIHRoaXMuc291cmNlc0NvbnRlbnRbdGhpcy5fc291cmNlcy5pbmRleE9mKGFTb3VyY2UpXTtcbiAgICB9XG5cbiAgICB2YXIgdXJsO1xuICAgIGlmICh0aGlzLnNvdXJjZVJvb3QgIT0gbnVsbFxuICAgICAgICAmJiAodXJsID0gdXRpbC51cmxQYXJzZSh0aGlzLnNvdXJjZVJvb3QpKSkge1xuICAgICAgLy8gWFhYOiBmaWxlOi8vIFVSSXMgYW5kIGFic29sdXRlIHBhdGhzIGxlYWQgdG8gdW5leHBlY3RlZCBiZWhhdmlvciBmb3JcbiAgICAgIC8vIG1hbnkgdXNlcnMuIFdlIGNhbiBoZWxwIHRoZW0gb3V0IHdoZW4gdGhleSBleHBlY3QgZmlsZTovLyBVUklzIHRvXG4gICAgICAvLyBiZWhhdmUgbGlrZSBpdCB3b3VsZCBpZiB0aGV5IHdlcmUgcnVubmluZyBhIGxvY2FsIEhUVFAgc2VydmVyLiBTZWVcbiAgICAgIC8vIGh0dHBzOi8vYnVnemlsbGEubW96aWxsYS5vcmcvc2hvd19idWcuY2dpP2lkPTg4NTU5Ny5cbiAgICAgIHZhciBmaWxlVXJpQWJzUGF0aCA9IGFTb3VyY2UucmVwbGFjZSgvXmZpbGU6XFwvXFwvLywgXCJcIik7XG4gICAgICBpZiAodXJsLnNjaGVtZSA9PSBcImZpbGVcIlxuICAgICAgICAgICYmIHRoaXMuX3NvdXJjZXMuaGFzKGZpbGVVcmlBYnNQYXRoKSkge1xuICAgICAgICByZXR1cm4gdGhpcy5zb3VyY2VzQ29udGVudFt0aGlzLl9zb3VyY2VzLmluZGV4T2YoZmlsZVVyaUFic1BhdGgpXVxuICAgICAgfVxuXG4gICAgICBpZiAoKCF1cmwucGF0aCB8fCB1cmwucGF0aCA9PSBcIi9cIilcbiAgICAgICAgICAmJiB0aGlzLl9zb3VyY2VzLmhhcyhcIi9cIiArIGFTb3VyY2UpKSB7XG4gICAgICAgIHJldHVybiB0aGlzLnNvdXJjZXNDb250ZW50W3RoaXMuX3NvdXJjZXMuaW5kZXhPZihcIi9cIiArIGFTb3VyY2UpXTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICAvLyBUaGlzIGZ1bmN0aW9uIGlzIHVzZWQgcmVjdXJzaXZlbHkgZnJvbVxuICAgIC8vIEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuc291cmNlQ29udGVudEZvci4gSW4gdGhhdCBjYXNlLCB3ZVxuICAgIC8vIGRvbid0IHdhbnQgdG8gdGhyb3cgaWYgd2UgY2FuJ3QgZmluZCB0aGUgc291cmNlIC0gd2UganVzdCB3YW50IHRvXG4gICAgLy8gcmV0dXJuIG51bGwsIHNvIHdlIHByb3ZpZGUgYSBmbGFnIHRvIGV4aXQgZ3JhY2VmdWxseS5cbiAgICBpZiAobnVsbE9uTWlzc2luZykge1xuICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuICAgIGVsc2Uge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKCdcIicgKyBhU291cmNlICsgJ1wiIGlzIG5vdCBpbiB0aGUgU291cmNlTWFwLicpO1xuICAgIH1cbiAgfTtcblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBnZW5lcmF0ZWQgbGluZSBhbmQgY29sdW1uIGluZm9ybWF0aW9uIGZvciB0aGUgb3JpZ2luYWwgc291cmNlLFxuICogbGluZSwgYW5kIGNvbHVtbiBwb3NpdGlvbnMgcHJvdmlkZWQuIFRoZSBvbmx5IGFyZ3VtZW50IGlzIGFuIG9iamVjdCB3aXRoXG4gKiB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIHNvdXJjZTogVGhlIGZpbGVuYW1lIG9mIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gY29sdW1uOiBUaGUgY29sdW1uIG51bWJlciBpbiB0aGUgb3JpZ2luYWwgc291cmNlLlxuICogICAtIGJpYXM6IEVpdGhlciAnU291cmNlTWFwQ29uc3VtZXIuR1JFQVRFU1RfTE9XRVJfQk9VTkQnIG9yXG4gKiAgICAgJ1NvdXJjZU1hcENvbnN1bWVyLkxFQVNUX1VQUEVSX0JPVU5EJy4gU3BlY2lmaWVzIHdoZXRoZXIgdG8gcmV0dXJuIHRoZVxuICogICAgIGNsb3Nlc3QgZWxlbWVudCB0aGF0IGlzIHNtYWxsZXIgdGhhbiBvciBncmVhdGVyIHRoYW4gdGhlIG9uZSB3ZSBhcmVcbiAqICAgICBzZWFyY2hpbmcgZm9yLCByZXNwZWN0aXZlbHksIGlmIHRoZSBleGFjdCBlbGVtZW50IGNhbm5vdCBiZSBmb3VuZC5cbiAqICAgICBEZWZhdWx0cyB0byAnU291cmNlTWFwQ29uc3VtZXIuR1JFQVRFU1RfTE9XRVJfQk9VTkQnLlxuICpcbiAqIGFuZCBhbiBvYmplY3QgaXMgcmV0dXJuZWQgd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIGxpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgZ2VuZXJhdGVkIHNvdXJjZSwgb3IgbnVsbC5cbiAqICAgLSBjb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLCBvciBudWxsLlxuICovXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5nZW5lcmF0ZWRQb3NpdGlvbkZvciA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyX2dlbmVyYXRlZFBvc2l0aW9uRm9yKGFBcmdzKSB7XG4gICAgdmFyIHNvdXJjZSA9IHV0aWwuZ2V0QXJnKGFBcmdzLCAnc291cmNlJyk7XG4gICAgaWYgKHRoaXMuc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICBzb3VyY2UgPSB1dGlsLnJlbGF0aXZlKHRoaXMuc291cmNlUm9vdCwgc291cmNlKTtcbiAgICB9XG4gICAgaWYgKCF0aGlzLl9zb3VyY2VzLmhhcyhzb3VyY2UpKSB7XG4gICAgICByZXR1cm4ge1xuICAgICAgICBsaW5lOiBudWxsLFxuICAgICAgICBjb2x1bW46IG51bGwsXG4gICAgICAgIGxhc3RDb2x1bW46IG51bGxcbiAgICAgIH07XG4gICAgfVxuICAgIHNvdXJjZSA9IHRoaXMuX3NvdXJjZXMuaW5kZXhPZihzb3VyY2UpO1xuXG4gICAgdmFyIG5lZWRsZSA9IHtcbiAgICAgIHNvdXJjZTogc291cmNlLFxuICAgICAgb3JpZ2luYWxMaW5lOiB1dGlsLmdldEFyZyhhQXJncywgJ2xpbmUnKSxcbiAgICAgIG9yaWdpbmFsQ29sdW1uOiB1dGlsLmdldEFyZyhhQXJncywgJ2NvbHVtbicpXG4gICAgfTtcblxuICAgIHZhciBpbmRleCA9IHRoaXMuX2ZpbmRNYXBwaW5nKFxuICAgICAgbmVlZGxlLFxuICAgICAgdGhpcy5fb3JpZ2luYWxNYXBwaW5ncyxcbiAgICAgIFwib3JpZ2luYWxMaW5lXCIsXG4gICAgICBcIm9yaWdpbmFsQ29sdW1uXCIsXG4gICAgICB1dGlsLmNvbXBhcmVCeU9yaWdpbmFsUG9zaXRpb25zLFxuICAgICAgdXRpbC5nZXRBcmcoYUFyZ3MsICdiaWFzJywgU291cmNlTWFwQ29uc3VtZXIuR1JFQVRFU1RfTE9XRVJfQk9VTkQpXG4gICAgKTtcblxuICAgIGlmIChpbmRleCA+PSAwKSB7XG4gICAgICB2YXIgbWFwcGluZyA9IHRoaXMuX29yaWdpbmFsTWFwcGluZ3NbaW5kZXhdO1xuXG4gICAgICBpZiAobWFwcGluZy5zb3VyY2UgPT09IG5lZWRsZS5zb3VyY2UpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBsaW5lOiB1dGlsLmdldEFyZyhtYXBwaW5nLCAnZ2VuZXJhdGVkTGluZScsIG51bGwpLFxuICAgICAgICAgIGNvbHVtbjogdXRpbC5nZXRBcmcobWFwcGluZywgJ2dlbmVyYXRlZENvbHVtbicsIG51bGwpLFxuICAgICAgICAgIGxhc3RDb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdsYXN0R2VuZXJhdGVkQ29sdW1uJywgbnVsbClcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4ge1xuICAgICAgbGluZTogbnVsbCxcbiAgICAgIGNvbHVtbjogbnVsbCxcbiAgICAgIGxhc3RDb2x1bW46IG51bGxcbiAgICB9O1xuICB9O1xuXG5leHBvcnRzLkJhc2ljU291cmNlTWFwQ29uc3VtZXIgPSBCYXNpY1NvdXJjZU1hcENvbnN1bWVyO1xuXG4vKipcbiAqIEFuIEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lciBpbnN0YW5jZSByZXByZXNlbnRzIGEgcGFyc2VkIHNvdXJjZSBtYXAgd2hpY2hcbiAqIHdlIGNhbiBxdWVyeSBmb3IgaW5mb3JtYXRpb24uIEl0IGRpZmZlcnMgZnJvbSBCYXNpY1NvdXJjZU1hcENvbnN1bWVyIGluXG4gKiB0aGF0IGl0IHRha2VzIFwiaW5kZXhlZFwiIHNvdXJjZSBtYXBzIChpLmUuIG9uZXMgd2l0aCBhIFwic2VjdGlvbnNcIiBmaWVsZCkgYXNcbiAqIGlucHV0LlxuICpcbiAqIFRoZSBvbmx5IHBhcmFtZXRlciBpcyBhIHJhdyBzb3VyY2UgbWFwIChlaXRoZXIgYXMgYSBKU09OIHN0cmluZywgb3IgYWxyZWFkeVxuICogcGFyc2VkIHRvIGFuIG9iamVjdCkuIEFjY29yZGluZyB0byB0aGUgc3BlYyBmb3IgaW5kZXhlZCBzb3VyY2UgbWFwcywgdGhleVxuICogaGF2ZSB0aGUgZm9sbG93aW5nIGF0dHJpYnV0ZXM6XG4gKlxuICogICAtIHZlcnNpb246IFdoaWNoIHZlcnNpb24gb2YgdGhlIHNvdXJjZSBtYXAgc3BlYyB0aGlzIG1hcCBpcyBmb2xsb3dpbmcuXG4gKiAgIC0gZmlsZTogT3B0aW9uYWwuIFRoZSBnZW5lcmF0ZWQgZmlsZSB0aGlzIHNvdXJjZSBtYXAgaXMgYXNzb2NpYXRlZCB3aXRoLlxuICogICAtIHNlY3Rpb25zOiBBIGxpc3Qgb2Ygc2VjdGlvbiBkZWZpbml0aW9ucy5cbiAqXG4gKiBFYWNoIHZhbHVlIHVuZGVyIHRoZSBcInNlY3Rpb25zXCIgZmllbGQgaGFzIHR3byBmaWVsZHM6XG4gKiAgIC0gb2Zmc2V0OiBUaGUgb2Zmc2V0IGludG8gdGhlIG9yaWdpbmFsIHNwZWNpZmllZCBhdCB3aGljaCB0aGlzIHNlY3Rpb25cbiAqICAgICAgIGJlZ2lucyB0byBhcHBseSwgZGVmaW5lZCBhcyBhbiBvYmplY3Qgd2l0aCBhIFwibGluZVwiIGFuZCBcImNvbHVtblwiXG4gKiAgICAgICBmaWVsZC5cbiAqICAgLSBtYXA6IEEgc291cmNlIG1hcCBkZWZpbml0aW9uLiBUaGlzIHNvdXJjZSBtYXAgY291bGQgYWxzbyBiZSBpbmRleGVkLFxuICogICAgICAgYnV0IGRvZXNuJ3QgaGF2ZSB0byBiZS5cbiAqXG4gKiBJbnN0ZWFkIG9mIHRoZSBcIm1hcFwiIGZpZWxkLCBpdCdzIGFsc28gcG9zc2libGUgdG8gaGF2ZSBhIFwidXJsXCIgZmllbGRcbiAqIHNwZWNpZnlpbmcgYSBVUkwgdG8gcmV0cmlldmUgYSBzb3VyY2UgbWFwIGZyb20sIGJ1dCB0aGF0J3MgY3VycmVudGx5XG4gKiB1bnN1cHBvcnRlZC5cbiAqXG4gKiBIZXJlJ3MgYW4gZXhhbXBsZSBzb3VyY2UgbWFwLCB0YWtlbiBmcm9tIHRoZSBzb3VyY2UgbWFwIHNwZWNbMF0sIGJ1dFxuICogbW9kaWZpZWQgdG8gb21pdCBhIHNlY3Rpb24gd2hpY2ggdXNlcyB0aGUgXCJ1cmxcIiBmaWVsZC5cbiAqXG4gKiAge1xuICogICAgdmVyc2lvbiA6IDMsXG4gKiAgICBmaWxlOiBcImFwcC5qc1wiLFxuICogICAgc2VjdGlvbnM6IFt7XG4gKiAgICAgIG9mZnNldDoge2xpbmU6MTAwLCBjb2x1bW46MTB9LFxuICogICAgICBtYXA6IHtcbiAqICAgICAgICB2ZXJzaW9uIDogMyxcbiAqICAgICAgICBmaWxlOiBcInNlY3Rpb24uanNcIixcbiAqICAgICAgICBzb3VyY2VzOiBbXCJmb28uanNcIiwgXCJiYXIuanNcIl0sXG4gKiAgICAgICAgbmFtZXM6IFtcInNyY1wiLCBcIm1hcHNcIiwgXCJhcmVcIiwgXCJmdW5cIl0sXG4gKiAgICAgICAgbWFwcGluZ3M6IFwiQUFBQSxFOztBQkNERTtcIlxuICogICAgICB9XG4gKiAgICB9XSxcbiAqICB9XG4gKlxuICogWzBdOiBodHRwczovL2RvY3MuZ29vZ2xlLmNvbS9kb2N1bWVudC9kLzFVMVJHQWVoUXdSeXBVVG92RjFLUmxwaU9GemUwYi1fMmdjNmZBSDBLWTBrL2VkaXQjaGVhZGluZz1oLjUzNWVzM3hlcHJndFxuICovXG5mdW5jdGlvbiBJbmRleGVkU291cmNlTWFwQ29uc3VtZXIoYVNvdXJjZU1hcCkge1xuICB2YXIgc291cmNlTWFwID0gYVNvdXJjZU1hcDtcbiAgaWYgKHR5cGVvZiBhU291cmNlTWFwID09PSAnc3RyaW5nJykge1xuICAgIHNvdXJjZU1hcCA9IEpTT04ucGFyc2UoYVNvdXJjZU1hcC5yZXBsYWNlKC9eXFwpXFxdXFx9Jy8sICcnKSk7XG4gIH1cblxuICB2YXIgdmVyc2lvbiA9IHV0aWwuZ2V0QXJnKHNvdXJjZU1hcCwgJ3ZlcnNpb24nKTtcbiAgdmFyIHNlY3Rpb25zID0gdXRpbC5nZXRBcmcoc291cmNlTWFwLCAnc2VjdGlvbnMnKTtcblxuICBpZiAodmVyc2lvbiAhPSB0aGlzLl92ZXJzaW9uKSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKCdVbnN1cHBvcnRlZCB2ZXJzaW9uOiAnICsgdmVyc2lvbik7XG4gIH1cblxuICB0aGlzLl9zb3VyY2VzID0gbmV3IEFycmF5U2V0KCk7XG4gIHRoaXMuX25hbWVzID0gbmV3IEFycmF5U2V0KCk7XG5cbiAgdmFyIGxhc3RPZmZzZXQgPSB7XG4gICAgbGluZTogLTEsXG4gICAgY29sdW1uOiAwXG4gIH07XG4gIHRoaXMuX3NlY3Rpb25zID0gc2VjdGlvbnMubWFwKGZ1bmN0aW9uIChzKSB7XG4gICAgaWYgKHMudXJsKSB7XG4gICAgICAvLyBUaGUgdXJsIGZpZWxkIHdpbGwgcmVxdWlyZSBzdXBwb3J0IGZvciBhc3luY2hyb25pY2l0eS5cbiAgICAgIC8vIFNlZSBodHRwczovL2dpdGh1Yi5jb20vbW96aWxsYS9zb3VyY2UtbWFwL2lzc3Vlcy8xNlxuICAgICAgdGhyb3cgbmV3IEVycm9yKCdTdXBwb3J0IGZvciB1cmwgZmllbGQgaW4gc2VjdGlvbnMgbm90IGltcGxlbWVudGVkLicpO1xuICAgIH1cbiAgICB2YXIgb2Zmc2V0ID0gdXRpbC5nZXRBcmcocywgJ29mZnNldCcpO1xuICAgIHZhciBvZmZzZXRMaW5lID0gdXRpbC5nZXRBcmcob2Zmc2V0LCAnbGluZScpO1xuICAgIHZhciBvZmZzZXRDb2x1bW4gPSB1dGlsLmdldEFyZyhvZmZzZXQsICdjb2x1bW4nKTtcblxuICAgIGlmIChvZmZzZXRMaW5lIDwgbGFzdE9mZnNldC5saW5lIHx8XG4gICAgICAgIChvZmZzZXRMaW5lID09PSBsYXN0T2Zmc2V0LmxpbmUgJiYgb2Zmc2V0Q29sdW1uIDwgbGFzdE9mZnNldC5jb2x1bW4pKSB7XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoJ1NlY3Rpb24gb2Zmc2V0cyBtdXN0IGJlIG9yZGVyZWQgYW5kIG5vbi1vdmVybGFwcGluZy4nKTtcbiAgICB9XG4gICAgbGFzdE9mZnNldCA9IG9mZnNldDtcblxuICAgIHJldHVybiB7XG4gICAgICBnZW5lcmF0ZWRPZmZzZXQ6IHtcbiAgICAgICAgLy8gVGhlIG9mZnNldCBmaWVsZHMgYXJlIDAtYmFzZWQsIGJ1dCB3ZSB1c2UgMS1iYXNlZCBpbmRpY2VzIHdoZW5cbiAgICAgICAgLy8gZW5jb2RpbmcvZGVjb2RpbmcgZnJvbSBWTFEuXG4gICAgICAgIGdlbmVyYXRlZExpbmU6IG9mZnNldExpbmUgKyAxLFxuICAgICAgICBnZW5lcmF0ZWRDb2x1bW46IG9mZnNldENvbHVtbiArIDFcbiAgICAgIH0sXG4gICAgICBjb25zdW1lcjogbmV3IFNvdXJjZU1hcENvbnN1bWVyKHV0aWwuZ2V0QXJnKHMsICdtYXAnKSlcbiAgICB9XG4gIH0pO1xufVxuXG5JbmRleGVkU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlID0gT2JqZWN0LmNyZWF0ZShTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUpO1xuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5jb25zdHJ1Y3RvciA9IFNvdXJjZU1hcENvbnN1bWVyO1xuXG4vKipcbiAqIFRoZSB2ZXJzaW9uIG9mIHRoZSBzb3VyY2UgbWFwcGluZyBzcGVjIHRoYXQgd2UgYXJlIGNvbnN1bWluZy5cbiAqL1xuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fdmVyc2lvbiA9IDM7XG5cbi8qKlxuICogVGhlIGxpc3Qgb2Ygb3JpZ2luYWwgc291cmNlcy5cbiAqL1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUsICdzb3VyY2VzJywge1xuICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICB2YXIgc291cmNlcyA9IFtdO1xuICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdGhpcy5fc2VjdGlvbnMubGVuZ3RoOyBpKyspIHtcbiAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgdGhpcy5fc2VjdGlvbnNbaV0uY29uc3VtZXIuc291cmNlcy5sZW5ndGg7IGorKykge1xuICAgICAgICBzb3VyY2VzLnB1c2godGhpcy5fc2VjdGlvbnNbaV0uY29uc3VtZXIuc291cmNlc1tqXSk7XG4gICAgICB9XG4gICAgfVxuICAgIHJldHVybiBzb3VyY2VzO1xuICB9XG59KTtcblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBvcmlnaW5hbCBzb3VyY2UsIGxpbmUsIGFuZCBjb2x1bW4gaW5mb3JtYXRpb24gZm9yIHRoZSBnZW5lcmF0ZWRcbiAqIHNvdXJjZSdzIGxpbmUgYW5kIGNvbHVtbiBwb3NpdGlvbnMgcHJvdmlkZWQuIFRoZSBvbmx5IGFyZ3VtZW50IGlzIGFuIG9iamVjdFxuICogd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIGxpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgZ2VuZXJhdGVkIHNvdXJjZS5cbiAqICAgLSBjb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLlxuICpcbiAqIGFuZCBhbiBvYmplY3QgaXMgcmV0dXJuZWQgd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIHNvdXJjZTogVGhlIG9yaWdpbmFsIHNvdXJjZSBmaWxlLCBvciBudWxsLlxuICogICAtIGxpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgb3JpZ2luYWwgc291cmNlLCBvciBudWxsLlxuICogICAtIGNvbHVtbjogVGhlIGNvbHVtbiBudW1iZXIgaW4gdGhlIG9yaWdpbmFsIHNvdXJjZSwgb3IgbnVsbC5cbiAqICAgLSBuYW1lOiBUaGUgb3JpZ2luYWwgaWRlbnRpZmllciwgb3IgbnVsbC5cbiAqL1xuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5vcmlnaW5hbFBvc2l0aW9uRm9yID1cbiAgZnVuY3Rpb24gSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyX29yaWdpbmFsUG9zaXRpb25Gb3IoYUFyZ3MpIHtcbiAgICB2YXIgbmVlZGxlID0ge1xuICAgICAgZ2VuZXJhdGVkTGluZTogdXRpbC5nZXRBcmcoYUFyZ3MsICdsaW5lJyksXG4gICAgICBnZW5lcmF0ZWRDb2x1bW46IHV0aWwuZ2V0QXJnKGFBcmdzLCAnY29sdW1uJylcbiAgICB9O1xuXG4gICAgLy8gRmluZCB0aGUgc2VjdGlvbiBjb250YWluaW5nIHRoZSBnZW5lcmF0ZWQgcG9zaXRpb24gd2UncmUgdHJ5aW5nIHRvIG1hcFxuICAgIC8vIHRvIGFuIG9yaWdpbmFsIHBvc2l0aW9uLlxuICAgIHZhciBzZWN0aW9uSW5kZXggPSBiaW5hcnlTZWFyY2guc2VhcmNoKG5lZWRsZSwgdGhpcy5fc2VjdGlvbnMsXG4gICAgICBmdW5jdGlvbihuZWVkbGUsIHNlY3Rpb24pIHtcbiAgICAgICAgdmFyIGNtcCA9IG5lZWRsZS5nZW5lcmF0ZWRMaW5lIC0gc2VjdGlvbi5nZW5lcmF0ZWRPZmZzZXQuZ2VuZXJhdGVkTGluZTtcbiAgICAgICAgaWYgKGNtcCkge1xuICAgICAgICAgIHJldHVybiBjbXA7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gKG5lZWRsZS5nZW5lcmF0ZWRDb2x1bW4gLVxuICAgICAgICAgICAgICAgIHNlY3Rpb24uZ2VuZXJhdGVkT2Zmc2V0LmdlbmVyYXRlZENvbHVtbik7XG4gICAgICB9KTtcbiAgICB2YXIgc2VjdGlvbiA9IHRoaXMuX3NlY3Rpb25zW3NlY3Rpb25JbmRleF07XG5cbiAgICBpZiAoIXNlY3Rpb24pIHtcbiAgICAgIHJldHVybiB7XG4gICAgICAgIHNvdXJjZTogbnVsbCxcbiAgICAgICAgbGluZTogbnVsbCxcbiAgICAgICAgY29sdW1uOiBudWxsLFxuICAgICAgICBuYW1lOiBudWxsXG4gICAgICB9O1xuICAgIH1cblxuICAgIHJldHVybiBzZWN0aW9uLmNvbnN1bWVyLm9yaWdpbmFsUG9zaXRpb25Gb3Ioe1xuICAgICAgbGluZTogbmVlZGxlLmdlbmVyYXRlZExpbmUgLVxuICAgICAgICAoc2VjdGlvbi5nZW5lcmF0ZWRPZmZzZXQuZ2VuZXJhdGVkTGluZSAtIDEpLFxuICAgICAgY29sdW1uOiBuZWVkbGUuZ2VuZXJhdGVkQ29sdW1uIC1cbiAgICAgICAgKHNlY3Rpb24uZ2VuZXJhdGVkT2Zmc2V0LmdlbmVyYXRlZExpbmUgPT09IG5lZWRsZS5nZW5lcmF0ZWRMaW5lXG4gICAgICAgICA/IHNlY3Rpb24uZ2VuZXJhdGVkT2Zmc2V0LmdlbmVyYXRlZENvbHVtbiAtIDFcbiAgICAgICAgIDogMCksXG4gICAgICBiaWFzOiBhQXJncy5iaWFzXG4gICAgfSk7XG4gIH07XG5cbi8qKlxuICogUmV0dXJuIHRydWUgaWYgd2UgaGF2ZSB0aGUgc291cmNlIGNvbnRlbnQgZm9yIGV2ZXJ5IHNvdXJjZSBpbiB0aGUgc291cmNlXG4gKiBtYXAsIGZhbHNlIG90aGVyd2lzZS5cbiAqL1xuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5oYXNDb250ZW50c09mQWxsU291cmNlcyA9XG4gIGZ1bmN0aW9uIEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lcl9oYXNDb250ZW50c09mQWxsU291cmNlcygpIHtcbiAgICByZXR1cm4gdGhpcy5fc2VjdGlvbnMuZXZlcnkoZnVuY3Rpb24gKHMpIHtcbiAgICAgIHJldHVybiBzLmNvbnN1bWVyLmhhc0NvbnRlbnRzT2ZBbGxTb3VyY2VzKCk7XG4gICAgfSk7XG4gIH07XG5cbi8qKlxuICogUmV0dXJucyB0aGUgb3JpZ2luYWwgc291cmNlIGNvbnRlbnQuIFRoZSBvbmx5IGFyZ3VtZW50IGlzIHRoZSB1cmwgb2YgdGhlXG4gKiBvcmlnaW5hbCBzb3VyY2UgZmlsZS4gUmV0dXJucyBudWxsIGlmIG5vIG9yaWdpbmFsIHNvdXJjZSBjb250ZW50IGlzXG4gKiBhdmFpbGFibGUuXG4gKi9cbkluZGV4ZWRTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuc291cmNlQ29udGVudEZvciA9XG4gIGZ1bmN0aW9uIEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lcl9zb3VyY2VDb250ZW50Rm9yKGFTb3VyY2UsIG51bGxPbk1pc3NpbmcpIHtcbiAgICBmb3IgKHZhciBpID0gMDsgaSA8IHRoaXMuX3NlY3Rpb25zLmxlbmd0aDsgaSsrKSB7XG4gICAgICB2YXIgc2VjdGlvbiA9IHRoaXMuX3NlY3Rpb25zW2ldO1xuXG4gICAgICB2YXIgY29udGVudCA9IHNlY3Rpb24uY29uc3VtZXIuc291cmNlQ29udGVudEZvcihhU291cmNlLCB0cnVlKTtcbiAgICAgIGlmIChjb250ZW50KSB7XG4gICAgICAgIHJldHVybiBjb250ZW50O1xuICAgICAgfVxuICAgIH1cbiAgICBpZiAobnVsbE9uTWlzc2luZykge1xuICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuICAgIGVsc2Uge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKCdcIicgKyBhU291cmNlICsgJ1wiIGlzIG5vdCBpbiB0aGUgU291cmNlTWFwLicpO1xuICAgIH1cbiAgfTtcblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBnZW5lcmF0ZWQgbGluZSBhbmQgY29sdW1uIGluZm9ybWF0aW9uIGZvciB0aGUgb3JpZ2luYWwgc291cmNlLFxuICogbGluZSwgYW5kIGNvbHVtbiBwb3NpdGlvbnMgcHJvdmlkZWQuIFRoZSBvbmx5IGFyZ3VtZW50IGlzIGFuIG9iamVjdCB3aXRoXG4gKiB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIHNvdXJjZTogVGhlIGZpbGVuYW1lIG9mIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gY29sdW1uOiBUaGUgY29sdW1uIG51bWJlciBpbiB0aGUgb3JpZ2luYWwgc291cmNlLlxuICpcbiAqIGFuZCBhbiBvYmplY3QgaXMgcmV0dXJuZWQgd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIGxpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgZ2VuZXJhdGVkIHNvdXJjZSwgb3IgbnVsbC5cbiAqICAgLSBjb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLCBvciBudWxsLlxuICovXG5JbmRleGVkU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLmdlbmVyYXRlZFBvc2l0aW9uRm9yID1cbiAgZnVuY3Rpb24gSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyX2dlbmVyYXRlZFBvc2l0aW9uRm9yKGFBcmdzKSB7XG4gICAgZm9yICh2YXIgaSA9IDA7IGkgPCB0aGlzLl9zZWN0aW9ucy5sZW5ndGg7IGkrKykge1xuICAgICAgdmFyIHNlY3Rpb24gPSB0aGlzLl9zZWN0aW9uc1tpXTtcblxuICAgICAgLy8gT25seSBjb25zaWRlciB0aGlzIHNlY3Rpb24gaWYgdGhlIHJlcXVlc3RlZCBzb3VyY2UgaXMgaW4gdGhlIGxpc3Qgb2ZcbiAgICAgIC8vIHNvdXJjZXMgb2YgdGhlIGNvbnN1bWVyLlxuICAgICAgaWYgKHNlY3Rpb24uY29uc3VtZXIuc291cmNlcy5pbmRleE9mKHV0aWwuZ2V0QXJnKGFBcmdzLCAnc291cmNlJykpID09PSAtMSkge1xuICAgICAgICBjb250aW51ZTtcbiAgICAgIH1cbiAgICAgIHZhciBnZW5lcmF0ZWRQb3NpdGlvbiA9IHNlY3Rpb24uY29uc3VtZXIuZ2VuZXJhdGVkUG9zaXRpb25Gb3IoYUFyZ3MpO1xuICAgICAgaWYgKGdlbmVyYXRlZFBvc2l0aW9uKSB7XG4gICAgICAgIHZhciByZXQgPSB7XG4gICAgICAgICAgbGluZTogZ2VuZXJhdGVkUG9zaXRpb24ubGluZSArXG4gICAgICAgICAgICAoc2VjdGlvbi5nZW5lcmF0ZWRPZmZzZXQuZ2VuZXJhdGVkTGluZSAtIDEpLFxuICAgICAgICAgIGNvbHVtbjogZ2VuZXJhdGVkUG9zaXRpb24uY29sdW1uICtcbiAgICAgICAgICAgIChzZWN0aW9uLmdlbmVyYXRlZE9mZnNldC5nZW5lcmF0ZWRMaW5lID09PSBnZW5lcmF0ZWRQb3NpdGlvbi5saW5lXG4gICAgICAgICAgICAgPyBzZWN0aW9uLmdlbmVyYXRlZE9mZnNldC5nZW5lcmF0ZWRDb2x1bW4gLSAxXG4gICAgICAgICAgICAgOiAwKVxuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gcmV0O1xuICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiB7XG4gICAgICBsaW5lOiBudWxsLFxuICAgICAgY29sdW1uOiBudWxsXG4gICAgfTtcbiAgfTtcblxuLyoqXG4gKiBQYXJzZSB0aGUgbWFwcGluZ3MgaW4gYSBzdHJpbmcgaW4gdG8gYSBkYXRhIHN0cnVjdHVyZSB3aGljaCB3ZSBjYW4gZWFzaWx5XG4gKiBxdWVyeSAodGhlIG9yZGVyZWQgYXJyYXlzIGluIHRoZSBgdGhpcy5fX2dlbmVyYXRlZE1hcHBpbmdzYCBhbmRcbiAqIGB0aGlzLl9fb3JpZ2luYWxNYXBwaW5nc2AgcHJvcGVydGllcykuXG4gKi9cbkluZGV4ZWRTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX3BhcnNlTWFwcGluZ3MgPVxuICBmdW5jdGlvbiBJbmRleGVkU291cmNlTWFwQ29uc3VtZXJfcGFyc2VNYXBwaW5ncyhhU3RyLCBhU291cmNlUm9vdCkge1xuICAgIHRoaXMuX19nZW5lcmF0ZWRNYXBwaW5ncyA9IFtdO1xuICAgIHRoaXMuX19vcmlnaW5hbE1hcHBpbmdzID0gW107XG4gICAgZm9yICh2YXIgaSA9IDA7IGkgPCB0aGlzLl9zZWN0aW9ucy5sZW5ndGg7IGkrKykge1xuICAgICAgdmFyIHNlY3Rpb24gPSB0aGlzLl9zZWN0aW9uc1tpXTtcbiAgICAgIHZhciBzZWN0aW9uTWFwcGluZ3MgPSBzZWN0aW9uLmNvbnN1bWVyLl9nZW5lcmF0ZWRNYXBwaW5ncztcbiAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgc2VjdGlvbk1hcHBpbmdzLmxlbmd0aDsgaisrKSB7XG4gICAgICAgIHZhciBtYXBwaW5nID0gc2VjdGlvbk1hcHBpbmdzW2pdO1xuXG4gICAgICAgIHZhciBzb3VyY2UgPSBzZWN0aW9uLmNvbnN1bWVyLl9zb3VyY2VzLmF0KG1hcHBpbmcuc291cmNlKTtcbiAgICAgICAgaWYgKHNlY3Rpb24uY29uc3VtZXIuc291cmNlUm9vdCAhPT0gbnVsbCkge1xuICAgICAgICAgIHNvdXJjZSA9IHV0aWwuam9pbihzZWN0aW9uLmNvbnN1bWVyLnNvdXJjZVJvb3QsIHNvdXJjZSk7XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5fc291cmNlcy5hZGQoc291cmNlKTtcbiAgICAgICAgc291cmNlID0gdGhpcy5fc291cmNlcy5pbmRleE9mKHNvdXJjZSk7XG5cbiAgICAgICAgdmFyIG5hbWUgPSBzZWN0aW9uLmNvbnN1bWVyLl9uYW1lcy5hdChtYXBwaW5nLm5hbWUpO1xuICAgICAgICB0aGlzLl9uYW1lcy5hZGQobmFtZSk7XG4gICAgICAgIG5hbWUgPSB0aGlzLl9uYW1lcy5pbmRleE9mKG5hbWUpO1xuXG4gICAgICAgIC8vIFRoZSBtYXBwaW5ncyBjb21pbmcgZnJvbSB0aGUgY29uc3VtZXIgZm9yIHRoZSBzZWN0aW9uIGhhdmVcbiAgICAgICAgLy8gZ2VuZXJhdGVkIHBvc2l0aW9ucyByZWxhdGl2ZSB0byB0aGUgc3RhcnQgb2YgdGhlIHNlY3Rpb24sIHNvIHdlXG4gICAgICAgIC8vIG5lZWQgdG8gb2Zmc2V0IHRoZW0gdG8gYmUgcmVsYXRpdmUgdG8gdGhlIHN0YXJ0IG9mIHRoZSBjb25jYXRlbmF0ZWRcbiAgICAgICAgLy8gZ2VuZXJhdGVkIGZpbGUuXG4gICAgICAgIHZhciBhZGp1c3RlZE1hcHBpbmcgPSB7XG4gICAgICAgICAgc291cmNlOiBzb3VyY2UsXG4gICAgICAgICAgZ2VuZXJhdGVkTGluZTogbWFwcGluZy5nZW5lcmF0ZWRMaW5lICtcbiAgICAgICAgICAgIChzZWN0aW9uLmdlbmVyYXRlZE9mZnNldC5nZW5lcmF0ZWRMaW5lIC0gMSksXG4gICAgICAgICAgZ2VuZXJhdGVkQ29sdW1uOiBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbiArXG4gICAgICAgICAgICAoc2VjdGlvbi5nZW5lcmF0ZWRPZmZzZXQuZ2VuZXJhdGVkTGluZSA9PT0gbWFwcGluZy5nZW5lcmF0ZWRMaW5lXG4gICAgICAgICAgICA/IHNlY3Rpb24uZ2VuZXJhdGVkT2Zmc2V0LmdlbmVyYXRlZENvbHVtbiAtIDFcbiAgICAgICAgICAgIDogMCksXG4gICAgICAgICAgb3JpZ2luYWxMaW5lOiBtYXBwaW5nLm9yaWdpbmFsTGluZSxcbiAgICAgICAgICBvcmlnaW5hbENvbHVtbjogbWFwcGluZy5vcmlnaW5hbENvbHVtbixcbiAgICAgICAgICBuYW1lOiBuYW1lXG4gICAgICAgIH07XG5cbiAgICAgICAgdGhpcy5fX2dlbmVyYXRlZE1hcHBpbmdzLnB1c2goYWRqdXN0ZWRNYXBwaW5nKTtcbiAgICAgICAgaWYgKHR5cGVvZiBhZGp1c3RlZE1hcHBpbmcub3JpZ2luYWxMaW5lID09PSAnbnVtYmVyJykge1xuICAgICAgICAgIHRoaXMuX19vcmlnaW5hbE1hcHBpbmdzLnB1c2goYWRqdXN0ZWRNYXBwaW5nKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cblxuICAgIHF1aWNrU29ydCh0aGlzLl9fZ2VuZXJhdGVkTWFwcGluZ3MsIHV0aWwuY29tcGFyZUJ5R2VuZXJhdGVkUG9zaXRpb25zRGVmbGF0ZWQpO1xuICAgIHF1aWNrU29ydCh0aGlzLl9fb3JpZ2luYWxNYXBwaW5ncywgdXRpbC5jb21wYXJlQnlPcmlnaW5hbFBvc2l0aW9ucyk7XG4gIH07XG5cbmV4cG9ydHMuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyID0gSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyO1xuXG5cblxuLyoqKioqKioqKioqKioqKioqXG4gKiogV0VCUEFDSyBGT09URVJcbiAqKiAuL2xpYi9zb3VyY2UtbWFwLWNvbnN1bWVyLmpzXG4gKiogbW9kdWxlIGlkID0gN1xuICoqIG1vZHVsZSBjaHVua3MgPSAwXG4gKiovIiwiLyogLSotIE1vZGU6IGpzOyBqcy1pbmRlbnQtbGV2ZWw6IDI7IC0qLSAqL1xuLypcbiAqIENvcHlyaWdodCAyMDExIE1vemlsbGEgRm91bmRhdGlvbiBhbmQgY29udHJpYnV0b3JzXG4gKiBMaWNlbnNlZCB1bmRlciB0aGUgTmV3IEJTRCBsaWNlbnNlLiBTZWUgTElDRU5TRSBvcjpcbiAqIGh0dHA6Ly9vcGVuc291cmNlLm9yZy9saWNlbnNlcy9CU0QtMy1DbGF1c2VcbiAqL1xuXG5leHBvcnRzLkdSRUFURVNUX0xPV0VSX0JPVU5EID0gMTtcbmV4cG9ydHMuTEVBU1RfVVBQRVJfQk9VTkQgPSAyO1xuXG4vKipcbiAqIFJlY3Vyc2l2ZSBpbXBsZW1lbnRhdGlvbiBvZiBiaW5hcnkgc2VhcmNoLlxuICpcbiAqIEBwYXJhbSBhTG93IEluZGljZXMgaGVyZSBhbmQgbG93ZXIgZG8gbm90IGNvbnRhaW4gdGhlIG5lZWRsZS5cbiAqIEBwYXJhbSBhSGlnaCBJbmRpY2VzIGhlcmUgYW5kIGhpZ2hlciBkbyBub3QgY29udGFpbiB0aGUgbmVlZGxlLlxuICogQHBhcmFtIGFOZWVkbGUgVGhlIGVsZW1lbnQgYmVpbmcgc2VhcmNoZWQgZm9yLlxuICogQHBhcmFtIGFIYXlzdGFjayBUaGUgbm9uLWVtcHR5IGFycmF5IGJlaW5nIHNlYXJjaGVkLlxuICogQHBhcmFtIGFDb21wYXJlIEZ1bmN0aW9uIHdoaWNoIHRha2VzIHR3byBlbGVtZW50cyBhbmQgcmV0dXJucyAtMSwgMCwgb3IgMS5cbiAqIEBwYXJhbSBhQmlhcyBFaXRoZXIgJ2JpbmFyeVNlYXJjaC5HUkVBVEVTVF9MT1dFUl9CT1VORCcgb3JcbiAqICAgICAnYmluYXJ5U2VhcmNoLkxFQVNUX1VQUEVSX0JPVU5EJy4gU3BlY2lmaWVzIHdoZXRoZXIgdG8gcmV0dXJuIHRoZVxuICogICAgIGNsb3Nlc3QgZWxlbWVudCB0aGF0IGlzIHNtYWxsZXIgdGhhbiBvciBncmVhdGVyIHRoYW4gdGhlIG9uZSB3ZSBhcmVcbiAqICAgICBzZWFyY2hpbmcgZm9yLCByZXNwZWN0aXZlbHksIGlmIHRoZSBleGFjdCBlbGVtZW50IGNhbm5vdCBiZSBmb3VuZC5cbiAqL1xuZnVuY3Rpb24gcmVjdXJzaXZlU2VhcmNoKGFMb3csIGFIaWdoLCBhTmVlZGxlLCBhSGF5c3RhY2ssIGFDb21wYXJlLCBhQmlhcykge1xuICAvLyBUaGlzIGZ1bmN0aW9uIHRlcm1pbmF0ZXMgd2hlbiBvbmUgb2YgdGhlIGZvbGxvd2luZyBpcyB0cnVlOlxuICAvL1xuICAvLyAgIDEuIFdlIGZpbmQgdGhlIGV4YWN0IGVsZW1lbnQgd2UgYXJlIGxvb2tpbmcgZm9yLlxuICAvL1xuICAvLyAgIDIuIFdlIGRpZCBub3QgZmluZCB0aGUgZXhhY3QgZWxlbWVudCwgYnV0IHdlIGNhbiByZXR1cm4gdGhlIGluZGV4IG9mXG4gIC8vICAgICAgdGhlIG5leHQtY2xvc2VzdCBlbGVtZW50LlxuICAvL1xuICAvLyAgIDMuIFdlIGRpZCBub3QgZmluZCB0aGUgZXhhY3QgZWxlbWVudCwgYW5kIHRoZXJlIGlzIG5vIG5leHQtY2xvc2VzdFxuICAvLyAgICAgIGVsZW1lbnQgdGhhbiB0aGUgb25lIHdlIGFyZSBzZWFyY2hpbmcgZm9yLCBzbyB3ZSByZXR1cm4gLTEuXG4gIHZhciBtaWQgPSBNYXRoLmZsb29yKChhSGlnaCAtIGFMb3cpIC8gMikgKyBhTG93O1xuICB2YXIgY21wID0gYUNvbXBhcmUoYU5lZWRsZSwgYUhheXN0YWNrW21pZF0sIHRydWUpO1xuICBpZiAoY21wID09PSAwKSB7XG4gICAgLy8gRm91bmQgdGhlIGVsZW1lbnQgd2UgYXJlIGxvb2tpbmcgZm9yLlxuICAgIHJldHVybiBtaWQ7XG4gIH1cbiAgZWxzZSBpZiAoY21wID4gMCkge1xuICAgIC8vIE91ciBuZWVkbGUgaXMgZ3JlYXRlciB0aGFuIGFIYXlzdGFja1ttaWRdLlxuICAgIGlmIChhSGlnaCAtIG1pZCA+IDEpIHtcbiAgICAgIC8vIFRoZSBlbGVtZW50IGlzIGluIHRoZSB1cHBlciBoYWxmLlxuICAgICAgcmV0dXJuIHJlY3Vyc2l2ZVNlYXJjaChtaWQsIGFIaWdoLCBhTmVlZGxlLCBhSGF5c3RhY2ssIGFDb21wYXJlLCBhQmlhcyk7XG4gICAgfVxuXG4gICAgLy8gVGhlIGV4YWN0IG5lZWRsZSBlbGVtZW50IHdhcyBub3QgZm91bmQgaW4gdGhpcyBoYXlzdGFjay4gRGV0ZXJtaW5lIGlmXG4gICAgLy8gd2UgYXJlIGluIHRlcm1pbmF0aW9uIGNhc2UgKDMpIG9yICgyKSBhbmQgcmV0dXJuIHRoZSBhcHByb3ByaWF0ZSB0aGluZy5cbiAgICBpZiAoYUJpYXMgPT0gZXhwb3J0cy5MRUFTVF9VUFBFUl9CT1VORCkge1xuICAgICAgcmV0dXJuIGFIaWdoIDwgYUhheXN0YWNrLmxlbmd0aCA/IGFIaWdoIDogLTE7XG4gICAgfSBlbHNlIHtcbiAgICAgIHJldHVybiBtaWQ7XG4gICAgfVxuICB9XG4gIGVsc2Uge1xuICAgIC8vIE91ciBuZWVkbGUgaXMgbGVzcyB0aGFuIGFIYXlzdGFja1ttaWRdLlxuICAgIGlmIChtaWQgLSBhTG93ID4gMSkge1xuICAgICAgLy8gVGhlIGVsZW1lbnQgaXMgaW4gdGhlIGxvd2VyIGhhbGYuXG4gICAgICByZXR1cm4gcmVjdXJzaXZlU2VhcmNoKGFMb3csIG1pZCwgYU5lZWRsZSwgYUhheXN0YWNrLCBhQ29tcGFyZSwgYUJpYXMpO1xuICAgIH1cblxuICAgIC8vIHdlIGFyZSBpbiB0ZXJtaW5hdGlvbiBjYXNlICgzKSBvciAoMikgYW5kIHJldHVybiB0aGUgYXBwcm9wcmlhdGUgdGhpbmcuXG4gICAgaWYgKGFCaWFzID09IGV4cG9ydHMuTEVBU1RfVVBQRVJfQk9VTkQpIHtcbiAgICAgIHJldHVybiBtaWQ7XG4gICAgfSBlbHNlIHtcbiAgICAgIHJldHVybiBhTG93IDwgMCA/IC0xIDogYUxvdztcbiAgICB9XG4gIH1cbn1cblxuLyoqXG4gKiBUaGlzIGlzIGFuIGltcGxlbWVudGF0aW9uIG9mIGJpbmFyeSBzZWFyY2ggd2hpY2ggd2lsbCBhbHdheXMgdHJ5IGFuZCByZXR1cm5cbiAqIHRoZSBpbmRleCBvZiB0aGUgY2xvc2VzdCBlbGVtZW50IGlmIHRoZXJlIGlzIG5vIGV4YWN0IGhpdC4gVGhpcyBpcyBiZWNhdXNlXG4gKiBtYXBwaW5ncyBiZXR3ZWVuIG9yaWdpbmFsIGFuZCBnZW5lcmF0ZWQgbGluZS9jb2wgcGFpcnMgYXJlIHNpbmdsZSBwb2ludHMsXG4gKiBhbmQgdGhlcmUgaXMgYW4gaW1wbGljaXQgcmVnaW9uIGJldHdlZW4gZWFjaCBvZiB0aGVtLCBzbyBhIG1pc3MganVzdCBtZWFuc1xuICogdGhhdCB5b3UgYXJlbid0IG9uIHRoZSB2ZXJ5IHN0YXJ0IG9mIGEgcmVnaW9uLlxuICpcbiAqIEBwYXJhbSBhTmVlZGxlIFRoZSBlbGVtZW50IHlvdSBhcmUgbG9va2luZyBmb3IuXG4gKiBAcGFyYW0gYUhheXN0YWNrIFRoZSBhcnJheSB0aGF0IGlzIGJlaW5nIHNlYXJjaGVkLlxuICogQHBhcmFtIGFDb21wYXJlIEEgZnVuY3Rpb24gd2hpY2ggdGFrZXMgdGhlIG5lZWRsZSBhbmQgYW4gZWxlbWVudCBpbiB0aGVcbiAqICAgICBhcnJheSBhbmQgcmV0dXJucyAtMSwgMCwgb3IgMSBkZXBlbmRpbmcgb24gd2hldGhlciB0aGUgbmVlZGxlIGlzIGxlc3NcbiAqICAgICB0aGFuLCBlcXVhbCB0bywgb3IgZ3JlYXRlciB0aGFuIHRoZSBlbGVtZW50LCByZXNwZWN0aXZlbHkuXG4gKiBAcGFyYW0gYUJpYXMgRWl0aGVyICdiaW5hcnlTZWFyY2guR1JFQVRFU1RfTE9XRVJfQk9VTkQnIG9yXG4gKiAgICAgJ2JpbmFyeVNlYXJjaC5MRUFTVF9VUFBFUl9CT1VORCcuIFNwZWNpZmllcyB3aGV0aGVyIHRvIHJldHVybiB0aGVcbiAqICAgICBjbG9zZXN0IGVsZW1lbnQgdGhhdCBpcyBzbWFsbGVyIHRoYW4gb3IgZ3JlYXRlciB0aGFuIHRoZSBvbmUgd2UgYXJlXG4gKiAgICAgc2VhcmNoaW5nIGZvciwgcmVzcGVjdGl2ZWx5LCBpZiB0aGUgZXhhY3QgZWxlbWVudCBjYW5ub3QgYmUgZm91bmQuXG4gKiAgICAgRGVmYXVsdHMgdG8gJ2JpbmFyeVNlYXJjaC5HUkVBVEVTVF9MT1dFUl9CT1VORCcuXG4gKi9cbmV4cG9ydHMuc2VhcmNoID0gZnVuY3Rpb24gc2VhcmNoKGFOZWVkbGUsIGFIYXlzdGFjaywgYUNvbXBhcmUsIGFCaWFzKSB7XG4gIGlmIChhSGF5c3RhY2subGVuZ3RoID09PSAwKSB7XG4gICAgcmV0dXJuIC0xO1xuICB9XG5cbiAgdmFyIGluZGV4ID0gcmVjdXJzaXZlU2VhcmNoKC0xLCBhSGF5c3RhY2subGVuZ3RoLCBhTmVlZGxlLCBhSGF5c3RhY2ssXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhQ29tcGFyZSwgYUJpYXMgfHwgZXhwb3J0cy5HUkVBVEVTVF9MT1dFUl9CT1VORCk7XG4gIGlmIChpbmRleCA8IDApIHtcbiAgICByZXR1cm4gLTE7XG4gIH1cblxuICAvLyBXZSBoYXZlIGZvdW5kIGVpdGhlciB0aGUgZXhhY3QgZWxlbWVudCwgb3IgdGhlIG5leHQtY2xvc2VzdCBlbGVtZW50IHRoYW5cbiAgLy8gdGhlIG9uZSB3ZSBhcmUgc2VhcmNoaW5nIGZvci4gSG93ZXZlciwgdGhlcmUgbWF5IGJlIG1vcmUgdGhhbiBvbmUgc3VjaFxuICAvLyBlbGVtZW50LiBNYWtlIHN1cmUgd2UgYWx3YXlzIHJldHVybiB0aGUgc21hbGxlc3Qgb2YgdGhlc2UuXG4gIHdoaWxlIChpbmRleCAtIDEgPj0gMCkge1xuICAgIGlmIChhQ29tcGFyZShhSGF5c3RhY2tbaW5kZXhdLCBhSGF5c3RhY2tbaW5kZXggLSAxXSwgdHJ1ZSkgIT09IDApIHtcbiAgICAgIGJyZWFrO1xuICAgIH1cbiAgICAtLWluZGV4O1xuICB9XG5cbiAgcmV0dXJuIGluZGV4O1xufTtcblxuXG5cbi8qKioqKioqKioqKioqKioqKlxuICoqIFdFQlBBQ0sgRk9PVEVSXG4gKiogLi9saWIvYmluYXJ5LXNlYXJjaC5qc1xuICoqIG1vZHVsZSBpZCA9IDhcbiAqKiBtb2R1bGUgY2h1bmtzID0gMFxuICoqLyIsIi8qIC0qLSBNb2RlOiBqczsganMtaW5kZW50LWxldmVsOiAyOyAtKi0gKi9cbi8qXG4gKiBDb3B5cmlnaHQgMjAxMSBNb3ppbGxhIEZvdW5kYXRpb24gYW5kIGNvbnRyaWJ1dG9yc1xuICogTGljZW5zZWQgdW5kZXIgdGhlIE5ldyBCU0QgbGljZW5zZS4gU2VlIExJQ0VOU0Ugb3I6XG4gKiBodHRwOi8vb3BlbnNvdXJjZS5vcmcvbGljZW5zZXMvQlNELTMtQ2xhdXNlXG4gKi9cblxuLy8gSXQgdHVybnMgb3V0IHRoYXQgc29tZSAobW9zdD8pIEphdmFTY3JpcHQgZW5naW5lcyBkb24ndCBzZWxmLWhvc3Rcbi8vIGBBcnJheS5wcm90b3R5cGUuc29ydGAuIFRoaXMgbWFrZXMgc2Vuc2UgYmVjYXVzZSBDKysgd2lsbCBsaWtlbHkgcmVtYWluXG4vLyBmYXN0ZXIgdGhhbiBKUyB3aGVuIGRvaW5nIHJhdyBDUFUtaW50ZW5zaXZlIHNvcnRpbmcuIEhvd2V2ZXIsIHdoZW4gdXNpbmcgYVxuLy8gY3VzdG9tIGNvbXBhcmF0b3IgZnVuY3Rpb24sIGNhbGxpbmcgYmFjayBhbmQgZm9ydGggYmV0d2VlbiB0aGUgVk0ncyBDKysgYW5kXG4vLyBKSVQnZCBKUyBpcyByYXRoZXIgc2xvdyAqYW5kKiBsb3NlcyBKSVQgdHlwZSBpbmZvcm1hdGlvbiwgcmVzdWx0aW5nIGluXG4vLyB3b3JzZSBnZW5lcmF0ZWQgY29kZSBmb3IgdGhlIGNvbXBhcmF0b3IgZnVuY3Rpb24gdGhhbiB3b3VsZCBiZSBvcHRpbWFsLiBJblxuLy8gZmFjdCwgd2hlbiBzb3J0aW5nIHdpdGggYSBjb21wYXJhdG9yLCB0aGVzZSBjb3N0cyBvdXR3ZWlnaCB0aGUgYmVuZWZpdHMgb2Zcbi8vIHNvcnRpbmcgaW4gQysrLiBCeSB1c2luZyBvdXIgb3duIEpTLWltcGxlbWVudGVkIFF1aWNrIFNvcnQgKGJlbG93KSwgd2UgZ2V0XG4vLyBhIH4zNTAwbXMgbWVhbiBzcGVlZC11cCBpbiBgYmVuY2gvYmVuY2guaHRtbGAuXG5cbi8qKlxuICogU3dhcCB0aGUgZWxlbWVudHMgaW5kZXhlZCBieSBgeGAgYW5kIGB5YCBpbiB0aGUgYXJyYXkgYGFyeWAuXG4gKlxuICogQHBhcmFtIHtBcnJheX0gYXJ5XG4gKiAgICAgICAgVGhlIGFycmF5LlxuICogQHBhcmFtIHtOdW1iZXJ9IHhcbiAqICAgICAgICBUaGUgaW5kZXggb2YgdGhlIGZpcnN0IGl0ZW0uXG4gKiBAcGFyYW0ge051bWJlcn0geVxuICogICAgICAgIFRoZSBpbmRleCBvZiB0aGUgc2Vjb25kIGl0ZW0uXG4gKi9cbmZ1bmN0aW9uIHN3YXAoYXJ5LCB4LCB5KSB7XG4gIHZhciB0ZW1wID0gYXJ5W3hdO1xuICBhcnlbeF0gPSBhcnlbeV07XG4gIGFyeVt5XSA9IHRlbXA7XG59XG5cbi8qKlxuICogUmV0dXJucyBhIHJhbmRvbSBpbnRlZ2VyIHdpdGhpbiB0aGUgcmFuZ2UgYGxvdyAuLiBoaWdoYCBpbmNsdXNpdmUuXG4gKlxuICogQHBhcmFtIHtOdW1iZXJ9IGxvd1xuICogICAgICAgIFRoZSBsb3dlciBib3VuZCBvbiB0aGUgcmFuZ2UuXG4gKiBAcGFyYW0ge051bWJlcn0gaGlnaFxuICogICAgICAgIFRoZSB1cHBlciBib3VuZCBvbiB0aGUgcmFuZ2UuXG4gKi9cbmZ1bmN0aW9uIHJhbmRvbUludEluUmFuZ2UobG93LCBoaWdoKSB7XG4gIHJldHVybiBNYXRoLnJvdW5kKGxvdyArIChNYXRoLnJhbmRvbSgpICogKGhpZ2ggLSBsb3cpKSk7XG59XG5cbi8qKlxuICogVGhlIFF1aWNrIFNvcnQgYWxnb3JpdGhtLlxuICpcbiAqIEBwYXJhbSB7QXJyYXl9IGFyeVxuICogICAgICAgIEFuIGFycmF5IHRvIHNvcnQuXG4gKiBAcGFyYW0ge2Z1bmN0aW9ufSBjb21wYXJhdG9yXG4gKiAgICAgICAgRnVuY3Rpb24gdG8gdXNlIHRvIGNvbXBhcmUgdHdvIGl0ZW1zLlxuICogQHBhcmFtIHtOdW1iZXJ9IHBcbiAqICAgICAgICBTdGFydCBpbmRleCBvZiB0aGUgYXJyYXlcbiAqIEBwYXJhbSB7TnVtYmVyfSByXG4gKiAgICAgICAgRW5kIGluZGV4IG9mIHRoZSBhcnJheVxuICovXG5mdW5jdGlvbiBkb1F1aWNrU29ydChhcnksIGNvbXBhcmF0b3IsIHAsIHIpIHtcbiAgLy8gSWYgb3VyIGxvd2VyIGJvdW5kIGlzIGxlc3MgdGhhbiBvdXIgdXBwZXIgYm91bmQsIHdlICgxKSBwYXJ0aXRpb24gdGhlXG4gIC8vIGFycmF5IGludG8gdHdvIHBpZWNlcyBhbmQgKDIpIHJlY3Vyc2Ugb24gZWFjaCBoYWxmLiBJZiBpdCBpcyBub3QsIHRoaXMgaXNcbiAgLy8gdGhlIGVtcHR5IGFycmF5IGFuZCBvdXIgYmFzZSBjYXNlLlxuXG4gIGlmIChwIDwgcikge1xuICAgIC8vICgxKSBQYXJ0aXRpb25pbmcuXG4gICAgLy9cbiAgICAvLyBUaGUgcGFydGl0aW9uaW5nIGNob29zZXMgYSBwaXZvdCBiZXR3ZWVuIGBwYCBhbmQgYHJgIGFuZCBtb3ZlcyBhbGxcbiAgICAvLyBlbGVtZW50cyB0aGF0IGFyZSBsZXNzIHRoYW4gb3IgZXF1YWwgdG8gdGhlIHBpdm90IHRvIHRoZSBiZWZvcmUgaXQsIGFuZFxuICAgIC8vIGFsbCB0aGUgZWxlbWVudHMgdGhhdCBhcmUgZ3JlYXRlciB0aGFuIGl0IGFmdGVyIGl0LiBUaGUgZWZmZWN0IGlzIHRoYXRcbiAgICAvLyBvbmNlIHBhcnRpdGlvbiBpcyBkb25lLCB0aGUgcGl2b3QgaXMgaW4gdGhlIGV4YWN0IHBsYWNlIGl0IHdpbGwgYmUgd2hlblxuICAgIC8vIHRoZSBhcnJheSBpcyBwdXQgaW4gc29ydGVkIG9yZGVyLCBhbmQgaXQgd2lsbCBub3QgbmVlZCB0byBiZSBtb3ZlZFxuICAgIC8vIGFnYWluLiBUaGlzIHJ1bnMgaW4gTyhuKSB0aW1lLlxuXG4gICAgLy8gQWx3YXlzIGNob29zZSBhIHJhbmRvbSBwaXZvdCBzbyB0aGF0IGFuIGlucHV0IGFycmF5IHdoaWNoIGlzIHJldmVyc2VcbiAgICAvLyBzb3J0ZWQgZG9lcyBub3QgY2F1c2UgTyhuXjIpIHJ1bm5pbmcgdGltZS5cbiAgICB2YXIgcGl2b3RJbmRleCA9IHJhbmRvbUludEluUmFuZ2UocCwgcik7XG4gICAgdmFyIGkgPSBwIC0gMTtcblxuICAgIHN3YXAoYXJ5LCBwaXZvdEluZGV4LCByKTtcbiAgICB2YXIgcGl2b3QgPSBhcnlbcl07XG5cbiAgICAvLyBJbW1lZGlhdGVseSBhZnRlciBgamAgaXMgaW5jcmVtZW50ZWQgaW4gdGhpcyBsb29wLCB0aGUgZm9sbG93aW5nIGhvbGRcbiAgICAvLyB0cnVlOlxuICAgIC8vXG4gICAgLy8gICAqIEV2ZXJ5IGVsZW1lbnQgaW4gYGFyeVtwIC4uIGldYCBpcyBsZXNzIHRoYW4gb3IgZXF1YWwgdG8gdGhlIHBpdm90LlxuICAgIC8vXG4gICAgLy8gICAqIEV2ZXJ5IGVsZW1lbnQgaW4gYGFyeVtpKzEgLi4gai0xXWAgaXMgZ3JlYXRlciB0aGFuIHRoZSBwaXZvdC5cbiAgICBmb3IgKHZhciBqID0gcDsgaiA8IHI7IGorKykge1xuICAgICAgaWYgKGNvbXBhcmF0b3IoYXJ5W2pdLCBwaXZvdCkgPD0gMCkge1xuICAgICAgICBpICs9IDE7XG4gICAgICAgIHN3YXAoYXJ5LCBpLCBqKTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICBzd2FwKGFyeSwgaSArIDEsIGopO1xuICAgIHZhciBxID0gaSArIDE7XG5cbiAgICAvLyAoMikgUmVjdXJzZSBvbiBlYWNoIGhhbGYuXG5cbiAgICBkb1F1aWNrU29ydChhcnksIGNvbXBhcmF0b3IsIHAsIHEgLSAxKTtcbiAgICBkb1F1aWNrU29ydChhcnksIGNvbXBhcmF0b3IsIHEgKyAxLCByKTtcbiAgfVxufVxuXG4vKipcbiAqIFNvcnQgdGhlIGdpdmVuIGFycmF5IGluLXBsYWNlIHdpdGggdGhlIGdpdmVuIGNvbXBhcmF0b3IgZnVuY3Rpb24uXG4gKlxuICogQHBhcmFtIHtBcnJheX0gYXJ5XG4gKiAgICAgICAgQW4gYXJyYXkgdG8gc29ydC5cbiAqIEBwYXJhbSB7ZnVuY3Rpb259IGNvbXBhcmF0b3JcbiAqICAgICAgICBGdW5jdGlvbiB0byB1c2UgdG8gY29tcGFyZSB0d28gaXRlbXMuXG4gKi9cbmV4cG9ydHMucXVpY2tTb3J0ID0gZnVuY3Rpb24gKGFyeSwgY29tcGFyYXRvcikge1xuICBkb1F1aWNrU29ydChhcnksIGNvbXBhcmF0b3IsIDAsIGFyeS5sZW5ndGggLSAxKTtcbn07XG5cblxuXG4vKioqKioqKioqKioqKioqKipcbiAqKiBXRUJQQUNLIEZPT1RFUlxuICoqIC4vbGliL3F1aWNrLXNvcnQuanNcbiAqKiBtb2R1bGUgaWQgPSA5XG4gKiogbW9kdWxlIGNodW5rcyA9IDBcbiAqKi8iLCIvKiAtKi0gTW9kZToganM7IGpzLWluZGVudC1sZXZlbDogMjsgLSotICovXG4vKlxuICogQ29weXJpZ2h0IDIwMTEgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFIG9yOlxuICogaHR0cDovL29wZW5zb3VyY2Uub3JnL2xpY2Vuc2VzL0JTRC0zLUNsYXVzZVxuICovXG5cbnZhciBTb3VyY2VNYXBHZW5lcmF0b3IgPSByZXF1aXJlKCcuL3NvdXJjZS1tYXAtZ2VuZXJhdG9yJykuU291cmNlTWFwR2VuZXJhdG9yO1xudmFyIHV0aWwgPSByZXF1aXJlKCcuL3V0aWwnKTtcblxuLy8gTWF0Y2hlcyBhIFdpbmRvd3Mtc3R5bGUgYFxcclxcbmAgbmV3bGluZSBvciBhIGBcXG5gIG5ld2xpbmUgdXNlZCBieSBhbGwgb3RoZXJcbi8vIG9wZXJhdGluZyBzeXN0ZW1zIHRoZXNlIGRheXMgKGNhcHR1cmluZyB0aGUgcmVzdWx0KS5cbnZhciBSRUdFWF9ORVdMSU5FID0gLyhcXHI/XFxuKS87XG5cbi8vIE5ld2xpbmUgY2hhcmFjdGVyIGNvZGUgZm9yIGNoYXJDb2RlQXQoKSBjb21wYXJpc29uc1xudmFyIE5FV0xJTkVfQ09ERSA9IDEwO1xuXG4vLyBQcml2YXRlIHN5bWJvbCBmb3IgaWRlbnRpZnlpbmcgYFNvdXJjZU5vZGVgcyB3aGVuIG11bHRpcGxlIHZlcnNpb25zIG9mXG4vLyB0aGUgc291cmNlLW1hcCBsaWJyYXJ5IGFyZSBsb2FkZWQuIFRoaXMgTVVTVCBOT1QgQ0hBTkdFIGFjcm9zc1xuLy8gdmVyc2lvbnMhXG52YXIgaXNTb3VyY2VOb2RlID0gXCIkJCRpc1NvdXJjZU5vZGUkJCRcIjtcblxuLyoqXG4gKiBTb3VyY2VOb2RlcyBwcm92aWRlIGEgd2F5IHRvIGFic3RyYWN0IG92ZXIgaW50ZXJwb2xhdGluZy9jb25jYXRlbmF0aW5nXG4gKiBzbmlwcGV0cyBvZiBnZW5lcmF0ZWQgSmF2YVNjcmlwdCBzb3VyY2UgY29kZSB3aGlsZSBtYWludGFpbmluZyB0aGUgbGluZSBhbmRcbiAqIGNvbHVtbiBpbmZvcm1hdGlvbiBhc3NvY2lhdGVkIHdpdGggdGhlIG9yaWdpbmFsIHNvdXJjZSBjb2RlLlxuICpcbiAqIEBwYXJhbSBhTGluZSBUaGUgb3JpZ2luYWwgbGluZSBudW1iZXIuXG4gKiBAcGFyYW0gYUNvbHVtbiBUaGUgb3JpZ2luYWwgY29sdW1uIG51bWJlci5cbiAqIEBwYXJhbSBhU291cmNlIFRoZSBvcmlnaW5hbCBzb3VyY2UncyBmaWxlbmFtZS5cbiAqIEBwYXJhbSBhQ2h1bmtzIE9wdGlvbmFsLiBBbiBhcnJheSBvZiBzdHJpbmdzIHdoaWNoIGFyZSBzbmlwcGV0cyBvZlxuICogICAgICAgIGdlbmVyYXRlZCBKUywgb3Igb3RoZXIgU291cmNlTm9kZXMuXG4gKiBAcGFyYW0gYU5hbWUgVGhlIG9yaWdpbmFsIGlkZW50aWZpZXIuXG4gKi9cbmZ1bmN0aW9uIFNvdXJjZU5vZGUoYUxpbmUsIGFDb2x1bW4sIGFTb3VyY2UsIGFDaHVua3MsIGFOYW1lKSB7XG4gIHRoaXMuY2hpbGRyZW4gPSBbXTtcbiAgdGhpcy5zb3VyY2VDb250ZW50cyA9IHt9O1xuICB0aGlzLmxpbmUgPSBhTGluZSA9PSBudWxsID8gbnVsbCA6IGFMaW5lO1xuICB0aGlzLmNvbHVtbiA9IGFDb2x1bW4gPT0gbnVsbCA/IG51bGwgOiBhQ29sdW1uO1xuICB0aGlzLnNvdXJjZSA9IGFTb3VyY2UgPT0gbnVsbCA/IG51bGwgOiBhU291cmNlO1xuICB0aGlzLm5hbWUgPSBhTmFtZSA9PSBudWxsID8gbnVsbCA6IGFOYW1lO1xuICB0aGlzW2lzU291cmNlTm9kZV0gPSB0cnVlO1xuICBpZiAoYUNodW5rcyAhPSBudWxsKSB0aGlzLmFkZChhQ2h1bmtzKTtcbn1cblxuLyoqXG4gKiBDcmVhdGVzIGEgU291cmNlTm9kZSBmcm9tIGdlbmVyYXRlZCBjb2RlIGFuZCBhIFNvdXJjZU1hcENvbnN1bWVyLlxuICpcbiAqIEBwYXJhbSBhR2VuZXJhdGVkQ29kZSBUaGUgZ2VuZXJhdGVkIGNvZGVcbiAqIEBwYXJhbSBhU291cmNlTWFwQ29uc3VtZXIgVGhlIFNvdXJjZU1hcCBmb3IgdGhlIGdlbmVyYXRlZCBjb2RlXG4gKiBAcGFyYW0gYVJlbGF0aXZlUGF0aCBPcHRpb25hbC4gVGhlIHBhdGggdGhhdCByZWxhdGl2ZSBzb3VyY2VzIGluIHRoZVxuICogICAgICAgIFNvdXJjZU1hcENvbnN1bWVyIHNob3VsZCBiZSByZWxhdGl2ZSB0by5cbiAqL1xuU291cmNlTm9kZS5mcm9tU3RyaW5nV2l0aFNvdXJjZU1hcCA9XG4gIGZ1bmN0aW9uIFNvdXJjZU5vZGVfZnJvbVN0cmluZ1dpdGhTb3VyY2VNYXAoYUdlbmVyYXRlZENvZGUsIGFTb3VyY2VNYXBDb25zdW1lciwgYVJlbGF0aXZlUGF0aCkge1xuICAgIC8vIFRoZSBTb3VyY2VOb2RlIHdlIHdhbnQgdG8gZmlsbCB3aXRoIHRoZSBnZW5lcmF0ZWQgY29kZVxuICAgIC8vIGFuZCB0aGUgU291cmNlTWFwXG4gICAgdmFyIG5vZGUgPSBuZXcgU291cmNlTm9kZSgpO1xuXG4gICAgLy8gQWxsIGV2ZW4gaW5kaWNlcyBvZiB0aGlzIGFycmF5IGFyZSBvbmUgbGluZSBvZiB0aGUgZ2VuZXJhdGVkIGNvZGUsXG4gICAgLy8gd2hpbGUgYWxsIG9kZCBpbmRpY2VzIGFyZSB0aGUgbmV3bGluZXMgYmV0d2VlbiB0d28gYWRqYWNlbnQgbGluZXNcbiAgICAvLyAoc2luY2UgYFJFR0VYX05FV0xJTkVgIGNhcHR1cmVzIGl0cyBtYXRjaCkuXG4gICAgLy8gUHJvY2Vzc2VkIGZyYWdtZW50cyBhcmUgcmVtb3ZlZCBmcm9tIHRoaXMgYXJyYXksIGJ5IGNhbGxpbmcgYHNoaWZ0TmV4dExpbmVgLlxuICAgIHZhciByZW1haW5pbmdMaW5lcyA9IGFHZW5lcmF0ZWRDb2RlLnNwbGl0KFJFR0VYX05FV0xJTkUpO1xuICAgIHZhciBzaGlmdE5leHRMaW5lID0gZnVuY3Rpb24oKSB7XG4gICAgICB2YXIgbGluZUNvbnRlbnRzID0gcmVtYWluaW5nTGluZXMuc2hpZnQoKTtcbiAgICAgIC8vIFRoZSBsYXN0IGxpbmUgb2YgYSBmaWxlIG1pZ2h0IG5vdCBoYXZlIGEgbmV3bGluZS5cbiAgICAgIHZhciBuZXdMaW5lID0gcmVtYWluaW5nTGluZXMuc2hpZnQoKSB8fCBcIlwiO1xuICAgICAgcmV0dXJuIGxpbmVDb250ZW50cyArIG5ld0xpbmU7XG4gICAgfTtcblxuICAgIC8vIFdlIG5lZWQgdG8gcmVtZW1iZXIgdGhlIHBvc2l0aW9uIG9mIFwicmVtYWluaW5nTGluZXNcIlxuICAgIHZhciBsYXN0R2VuZXJhdGVkTGluZSA9IDEsIGxhc3RHZW5lcmF0ZWRDb2x1bW4gPSAwO1xuXG4gICAgLy8gVGhlIGdlbmVyYXRlIFNvdXJjZU5vZGVzIHdlIG5lZWQgYSBjb2RlIHJhbmdlLlxuICAgIC8vIFRvIGV4dHJhY3QgaXQgY3VycmVudCBhbmQgbGFzdCBtYXBwaW5nIGlzIHVzZWQuXG4gICAgLy8gSGVyZSB3ZSBzdG9yZSB0aGUgbGFzdCBtYXBwaW5nLlxuICAgIHZhciBsYXN0TWFwcGluZyA9IG51bGw7XG5cbiAgICBhU291cmNlTWFwQ29uc3VtZXIuZWFjaE1hcHBpbmcoZnVuY3Rpb24gKG1hcHBpbmcpIHtcbiAgICAgIGlmIChsYXN0TWFwcGluZyAhPT0gbnVsbCkge1xuICAgICAgICAvLyBXZSBhZGQgdGhlIGNvZGUgZnJvbSBcImxhc3RNYXBwaW5nXCIgdG8gXCJtYXBwaW5nXCI6XG4gICAgICAgIC8vIEZpcnN0IGNoZWNrIGlmIHRoZXJlIGlzIGEgbmV3IGxpbmUgaW4gYmV0d2Vlbi5cbiAgICAgICAgaWYgKGxhc3RHZW5lcmF0ZWRMaW5lIDwgbWFwcGluZy5nZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgICAgLy8gQXNzb2NpYXRlIGZpcnN0IGxpbmUgd2l0aCBcImxhc3RNYXBwaW5nXCJcbiAgICAgICAgICBhZGRNYXBwaW5nV2l0aENvZGUobGFzdE1hcHBpbmcsIHNoaWZ0TmV4dExpbmUoKSk7XG4gICAgICAgICAgbGFzdEdlbmVyYXRlZExpbmUrKztcbiAgICAgICAgICBsYXN0R2VuZXJhdGVkQ29sdW1uID0gMDtcbiAgICAgICAgICAvLyBUaGUgcmVtYWluaW5nIGNvZGUgaXMgYWRkZWQgd2l0aG91dCBtYXBwaW5nXG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgLy8gVGhlcmUgaXMgbm8gbmV3IGxpbmUgaW4gYmV0d2Vlbi5cbiAgICAgICAgICAvLyBBc3NvY2lhdGUgdGhlIGNvZGUgYmV0d2VlbiBcImxhc3RHZW5lcmF0ZWRDb2x1bW5cIiBhbmRcbiAgICAgICAgICAvLyBcIm1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uXCIgd2l0aCBcImxhc3RNYXBwaW5nXCJcbiAgICAgICAgICB2YXIgbmV4dExpbmUgPSByZW1haW5pbmdMaW5lc1swXTtcbiAgICAgICAgICB2YXIgY29kZSA9IG5leHRMaW5lLnN1YnN0cigwLCBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbiAtXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFzdEdlbmVyYXRlZENvbHVtbik7XG4gICAgICAgICAgcmVtYWluaW5nTGluZXNbMF0gPSBuZXh0TGluZS5zdWJzdHIobWFwcGluZy5nZW5lcmF0ZWRDb2x1bW4gLVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RHZW5lcmF0ZWRDb2x1bW4pO1xuICAgICAgICAgIGxhc3RHZW5lcmF0ZWRDb2x1bW4gPSBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbjtcbiAgICAgICAgICBhZGRNYXBwaW5nV2l0aENvZGUobGFzdE1hcHBpbmcsIGNvZGUpO1xuICAgICAgICAgIC8vIE5vIG1vcmUgcmVtYWluaW5nIGNvZGUsIGNvbnRpbnVlXG4gICAgICAgICAgbGFzdE1hcHBpbmcgPSBtYXBwaW5nO1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgLy8gV2UgYWRkIHRoZSBnZW5lcmF0ZWQgY29kZSB1bnRpbCB0aGUgZmlyc3QgbWFwcGluZ1xuICAgICAgLy8gdG8gdGhlIFNvdXJjZU5vZGUgd2l0aG91dCBhbnkgbWFwcGluZy5cbiAgICAgIC8vIEVhY2ggbGluZSBpcyBhZGRlZCBhcyBzZXBhcmF0ZSBzdHJpbmcuXG4gICAgICB3aGlsZSAobGFzdEdlbmVyYXRlZExpbmUgPCBtYXBwaW5nLmdlbmVyYXRlZExpbmUpIHtcbiAgICAgICAgbm9kZS5hZGQoc2hpZnROZXh0TGluZSgpKTtcbiAgICAgICAgbGFzdEdlbmVyYXRlZExpbmUrKztcbiAgICAgIH1cbiAgICAgIGlmIChsYXN0R2VuZXJhdGVkQ29sdW1uIDwgbWFwcGluZy5nZW5lcmF0ZWRDb2x1bW4pIHtcbiAgICAgICAgdmFyIG5leHRMaW5lID0gcmVtYWluaW5nTGluZXNbMF07XG4gICAgICAgIG5vZGUuYWRkKG5leHRMaW5lLnN1YnN0cigwLCBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbikpO1xuICAgICAgICByZW1haW5pbmdMaW5lc1swXSA9IG5leHRMaW5lLnN1YnN0cihtYXBwaW5nLmdlbmVyYXRlZENvbHVtbik7XG4gICAgICAgIGxhc3RHZW5lcmF0ZWRDb2x1bW4gPSBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbjtcbiAgICAgIH1cbiAgICAgIGxhc3RNYXBwaW5nID0gbWFwcGluZztcbiAgICB9LCB0aGlzKTtcbiAgICAvLyBXZSBoYXZlIHByb2Nlc3NlZCBhbGwgbWFwcGluZ3MuXG4gICAgaWYgKHJlbWFpbmluZ0xpbmVzLmxlbmd0aCA+IDApIHtcbiAgICAgIGlmIChsYXN0TWFwcGluZykge1xuICAgICAgICAvLyBBc3NvY2lhdGUgdGhlIHJlbWFpbmluZyBjb2RlIGluIHRoZSBjdXJyZW50IGxpbmUgd2l0aCBcImxhc3RNYXBwaW5nXCJcbiAgICAgICAgYWRkTWFwcGluZ1dpdGhDb2RlKGxhc3RNYXBwaW5nLCBzaGlmdE5leHRMaW5lKCkpO1xuICAgICAgfVxuICAgICAgLy8gYW5kIGFkZCB0aGUgcmVtYWluaW5nIGxpbmVzIHdpdGhvdXQgYW55IG1hcHBpbmdcbiAgICAgIG5vZGUuYWRkKHJlbWFpbmluZ0xpbmVzLmpvaW4oXCJcIikpO1xuICAgIH1cblxuICAgIC8vIENvcHkgc291cmNlc0NvbnRlbnQgaW50byBTb3VyY2VOb2RlXG4gICAgYVNvdXJjZU1hcENvbnN1bWVyLnNvdXJjZXMuZm9yRWFjaChmdW5jdGlvbiAoc291cmNlRmlsZSkge1xuICAgICAgdmFyIGNvbnRlbnQgPSBhU291cmNlTWFwQ29uc3VtZXIuc291cmNlQ29udGVudEZvcihzb3VyY2VGaWxlKTtcbiAgICAgIGlmIChjb250ZW50ICE9IG51bGwpIHtcbiAgICAgICAgaWYgKGFSZWxhdGl2ZVBhdGggIT0gbnVsbCkge1xuICAgICAgICAgIHNvdXJjZUZpbGUgPSB1dGlsLmpvaW4oYVJlbGF0aXZlUGF0aCwgc291cmNlRmlsZSk7XG4gICAgICAgIH1cbiAgICAgICAgbm9kZS5zZXRTb3VyY2VDb250ZW50KHNvdXJjZUZpbGUsIGNvbnRlbnQpO1xuICAgICAgfVxuICAgIH0pO1xuXG4gICAgcmV0dXJuIG5vZGU7XG5cbiAgICBmdW5jdGlvbiBhZGRNYXBwaW5nV2l0aENvZGUobWFwcGluZywgY29kZSkge1xuICAgICAgaWYgKG1hcHBpbmcgPT09IG51bGwgfHwgbWFwcGluZy5zb3VyY2UgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICBub2RlLmFkZChjb2RlKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHZhciBzb3VyY2UgPSBhUmVsYXRpdmVQYXRoXG4gICAgICAgICAgPyB1dGlsLmpvaW4oYVJlbGF0aXZlUGF0aCwgbWFwcGluZy5zb3VyY2UpXG4gICAgICAgICAgOiBtYXBwaW5nLnNvdXJjZTtcbiAgICAgICAgbm9kZS5hZGQobmV3IFNvdXJjZU5vZGUobWFwcGluZy5vcmlnaW5hbExpbmUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hcHBpbmcub3JpZ2luYWxDb2x1bW4sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNvdXJjZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29kZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFwcGluZy5uYW1lKSk7XG4gICAgICB9XG4gICAgfVxuICB9O1xuXG4vKipcbiAqIEFkZCBhIGNodW5rIG9mIGdlbmVyYXRlZCBKUyB0byB0aGlzIHNvdXJjZSBub2RlLlxuICpcbiAqIEBwYXJhbSBhQ2h1bmsgQSBzdHJpbmcgc25pcHBldCBvZiBnZW5lcmF0ZWQgSlMgY29kZSwgYW5vdGhlciBpbnN0YW5jZSBvZlxuICogICAgICAgIFNvdXJjZU5vZGUsIG9yIGFuIGFycmF5IHdoZXJlIGVhY2ggbWVtYmVyIGlzIG9uZSBvZiB0aG9zZSB0aGluZ3MuXG4gKi9cblNvdXJjZU5vZGUucHJvdG90eXBlLmFkZCA9IGZ1bmN0aW9uIFNvdXJjZU5vZGVfYWRkKGFDaHVuaykge1xuICBpZiAoQXJyYXkuaXNBcnJheShhQ2h1bmspKSB7XG4gICAgYUNodW5rLmZvckVhY2goZnVuY3Rpb24gKGNodW5rKSB7XG4gICAgICB0aGlzLmFkZChjaHVuayk7XG4gICAgfSwgdGhpcyk7XG4gIH1cbiAgZWxzZSBpZiAoYUNodW5rW2lzU291cmNlTm9kZV0gfHwgdHlwZW9mIGFDaHVuayA9PT0gXCJzdHJpbmdcIikge1xuICAgIGlmIChhQ2h1bmspIHtcbiAgICAgIHRoaXMuY2hpbGRyZW4ucHVzaChhQ2h1bmspO1xuICAgIH1cbiAgfVxuICBlbHNlIHtcbiAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFxuICAgICAgXCJFeHBlY3RlZCBhIFNvdXJjZU5vZGUsIHN0cmluZywgb3IgYW4gYXJyYXkgb2YgU291cmNlTm9kZXMgYW5kIHN0cmluZ3MuIEdvdCBcIiArIGFDaHVua1xuICAgICk7XG4gIH1cbiAgcmV0dXJuIHRoaXM7XG59O1xuXG4vKipcbiAqIEFkZCBhIGNodW5rIG9mIGdlbmVyYXRlZCBKUyB0byB0aGUgYmVnaW5uaW5nIG9mIHRoaXMgc291cmNlIG5vZGUuXG4gKlxuICogQHBhcmFtIGFDaHVuayBBIHN0cmluZyBzbmlwcGV0IG9mIGdlbmVyYXRlZCBKUyBjb2RlLCBhbm90aGVyIGluc3RhbmNlIG9mXG4gKiAgICAgICAgU291cmNlTm9kZSwgb3IgYW4gYXJyYXkgd2hlcmUgZWFjaCBtZW1iZXIgaXMgb25lIG9mIHRob3NlIHRoaW5ncy5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUucHJlcGVuZCA9IGZ1bmN0aW9uIFNvdXJjZU5vZGVfcHJlcGVuZChhQ2h1bmspIHtcbiAgaWYgKEFycmF5LmlzQXJyYXkoYUNodW5rKSkge1xuICAgIGZvciAodmFyIGkgPSBhQ2h1bmsubGVuZ3RoLTE7IGkgPj0gMDsgaS0tKSB7XG4gICAgICB0aGlzLnByZXBlbmQoYUNodW5rW2ldKTtcbiAgICB9XG4gIH1cbiAgZWxzZSBpZiAoYUNodW5rW2lzU291cmNlTm9kZV0gfHwgdHlwZW9mIGFDaHVuayA9PT0gXCJzdHJpbmdcIikge1xuICAgIHRoaXMuY2hpbGRyZW4udW5zaGlmdChhQ2h1bmspO1xuICB9XG4gIGVsc2Uge1xuICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXG4gICAgICBcIkV4cGVjdGVkIGEgU291cmNlTm9kZSwgc3RyaW5nLCBvciBhbiBhcnJheSBvZiBTb3VyY2VOb2RlcyBhbmQgc3RyaW5ncy4gR290IFwiICsgYUNodW5rXG4gICAgKTtcbiAgfVxuICByZXR1cm4gdGhpcztcbn07XG5cbi8qKlxuICogV2FsayBvdmVyIHRoZSB0cmVlIG9mIEpTIHNuaXBwZXRzIGluIHRoaXMgbm9kZSBhbmQgaXRzIGNoaWxkcmVuLiBUaGVcbiAqIHdhbGtpbmcgZnVuY3Rpb24gaXMgY2FsbGVkIG9uY2UgZm9yIGVhY2ggc25pcHBldCBvZiBKUyBhbmQgaXMgcGFzc2VkIHRoYXRcbiAqIHNuaXBwZXQgYW5kIHRoZSBpdHMgb3JpZ2luYWwgYXNzb2NpYXRlZCBzb3VyY2UncyBsaW5lL2NvbHVtbiBsb2NhdGlvbi5cbiAqXG4gKiBAcGFyYW0gYUZuIFRoZSB0cmF2ZXJzYWwgZnVuY3Rpb24uXG4gKi9cblNvdXJjZU5vZGUucHJvdG90eXBlLndhbGsgPSBmdW5jdGlvbiBTb3VyY2VOb2RlX3dhbGsoYUZuKSB7XG4gIHZhciBjaHVuaztcbiAgZm9yICh2YXIgaSA9IDAsIGxlbiA9IHRoaXMuY2hpbGRyZW4ubGVuZ3RoOyBpIDwgbGVuOyBpKyspIHtcbiAgICBjaHVuayA9IHRoaXMuY2hpbGRyZW5baV07XG4gICAgaWYgKGNodW5rW2lzU291cmNlTm9kZV0pIHtcbiAgICAgIGNodW5rLndhbGsoYUZuKTtcbiAgICB9XG4gICAgZWxzZSB7XG4gICAgICBpZiAoY2h1bmsgIT09ICcnKSB7XG4gICAgICAgIGFGbihjaHVuaywgeyBzb3VyY2U6IHRoaXMuc291cmNlLFxuICAgICAgICAgICAgICAgICAgICAgbGluZTogdGhpcy5saW5lLFxuICAgICAgICAgICAgICAgICAgICAgY29sdW1uOiB0aGlzLmNvbHVtbixcbiAgICAgICAgICAgICAgICAgICAgIG5hbWU6IHRoaXMubmFtZSB9KTtcbiAgICAgIH1cbiAgICB9XG4gIH1cbn07XG5cbi8qKlxuICogTGlrZSBgU3RyaW5nLnByb3RvdHlwZS5qb2luYCBleGNlcHQgZm9yIFNvdXJjZU5vZGVzLiBJbnNlcnRzIGBhU3RyYCBiZXR3ZWVuXG4gKiBlYWNoIG9mIGB0aGlzLmNoaWxkcmVuYC5cbiAqXG4gKiBAcGFyYW0gYVNlcCBUaGUgc2VwYXJhdG9yLlxuICovXG5Tb3VyY2VOb2RlLnByb3RvdHlwZS5qb2luID0gZnVuY3Rpb24gU291cmNlTm9kZV9qb2luKGFTZXApIHtcbiAgdmFyIG5ld0NoaWxkcmVuO1xuICB2YXIgaTtcbiAgdmFyIGxlbiA9IHRoaXMuY2hpbGRyZW4ubGVuZ3RoO1xuICBpZiAobGVuID4gMCkge1xuICAgIG5ld0NoaWxkcmVuID0gW107XG4gICAgZm9yIChpID0gMDsgaSA8IGxlbi0xOyBpKyspIHtcbiAgICAgIG5ld0NoaWxkcmVuLnB1c2godGhpcy5jaGlsZHJlbltpXSk7XG4gICAgICBuZXdDaGlsZHJlbi5wdXNoKGFTZXApO1xuICAgIH1cbiAgICBuZXdDaGlsZHJlbi5wdXNoKHRoaXMuY2hpbGRyZW5baV0pO1xuICAgIHRoaXMuY2hpbGRyZW4gPSBuZXdDaGlsZHJlbjtcbiAgfVxuICByZXR1cm4gdGhpcztcbn07XG5cbi8qKlxuICogQ2FsbCBTdHJpbmcucHJvdG90eXBlLnJlcGxhY2Ugb24gdGhlIHZlcnkgcmlnaHQtbW9zdCBzb3VyY2Ugc25pcHBldC4gVXNlZnVsXG4gKiBmb3IgdHJpbW1pbmcgd2hpdGVzcGFjZSBmcm9tIHRoZSBlbmQgb2YgYSBzb3VyY2Ugbm9kZSwgZXRjLlxuICpcbiAqIEBwYXJhbSBhUGF0dGVybiBUaGUgcGF0dGVybiB0byByZXBsYWNlLlxuICogQHBhcmFtIGFSZXBsYWNlbWVudCBUaGUgdGhpbmcgdG8gcmVwbGFjZSB0aGUgcGF0dGVybiB3aXRoLlxuICovXG5Tb3VyY2VOb2RlLnByb3RvdHlwZS5yZXBsYWNlUmlnaHQgPSBmdW5jdGlvbiBTb3VyY2VOb2RlX3JlcGxhY2VSaWdodChhUGF0dGVybiwgYVJlcGxhY2VtZW50KSB7XG4gIHZhciBsYXN0Q2hpbGQgPSB0aGlzLmNoaWxkcmVuW3RoaXMuY2hpbGRyZW4ubGVuZ3RoIC0gMV07XG4gIGlmIChsYXN0Q2hpbGRbaXNTb3VyY2VOb2RlXSkge1xuICAgIGxhc3RDaGlsZC5yZXBsYWNlUmlnaHQoYVBhdHRlcm4sIGFSZXBsYWNlbWVudCk7XG4gIH1cbiAgZWxzZSBpZiAodHlwZW9mIGxhc3RDaGlsZCA9PT0gJ3N0cmluZycpIHtcbiAgICB0aGlzLmNoaWxkcmVuW3RoaXMuY2hpbGRyZW4ubGVuZ3RoIC0gMV0gPSBsYXN0Q2hpbGQucmVwbGFjZShhUGF0dGVybiwgYVJlcGxhY2VtZW50KTtcbiAgfVxuICBlbHNlIHtcbiAgICB0aGlzLmNoaWxkcmVuLnB1c2goJycucmVwbGFjZShhUGF0dGVybiwgYVJlcGxhY2VtZW50KSk7XG4gIH1cbiAgcmV0dXJuIHRoaXM7XG59O1xuXG4vKipcbiAqIFNldCB0aGUgc291cmNlIGNvbnRlbnQgZm9yIGEgc291cmNlIGZpbGUuIFRoaXMgd2lsbCBiZSBhZGRlZCB0byB0aGUgU291cmNlTWFwR2VuZXJhdG9yXG4gKiBpbiB0aGUgc291cmNlc0NvbnRlbnQgZmllbGQuXG4gKlxuICogQHBhcmFtIGFTb3VyY2VGaWxlIFRoZSBmaWxlbmFtZSBvZiB0aGUgc291cmNlIGZpbGVcbiAqIEBwYXJhbSBhU291cmNlQ29udGVudCBUaGUgY29udGVudCBvZiB0aGUgc291cmNlIGZpbGVcbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUuc2V0U291cmNlQ29udGVudCA9XG4gIGZ1bmN0aW9uIFNvdXJjZU5vZGVfc2V0U291cmNlQ29udGVudChhU291cmNlRmlsZSwgYVNvdXJjZUNvbnRlbnQpIHtcbiAgICB0aGlzLnNvdXJjZUNvbnRlbnRzW3V0aWwudG9TZXRTdHJpbmcoYVNvdXJjZUZpbGUpXSA9IGFTb3VyY2VDb250ZW50O1xuICB9O1xuXG4vKipcbiAqIFdhbGsgb3ZlciB0aGUgdHJlZSBvZiBTb3VyY2VOb2Rlcy4gVGhlIHdhbGtpbmcgZnVuY3Rpb24gaXMgY2FsbGVkIGZvciBlYWNoXG4gKiBzb3VyY2UgZmlsZSBjb250ZW50IGFuZCBpcyBwYXNzZWQgdGhlIGZpbGVuYW1lIGFuZCBzb3VyY2UgY29udGVudC5cbiAqXG4gKiBAcGFyYW0gYUZuIFRoZSB0cmF2ZXJzYWwgZnVuY3Rpb24uXG4gKi9cblNvdXJjZU5vZGUucHJvdG90eXBlLndhbGtTb3VyY2VDb250ZW50cyA9XG4gIGZ1bmN0aW9uIFNvdXJjZU5vZGVfd2Fsa1NvdXJjZUNvbnRlbnRzKGFGbikge1xuICAgIGZvciAodmFyIGkgPSAwLCBsZW4gPSB0aGlzLmNoaWxkcmVuLmxlbmd0aDsgaSA8IGxlbjsgaSsrKSB7XG4gICAgICBpZiAodGhpcy5jaGlsZHJlbltpXVtpc1NvdXJjZU5vZGVdKSB7XG4gICAgICAgIHRoaXMuY2hpbGRyZW5baV0ud2Fsa1NvdXJjZUNvbnRlbnRzKGFGbik7XG4gICAgICB9XG4gICAgfVxuXG4gICAgdmFyIHNvdXJjZXMgPSBPYmplY3Qua2V5cyh0aGlzLnNvdXJjZUNvbnRlbnRzKTtcbiAgICBmb3IgKHZhciBpID0gMCwgbGVuID0gc291cmNlcy5sZW5ndGg7IGkgPCBsZW47IGkrKykge1xuICAgICAgYUZuKHV0aWwuZnJvbVNldFN0cmluZyhzb3VyY2VzW2ldKSwgdGhpcy5zb3VyY2VDb250ZW50c1tzb3VyY2VzW2ldXSk7XG4gICAgfVxuICB9O1xuXG4vKipcbiAqIFJldHVybiB0aGUgc3RyaW5nIHJlcHJlc2VudGF0aW9uIG9mIHRoaXMgc291cmNlIG5vZGUuIFdhbGtzIG92ZXIgdGhlIHRyZWVcbiAqIGFuZCBjb25jYXRlbmF0ZXMgYWxsIHRoZSB2YXJpb3VzIHNuaXBwZXRzIHRvZ2V0aGVyIHRvIG9uZSBzdHJpbmcuXG4gKi9cblNvdXJjZU5vZGUucHJvdG90eXBlLnRvU3RyaW5nID0gZnVuY3Rpb24gU291cmNlTm9kZV90b1N0cmluZygpIHtcbiAgdmFyIHN0ciA9IFwiXCI7XG4gIHRoaXMud2FsayhmdW5jdGlvbiAoY2h1bmspIHtcbiAgICBzdHIgKz0gY2h1bms7XG4gIH0pO1xuICByZXR1cm4gc3RyO1xufTtcblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBzdHJpbmcgcmVwcmVzZW50YXRpb24gb2YgdGhpcyBzb3VyY2Ugbm9kZSBhbG9uZyB3aXRoIGEgc291cmNlXG4gKiBtYXAuXG4gKi9cblNvdXJjZU5vZGUucHJvdG90eXBlLnRvU3RyaW5nV2l0aFNvdXJjZU1hcCA9IGZ1bmN0aW9uIFNvdXJjZU5vZGVfdG9TdHJpbmdXaXRoU291cmNlTWFwKGFBcmdzKSB7XG4gIHZhciBnZW5lcmF0ZWQgPSB7XG4gICAgY29kZTogXCJcIixcbiAgICBsaW5lOiAxLFxuICAgIGNvbHVtbjogMFxuICB9O1xuICB2YXIgbWFwID0gbmV3IFNvdXJjZU1hcEdlbmVyYXRvcihhQXJncyk7XG4gIHZhciBzb3VyY2VNYXBwaW5nQWN0aXZlID0gZmFsc2U7XG4gIHZhciBsYXN0T3JpZ2luYWxTb3VyY2UgPSBudWxsO1xuICB2YXIgbGFzdE9yaWdpbmFsTGluZSA9IG51bGw7XG4gIHZhciBsYXN0T3JpZ2luYWxDb2x1bW4gPSBudWxsO1xuICB2YXIgbGFzdE9yaWdpbmFsTmFtZSA9IG51bGw7XG4gIHRoaXMud2FsayhmdW5jdGlvbiAoY2h1bmssIG9yaWdpbmFsKSB7XG4gICAgZ2VuZXJhdGVkLmNvZGUgKz0gY2h1bms7XG4gICAgaWYgKG9yaWdpbmFsLnNvdXJjZSAhPT0gbnVsbFxuICAgICAgICAmJiBvcmlnaW5hbC5saW5lICE9PSBudWxsXG4gICAgICAgICYmIG9yaWdpbmFsLmNvbHVtbiAhPT0gbnVsbCkge1xuICAgICAgaWYobGFzdE9yaWdpbmFsU291cmNlICE9PSBvcmlnaW5hbC5zb3VyY2VcbiAgICAgICAgIHx8IGxhc3RPcmlnaW5hbExpbmUgIT09IG9yaWdpbmFsLmxpbmVcbiAgICAgICAgIHx8IGxhc3RPcmlnaW5hbENvbHVtbiAhPT0gb3JpZ2luYWwuY29sdW1uXG4gICAgICAgICB8fCBsYXN0T3JpZ2luYWxOYW1lICE9PSBvcmlnaW5hbC5uYW1lKSB7XG4gICAgICAgIG1hcC5hZGRNYXBwaW5nKHtcbiAgICAgICAgICBzb3VyY2U6IG9yaWdpbmFsLnNvdXJjZSxcbiAgICAgICAgICBvcmlnaW5hbDoge1xuICAgICAgICAgICAgbGluZTogb3JpZ2luYWwubGluZSxcbiAgICAgICAgICAgIGNvbHVtbjogb3JpZ2luYWwuY29sdW1uXG4gICAgICAgICAgfSxcbiAgICAgICAgICBnZW5lcmF0ZWQ6IHtcbiAgICAgICAgICAgIGxpbmU6IGdlbmVyYXRlZC5saW5lLFxuICAgICAgICAgICAgY29sdW1uOiBnZW5lcmF0ZWQuY29sdW1uXG4gICAgICAgICAgfSxcbiAgICAgICAgICBuYW1lOiBvcmlnaW5hbC5uYW1lXG4gICAgICAgIH0pO1xuICAgICAgfVxuICAgICAgbGFzdE9yaWdpbmFsU291cmNlID0gb3JpZ2luYWwuc291cmNlO1xuICAgICAgbGFzdE9yaWdpbmFsTGluZSA9IG9yaWdpbmFsLmxpbmU7XG4gICAgICBsYXN0T3JpZ2luYWxDb2x1bW4gPSBvcmlnaW5hbC5jb2x1bW47XG4gICAgICBsYXN0T3JpZ2luYWxOYW1lID0gb3JpZ2luYWwubmFtZTtcbiAgICAgIHNvdXJjZU1hcHBpbmdBY3RpdmUgPSB0cnVlO1xuICAgIH0gZWxzZSBpZiAoc291cmNlTWFwcGluZ0FjdGl2ZSkge1xuICAgICAgbWFwLmFkZE1hcHBpbmcoe1xuICAgICAgICBnZW5lcmF0ZWQ6IHtcbiAgICAgICAgICBsaW5lOiBnZW5lcmF0ZWQubGluZSxcbiAgICAgICAgICBjb2x1bW46IGdlbmVyYXRlZC5jb2x1bW5cbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICBsYXN0T3JpZ2luYWxTb3VyY2UgPSBudWxsO1xuICAgICAgc291cmNlTWFwcGluZ0FjdGl2ZSA9IGZhbHNlO1xuICAgIH1cbiAgICBmb3IgKHZhciBpZHggPSAwLCBsZW5ndGggPSBjaHVuay5sZW5ndGg7IGlkeCA8IGxlbmd0aDsgaWR4KyspIHtcbiAgICAgIGlmIChjaHVuay5jaGFyQ29kZUF0KGlkeCkgPT09IE5FV0xJTkVfQ09ERSkge1xuICAgICAgICBnZW5lcmF0ZWQubGluZSsrO1xuICAgICAgICBnZW5lcmF0ZWQuY29sdW1uID0gMDtcbiAgICAgICAgLy8gTWFwcGluZ3MgZW5kIGF0IGVvbFxuICAgICAgICBpZiAoaWR4ICsgMSA9PT0gbGVuZ3RoKSB7XG4gICAgICAgICAgbGFzdE9yaWdpbmFsU291cmNlID0gbnVsbDtcbiAgICAgICAgICBzb3VyY2VNYXBwaW5nQWN0aXZlID0gZmFsc2U7XG4gICAgICAgIH0gZWxzZSBpZiAoc291cmNlTWFwcGluZ0FjdGl2ZSkge1xuICAgICAgICAgIG1hcC5hZGRNYXBwaW5nKHtcbiAgICAgICAgICAgIHNvdXJjZTogb3JpZ2luYWwuc291cmNlLFxuICAgICAgICAgICAgb3JpZ2luYWw6IHtcbiAgICAgICAgICAgICAgbGluZTogb3JpZ2luYWwubGluZSxcbiAgICAgICAgICAgICAgY29sdW1uOiBvcmlnaW5hbC5jb2x1bW5cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBnZW5lcmF0ZWQ6IHtcbiAgICAgICAgICAgICAgbGluZTogZ2VuZXJhdGVkLmxpbmUsXG4gICAgICAgICAgICAgIGNvbHVtbjogZ2VuZXJhdGVkLmNvbHVtblxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIG5hbWU6IG9yaWdpbmFsLm5hbWVcbiAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgZ2VuZXJhdGVkLmNvbHVtbisrO1xuICAgICAgfVxuICAgIH1cbiAgfSk7XG4gIHRoaXMud2Fsa1NvdXJjZUNvbnRlbnRzKGZ1bmN0aW9uIChzb3VyY2VGaWxlLCBzb3VyY2VDb250ZW50KSB7XG4gICAgbWFwLnNldFNvdXJjZUNvbnRlbnQoc291cmNlRmlsZSwgc291cmNlQ29udGVudCk7XG4gIH0pO1xuXG4gIHJldHVybiB7IGNvZGU6IGdlbmVyYXRlZC5jb2RlLCBtYXA6IG1hcCB9O1xufTtcblxuZXhwb3J0cy5Tb3VyY2VOb2RlID0gU291cmNlTm9kZTtcblxuXG5cbi8qKioqKioqKioqKioqKioqKlxuICoqIFdFQlBBQ0sgRk9PVEVSXG4gKiogLi9saWIvc291cmNlLW5vZGUuanNcbiAqKiBtb2R1bGUgaWQgPSAxMFxuICoqIG1vZHVsZSBjaHVua3MgPSAwXG4gKiovIl0sInNvdXJjZVJvb3QiOiIifQ== \ No newline at end of file diff --git a/node_modules/uglify-js/node_modules/source-map/dist/source-map.js b/node_modules/uglify-js/node_modules/source-map/dist/source-map.js new file mode 100644 index 0000000..61c0d8d --- /dev/null +++ b/node_modules/uglify-js/node_modules/source-map/dist/source-map.js @@ -0,0 +1,3055 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["sourceMap"] = factory(); + else + root["sourceMap"] = factory(); +})(this, function() { +return /******/ (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] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = 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; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ function(module, exports, __webpack_require__) { + + /* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ + exports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; + exports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer; + exports.SourceNode = __webpack_require__(10).SourceNode; + + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var base64VLQ = __webpack_require__(2); + var util = __webpack_require__(4); + var ArraySet = __webpack_require__(5).ArraySet; + var MappingList = __webpack_require__(6).MappingList; + + /** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ + function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; + } + + SourceMapGenerator.prototype._version = 3; + + /** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ + SourceMapGenerator.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator({ + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + }); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + + /** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ + SourceMapGenerator.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + this._validateMapping(generated, original, source, name); + } + + if (source != null) { + source = String(source); + if (!this._sources.has(source)) { + this._sources.add(source); + } + } + + if (name != null) { + name = String(name); + if (!this._names.has(name)) { + this._names.add(name); + } + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + + /** + * Set the source content for a source file. + */ + SourceMapGenerator.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = Object.create(null); + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + + /** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ + SourceMapGenerator.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + + 'or the source map\'s "file" property. Both were omitted.' + ); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "sourceFile" relative if an absolute Url is passed. + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + // Find mappings for the "sourceFile" + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source) + } + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + + /** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ + SourceMapGenerator.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aOriginal && 'line' in aOriginal && 'column' in aOriginal + && aGenerated.line > 0 && aGenerated.column >= 0 + && aOriginal.line > 0 && aOriginal.column >= 0 + && aSource) { + // Cases 2 and 3. + return; + } + else { + throw new Error('Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + })); + } + }; + + /** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ + SourceMapGenerator.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var next; + var mapping; + var nameIdx; + var sourceIdx; + + var mappings = this._mappings.toArray(); + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + next = '' + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + next += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + next += ','; + } + } + + next += base64VLQ.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + next += base64VLQ.encode(sourceIdx - previousSource); + previousSource = sourceIdx; + + // lines are stored 0-based in SourceMap spec version 3 + next += base64VLQ.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + next += base64VLQ.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + next += base64VLQ.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + + result += next; + } + + return result; + }; + + SourceMapGenerator.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) + ? this._sourcesContents[key] + : null; + }, this); + }; + + /** + * Externalize the source map. + */ + SourceMapGenerator.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + + /** + * Render the source map being generated to a string. + */ + SourceMapGenerator.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + + exports.SourceMapGenerator = SourceMapGenerator; + + +/***/ }, +/* 2 */ +/***/ function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + var base64 = __webpack_require__(3); + + // A single base 64 digit can contain 6 bits of data. For the base 64 variable + // length quantities we use in the source map spec, the first bit is the sign, + // the next four bits are the actual value, and the 6th bit is the + // continuation bit. The continuation bit tells us whether there are more + // digits in this value following this digit. + // + // Continuation + // | Sign + // | | + // V V + // 101011 + + var VLQ_BASE_SHIFT = 5; + + // binary: 100000 + var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + + // binary: 011111 + var VLQ_BASE_MASK = VLQ_BASE - 1; + + // binary: 100000 + var VLQ_CONTINUATION_BIT = VLQ_BASE; + + /** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ + function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; + } + + /** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ + function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; + } + + /** + * Returns the base 64 VLQ encoded value. + */ + exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; + }; + + /** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ + exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + + digit = base64.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; + }; + + +/***/ }, +/* 3 */ +/***/ function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); + + /** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ + exports.encode = function (number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + throw new TypeError("Must be between 0 and 63: " + number); + }; + + /** + * Decode a single base 64 character code digit to an integer. Returns -1 on + * failure. + */ + exports.decode = function (charCode) { + var bigA = 65; // 'A' + var bigZ = 90; // 'Z' + + var littleA = 97; // 'a' + var littleZ = 122; // 'z' + + var zero = 48; // '0' + var nine = 57; // '9' + + var plus = 43; // '+' + var slash = 47; // '/' + + var littleOffset = 26; + var numberOffset = 52; + + // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ + if (bigA <= charCode && charCode <= bigZ) { + return (charCode - bigA); + } + + // 26 - 51: abcdefghijklmnopqrstuvwxyz + if (littleA <= charCode && charCode <= littleZ) { + return (charCode - littleA + littleOffset); + } + + // 52 - 61: 0123456789 + if (zero <= charCode && charCode <= nine) { + return (charCode - zero + numberOffset); + } + + // 62: + + if (charCode == plus) { + return 62; + } + + // 63: / + if (charCode == slash) { + return 63; + } + + // Invalid base64 digit. + return -1; + }; + + +/***/ }, +/* 4 */ +/***/ function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + /** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ + function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } + } + exports.getArg = getArg; + + var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; + var dataUrlRegexp = /^data:.+\,.+$/; + + function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; + } + exports.urlParse = urlParse; + + function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; + } + exports.urlGenerate = urlGenerate; + + /** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consequtive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ + function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = exports.isAbsolute(path); + + var parts = path.split(/\/+/); + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; + } + exports.normalize = normalize; + + /** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ + function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; + } + exports.join = join; + + exports.isAbsolute = function (aPath) { + return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp); + }; + + /** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ + function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); + + // It is possible for the path to be above the root. In this case, simply + // checking whether the root is a prefix of the path won't work. Instead, we + // need to remove components from the root one by one, until either we find + // a prefix that fits, or we run out of components to remove. + var level = 0; + while (aPath.indexOf(aRoot + '/') !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + + // If the only part of the root that is left is the scheme (i.e. http://, + // file:///, etc.), one or more slashes (/), or simply nothing at all, we + // have exhausted all components, so the path is not relative to the root. + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + + ++level; + } + + // Make sure we add a "../" for each component we removed from the root. + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); + } + exports.relative = relative; + + var supportsNullProto = (function () { + var obj = Object.create(null); + return !('__proto__' in obj); + }()); + + function identity (s) { + return s; + } + + /** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ + function toSetString(aStr) { + if (isProtoString(aStr)) { + return '$' + aStr; + } + + return aStr; + } + exports.toSetString = supportsNullProto ? identity : toSetString; + + function fromSetString(aStr) { + if (isProtoString(aStr)) { + return aStr.slice(1); + } + + return aStr; + } + exports.fromSetString = supportsNullProto ? identity : fromSetString; + + function isProtoString(s) { + if (!s) { + return false; + } + + var length = s.length; + + if (length < 9 /* "__proto__".length */) { + return false; + } + + if (s.charCodeAt(length - 1) !== 95 /* '_' */ || + s.charCodeAt(length - 2) !== 95 /* '_' */ || + s.charCodeAt(length - 3) !== 111 /* 'o' */ || + s.charCodeAt(length - 4) !== 116 /* 't' */ || + s.charCodeAt(length - 5) !== 111 /* 'o' */ || + s.charCodeAt(length - 6) !== 114 /* 'r' */ || + s.charCodeAt(length - 7) !== 112 /* 'p' */ || + s.charCodeAt(length - 8) !== 95 /* '_' */ || + s.charCodeAt(length - 9) !== 95 /* '_' */) { + return false; + } + + for (var i = length - 10; i >= 0; i--) { + if (s.charCodeAt(i) !== 36 /* '$' */) { + return false; + } + } + + return true; + } + + /** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ + function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = mappingA.source - mappingB.source; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return mappingA.name - mappingB.name; + } + exports.compareByOriginalPositions = compareByOriginalPositions; + + /** + * Comparator between two mappings with deflated source and name indices where + * the generated positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ + function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = mappingA.source - mappingB.source; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return mappingA.name - mappingB.name; + } + exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + + function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + + if (aStr1 > aStr2) { + return 1; + } + + return -1; + } + + /** + * Comparator between two mappings with inflated source and name strings where + * the generated positions are compared. + */ + function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; + + +/***/ }, +/* 5 */ +/***/ function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = __webpack_require__(4); + var has = Object.prototype.hasOwnProperty; + + /** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ + function ArraySet() { + this._array = []; + this._set = Object.create(null); + } + + /** + * Static method for creating ArraySet instances from an existing array. + */ + ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; + }; + + /** + * Return how many unique items are in this ArraySet. If duplicates have been + * added, than those do not count towards the size. + * + * @returns Number + */ + ArraySet.prototype.size = function ArraySet_size() { + return Object.getOwnPropertyNames(this._set).length; + }; + + /** + * Add the given string to this set. + * + * @param String aStr + */ + ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = util.toSetString(aStr); + var isDuplicate = has.call(this._set, sStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + this._set[sStr] = idx; + } + }; + + /** + * Is the given string a member of this set? + * + * @param String aStr + */ + ArraySet.prototype.has = function ArraySet_has(aStr) { + var sStr = util.toSetString(aStr); + return has.call(this._set, sStr); + }; + + /** + * What is the index of the given string in the array? + * + * @param String aStr + */ + ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + var sStr = util.toSetString(aStr); + if (has.call(this._set, sStr)) { + return this._set[sStr]; + } + throw new Error('"' + aStr + '" is not in the set.'); + }; + + /** + * What is the element at the given index? + * + * @param Number aIdx + */ + ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); + }; + + /** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ + ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); + }; + + exports.ArraySet = ArraySet; + + +/***/ }, +/* 6 */ +/***/ function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = __webpack_require__(4); + + /** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ + function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || + util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; + } + + /** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ + function MappingList() { + this._array = []; + this._sorted = true; + // Serves as infimum + this._last = {generatedLine: -1, generatedColumn: 0}; + } + + /** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ + MappingList.prototype.unsortedForEach = + function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + + /** + * Add the given source mapping. + * + * @param Object aMapping + */ + MappingList.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } + }; + + /** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ + MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositionsInflated); + this._sorted = true; + } + return this._array; + }; + + exports.MappingList = MappingList; + + +/***/ }, +/* 7 */ +/***/ function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = __webpack_require__(4); + var binarySearch = __webpack_require__(8); + var ArraySet = __webpack_require__(5).ArraySet; + var base64VLQ = __webpack_require__(2); + var quickSort = __webpack_require__(9).quickSort; + + function SourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + return sourceMap.sections != null + ? new IndexedSourceMapConsumer(sourceMap) + : new BasicSourceMapConsumer(sourceMap); + } + + SourceMapConsumer.fromSourceMap = function(aSourceMap) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap); + } + + /** + * The version of the source mapping spec that we are consuming. + */ + SourceMapConsumer.prototype._version = 3; + + // `__generatedMappings` and `__originalMappings` are arrays that hold the + // parsed mapping coordinates from the source map's "mappings" attribute. They + // are lazily instantiated, accessed via the `_generatedMappings` and + // `_originalMappings` getters respectively, and we only parse the mappings + // and create these arrays once queried for a source location. We jump through + // these hoops because there can be many thousands of mappings, and parsing + // them is expensive, so we only want to do it if we must. + // + // Each object in the arrays is of the form: + // + // { + // generatedLine: The line number in the generated code, + // generatedColumn: The column number in the generated code, + // source: The path to the original source file that generated this + // chunk of code, + // originalLine: The line number in the original source that + // corresponds to this chunk of generated code, + // originalColumn: The column number in the original source that + // corresponds to this chunk of generated code, + // name: The name of the original symbol which generated this chunk of + // code. + // } + // + // All properties except for `generatedLine` and `generatedColumn` can be + // `null`. + // + // `_generatedMappings` is ordered by the generated positions. + // + // `_originalMappings` is ordered by the original positions. + + SourceMapConsumer.prototype.__generatedMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + get: function () { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } + }); + + SourceMapConsumer.prototype.__originalMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + get: function () { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } + }); + + SourceMapConsumer.prototype._charIsMappingSeparator = + function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + SourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + + SourceMapConsumer.GENERATED_ORDER = 1; + SourceMapConsumer.ORIGINAL_ORDER = 2; + + SourceMapConsumer.GREATEST_LOWER_BOUND = 1; + SourceMapConsumer.LEAST_UPPER_BOUND = 2; + + /** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ + SourceMapConsumer.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + mappings.map(function (mapping) { + var source = mapping.source === null ? null : this._sources.at(mapping.source); + if (source != null && sourceRoot != null) { + source = util.join(sourceRoot, source); + } + return { + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : this._names.at(mapping.name) + }; + }, this).forEach(aCallback, context); + }; + + /** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a either the line we are searching for or the next + * closest line that has any mappings. Otherwise, returns all mappings + * corresponding to the given line and either the column we are searching for + * or the next closest column that has any offsets. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: Optional. the column number in the original source. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + SourceMapConsumer.prototype.allGeneratedPositionsFor = + function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util.getArg(aArgs, 'line'); + + // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: line, + originalColumn: util.getArg(aArgs, 'column', 0) + }; + + if (this.sourceRoot != null) { + needle.source = util.relative(this.sourceRoot, needle.source); + } + if (!this._sources.has(needle.source)) { + return []; + } + needle.source = this._sources.indexOf(needle.source); + + var mappings = []; + + var index = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + binarySearch.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (aArgs.column === undefined) { + var originalLine = mapping.originalLine; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we found. Since + // mappings are sorted, this is guaranteed to find all mappings for + // the line we found. + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we were searching for. + // Since mappings are sorted, this is guaranteed to find all mappings for + // the line we are searching for. + while (mapping && + mapping.originalLine === line && + mapping.originalColumn == originalColumn) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } + } + + return mappings; + }; + + exports.SourceMapConsumer = SourceMapConsumer; + + /** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The only parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ + function BasicSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + sources = sources + .map(String) + // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + .map(util.normalize) + // Always ensure that absolute sources are internally stored relative to + // the source root, if the source root is absolute. Not doing this would + // be particularly problematic when the source root is a prefix of the + // source (valid, but why??). See github issue #199 and bugzil.la/1188982. + .map(function (source) { + return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) + ? util.relative(sourceRoot, source) + : source; + }); + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names.map(String), true); + this._sources = ArraySet.fromArray(sources, true); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this.file = file; + } + + BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + + /** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @returns BasicSourceMapConsumer + */ + BasicSourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + + // Because we are modifying the entries (by converting string sources and + // names to indices into the sources and names ArraySets), we have to make + // a copy of the entry or else bad things happen. Shared mutable state + // strikes again! See github issue #191. + + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping; + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + + destOriginalMappings.push(destMapping); + } + + destGeneratedMappings.push(destMapping); + } + + quickSort(smc.__originalMappings, util.compareByOriginalPositions); + + return smc; + }; + + /** + * The version of the source mapping spec that we are consuming. + */ + BasicSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function () { + return this._sources.toArray().map(function (s) { + return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; + }, this); + } + }); + + /** + * Provide the JIT with a nice shape / hidden class. + */ + function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; + } + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + BasicSourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedSegments = {}; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; + + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + index++; + previousGeneratedColumn = 0; + } + else if (aStr.charAt(index) === ',') { + index++; + } + else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; + + // Because each offset is encoded relative to the previous one, + // many segments often have the same encoding. We can exploit this + // fact by caching the parsed variable length fields of each segment, + // allowing us to avoid a second parse if we encounter the same + // segment again. + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + str = aStr.slice(index, end); + + segment = cachedSegments[str]; + if (segment) { + index += str.length; + } else { + segment = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + + if (segment.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + if (segment.length === 3) { + throw new Error('Found a source and line, but no column'); + } + + cachedSegments[str] = segment; + } + + // Generated column. + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + + if (segment.length > 1) { + // Original source. + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + + // Original line. + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + + // Original column. + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + + if (segment.length > 4) { + // Original name. + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + + generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + originalMappings.push(mapping); + } + } + } + + quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); + this.__generatedMappings = generatedMappings; + + quickSort(originalMappings, util.compareByOriginalPositions); + this.__originalMappings = originalMappings; + }; + + /** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ + BasicSourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; + + /** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ + BasicSourceMapConsumer.prototype.computeColumnSpans = + function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + + // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + + // The last mapping for each line spans the entire line. + mapping.lastGeneratedColumn = Infinity; + } + }; + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ + BasicSourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util.compareByGeneratedPositionsDeflated, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + if (source !== null) { + source = this._sources.at(source); + if (this.sourceRoot != null) { + source = util.join(this.sourceRoot, source); + } + } + var name = util.getArg(mapping, 'name', null); + if (name !== null) { + name = this._names.at(name); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: name + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + BasicSourceMapConsumer.prototype.hasContentsOfAllSources = + function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && + !this.sourcesContent.some(function (sc) { return sc == null; }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + BasicSourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + if (this.sourceRoot != null) { + aSource = util.relative(this.sourceRoot, aSource); + } + + if (this._sources.has(aSource)) { + return this.sourcesContent[this._sources.indexOf(aSource)]; + } + + var url; + if (this.sourceRoot != null + && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + aSource)) { + return this.sourcesContent[this._sources.indexOf("/" + aSource)]; + } + } + + // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + BasicSourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util.getArg(aArgs, 'source'); + if (this.sourceRoot != null) { + source = util.relative(this.sourceRoot, source); + } + if (!this._sources.has(source)) { + return { + line: null, + column: null, + lastColumn: null + }; + } + source = this._sources.indexOf(source); + + var needle = { + source: source, + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + + return { + line: null, + column: null, + lastColumn: null + }; + }; + + exports.BasicSourceMapConsumer = BasicSourceMapConsumer; + + /** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The only parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ + function IndexedSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + this._sources = new ArraySet(); + this._names = new ArraySet(); + + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || + (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + lastOffset = offset; + + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map')) + } + }); + } + + IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + + /** + * The version of the source mapping spec that we are consuming. + */ + IndexedSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function () { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + return sources; + } + }); + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ + IndexedSourceMapConsumer.prototype.originalPositionFor = + function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + // Find the section containing the generated position we're trying to map + // to an original position. + var sectionIndex = binarySearch.search(needle, this._sections, + function(needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + + return (needle.generatedColumn - + section.generatedOffset.generatedColumn); + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - + (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - + (section.generatedOffset.generatedLine === needle.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + bias: aArgs.bias + }); + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = + function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function (s) { + return s.consumer.hasContentsOfAllSources(); + }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + IndexedSourceMapConsumer.prototype.sourceContentFor = + function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + var content = section.consumer.sourceContentFor(aSource, true); + if (content) { + return content; + } + } + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + IndexedSourceMapConsumer.prototype.generatedPositionFor = + function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + // Only consider this section if the requested source is in the list of + // sources of the consumer. + if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + + (section.generatedOffset.generatedLine === generatedPosition.line + ? section.generatedOffset.generatedColumn - 1 + : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + IndexedSourceMapConsumer.prototype._parseMappings = + function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + + var source = section.consumer._sources.at(mapping.source); + if (section.consumer.sourceRoot !== null) { + source = util.join(section.consumer.sourceRoot, source); + } + this._sources.add(source); + source = this._sources.indexOf(source); + + var name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); + + // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + + (section.generatedOffset.generatedLine === mapping.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: name + }; + + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + } + } + + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); + }; + + exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; + + +/***/ }, +/* 8 */ +/***/ function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + exports.GREATEST_LOWER_BOUND = 1; + exports.LEAST_UPPER_BOUND = 2; + + /** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ + function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } + else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } + else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } + } + + /** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ + exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, + aCompare, aBias || exports.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } + + // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + + return index; + }; + + +/***/ }, +/* 9 */ +/***/ function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + // It turns out that some (most?) JavaScript engines don't self-host + // `Array.prototype.sort`. This makes sense because C++ will likely remain + // faster than JS when doing raw CPU-intensive sorting. However, when using a + // custom comparator function, calling back and forth between the VM's C++ and + // JIT'd JS is rather slow *and* loses JIT type information, resulting in + // worse generated code for the comparator function than would be optimal. In + // fact, when sorting with a comparator, these costs outweigh the benefits of + // sorting in C++. By using our own JS-implemented Quick Sort (below), we get + // a ~3500ms mean speed-up in `bench/bench.html`. + + /** + * Swap the elements indexed by `x` and `y` in the array `ary`. + * + * @param {Array} ary + * The array. + * @param {Number} x + * The index of the first item. + * @param {Number} y + * The index of the second item. + */ + function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; + } + + /** + * Returns a random integer within the range `low .. high` inclusive. + * + * @param {Number} low + * The lower bound on the range. + * @param {Number} high + * The upper bound on the range. + */ + function randomIntInRange(low, high) { + return Math.round(low + (Math.random() * (high - low))); + } + + /** + * The Quick Sort algorithm. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + * @param {Number} p + * Start index of the array + * @param {Number} r + * End index of the array + */ + function doQuickSort(ary, comparator, p, r) { + // If our lower bound is less than our upper bound, we (1) partition the + // array into two pieces and (2) recurse on each half. If it is not, this is + // the empty array and our base case. + + if (p < r) { + // (1) Partitioning. + // + // The partitioning chooses a pivot between `p` and `r` and moves all + // elements that are less than or equal to the pivot to the before it, and + // all the elements that are greater than it after it. The effect is that + // once partition is done, the pivot is in the exact place it will be when + // the array is put in sorted order, and it will not need to be moved + // again. This runs in O(n) time. + + // Always choose a random pivot so that an input array which is reverse + // sorted does not cause O(n^2) running time. + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + + swap(ary, pivotIndex, r); + var pivot = ary[r]; + + // Immediately after `j` is incremented in this loop, the following hold + // true: + // + // * Every element in `ary[p .. i]` is less than or equal to the pivot. + // + // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot) <= 0) { + i += 1; + swap(ary, i, j); + } + } + + swap(ary, i + 1, j); + var q = i + 1; + + // (2) Recurse on each half. + + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } + } + + /** + * Sort the given array in-place with the given comparator function. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + */ + exports.quickSort = function (ary, comparator) { + doQuickSort(ary, comparator, 0, ary.length - 1); + }; + + +/***/ }, +/* 10 */ +/***/ function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; + var util = __webpack_require__(4); + + // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other + // operating systems these days (capturing the result). + var REGEX_NEWLINE = /(\r?\n)/; + + // Newline character code for charCodeAt() comparisons + var NEWLINE_CODE = 10; + + // Private symbol for identifying `SourceNode`s when multiple versions of + // the source-map library are loaded. This MUST NOT CHANGE across + // versions! + var isSourceNode = "$$$isSourceNode$$$"; + + /** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ + function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); + } + + /** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ + SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are removed from this array, by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var shiftNextLine = function() { + var lineContents = remainingLines.shift(); + // The last line of a file might not have a newline. + var newLine = remainingLines.shift() || ""; + return lineContents + newLine; + }; + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[0]; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[0] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[0]; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[0] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + if (remainingLines.length > 0) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.join("")); + } + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath + ? util.join(aRelativePath, mapping.source) + : mapping.source; + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name)); + } + } + }; + + /** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } + }; + + /** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ + SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; + }; + + /** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ + SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; + }; + + /** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ + SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + + /** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + + /** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ + SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; + }; + + /** + * Returns the string representation of this source node along with a source + * map. + */ + SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; + }; + + exports.SourceNode = SourceNode; + + +/***/ } +/******/ ]) +}); +; \ No newline at end of file diff --git a/node_modules/uglify-js/node_modules/source-map/dist/source-map.min.js b/node_modules/uglify-js/node_modules/source-map/dist/source-map.min.js new file mode 100644 index 0000000..e03b6d5 --- /dev/null +++ b/node_modules/uglify-js/node_modules/source-map/dist/source-map.min.js @@ -0,0 +1,2 @@ +!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.sourceMap=n():e.sourceMap=n()}(this,function(){return function(e){function n(t){if(r[t])return r[t].exports;var o=r[t]={exports:{},id:t,loaded:!1};return e[t].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var r={};return n.m=e,n.c=r,n.p="",n(0)}([function(e,n,r){n.SourceMapGenerator=r(1).SourceMapGenerator,n.SourceMapConsumer=r(7).SourceMapConsumer,n.SourceNode=r(10).SourceNode},function(e,n,r){function t(e){e||(e={}),this._file=i.getArg(e,"file",null),this._sourceRoot=i.getArg(e,"sourceRoot",null),this._skipValidation=i.getArg(e,"skipValidation",!1),this._sources=new s,this._names=new s,this._mappings=new a,this._sourcesContents=null}var o=r(2),i=r(4),s=r(5).ArraySet,a=r(6).MappingList;t.prototype._version=3,t.fromSourceMap=function(e){var n=e.sourceRoot,r=new t({file:e.file,sourceRoot:n});return e.eachMapping(function(e){var t={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(t.source=e.source,null!=n&&(t.source=i.relative(n,t.source)),t.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(t.name=e.name)),r.addMapping(t)}),e.sources.forEach(function(n){var t=e.sourceContentFor(n);null!=t&&r.setSourceContent(n,t)}),r},t.prototype.addMapping=function(e){var n=i.getArg(e,"generated"),r=i.getArg(e,"original",null),t=i.getArg(e,"source",null),o=i.getArg(e,"name",null);this._skipValidation||this._validateMapping(n,r,t,o),null!=t&&(t=String(t),this._sources.has(t)||this._sources.add(t)),null!=o&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:t,name:o})},t.prototype.setSourceContent=function(e,n){var r=e;null!=this._sourceRoot&&(r=i.relative(this._sourceRoot,r)),null!=n?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[i.toSetString(r)]=n):this._sourcesContents&&(delete this._sourcesContents[i.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},t.prototype.applySourceMap=function(e,n,r){var t=n;if(null==n){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');t=e.file}var o=this._sourceRoot;null!=o&&(t=i.relative(o,t));var a=new s,u=new s;this._mappings.unsortedForEach(function(n){if(n.source===t&&null!=n.originalLine){var s=e.originalPositionFor({line:n.originalLine,column:n.originalColumn});null!=s.source&&(n.source=s.source,null!=r&&(n.source=i.join(r,n.source)),null!=o&&(n.source=i.relative(o,n.source)),n.originalLine=s.line,n.originalColumn=s.column,null!=s.name&&(n.name=s.name))}var l=n.source;null==l||a.has(l)||a.add(l);var c=n.name;null==c||u.has(c)||u.add(c)},this),this._sources=a,this._names=u,e.sources.forEach(function(n){var t=e.sourceContentFor(n);null!=t&&(null!=r&&(n=i.join(r,n)),null!=o&&(n=i.relative(o,n)),this.setSourceContent(n,t))},this)},t.prototype._validateMapping=function(e,n,r,t){if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||n||r||t)&&!(e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:n,name:t}))},t.prototype._serializeMappings=function(){for(var e,n,r,t,s=0,a=1,u=0,l=0,c=0,g=0,p="",h=this._mappings.toArray(),f=0,d=h.length;d>f;f++){if(n=h[f],e="",n.generatedLine!==a)for(s=0;n.generatedLine!==a;)e+=";",a++;else if(f>0){if(!i.compareByGeneratedPositionsInflated(n,h[f-1]))continue;e+=","}e+=o.encode(n.generatedColumn-s),s=n.generatedColumn,null!=n.source&&(t=this._sources.indexOf(n.source),e+=o.encode(t-g),g=t,e+=o.encode(n.originalLine-1-l),l=n.originalLine-1,e+=o.encode(n.originalColumn-u),u=n.originalColumn,null!=n.name&&(r=this._names.indexOf(n.name),e+=o.encode(r-c),c=r)),p+=e}return p},t.prototype._generateSourcesContent=function(e,n){return e.map(function(e){if(!this._sourcesContents)return null;null!=n&&(e=i.relative(n,e));var r=i.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},t.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},t.prototype.toString=function(){return JSON.stringify(this.toJSON())},n.SourceMapGenerator=t},function(e,n,r){function t(e){return 0>e?(-e<<1)+1:(e<<1)+0}function o(e){var n=1===(1&e),r=e>>1;return n?-r:r}var i=r(3),s=5,a=1<>>=s,o>0&&(n|=l),r+=i.encode(n);while(o>0);return r},n.decode=function(e,n,r){var t,a,c=e.length,g=0,p=0;do{if(n>=c)throw new Error("Expected more digits in base 64 VLQ value.");if(a=i.decode(e.charCodeAt(n++)),-1===a)throw new Error("Invalid base64 digit: "+e.charAt(n-1));t=!!(a&l),a&=u,g+=a<=0&&e=n&&r>=e?e-n:e>=t&&o>=e?e-t+l:e>=i&&s>=e?e-i+c:e==a?62:e==u?63:-1}},function(e,n){function r(e,n,r){if(n in e)return e[n];if(3===arguments.length)return r;throw new Error('"'+n+'" is a required argument.')}function t(e){var n=e.match(m);return n?{scheme:n[1],auth:n[2],host:n[3],port:n[4],path:n[5]}:null}function o(e){var n="";return e.scheme&&(n+=e.scheme+":"),n+="//",e.auth&&(n+=e.auth+"@"),e.host&&(n+=e.host),e.port&&(n+=":"+e.port),e.path&&(n+=e.path),n}function i(e){var r=e,i=t(e);if(i){if(!i.path)return e;r=i.path}for(var s,a=n.isAbsolute(r),u=r.split(/\/+/),l=0,c=u.length-1;c>=0;c--)s=u[c],"."===s?u.splice(c,1):".."===s?l++:l>0&&(""===s?(u.splice(c+1,l),l=0):(u.splice(c,2),l--));return r=u.join("/"),""===r&&(r=a?"/":"."),i?(i.path=r,o(i)):r}function s(e,n){""===e&&(e="."),""===n&&(n=".");var r=t(n),s=t(e);if(s&&(e=s.path||"/"),r&&!r.scheme)return s&&(r.scheme=s.scheme),o(r);if(r||n.match(_))return n;if(s&&!s.host&&!s.path)return s.host=n,o(s);var a="/"===n.charAt(0)?n:i(e.replace(/\/+$/,"")+"/"+n);return s?(s.path=a,o(s)):a}function a(e,n){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==n.indexOf(e+"/");){var t=e.lastIndexOf("/");if(0>t)return n;if(e=e.slice(0,t),e.match(/^([^\/]+:\/)?\/*$/))return n;++r}return Array(r+1).join("../")+n.substr(e.length+1)}function u(e){return e}function l(e){return g(e)?"$"+e:e}function c(e){return g(e)?e.slice(1):e}function g(e){if(!e)return!1;var n=e.length;if(9>n)return!1;if(95!==e.charCodeAt(n-1)||95!==e.charCodeAt(n-2)||111!==e.charCodeAt(n-3)||116!==e.charCodeAt(n-4)||111!==e.charCodeAt(n-5)||114!==e.charCodeAt(n-6)||112!==e.charCodeAt(n-7)||95!==e.charCodeAt(n-8)||95!==e.charCodeAt(n-9))return!1;for(var r=n-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function p(e,n,r){var t=e.source-n.source;return 0!==t?t:(t=e.originalLine-n.originalLine,0!==t?t:(t=e.originalColumn-n.originalColumn,0!==t||r?t:(t=e.generatedColumn-n.generatedColumn,0!==t?t:(t=e.generatedLine-n.generatedLine,0!==t?t:e.name-n.name))))}function h(e,n,r){var t=e.generatedLine-n.generatedLine;return 0!==t?t:(t=e.generatedColumn-n.generatedColumn,0!==t||r?t:(t=e.source-n.source,0!==t?t:(t=e.originalLine-n.originalLine,0!==t?t:(t=e.originalColumn-n.originalColumn,0!==t?t:e.name-n.name))))}function f(e,n){return e===n?0:e>n?1:-1}function d(e,n){var r=e.generatedLine-n.generatedLine;return 0!==r?r:(r=e.generatedColumn-n.generatedColumn,0!==r?r:(r=f(e.source,n.source),0!==r?r:(r=e.originalLine-n.originalLine,0!==r?r:(r=e.originalColumn-n.originalColumn,0!==r?r:f(e.name,n.name)))))}n.getArg=r;var m=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,_=/^data:.+\,.+$/;n.urlParse=t,n.urlGenerate=o,n.normalize=i,n.join=s,n.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(m)},n.relative=a;var v=function(){var e=Object.create(null);return!("__proto__"in e)}();n.toSetString=v?u:l,n.fromSetString=v?u:c,n.compareByOriginalPositions=p,n.compareByGeneratedPositionsDeflated=h,n.compareByGeneratedPositionsInflated=d},function(e,n,r){function t(){this._array=[],this._set=Object.create(null)}var o=r(4),i=Object.prototype.hasOwnProperty;t.fromArray=function(e,n){for(var r=new t,o=0,i=e.length;i>o;o++)r.add(e[o],n);return r},t.prototype.size=function(){return Object.getOwnPropertyNames(this._set).length},t.prototype.add=function(e,n){var r=o.toSetString(e),t=i.call(this._set,r),s=this._array.length;(!t||n)&&this._array.push(e),t||(this._set[r]=s)},t.prototype.has=function(e){var n=o.toSetString(e);return i.call(this._set,n)},t.prototype.indexOf=function(e){var n=o.toSetString(e);if(i.call(this._set,n))return this._set[n];throw new Error('"'+e+'" is not in the set.')},t.prototype.at=function(e){if(e>=0&&er||t==r&&s>=o||i.compareByGeneratedPositionsInflated(e,n)<=0}function o(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var i=r(4);o.prototype.unsortedForEach=function(e,n){this._array.forEach(e,n)},o.prototype.add=function(e){t(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},o.prototype.toArray=function(){return this._sorted||(this._array.sort(i.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},n.MappingList=o},function(e,n,r){function t(e){var n=e;return"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=n.sections?new s(n):new o(n)}function o(e){var n=e;"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=a.getArg(n,"version"),t=a.getArg(n,"sources"),o=a.getArg(n,"names",[]),i=a.getArg(n,"sourceRoot",null),s=a.getArg(n,"sourcesContent",null),u=a.getArg(n,"mappings"),c=a.getArg(n,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);t=t.map(String).map(a.normalize).map(function(e){return i&&a.isAbsolute(i)&&a.isAbsolute(e)?a.relative(i,e):e}),this._names=l.fromArray(o.map(String),!0),this._sources=l.fromArray(t,!0),this.sourceRoot=i,this.sourcesContent=s,this._mappings=u,this.file=c}function i(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function s(e){var n=e;"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=a.getArg(n,"version"),o=a.getArg(n,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new l,this._names=new l;var i={line:-1,column:0};this._sections=o.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var n=a.getArg(e,"offset"),r=a.getArg(n,"line"),o=a.getArg(n,"column");if(r=0){var i=this._originalMappings[o];if(void 0===e.column)for(var s=i.originalLine;i&&i.originalLine===s;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o];else for(var l=i.originalColumn;i&&i.originalLine===n&&i.originalColumn==l;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o]}return t},n.SourceMapConsumer=t,o.prototype=Object.create(t.prototype),o.prototype.consumer=t,o.fromSourceMap=function(e){var n=Object.create(o.prototype),r=n._names=l.fromArray(e._names.toArray(),!0),t=n._sources=l.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file;for(var s=e._mappings.toArray().slice(),u=n.__generatedMappings=[],c=n.__originalMappings=[],p=0,h=s.length;h>p;p++){var f=s[p],d=new i;d.generatedLine=f.generatedLine,d.generatedColumn=f.generatedColumn,f.source&&(d.source=t.indexOf(f.source),d.originalLine=f.originalLine,d.originalColumn=f.originalColumn,f.name&&(d.name=r.indexOf(f.name)),c.push(d)),u.push(d)}return g(n.__originalMappings,a.compareByOriginalPositions),n},o.prototype._version=3,Object.defineProperty(o.prototype,"sources",{get:function(){return this._sources.toArray().map(function(e){return null!=this.sourceRoot?a.join(this.sourceRoot,e):e},this)}}),o.prototype._parseMappings=function(e,n){for(var r,t,o,s,u,l=1,p=0,h=0,f=0,d=0,m=0,_=e.length,v=0,C={},y={},A=[],S=[];_>v;)if(";"===e.charAt(v))l++,v++,p=0;else if(","===e.charAt(v))v++;else{for(r=new i,r.generatedLine=l,s=v;_>s&&!this._charIsMappingSeparator(e,s);s++);if(t=e.slice(v,s),o=C[t])v+=t.length;else{for(o=[];s>v;)c.decode(e,v,y),u=y.value,v=y.rest,o.push(u);if(2===o.length)throw new Error("Found a source, but no line and column");if(3===o.length)throw new Error("Found a source and line, but no column");C[t]=o}r.generatedColumn=p+o[0],p=r.generatedColumn,o.length>1&&(r.source=d+o[1],d+=o[1],r.originalLine=h+o[2],h=r.originalLine,r.originalLine+=1,r.originalColumn=f+o[3],f=r.originalColumn,o.length>4&&(r.name=m+o[4],m+=o[4])),S.push(r),"number"==typeof r.originalLine&&A.push(r)}g(S,a.compareByGeneratedPositionsDeflated),this.__generatedMappings=S,g(A,a.compareByOriginalPositions),this.__originalMappings=A},o.prototype._findMapping=function(e,n,r,t,o,i){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[t]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[t]);return u.search(e,n,o,i)},o.prototype.computeColumnSpans=function(){for(var e=0;e=0){var o=this._generatedMappings[r];if(o.generatedLine===n.generatedLine){var i=a.getArg(o,"source",null);null!==i&&(i=this._sources.at(i),null!=this.sourceRoot&&(i=a.join(this.sourceRoot,i)));var s=a.getArg(o,"name",null);return null!==s&&(s=this._names.at(s)),{source:i,line:a.getArg(o,"originalLine",null),column:a.getArg(o,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}},o.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}):!1},o.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=a.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var r;if(null!=this.sourceRoot&&(r=a.urlParse(this.sourceRoot))){var t=e.replace(/^file:\/\//,"");if("file"==r.scheme&&this._sources.has(t))return this.sourcesContent[this._sources.indexOf(t)];if((!r.path||"/"==r.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(n)return null;throw new Error('"'+e+'" is not in the SourceMap.')},o.prototype.generatedPositionFor=function(e){var n=a.getArg(e,"source");if(null!=this.sourceRoot&&(n=a.relative(this.sourceRoot,n)),!this._sources.has(n))return{line:null,column:null,lastColumn:null};n=this._sources.indexOf(n);var r={source:n,originalLine:a.getArg(e,"line"),originalColumn:a.getArg(e,"column")},o=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",a.compareByOriginalPositions,a.getArg(e,"bias",t.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===r.source)return{line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=o,s.prototype=Object.create(t.prototype),s.prototype.constructor=t,s.prototype._version=3,Object.defineProperty(s.prototype,"sources",{get:function(){for(var e=[],n=0;n0?t-u>1?r(u,t,o,i,s,a):a==n.LEAST_UPPER_BOUND?t1?r(e,u,o,i,s,a):a==n.LEAST_UPPER_BOUND?u:0>e?-1:e}n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.search=function(e,t,o,i){if(0===t.length)return-1;var s=r(-1,t.length,e,t,o,i||n.GREATEST_LOWER_BOUND);if(0>s)return-1;for(;s-1>=0&&0===o(t[s],t[s-1],!0);)--s;return s}},function(e,n){function r(e,n,r){var t=e[n];e[n]=e[r],e[r]=t}function t(e,n){return Math.round(e+Math.random()*(n-e))}function o(e,n,i,s){if(s>i){var a=t(i,s),u=i-1;r(e,a,s);for(var l=e[s],c=i;s>c;c++)n(e[c],l)<=0&&(u+=1,r(e,u,c));r(e,u+1,c);var g=u+1;o(e,n,i,g-1),o(e,n,g+1,s)}}n.quickSort=function(e,n){o(e,n,0,e.length-1)}},function(e,n,r){function t(e,n,r,t,o){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==n?null:n,this.source=null==r?null:r,this.name=null==o?null:o,this[u]=!0,null!=t&&this.add(t)}var o=r(1).SourceMapGenerator,i=r(4),s=/(\r?\n)/,a=10,u="$$$isSourceNode$$$";t.fromStringWithSourceMap=function(e,n,r){function o(e,n){if(null===e||void 0===e.source)a.add(n);else{var o=r?i.join(r,e.source):e.source;a.add(new t(e.originalLine,e.originalColumn,o,n,e.name))}}var a=new t,u=e.split(s),l=function(){var e=u.shift(),n=u.shift()||"";return e+n},c=1,g=0,p=null;return n.eachMapping(function(e){if(null!==p){if(!(c0&&(p&&o(p,l()),a.add(u.join(""))),n.sources.forEach(function(e){var t=n.sourceContentFor(e);null!=t&&(null!=r&&(e=i.join(r,e)),a.setSourceContent(e,t))}),a},t.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else{if(!e[u]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);e&&this.children.push(e)}return this},t.prototype.prepend=function(e){if(Array.isArray(e))for(var n=e.length-1;n>=0;n--)this.prepend(e[n]);else{if(!e[u]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},t.prototype.walk=function(e){for(var n,r=0,t=this.children.length;t>r;r++)n=this.children[r],n[u]?n.walk(e):""!==n&&e(n,{source:this.source,line:this.line,column:this.column,name:this.name})},t.prototype.join=function(e){var n,r,t=this.children.length;if(t>0){for(n=[],r=0;t-1>r;r++)n.push(this.children[r]),n.push(e);n.push(this.children[r]),this.children=n}return this},t.prototype.replaceRight=function(e,n){var r=this.children[this.children.length-1];return r[u]?r.replaceRight(e,n):"string"==typeof r?this.children[this.children.length-1]=r.replace(e,n):this.children.push("".replace(e,n)),this},t.prototype.setSourceContent=function(e,n){this.sourceContents[i.toSetString(e)]=n},t.prototype.walkSourceContents=function(e){for(var n=0,r=this.children.length;r>n;n++)this.children[n][u]&&this.children[n].walkSourceContents(e);for(var t=Object.keys(this.sourceContents),n=0,r=t.length;r>n;n++)e(i.fromSetString(t[n]),this.sourceContents[t[n]])},t.prototype.toString=function(){var e="";return this.walk(function(n){e+=n}),e},t.prototype.toStringWithSourceMap=function(e){var n={code:"",line:1,column:0},r=new o(e),t=!1,i=null,s=null,u=null,l=null;return this.walk(function(e,o){n.code+=e,null!==o.source&&null!==o.line&&null!==o.column?((i!==o.source||s!==o.line||u!==o.column||l!==o.name)&&r.addMapping({source:o.source,original:{line:o.line,column:o.column},generated:{line:n.line,column:n.column},name:o.name}),i=o.source,s=o.line,u=o.column,l=o.name,t=!0):t&&(r.addMapping({generated:{line:n.line,column:n.column}}),i=null,t=!1);for(var c=0,g=e.length;g>c;c++)e.charCodeAt(c)===a?(n.line++,n.column=0,c+1===g?(i=null,t=!1):t&&r.addMapping({source:o.source,original:{line:o.line,column:o.column},generated:{line:n.line,column:n.column},name:o.name})):n.column++}),this.walkSourceContents(function(e,n){r.setSourceContent(e,n)}),{code:n.code,map:r}},n.SourceNode=t}])}); +//# sourceMappingURL=source-map.min.js.map \ No newline at end of file diff --git a/node_modules/uglify-js/node_modules/source-map/dist/source-map.min.js.map b/node_modules/uglify-js/node_modules/source-map/dist/source-map.min.js.map new file mode 100644 index 0000000..3275a32 --- /dev/null +++ b/node_modules/uglify-js/node_modules/source-map/dist/source-map.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///source-map.min.js","webpack:///webpack/bootstrap 5d9a9f4df3bd553ed2f9","webpack:///./source-map.js","webpack:///./lib/source-map-generator.js","webpack:///./lib/base64-vlq.js","webpack:///./lib/base64.js","webpack:///./lib/util.js","webpack:///./lib/array-set.js","webpack:///./lib/mapping-list.js","webpack:///./lib/source-map-consumer.js","webpack:///./lib/binary-search.js","webpack:///./lib/quick-sort.js","webpack:///./lib/source-node.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","SourceMapGenerator","SourceMapConsumer","SourceNode","aArgs","_file","util","getArg","_sourceRoot","_skipValidation","_sources","ArraySet","_names","_mappings","MappingList","_sourcesContents","base64VLQ","prototype","_version","fromSourceMap","aSourceMapConsumer","sourceRoot","generator","file","eachMapping","mapping","newMapping","generated","line","generatedLine","column","generatedColumn","source","relative","original","originalLine","originalColumn","name","addMapping","sources","forEach","sourceFile","content","sourceContentFor","setSourceContent","_validateMapping","String","has","add","aSourceFile","aSourceContent","Object","create","toSetString","keys","length","applySourceMap","aSourceMapPath","Error","newSources","newNames","unsortedForEach","originalPositionFor","join","aGenerated","aOriginal","aSource","aName","JSON","stringify","_serializeMappings","next","nameIdx","sourceIdx","previousGeneratedColumn","previousGeneratedLine","previousOriginalColumn","previousOriginalLine","previousName","previousSource","result","mappings","toArray","i","len","compareByGeneratedPositionsInflated","encode","indexOf","_generateSourcesContent","aSources","aSourceRoot","map","key","hasOwnProperty","toJSON","version","names","sourcesContent","toString","toVLQSigned","aValue","fromVLQSigned","isNegative","shifted","base64","VLQ_BASE_SHIFT","VLQ_BASE","VLQ_BASE_MASK","VLQ_CONTINUATION_BIT","digit","encoded","vlq","decode","aStr","aIndex","aOutParam","continuation","strLen","shift","charCodeAt","charAt","value","rest","intToCharMap","split","number","TypeError","charCode","bigA","bigZ","littleA","littleZ","zero","nine","plus","slash","littleOffset","numberOffset","aDefaultValue","arguments","urlParse","aUrl","match","urlRegexp","scheme","auth","host","port","path","urlGenerate","aParsedUrl","url","normalize","aPath","part","isAbsolute","parts","up","splice","aRoot","aPathUrl","aRootUrl","dataUrlRegexp","joined","replace","level","index","lastIndexOf","slice","Array","substr","identity","s","isProtoString","fromSetString","compareByOriginalPositions","mappingA","mappingB","onlyCompareOriginal","cmp","compareByGeneratedPositionsDeflated","onlyCompareGenerated","strcmp","aStr1","aStr2","supportsNullProto","obj","_array","_set","fromArray","aArray","aAllowDuplicates","set","size","getOwnPropertyNames","sStr","isDuplicate","idx","push","at","aIdx","generatedPositionAfter","lineA","lineB","columnA","columnB","_sorted","_last","aCallback","aThisArg","aMapping","sort","aSourceMap","sourceMap","parse","sections","IndexedSourceMapConsumer","BasicSourceMapConsumer","Mapping","lastOffset","_sections","offset","offsetLine","offsetColumn","generatedOffset","consumer","binarySearch","quickSort","__generatedMappings","defineProperty","get","_parseMappings","__originalMappings","_charIsMappingSeparator","GENERATED_ORDER","ORIGINAL_ORDER","GREATEST_LOWER_BOUND","LEAST_UPPER_BOUND","aContext","aOrder","context","order","_generatedMappings","_originalMappings","allGeneratedPositionsFor","needle","_findMapping","undefined","lastColumn","smc","generatedMappings","destGeneratedMappings","destOriginalMappings","srcMapping","destMapping","str","segment","end","cachedSegments","temp","originalMappings","aNeedle","aMappings","aLineName","aColumnName","aComparator","aBias","search","computeColumnSpans","nextMapping","lastGeneratedColumn","Infinity","hasContentsOfAllSources","some","sc","nullOnMissing","fileUriAbsPath","generatedPositionFor","constructor","j","sectionIndex","section","bias","every","generatedPosition","ret","sectionMappings","adjustedMapping","recursiveSearch","aLow","aHigh","aHaystack","aCompare","mid","Math","floor","swap","ary","x","y","randomIntInRange","low","high","round","random","doQuickSort","comparator","r","pivotIndex","pivot","q","aLine","aColumn","aChunks","children","sourceContents","isSourceNode","REGEX_NEWLINE","NEWLINE_CODE","fromStringWithSourceMap","aGeneratedCode","aRelativePath","addMappingWithCode","code","node","remainingLines","shiftNextLine","lineContents","newLine","lastGeneratedLine","lastMapping","nextLine","aChunk","isArray","chunk","prepend","unshift","walk","aFn","aSep","newChildren","replaceRight","aPattern","aReplacement","lastChild","walkSourceContents","toStringWithSourceMap","sourceMappingActive","lastOriginalSource","lastOriginalLine","lastOriginalColumn","lastOriginalName","sourceContent"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,IACA,kBAAAG,gBAAAC,IACAD,UAAAH,GACA,gBAAAC,SACAA,QAAA,UAAAD,IAEAD,EAAA,UAAAC,KACCK,KAAA,WACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAP,OAGA,IAAAC,GAAAO,EAAAD,IACAP,WACAS,GAAAF,EACAG,QAAA,EAUA,OANAL,GAAAE,GAAAI,KAAAV,EAAAD,QAAAC,IAAAD,QAAAM,GAGAL,EAAAS,QAAA,EAGAT,EAAAD,QAvBA,GAAAQ,KAqCA,OATAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,GAGAR,EAAA,KDgBM,SAASL,EAAQD,EAASM,GEjDhCN,EAAAe,mBAAAT,EAAA,GAAAS,mBACAf,EAAAgB,kBAAAV,EAAA,GAAAU,kBACAhB,EAAAiB,WAAAX,EAAA,IAAAW,YF6DM,SAAShB,EAAQD,EAASM,GGhDhC,QAAAS,GAAAG,GACAA,IACAA,MAEAd,KAAAe,MAAAC,EAAAC,OAAAH,EAAA,aACAd,KAAAkB,YAAAF,EAAAC,OAAAH,EAAA,mBACAd,KAAAmB,gBAAAH,EAAAC,OAAAH,EAAA,qBACAd,KAAAoB,SAAA,GAAAC,GACArB,KAAAsB,OAAA,GAAAD,GACArB,KAAAuB,UAAA,GAAAC,GACAxB,KAAAyB,iBAAA,KAvBA,GAAAC,GAAAxB,EAAA,GACAc,EAAAd,EAAA,GACAmB,EAAAnB,EAAA,GAAAmB,SACAG,EAAAtB,EAAA,GAAAsB,WAuBAb,GAAAgB,UAAAC,SAAA,EAOAjB,EAAAkB,cACA,SAAAC,GACA,GAAAC,GAAAD,EAAAC,WACAC,EAAA,GAAArB,IACAsB,KAAAH,EAAAG,KACAF,cAkCA,OAhCAD,GAAAI,YAAA,SAAAC,GACA,GAAAC,IACAC,WACAC,KAAAH,EAAAI,cACAC,OAAAL,EAAAM,iBAIA,OAAAN,EAAAO,SACAN,EAAAM,OAAAP,EAAAO,OACA,MAAAX,IACAK,EAAAM,OAAA1B,EAAA2B,SAAAZ,EAAAK,EAAAM,SAGAN,EAAAQ,UACAN,KAAAH,EAAAU,aACAL,OAAAL,EAAAW,gBAGA,MAAAX,EAAAY,OACAX,EAAAW,KAAAZ,EAAAY,OAIAf,EAAAgB,WAAAZ,KAEAN,EAAAmB,QAAAC,QAAA,SAAAC,GACA,GAAAC,GAAAtB,EAAAuB,iBAAAF,EACA,OAAAC,GACApB,EAAAsB,iBAAAH,EAAAC,KAGApB,GAaArB,EAAAgB,UAAAqB,WACA,SAAAlC,GACA,GAAAuB,GAAArB,EAAAC,OAAAH,EAAA,aACA8B,EAAA5B,EAAAC,OAAAH,EAAA,iBACA4B,EAAA1B,EAAAC,OAAAH,EAAA,eACAiC,EAAA/B,EAAAC,OAAAH,EAAA,YAEAd,MAAAmB,iBACAnB,KAAAuD,iBAAAlB,EAAAO,EAAAF,EAAAK,GAGA,MAAAL,IACAA,EAAAc,OAAAd,GACA1C,KAAAoB,SAAAqC,IAAAf,IACA1C,KAAAoB,SAAAsC,IAAAhB,IAIA,MAAAK,IACAA,EAAAS,OAAAT,GACA/C,KAAAsB,OAAAmC,IAAAV,IACA/C,KAAAsB,OAAAoC,IAAAX,IAIA/C,KAAAuB,UAAAmC,KACAnB,cAAAF,EAAAC,KACAG,gBAAAJ,EAAAG,OACAK,aAAA,MAAAD,KAAAN,KACAQ,eAAA,MAAAF,KAAAJ,OACAE,SACAK,UAOApC,EAAAgB,UAAA2B,iBACA,SAAAK,EAAAC,GACA,GAAAlB,GAAAiB,CACA,OAAA3D,KAAAkB,cACAwB,EAAA1B,EAAA2B,SAAA3C,KAAAkB,YAAAwB,IAGA,MAAAkB,GAGA5D,KAAAyB,mBACAzB,KAAAyB,iBAAAoC,OAAAC,OAAA,OAEA9D,KAAAyB,iBAAAT,EAAA+C,YAAArB,IAAAkB,GACK5D,KAAAyB,yBAGLzB,MAAAyB,iBAAAT,EAAA+C,YAAArB,IACA,IAAAmB,OAAAG,KAAAhE,KAAAyB,kBAAAwC,SACAjE,KAAAyB,iBAAA,QAqBAd,EAAAgB,UAAAuC,eACA,SAAApC,EAAA6B,EAAAQ,GACA,GAAAhB,GAAAQ,CAEA,UAAAA,EAAA,CACA,SAAA7B,EAAAG,KACA,SAAAmC,OACA,gJAIAjB,GAAArB,EAAAG,KAEA,GAAAF,GAAA/B,KAAAkB,WAEA,OAAAa,IACAoB,EAAAnC,EAAA2B,SAAAZ,EAAAoB,GAIA,IAAAkB,GAAA,GAAAhD,GACAiD,EAAA,GAAAjD,EAGArB,MAAAuB,UAAAgD,gBAAA,SAAApC,GACA,GAAAA,EAAAO,SAAAS,GAAA,MAAAhB,EAAAU,aAAA,CAEA,GAAAD,GAAAd,EAAA0C,qBACAlC,KAAAH,EAAAU,aACAL,OAAAL,EAAAW,gBAEA,OAAAF,EAAAF,SAEAP,EAAAO,OAAAE,EAAAF,OACA,MAAAyB,IACAhC,EAAAO,OAAA1B,EAAAyD,KAAAN,EAAAhC,EAAAO,SAEA,MAAAX,IACAI,EAAAO,OAAA1B,EAAA2B,SAAAZ,EAAAI,EAAAO,SAEAP,EAAAU,aAAAD,EAAAN,KACAH,EAAAW,eAAAF,EAAAJ,OACA,MAAAI,EAAAG,OACAZ,EAAAY,KAAAH,EAAAG,OAKA,GAAAL,GAAAP,EAAAO,MACA,OAAAA,GAAA2B,EAAAZ,IAAAf,IACA2B,EAAAX,IAAAhB,EAGA,IAAAK,GAAAZ,EAAAY,IACA,OAAAA,GAAAuB,EAAAb,IAAAV,IACAuB,EAAAZ,IAAAX,IAGK/C,MACLA,KAAAoB,SAAAiD,EACArE,KAAAsB,OAAAgD,EAGAxC,EAAAmB,QAAAC,QAAA,SAAAC,GACA,GAAAC,GAAAtB,EAAAuB,iBAAAF,EACA,OAAAC,IACA,MAAAe,IACAhB,EAAAnC,EAAAyD,KAAAN,EAAAhB,IAEA,MAAApB,IACAoB,EAAAnC,EAAA2B,SAAAZ,EAAAoB,IAEAnD,KAAAsD,iBAAAH,EAAAC,KAEKpD,OAcLW,EAAAgB,UAAA4B,iBACA,SAAAmB,EAAAC,EAAAC,EACAC,GACA,MAAAH,GAAA,QAAAA,IAAA,UAAAA,IACAA,EAAApC,KAAA,GAAAoC,EAAAlC,QAAA,IACAmC,GAAAC,GAAAC,MAIAH,GAAA,QAAAA,IAAA,UAAAA,IACAC,GAAA,QAAAA,IAAA,UAAAA,IACAD,EAAApC,KAAA,GAAAoC,EAAAlC,QAAA,GACAmC,EAAArC,KAAA,GAAAqC,EAAAnC,QAAA,GACAoC,GAKA,SAAAR,OAAA,oBAAAU,KAAAC,WACA1C,UAAAqC,EACAhC,OAAAkC,EACAhC,SAAA+B,EACA5B,KAAA8B,MASAlE,EAAAgB,UAAAqD,mBACA,WAcA,OANAC,GACA9C,EACA+C,EACAC,EAVAC,EAAA,EACAC,EAAA,EACAC,EAAA,EACAC,EAAA,EACAC,EAAA,EACAC,EAAA,EACAC,EAAA,GAMAC,EAAA3F,KAAAuB,UAAAqE,UACAC,EAAA,EAAAC,EAAAH,EAAA1B,OAA0C6B,EAAAD,EAASA,IAAA,CAInD,GAHA1D,EAAAwD,EAAAE,GACAZ,EAAA,GAEA9C,EAAAI,gBAAA8C,EAEA,IADAD,EAAA,EACAjD,EAAAI,gBAAA8C,GACAJ,GAAA,IACAI,QAIA,IAAAQ,EAAA,GACA,IAAA7E,EAAA+E,oCAAA5D,EAAAwD,EAAAE,EAAA,IACA,QAEAZ,IAAA,IAIAA,GAAAvD,EAAAsE,OAAA7D,EAAAM,gBACA2C,GACAA,EAAAjD,EAAAM,gBAEA,MAAAN,EAAAO,SACAyC,EAAAnF,KAAAoB,SAAA6E,QAAA9D,EAAAO,QACAuC,GAAAvD,EAAAsE,OAAAb,EAAAM,GACAA,EAAAN,EAGAF,GAAAvD,EAAAsE,OAAA7D,EAAAU,aAAA,EACA0C,GACAA,EAAApD,EAAAU,aAAA,EAEAoC,GAAAvD,EAAAsE,OAAA7D,EAAAW,eACAwC,GACAA,EAAAnD,EAAAW,eAEA,MAAAX,EAAAY,OACAmC,EAAAlF,KAAAsB,OAAA2E,QAAA9D,EAAAY,MACAkC,GAAAvD,EAAAsE,OAAAd,EAAAM,GACAA,EAAAN,IAIAQ,GAAAT,EAGA,MAAAS,IAGA/E,EAAAgB,UAAAuE,wBACA,SAAAC,EAAAC,GACA,MAAAD,GAAAE,IAAA,SAAA3D,GACA,IAAA1C,KAAAyB,iBACA,WAEA,OAAA2E,IACA1D,EAAA1B,EAAA2B,SAAAyD,EAAA1D,GAEA,IAAA4D,GAAAtF,EAAA+C,YAAArB,EACA,OAAAmB,QAAAlC,UAAA4E,eAAAhG,KAAAP,KAAAyB,iBAAA6E,GACAtG,KAAAyB,iBAAA6E,GACA,MACKtG,OAMLW,EAAAgB,UAAA6E,OACA,WACA,GAAAH,IACAI,QAAAzG,KAAA4B,SACAqB,QAAAjD,KAAAoB,SAAAwE,UACAc,MAAA1G,KAAAsB,OAAAsE,UACAD,SAAA3F,KAAAgF,qBAYA,OAVA,OAAAhF,KAAAe,QACAsF,EAAApE,KAAAjC,KAAAe,OAEA,MAAAf,KAAAkB,cACAmF,EAAAtE,WAAA/B,KAAAkB,aAEAlB,KAAAyB,mBACA4E,EAAAM,eAAA3G,KAAAkG,wBAAAG,EAAApD,QAAAoD,EAAAtE,aAGAsE,GAMA1F,EAAAgB,UAAAiF,SACA,WACA,MAAA9B,MAAAC,UAAA/E,KAAAwG,WAGA5G,EAAAe,sBH2EM,SAASd,EAAQD,EAASM,GI1ZhC,QAAA2G,GAAAC,GACA,SAAAA,IACAA,GAAA,MACAA,GAAA,KASA,QAAAC,GAAAD,GACA,GAAAE,GAAA,OAAAF,GACAG,EAAAH,GAAA,CACA,OAAAE,IACAC,EACAA,EAhDA,GAAAC,GAAAhH,EAAA,GAcAiH,EAAA,EAGAC,EAAA,GAAAD,EAGAE,EAAAD,EAAA,EAGAE,EAAAF,CA+BAxH,GAAAoG,OAAA,SAAAc,GACA,GACAS,GADAC,EAAA,GAGAC,EAAAZ,EAAAC,EAEA,GACAS,GAAAE,EAAAJ,EACAI,KAAAN,EACAM,EAAA,IAGAF,GAAAD,GAEAE,GAAAN,EAAAlB,OAAAuB,SACGE,EAAA,EAEH,OAAAD,IAOA5H,EAAA8H,OAAA,SAAAC,EAAAC,EAAAC,GACA,GAGAC,GAAAP,EAHAQ,EAAAJ,EAAA1D,OACAyB,EAAA,EACAsC,EAAA,CAGA,IACA,GAAAJ,GAAAG,EACA,SAAA3D,OAAA,6CAIA,IADAmD,EAAAL,EAAAQ,OAAAC,EAAAM,WAAAL,MACA,KAAAL,EACA,SAAAnD,OAAA,yBAAAuD,EAAAO,OAAAN,EAAA,GAGAE,MAAAP,EAAAD,GACAC,GAAAF,EACA3B,GAAA6B,GAAAS,EACAA,GAAAb,QACGW,EAEHD,GAAAM,MAAApB,EAAArB,GACAmC,EAAAO,KAAAR,IJseM,SAAS/H,EAAQD,GKzmBvB,GAAAyI,GAAA,mEAAAC,MAAA,GAKA1I,GAAAoG,OAAA,SAAAuC,GACA,GAAAA,GAAA,GAAAA,EAAAF,EAAApE,OACA,MAAAoE,GAAAE,EAEA,UAAAC,WAAA,6BAAAD,IAOA3I,EAAA8H,OAAA,SAAAe,GACA,GAAAC,GAAA,GACAC,EAAA,GAEAC,EAAA,GACAC,EAAA,IAEAC,EAAA,GACAC,EAAA,GAEAC,EAAA,GACAC,EAAA,GAEAC,EAAA,GACAC,EAAA,EAGA,OAAAV,IAAAC,GAAAC,GAAAF,EACAA,EAAAC,EAIAD,GAAAG,GAAAC,GAAAJ,EACAA,EAAAG,EAAAM,EAIAT,GAAAK,GAAAC,GAAAN,EACAA,EAAAK,EAAAK,EAIAV,GAAAO,EACA,GAIAP,GAAAQ,EACA,GAIA,KLwnBM,SAASpJ,EAAQD,GMxqBvB,QAAAqB,GAAAH,EAAA+D,EAAAuE,GACA,GAAAvE,IAAA/D,GACA,MAAAA,GAAA+D,EACG,QAAAwE,UAAApF,OACH,MAAAmF,EAEA,UAAAhF,OAAA,IAAAS,EAAA,6BAQA,QAAAyE,GAAAC,GACA,GAAAC,GAAAD,EAAAC,MAAAC,EACA,OAAAD,IAIAE,OAAAF,EAAA,GACAG,KAAAH,EAAA,GACAI,KAAAJ,EAAA,GACAK,KAAAL,EAAA,GACAM,KAAAN,EAAA,IAPA,KAYA,QAAAO,GAAAC,GACA,GAAAC,GAAA,EAiBA,OAhBAD,GAAAN,SACAO,GAAAD,EAAAN,OAAA,KAEAO,GAAA,KACAD,EAAAL,OACAM,GAAAD,EAAAL,KAAA,KAEAK,EAAAJ,OACAK,GAAAD,EAAAJ,MAEAI,EAAAH,OACAI,GAAA,IAAAD,EAAAH,MAEAG,EAAAF,OACAG,GAAAD,EAAAF,MAEAG,EAeA,QAAAC,GAAAC,GACA,GAAAL,GAAAK,EACAF,EAAAX,EAAAa,EACA,IAAAF,EAAA,CACA,IAAAA,EAAAH,KACA,MAAAK,EAEAL,GAAAG,EAAAH,KAKA,OAAAM,GAHAC,EAAAzK,EAAAyK,WAAAP,GAEAQ,EAAAR,EAAAxB,MAAA,OACAiC,EAAA,EAAA1E,EAAAyE,EAAArG,OAAA,EAA8C4B,GAAA,EAAQA,IACtDuE,EAAAE,EAAAzE,GACA,MAAAuE,EACAE,EAAAE,OAAA3E,EAAA,GACK,OAAAuE,EACLG,IACKA,EAAA,IACL,KAAAH,GAIAE,EAAAE,OAAA3E,EAAA,EAAA0E,GACAA,EAAA,IAEAD,EAAAE,OAAA3E,EAAA,GACA0E,KAUA,OANAT,GAAAQ,EAAA7F,KAAA,KAEA,KAAAqF,IACAA,EAAAO,EAAA,SAGAJ,GACAA,EAAAH,OACAC,EAAAE,IAEAH,EAoBA,QAAArF,GAAAgG,EAAAN,GACA,KAAAM,IACAA,EAAA,KAEA,KAAAN,IACAA,EAAA,IAEA,IAAAO,GAAApB,EAAAa,GACAQ,EAAArB,EAAAmB,EAMA,IALAE,IACAF,EAAAE,EAAAb,MAAA,KAIAY,MAAAhB,OAIA,MAHAiB,KACAD,EAAAhB,OAAAiB,EAAAjB,QAEAK,EAAAW,EAGA,IAAAA,GAAAP,EAAAX,MAAAoB,GACA,MAAAT,EAIA,IAAAQ,MAAAf,OAAAe,EAAAb,KAEA,MADAa,GAAAf,KAAAO,EACAJ,EAAAY,EAGA,IAAAE,GAAA,MAAAV,EAAAjC,OAAA,GACAiC,EACAD,EAAAO,EAAAK,QAAA,eAAAX,EAEA,OAAAQ,IACAA,EAAAb,KAAAe,EACAd,EAAAY,IAEAE,EAcA,QAAAlI,GAAA8H,EAAAN,GACA,KAAAM,IACAA,EAAA,KAGAA,IAAAK,QAAA,SAOA,KADA,GAAAC,GAAA,EACA,IAAAZ,EAAAlE,QAAAwE,EAAA,OACA,GAAAO,GAAAP,EAAAQ,YAAA,IACA,MAAAD,EACA,MAAAb,EAOA,IADAM,IAAAS,MAAA,EAAAF,GACAP,EAAAjB,MAAA,qBACA,MAAAW,KAGAY,EAIA,MAAAI,OAAAJ,EAAA,GAAAtG,KAAA,OAAA0F,EAAAiB,OAAAX,EAAAxG,OAAA,GASA,QAAAoH,GAAAC,GACA,MAAAA,GAYA,QAAAvH,GAAA4D,GACA,MAAA4D,GAAA5D,GACA,IAAAA,EAGAA,EAIA,QAAA6D,GAAA7D,GACA,MAAA4D,GAAA5D,GACAA,EAAAuD,MAAA,GAGAvD,EAIA,QAAA4D,GAAAD,GACA,IAAAA,EACA,QAGA,IAAArH,GAAAqH,EAAArH,MAEA,MAAAA,EACA,QAGA,SAAAqH,EAAArD,WAAAhE,EAAA,IACA,KAAAqH,EAAArD,WAAAhE,EAAA,IACA,MAAAqH,EAAArD,WAAAhE,EAAA,IACA,MAAAqH,EAAArD,WAAAhE,EAAA,IACA,MAAAqH,EAAArD,WAAAhE,EAAA,IACA,MAAAqH,EAAArD,WAAAhE,EAAA,IACA,MAAAqH,EAAArD,WAAAhE,EAAA,IACA,KAAAqH,EAAArD,WAAAhE,EAAA,IACA,KAAAqH,EAAArD,WAAAhE,EAAA,GACA,QAGA,QAAA4B,GAAA5B,EAAA,GAA2B4B,GAAA,EAAQA,IACnC,QAAAyF,EAAArD,WAAApC,GACA,QAIA,UAWA,QAAA4F,GAAAC,EAAAC,EAAAC,GACA,GAAAC,GAAAH,EAAAhJ,OAAAiJ,EAAAjJ,MACA,YAAAmJ,EACAA,GAGAA,EAAAH,EAAA7I,aAAA8I,EAAA9I,aACA,IAAAgJ,EACAA,GAGAA,EAAAH,EAAA5I,eAAA6I,EAAA7I,eACA,IAAA+I,GAAAD,EACAC,GAGAA,EAAAH,EAAAjJ,gBAAAkJ,EAAAlJ,gBACA,IAAAoJ,EACAA,GAGAA,EAAAH,EAAAnJ,cAAAoJ,EAAApJ,cACA,IAAAsJ,EACAA,EAGAH,EAAA3I,KAAA4I,EAAA5I,SAaA,QAAA+I,GAAAJ,EAAAC,EAAAI,GACA,GAAAF,GAAAH,EAAAnJ,cAAAoJ,EAAApJ,aACA,YAAAsJ,EACAA,GAGAA,EAAAH,EAAAjJ,gBAAAkJ,EAAAlJ,gBACA,IAAAoJ,GAAAE,EACAF,GAGAA,EAAAH,EAAAhJ,OAAAiJ,EAAAjJ,OACA,IAAAmJ,EACAA,GAGAA,EAAAH,EAAA7I,aAAA8I,EAAA9I,aACA,IAAAgJ,EACAA,GAGAA,EAAAH,EAAA5I,eAAA6I,EAAA7I,eACA,IAAA+I,EACAA,EAGAH,EAAA3I,KAAA4I,EAAA5I,SAIA,QAAAiJ,GAAAC,EAAAC,GACA,MAAAD,KAAAC,EACA,EAGAD,EAAAC,EACA,EAGA,GAOA,QAAAnG,GAAA2F,EAAAC,GACA,GAAAE,GAAAH,EAAAnJ,cAAAoJ,EAAApJ,aACA,YAAAsJ,EACAA,GAGAA,EAAAH,EAAAjJ,gBAAAkJ,EAAAlJ,gBACA,IAAAoJ,EACAA,GAGAA,EAAAG,EAAAN,EAAAhJ,OAAAiJ,EAAAjJ,QACA,IAAAmJ,EACAA,GAGAA,EAAAH,EAAA7I,aAAA8I,EAAA9I,aACA,IAAAgJ,EACAA,GAGAA,EAAAH,EAAA5I,eAAA6I,EAAA7I,eACA,IAAA+I,EACAA,EAGAG,EAAAN,EAAA3I,KAAA4I,EAAA5I,UApYAnD,EAAAqB,QAEA,IAAAwI,GAAA,iEACAmB,EAAA,eAeAhL,GAAA0J,WAsBA1J,EAAAmK,cAwDAnK,EAAAsK,YA2DAtK,EAAA6E,OAEA7E,EAAAyK,WAAA,SAAAF,GACA,YAAAA,EAAAjC,OAAA,MAAAiC,EAAAX,MAAAC,IAyCA7J,EAAA+C,UAEA,IAAAwJ,GAAA,WACA,GAAAC,GAAAvI,OAAAC,OAAA,KACA,sBAAAsI,MAuBAxM,GAAAmE,YAAAoI,EAAAd,EAAAtH,EASAnE,EAAA4L,cAAAW,EAAAd,EAAAG,EAsEA5L,EAAA6L,6BAuCA7L,EAAAkM,sCA8CAlM,EAAAmG,uCNgsBM,SAASlG,EAAQD,EAASM,GOhlChC,QAAAmB,KACArB,KAAAqM,UACArM,KAAAsM,KAAAzI,OAAAC,OAAA,MAXA,GAAA9C,GAAAd,EAAA,GACAuD,EAAAI,OAAAlC,UAAA4E,cAgBAlF,GAAAkL,UAAA,SAAAC,EAAAC,GAEA,OADAC,GAAA,GAAArL,GACAwE,EAAA,EAAAC,EAAA0G,EAAAvI,OAAsC6B,EAAAD,EAASA,IAC/C6G,EAAAhJ,IAAA8I,EAAA3G,GAAA4G,EAEA,OAAAC,IASArL,EAAAM,UAAAgL,KAAA,WACA,MAAA9I,QAAA+I,oBAAA5M,KAAAsM,MAAArI,QAQA5C,EAAAM,UAAA+B,IAAA,SAAAiE,EAAA8E,GACA,GAAAI,GAAA7L,EAAA+C,YAAA4D,GACAmF,EAAArJ,EAAAlD,KAAAP,KAAAsM,KAAAO,GACAE,EAAA/M,KAAAqM,OAAApI,SACA6I,GAAAL,IACAzM,KAAAqM,OAAAW,KAAArF,GAEAmF,IACA9M,KAAAsM,KAAAO,GAAAE,IASA1L,EAAAM,UAAA8B,IAAA,SAAAkE,GACA,GAAAkF,GAAA7L,EAAA+C,YAAA4D,EACA,OAAAlE,GAAAlD,KAAAP,KAAAsM,KAAAO,IAQAxL,EAAAM,UAAAsE,QAAA,SAAA0B,GACA,GAAAkF,GAAA7L,EAAA+C,YAAA4D,EACA,IAAAlE,EAAAlD,KAAAP,KAAAsM,KAAAO,GACA,MAAA7M,MAAAsM,KAAAO,EAEA,UAAAzI,OAAA,IAAAuD,EAAA,yBAQAtG,EAAAM,UAAAsL,GAAA,SAAAC,GACA,GAAAA,GAAA,GAAAA,EAAAlN,KAAAqM,OAAApI,OACA,MAAAjE,MAAAqM,OAAAa,EAEA,UAAA9I,OAAA,yBAAA8I,IAQA7L,EAAAM,UAAAiE,QAAA,WACA,MAAA5F,MAAAqM,OAAAnB,SAGAtL,EAAAyB,YPumCM,SAASxB,EAAQD,EAASM,GQjsChC,QAAAiN,GAAAzB,EAAAC,GAEA,GAAAyB,GAAA1B,EAAAnJ,cACA8K,EAAA1B,EAAApJ,cACA+K,EAAA5B,EAAAjJ,gBACA8K,EAAA5B,EAAAlJ,eACA,OAAA4K,GAAAD,GAAAC,GAAAD,GAAAG,GAAAD,GACAtM,EAAA+E,oCAAA2F,EAAAC,IAAA,EAQA,QAAAnK,KACAxB,KAAAqM,UACArM,KAAAwN,SAAA,EAEAxN,KAAAyN,OAAgBlL,cAAA,GAAAE,gBAAA,GAzBhB,GAAAzB,GAAAd,EAAA,EAkCAsB,GAAAG,UAAA4C,gBACA,SAAAmJ,EAAAC,GACA3N,KAAAqM,OAAAnJ,QAAAwK,EAAAC,IAQAnM,EAAAG,UAAA+B,IAAA,SAAAkK,GACAT,EAAAnN,KAAAyN,MAAAG,IACA5N,KAAAyN,MAAAG,EACA5N,KAAAqM,OAAAW,KAAAY,KAEA5N,KAAAwN,SAAA,EACAxN,KAAAqM,OAAAW,KAAAY,KAaApM,EAAAG,UAAAiE,QAAA,WAKA,MAJA5F,MAAAwN,UACAxN,KAAAqM,OAAAwB,KAAA7M,EAAA+E,qCACA/F,KAAAwN,SAAA,GAEAxN,KAAAqM,QAGAzM,EAAA4B,eRqtCM,SAAS3B,EAAQD,EAASM,GStxChC,QAAAU,GAAAkN,GACA,GAAAC,GAAAD,CAKA,OAJA,gBAAAA,KACAC,EAAAjJ,KAAAkJ,MAAAF,EAAAhD,QAAA,WAAsD,MAGtD,MAAAiD,EAAAE,SACA,GAAAC,GAAAH,GACA,GAAAI,GAAAJ,GAoQA,QAAAI,GAAAL,GACA,GAAAC,GAAAD,CACA,iBAAAA,KACAC,EAAAjJ,KAAAkJ,MAAAF,EAAAhD,QAAA,WAAsD,KAGtD,IAAArE,GAAAzF,EAAAC,OAAA8M,EAAA,WACA9K,EAAAjC,EAAAC,OAAA8M,EAAA,WAGArH,EAAA1F,EAAAC,OAAA8M,EAAA,YACAhM,EAAAf,EAAAC,OAAA8M,EAAA,mBACApH,EAAA3F,EAAAC,OAAA8M,EAAA,uBACApI,EAAA3E,EAAAC,OAAA8M,EAAA,YACA9L,EAAAjB,EAAAC,OAAA8M,EAAA,YAIA,IAAAtH,GAAAzG,KAAA4B,SACA,SAAAwC,OAAA,wBAAAqC,EAGAxD,KACAoD,IAAA7C,QAIA6C,IAAArF,EAAAkJ,WAKA7D,IAAA,SAAA3D,GACA,MAAAX,IAAAf,EAAAqJ,WAAAtI,IAAAf,EAAAqJ,WAAA3H,GACA1B,EAAA2B,SAAAZ,EAAAW,GACAA,IAOA1C,KAAAsB,OAAAD,EAAAkL,UAAA7F,EAAAL,IAAA7C,SAAA,GACAxD,KAAAoB,SAAAC,EAAAkL,UAAAtJ,GAAA,GAEAjD,KAAA+B,aACA/B,KAAA2G,iBACA3G,KAAAuB,UAAAoE,EACA3F,KAAAiC,OA8EA,QAAAmM,KACApO,KAAAuC,cAAA,EACAvC,KAAAyC,gBAAA,EACAzC,KAAA0C,OAAA,KACA1C,KAAA6C,aAAA,KACA7C,KAAA8C,eAAA,KACA9C,KAAA+C,KAAA,KAyZA,QAAAmL,GAAAJ,GACA,GAAAC,GAAAD,CACA,iBAAAA,KACAC,EAAAjJ,KAAAkJ,MAAAF,EAAAhD,QAAA,WAAsD,KAGtD,IAAArE,GAAAzF,EAAAC,OAAA8M,EAAA,WACAE,EAAAjN,EAAAC,OAAA8M,EAAA,WAEA,IAAAtH,GAAAzG,KAAA4B,SACA,SAAAwC,OAAA,wBAAAqC,EAGAzG,MAAAoB,SAAA,GAAAC,GACArB,KAAAsB,OAAA,GAAAD,EAEA,IAAAgN,IACA/L,KAAA,GACAE,OAAA,EAEAxC,MAAAsO,UAAAL,EAAA5H,IAAA,SAAAiF,GACA,GAAAA,EAAArB,IAGA,SAAA7F,OAAA,qDAEA,IAAAmK,GAAAvN,EAAAC,OAAAqK,EAAA,UACAkD,EAAAxN,EAAAC,OAAAsN,EAAA,QACAE,EAAAzN,EAAAC,OAAAsN,EAAA,SAEA,IAAAC,EAAAH,EAAA/L,MACAkM,IAAAH,EAAA/L,MAAAmM,EAAAJ,EAAA7L,OACA,SAAA4B,OAAA,uDAIA,OAFAiK,GAAAE,GAGAG,iBAGAnM,cAAAiM,EAAA,EACA/L,gBAAAgM,EAAA,GAEAE,SAAA,GAAA/N,GAAAI,EAAAC,OAAAqK,EAAA,WA11BA,GAAAtK,GAAAd,EAAA,GACA0O,EAAA1O,EAAA,GACAmB,EAAAnB,EAAA,GAAAmB,SACAK,EAAAxB,EAAA,GACA2O,EAAA3O,EAAA,GAAA2O,SAaAjO,GAAAiB,cAAA,SAAAiM,GACA,MAAAK,GAAAtM,cAAAiM,IAMAlN,EAAAe,UAAAC,SAAA,EAgCAhB,EAAAe,UAAAmN,oBAAA,KACAjL,OAAAkL,eAAAnO,EAAAe,UAAA,sBACAqN,IAAA,WAKA,MAJAhP,MAAA8O,qBACA9O,KAAAiP,eAAAjP,KAAAuB,UAAAvB,KAAA+B,YAGA/B,KAAA8O,uBAIAlO,EAAAe,UAAAuN,mBAAA,KACArL,OAAAkL,eAAAnO,EAAAe,UAAA,qBACAqN,IAAA,WAKA,MAJAhP,MAAAkP,oBACAlP,KAAAiP,eAAAjP,KAAAuB,UAAAvB,KAAA+B,YAGA/B,KAAAkP,sBAIAtO,EAAAe,UAAAwN,wBACA,SAAAxH,EAAAqD,GACA,GAAAvK,GAAAkH,EAAAO,OAAA8C,EACA,aAAAvK,GAAmB,MAAAA,GAQnBG,EAAAe,UAAAsN,eACA,SAAAtH,EAAAvB,GACA,SAAAhC,OAAA,6CAGAxD,EAAAwO,gBAAA,EACAxO,EAAAyO,eAAA,EAEAzO,EAAA0O,qBAAA,EACA1O,EAAA2O,kBAAA,EAkBA3O,EAAAe,UAAAO,YACA,SAAAwL,EAAA8B,EAAAC,GACA,GAGA9J,GAHA+J,EAAAF,GAAA,KACAG,EAAAF,GAAA7O,EAAAwO,eAGA,QAAAO,GACA,IAAA/O,GAAAwO,gBACAzJ,EAAA3F,KAAA4P,kBACA,MACA,KAAAhP,GAAAyO,eACA1J,EAAA3F,KAAA6P,iBACA,MACA,SACA,SAAAzL,OAAA,+BAGA,GAAArC,GAAA/B,KAAA+B,UACA4D,GAAAU,IAAA,SAAAlE,GACA,GAAAO,GAAA,OAAAP,EAAAO,OAAA,KAAA1C,KAAAoB,SAAA6L,GAAA9K,EAAAO,OAIA,OAHA,OAAAA,GAAA,MAAAX,IACAW,EAAA1B,EAAAyD,KAAA1C,EAAAW,KAGAA,SACAH,cAAAJ,EAAAI,cACAE,gBAAAN,EAAAM,gBACAI,aAAAV,EAAAU,aACAC,eAAAX,EAAAW,eACAC,KAAA,OAAAZ,EAAAY,KAAA,KAAA/C,KAAAsB,OAAA2L,GAAA9K,EAAAY,QAEK/C,MAAAkD,QAAAwK,EAAAgC,IAsBL9O,EAAAe,UAAAmO,yBACA,SAAAhP,GACA,GAAAwB,GAAAtB,EAAAC,OAAAH,EAAA,QAMAiP,GACArN,OAAA1B,EAAAC,OAAAH,EAAA,UACA+B,aAAAP,EACAQ,eAAA9B,EAAAC,OAAAH,EAAA,YAMA,IAHA,MAAAd,KAAA+B,aACAgO,EAAArN,OAAA1B,EAAA2B,SAAA3C,KAAA+B,WAAAgO,EAAArN,UAEA1C,KAAAoB,SAAAqC,IAAAsM,EAAArN,QACA,QAEAqN,GAAArN,OAAA1C,KAAAoB,SAAA6E,QAAA8J,EAAArN,OAEA,IAAAiD,MAEAqF,EAAAhL,KAAAgQ,aAAAD,EACA/P,KAAA6P,kBACA,eACA,iBACA7O,EAAAyK,2BACAmD,EAAAW,kBACA,IAAAvE,GAAA,GACA,GAAA7I,GAAAnC,KAAA6P,kBAAA7E,EAEA,IAAAiF,SAAAnP,EAAA0B,OAOA,IANA,GAAAK,GAAAV,EAAAU,aAMAV,KAAAU,kBACA8C,EAAAqH,MACA1K,KAAAtB,EAAAC,OAAAkB,EAAA,sBACAK,OAAAxB,EAAAC,OAAAkB,EAAA,wBACA+N,WAAAlP,EAAAC,OAAAkB,EAAA,8BAGAA,EAAAnC,KAAA6P,oBAAA7E,OASA,KANA,GAAAlI,GAAAX,EAAAW,eAMAX,GACAA,EAAAU,eAAAP,GACAH,EAAAW,mBACA6C,EAAAqH,MACA1K,KAAAtB,EAAAC,OAAAkB,EAAA,sBACAK,OAAAxB,EAAAC,OAAAkB,EAAA,wBACA+N,WAAAlP,EAAAC,OAAAkB,EAAA,8BAGAA,EAAAnC,KAAA6P,oBAAA7E,GAKA,MAAArF,IAGA/F,EAAAgB,oBAmFAuN,EAAAxM,UAAAkC,OAAAC,OAAAlD,EAAAe,WACAwM,EAAAxM,UAAAgN,SAAA/N,EASAuN,EAAAtM,cACA,SAAAiM,GACA,GAAAqC,GAAAtM,OAAAC,OAAAqK,EAAAxM,WAEA+E,EAAAyJ,EAAA7O,OAAAD,EAAAkL,UAAAuB,EAAAxM,OAAAsE,WAAA,GACA3C,EAAAkN,EAAA/O,SAAAC,EAAAkL,UAAAuB,EAAA1M,SAAAwE,WAAA,EACAuK,GAAApO,WAAA+L,EAAA5M,YACAiP,EAAAxJ,eAAAmH,EAAA5H,wBAAAiK,EAAA/O,SAAAwE,UACAuK,EAAApO,YACAoO,EAAAlO,KAAA6L,EAAA/M,KAWA,QAJAqP,GAAAtC,EAAAvM,UAAAqE,UAAAsF,QACAmF,EAAAF,EAAArB,uBACAwB,EAAAH,EAAAjB,sBAEArJ,EAAA,EAAA5B,EAAAmM,EAAAnM,OAAsDA,EAAA4B,EAAYA,IAAA,CAClE,GAAA0K,GAAAH,EAAAvK,GACA2K,EAAA,GAAApC,EACAoC,GAAAjO,cAAAgO,EAAAhO,cACAiO,EAAA/N,gBAAA8N,EAAA9N,gBAEA8N,EAAA7N,SACA8N,EAAA9N,OAAAO,EAAAgD,QAAAsK,EAAA7N,QACA8N,EAAA3N,aAAA0N,EAAA1N,aACA2N,EAAA1N,eAAAyN,EAAAzN,eAEAyN,EAAAxN,OACAyN,EAAAzN,KAAA2D,EAAAT,QAAAsK,EAAAxN,OAGAuN,EAAAtD,KAAAwD,IAGAH,EAAArD,KAAAwD,GAKA,MAFA3B,GAAAsB,EAAAjB,mBAAAlO,EAAAyK,4BAEA0E,GAMAhC,EAAAxM,UAAAC,SAAA,EAKAiC,OAAAkL,eAAAZ,EAAAxM,UAAA,WACAqN,IAAA,WACA,MAAAhP,MAAAoB,SAAAwE,UAAAS,IAAA,SAAAiF,GACA,aAAAtL,KAAA+B,WAAAf,EAAAyD,KAAAzE,KAAA+B,WAAAuJ,MACKtL,SAqBLmO,EAAAxM,UAAAsN,eACA,SAAAtH,EAAAvB,GAeA,IAdA,GAYAjE,GAAAsO,EAAAC,EAAAC,EAAAxI,EAZA5F,EAAA,EACA6C,EAAA,EACAG,EAAA,EACAD,EAAA,EACAG,EAAA,EACAD,EAAA,EACAvB,EAAA0D,EAAA1D,OACA+G,EAAA,EACA4F,KACAC,KACAC,KACAV,KAGAnM,EAAA+G,GACA,SAAArD,EAAAO,OAAA8C,GACAzI,IACAyI,IACA5F,EAAA,MAEA,UAAAuC,EAAAO,OAAA8C,GACAA,QAEA,CASA,IARA7I,EAAA,GAAAiM,GACAjM,EAAAI,gBAOAoO,EAAA3F,EAAyB/G,EAAA0M,IACzB3Q,KAAAmP,wBAAAxH,EAAAgJ,GADuCA,KAQvC,GAHAF,EAAA9I,EAAAuD,MAAAF,EAAA2F,GAEAD,EAAAE,EAAAH,GAEAzF,GAAAyF,EAAAxM,WACS,CAET,IADAyM,KACAC,EAAA3F,GACAtJ,EAAAgG,OAAAC,EAAAqD,EAAA6F,GACA1I,EAAA0I,EAAA1I,MACA6C,EAAA6F,EAAAzI,KACAsI,EAAA1D,KAAA7E,EAGA,QAAAuI,EAAAzM,OACA,SAAAG,OAAA,yCAGA,QAAAsM,EAAAzM,OACA,SAAAG,OAAA,yCAGAwM,GAAAH,GAAAC,EAIAvO,EAAAM,gBAAA2C,EAAAsL,EAAA,GACAtL,EAAAjD,EAAAM,gBAEAiO,EAAAzM,OAAA,IAEA9B,EAAAO,OAAA+C,EAAAiL,EAAA,GACAjL,GAAAiL,EAAA,GAGAvO,EAAAU,aAAA0C,EAAAmL,EAAA,GACAnL,EAAApD,EAAAU,aAEAV,EAAAU,cAAA,EAGAV,EAAAW,eAAAwC,EAAAoL,EAAA,GACApL,EAAAnD,EAAAW,eAEA4N,EAAAzM,OAAA,IAEA9B,EAAAY,KAAAyC,EAAAkL,EAAA,GACAlL,GAAAkL,EAAA,KAIAN,EAAApD,KAAA7K,GACA,gBAAAA,GAAAU,cACAiO,EAAA9D,KAAA7K,GAKA0M,EAAAuB,EAAApP,EAAA8K,qCACA9L,KAAA8O,oBAAAsB,EAEAvB,EAAAiC,EAAA9P,EAAAyK,4BACAzL,KAAAkP,mBAAA4B,GAOA3C,EAAAxM,UAAAqO,aACA,SAAAe,EAAAC,EAAAC,EACAC,EAAAC,EAAAC,GAMA,GAAAL,EAAAE,IAAA,EACA,SAAAzI,WAAA,gDACAuI,EAAAE,GAEA,IAAAF,EAAAG,GAAA,EACA,SAAA1I,WAAA,kDACAuI,EAAAG,GAGA,OAAAtC,GAAAyC,OAAAN,EAAAC,EAAAG,EAAAC,IAOAjD,EAAAxM,UAAA2P,mBACA,WACA,OAAAtG,GAAA,EAAuBA,EAAAhL,KAAA4P,mBAAA3L,SAAwC+G,EAAA,CAC/D,GAAA7I,GAAAnC,KAAA4P,mBAAA5E,EAMA,IAAAA,EAAA,EAAAhL,KAAA4P,mBAAA3L,OAAA,CACA,GAAAsN,GAAAvR,KAAA4P,mBAAA5E,EAAA,EAEA,IAAA7I,EAAAI,gBAAAgP,EAAAhP,cAAA,CACAJ,EAAAqP,oBAAAD,EAAA9O,gBAAA,CACA,WAKAN,EAAAqP,oBAAAC,MAwBAtD,EAAAxM,UAAA6C,oBACA,SAAA1D,GACA,GAAAiP,IACAxN,cAAAvB,EAAAC,OAAAH,EAAA,QACA2B,gBAAAzB,EAAAC,OAAAH,EAAA,WAGAkK,EAAAhL,KAAAgQ,aACAD,EACA/P,KAAA4P,mBACA,gBACA,kBACA5O,EAAA8K,oCACA9K,EAAAC,OAAAH,EAAA,OAAAF,EAAA0O,sBAGA,IAAAtE,GAAA,GACA,GAAA7I,GAAAnC,KAAA4P,mBAAA5E,EAEA,IAAA7I,EAAAI,gBAAAwN,EAAAxN,cAAA,CACA,GAAAG,GAAA1B,EAAAC,OAAAkB,EAAA,cACA,QAAAO,IACAA,EAAA1C,KAAAoB,SAAA6L,GAAAvK,GACA,MAAA1C,KAAA+B,aACAW,EAAA1B,EAAAyD,KAAAzE,KAAA+B,WAAAW,IAGA,IAAAK,GAAA/B,EAAAC,OAAAkB,EAAA,YAIA,OAHA,QAAAY,IACAA,EAAA/C,KAAAsB,OAAA2L,GAAAlK,KAGAL,SACAJ,KAAAtB,EAAAC,OAAAkB,EAAA,qBACAK,OAAAxB,EAAAC,OAAAkB,EAAA,uBACAY,SAKA,OACAL,OAAA,KACAJ,KAAA,KACAE,OAAA,KACAO,KAAA,OAQAoL,EAAAxM,UAAA+P,wBACA,WACA,MAAA1R,MAAA2G,eAGA3G,KAAA2G,eAAA1C,QAAAjE,KAAAoB,SAAAuL,SACA3M,KAAA2G,eAAAgL,KAAA,SAAAC,GAA+C,aAAAA,KAH/C,GAWAzD,EAAAxM,UAAA0B,iBACA,SAAAuB,EAAAiN,GACA,IAAA7R,KAAA2G,eACA,WAOA,IAJA,MAAA3G,KAAA+B,aACA6C,EAAA5D,EAAA2B,SAAA3C,KAAA+B,WAAA6C,IAGA5E,KAAAoB,SAAAqC,IAAAmB,GACA,MAAA5E,MAAA2G,eAAA3G,KAAAoB,SAAA6E,QAAArB,GAGA,IAAAqF,EACA,UAAAjK,KAAA+B,aACAkI,EAAAjJ,EAAAsI,SAAAtJ,KAAA+B,aAAA,CAKA,GAAA+P,GAAAlN,EAAAkG,QAAA,gBACA,YAAAb,EAAAP,QACA1J,KAAAoB,SAAAqC,IAAAqO,GACA,MAAA9R,MAAA2G,eAAA3G,KAAAoB,SAAA6E,QAAA6L,GAGA,MAAA7H,EAAAH,MAAA,KAAAG,EAAAH,OACA9J,KAAAoB,SAAAqC,IAAA,IAAAmB,GACA,MAAA5E,MAAA2G,eAAA3G,KAAAoB,SAAA6E,QAAA,IAAArB,IAQA,GAAAiN,EACA,WAGA,UAAAzN,OAAA,IAAAQ,EAAA,+BAuBAuJ,EAAAxM,UAAAoQ,qBACA,SAAAjR,GACA,GAAA4B,GAAA1B,EAAAC,OAAAH,EAAA,SAIA,IAHA,MAAAd,KAAA+B,aACAW,EAAA1B,EAAA2B,SAAA3C,KAAA+B,WAAAW,KAEA1C,KAAAoB,SAAAqC,IAAAf,GACA,OACAJ,KAAA,KACAE,OAAA,KACA0N,WAAA,KAGAxN,GAAA1C,KAAAoB,SAAA6E,QAAAvD,EAEA,IAAAqN,IACArN,SACAG,aAAA7B,EAAAC,OAAAH,EAAA,QACAgC,eAAA9B,EAAAC,OAAAH,EAAA,WAGAkK,EAAAhL,KAAAgQ,aACAD,EACA/P,KAAA6P,kBACA,eACA,iBACA7O,EAAAyK,2BACAzK,EAAAC,OAAAH,EAAA,OAAAF,EAAA0O,sBAGA,IAAAtE,GAAA,GACA,GAAA7I,GAAAnC,KAAA6P,kBAAA7E,EAEA,IAAA7I,EAAAO,SAAAqN,EAAArN,OACA,OACAJ,KAAAtB,EAAAC,OAAAkB,EAAA,sBACAK,OAAAxB,EAAAC,OAAAkB,EAAA,wBACA+N,WAAAlP,EAAAC,OAAAkB,EAAA,6BAKA,OACAG,KAAA,KACAE,OAAA,KACA0N,WAAA,OAIAtQ,EAAAuO,yBA+FAD,EAAAvM,UAAAkC,OAAAC,OAAAlD,EAAAe,WACAuM,EAAAvM,UAAAqQ,YAAApR,EAKAsN,EAAAvM,UAAAC,SAAA,EAKAiC,OAAAkL,eAAAb,EAAAvM,UAAA,WACAqN,IAAA,WAEA,OADA/L,MACA4C,EAAA,EAAmBA,EAAA7F,KAAAsO,UAAArK,OAA2B4B,IAC9C,OAAAoM,GAAA,EAAqBA,EAAAjS,KAAAsO,UAAAzI,GAAA8I,SAAA1L,QAAAgB,OAA+CgO,IACpEhP,EAAA+J,KAAAhN,KAAAsO,UAAAzI,GAAA8I,SAAA1L,QAAAgP,GAGA,OAAAhP,MAmBAiL,EAAAvM,UAAA6C,oBACA,SAAA1D,GACA,GAAAiP,IACAxN,cAAAvB,EAAAC,OAAAH,EAAA,QACA2B,gBAAAzB,EAAAC,OAAAH,EAAA,WAKAoR,EAAAtD,EAAAyC,OAAAtB,EAAA/P,KAAAsO,UACA,SAAAyB,EAAAoC,GACA,GAAAtG,GAAAkE,EAAAxN,cAAA4P,EAAAzD,gBAAAnM,aACA,OAAAsJ,GACAA,EAGAkE,EAAAtN,gBACA0P,EAAAzD,gBAAAjM,kBAEA0P,EAAAnS,KAAAsO,UAAA4D,EAEA,OAAAC,GASAA,EAAAxD,SAAAnK,qBACAlC,KAAAyN,EAAAxN,eACA4P,EAAAzD,gBAAAnM,cAAA,GACAC,OAAAuN,EAAAtN,iBACA0P,EAAAzD,gBAAAnM,gBAAAwN,EAAAxN,cACA4P,EAAAzD,gBAAAjM,gBAAA,EACA,GACA2P,KAAAtR,EAAAsR,QAdA1P,OAAA,KACAJ,KAAA,KACAE,OAAA,KACAO,KAAA,OAmBAmL,EAAAvM,UAAA+P,wBACA,WACA,MAAA1R,MAAAsO,UAAA+D,MAAA,SAAA/G,GACA,MAAAA,GAAAqD,SAAA+C,6BASAxD,EAAAvM,UAAA0B,iBACA,SAAAuB,EAAAiN,GACA,OAAAhM,GAAA,EAAmBA,EAAA7F,KAAAsO,UAAArK,OAA2B4B,IAAA,CAC9C,GAAAsM,GAAAnS,KAAAsO,UAAAzI,GAEAzC,EAAA+O,EAAAxD,SAAAtL,iBAAAuB,GAAA,EACA,IAAAxB,EACA,MAAAA,GAGA,GAAAyO,EACA,WAGA,UAAAzN,OAAA,IAAAQ,EAAA,+BAkBAsJ,EAAAvM,UAAAoQ,qBACA,SAAAjR,GACA,OAAA+E,GAAA,EAAmBA,EAAA7F,KAAAsO,UAAArK,OAA2B4B,IAAA,CAC9C,GAAAsM,GAAAnS,KAAAsO,UAAAzI,EAIA,SAAAsM,EAAAxD,SAAA1L,QAAAgD,QAAAjF,EAAAC,OAAAH,EAAA,YAGA,GAAAwR,GAAAH,EAAAxD,SAAAoD,qBAAAjR,EACA,IAAAwR,EAAA,CACA,GAAAC,IACAjQ,KAAAgQ,EAAAhQ,MACA6P,EAAAzD,gBAAAnM,cAAA,GACAC,OAAA8P,EAAA9P,QACA2P,EAAAzD,gBAAAnM,gBAAA+P,EAAAhQ,KACA6P,EAAAzD,gBAAAjM,gBAAA,EACA,GAEA,OAAA8P,KAIA,OACAjQ,KAAA,KACAE,OAAA,OASA0L,EAAAvM,UAAAsN,eACA,SAAAtH,EAAAvB,GACApG,KAAA8O,uBACA9O,KAAAkP,qBACA,QAAArJ,GAAA,EAAmBA,EAAA7F,KAAAsO,UAAArK,OAA2B4B,IAG9C,OAFAsM,GAAAnS,KAAAsO,UAAAzI,GACA2M,EAAAL,EAAAxD,SAAAiB,mBACAqC,EAAA,EAAqBA,EAAAO,EAAAvO,OAA4BgO,IAAA,CACjD,GAAA9P,GAAAqQ,EAAAP,GAEAvP,EAAAyP,EAAAxD,SAAAvN,SAAA6L,GAAA9K,EAAAO,OACA,QAAAyP,EAAAxD,SAAA5M,aACAW,EAAA1B,EAAAyD,KAAA0N,EAAAxD,SAAA5M,WAAAW,IAEA1C,KAAAoB,SAAAsC,IAAAhB,GACAA,EAAA1C,KAAAoB,SAAA6E,QAAAvD,EAEA,IAAAK,GAAAoP,EAAAxD,SAAArN,OAAA2L,GAAA9K,EAAAY,KACA/C,MAAAsB,OAAAoC,IAAAX,GACAA,EAAA/C,KAAAsB,OAAA2E,QAAAlD,EAMA,IAAA0P,IACA/P,SACAH,cAAAJ,EAAAI,eACA4P,EAAAzD,gBAAAnM,cAAA,GACAE,gBAAAN,EAAAM,iBACA0P,EAAAzD,gBAAAnM,gBAAAJ,EAAAI,cACA4P,EAAAzD,gBAAAjM,gBAAA,EACA,GACAI,aAAAV,EAAAU,aACAC,eAAAX,EAAAW,eACAC,OAGA/C,MAAA8O,oBAAA9B,KAAAyF,GACA,gBAAAA,GAAA5P,cACA7C,KAAAkP,mBAAAlC,KAAAyF,GAKA5D,EAAA7O,KAAA8O,oBAAA9N,EAAA8K,qCACA+C,EAAA7O,KAAAkP,mBAAAlO,EAAAyK,6BAGA7L,EAAAsO,4BT0yCM,SAASrO,EAAQD,GU50EvB,QAAA8S,GAAAC,EAAAC,EAAA7B,EAAA8B,EAAAC,EAAA1B,GAUA,GAAA2B,GAAAC,KAAAC,OAAAL,EAAAD,GAAA,GAAAA,EACA9G,EAAAiH,EAAA/B,EAAA8B,EAAAE,IAAA,EACA,YAAAlH,EAEAkH,EAEAlH,EAAA,EAEA+G,EAAAG,EAAA,EAEAL,EAAAK,EAAAH,EAAA7B,EAAA8B,EAAAC,EAAA1B,GAKAA,GAAAxR,EAAA2P,kBACAqD,EAAAC,EAAA5O,OAAA2O,EAAA,GAEAG,EAKAA,EAAAJ,EAAA,EAEAD,EAAAC,EAAAI,EAAAhC,EAAA8B,EAAAC,EAAA1B,GAIAA,GAAAxR,EAAA2P,kBACAwD,EAEA,EAAAJ,EAAA,GAAAA,EA1DA/S,EAAA0P,qBAAA,EACA1P,EAAA2P,kBAAA,EAgFA3P,EAAAyR,OAAA,SAAAN,EAAA8B,EAAAC,EAAA1B,GACA,OAAAyB,EAAA5O,OACA,QAGA,IAAA+G,GAAA0H,EAAA,GAAAG,EAAA5O,OAAA8M,EAAA8B,EACAC,EAAA1B,GAAAxR,EAAA0P,qBACA,MAAAtE,EACA,QAMA,MAAAA,EAAA,MACA,IAAA8H,EAAAD,EAAA7H,GAAA6H,EAAA7H,EAAA,UAGAA,CAGA,OAAAA,KV22EM,SAASnL,EAAQD,GW77EvB,QAAAsT,GAAAC,EAAAC,EAAAC,GACA,GAAAxC,GAAAsC,EAAAC,EACAD,GAAAC,GAAAD,EAAAE,GACAF,EAAAE,GAAAxC,EAWA,QAAAyC,GAAAC,EAAAC,GACA,MAAAR,MAAAS,MAAAF,EAAAP,KAAAU,UAAAF,EAAAD,IAeA,QAAAI,GAAAR,EAAAS,EAAAlT,EAAAmT,GAKA,GAAAA,EAAAnT,EAAA,CAYA,GAAAoT,GAAAR,EAAA5S,EAAAmT,GACAhO,EAAAnF,EAAA,CAEAwS,GAAAC,EAAAW,EAAAD,EASA,QARAE,GAAAZ,EAAAU,GAQA5B,EAAAvR,EAAmBmT,EAAA5B,EAAOA,IAC1B2B,EAAAT,EAAAlB,GAAA8B,IAAA,IACAlO,GAAA,EACAqN,EAAAC,EAAAtN,EAAAoM,GAIAiB,GAAAC,EAAAtN,EAAA,EAAAoM,EACA,IAAA+B,GAAAnO,EAAA,CAIA8N,GAAAR,EAAAS,EAAAlT,EAAAsT,EAAA,GACAL,EAAAR,EAAAS,EAAAI,EAAA,EAAAH,IAYAjU,EAAAiP,UAAA,SAAAsE,EAAAS,GACAD,EAAAR,EAAAS,EAAA,EAAAT,EAAAlP,OAAA,KXg+EM,SAASpE,EAAQD,EAASM,GY9iFhC,QAAAW,GAAAoT,EAAAC,EAAAtP,EAAAuP,EAAAtP,GACA7E,KAAAoU,YACApU,KAAAqU,kBACArU,KAAAsC,KAAA,MAAA2R,EAAA,KAAAA,EACAjU,KAAAwC,OAAA,MAAA0R,EAAA,KAAAA,EACAlU,KAAA0C,OAAA,MAAAkC,EAAA,KAAAA,EACA5E,KAAA+C,KAAA,MAAA8B,EAAA,KAAAA,EACA7E,KAAAsU,IAAA,EACA,MAAAH,GAAAnU,KAAA0D,IAAAyQ,GAnCA,GAAAxT,GAAAT,EAAA,GAAAS,mBACAK,EAAAd,EAAA,GAIAqU,EAAA,UAGAC,EAAA,GAKAF,EAAA,oBAiCAzT,GAAA4T,wBACA,SAAAC,EAAA5S,EAAA6S,GAyFA,QAAAC,GAAAzS,EAAA0S,GACA,UAAA1S,GAAA8N,SAAA9N,EAAAO,OACAoS,EAAApR,IAAAmR,OACO,CACP,GAAAnS,GAAAiS,EACA3T,EAAAyD,KAAAkQ,EAAAxS,EAAAO,QACAP,EAAAO,MACAoS,GAAApR,IAAA,GAAA7C,GAAAsB,EAAAU,aACAV,EAAAW,eACAJ,EACAmS,EACA1S,EAAAY,QAjGA,GAAA+R,GAAA,GAAAjU,GAMAkU,EAAAL,EAAApM,MAAAiM,GACAS,EAAA,WACA,GAAAC,GAAAF,EAAA/M,QAEAkN,EAAAH,EAAA/M,SAAA,EACA,OAAAiN,GAAAC,GAIAC,EAAA,EAAA3D,EAAA,EAKA4D,EAAA,IAgEA,OA9DAtT,GAAAI,YAAA,SAAAC,GACA,UAAAiT,EAAA,CAGA,KAAAD,EAAAhT,EAAAI,eAMS,CAIT,GAAA8S,GAAAN,EAAA,GACAF,EAAAQ,EAAAjK,OAAA,EAAAjJ,EAAAM,gBACA+O,EAOA,OANAuD,GAAA,GAAAM,EAAAjK,OAAAjJ,EAAAM,gBACA+O,GACAA,EAAArP,EAAAM,gBACAmS,EAAAQ,EAAAP,QAEAO,EAAAjT,GAhBAyS,EAAAQ,EAAAJ,KACAG,IACA3D,EAAA,EAqBA,KAAA2D,EAAAhT,EAAAI,eACAuS,EAAApR,IAAAsR,KACAG,GAEA,IAAA3D,EAAArP,EAAAM,gBAAA,CACA,GAAA4S,GAAAN,EAAA,EACAD,GAAApR,IAAA2R,EAAAjK,OAAA,EAAAjJ,EAAAM,kBACAsS,EAAA,GAAAM,EAAAjK,OAAAjJ,EAAAM,iBACA+O,EAAArP,EAAAM,gBAEA2S,EAAAjT,GACKnC,MAEL+U,EAAA9Q,OAAA,IACAmR,GAEAR,EAAAQ,EAAAJ,KAGAF,EAAApR,IAAAqR,EAAAtQ,KAAA,MAIA3C,EAAAmB,QAAAC,QAAA,SAAAC,GACA,GAAAC,GAAAtB,EAAAuB,iBAAAF,EACA,OAAAC,IACA,MAAAuR,IACAxR,EAAAnC,EAAAyD,KAAAkQ,EAAAxR,IAEA2R,EAAAxR,iBAAAH,EAAAC,MAIA0R,GAwBAjU,EAAAc,UAAA+B,IAAA,SAAA4R,GACA,GAAAnK,MAAAoK,QAAAD,GACAA,EAAApS,QAAA,SAAAsS,GACAxV,KAAA0D,IAAA8R,IACKxV,UAEL,KAAAsV,EAAAhB,IAAA,gBAAAgB,GAMA,SAAA9M,WACA,8EAAA8M,EANAA,IACAtV,KAAAoU,SAAApH,KAAAsI,GAQA,MAAAtV,OASAa,EAAAc,UAAA8T,QAAA,SAAAH,GACA,GAAAnK,MAAAoK,QAAAD,GACA,OAAAzP,GAAAyP,EAAArR,OAAA,EAAiC4B,GAAA,EAAQA,IACzC7F,KAAAyV,QAAAH,EAAAzP,QAGA,KAAAyP,EAAAhB,IAAA,gBAAAgB,GAIA,SAAA9M,WACA,8EAAA8M,EAJAtV,MAAAoU,SAAAsB,QAAAJ,GAOA,MAAAtV,OAUAa,EAAAc,UAAAgU,KAAA,SAAAC,GAEA,OADAJ,GACA3P,EAAA,EAAAC,EAAA9F,KAAAoU,SAAAnQ,OAA6C6B,EAAAD,EAASA,IACtD2P,EAAAxV,KAAAoU,SAAAvO,GACA2P,EAAAlB,GACAkB,EAAAG,KAAAC,GAGA,KAAAJ,GACAI,EAAAJ,GAAoB9S,OAAA1C,KAAA0C,OACpBJ,KAAAtC,KAAAsC,KACAE,OAAAxC,KAAAwC,OACAO,KAAA/C,KAAA+C,QAYAlC,EAAAc,UAAA8C,KAAA,SAAAoR,GACA,GAAAC,GACAjQ,EACAC,EAAA9F,KAAAoU,SAAAnQ,MACA,IAAA6B,EAAA,GAEA,IADAgQ,KACAjQ,EAAA,EAAeC,EAAA,EAAAD,EAAWA,IAC1BiQ,EAAA9I,KAAAhN,KAAAoU,SAAAvO,IACAiQ,EAAA9I,KAAA6I,EAEAC,GAAA9I,KAAAhN,KAAAoU,SAAAvO,IACA7F,KAAAoU,SAAA0B,EAEA,MAAA9V,OAUAa,EAAAc,UAAAoU,aAAA,SAAAC,EAAAC,GACA,GAAAC,GAAAlW,KAAAoU,SAAApU,KAAAoU,SAAAnQ,OAAA,EAUA,OATAiS,GAAA5B,GACA4B,EAAAH,aAAAC,EAAAC,GAEA,gBAAAC,GACAlW,KAAAoU,SAAApU,KAAAoU,SAAAnQ,OAAA,GAAAiS,EAAApL,QAAAkL,EAAAC,GAGAjW,KAAAoU,SAAApH,KAAA,GAAAlC,QAAAkL,EAAAC,IAEAjW,MAUAa,EAAAc,UAAA2B,iBACA,SAAAK,EAAAC,GACA5D,KAAAqU,eAAArT,EAAA+C,YAAAJ,IAAAC,GASA/C,EAAAc,UAAAwU,mBACA,SAAAP,GACA,OAAA/P,GAAA,EAAAC,EAAA9F,KAAAoU,SAAAnQ,OAA+C6B,EAAAD,EAASA,IACxD7F,KAAAoU,SAAAvO,GAAAyO,IACAtU,KAAAoU,SAAAvO,GAAAsQ,mBAAAP,EAKA,QADA3S,GAAAY,OAAAG,KAAAhE,KAAAqU,gBACAxO,EAAA,EAAAC,EAAA7C,EAAAgB,OAAyC6B,EAAAD,EAASA,IAClD+P,EAAA5U,EAAAwK,cAAAvI,EAAA4C,IAAA7F,KAAAqU,eAAApR,EAAA4C,MAQAhF,EAAAc,UAAAiF,SAAA,WACA,GAAA6J,GAAA,EAIA,OAHAzQ,MAAA2V,KAAA,SAAAH,GACA/E,GAAA+E,IAEA/E,GAOA5P,EAAAc,UAAAyU,sBAAA,SAAAtV,GACA,GAAAuB,IACAwS,KAAA,GACAvS,KAAA,EACAE,OAAA,GAEA6D,EAAA,GAAA1F,GAAAG,GACAuV,GAAA,EACAC,EAAA,KACAC,EAAA,KACAC,EAAA,KACAC,EAAA,IAqEA,OApEAzW,MAAA2V,KAAA,SAAAH,EAAA5S,GACAP,EAAAwS,MAAAW,EACA,OAAA5S,EAAAF,QACA,OAAAE,EAAAN,MACA,OAAAM,EAAAJ,SACA8T,IAAA1T,EAAAF,QACA6T,IAAA3T,EAAAN,MACAkU,IAAA5T,EAAAJ,QACAiU,IAAA7T,EAAAG,OACAsD,EAAArD,YACAN,OAAAE,EAAAF,OACAE,UACAN,KAAAM,EAAAN,KACAE,OAAAI,EAAAJ,QAEAH,WACAC,KAAAD,EAAAC,KACAE,OAAAH,EAAAG,QAEAO,KAAAH,EAAAG,OAGAuT,EAAA1T,EAAAF,OACA6T,EAAA3T,EAAAN,KACAkU,EAAA5T,EAAAJ,OACAiU,EAAA7T,EAAAG,KACAsT,GAAA,GACKA,IACLhQ,EAAArD,YACAX,WACAC,KAAAD,EAAAC,KACAE,OAAAH,EAAAG,UAGA8T,EAAA,KACAD,GAAA,EAEA,QAAAtJ,GAAA,EAAA9I,EAAAuR,EAAAvR,OAA4CA,EAAA8I,EAAcA,IAC1DyI,EAAAvN,WAAA8E,KAAAyH,GACAnS,EAAAC,OACAD,EAAAG,OAAA,EAEAuK,EAAA,IAAA9I,GACAqS,EAAA,KACAD,GAAA,GACSA,GACThQ,EAAArD,YACAN,OAAAE,EAAAF,OACAE,UACAN,KAAAM,EAAAN,KACAE,OAAAI,EAAAJ,QAEAH,WACAC,KAAAD,EAAAC,KACAE,OAAAH,EAAAG,QAEAO,KAAAH,EAAAG,QAIAV,EAAAG,WAIAxC,KAAAmW,mBAAA,SAAAhT,EAAAuT,GACArQ,EAAA/C,iBAAAH,EAAAuT,MAGU7B,KAAAxS,EAAAwS,KAAAxO,QAGVzG,EAAAiB","file":"source-map.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"sourceMap\"] = factory();\n\telse\n\t\troot[\"sourceMap\"] = factory();\n})(this, function() {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"sourceMap\"] = factory();\n\telse\n\t\troot[\"sourceMap\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/*\n\t * Copyright 2009-2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE.txt or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\texports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator;\n\texports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer;\n\texports.SourceNode = __webpack_require__(10).SourceNode;\n\n\n/***/ },\n/* 1 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar base64VLQ = __webpack_require__(2);\n\tvar util = __webpack_require__(4);\n\tvar ArraySet = __webpack_require__(5).ArraySet;\n\tvar MappingList = __webpack_require__(6).MappingList;\n\t\n\t/**\n\t * An instance of the SourceMapGenerator represents a source map which is\n\t * being built incrementally. You may pass an object with the following\n\t * properties:\n\t *\n\t * - file: The filename of the generated source.\n\t * - sourceRoot: A root for all relative URLs in this source map.\n\t */\n\tfunction SourceMapGenerator(aArgs) {\n\t if (!aArgs) {\n\t aArgs = {};\n\t }\n\t this._file = util.getArg(aArgs, 'file', null);\n\t this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);\n\t this._skipValidation = util.getArg(aArgs, 'skipValidation', false);\n\t this._sources = new ArraySet();\n\t this._names = new ArraySet();\n\t this._mappings = new MappingList();\n\t this._sourcesContents = null;\n\t}\n\t\n\tSourceMapGenerator.prototype._version = 3;\n\t\n\t/**\n\t * Creates a new SourceMapGenerator based on a SourceMapConsumer\n\t *\n\t * @param aSourceMapConsumer The SourceMap.\n\t */\n\tSourceMapGenerator.fromSourceMap =\n\t function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {\n\t var sourceRoot = aSourceMapConsumer.sourceRoot;\n\t var generator = new SourceMapGenerator({\n\t file: aSourceMapConsumer.file,\n\t sourceRoot: sourceRoot\n\t });\n\t aSourceMapConsumer.eachMapping(function (mapping) {\n\t var newMapping = {\n\t generated: {\n\t line: mapping.generatedLine,\n\t column: mapping.generatedColumn\n\t }\n\t };\n\t\n\t if (mapping.source != null) {\n\t newMapping.source = mapping.source;\n\t if (sourceRoot != null) {\n\t newMapping.source = util.relative(sourceRoot, newMapping.source);\n\t }\n\t\n\t newMapping.original = {\n\t line: mapping.originalLine,\n\t column: mapping.originalColumn\n\t };\n\t\n\t if (mapping.name != null) {\n\t newMapping.name = mapping.name;\n\t }\n\t }\n\t\n\t generator.addMapping(newMapping);\n\t });\n\t aSourceMapConsumer.sources.forEach(function (sourceFile) {\n\t var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n\t if (content != null) {\n\t generator.setSourceContent(sourceFile, content);\n\t }\n\t });\n\t return generator;\n\t };\n\t\n\t/**\n\t * Add a single mapping from original source line and column to the generated\n\t * source's line and column for this source map being created. The mapping\n\t * object should have the following properties:\n\t *\n\t * - generated: An object with the generated line and column positions.\n\t * - original: An object with the original line and column positions.\n\t * - source: The original source file (relative to the sourceRoot).\n\t * - name: An optional original token name for this mapping.\n\t */\n\tSourceMapGenerator.prototype.addMapping =\n\t function SourceMapGenerator_addMapping(aArgs) {\n\t var generated = util.getArg(aArgs, 'generated');\n\t var original = util.getArg(aArgs, 'original', null);\n\t var source = util.getArg(aArgs, 'source', null);\n\t var name = util.getArg(aArgs, 'name', null);\n\t\n\t if (!this._skipValidation) {\n\t this._validateMapping(generated, original, source, name);\n\t }\n\t\n\t if (source != null) {\n\t source = String(source);\n\t if (!this._sources.has(source)) {\n\t this._sources.add(source);\n\t }\n\t }\n\t\n\t if (name != null) {\n\t name = String(name);\n\t if (!this._names.has(name)) {\n\t this._names.add(name);\n\t }\n\t }\n\t\n\t this._mappings.add({\n\t generatedLine: generated.line,\n\t generatedColumn: generated.column,\n\t originalLine: original != null && original.line,\n\t originalColumn: original != null && original.column,\n\t source: source,\n\t name: name\n\t });\n\t };\n\t\n\t/**\n\t * Set the source content for a source file.\n\t */\n\tSourceMapGenerator.prototype.setSourceContent =\n\t function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {\n\t var source = aSourceFile;\n\t if (this._sourceRoot != null) {\n\t source = util.relative(this._sourceRoot, source);\n\t }\n\t\n\t if (aSourceContent != null) {\n\t // Add the source content to the _sourcesContents map.\n\t // Create a new _sourcesContents map if the property is null.\n\t if (!this._sourcesContents) {\n\t this._sourcesContents = Object.create(null);\n\t }\n\t this._sourcesContents[util.toSetString(source)] = aSourceContent;\n\t } else if (this._sourcesContents) {\n\t // Remove the source file from the _sourcesContents map.\n\t // If the _sourcesContents map is empty, set the property to null.\n\t delete this._sourcesContents[util.toSetString(source)];\n\t if (Object.keys(this._sourcesContents).length === 0) {\n\t this._sourcesContents = null;\n\t }\n\t }\n\t };\n\t\n\t/**\n\t * Applies the mappings of a sub-source-map for a specific source file to the\n\t * source map being generated. Each mapping to the supplied source file is\n\t * rewritten using the supplied source map. Note: The resolution for the\n\t * resulting mappings is the minimium of this map and the supplied map.\n\t *\n\t * @param aSourceMapConsumer The source map to be applied.\n\t * @param aSourceFile Optional. The filename of the source file.\n\t * If omitted, SourceMapConsumer's file property will be used.\n\t * @param aSourceMapPath Optional. The dirname of the path to the source map\n\t * to be applied. If relative, it is relative to the SourceMapConsumer.\n\t * This parameter is needed when the two source maps aren't in the same\n\t * directory, and the source map to be applied contains relative source\n\t * paths. If so, those relative source paths need to be rewritten\n\t * relative to the SourceMapGenerator.\n\t */\n\tSourceMapGenerator.prototype.applySourceMap =\n\t function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {\n\t var sourceFile = aSourceFile;\n\t // If aSourceFile is omitted, we will use the file property of the SourceMap\n\t if (aSourceFile == null) {\n\t if (aSourceMapConsumer.file == null) {\n\t throw new Error(\n\t 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +\n\t 'or the source map\\'s \"file\" property. Both were omitted.'\n\t );\n\t }\n\t sourceFile = aSourceMapConsumer.file;\n\t }\n\t var sourceRoot = this._sourceRoot;\n\t // Make \"sourceFile\" relative if an absolute Url is passed.\n\t if (sourceRoot != null) {\n\t sourceFile = util.relative(sourceRoot, sourceFile);\n\t }\n\t // Applying the SourceMap can add and remove items from the sources and\n\t // the names array.\n\t var newSources = new ArraySet();\n\t var newNames = new ArraySet();\n\t\n\t // Find mappings for the \"sourceFile\"\n\t this._mappings.unsortedForEach(function (mapping) {\n\t if (mapping.source === sourceFile && mapping.originalLine != null) {\n\t // Check if it can be mapped by the source map, then update the mapping.\n\t var original = aSourceMapConsumer.originalPositionFor({\n\t line: mapping.originalLine,\n\t column: mapping.originalColumn\n\t });\n\t if (original.source != null) {\n\t // Copy mapping\n\t mapping.source = original.source;\n\t if (aSourceMapPath != null) {\n\t mapping.source = util.join(aSourceMapPath, mapping.source)\n\t }\n\t if (sourceRoot != null) {\n\t mapping.source = util.relative(sourceRoot, mapping.source);\n\t }\n\t mapping.originalLine = original.line;\n\t mapping.originalColumn = original.column;\n\t if (original.name != null) {\n\t mapping.name = original.name;\n\t }\n\t }\n\t }\n\t\n\t var source = mapping.source;\n\t if (source != null && !newSources.has(source)) {\n\t newSources.add(source);\n\t }\n\t\n\t var name = mapping.name;\n\t if (name != null && !newNames.has(name)) {\n\t newNames.add(name);\n\t }\n\t\n\t }, this);\n\t this._sources = newSources;\n\t this._names = newNames;\n\t\n\t // Copy sourcesContents of applied map.\n\t aSourceMapConsumer.sources.forEach(function (sourceFile) {\n\t var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n\t if (content != null) {\n\t if (aSourceMapPath != null) {\n\t sourceFile = util.join(aSourceMapPath, sourceFile);\n\t }\n\t if (sourceRoot != null) {\n\t sourceFile = util.relative(sourceRoot, sourceFile);\n\t }\n\t this.setSourceContent(sourceFile, content);\n\t }\n\t }, this);\n\t };\n\t\n\t/**\n\t * A mapping can have one of the three levels of data:\n\t *\n\t * 1. Just the generated position.\n\t * 2. The Generated position, original position, and original source.\n\t * 3. Generated and original position, original source, as well as a name\n\t * token.\n\t *\n\t * To maintain consistency, we validate that any new mapping being added falls\n\t * in to one of these categories.\n\t */\n\tSourceMapGenerator.prototype._validateMapping =\n\t function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,\n\t aName) {\n\t if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n\t && aGenerated.line > 0 && aGenerated.column >= 0\n\t && !aOriginal && !aSource && !aName) {\n\t // Case 1.\n\t return;\n\t }\n\t else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n\t && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n\t && aGenerated.line > 0 && aGenerated.column >= 0\n\t && aOriginal.line > 0 && aOriginal.column >= 0\n\t && aSource) {\n\t // Cases 2 and 3.\n\t return;\n\t }\n\t else {\n\t throw new Error('Invalid mapping: ' + JSON.stringify({\n\t generated: aGenerated,\n\t source: aSource,\n\t original: aOriginal,\n\t name: aName\n\t }));\n\t }\n\t };\n\t\n\t/**\n\t * Serialize the accumulated mappings in to the stream of base 64 VLQs\n\t * specified by the source map format.\n\t */\n\tSourceMapGenerator.prototype._serializeMappings =\n\t function SourceMapGenerator_serializeMappings() {\n\t var previousGeneratedColumn = 0;\n\t var previousGeneratedLine = 1;\n\t var previousOriginalColumn = 0;\n\t var previousOriginalLine = 0;\n\t var previousName = 0;\n\t var previousSource = 0;\n\t var result = '';\n\t var next;\n\t var mapping;\n\t var nameIdx;\n\t var sourceIdx;\n\t\n\t var mappings = this._mappings.toArray();\n\t for (var i = 0, len = mappings.length; i < len; i++) {\n\t mapping = mappings[i];\n\t next = ''\n\t\n\t if (mapping.generatedLine !== previousGeneratedLine) {\n\t previousGeneratedColumn = 0;\n\t while (mapping.generatedLine !== previousGeneratedLine) {\n\t next += ';';\n\t previousGeneratedLine++;\n\t }\n\t }\n\t else {\n\t if (i > 0) {\n\t if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n\t continue;\n\t }\n\t next += ',';\n\t }\n\t }\n\t\n\t next += base64VLQ.encode(mapping.generatedColumn\n\t - previousGeneratedColumn);\n\t previousGeneratedColumn = mapping.generatedColumn;\n\t\n\t if (mapping.source != null) {\n\t sourceIdx = this._sources.indexOf(mapping.source);\n\t next += base64VLQ.encode(sourceIdx - previousSource);\n\t previousSource = sourceIdx;\n\t\n\t // lines are stored 0-based in SourceMap spec version 3\n\t next += base64VLQ.encode(mapping.originalLine - 1\n\t - previousOriginalLine);\n\t previousOriginalLine = mapping.originalLine - 1;\n\t\n\t next += base64VLQ.encode(mapping.originalColumn\n\t - previousOriginalColumn);\n\t previousOriginalColumn = mapping.originalColumn;\n\t\n\t if (mapping.name != null) {\n\t nameIdx = this._names.indexOf(mapping.name);\n\t next += base64VLQ.encode(nameIdx - previousName);\n\t previousName = nameIdx;\n\t }\n\t }\n\t\n\t result += next;\n\t }\n\t\n\t return result;\n\t };\n\t\n\tSourceMapGenerator.prototype._generateSourcesContent =\n\t function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n\t return aSources.map(function (source) {\n\t if (!this._sourcesContents) {\n\t return null;\n\t }\n\t if (aSourceRoot != null) {\n\t source = util.relative(aSourceRoot, source);\n\t }\n\t var key = util.toSetString(source);\n\t return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n\t ? this._sourcesContents[key]\n\t : null;\n\t }, this);\n\t };\n\t\n\t/**\n\t * Externalize the source map.\n\t */\n\tSourceMapGenerator.prototype.toJSON =\n\t function SourceMapGenerator_toJSON() {\n\t var map = {\n\t version: this._version,\n\t sources: this._sources.toArray(),\n\t names: this._names.toArray(),\n\t mappings: this._serializeMappings()\n\t };\n\t if (this._file != null) {\n\t map.file = this._file;\n\t }\n\t if (this._sourceRoot != null) {\n\t map.sourceRoot = this._sourceRoot;\n\t }\n\t if (this._sourcesContents) {\n\t map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n\t }\n\t\n\t return map;\n\t };\n\t\n\t/**\n\t * Render the source map being generated to a string.\n\t */\n\tSourceMapGenerator.prototype.toString =\n\t function SourceMapGenerator_toString() {\n\t return JSON.stringify(this.toJSON());\n\t };\n\t\n\texports.SourceMapGenerator = SourceMapGenerator;\n\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t *\n\t * Based on the Base 64 VLQ implementation in Closure Compiler:\n\t * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n\t *\n\t * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n\t * Redistribution and use in source and binary forms, with or without\n\t * modification, are permitted provided that the following conditions are\n\t * met:\n\t *\n\t * * Redistributions of source code must retain the above copyright\n\t * notice, this list of conditions and the following disclaimer.\n\t * * Redistributions in binary form must reproduce the above\n\t * copyright notice, this list of conditions and the following\n\t * disclaimer in the documentation and/or other materials provided\n\t * with the distribution.\n\t * * Neither the name of Google Inc. nor the names of its\n\t * contributors may be used to endorse or promote products derived\n\t * from this software without specific prior written permission.\n\t *\n\t * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\t * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n\t * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n\t * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n\t * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n\t * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n\t * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n\t * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n\t * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n\t * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n\t * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\t */\n\t\n\tvar base64 = __webpack_require__(3);\n\t\n\t// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n\t// length quantities we use in the source map spec, the first bit is the sign,\n\t// the next four bits are the actual value, and the 6th bit is the\n\t// continuation bit. The continuation bit tells us whether there are more\n\t// digits in this value following this digit.\n\t//\n\t// Continuation\n\t// | Sign\n\t// | |\n\t// V V\n\t// 101011\n\t\n\tvar VLQ_BASE_SHIFT = 5;\n\t\n\t// binary: 100000\n\tvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\t\n\t// binary: 011111\n\tvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\t\n\t// binary: 100000\n\tvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\t\n\t/**\n\t * Converts from a two-complement value to a value where the sign bit is\n\t * placed in the least significant bit. For example, as decimals:\n\t * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n\t * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n\t */\n\tfunction toVLQSigned(aValue) {\n\t return aValue < 0\n\t ? ((-aValue) << 1) + 1\n\t : (aValue << 1) + 0;\n\t}\n\t\n\t/**\n\t * Converts to a two-complement value from a value where the sign bit is\n\t * placed in the least significant bit. For example, as decimals:\n\t * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n\t * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n\t */\n\tfunction fromVLQSigned(aValue) {\n\t var isNegative = (aValue & 1) === 1;\n\t var shifted = aValue >> 1;\n\t return isNegative\n\t ? -shifted\n\t : shifted;\n\t}\n\t\n\t/**\n\t * Returns the base 64 VLQ encoded value.\n\t */\n\texports.encode = function base64VLQ_encode(aValue) {\n\t var encoded = \"\";\n\t var digit;\n\t\n\t var vlq = toVLQSigned(aValue);\n\t\n\t do {\n\t digit = vlq & VLQ_BASE_MASK;\n\t vlq >>>= VLQ_BASE_SHIFT;\n\t if (vlq > 0) {\n\t // There are still more digits in this value, so we must make sure the\n\t // continuation bit is marked.\n\t digit |= VLQ_CONTINUATION_BIT;\n\t }\n\t encoded += base64.encode(digit);\n\t } while (vlq > 0);\n\t\n\t return encoded;\n\t};\n\t\n\t/**\n\t * Decodes the next base 64 VLQ value from the given string and returns the\n\t * value and the rest of the string via the out parameter.\n\t */\n\texports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n\t var strLen = aStr.length;\n\t var result = 0;\n\t var shift = 0;\n\t var continuation, digit;\n\t\n\t do {\n\t if (aIndex >= strLen) {\n\t throw new Error(\"Expected more digits in base 64 VLQ value.\");\n\t }\n\t\n\t digit = base64.decode(aStr.charCodeAt(aIndex++));\n\t if (digit === -1) {\n\t throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n\t }\n\t\n\t continuation = !!(digit & VLQ_CONTINUATION_BIT);\n\t digit &= VLQ_BASE_MASK;\n\t result = result + (digit << shift);\n\t shift += VLQ_BASE_SHIFT;\n\t } while (continuation);\n\t\n\t aOutParam.value = fromVLQSigned(result);\n\t aOutParam.rest = aIndex;\n\t};\n\n\n/***/ },\n/* 3 */\n/***/ function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\t\n\t/**\n\t * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n\t */\n\texports.encode = function (number) {\n\t if (0 <= number && number < intToCharMap.length) {\n\t return intToCharMap[number];\n\t }\n\t throw new TypeError(\"Must be between 0 and 63: \" + number);\n\t};\n\t\n\t/**\n\t * Decode a single base 64 character code digit to an integer. Returns -1 on\n\t * failure.\n\t */\n\texports.decode = function (charCode) {\n\t var bigA = 65; // 'A'\n\t var bigZ = 90; // 'Z'\n\t\n\t var littleA = 97; // 'a'\n\t var littleZ = 122; // 'z'\n\t\n\t var zero = 48; // '0'\n\t var nine = 57; // '9'\n\t\n\t var plus = 43; // '+'\n\t var slash = 47; // '/'\n\t\n\t var littleOffset = 26;\n\t var numberOffset = 52;\n\t\n\t // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n\t if (bigA <= charCode && charCode <= bigZ) {\n\t return (charCode - bigA);\n\t }\n\t\n\t // 26 - 51: abcdefghijklmnopqrstuvwxyz\n\t if (littleA <= charCode && charCode <= littleZ) {\n\t return (charCode - littleA + littleOffset);\n\t }\n\t\n\t // 52 - 61: 0123456789\n\t if (zero <= charCode && charCode <= nine) {\n\t return (charCode - zero + numberOffset);\n\t }\n\t\n\t // 62: +\n\t if (charCode == plus) {\n\t return 62;\n\t }\n\t\n\t // 63: /\n\t if (charCode == slash) {\n\t return 63;\n\t }\n\t\n\t // Invalid base64 digit.\n\t return -1;\n\t};\n\n\n/***/ },\n/* 4 */\n/***/ function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\t/**\n\t * This is a helper function for getting values from parameter/options\n\t * objects.\n\t *\n\t * @param args The object we are extracting values from\n\t * @param name The name of the property we are getting.\n\t * @param defaultValue An optional value to return if the property is missing\n\t * from the object. If this is not specified and the property is missing, an\n\t * error will be thrown.\n\t */\n\tfunction getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}\n\texports.getArg = getArg;\n\t\n\tvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.]*)(?::(\\d+))?(\\S*)$/;\n\tvar dataUrlRegexp = /^data:.+\\,.+$/;\n\t\n\tfunction urlParse(aUrl) {\n\t var match = aUrl.match(urlRegexp);\n\t if (!match) {\n\t return null;\n\t }\n\t return {\n\t scheme: match[1],\n\t auth: match[2],\n\t host: match[3],\n\t port: match[4],\n\t path: match[5]\n\t };\n\t}\n\texports.urlParse = urlParse;\n\t\n\tfunction urlGenerate(aParsedUrl) {\n\t var url = '';\n\t if (aParsedUrl.scheme) {\n\t url += aParsedUrl.scheme + ':';\n\t }\n\t url += '//';\n\t if (aParsedUrl.auth) {\n\t url += aParsedUrl.auth + '@';\n\t }\n\t if (aParsedUrl.host) {\n\t url += aParsedUrl.host;\n\t }\n\t if (aParsedUrl.port) {\n\t url += \":\" + aParsedUrl.port\n\t }\n\t if (aParsedUrl.path) {\n\t url += aParsedUrl.path;\n\t }\n\t return url;\n\t}\n\texports.urlGenerate = urlGenerate;\n\t\n\t/**\n\t * Normalizes a path, or the path portion of a URL:\n\t *\n\t * - Replaces consequtive slashes with one slash.\n\t * - Removes unnecessary '.' parts.\n\t * - Removes unnecessary '/..' parts.\n\t *\n\t * Based on code in the Node.js 'path' core module.\n\t *\n\t * @param aPath The path or url to normalize.\n\t */\n\tfunction normalize(aPath) {\n\t var path = aPath;\n\t var url = urlParse(aPath);\n\t if (url) {\n\t if (!url.path) {\n\t return aPath;\n\t }\n\t path = url.path;\n\t }\n\t var isAbsolute = exports.isAbsolute(path);\n\t\n\t var parts = path.split(/\\/+/);\n\t for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n\t part = parts[i];\n\t if (part === '.') {\n\t parts.splice(i, 1);\n\t } else if (part === '..') {\n\t up++;\n\t } else if (up > 0) {\n\t if (part === '') {\n\t // The first part is blank if the path is absolute. Trying to go\n\t // above the root is a no-op. Therefore we can remove all '..' parts\n\t // directly after the root.\n\t parts.splice(i + 1, up);\n\t up = 0;\n\t } else {\n\t parts.splice(i, 2);\n\t up--;\n\t }\n\t }\n\t }\n\t path = parts.join('/');\n\t\n\t if (path === '') {\n\t path = isAbsolute ? '/' : '.';\n\t }\n\t\n\t if (url) {\n\t url.path = path;\n\t return urlGenerate(url);\n\t }\n\t return path;\n\t}\n\texports.normalize = normalize;\n\t\n\t/**\n\t * Joins two paths/URLs.\n\t *\n\t * @param aRoot The root path or URL.\n\t * @param aPath The path or URL to be joined with the root.\n\t *\n\t * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n\t * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n\t * first.\n\t * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n\t * is updated with the result and aRoot is returned. Otherwise the result\n\t * is returned.\n\t * - If aPath is absolute, the result is aPath.\n\t * - Otherwise the two paths are joined with a slash.\n\t * - Joining for example 'http://' and 'www.example.com' is also supported.\n\t */\n\tfunction join(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\t if (aPath === \"\") {\n\t aPath = \".\";\n\t }\n\t var aPathUrl = urlParse(aPath);\n\t var aRootUrl = urlParse(aRoot);\n\t if (aRootUrl) {\n\t aRoot = aRootUrl.path || '/';\n\t }\n\t\n\t // `join(foo, '//www.example.org')`\n\t if (aPathUrl && !aPathUrl.scheme) {\n\t if (aRootUrl) {\n\t aPathUrl.scheme = aRootUrl.scheme;\n\t }\n\t return urlGenerate(aPathUrl);\n\t }\n\t\n\t if (aPathUrl || aPath.match(dataUrlRegexp)) {\n\t return aPath;\n\t }\n\t\n\t // `join('http://', 'www.example.com')`\n\t if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n\t aRootUrl.host = aPath;\n\t return urlGenerate(aRootUrl);\n\t }\n\t\n\t var joined = aPath.charAt(0) === '/'\n\t ? aPath\n\t : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\t\n\t if (aRootUrl) {\n\t aRootUrl.path = joined;\n\t return urlGenerate(aRootUrl);\n\t }\n\t return joined;\n\t}\n\texports.join = join;\n\t\n\texports.isAbsolute = function (aPath) {\n\t return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);\n\t};\n\t\n\t/**\n\t * Make a path relative to a URL or another path.\n\t *\n\t * @param aRoot The root path or URL.\n\t * @param aPath The path or URL to be made relative to aRoot.\n\t */\n\tfunction relative(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\t\n\t aRoot = aRoot.replace(/\\/$/, '');\n\t\n\t // It is possible for the path to be above the root. In this case, simply\n\t // checking whether the root is a prefix of the path won't work. Instead, we\n\t // need to remove components from the root one by one, until either we find\n\t // a prefix that fits, or we run out of components to remove.\n\t var level = 0;\n\t while (aPath.indexOf(aRoot + '/') !== 0) {\n\t var index = aRoot.lastIndexOf(\"/\");\n\t if (index < 0) {\n\t return aPath;\n\t }\n\t\n\t // If the only part of the root that is left is the scheme (i.e. http://,\n\t // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n\t // have exhausted all components, so the path is not relative to the root.\n\t aRoot = aRoot.slice(0, index);\n\t if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n\t return aPath;\n\t }\n\t\n\t ++level;\n\t }\n\t\n\t // Make sure we add a \"../\" for each component we removed from the root.\n\t return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n\t}\n\texports.relative = relative;\n\t\n\tvar supportsNullProto = (function () {\n\t var obj = Object.create(null);\n\t return !('__proto__' in obj);\n\t}());\n\t\n\tfunction identity (s) {\n\t return s;\n\t}\n\t\n\t/**\n\t * Because behavior goes wacky when you set `__proto__` on objects, we\n\t * have to prefix all the strings in our set with an arbitrary character.\n\t *\n\t * See https://github.com/mozilla/source-map/pull/31 and\n\t * https://github.com/mozilla/source-map/issues/30\n\t *\n\t * @param String aStr\n\t */\n\tfunction toSetString(aStr) {\n\t if (isProtoString(aStr)) {\n\t return '$' + aStr;\n\t }\n\t\n\t return aStr;\n\t}\n\texports.toSetString = supportsNullProto ? identity : toSetString;\n\t\n\tfunction fromSetString(aStr) {\n\t if (isProtoString(aStr)) {\n\t return aStr.slice(1);\n\t }\n\t\n\t return aStr;\n\t}\n\texports.fromSetString = supportsNullProto ? identity : fromSetString;\n\t\n\tfunction isProtoString(s) {\n\t if (!s) {\n\t return false;\n\t }\n\t\n\t var length = s.length;\n\t\n\t if (length < 9 /* \"__proto__\".length */) {\n\t return false;\n\t }\n\t\n\t if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n\t s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n\t s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n\t s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n\t s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n\t s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 9) !== 95 /* '_' */) {\n\t return false;\n\t }\n\t\n\t for (var i = length - 10; i >= 0; i--) {\n\t if (s.charCodeAt(i) !== 36 /* '$' */) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}\n\t\n\t/**\n\t * Comparator between two mappings where the original positions are compared.\n\t *\n\t * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n\t * mappings with the same original source/line/column, but different generated\n\t * line and column the same. Useful when searching for a mapping with a\n\t * stubbed out mapping.\n\t */\n\tfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n\t var cmp = mappingA.source - mappingB.source;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0 || onlyCompareOriginal) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return mappingA.name - mappingB.name;\n\t}\n\texports.compareByOriginalPositions = compareByOriginalPositions;\n\t\n\t/**\n\t * Comparator between two mappings with deflated source and name indices where\n\t * the generated positions are compared.\n\t *\n\t * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n\t * mappings with the same generated line and column, but different\n\t * source/name/original line and column the same. Useful when searching for a\n\t * mapping with a stubbed out mapping.\n\t */\n\tfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0 || onlyCompareGenerated) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.source - mappingB.source;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return mappingA.name - mappingB.name;\n\t}\n\texports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\t\n\tfunction strcmp(aStr1, aStr2) {\n\t if (aStr1 === aStr2) {\n\t return 0;\n\t }\n\t\n\t if (aStr1 > aStr2) {\n\t return 1;\n\t }\n\t\n\t return -1;\n\t}\n\t\n\t/**\n\t * Comparator between two mappings with inflated source and name strings where\n\t * the generated positions are compared.\n\t */\n\tfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = strcmp(mappingA.source, mappingB.source);\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return strcmp(mappingA.name, mappingB.name);\n\t}\n\texports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\n\n/***/ },\n/* 5 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\tvar has = Object.prototype.hasOwnProperty;\n\t\n\t/**\n\t * A data structure which is a combination of an array and a set. Adding a new\n\t * member is O(1), testing for membership is O(1), and finding the index of an\n\t * element is O(1). Removing elements from the set is not supported. Only\n\t * strings are supported for membership.\n\t */\n\tfunction ArraySet() {\n\t this._array = [];\n\t this._set = Object.create(null);\n\t}\n\t\n\t/**\n\t * Static method for creating ArraySet instances from an existing array.\n\t */\n\tArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n\t var set = new ArraySet();\n\t for (var i = 0, len = aArray.length; i < len; i++) {\n\t set.add(aArray[i], aAllowDuplicates);\n\t }\n\t return set;\n\t};\n\t\n\t/**\n\t * Return how many unique items are in this ArraySet. If duplicates have been\n\t * added, than those do not count towards the size.\n\t *\n\t * @returns Number\n\t */\n\tArraySet.prototype.size = function ArraySet_size() {\n\t return Object.getOwnPropertyNames(this._set).length;\n\t};\n\t\n\t/**\n\t * Add the given string to this set.\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n\t var sStr = util.toSetString(aStr);\n\t var isDuplicate = has.call(this._set, sStr);\n\t var idx = this._array.length;\n\t if (!isDuplicate || aAllowDuplicates) {\n\t this._array.push(aStr);\n\t }\n\t if (!isDuplicate) {\n\t this._set[sStr] = idx;\n\t }\n\t};\n\t\n\t/**\n\t * Is the given string a member of this set?\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.has = function ArraySet_has(aStr) {\n\t var sStr = util.toSetString(aStr);\n\t return has.call(this._set, sStr);\n\t};\n\t\n\t/**\n\t * What is the index of the given string in the array?\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n\t var sStr = util.toSetString(aStr);\n\t if (has.call(this._set, sStr)) {\n\t return this._set[sStr];\n\t }\n\t throw new Error('\"' + aStr + '\" is not in the set.');\n\t};\n\t\n\t/**\n\t * What is the element at the given index?\n\t *\n\t * @param Number aIdx\n\t */\n\tArraySet.prototype.at = function ArraySet_at(aIdx) {\n\t if (aIdx >= 0 && aIdx < this._array.length) {\n\t return this._array[aIdx];\n\t }\n\t throw new Error('No element indexed by ' + aIdx);\n\t};\n\t\n\t/**\n\t * Returns the array representation of this set (which has the proper indices\n\t * indicated by indexOf). Note that this is a copy of the internal array used\n\t * for storing the members so that no one can mess with internal state.\n\t */\n\tArraySet.prototype.toArray = function ArraySet_toArray() {\n\t return this._array.slice();\n\t};\n\t\n\texports.ArraySet = ArraySet;\n\n\n/***/ },\n/* 6 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2014 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\t\n\t/**\n\t * Determine whether mappingB is after mappingA with respect to generated\n\t * position.\n\t */\n\tfunction generatedPositionAfter(mappingA, mappingB) {\n\t // Optimized for most common case\n\t var lineA = mappingA.generatedLine;\n\t var lineB = mappingB.generatedLine;\n\t var columnA = mappingA.generatedColumn;\n\t var columnB = mappingB.generatedColumn;\n\t return lineB > lineA || lineB == lineA && columnB >= columnA ||\n\t util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n\t}\n\t\n\t/**\n\t * A data structure to provide a sorted view of accumulated mappings in a\n\t * performance conscious manner. It trades a neglibable overhead in general\n\t * case for a large speedup in case of mappings being added in order.\n\t */\n\tfunction MappingList() {\n\t this._array = [];\n\t this._sorted = true;\n\t // Serves as infimum\n\t this._last = {generatedLine: -1, generatedColumn: 0};\n\t}\n\t\n\t/**\n\t * Iterate through internal items. This method takes the same arguments that\n\t * `Array.prototype.forEach` takes.\n\t *\n\t * NOTE: The order of the mappings is NOT guaranteed.\n\t */\n\tMappingList.prototype.unsortedForEach =\n\t function MappingList_forEach(aCallback, aThisArg) {\n\t this._array.forEach(aCallback, aThisArg);\n\t };\n\t\n\t/**\n\t * Add the given source mapping.\n\t *\n\t * @param Object aMapping\n\t */\n\tMappingList.prototype.add = function MappingList_add(aMapping) {\n\t if (generatedPositionAfter(this._last, aMapping)) {\n\t this._last = aMapping;\n\t this._array.push(aMapping);\n\t } else {\n\t this._sorted = false;\n\t this._array.push(aMapping);\n\t }\n\t};\n\t\n\t/**\n\t * Returns the flat, sorted array of mappings. The mappings are sorted by\n\t * generated position.\n\t *\n\t * WARNING: This method returns internal data without copying, for\n\t * performance. The return value must NOT be mutated, and should be treated as\n\t * an immutable borrow. If you want to take ownership, you must make your own\n\t * copy.\n\t */\n\tMappingList.prototype.toArray = function MappingList_toArray() {\n\t if (!this._sorted) {\n\t this._array.sort(util.compareByGeneratedPositionsInflated);\n\t this._sorted = true;\n\t }\n\t return this._array;\n\t};\n\t\n\texports.MappingList = MappingList;\n\n\n/***/ },\n/* 7 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\tvar binarySearch = __webpack_require__(8);\n\tvar ArraySet = __webpack_require__(5).ArraySet;\n\tvar base64VLQ = __webpack_require__(2);\n\tvar quickSort = __webpack_require__(9).quickSort;\n\t\n\tfunction SourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t return sourceMap.sections != null\n\t ? new IndexedSourceMapConsumer(sourceMap)\n\t : new BasicSourceMapConsumer(sourceMap);\n\t}\n\t\n\tSourceMapConsumer.fromSourceMap = function(aSourceMap) {\n\t return BasicSourceMapConsumer.fromSourceMap(aSourceMap);\n\t}\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tSourceMapConsumer.prototype._version = 3;\n\t\n\t// `__generatedMappings` and `__originalMappings` are arrays that hold the\n\t// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n\t// are lazily instantiated, accessed via the `_generatedMappings` and\n\t// `_originalMappings` getters respectively, and we only parse the mappings\n\t// and create these arrays once queried for a source location. We jump through\n\t// these hoops because there can be many thousands of mappings, and parsing\n\t// them is expensive, so we only want to do it if we must.\n\t//\n\t// Each object in the arrays is of the form:\n\t//\n\t// {\n\t// generatedLine: The line number in the generated code,\n\t// generatedColumn: The column number in the generated code,\n\t// source: The path to the original source file that generated this\n\t// chunk of code,\n\t// originalLine: The line number in the original source that\n\t// corresponds to this chunk of generated code,\n\t// originalColumn: The column number in the original source that\n\t// corresponds to this chunk of generated code,\n\t// name: The name of the original symbol which generated this chunk of\n\t// code.\n\t// }\n\t//\n\t// All properties except for `generatedLine` and `generatedColumn` can be\n\t// `null`.\n\t//\n\t// `_generatedMappings` is ordered by the generated positions.\n\t//\n\t// `_originalMappings` is ordered by the original positions.\n\t\n\tSourceMapConsumer.prototype.__generatedMappings = null;\n\tObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n\t get: function () {\n\t if (!this.__generatedMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\t\n\t return this.__generatedMappings;\n\t }\n\t});\n\t\n\tSourceMapConsumer.prototype.__originalMappings = null;\n\tObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n\t get: function () {\n\t if (!this.__originalMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\t\n\t return this.__originalMappings;\n\t }\n\t});\n\t\n\tSourceMapConsumer.prototype._charIsMappingSeparator =\n\t function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n\t var c = aStr.charAt(index);\n\t return c === \";\" || c === \",\";\n\t };\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tSourceMapConsumer.prototype._parseMappings =\n\t function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t throw new Error(\"Subclasses must implement _parseMappings\");\n\t };\n\t\n\tSourceMapConsumer.GENERATED_ORDER = 1;\n\tSourceMapConsumer.ORIGINAL_ORDER = 2;\n\t\n\tSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\n\tSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\t\n\t/**\n\t * Iterate over each mapping between an original source/line/column and a\n\t * generated line/column in this source map.\n\t *\n\t * @param Function aCallback\n\t * The function that is called with each mapping.\n\t * @param Object aContext\n\t * Optional. If specified, this object will be the value of `this` every\n\t * time that `aCallback` is called.\n\t * @param aOrder\n\t * Either `SourceMapConsumer.GENERATED_ORDER` or\n\t * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n\t * iterate over the mappings sorted by the generated file's line/column\n\t * order or the original's source/line/column order, respectively. Defaults to\n\t * `SourceMapConsumer.GENERATED_ORDER`.\n\t */\n\tSourceMapConsumer.prototype.eachMapping =\n\t function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n\t var context = aContext || null;\n\t var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\t\n\t var mappings;\n\t switch (order) {\n\t case SourceMapConsumer.GENERATED_ORDER:\n\t mappings = this._generatedMappings;\n\t break;\n\t case SourceMapConsumer.ORIGINAL_ORDER:\n\t mappings = this._originalMappings;\n\t break;\n\t default:\n\t throw new Error(\"Unknown order of iteration.\");\n\t }\n\t\n\t var sourceRoot = this.sourceRoot;\n\t mappings.map(function (mapping) {\n\t var source = mapping.source === null ? null : this._sources.at(mapping.source);\n\t if (source != null && sourceRoot != null) {\n\t source = util.join(sourceRoot, source);\n\t }\n\t return {\n\t source: source,\n\t generatedLine: mapping.generatedLine,\n\t generatedColumn: mapping.generatedColumn,\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: mapping.name === null ? null : this._names.at(mapping.name)\n\t };\n\t }, this).forEach(aCallback, context);\n\t };\n\t\n\t/**\n\t * Returns all generated line and column information for the original source,\n\t * line, and column provided. If no column is provided, returns all mappings\n\t * corresponding to a either the line we are searching for or the next\n\t * closest line that has any mappings. Otherwise, returns all mappings\n\t * corresponding to the given line and either the column we are searching for\n\t * or the next closest column that has any offsets.\n\t *\n\t * The only argument is an object with the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: Optional. the column number in the original source.\n\t *\n\t * and an array of objects is returned, each with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\tSourceMapConsumer.prototype.allGeneratedPositionsFor =\n\t function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n\t var line = util.getArg(aArgs, 'line');\n\t\n\t // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n\t // returns the index of the closest mapping less than the needle. By\n\t // setting needle.originalColumn to 0, we thus find the last mapping for\n\t // the given line, provided such a mapping exists.\n\t var needle = {\n\t source: util.getArg(aArgs, 'source'),\n\t originalLine: line,\n\t originalColumn: util.getArg(aArgs, 'column', 0)\n\t };\n\t\n\t if (this.sourceRoot != null) {\n\t needle.source = util.relative(this.sourceRoot, needle.source);\n\t }\n\t if (!this._sources.has(needle.source)) {\n\t return [];\n\t }\n\t needle.source = this._sources.indexOf(needle.source);\n\t\n\t var mappings = [];\n\t\n\t var index = this._findMapping(needle,\n\t this._originalMappings,\n\t \"originalLine\",\n\t \"originalColumn\",\n\t util.compareByOriginalPositions,\n\t binarySearch.LEAST_UPPER_BOUND);\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\t\n\t if (aArgs.column === undefined) {\n\t var originalLine = mapping.originalLine;\n\t\n\t // Iterate until either we run out of mappings, or we run into\n\t // a mapping for a different line than the one we found. Since\n\t // mappings are sorted, this is guaranteed to find all mappings for\n\t // the line we found.\n\t while (mapping && mapping.originalLine === originalLine) {\n\t mappings.push({\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t\n\t mapping = this._originalMappings[++index];\n\t }\n\t } else {\n\t var originalColumn = mapping.originalColumn;\n\t\n\t // Iterate until either we run out of mappings, or we run into\n\t // a mapping for a different line than the one we were searching for.\n\t // Since mappings are sorted, this is guaranteed to find all mappings for\n\t // the line we are searching for.\n\t while (mapping &&\n\t mapping.originalLine === line &&\n\t mapping.originalColumn == originalColumn) {\n\t mappings.push({\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t\n\t mapping = this._originalMappings[++index];\n\t }\n\t }\n\t }\n\t\n\t return mappings;\n\t };\n\t\n\texports.SourceMapConsumer = SourceMapConsumer;\n\t\n\t/**\n\t * A BasicSourceMapConsumer instance represents a parsed source map which we can\n\t * query for information about the original file positions by giving it a file\n\t * position in the generated source.\n\t *\n\t * The only parameter is the raw source map (either as a JSON string, or\n\t * already parsed to an object). According to the spec, source maps have the\n\t * following attributes:\n\t *\n\t * - version: Which version of the source map spec this map is following.\n\t * - sources: An array of URLs to the original source files.\n\t * - names: An array of identifiers which can be referrenced by individual mappings.\n\t * - sourceRoot: Optional. The URL root from which all sources are relative.\n\t * - sourcesContent: Optional. An array of contents of the original source files.\n\t * - mappings: A string of base64 VLQs which contain the actual mappings.\n\t * - file: Optional. The generated file this source map is associated with.\n\t *\n\t * Here is an example source map, taken from the source map spec[0]:\n\t *\n\t * {\n\t * version : 3,\n\t * file: \"out.js\",\n\t * sourceRoot : \"\",\n\t * sources: [\"foo.js\", \"bar.js\"],\n\t * names: [\"src\", \"maps\", \"are\", \"fun\"],\n\t * mappings: \"AA,AB;;ABCDE;\"\n\t * }\n\t *\n\t * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n\t */\n\tfunction BasicSourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t var version = util.getArg(sourceMap, 'version');\n\t var sources = util.getArg(sourceMap, 'sources');\n\t // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n\t // requires the array) to play nice here.\n\t var names = util.getArg(sourceMap, 'names', []);\n\t var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n\t var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n\t var mappings = util.getArg(sourceMap, 'mappings');\n\t var file = util.getArg(sourceMap, 'file', null);\n\t\n\t // Once again, Sass deviates from the spec and supplies the version as a\n\t // string rather than a number, so we use loose equality checking here.\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\t\n\t sources = sources\n\t .map(String)\n\t // Some source maps produce relative source paths like \"./foo.js\" instead of\n\t // \"foo.js\". Normalize these first so that future comparisons will succeed.\n\t // See bugzil.la/1090768.\n\t .map(util.normalize)\n\t // Always ensure that absolute sources are internally stored relative to\n\t // the source root, if the source root is absolute. Not doing this would\n\t // be particularly problematic when the source root is a prefix of the\n\t // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n\t .map(function (source) {\n\t return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n\t ? util.relative(sourceRoot, source)\n\t : source;\n\t });\n\t\n\t // Pass `true` below to allow duplicate names and sources. While source maps\n\t // are intended to be compressed and deduplicated, the TypeScript compiler\n\t // sometimes generates source maps with duplicates in them. See Github issue\n\t // #72 and bugzil.la/889492.\n\t this._names = ArraySet.fromArray(names.map(String), true);\n\t this._sources = ArraySet.fromArray(sources, true);\n\t\n\t this.sourceRoot = sourceRoot;\n\t this.sourcesContent = sourcesContent;\n\t this._mappings = mappings;\n\t this.file = file;\n\t}\n\t\n\tBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n\tBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\t\n\t/**\n\t * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n\t *\n\t * @param SourceMapGenerator aSourceMap\n\t * The source map that will be consumed.\n\t * @returns BasicSourceMapConsumer\n\t */\n\tBasicSourceMapConsumer.fromSourceMap =\n\t function SourceMapConsumer_fromSourceMap(aSourceMap) {\n\t var smc = Object.create(BasicSourceMapConsumer.prototype);\n\t\n\t var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n\t var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n\t smc.sourceRoot = aSourceMap._sourceRoot;\n\t smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n\t smc.sourceRoot);\n\t smc.file = aSourceMap._file;\n\t\n\t // Because we are modifying the entries (by converting string sources and\n\t // names to indices into the sources and names ArraySets), we have to make\n\t // a copy of the entry or else bad things happen. Shared mutable state\n\t // strikes again! See github issue #191.\n\t\n\t var generatedMappings = aSourceMap._mappings.toArray().slice();\n\t var destGeneratedMappings = smc.__generatedMappings = [];\n\t var destOriginalMappings = smc.__originalMappings = [];\n\t\n\t for (var i = 0, length = generatedMappings.length; i < length; i++) {\n\t var srcMapping = generatedMappings[i];\n\t var destMapping = new Mapping;\n\t destMapping.generatedLine = srcMapping.generatedLine;\n\t destMapping.generatedColumn = srcMapping.generatedColumn;\n\t\n\t if (srcMapping.source) {\n\t destMapping.source = sources.indexOf(srcMapping.source);\n\t destMapping.originalLine = srcMapping.originalLine;\n\t destMapping.originalColumn = srcMapping.originalColumn;\n\t\n\t if (srcMapping.name) {\n\t destMapping.name = names.indexOf(srcMapping.name);\n\t }\n\t\n\t destOriginalMappings.push(destMapping);\n\t }\n\t\n\t destGeneratedMappings.push(destMapping);\n\t }\n\t\n\t quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\t\n\t return smc;\n\t };\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tBasicSourceMapConsumer.prototype._version = 3;\n\t\n\t/**\n\t * The list of original sources.\n\t */\n\tObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n\t get: function () {\n\t return this._sources.toArray().map(function (s) {\n\t return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;\n\t }, this);\n\t }\n\t});\n\t\n\t/**\n\t * Provide the JIT with a nice shape / hidden class.\n\t */\n\tfunction Mapping() {\n\t this.generatedLine = 0;\n\t this.generatedColumn = 0;\n\t this.source = null;\n\t this.originalLine = null;\n\t this.originalColumn = null;\n\t this.name = null;\n\t}\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tBasicSourceMapConsumer.prototype._parseMappings =\n\t function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t var generatedLine = 1;\n\t var previousGeneratedColumn = 0;\n\t var previousOriginalLine = 0;\n\t var previousOriginalColumn = 0;\n\t var previousSource = 0;\n\t var previousName = 0;\n\t var length = aStr.length;\n\t var index = 0;\n\t var cachedSegments = {};\n\t var temp = {};\n\t var originalMappings = [];\n\t var generatedMappings = [];\n\t var mapping, str, segment, end, value;\n\t\n\t while (index < length) {\n\t if (aStr.charAt(index) === ';') {\n\t generatedLine++;\n\t index++;\n\t previousGeneratedColumn = 0;\n\t }\n\t else if (aStr.charAt(index) === ',') {\n\t index++;\n\t }\n\t else {\n\t mapping = new Mapping();\n\t mapping.generatedLine = generatedLine;\n\t\n\t // Because each offset is encoded relative to the previous one,\n\t // many segments often have the same encoding. We can exploit this\n\t // fact by caching the parsed variable length fields of each segment,\n\t // allowing us to avoid a second parse if we encounter the same\n\t // segment again.\n\t for (end = index; end < length; end++) {\n\t if (this._charIsMappingSeparator(aStr, end)) {\n\t break;\n\t }\n\t }\n\t str = aStr.slice(index, end);\n\t\n\t segment = cachedSegments[str];\n\t if (segment) {\n\t index += str.length;\n\t } else {\n\t segment = [];\n\t while (index < end) {\n\t base64VLQ.decode(aStr, index, temp);\n\t value = temp.value;\n\t index = temp.rest;\n\t segment.push(value);\n\t }\n\t\n\t if (segment.length === 2) {\n\t throw new Error('Found a source, but no line and column');\n\t }\n\t\n\t if (segment.length === 3) {\n\t throw new Error('Found a source and line, but no column');\n\t }\n\t\n\t cachedSegments[str] = segment;\n\t }\n\t\n\t // Generated column.\n\t mapping.generatedColumn = previousGeneratedColumn + segment[0];\n\t previousGeneratedColumn = mapping.generatedColumn;\n\t\n\t if (segment.length > 1) {\n\t // Original source.\n\t mapping.source = previousSource + segment[1];\n\t previousSource += segment[1];\n\t\n\t // Original line.\n\t mapping.originalLine = previousOriginalLine + segment[2];\n\t previousOriginalLine = mapping.originalLine;\n\t // Lines are stored 0-based\n\t mapping.originalLine += 1;\n\t\n\t // Original column.\n\t mapping.originalColumn = previousOriginalColumn + segment[3];\n\t previousOriginalColumn = mapping.originalColumn;\n\t\n\t if (segment.length > 4) {\n\t // Original name.\n\t mapping.name = previousName + segment[4];\n\t previousName += segment[4];\n\t }\n\t }\n\t\n\t generatedMappings.push(mapping);\n\t if (typeof mapping.originalLine === 'number') {\n\t originalMappings.push(mapping);\n\t }\n\t }\n\t }\n\t\n\t quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n\t this.__generatedMappings = generatedMappings;\n\t\n\t quickSort(originalMappings, util.compareByOriginalPositions);\n\t this.__originalMappings = originalMappings;\n\t };\n\t\n\t/**\n\t * Find the mapping that best matches the hypothetical \"needle\" mapping that\n\t * we are searching for in the given \"haystack\" of mappings.\n\t */\n\tBasicSourceMapConsumer.prototype._findMapping =\n\t function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n\t aColumnName, aComparator, aBias) {\n\t // To return the position we are searching for, we must first find the\n\t // mapping for the given position and then return the opposite position it\n\t // points to. Because the mappings are sorted, we can use binary search to\n\t // find the best mapping.\n\t\n\t if (aNeedle[aLineName] <= 0) {\n\t throw new TypeError('Line must be greater than or equal to 1, got '\n\t + aNeedle[aLineName]);\n\t }\n\t if (aNeedle[aColumnName] < 0) {\n\t throw new TypeError('Column must be greater than or equal to 0, got '\n\t + aNeedle[aColumnName]);\n\t }\n\t\n\t return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n\t };\n\t\n\t/**\n\t * Compute the last column for each generated mapping. The last column is\n\t * inclusive.\n\t */\n\tBasicSourceMapConsumer.prototype.computeColumnSpans =\n\t function SourceMapConsumer_computeColumnSpans() {\n\t for (var index = 0; index < this._generatedMappings.length; ++index) {\n\t var mapping = this._generatedMappings[index];\n\t\n\t // Mappings do not contain a field for the last generated columnt. We\n\t // can come up with an optimistic estimate, however, by assuming that\n\t // mappings are contiguous (i.e. given two consecutive mappings, the\n\t // first mapping ends where the second one starts).\n\t if (index + 1 < this._generatedMappings.length) {\n\t var nextMapping = this._generatedMappings[index + 1];\n\t\n\t if (mapping.generatedLine === nextMapping.generatedLine) {\n\t mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n\t continue;\n\t }\n\t }\n\t\n\t // The last mapping for each line spans the entire line.\n\t mapping.lastGeneratedColumn = Infinity;\n\t }\n\t };\n\t\n\t/**\n\t * Returns the original source, line, and column information for the generated\n\t * source's line and column positions provided. The only argument is an object\n\t * with the following properties:\n\t *\n\t * - line: The line number in the generated source.\n\t * - column: The column number in the generated source.\n\t * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n\t * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - source: The original source file, or null.\n\t * - line: The line number in the original source, or null.\n\t * - column: The column number in the original source, or null.\n\t * - name: The original identifier, or null.\n\t */\n\tBasicSourceMapConsumer.prototype.originalPositionFor =\n\t function SourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util.getArg(aArgs, 'line'),\n\t generatedColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t var index = this._findMapping(\n\t needle,\n\t this._generatedMappings,\n\t \"generatedLine\",\n\t \"generatedColumn\",\n\t util.compareByGeneratedPositionsDeflated,\n\t util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n\t );\n\t\n\t if (index >= 0) {\n\t var mapping = this._generatedMappings[index];\n\t\n\t if (mapping.generatedLine === needle.generatedLine) {\n\t var source = util.getArg(mapping, 'source', null);\n\t if (source !== null) {\n\t source = this._sources.at(source);\n\t if (this.sourceRoot != null) {\n\t source = util.join(this.sourceRoot, source);\n\t }\n\t }\n\t var name = util.getArg(mapping, 'name', null);\n\t if (name !== null) {\n\t name = this._names.at(name);\n\t }\n\t return {\n\t source: source,\n\t line: util.getArg(mapping, 'originalLine', null),\n\t column: util.getArg(mapping, 'originalColumn', null),\n\t name: name\n\t };\n\t }\n\t }\n\t\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t };\n\t\n\t/**\n\t * Return true if we have the source content for every source in the source\n\t * map, false otherwise.\n\t */\n\tBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n\t function BasicSourceMapConsumer_hasContentsOfAllSources() {\n\t if (!this.sourcesContent) {\n\t return false;\n\t }\n\t return this.sourcesContent.length >= this._sources.size() &&\n\t !this.sourcesContent.some(function (sc) { return sc == null; });\n\t };\n\t\n\t/**\n\t * Returns the original source content. The only argument is the url of the\n\t * original source file. Returns null if no original source content is\n\t * available.\n\t */\n\tBasicSourceMapConsumer.prototype.sourceContentFor =\n\t function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t if (!this.sourcesContent) {\n\t return null;\n\t }\n\t\n\t if (this.sourceRoot != null) {\n\t aSource = util.relative(this.sourceRoot, aSource);\n\t }\n\t\n\t if (this._sources.has(aSource)) {\n\t return this.sourcesContent[this._sources.indexOf(aSource)];\n\t }\n\t\n\t var url;\n\t if (this.sourceRoot != null\n\t && (url = util.urlParse(this.sourceRoot))) {\n\t // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n\t // many users. We can help them out when they expect file:// URIs to\n\t // behave like it would if they were running a local HTTP server. See\n\t // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n\t var fileUriAbsPath = aSource.replace(/^file:\\/\\//, \"\");\n\t if (url.scheme == \"file\"\n\t && this._sources.has(fileUriAbsPath)) {\n\t return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n\t }\n\t\n\t if ((!url.path || url.path == \"/\")\n\t && this._sources.has(\"/\" + aSource)) {\n\t return this.sourcesContent[this._sources.indexOf(\"/\" + aSource)];\n\t }\n\t }\n\t\n\t // This function is used recursively from\n\t // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n\t // don't want to throw if we can't find the source - we just want to\n\t // return null, so we provide a flag to exit gracefully.\n\t if (nullOnMissing) {\n\t return null;\n\t }\n\t else {\n\t throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n\t }\n\t };\n\t\n\t/**\n\t * Returns the generated line and column information for the original source,\n\t * line, and column positions provided. The only argument is an object with\n\t * the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: The column number in the original source.\n\t * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n\t * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\tBasicSourceMapConsumer.prototype.generatedPositionFor =\n\t function SourceMapConsumer_generatedPositionFor(aArgs) {\n\t var source = util.getArg(aArgs, 'source');\n\t if (this.sourceRoot != null) {\n\t source = util.relative(this.sourceRoot, source);\n\t }\n\t if (!this._sources.has(source)) {\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t }\n\t source = this._sources.indexOf(source);\n\t\n\t var needle = {\n\t source: source,\n\t originalLine: util.getArg(aArgs, 'line'),\n\t originalColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t var index = this._findMapping(\n\t needle,\n\t this._originalMappings,\n\t \"originalLine\",\n\t \"originalColumn\",\n\t util.compareByOriginalPositions,\n\t util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n\t );\n\t\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\t\n\t if (mapping.source === needle.source) {\n\t return {\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t };\n\t }\n\t }\n\t\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t };\n\t\n\texports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\t\n\t/**\n\t * An IndexedSourceMapConsumer instance represents a parsed source map which\n\t * we can query for information. It differs from BasicSourceMapConsumer in\n\t * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n\t * input.\n\t *\n\t * The only parameter is a raw source map (either as a JSON string, or already\n\t * parsed to an object). According to the spec for indexed source maps, they\n\t * have the following attributes:\n\t *\n\t * - version: Which version of the source map spec this map is following.\n\t * - file: Optional. The generated file this source map is associated with.\n\t * - sections: A list of section definitions.\n\t *\n\t * Each value under the \"sections\" field has two fields:\n\t * - offset: The offset into the original specified at which this section\n\t * begins to apply, defined as an object with a \"line\" and \"column\"\n\t * field.\n\t * - map: A source map definition. This source map could also be indexed,\n\t * but doesn't have to be.\n\t *\n\t * Instead of the \"map\" field, it's also possible to have a \"url\" field\n\t * specifying a URL to retrieve a source map from, but that's currently\n\t * unsupported.\n\t *\n\t * Here's an example source map, taken from the source map spec[0], but\n\t * modified to omit a section which uses the \"url\" field.\n\t *\n\t * {\n\t * version : 3,\n\t * file: \"app.js\",\n\t * sections: [{\n\t * offset: {line:100, column:10},\n\t * map: {\n\t * version : 3,\n\t * file: \"section.js\",\n\t * sources: [\"foo.js\", \"bar.js\"],\n\t * names: [\"src\", \"maps\", \"are\", \"fun\"],\n\t * mappings: \"AAAA,E;;ABCDE;\"\n\t * }\n\t * }],\n\t * }\n\t *\n\t * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n\t */\n\tfunction IndexedSourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t var version = util.getArg(sourceMap, 'version');\n\t var sections = util.getArg(sourceMap, 'sections');\n\t\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\t\n\t this._sources = new ArraySet();\n\t this._names = new ArraySet();\n\t\n\t var lastOffset = {\n\t line: -1,\n\t column: 0\n\t };\n\t this._sections = sections.map(function (s) {\n\t if (s.url) {\n\t // The url field will require support for asynchronicity.\n\t // See https://github.com/mozilla/source-map/issues/16\n\t throw new Error('Support for url field in sections not implemented.');\n\t }\n\t var offset = util.getArg(s, 'offset');\n\t var offsetLine = util.getArg(offset, 'line');\n\t var offsetColumn = util.getArg(offset, 'column');\n\t\n\t if (offsetLine < lastOffset.line ||\n\t (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n\t throw new Error('Section offsets must be ordered and non-overlapping.');\n\t }\n\t lastOffset = offset;\n\t\n\t return {\n\t generatedOffset: {\n\t // The offset fields are 0-based, but we use 1-based indices when\n\t // encoding/decoding from VLQ.\n\t generatedLine: offsetLine + 1,\n\t generatedColumn: offsetColumn + 1\n\t },\n\t consumer: new SourceMapConsumer(util.getArg(s, 'map'))\n\t }\n\t });\n\t}\n\t\n\tIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n\tIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tIndexedSourceMapConsumer.prototype._version = 3;\n\t\n\t/**\n\t * The list of original sources.\n\t */\n\tObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n\t get: function () {\n\t var sources = [];\n\t for (var i = 0; i < this._sections.length; i++) {\n\t for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n\t sources.push(this._sections[i].consumer.sources[j]);\n\t }\n\t }\n\t return sources;\n\t }\n\t});\n\t\n\t/**\n\t * Returns the original source, line, and column information for the generated\n\t * source's line and column positions provided. The only argument is an object\n\t * with the following properties:\n\t *\n\t * - line: The line number in the generated source.\n\t * - column: The column number in the generated source.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - source: The original source file, or null.\n\t * - line: The line number in the original source, or null.\n\t * - column: The column number in the original source, or null.\n\t * - name: The original identifier, or null.\n\t */\n\tIndexedSourceMapConsumer.prototype.originalPositionFor =\n\t function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util.getArg(aArgs, 'line'),\n\t generatedColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t // Find the section containing the generated position we're trying to map\n\t // to an original position.\n\t var sectionIndex = binarySearch.search(needle, this._sections,\n\t function(needle, section) {\n\t var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n\t if (cmp) {\n\t return cmp;\n\t }\n\t\n\t return (needle.generatedColumn -\n\t section.generatedOffset.generatedColumn);\n\t });\n\t var section = this._sections[sectionIndex];\n\t\n\t if (!section) {\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t }\n\t\n\t return section.consumer.originalPositionFor({\n\t line: needle.generatedLine -\n\t (section.generatedOffset.generatedLine - 1),\n\t column: needle.generatedColumn -\n\t (section.generatedOffset.generatedLine === needle.generatedLine\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0),\n\t bias: aArgs.bias\n\t });\n\t };\n\t\n\t/**\n\t * Return true if we have the source content for every source in the source\n\t * map, false otherwise.\n\t */\n\tIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n\t function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n\t return this._sections.every(function (s) {\n\t return s.consumer.hasContentsOfAllSources();\n\t });\n\t };\n\t\n\t/**\n\t * Returns the original source content. The only argument is the url of the\n\t * original source file. Returns null if no original source content is\n\t * available.\n\t */\n\tIndexedSourceMapConsumer.prototype.sourceContentFor =\n\t function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t\n\t var content = section.consumer.sourceContentFor(aSource, true);\n\t if (content) {\n\t return content;\n\t }\n\t }\n\t if (nullOnMissing) {\n\t return null;\n\t }\n\t else {\n\t throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n\t }\n\t };\n\t\n\t/**\n\t * Returns the generated line and column information for the original source,\n\t * line, and column positions provided. The only argument is an object with\n\t * the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: The column number in the original source.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\tIndexedSourceMapConsumer.prototype.generatedPositionFor =\n\t function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t\n\t // Only consider this section if the requested source is in the list of\n\t // sources of the consumer.\n\t if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {\n\t continue;\n\t }\n\t var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n\t if (generatedPosition) {\n\t var ret = {\n\t line: generatedPosition.line +\n\t (section.generatedOffset.generatedLine - 1),\n\t column: generatedPosition.column +\n\t (section.generatedOffset.generatedLine === generatedPosition.line\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0)\n\t };\n\t return ret;\n\t }\n\t }\n\t\n\t return {\n\t line: null,\n\t column: null\n\t };\n\t };\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tIndexedSourceMapConsumer.prototype._parseMappings =\n\t function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t this.__generatedMappings = [];\n\t this.__originalMappings = [];\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t var sectionMappings = section.consumer._generatedMappings;\n\t for (var j = 0; j < sectionMappings.length; j++) {\n\t var mapping = sectionMappings[j];\n\t\n\t var source = section.consumer._sources.at(mapping.source);\n\t if (section.consumer.sourceRoot !== null) {\n\t source = util.join(section.consumer.sourceRoot, source);\n\t }\n\t this._sources.add(source);\n\t source = this._sources.indexOf(source);\n\t\n\t var name = section.consumer._names.at(mapping.name);\n\t this._names.add(name);\n\t name = this._names.indexOf(name);\n\t\n\t // The mappings coming from the consumer for the section have\n\t // generated positions relative to the start of the section, so we\n\t // need to offset them to be relative to the start of the concatenated\n\t // generated file.\n\t var adjustedMapping = {\n\t source: source,\n\t generatedLine: mapping.generatedLine +\n\t (section.generatedOffset.generatedLine - 1),\n\t generatedColumn: mapping.generatedColumn +\n\t (section.generatedOffset.generatedLine === mapping.generatedLine\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0),\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: name\n\t };\n\t\n\t this.__generatedMappings.push(adjustedMapping);\n\t if (typeof adjustedMapping.originalLine === 'number') {\n\t this.__originalMappings.push(adjustedMapping);\n\t }\n\t }\n\t }\n\t\n\t quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n\t quickSort(this.__originalMappings, util.compareByOriginalPositions);\n\t };\n\t\n\texports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n\n\n/***/ },\n/* 8 */\n/***/ function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\texports.GREATEST_LOWER_BOUND = 1;\n\texports.LEAST_UPPER_BOUND = 2;\n\t\n\t/**\n\t * Recursive implementation of binary search.\n\t *\n\t * @param aLow Indices here and lower do not contain the needle.\n\t * @param aHigh Indices here and higher do not contain the needle.\n\t * @param aNeedle The element being searched for.\n\t * @param aHaystack The non-empty array being searched.\n\t * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n\t * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n\t * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t */\n\tfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n\t // This function terminates when one of the following is true:\n\t //\n\t // 1. We find the exact element we are looking for.\n\t //\n\t // 2. We did not find the exact element, but we can return the index of\n\t // the next-closest element.\n\t //\n\t // 3. We did not find the exact element, and there is no next-closest\n\t // element than the one we are searching for, so we return -1.\n\t var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n\t var cmp = aCompare(aNeedle, aHaystack[mid], true);\n\t if (cmp === 0) {\n\t // Found the element we are looking for.\n\t return mid;\n\t }\n\t else if (cmp > 0) {\n\t // Our needle is greater than aHaystack[mid].\n\t if (aHigh - mid > 1) {\n\t // The element is in the upper half.\n\t return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\t\n\t // The exact needle element was not found in this haystack. Determine if\n\t // we are in termination case (3) or (2) and return the appropriate thing.\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return aHigh < aHaystack.length ? aHigh : -1;\n\t } else {\n\t return mid;\n\t }\n\t }\n\t else {\n\t // Our needle is less than aHaystack[mid].\n\t if (mid - aLow > 1) {\n\t // The element is in the lower half.\n\t return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\t\n\t // we are in termination case (3) or (2) and return the appropriate thing.\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return mid;\n\t } else {\n\t return aLow < 0 ? -1 : aLow;\n\t }\n\t }\n\t}\n\t\n\t/**\n\t * This is an implementation of binary search which will always try and return\n\t * the index of the closest element if there is no exact hit. This is because\n\t * mappings between original and generated line/col pairs are single points,\n\t * and there is an implicit region between each of them, so a miss just means\n\t * that you aren't on the very start of a region.\n\t *\n\t * @param aNeedle The element you are looking for.\n\t * @param aHaystack The array that is being searched.\n\t * @param aCompare A function which takes the needle and an element in the\n\t * array and returns -1, 0, or 1 depending on whether the needle is less\n\t * than, equal to, or greater than the element, respectively.\n\t * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n\t * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n\t */\n\texports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n\t if (aHaystack.length === 0) {\n\t return -1;\n\t }\n\t\n\t var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n\t aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n\t if (index < 0) {\n\t return -1;\n\t }\n\t\n\t // We have found either the exact element, or the next-closest element than\n\t // the one we are searching for. However, there may be more than one such\n\t // element. Make sure we always return the smallest of these.\n\t while (index - 1 >= 0) {\n\t if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n\t break;\n\t }\n\t --index;\n\t }\n\t\n\t return index;\n\t};\n\n\n/***/ },\n/* 9 */\n/***/ function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\t// It turns out that some (most?) JavaScript engines don't self-host\n\t// `Array.prototype.sort`. This makes sense because C++ will likely remain\n\t// faster than JS when doing raw CPU-intensive sorting. However, when using a\n\t// custom comparator function, calling back and forth between the VM's C++ and\n\t// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n\t// worse generated code for the comparator function than would be optimal. In\n\t// fact, when sorting with a comparator, these costs outweigh the benefits of\n\t// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n\t// a ~3500ms mean speed-up in `bench/bench.html`.\n\t\n\t/**\n\t * Swap the elements indexed by `x` and `y` in the array `ary`.\n\t *\n\t * @param {Array} ary\n\t * The array.\n\t * @param {Number} x\n\t * The index of the first item.\n\t * @param {Number} y\n\t * The index of the second item.\n\t */\n\tfunction swap(ary, x, y) {\n\t var temp = ary[x];\n\t ary[x] = ary[y];\n\t ary[y] = temp;\n\t}\n\t\n\t/**\n\t * Returns a random integer within the range `low .. high` inclusive.\n\t *\n\t * @param {Number} low\n\t * The lower bound on the range.\n\t * @param {Number} high\n\t * The upper bound on the range.\n\t */\n\tfunction randomIntInRange(low, high) {\n\t return Math.round(low + (Math.random() * (high - low)));\n\t}\n\t\n\t/**\n\t * The Quick Sort algorithm.\n\t *\n\t * @param {Array} ary\n\t * An array to sort.\n\t * @param {function} comparator\n\t * Function to use to compare two items.\n\t * @param {Number} p\n\t * Start index of the array\n\t * @param {Number} r\n\t * End index of the array\n\t */\n\tfunction doQuickSort(ary, comparator, p, r) {\n\t // If our lower bound is less than our upper bound, we (1) partition the\n\t // array into two pieces and (2) recurse on each half. If it is not, this is\n\t // the empty array and our base case.\n\t\n\t if (p < r) {\n\t // (1) Partitioning.\n\t //\n\t // The partitioning chooses a pivot between `p` and `r` and moves all\n\t // elements that are less than or equal to the pivot to the before it, and\n\t // all the elements that are greater than it after it. The effect is that\n\t // once partition is done, the pivot is in the exact place it will be when\n\t // the array is put in sorted order, and it will not need to be moved\n\t // again. This runs in O(n) time.\n\t\n\t // Always choose a random pivot so that an input array which is reverse\n\t // sorted does not cause O(n^2) running time.\n\t var pivotIndex = randomIntInRange(p, r);\n\t var i = p - 1;\n\t\n\t swap(ary, pivotIndex, r);\n\t var pivot = ary[r];\n\t\n\t // Immediately after `j` is incremented in this loop, the following hold\n\t // true:\n\t //\n\t // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n\t //\n\t // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n\t for (var j = p; j < r; j++) {\n\t if (comparator(ary[j], pivot) <= 0) {\n\t i += 1;\n\t swap(ary, i, j);\n\t }\n\t }\n\t\n\t swap(ary, i + 1, j);\n\t var q = i + 1;\n\t\n\t // (2) Recurse on each half.\n\t\n\t doQuickSort(ary, comparator, p, q - 1);\n\t doQuickSort(ary, comparator, q + 1, r);\n\t }\n\t}\n\t\n\t/**\n\t * Sort the given array in-place with the given comparator function.\n\t *\n\t * @param {Array} ary\n\t * An array to sort.\n\t * @param {function} comparator\n\t * Function to use to compare two items.\n\t */\n\texports.quickSort = function (ary, comparator) {\n\t doQuickSort(ary, comparator, 0, ary.length - 1);\n\t};\n\n\n/***/ },\n/* 10 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar SourceMapGenerator = __webpack_require__(1).SourceMapGenerator;\n\tvar util = __webpack_require__(4);\n\t\n\t// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n\t// operating systems these days (capturing the result).\n\tvar REGEX_NEWLINE = /(\\r?\\n)/;\n\t\n\t// Newline character code for charCodeAt() comparisons\n\tvar NEWLINE_CODE = 10;\n\t\n\t// Private symbol for identifying `SourceNode`s when multiple versions of\n\t// the source-map library are loaded. This MUST NOT CHANGE across\n\t// versions!\n\tvar isSourceNode = \"$$$isSourceNode$$$\";\n\t\n\t/**\n\t * SourceNodes provide a way to abstract over interpolating/concatenating\n\t * snippets of generated JavaScript source code while maintaining the line and\n\t * column information associated with the original source code.\n\t *\n\t * @param aLine The original line number.\n\t * @param aColumn The original column number.\n\t * @param aSource The original source's filename.\n\t * @param aChunks Optional. An array of strings which are snippets of\n\t * generated JS, or other SourceNodes.\n\t * @param aName The original identifier.\n\t */\n\tfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n\t this.children = [];\n\t this.sourceContents = {};\n\t this.line = aLine == null ? null : aLine;\n\t this.column = aColumn == null ? null : aColumn;\n\t this.source = aSource == null ? null : aSource;\n\t this.name = aName == null ? null : aName;\n\t this[isSourceNode] = true;\n\t if (aChunks != null) this.add(aChunks);\n\t}\n\t\n\t/**\n\t * Creates a SourceNode from generated code and a SourceMapConsumer.\n\t *\n\t * @param aGeneratedCode The generated code\n\t * @param aSourceMapConsumer The SourceMap for the generated code\n\t * @param aRelativePath Optional. The path that relative sources in the\n\t * SourceMapConsumer should be relative to.\n\t */\n\tSourceNode.fromStringWithSourceMap =\n\t function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n\t // The SourceNode we want to fill with the generated code\n\t // and the SourceMap\n\t var node = new SourceNode();\n\t\n\t // All even indices of this array are one line of the generated code,\n\t // while all odd indices are the newlines between two adjacent lines\n\t // (since `REGEX_NEWLINE` captures its match).\n\t // Processed fragments are removed from this array, by calling `shiftNextLine`.\n\t var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n\t var shiftNextLine = function() {\n\t var lineContents = remainingLines.shift();\n\t // The last line of a file might not have a newline.\n\t var newLine = remainingLines.shift() || \"\";\n\t return lineContents + newLine;\n\t };\n\t\n\t // We need to remember the position of \"remainingLines\"\n\t var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\t\n\t // The generate SourceNodes we need a code range.\n\t // To extract it current and last mapping is used.\n\t // Here we store the last mapping.\n\t var lastMapping = null;\n\t\n\t aSourceMapConsumer.eachMapping(function (mapping) {\n\t if (lastMapping !== null) {\n\t // We add the code from \"lastMapping\" to \"mapping\":\n\t // First check if there is a new line in between.\n\t if (lastGeneratedLine < mapping.generatedLine) {\n\t // Associate first line with \"lastMapping\"\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t lastGeneratedLine++;\n\t lastGeneratedColumn = 0;\n\t // The remaining code is added without mapping\n\t } else {\n\t // There is no new line in between.\n\t // Associate the code between \"lastGeneratedColumn\" and\n\t // \"mapping.generatedColumn\" with \"lastMapping\"\n\t var nextLine = remainingLines[0];\n\t var code = nextLine.substr(0, mapping.generatedColumn -\n\t lastGeneratedColumn);\n\t remainingLines[0] = nextLine.substr(mapping.generatedColumn -\n\t lastGeneratedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t addMappingWithCode(lastMapping, code);\n\t // No more remaining code, continue\n\t lastMapping = mapping;\n\t return;\n\t }\n\t }\n\t // We add the generated code until the first mapping\n\t // to the SourceNode without any mapping.\n\t // Each line is added as separate string.\n\t while (lastGeneratedLine < mapping.generatedLine) {\n\t node.add(shiftNextLine());\n\t lastGeneratedLine++;\n\t }\n\t if (lastGeneratedColumn < mapping.generatedColumn) {\n\t var nextLine = remainingLines[0];\n\t node.add(nextLine.substr(0, mapping.generatedColumn));\n\t remainingLines[0] = nextLine.substr(mapping.generatedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t }\n\t lastMapping = mapping;\n\t }, this);\n\t // We have processed all mappings.\n\t if (remainingLines.length > 0) {\n\t if (lastMapping) {\n\t // Associate the remaining code in the current line with \"lastMapping\"\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t }\n\t // and add the remaining lines without any mapping\n\t node.add(remainingLines.join(\"\"));\n\t }\n\t\n\t // Copy sourcesContent into SourceNode\n\t aSourceMapConsumer.sources.forEach(function (sourceFile) {\n\t var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n\t if (content != null) {\n\t if (aRelativePath != null) {\n\t sourceFile = util.join(aRelativePath, sourceFile);\n\t }\n\t node.setSourceContent(sourceFile, content);\n\t }\n\t });\n\t\n\t return node;\n\t\n\t function addMappingWithCode(mapping, code) {\n\t if (mapping === null || mapping.source === undefined) {\n\t node.add(code);\n\t } else {\n\t var source = aRelativePath\n\t ? util.join(aRelativePath, mapping.source)\n\t : mapping.source;\n\t node.add(new SourceNode(mapping.originalLine,\n\t mapping.originalColumn,\n\t source,\n\t code,\n\t mapping.name));\n\t }\n\t }\n\t };\n\t\n\t/**\n\t * Add a chunk of generated JS to this source node.\n\t *\n\t * @param aChunk A string snippet of generated JS code, another instance of\n\t * SourceNode, or an array where each member is one of those things.\n\t */\n\tSourceNode.prototype.add = function SourceNode_add(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t aChunk.forEach(function (chunk) {\n\t this.add(chunk);\n\t }, this);\n\t }\n\t else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t if (aChunk) {\n\t this.children.push(aChunk);\n\t }\n\t }\n\t else {\n\t throw new TypeError(\n\t \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n\t );\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Add a chunk of generated JS to the beginning of this source node.\n\t *\n\t * @param aChunk A string snippet of generated JS code, another instance of\n\t * SourceNode, or an array where each member is one of those things.\n\t */\n\tSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t for (var i = aChunk.length-1; i >= 0; i--) {\n\t this.prepend(aChunk[i]);\n\t }\n\t }\n\t else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t this.children.unshift(aChunk);\n\t }\n\t else {\n\t throw new TypeError(\n\t \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n\t );\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Walk over the tree of JS snippets in this node and its children. The\n\t * walking function is called once for each snippet of JS and is passed that\n\t * snippet and the its original associated source's line/column location.\n\t *\n\t * @param aFn The traversal function.\n\t */\n\tSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n\t var chunk;\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t chunk = this.children[i];\n\t if (chunk[isSourceNode]) {\n\t chunk.walk(aFn);\n\t }\n\t else {\n\t if (chunk !== '') {\n\t aFn(chunk, { source: this.source,\n\t line: this.line,\n\t column: this.column,\n\t name: this.name });\n\t }\n\t }\n\t }\n\t};\n\t\n\t/**\n\t * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n\t * each of `this.children`.\n\t *\n\t * @param aSep The separator.\n\t */\n\tSourceNode.prototype.join = function SourceNode_join(aSep) {\n\t var newChildren;\n\t var i;\n\t var len = this.children.length;\n\t if (len > 0) {\n\t newChildren = [];\n\t for (i = 0; i < len-1; i++) {\n\t newChildren.push(this.children[i]);\n\t newChildren.push(aSep);\n\t }\n\t newChildren.push(this.children[i]);\n\t this.children = newChildren;\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Call String.prototype.replace on the very right-most source snippet. Useful\n\t * for trimming whitespace from the end of a source node, etc.\n\t *\n\t * @param aPattern The pattern to replace.\n\t * @param aReplacement The thing to replace the pattern with.\n\t */\n\tSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n\t var lastChild = this.children[this.children.length - 1];\n\t if (lastChild[isSourceNode]) {\n\t lastChild.replaceRight(aPattern, aReplacement);\n\t }\n\t else if (typeof lastChild === 'string') {\n\t this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n\t }\n\t else {\n\t this.children.push(''.replace(aPattern, aReplacement));\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Set the source content for a source file. This will be added to the SourceMapGenerator\n\t * in the sourcesContent field.\n\t *\n\t * @param aSourceFile The filename of the source file\n\t * @param aSourceContent The content of the source file\n\t */\n\tSourceNode.prototype.setSourceContent =\n\t function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n\t this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n\t };\n\t\n\t/**\n\t * Walk over the tree of SourceNodes. The walking function is called for each\n\t * source file content and is passed the filename and source content.\n\t *\n\t * @param aFn The traversal function.\n\t */\n\tSourceNode.prototype.walkSourceContents =\n\t function SourceNode_walkSourceContents(aFn) {\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t if (this.children[i][isSourceNode]) {\n\t this.children[i].walkSourceContents(aFn);\n\t }\n\t }\n\t\n\t var sources = Object.keys(this.sourceContents);\n\t for (var i = 0, len = sources.length; i < len; i++) {\n\t aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n\t }\n\t };\n\t\n\t/**\n\t * Return the string representation of this source node. Walks over the tree\n\t * and concatenates all the various snippets together to one string.\n\t */\n\tSourceNode.prototype.toString = function SourceNode_toString() {\n\t var str = \"\";\n\t this.walk(function (chunk) {\n\t str += chunk;\n\t });\n\t return str;\n\t};\n\t\n\t/**\n\t * Returns the string representation of this source node along with a source\n\t * map.\n\t */\n\tSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n\t var generated = {\n\t code: \"\",\n\t line: 1,\n\t column: 0\n\t };\n\t var map = new SourceMapGenerator(aArgs);\n\t var sourceMappingActive = false;\n\t var lastOriginalSource = null;\n\t var lastOriginalLine = null;\n\t var lastOriginalColumn = null;\n\t var lastOriginalName = null;\n\t this.walk(function (chunk, original) {\n\t generated.code += chunk;\n\t if (original.source !== null\n\t && original.line !== null\n\t && original.column !== null) {\n\t if(lastOriginalSource !== original.source\n\t || lastOriginalLine !== original.line\n\t || lastOriginalColumn !== original.column\n\t || lastOriginalName !== original.name) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\t lastOriginalSource = original.source;\n\t lastOriginalLine = original.line;\n\t lastOriginalColumn = original.column;\n\t lastOriginalName = original.name;\n\t sourceMappingActive = true;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t }\n\t });\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t }\n\t for (var idx = 0, length = chunk.length; idx < length; idx++) {\n\t if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n\t generated.line++;\n\t generated.column = 0;\n\t // Mappings end at eol\n\t if (idx + 1 === length) {\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\t } else {\n\t generated.column++;\n\t }\n\t }\n\t });\n\t this.walkSourceContents(function (sourceFile, sourceContent) {\n\t map.setSourceContent(sourceFile, sourceContent);\n\t });\n\t\n\t return { code: generated.code, map: map };\n\t};\n\t\n\texports.SourceNode = SourceNode;\n\n\n/***/ }\n/******/ ])\n});\n;\n\n\n/** WEBPACK FOOTER **\n ** source-map.min.js\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 5d9a9f4df3bd553ed2f9\n **/","/*\n * Copyright 2009-2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE.txt or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\nexports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator;\nexports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer;\nexports.SourceNode = require('./lib/source-node').SourceNode;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./source-map.js\n ** module id = 0\n ** module chunks = 0\n **/","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar base64VLQ = require('./base64-vlq');\nvar util = require('./util');\nvar ArraySet = require('./array-set').ArraySet;\nvar MappingList = require('./mapping-list').MappingList;\n\n/**\n * An instance of the SourceMapGenerator represents a source map which is\n * being built incrementally. You may pass an object with the following\n * properties:\n *\n * - file: The filename of the generated source.\n * - sourceRoot: A root for all relative URLs in this source map.\n */\nfunction SourceMapGenerator(aArgs) {\n if (!aArgs) {\n aArgs = {};\n }\n this._file = util.getArg(aArgs, 'file', null);\n this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);\n this._skipValidation = util.getArg(aArgs, 'skipValidation', false);\n this._sources = new ArraySet();\n this._names = new ArraySet();\n this._mappings = new MappingList();\n this._sourcesContents = null;\n}\n\nSourceMapGenerator.prototype._version = 3;\n\n/**\n * Creates a new SourceMapGenerator based on a SourceMapConsumer\n *\n * @param aSourceMapConsumer The SourceMap.\n */\nSourceMapGenerator.fromSourceMap =\n function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {\n var sourceRoot = aSourceMapConsumer.sourceRoot;\n var generator = new SourceMapGenerator({\n file: aSourceMapConsumer.file,\n sourceRoot: sourceRoot\n });\n aSourceMapConsumer.eachMapping(function (mapping) {\n var newMapping = {\n generated: {\n line: mapping.generatedLine,\n column: mapping.generatedColumn\n }\n };\n\n if (mapping.source != null) {\n newMapping.source = mapping.source;\n if (sourceRoot != null) {\n newMapping.source = util.relative(sourceRoot, newMapping.source);\n }\n\n newMapping.original = {\n line: mapping.originalLine,\n column: mapping.originalColumn\n };\n\n if (mapping.name != null) {\n newMapping.name = mapping.name;\n }\n }\n\n generator.addMapping(newMapping);\n });\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n generator.setSourceContent(sourceFile, content);\n }\n });\n return generator;\n };\n\n/**\n * Add a single mapping from original source line and column to the generated\n * source's line and column for this source map being created. The mapping\n * object should have the following properties:\n *\n * - generated: An object with the generated line and column positions.\n * - original: An object with the original line and column positions.\n * - source: The original source file (relative to the sourceRoot).\n * - name: An optional original token name for this mapping.\n */\nSourceMapGenerator.prototype.addMapping =\n function SourceMapGenerator_addMapping(aArgs) {\n var generated = util.getArg(aArgs, 'generated');\n var original = util.getArg(aArgs, 'original', null);\n var source = util.getArg(aArgs, 'source', null);\n var name = util.getArg(aArgs, 'name', null);\n\n if (!this._skipValidation) {\n this._validateMapping(generated, original, source, name);\n }\n\n if (source != null) {\n source = String(source);\n if (!this._sources.has(source)) {\n this._sources.add(source);\n }\n }\n\n if (name != null) {\n name = String(name);\n if (!this._names.has(name)) {\n this._names.add(name);\n }\n }\n\n this._mappings.add({\n generatedLine: generated.line,\n generatedColumn: generated.column,\n originalLine: original != null && original.line,\n originalColumn: original != null && original.column,\n source: source,\n name: name\n });\n };\n\n/**\n * Set the source content for a source file.\n */\nSourceMapGenerator.prototype.setSourceContent =\n function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {\n var source = aSourceFile;\n if (this._sourceRoot != null) {\n source = util.relative(this._sourceRoot, source);\n }\n\n if (aSourceContent != null) {\n // Add the source content to the _sourcesContents map.\n // Create a new _sourcesContents map if the property is null.\n if (!this._sourcesContents) {\n this._sourcesContents = Object.create(null);\n }\n this._sourcesContents[util.toSetString(source)] = aSourceContent;\n } else if (this._sourcesContents) {\n // Remove the source file from the _sourcesContents map.\n // If the _sourcesContents map is empty, set the property to null.\n delete this._sourcesContents[util.toSetString(source)];\n if (Object.keys(this._sourcesContents).length === 0) {\n this._sourcesContents = null;\n }\n }\n };\n\n/**\n * Applies the mappings of a sub-source-map for a specific source file to the\n * source map being generated. Each mapping to the supplied source file is\n * rewritten using the supplied source map. Note: The resolution for the\n * resulting mappings is the minimium of this map and the supplied map.\n *\n * @param aSourceMapConsumer The source map to be applied.\n * @param aSourceFile Optional. The filename of the source file.\n * If omitted, SourceMapConsumer's file property will be used.\n * @param aSourceMapPath Optional. The dirname of the path to the source map\n * to be applied. If relative, it is relative to the SourceMapConsumer.\n * This parameter is needed when the two source maps aren't in the same\n * directory, and the source map to be applied contains relative source\n * paths. If so, those relative source paths need to be rewritten\n * relative to the SourceMapGenerator.\n */\nSourceMapGenerator.prototype.applySourceMap =\n function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {\n var sourceFile = aSourceFile;\n // If aSourceFile is omitted, we will use the file property of the SourceMap\n if (aSourceFile == null) {\n if (aSourceMapConsumer.file == null) {\n throw new Error(\n 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +\n 'or the source map\\'s \"file\" property. Both were omitted.'\n );\n }\n sourceFile = aSourceMapConsumer.file;\n }\n var sourceRoot = this._sourceRoot;\n // Make \"sourceFile\" relative if an absolute Url is passed.\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n // Applying the SourceMap can add and remove items from the sources and\n // the names array.\n var newSources = new ArraySet();\n var newNames = new ArraySet();\n\n // Find mappings for the \"sourceFile\"\n this._mappings.unsortedForEach(function (mapping) {\n if (mapping.source === sourceFile && mapping.originalLine != null) {\n // Check if it can be mapped by the source map, then update the mapping.\n var original = aSourceMapConsumer.originalPositionFor({\n line: mapping.originalLine,\n column: mapping.originalColumn\n });\n if (original.source != null) {\n // Copy mapping\n mapping.source = original.source;\n if (aSourceMapPath != null) {\n mapping.source = util.join(aSourceMapPath, mapping.source)\n }\n if (sourceRoot != null) {\n mapping.source = util.relative(sourceRoot, mapping.source);\n }\n mapping.originalLine = original.line;\n mapping.originalColumn = original.column;\n if (original.name != null) {\n mapping.name = original.name;\n }\n }\n }\n\n var source = mapping.source;\n if (source != null && !newSources.has(source)) {\n newSources.add(source);\n }\n\n var name = mapping.name;\n if (name != null && !newNames.has(name)) {\n newNames.add(name);\n }\n\n }, this);\n this._sources = newSources;\n this._names = newNames;\n\n // Copy sourcesContents of applied map.\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aSourceMapPath != null) {\n sourceFile = util.join(aSourceMapPath, sourceFile);\n }\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n this.setSourceContent(sourceFile, content);\n }\n }, this);\n };\n\n/**\n * A mapping can have one of the three levels of data:\n *\n * 1. Just the generated position.\n * 2. The Generated position, original position, and original source.\n * 3. Generated and original position, original source, as well as a name\n * token.\n *\n * To maintain consistency, we validate that any new mapping being added falls\n * in to one of these categories.\n */\nSourceMapGenerator.prototype._validateMapping =\n function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,\n aName) {\n if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aGenerated.line > 0 && aGenerated.column >= 0\n && !aOriginal && !aSource && !aName) {\n // Case 1.\n return;\n }\n else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n && aGenerated.line > 0 && aGenerated.column >= 0\n && aOriginal.line > 0 && aOriginal.column >= 0\n && aSource) {\n // Cases 2 and 3.\n return;\n }\n else {\n throw new Error('Invalid mapping: ' + JSON.stringify({\n generated: aGenerated,\n source: aSource,\n original: aOriginal,\n name: aName\n }));\n }\n };\n\n/**\n * Serialize the accumulated mappings in to the stream of base 64 VLQs\n * specified by the source map format.\n */\nSourceMapGenerator.prototype._serializeMappings =\n function SourceMapGenerator_serializeMappings() {\n var previousGeneratedColumn = 0;\n var previousGeneratedLine = 1;\n var previousOriginalColumn = 0;\n var previousOriginalLine = 0;\n var previousName = 0;\n var previousSource = 0;\n var result = '';\n var next;\n var mapping;\n var nameIdx;\n var sourceIdx;\n\n var mappings = this._mappings.toArray();\n for (var i = 0, len = mappings.length; i < len; i++) {\n mapping = mappings[i];\n next = ''\n\n if (mapping.generatedLine !== previousGeneratedLine) {\n previousGeneratedColumn = 0;\n while (mapping.generatedLine !== previousGeneratedLine) {\n next += ';';\n previousGeneratedLine++;\n }\n }\n else {\n if (i > 0) {\n if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n continue;\n }\n next += ',';\n }\n }\n\n next += base64VLQ.encode(mapping.generatedColumn\n - previousGeneratedColumn);\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (mapping.source != null) {\n sourceIdx = this._sources.indexOf(mapping.source);\n next += base64VLQ.encode(sourceIdx - previousSource);\n previousSource = sourceIdx;\n\n // lines are stored 0-based in SourceMap spec version 3\n next += base64VLQ.encode(mapping.originalLine - 1\n - previousOriginalLine);\n previousOriginalLine = mapping.originalLine - 1;\n\n next += base64VLQ.encode(mapping.originalColumn\n - previousOriginalColumn);\n previousOriginalColumn = mapping.originalColumn;\n\n if (mapping.name != null) {\n nameIdx = this._names.indexOf(mapping.name);\n next += base64VLQ.encode(nameIdx - previousName);\n previousName = nameIdx;\n }\n }\n\n result += next;\n }\n\n return result;\n };\n\nSourceMapGenerator.prototype._generateSourcesContent =\n function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n return aSources.map(function (source) {\n if (!this._sourcesContents) {\n return null;\n }\n if (aSourceRoot != null) {\n source = util.relative(aSourceRoot, source);\n }\n var key = util.toSetString(source);\n return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n ? this._sourcesContents[key]\n : null;\n }, this);\n };\n\n/**\n * Externalize the source map.\n */\nSourceMapGenerator.prototype.toJSON =\n function SourceMapGenerator_toJSON() {\n var map = {\n version: this._version,\n sources: this._sources.toArray(),\n names: this._names.toArray(),\n mappings: this._serializeMappings()\n };\n if (this._file != null) {\n map.file = this._file;\n }\n if (this._sourceRoot != null) {\n map.sourceRoot = this._sourceRoot;\n }\n if (this._sourcesContents) {\n map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n }\n\n return map;\n };\n\n/**\n * Render the source map being generated to a string.\n */\nSourceMapGenerator.prototype.toString =\n function SourceMapGenerator_toString() {\n return JSON.stringify(this.toJSON());\n };\n\nexports.SourceMapGenerator = SourceMapGenerator;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/source-map-generator.js\n ** module id = 1\n ** module chunks = 0\n **/","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * Based on the Base 64 VLQ implementation in Closure Compiler:\n * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n *\n * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and/or other materials provided\n * with the distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nvar base64 = require('./base64');\n\n// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n// length quantities we use in the source map spec, the first bit is the sign,\n// the next four bits are the actual value, and the 6th bit is the\n// continuation bit. The continuation bit tells us whether there are more\n// digits in this value following this digit.\n//\n// Continuation\n// | Sign\n// | |\n// V V\n// 101011\n\nvar VLQ_BASE_SHIFT = 5;\n\n// binary: 100000\nvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\n// binary: 011111\nvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\n// binary: 100000\nvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\n/**\n * Converts from a two-complement value to a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n */\nfunction toVLQSigned(aValue) {\n return aValue < 0\n ? ((-aValue) << 1) + 1\n : (aValue << 1) + 0;\n}\n\n/**\n * Converts to a two-complement value from a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n */\nfunction fromVLQSigned(aValue) {\n var isNegative = (aValue & 1) === 1;\n var shifted = aValue >> 1;\n return isNegative\n ? -shifted\n : shifted;\n}\n\n/**\n * Returns the base 64 VLQ encoded value.\n */\nexports.encode = function base64VLQ_encode(aValue) {\n var encoded = \"\";\n var digit;\n\n var vlq = toVLQSigned(aValue);\n\n do {\n digit = vlq & VLQ_BASE_MASK;\n vlq >>>= VLQ_BASE_SHIFT;\n if (vlq > 0) {\n // There are still more digits in this value, so we must make sure the\n // continuation bit is marked.\n digit |= VLQ_CONTINUATION_BIT;\n }\n encoded += base64.encode(digit);\n } while (vlq > 0);\n\n return encoded;\n};\n\n/**\n * Decodes the next base 64 VLQ value from the given string and returns the\n * value and the rest of the string via the out parameter.\n */\nexports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n var strLen = aStr.length;\n var result = 0;\n var shift = 0;\n var continuation, digit;\n\n do {\n if (aIndex >= strLen) {\n throw new Error(\"Expected more digits in base 64 VLQ value.\");\n }\n\n digit = base64.decode(aStr.charCodeAt(aIndex++));\n if (digit === -1) {\n throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n }\n\n continuation = !!(digit & VLQ_CONTINUATION_BIT);\n digit &= VLQ_BASE_MASK;\n result = result + (digit << shift);\n shift += VLQ_BASE_SHIFT;\n } while (continuation);\n\n aOutParam.value = fromVLQSigned(result);\n aOutParam.rest = aIndex;\n};\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/base64-vlq.js\n ** module id = 2\n ** module chunks = 0\n **/","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\n/**\n * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n */\nexports.encode = function (number) {\n if (0 <= number && number < intToCharMap.length) {\n return intToCharMap[number];\n }\n throw new TypeError(\"Must be between 0 and 63: \" + number);\n};\n\n/**\n * Decode a single base 64 character code digit to an integer. Returns -1 on\n * failure.\n */\nexports.decode = function (charCode) {\n var bigA = 65; // 'A'\n var bigZ = 90; // 'Z'\n\n var littleA = 97; // 'a'\n var littleZ = 122; // 'z'\n\n var zero = 48; // '0'\n var nine = 57; // '9'\n\n var plus = 43; // '+'\n var slash = 47; // '/'\n\n var littleOffset = 26;\n var numberOffset = 52;\n\n // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n if (bigA <= charCode && charCode <= bigZ) {\n return (charCode - bigA);\n }\n\n // 26 - 51: abcdefghijklmnopqrstuvwxyz\n if (littleA <= charCode && charCode <= littleZ) {\n return (charCode - littleA + littleOffset);\n }\n\n // 52 - 61: 0123456789\n if (zero <= charCode && charCode <= nine) {\n return (charCode - zero + numberOffset);\n }\n\n // 62: +\n if (charCode == plus) {\n return 62;\n }\n\n // 63: /\n if (charCode == slash) {\n return 63;\n }\n\n // Invalid base64 digit.\n return -1;\n};\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/base64.js\n ** module id = 3\n ** module chunks = 0\n **/","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n/**\n * This is a helper function for getting values from parameter/options\n * objects.\n *\n * @param args The object we are extracting values from\n * @param name The name of the property we are getting.\n * @param defaultValue An optional value to return if the property is missing\n * from the object. If this is not specified and the property is missing, an\n * error will be thrown.\n */\nfunction getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}\nexports.getArg = getArg;\n\nvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.]*)(?::(\\d+))?(\\S*)$/;\nvar dataUrlRegexp = /^data:.+\\,.+$/;\n\nfunction urlParse(aUrl) {\n var match = aUrl.match(urlRegexp);\n if (!match) {\n return null;\n }\n return {\n scheme: match[1],\n auth: match[2],\n host: match[3],\n port: match[4],\n path: match[5]\n };\n}\nexports.urlParse = urlParse;\n\nfunction urlGenerate(aParsedUrl) {\n var url = '';\n if (aParsedUrl.scheme) {\n url += aParsedUrl.scheme + ':';\n }\n url += '//';\n if (aParsedUrl.auth) {\n url += aParsedUrl.auth + '@';\n }\n if (aParsedUrl.host) {\n url += aParsedUrl.host;\n }\n if (aParsedUrl.port) {\n url += \":\" + aParsedUrl.port\n }\n if (aParsedUrl.path) {\n url += aParsedUrl.path;\n }\n return url;\n}\nexports.urlGenerate = urlGenerate;\n\n/**\n * Normalizes a path, or the path portion of a URL:\n *\n * - Replaces consequtive slashes with one slash.\n * - Removes unnecessary '.' parts.\n * - Removes unnecessary '/..' parts.\n *\n * Based on code in the Node.js 'path' core module.\n *\n * @param aPath The path or url to normalize.\n */\nfunction normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}\nexports.normalize = normalize;\n\n/**\n * Joins two paths/URLs.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be joined with the root.\n *\n * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n * first.\n * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n * is updated with the result and aRoot is returned. Otherwise the result\n * is returned.\n * - If aPath is absolute, the result is aPath.\n * - Otherwise the two paths are joined with a slash.\n * - Joining for example 'http://' and 'www.example.com' is also supported.\n */\nfunction join(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n if (aPath === \"\") {\n aPath = \".\";\n }\n var aPathUrl = urlParse(aPath);\n var aRootUrl = urlParse(aRoot);\n if (aRootUrl) {\n aRoot = aRootUrl.path || '/';\n }\n\n // `join(foo, '//www.example.org')`\n if (aPathUrl && !aPathUrl.scheme) {\n if (aRootUrl) {\n aPathUrl.scheme = aRootUrl.scheme;\n }\n return urlGenerate(aPathUrl);\n }\n\n if (aPathUrl || aPath.match(dataUrlRegexp)) {\n return aPath;\n }\n\n // `join('http://', 'www.example.com')`\n if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n aRootUrl.host = aPath;\n return urlGenerate(aRootUrl);\n }\n\n var joined = aPath.charAt(0) === '/'\n ? aPath\n : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\n if (aRootUrl) {\n aRootUrl.path = joined;\n return urlGenerate(aRootUrl);\n }\n return joined;\n}\nexports.join = join;\n\nexports.isAbsolute = function (aPath) {\n return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);\n};\n\n/**\n * Make a path relative to a URL or another path.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be made relative to aRoot.\n */\nfunction relative(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n\n aRoot = aRoot.replace(/\\/$/, '');\n\n // It is possible for the path to be above the root. In this case, simply\n // checking whether the root is a prefix of the path won't work. Instead, we\n // need to remove components from the root one by one, until either we find\n // a prefix that fits, or we run out of components to remove.\n var level = 0;\n while (aPath.indexOf(aRoot + '/') !== 0) {\n var index = aRoot.lastIndexOf(\"/\");\n if (index < 0) {\n return aPath;\n }\n\n // If the only part of the root that is left is the scheme (i.e. http://,\n // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n // have exhausted all components, so the path is not relative to the root.\n aRoot = aRoot.slice(0, index);\n if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n return aPath;\n }\n\n ++level;\n }\n\n // Make sure we add a \"../\" for each component we removed from the root.\n return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n}\nexports.relative = relative;\n\nvar supportsNullProto = (function () {\n var obj = Object.create(null);\n return !('__proto__' in obj);\n}());\n\nfunction identity (s) {\n return s;\n}\n\n/**\n * Because behavior goes wacky when you set `__proto__` on objects, we\n * have to prefix all the strings in our set with an arbitrary character.\n *\n * See https://github.com/mozilla/source-map/pull/31 and\n * https://github.com/mozilla/source-map/issues/30\n *\n * @param String aStr\n */\nfunction toSetString(aStr) {\n if (isProtoString(aStr)) {\n return '$' + aStr;\n }\n\n return aStr;\n}\nexports.toSetString = supportsNullProto ? identity : toSetString;\n\nfunction fromSetString(aStr) {\n if (isProtoString(aStr)) {\n return aStr.slice(1);\n }\n\n return aStr;\n}\nexports.fromSetString = supportsNullProto ? identity : fromSetString;\n\nfunction isProtoString(s) {\n if (!s) {\n return false;\n }\n\n var length = s.length;\n\n if (length < 9 /* \"__proto__\".length */) {\n return false;\n }\n\n if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n s.charCodeAt(length - 9) !== 95 /* '_' */) {\n return false;\n }\n\n for (var i = length - 10; i >= 0; i--) {\n if (s.charCodeAt(i) !== 36 /* '$' */) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Comparator between two mappings where the original positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same original source/line/column, but different generated\n * line and column the same. Useful when searching for a mapping with a\n * stubbed out mapping.\n */\nfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n var cmp = mappingA.source - mappingB.source;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0 || onlyCompareOriginal) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n return mappingA.name - mappingB.name;\n}\nexports.compareByOriginalPositions = compareByOriginalPositions;\n\n/**\n * Comparator between two mappings with deflated source and name indices where\n * the generated positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same generated line and column, but different\n * source/name/original line and column the same. Useful when searching for a\n * mapping with a stubbed out mapping.\n */\nfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0 || onlyCompareGenerated) {\n return cmp;\n }\n\n cmp = mappingA.source - mappingB.source;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return mappingA.name - mappingB.name;\n}\nexports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\nfunction strcmp(aStr1, aStr2) {\n if (aStr1 === aStr2) {\n return 0;\n }\n\n if (aStr1 > aStr2) {\n return 1;\n }\n\n return -1;\n}\n\n/**\n * Comparator between two mappings with inflated source and name strings where\n * the generated positions are compared.\n */\nfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/util.js\n ** module id = 4\n ** module chunks = 0\n **/","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar has = Object.prototype.hasOwnProperty;\n\n/**\n * A data structure which is a combination of an array and a set. Adding a new\n * member is O(1), testing for membership is O(1), and finding the index of an\n * element is O(1). Removing elements from the set is not supported. Only\n * strings are supported for membership.\n */\nfunction ArraySet() {\n this._array = [];\n this._set = Object.create(null);\n}\n\n/**\n * Static method for creating ArraySet instances from an existing array.\n */\nArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n var set = new ArraySet();\n for (var i = 0, len = aArray.length; i < len; i++) {\n set.add(aArray[i], aAllowDuplicates);\n }\n return set;\n};\n\n/**\n * Return how many unique items are in this ArraySet. If duplicates have been\n * added, than those do not count towards the size.\n *\n * @returns Number\n */\nArraySet.prototype.size = function ArraySet_size() {\n return Object.getOwnPropertyNames(this._set).length;\n};\n\n/**\n * Add the given string to this set.\n *\n * @param String aStr\n */\nArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n var sStr = util.toSetString(aStr);\n var isDuplicate = has.call(this._set, sStr);\n var idx = this._array.length;\n if (!isDuplicate || aAllowDuplicates) {\n this._array.push(aStr);\n }\n if (!isDuplicate) {\n this._set[sStr] = idx;\n }\n};\n\n/**\n * Is the given string a member of this set?\n *\n * @param String aStr\n */\nArraySet.prototype.has = function ArraySet_has(aStr) {\n var sStr = util.toSetString(aStr);\n return has.call(this._set, sStr);\n};\n\n/**\n * What is the index of the given string in the array?\n *\n * @param String aStr\n */\nArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n var sStr = util.toSetString(aStr);\n if (has.call(this._set, sStr)) {\n return this._set[sStr];\n }\n throw new Error('\"' + aStr + '\" is not in the set.');\n};\n\n/**\n * What is the element at the given index?\n *\n * @param Number aIdx\n */\nArraySet.prototype.at = function ArraySet_at(aIdx) {\n if (aIdx >= 0 && aIdx < this._array.length) {\n return this._array[aIdx];\n }\n throw new Error('No element indexed by ' + aIdx);\n};\n\n/**\n * Returns the array representation of this set (which has the proper indices\n * indicated by indexOf). Note that this is a copy of the internal array used\n * for storing the members so that no one can mess with internal state.\n */\nArraySet.prototype.toArray = function ArraySet_toArray() {\n return this._array.slice();\n};\n\nexports.ArraySet = ArraySet;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/array-set.js\n ** module id = 5\n ** module chunks = 0\n **/","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2014 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\n\n/**\n * Determine whether mappingB is after mappingA with respect to generated\n * position.\n */\nfunction generatedPositionAfter(mappingA, mappingB) {\n // Optimized for most common case\n var lineA = mappingA.generatedLine;\n var lineB = mappingB.generatedLine;\n var columnA = mappingA.generatedColumn;\n var columnB = mappingB.generatedColumn;\n return lineB > lineA || lineB == lineA && columnB >= columnA ||\n util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n}\n\n/**\n * A data structure to provide a sorted view of accumulated mappings in a\n * performance conscious manner. It trades a neglibable overhead in general\n * case for a large speedup in case of mappings being added in order.\n */\nfunction MappingList() {\n this._array = [];\n this._sorted = true;\n // Serves as infimum\n this._last = {generatedLine: -1, generatedColumn: 0};\n}\n\n/**\n * Iterate through internal items. This method takes the same arguments that\n * `Array.prototype.forEach` takes.\n *\n * NOTE: The order of the mappings is NOT guaranteed.\n */\nMappingList.prototype.unsortedForEach =\n function MappingList_forEach(aCallback, aThisArg) {\n this._array.forEach(aCallback, aThisArg);\n };\n\n/**\n * Add the given source mapping.\n *\n * @param Object aMapping\n */\nMappingList.prototype.add = function MappingList_add(aMapping) {\n if (generatedPositionAfter(this._last, aMapping)) {\n this._last = aMapping;\n this._array.push(aMapping);\n } else {\n this._sorted = false;\n this._array.push(aMapping);\n }\n};\n\n/**\n * Returns the flat, sorted array of mappings. The mappings are sorted by\n * generated position.\n *\n * WARNING: This method returns internal data without copying, for\n * performance. The return value must NOT be mutated, and should be treated as\n * an immutable borrow. If you want to take ownership, you must make your own\n * copy.\n */\nMappingList.prototype.toArray = function MappingList_toArray() {\n if (!this._sorted) {\n this._array.sort(util.compareByGeneratedPositionsInflated);\n this._sorted = true;\n }\n return this._array;\n};\n\nexports.MappingList = MappingList;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/mapping-list.js\n ** module id = 6\n ** module chunks = 0\n **/","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar binarySearch = require('./binary-search');\nvar ArraySet = require('./array-set').ArraySet;\nvar base64VLQ = require('./base64-vlq');\nvar quickSort = require('./quick-sort').quickSort;\n\nfunction SourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n return sourceMap.sections != null\n ? new IndexedSourceMapConsumer(sourceMap)\n : new BasicSourceMapConsumer(sourceMap);\n}\n\nSourceMapConsumer.fromSourceMap = function(aSourceMap) {\n return BasicSourceMapConsumer.fromSourceMap(aSourceMap);\n}\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nSourceMapConsumer.prototype._version = 3;\n\n// `__generatedMappings` and `__originalMappings` are arrays that hold the\n// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n// are lazily instantiated, accessed via the `_generatedMappings` and\n// `_originalMappings` getters respectively, and we only parse the mappings\n// and create these arrays once queried for a source location. We jump through\n// these hoops because there can be many thousands of mappings, and parsing\n// them is expensive, so we only want to do it if we must.\n//\n// Each object in the arrays is of the form:\n//\n// {\n// generatedLine: The line number in the generated code,\n// generatedColumn: The column number in the generated code,\n// source: The path to the original source file that generated this\n// chunk of code,\n// originalLine: The line number in the original source that\n// corresponds to this chunk of generated code,\n// originalColumn: The column number in the original source that\n// corresponds to this chunk of generated code,\n// name: The name of the original symbol which generated this chunk of\n// code.\n// }\n//\n// All properties except for `generatedLine` and `generatedColumn` can be\n// `null`.\n//\n// `_generatedMappings` is ordered by the generated positions.\n//\n// `_originalMappings` is ordered by the original positions.\n\nSourceMapConsumer.prototype.__generatedMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n get: function () {\n if (!this.__generatedMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__generatedMappings;\n }\n});\n\nSourceMapConsumer.prototype.__originalMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n get: function () {\n if (!this.__originalMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__originalMappings;\n }\n});\n\nSourceMapConsumer.prototype._charIsMappingSeparator =\n function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n var c = aStr.charAt(index);\n return c === \";\" || c === \",\";\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n throw new Error(\"Subclasses must implement _parseMappings\");\n };\n\nSourceMapConsumer.GENERATED_ORDER = 1;\nSourceMapConsumer.ORIGINAL_ORDER = 2;\n\nSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\nSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\n/**\n * Iterate over each mapping between an original source/line/column and a\n * generated line/column in this source map.\n *\n * @param Function aCallback\n * The function that is called with each mapping.\n * @param Object aContext\n * Optional. If specified, this object will be the value of `this` every\n * time that `aCallback` is called.\n * @param aOrder\n * Either `SourceMapConsumer.GENERATED_ORDER` or\n * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n * iterate over the mappings sorted by the generated file's line/column\n * order or the original's source/line/column order, respectively. Defaults to\n * `SourceMapConsumer.GENERATED_ORDER`.\n */\nSourceMapConsumer.prototype.eachMapping =\n function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n var context = aContext || null;\n var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\n var mappings;\n switch (order) {\n case SourceMapConsumer.GENERATED_ORDER:\n mappings = this._generatedMappings;\n break;\n case SourceMapConsumer.ORIGINAL_ORDER:\n mappings = this._originalMappings;\n break;\n default:\n throw new Error(\"Unknown order of iteration.\");\n }\n\n var sourceRoot = this.sourceRoot;\n mappings.map(function (mapping) {\n var source = mapping.source === null ? null : this._sources.at(mapping.source);\n if (source != null && sourceRoot != null) {\n source = util.join(sourceRoot, source);\n }\n return {\n source: source,\n generatedLine: mapping.generatedLine,\n generatedColumn: mapping.generatedColumn,\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: mapping.name === null ? null : this._names.at(mapping.name)\n };\n }, this).forEach(aCallback, context);\n };\n\n/**\n * Returns all generated line and column information for the original source,\n * line, and column provided. If no column is provided, returns all mappings\n * corresponding to a either the line we are searching for or the next\n * closest line that has any mappings. Otherwise, returns all mappings\n * corresponding to the given line and either the column we are searching for\n * or the next closest column that has any offsets.\n *\n * The only argument is an object with the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: Optional. the column number in the original source.\n *\n * and an array of objects is returned, each with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nSourceMapConsumer.prototype.allGeneratedPositionsFor =\n function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n var line = util.getArg(aArgs, 'line');\n\n // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n // returns the index of the closest mapping less than the needle. By\n // setting needle.originalColumn to 0, we thus find the last mapping for\n // the given line, provided such a mapping exists.\n var needle = {\n source: util.getArg(aArgs, 'source'),\n originalLine: line,\n originalColumn: util.getArg(aArgs, 'column', 0)\n };\n\n if (this.sourceRoot != null) {\n needle.source = util.relative(this.sourceRoot, needle.source);\n }\n if (!this._sources.has(needle.source)) {\n return [];\n }\n needle.source = this._sources.indexOf(needle.source);\n\n var mappings = [];\n\n var index = this._findMapping(needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n binarySearch.LEAST_UPPER_BOUND);\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (aArgs.column === undefined) {\n var originalLine = mapping.originalLine;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we found. Since\n // mappings are sorted, this is guaranteed to find all mappings for\n // the line we found.\n while (mapping && mapping.originalLine === originalLine) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n } else {\n var originalColumn = mapping.originalColumn;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we were searching for.\n // Since mappings are sorted, this is guaranteed to find all mappings for\n // the line we are searching for.\n while (mapping &&\n mapping.originalLine === line &&\n mapping.originalColumn == originalColumn) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n }\n }\n\n return mappings;\n };\n\nexports.SourceMapConsumer = SourceMapConsumer;\n\n/**\n * A BasicSourceMapConsumer instance represents a parsed source map which we can\n * query for information about the original file positions by giving it a file\n * position in the generated source.\n *\n * The only parameter is the raw source map (either as a JSON string, or\n * already parsed to an object). According to the spec, source maps have the\n * following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - sources: An array of URLs to the original source files.\n * - names: An array of identifiers which can be referrenced by individual mappings.\n * - sourceRoot: Optional. The URL root from which all sources are relative.\n * - sourcesContent: Optional. An array of contents of the original source files.\n * - mappings: A string of base64 VLQs which contain the actual mappings.\n * - file: Optional. The generated file this source map is associated with.\n *\n * Here is an example source map, taken from the source map spec[0]:\n *\n * {\n * version : 3,\n * file: \"out.js\",\n * sourceRoot : \"\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AA,AB;;ABCDE;\"\n * }\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n */\nfunction BasicSourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sources = util.getArg(sourceMap, 'sources');\n // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n // requires the array) to play nice here.\n var names = util.getArg(sourceMap, 'names', []);\n var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n var mappings = util.getArg(sourceMap, 'mappings');\n var file = util.getArg(sourceMap, 'file', null);\n\n // Once again, Sass deviates from the spec and supplies the version as a\n // string rather than a number, so we use loose equality checking here.\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n sources = sources\n .map(String)\n // Some source maps produce relative source paths like \"./foo.js\" instead of\n // \"foo.js\". Normalize these first so that future comparisons will succeed.\n // See bugzil.la/1090768.\n .map(util.normalize)\n // Always ensure that absolute sources are internally stored relative to\n // the source root, if the source root is absolute. Not doing this would\n // be particularly problematic when the source root is a prefix of the\n // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n .map(function (source) {\n return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n ? util.relative(sourceRoot, source)\n : source;\n });\n\n // Pass `true` below to allow duplicate names and sources. While source maps\n // are intended to be compressed and deduplicated, the TypeScript compiler\n // sometimes generates source maps with duplicates in them. See Github issue\n // #72 and bugzil.la/889492.\n this._names = ArraySet.fromArray(names.map(String), true);\n this._sources = ArraySet.fromArray(sources, true);\n\n this.sourceRoot = sourceRoot;\n this.sourcesContent = sourcesContent;\n this._mappings = mappings;\n this.file = file;\n}\n\nBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\n/**\n * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n *\n * @param SourceMapGenerator aSourceMap\n * The source map that will be consumed.\n * @returns BasicSourceMapConsumer\n */\nBasicSourceMapConsumer.fromSourceMap =\n function SourceMapConsumer_fromSourceMap(aSourceMap) {\n var smc = Object.create(BasicSourceMapConsumer.prototype);\n\n var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n smc.sourceRoot = aSourceMap._sourceRoot;\n smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n smc.sourceRoot);\n smc.file = aSourceMap._file;\n\n // Because we are modifying the entries (by converting string sources and\n // names to indices into the sources and names ArraySets), we have to make\n // a copy of the entry or else bad things happen. Shared mutable state\n // strikes again! See github issue #191.\n\n var generatedMappings = aSourceMap._mappings.toArray().slice();\n var destGeneratedMappings = smc.__generatedMappings = [];\n var destOriginalMappings = smc.__originalMappings = [];\n\n for (var i = 0, length = generatedMappings.length; i < length; i++) {\n var srcMapping = generatedMappings[i];\n var destMapping = new Mapping;\n destMapping.generatedLine = srcMapping.generatedLine;\n destMapping.generatedColumn = srcMapping.generatedColumn;\n\n if (srcMapping.source) {\n destMapping.source = sources.indexOf(srcMapping.source);\n destMapping.originalLine = srcMapping.originalLine;\n destMapping.originalColumn = srcMapping.originalColumn;\n\n if (srcMapping.name) {\n destMapping.name = names.indexOf(srcMapping.name);\n }\n\n destOriginalMappings.push(destMapping);\n }\n\n destGeneratedMappings.push(destMapping);\n }\n\n quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\n return smc;\n };\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nBasicSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n get: function () {\n return this._sources.toArray().map(function (s) {\n return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;\n }, this);\n }\n});\n\n/**\n * Provide the JIT with a nice shape / hidden class.\n */\nfunction Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nBasicSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n var generatedLine = 1;\n var previousGeneratedColumn = 0;\n var previousOriginalLine = 0;\n var previousOriginalColumn = 0;\n var previousSource = 0;\n var previousName = 0;\n var length = aStr.length;\n var index = 0;\n var cachedSegments = {};\n var temp = {};\n var originalMappings = [];\n var generatedMappings = [];\n var mapping, str, segment, end, value;\n\n while (index < length) {\n if (aStr.charAt(index) === ';') {\n generatedLine++;\n index++;\n previousGeneratedColumn = 0;\n }\n else if (aStr.charAt(index) === ',') {\n index++;\n }\n else {\n mapping = new Mapping();\n mapping.generatedLine = generatedLine;\n\n // Because each offset is encoded relative to the previous one,\n // many segments often have the same encoding. We can exploit this\n // fact by caching the parsed variable length fields of each segment,\n // allowing us to avoid a second parse if we encounter the same\n // segment again.\n for (end = index; end < length; end++) {\n if (this._charIsMappingSeparator(aStr, end)) {\n break;\n }\n }\n str = aStr.slice(index, end);\n\n segment = cachedSegments[str];\n if (segment) {\n index += str.length;\n } else {\n segment = [];\n while (index < end) {\n base64VLQ.decode(aStr, index, temp);\n value = temp.value;\n index = temp.rest;\n segment.push(value);\n }\n\n if (segment.length === 2) {\n throw new Error('Found a source, but no line and column');\n }\n\n if (segment.length === 3) {\n throw new Error('Found a source and line, but no column');\n }\n\n cachedSegments[str] = segment;\n }\n\n // Generated column.\n mapping.generatedColumn = previousGeneratedColumn + segment[0];\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (segment.length > 1) {\n // Original source.\n mapping.source = previousSource + segment[1];\n previousSource += segment[1];\n\n // Original line.\n mapping.originalLine = previousOriginalLine + segment[2];\n previousOriginalLine = mapping.originalLine;\n // Lines are stored 0-based\n mapping.originalLine += 1;\n\n // Original column.\n mapping.originalColumn = previousOriginalColumn + segment[3];\n previousOriginalColumn = mapping.originalColumn;\n\n if (segment.length > 4) {\n // Original name.\n mapping.name = previousName + segment[4];\n previousName += segment[4];\n }\n }\n\n generatedMappings.push(mapping);\n if (typeof mapping.originalLine === 'number') {\n originalMappings.push(mapping);\n }\n }\n }\n\n quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n this.__generatedMappings = generatedMappings;\n\n quickSort(originalMappings, util.compareByOriginalPositions);\n this.__originalMappings = originalMappings;\n };\n\n/**\n * Find the mapping that best matches the hypothetical \"needle\" mapping that\n * we are searching for in the given \"haystack\" of mappings.\n */\nBasicSourceMapConsumer.prototype._findMapping =\n function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n aColumnName, aComparator, aBias) {\n // To return the position we are searching for, we must first find the\n // mapping for the given position and then return the opposite position it\n // points to. Because the mappings are sorted, we can use binary search to\n // find the best mapping.\n\n if (aNeedle[aLineName] <= 0) {\n throw new TypeError('Line must be greater than or equal to 1, got '\n + aNeedle[aLineName]);\n }\n if (aNeedle[aColumnName] < 0) {\n throw new TypeError('Column must be greater than or equal to 0, got '\n + aNeedle[aColumnName]);\n }\n\n return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n };\n\n/**\n * Compute the last column for each generated mapping. The last column is\n * inclusive.\n */\nBasicSourceMapConsumer.prototype.computeColumnSpans =\n function SourceMapConsumer_computeColumnSpans() {\n for (var index = 0; index < this._generatedMappings.length; ++index) {\n var mapping = this._generatedMappings[index];\n\n // Mappings do not contain a field for the last generated columnt. We\n // can come up with an optimistic estimate, however, by assuming that\n // mappings are contiguous (i.e. given two consecutive mappings, the\n // first mapping ends where the second one starts).\n if (index + 1 < this._generatedMappings.length) {\n var nextMapping = this._generatedMappings[index + 1];\n\n if (mapping.generatedLine === nextMapping.generatedLine) {\n mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n continue;\n }\n }\n\n // The last mapping for each line spans the entire line.\n mapping.lastGeneratedColumn = Infinity;\n }\n };\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source.\n * - column: The column number in the generated source.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null.\n * - column: The column number in the original source, or null.\n * - name: The original identifier, or null.\n */\nBasicSourceMapConsumer.prototype.originalPositionFor =\n function SourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._generatedMappings,\n \"generatedLine\",\n \"generatedColumn\",\n util.compareByGeneratedPositionsDeflated,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._generatedMappings[index];\n\n if (mapping.generatedLine === needle.generatedLine) {\n var source = util.getArg(mapping, 'source', null);\n if (source !== null) {\n source = this._sources.at(source);\n if (this.sourceRoot != null) {\n source = util.join(this.sourceRoot, source);\n }\n }\n var name = util.getArg(mapping, 'name', null);\n if (name !== null) {\n name = this._names.at(name);\n }\n return {\n source: source,\n line: util.getArg(mapping, 'originalLine', null),\n column: util.getArg(mapping, 'originalColumn', null),\n name: name\n };\n }\n }\n\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n function BasicSourceMapConsumer_hasContentsOfAllSources() {\n if (!this.sourcesContent) {\n return false;\n }\n return this.sourcesContent.length >= this._sources.size() &&\n !this.sourcesContent.some(function (sc) { return sc == null; });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nBasicSourceMapConsumer.prototype.sourceContentFor =\n function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n if (!this.sourcesContent) {\n return null;\n }\n\n if (this.sourceRoot != null) {\n aSource = util.relative(this.sourceRoot, aSource);\n }\n\n if (this._sources.has(aSource)) {\n return this.sourcesContent[this._sources.indexOf(aSource)];\n }\n\n var url;\n if (this.sourceRoot != null\n && (url = util.urlParse(this.sourceRoot))) {\n // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n // many users. We can help them out when they expect file:// URIs to\n // behave like it would if they were running a local HTTP server. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n var fileUriAbsPath = aSource.replace(/^file:\\/\\//, \"\");\n if (url.scheme == \"file\"\n && this._sources.has(fileUriAbsPath)) {\n return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n }\n\n if ((!url.path || url.path == \"/\")\n && this._sources.has(\"/\" + aSource)) {\n return this.sourcesContent[this._sources.indexOf(\"/\" + aSource)];\n }\n }\n\n // This function is used recursively from\n // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n // don't want to throw if we can't find the source - we just want to\n // return null, so we provide a flag to exit gracefully.\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: The column number in the original source.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nBasicSourceMapConsumer.prototype.generatedPositionFor =\n function SourceMapConsumer_generatedPositionFor(aArgs) {\n var source = util.getArg(aArgs, 'source');\n if (this.sourceRoot != null) {\n source = util.relative(this.sourceRoot, source);\n }\n if (!this._sources.has(source)) {\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n }\n source = this._sources.indexOf(source);\n\n var needle = {\n source: source,\n originalLine: util.getArg(aArgs, 'line'),\n originalColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (mapping.source === needle.source) {\n return {\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n };\n }\n }\n\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n };\n\nexports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\n/**\n * An IndexedSourceMapConsumer instance represents a parsed source map which\n * we can query for information. It differs from BasicSourceMapConsumer in\n * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n * input.\n *\n * The only parameter is a raw source map (either as a JSON string, or already\n * parsed to an object). According to the spec for indexed source maps, they\n * have the following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - file: Optional. The generated file this source map is associated with.\n * - sections: A list of section definitions.\n *\n * Each value under the \"sections\" field has two fields:\n * - offset: The offset into the original specified at which this section\n * begins to apply, defined as an object with a \"line\" and \"column\"\n * field.\n * - map: A source map definition. This source map could also be indexed,\n * but doesn't have to be.\n *\n * Instead of the \"map\" field, it's also possible to have a \"url\" field\n * specifying a URL to retrieve a source map from, but that's currently\n * unsupported.\n *\n * Here's an example source map, taken from the source map spec[0], but\n * modified to omit a section which uses the \"url\" field.\n *\n * {\n * version : 3,\n * file: \"app.js\",\n * sections: [{\n * offset: {line:100, column:10},\n * map: {\n * version : 3,\n * file: \"section.js\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AAAA,E;;ABCDE;\"\n * }\n * }],\n * }\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n */\nfunction IndexedSourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sections = util.getArg(sourceMap, 'sections');\n\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n this._sources = new ArraySet();\n this._names = new ArraySet();\n\n var lastOffset = {\n line: -1,\n column: 0\n };\n this._sections = sections.map(function (s) {\n if (s.url) {\n // The url field will require support for asynchronicity.\n // See https://github.com/mozilla/source-map/issues/16\n throw new Error('Support for url field in sections not implemented.');\n }\n var offset = util.getArg(s, 'offset');\n var offsetLine = util.getArg(offset, 'line');\n var offsetColumn = util.getArg(offset, 'column');\n\n if (offsetLine < lastOffset.line ||\n (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n throw new Error('Section offsets must be ordered and non-overlapping.');\n }\n lastOffset = offset;\n\n return {\n generatedOffset: {\n // The offset fields are 0-based, but we use 1-based indices when\n // encoding/decoding from VLQ.\n generatedLine: offsetLine + 1,\n generatedColumn: offsetColumn + 1\n },\n consumer: new SourceMapConsumer(util.getArg(s, 'map'))\n }\n });\n}\n\nIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nIndexedSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n get: function () {\n var sources = [];\n for (var i = 0; i < this._sections.length; i++) {\n for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n sources.push(this._sections[i].consumer.sources[j]);\n }\n }\n return sources;\n }\n});\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source.\n * - column: The column number in the generated source.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null.\n * - column: The column number in the original source, or null.\n * - name: The original identifier, or null.\n */\nIndexedSourceMapConsumer.prototype.originalPositionFor =\n function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n // Find the section containing the generated position we're trying to map\n // to an original position.\n var sectionIndex = binarySearch.search(needle, this._sections,\n function(needle, section) {\n var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n if (cmp) {\n return cmp;\n }\n\n return (needle.generatedColumn -\n section.generatedOffset.generatedColumn);\n });\n var section = this._sections[sectionIndex];\n\n if (!section) {\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n }\n\n return section.consumer.originalPositionFor({\n line: needle.generatedLine -\n (section.generatedOffset.generatedLine - 1),\n column: needle.generatedColumn -\n (section.generatedOffset.generatedLine === needle.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n bias: aArgs.bias\n });\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n return this._sections.every(function (s) {\n return s.consumer.hasContentsOfAllSources();\n });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nIndexedSourceMapConsumer.prototype.sourceContentFor =\n function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n var content = section.consumer.sourceContentFor(aSource, true);\n if (content) {\n return content;\n }\n }\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: The column number in the original source.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nIndexedSourceMapConsumer.prototype.generatedPositionFor =\n function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n // Only consider this section if the requested source is in the list of\n // sources of the consumer.\n if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {\n continue;\n }\n var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n if (generatedPosition) {\n var ret = {\n line: generatedPosition.line +\n (section.generatedOffset.generatedLine - 1),\n column: generatedPosition.column +\n (section.generatedOffset.generatedLine === generatedPosition.line\n ? section.generatedOffset.generatedColumn - 1\n : 0)\n };\n return ret;\n }\n }\n\n return {\n line: null,\n column: null\n };\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nIndexedSourceMapConsumer.prototype._parseMappings =\n function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n this.__generatedMappings = [];\n this.__originalMappings = [];\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n var sectionMappings = section.consumer._generatedMappings;\n for (var j = 0; j < sectionMappings.length; j++) {\n var mapping = sectionMappings[j];\n\n var source = section.consumer._sources.at(mapping.source);\n if (section.consumer.sourceRoot !== null) {\n source = util.join(section.consumer.sourceRoot, source);\n }\n this._sources.add(source);\n source = this._sources.indexOf(source);\n\n var name = section.consumer._names.at(mapping.name);\n this._names.add(name);\n name = this._names.indexOf(name);\n\n // The mappings coming from the consumer for the section have\n // generated positions relative to the start of the section, so we\n // need to offset them to be relative to the start of the concatenated\n // generated file.\n var adjustedMapping = {\n source: source,\n generatedLine: mapping.generatedLine +\n (section.generatedOffset.generatedLine - 1),\n generatedColumn: mapping.generatedColumn +\n (section.generatedOffset.generatedLine === mapping.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: name\n };\n\n this.__generatedMappings.push(adjustedMapping);\n if (typeof adjustedMapping.originalLine === 'number') {\n this.__originalMappings.push(adjustedMapping);\n }\n }\n }\n\n quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n quickSort(this.__originalMappings, util.compareByOriginalPositions);\n };\n\nexports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/source-map-consumer.js\n ** module id = 7\n ** module chunks = 0\n **/","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nexports.GREATEST_LOWER_BOUND = 1;\nexports.LEAST_UPPER_BOUND = 2;\n\n/**\n * Recursive implementation of binary search.\n *\n * @param aLow Indices here and lower do not contain the needle.\n * @param aHigh Indices here and higher do not contain the needle.\n * @param aNeedle The element being searched for.\n * @param aHaystack The non-empty array being searched.\n * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n */\nfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}\n\n/**\n * This is an implementation of binary search which will always try and return\n * the index of the closest element if there is no exact hit. This is because\n * mappings between original and generated line/col pairs are single points,\n * and there is an implicit region between each of them, so a miss just means\n * that you aren't on the very start of a region.\n *\n * @param aNeedle The element you are looking for.\n * @param aHaystack The array that is being searched.\n * @param aCompare A function which takes the needle and an element in the\n * array and returns -1, 0, or 1 depending on whether the needle is less\n * than, equal to, or greater than the element, respectively.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n */\nexports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n if (aHaystack.length === 0) {\n return -1;\n }\n\n var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n if (index < 0) {\n return -1;\n }\n\n // We have found either the exact element, or the next-closest element than\n // the one we are searching for. However, there may be more than one such\n // element. Make sure we always return the smallest of these.\n while (index - 1 >= 0) {\n if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n break;\n }\n --index;\n }\n\n return index;\n};\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/binary-search.js\n ** module id = 8\n ** module chunks = 0\n **/","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n// It turns out that some (most?) JavaScript engines don't self-host\n// `Array.prototype.sort`. This makes sense because C++ will likely remain\n// faster than JS when doing raw CPU-intensive sorting. However, when using a\n// custom comparator function, calling back and forth between the VM's C++ and\n// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n// worse generated code for the comparator function than would be optimal. In\n// fact, when sorting with a comparator, these costs outweigh the benefits of\n// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n// a ~3500ms mean speed-up in `bench/bench.html`.\n\n/**\n * Swap the elements indexed by `x` and `y` in the array `ary`.\n *\n * @param {Array} ary\n * The array.\n * @param {Number} x\n * The index of the first item.\n * @param {Number} y\n * The index of the second item.\n */\nfunction swap(ary, x, y) {\n var temp = ary[x];\n ary[x] = ary[y];\n ary[y] = temp;\n}\n\n/**\n * Returns a random integer within the range `low .. high` inclusive.\n *\n * @param {Number} low\n * The lower bound on the range.\n * @param {Number} high\n * The upper bound on the range.\n */\nfunction randomIntInRange(low, high) {\n return Math.round(low + (Math.random() * (high - low)));\n}\n\n/**\n * The Quick Sort algorithm.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n * @param {Number} p\n * Start index of the array\n * @param {Number} r\n * End index of the array\n */\nfunction doQuickSort(ary, comparator, p, r) {\n // If our lower bound is less than our upper bound, we (1) partition the\n // array into two pieces and (2) recurse on each half. If it is not, this is\n // the empty array and our base case.\n\n if (p < r) {\n // (1) Partitioning.\n //\n // The partitioning chooses a pivot between `p` and `r` and moves all\n // elements that are less than or equal to the pivot to the before it, and\n // all the elements that are greater than it after it. The effect is that\n // once partition is done, the pivot is in the exact place it will be when\n // the array is put in sorted order, and it will not need to be moved\n // again. This runs in O(n) time.\n\n // Always choose a random pivot so that an input array which is reverse\n // sorted does not cause O(n^2) running time.\n var pivotIndex = randomIntInRange(p, r);\n var i = p - 1;\n\n swap(ary, pivotIndex, r);\n var pivot = ary[r];\n\n // Immediately after `j` is incremented in this loop, the following hold\n // true:\n //\n // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n //\n // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n for (var j = p; j < r; j++) {\n if (comparator(ary[j], pivot) <= 0) {\n i += 1;\n swap(ary, i, j);\n }\n }\n\n swap(ary, i + 1, j);\n var q = i + 1;\n\n // (2) Recurse on each half.\n\n doQuickSort(ary, comparator, p, q - 1);\n doQuickSort(ary, comparator, q + 1, r);\n }\n}\n\n/**\n * Sort the given array in-place with the given comparator function.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n */\nexports.quickSort = function (ary, comparator) {\n doQuickSort(ary, comparator, 0, ary.length - 1);\n};\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/quick-sort.js\n ** module id = 9\n ** module chunks = 0\n **/","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar SourceMapGenerator = require('./source-map-generator').SourceMapGenerator;\nvar util = require('./util');\n\n// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n// operating systems these days (capturing the result).\nvar REGEX_NEWLINE = /(\\r?\\n)/;\n\n// Newline character code for charCodeAt() comparisons\nvar NEWLINE_CODE = 10;\n\n// Private symbol for identifying `SourceNode`s when multiple versions of\n// the source-map library are loaded. This MUST NOT CHANGE across\n// versions!\nvar isSourceNode = \"$$$isSourceNode$$$\";\n\n/**\n * SourceNodes provide a way to abstract over interpolating/concatenating\n * snippets of generated JavaScript source code while maintaining the line and\n * column information associated with the original source code.\n *\n * @param aLine The original line number.\n * @param aColumn The original column number.\n * @param aSource The original source's filename.\n * @param aChunks Optional. An array of strings which are snippets of\n * generated JS, or other SourceNodes.\n * @param aName The original identifier.\n */\nfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n this.children = [];\n this.sourceContents = {};\n this.line = aLine == null ? null : aLine;\n this.column = aColumn == null ? null : aColumn;\n this.source = aSource == null ? null : aSource;\n this.name = aName == null ? null : aName;\n this[isSourceNode] = true;\n if (aChunks != null) this.add(aChunks);\n}\n\n/**\n * Creates a SourceNode from generated code and a SourceMapConsumer.\n *\n * @param aGeneratedCode The generated code\n * @param aSourceMapConsumer The SourceMap for the generated code\n * @param aRelativePath Optional. The path that relative sources in the\n * SourceMapConsumer should be relative to.\n */\nSourceNode.fromStringWithSourceMap =\n function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n // The SourceNode we want to fill with the generated code\n // and the SourceMap\n var node = new SourceNode();\n\n // All even indices of this array are one line of the generated code,\n // while all odd indices are the newlines between two adjacent lines\n // (since `REGEX_NEWLINE` captures its match).\n // Processed fragments are removed from this array, by calling `shiftNextLine`.\n var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n var shiftNextLine = function() {\n var lineContents = remainingLines.shift();\n // The last line of a file might not have a newline.\n var newLine = remainingLines.shift() || \"\";\n return lineContents + newLine;\n };\n\n // We need to remember the position of \"remainingLines\"\n var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\n // The generate SourceNodes we need a code range.\n // To extract it current and last mapping is used.\n // Here we store the last mapping.\n var lastMapping = null;\n\n aSourceMapConsumer.eachMapping(function (mapping) {\n if (lastMapping !== null) {\n // We add the code from \"lastMapping\" to \"mapping\":\n // First check if there is a new line in between.\n if (lastGeneratedLine < mapping.generatedLine) {\n // Associate first line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n lastGeneratedLine++;\n lastGeneratedColumn = 0;\n // The remaining code is added without mapping\n } else {\n // There is no new line in between.\n // Associate the code between \"lastGeneratedColumn\" and\n // \"mapping.generatedColumn\" with \"lastMapping\"\n var nextLine = remainingLines[0];\n var code = nextLine.substr(0, mapping.generatedColumn -\n lastGeneratedColumn);\n remainingLines[0] = nextLine.substr(mapping.generatedColumn -\n lastGeneratedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n addMappingWithCode(lastMapping, code);\n // No more remaining code, continue\n lastMapping = mapping;\n return;\n }\n }\n // We add the generated code until the first mapping\n // to the SourceNode without any mapping.\n // Each line is added as separate string.\n while (lastGeneratedLine < mapping.generatedLine) {\n node.add(shiftNextLine());\n lastGeneratedLine++;\n }\n if (lastGeneratedColumn < mapping.generatedColumn) {\n var nextLine = remainingLines[0];\n node.add(nextLine.substr(0, mapping.generatedColumn));\n remainingLines[0] = nextLine.substr(mapping.generatedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n }\n lastMapping = mapping;\n }, this);\n // We have processed all mappings.\n if (remainingLines.length > 0) {\n if (lastMapping) {\n // Associate the remaining code in the current line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n }\n // and add the remaining lines without any mapping\n node.add(remainingLines.join(\"\"));\n }\n\n // Copy sourcesContent into SourceNode\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aRelativePath != null) {\n sourceFile = util.join(aRelativePath, sourceFile);\n }\n node.setSourceContent(sourceFile, content);\n }\n });\n\n return node;\n\n function addMappingWithCode(mapping, code) {\n if (mapping === null || mapping.source === undefined) {\n node.add(code);\n } else {\n var source = aRelativePath\n ? util.join(aRelativePath, mapping.source)\n : mapping.source;\n node.add(new SourceNode(mapping.originalLine,\n mapping.originalColumn,\n source,\n code,\n mapping.name));\n }\n }\n };\n\n/**\n * Add a chunk of generated JS to this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.add = function SourceNode_add(aChunk) {\n if (Array.isArray(aChunk)) {\n aChunk.forEach(function (chunk) {\n this.add(chunk);\n }, this);\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n if (aChunk) {\n this.children.push(aChunk);\n }\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Add a chunk of generated JS to the beginning of this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n if (Array.isArray(aChunk)) {\n for (var i = aChunk.length-1; i >= 0; i--) {\n this.prepend(aChunk[i]);\n }\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n this.children.unshift(aChunk);\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Walk over the tree of JS snippets in this node and its children. The\n * walking function is called once for each snippet of JS and is passed that\n * snippet and the its original associated source's line/column location.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n var chunk;\n for (var i = 0, len = this.children.length; i < len; i++) {\n chunk = this.children[i];\n if (chunk[isSourceNode]) {\n chunk.walk(aFn);\n }\n else {\n if (chunk !== '') {\n aFn(chunk, { source: this.source,\n line: this.line,\n column: this.column,\n name: this.name });\n }\n }\n }\n};\n\n/**\n * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n * each of `this.children`.\n *\n * @param aSep The separator.\n */\nSourceNode.prototype.join = function SourceNode_join(aSep) {\n var newChildren;\n var i;\n var len = this.children.length;\n if (len > 0) {\n newChildren = [];\n for (i = 0; i < len-1; i++) {\n newChildren.push(this.children[i]);\n newChildren.push(aSep);\n }\n newChildren.push(this.children[i]);\n this.children = newChildren;\n }\n return this;\n};\n\n/**\n * Call String.prototype.replace on the very right-most source snippet. Useful\n * for trimming whitespace from the end of a source node, etc.\n *\n * @param aPattern The pattern to replace.\n * @param aReplacement The thing to replace the pattern with.\n */\nSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n var lastChild = this.children[this.children.length - 1];\n if (lastChild[isSourceNode]) {\n lastChild.replaceRight(aPattern, aReplacement);\n }\n else if (typeof lastChild === 'string') {\n this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n }\n else {\n this.children.push(''.replace(aPattern, aReplacement));\n }\n return this;\n};\n\n/**\n * Set the source content for a source file. This will be added to the SourceMapGenerator\n * in the sourcesContent field.\n *\n * @param aSourceFile The filename of the source file\n * @param aSourceContent The content of the source file\n */\nSourceNode.prototype.setSourceContent =\n function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n };\n\n/**\n * Walk over the tree of SourceNodes. The walking function is called for each\n * source file content and is passed the filename and source content.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walkSourceContents =\n function SourceNode_walkSourceContents(aFn) {\n for (var i = 0, len = this.children.length; i < len; i++) {\n if (this.children[i][isSourceNode]) {\n this.children[i].walkSourceContents(aFn);\n }\n }\n\n var sources = Object.keys(this.sourceContents);\n for (var i = 0, len = sources.length; i < len; i++) {\n aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n }\n };\n\n/**\n * Return the string representation of this source node. Walks over the tree\n * and concatenates all the various snippets together to one string.\n */\nSourceNode.prototype.toString = function SourceNode_toString() {\n var str = \"\";\n this.walk(function (chunk) {\n str += chunk;\n });\n return str;\n};\n\n/**\n * Returns the string representation of this source node along with a source\n * map.\n */\nSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n var generated = {\n code: \"\",\n line: 1,\n column: 0\n };\n var map = new SourceMapGenerator(aArgs);\n var sourceMappingActive = false;\n var lastOriginalSource = null;\n var lastOriginalLine = null;\n var lastOriginalColumn = null;\n var lastOriginalName = null;\n this.walk(function (chunk, original) {\n generated.code += chunk;\n if (original.source !== null\n && original.line !== null\n && original.column !== null) {\n if(lastOriginalSource !== original.source\n || lastOriginalLine !== original.line\n || lastOriginalColumn !== original.column\n || lastOriginalName !== original.name) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n lastOriginalSource = original.source;\n lastOriginalLine = original.line;\n lastOriginalColumn = original.column;\n lastOriginalName = original.name;\n sourceMappingActive = true;\n } else if (sourceMappingActive) {\n map.addMapping({\n generated: {\n line: generated.line,\n column: generated.column\n }\n });\n lastOriginalSource = null;\n sourceMappingActive = false;\n }\n for (var idx = 0, length = chunk.length; idx < length; idx++) {\n if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n generated.line++;\n generated.column = 0;\n // Mappings end at eol\n if (idx + 1 === length) {\n lastOriginalSource = null;\n sourceMappingActive = false;\n } else if (sourceMappingActive) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n } else {\n generated.column++;\n }\n }\n });\n this.walkSourceContents(function (sourceFile, sourceContent) {\n map.setSourceContent(sourceFile, sourceContent);\n });\n\n return { code: generated.code, map: map };\n};\n\nexports.SourceNode = SourceNode;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/source-node.js\n ** module id = 10\n ** module chunks = 0\n **/"],"sourceRoot":""} \ No newline at end of file diff --git a/node_modules/uglify-js/node_modules/source-map/lib/array-set.js b/node_modules/uglify-js/node_modules/source-map/lib/array-set.js new file mode 100644 index 0000000..51dffeb --- /dev/null +++ b/node_modules/uglify-js/node_modules/source-map/lib/array-set.js @@ -0,0 +1,104 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util = require('./util'); +var has = Object.prototype.hasOwnProperty; + +/** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ +function ArraySet() { + this._array = []; + this._set = Object.create(null); +} + +/** + * Static method for creating ArraySet instances from an existing array. + */ +ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; +}; + +/** + * Return how many unique items are in this ArraySet. If duplicates have been + * added, than those do not count towards the size. + * + * @returns Number + */ +ArraySet.prototype.size = function ArraySet_size() { + return Object.getOwnPropertyNames(this._set).length; +}; + +/** + * Add the given string to this set. + * + * @param String aStr + */ +ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = util.toSetString(aStr); + var isDuplicate = has.call(this._set, sStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + this._set[sStr] = idx; + } +}; + +/** + * Is the given string a member of this set? + * + * @param String aStr + */ +ArraySet.prototype.has = function ArraySet_has(aStr) { + var sStr = util.toSetString(aStr); + return has.call(this._set, sStr); +}; + +/** + * What is the index of the given string in the array? + * + * @param String aStr + */ +ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + var sStr = util.toSetString(aStr); + if (has.call(this._set, sStr)) { + return this._set[sStr]; + } + throw new Error('"' + aStr + '" is not in the set.'); +}; + +/** + * What is the element at the given index? + * + * @param Number aIdx + */ +ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); +}; + +/** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ +ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); +}; + +exports.ArraySet = ArraySet; diff --git a/node_modules/uglify-js/node_modules/source-map/lib/base64-vlq.js b/node_modules/uglify-js/node_modules/source-map/lib/base64-vlq.js new file mode 100644 index 0000000..612b404 --- /dev/null +++ b/node_modules/uglify-js/node_modules/source-map/lib/base64-vlq.js @@ -0,0 +1,140 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +var base64 = require('./base64'); + +// A single base 64 digit can contain 6 bits of data. For the base 64 variable +// length quantities we use in the source map spec, the first bit is the sign, +// the next four bits are the actual value, and the 6th bit is the +// continuation bit. The continuation bit tells us whether there are more +// digits in this value following this digit. +// +// Continuation +// | Sign +// | | +// V V +// 101011 + +var VLQ_BASE_SHIFT = 5; + +// binary: 100000 +var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + +// binary: 011111 +var VLQ_BASE_MASK = VLQ_BASE - 1; + +// binary: 100000 +var VLQ_CONTINUATION_BIT = VLQ_BASE; + +/** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ +function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; +} + +/** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ +function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; +} + +/** + * Returns the base 64 VLQ encoded value. + */ +exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; +}; + +/** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ +exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + + digit = base64.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; +}; diff --git a/node_modules/uglify-js/node_modules/source-map/lib/base64.js b/node_modules/uglify-js/node_modules/source-map/lib/base64.js new file mode 100644 index 0000000..8aa86b3 --- /dev/null +++ b/node_modules/uglify-js/node_modules/source-map/lib/base64.js @@ -0,0 +1,67 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); + +/** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ +exports.encode = function (number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + throw new TypeError("Must be between 0 and 63: " + number); +}; + +/** + * Decode a single base 64 character code digit to an integer. Returns -1 on + * failure. + */ +exports.decode = function (charCode) { + var bigA = 65; // 'A' + var bigZ = 90; // 'Z' + + var littleA = 97; // 'a' + var littleZ = 122; // 'z' + + var zero = 48; // '0' + var nine = 57; // '9' + + var plus = 43; // '+' + var slash = 47; // '/' + + var littleOffset = 26; + var numberOffset = 52; + + // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ + if (bigA <= charCode && charCode <= bigZ) { + return (charCode - bigA); + } + + // 26 - 51: abcdefghijklmnopqrstuvwxyz + if (littleA <= charCode && charCode <= littleZ) { + return (charCode - littleA + littleOffset); + } + + // 52 - 61: 0123456789 + if (zero <= charCode && charCode <= nine) { + return (charCode - zero + numberOffset); + } + + // 62: + + if (charCode == plus) { + return 62; + } + + // 63: / + if (charCode == slash) { + return 63; + } + + // Invalid base64 digit. + return -1; +}; diff --git a/node_modules/uglify-js/node_modules/source-map/lib/binary-search.js b/node_modules/uglify-js/node_modules/source-map/lib/binary-search.js new file mode 100644 index 0000000..010ac94 --- /dev/null +++ b/node_modules/uglify-js/node_modules/source-map/lib/binary-search.js @@ -0,0 +1,111 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +exports.GREATEST_LOWER_BOUND = 1; +exports.LEAST_UPPER_BOUND = 2; + +/** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ +function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } + else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } + else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } +} + +/** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ +exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, + aCompare, aBias || exports.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } + + // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + + return index; +}; diff --git a/node_modules/uglify-js/node_modules/source-map/lib/mapping-list.js b/node_modules/uglify-js/node_modules/source-map/lib/mapping-list.js new file mode 100644 index 0000000..06d1274 --- /dev/null +++ b/node_modules/uglify-js/node_modules/source-map/lib/mapping-list.js @@ -0,0 +1,79 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util = require('./util'); + +/** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ +function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || + util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; +} + +/** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ +function MappingList() { + this._array = []; + this._sorted = true; + // Serves as infimum + this._last = {generatedLine: -1, generatedColumn: 0}; +} + +/** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ +MappingList.prototype.unsortedForEach = + function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + +/** + * Add the given source mapping. + * + * @param Object aMapping + */ +MappingList.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } +}; + +/** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ +MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositionsInflated); + this._sorted = true; + } + return this._array; +}; + +exports.MappingList = MappingList; diff --git a/node_modules/uglify-js/node_modules/source-map/lib/quick-sort.js b/node_modules/uglify-js/node_modules/source-map/lib/quick-sort.js new file mode 100644 index 0000000..6a7caad --- /dev/null +++ b/node_modules/uglify-js/node_modules/source-map/lib/quick-sort.js @@ -0,0 +1,114 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +// It turns out that some (most?) JavaScript engines don't self-host +// `Array.prototype.sort`. This makes sense because C++ will likely remain +// faster than JS when doing raw CPU-intensive sorting. However, when using a +// custom comparator function, calling back and forth between the VM's C++ and +// JIT'd JS is rather slow *and* loses JIT type information, resulting in +// worse generated code for the comparator function than would be optimal. In +// fact, when sorting with a comparator, these costs outweigh the benefits of +// sorting in C++. By using our own JS-implemented Quick Sort (below), we get +// a ~3500ms mean speed-up in `bench/bench.html`. + +/** + * Swap the elements indexed by `x` and `y` in the array `ary`. + * + * @param {Array} ary + * The array. + * @param {Number} x + * The index of the first item. + * @param {Number} y + * The index of the second item. + */ +function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; +} + +/** + * Returns a random integer within the range `low .. high` inclusive. + * + * @param {Number} low + * The lower bound on the range. + * @param {Number} high + * The upper bound on the range. + */ +function randomIntInRange(low, high) { + return Math.round(low + (Math.random() * (high - low))); +} + +/** + * The Quick Sort algorithm. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + * @param {Number} p + * Start index of the array + * @param {Number} r + * End index of the array + */ +function doQuickSort(ary, comparator, p, r) { + // If our lower bound is less than our upper bound, we (1) partition the + // array into two pieces and (2) recurse on each half. If it is not, this is + // the empty array and our base case. + + if (p < r) { + // (1) Partitioning. + // + // The partitioning chooses a pivot between `p` and `r` and moves all + // elements that are less than or equal to the pivot to the before it, and + // all the elements that are greater than it after it. The effect is that + // once partition is done, the pivot is in the exact place it will be when + // the array is put in sorted order, and it will not need to be moved + // again. This runs in O(n) time. + + // Always choose a random pivot so that an input array which is reverse + // sorted does not cause O(n^2) running time. + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + + swap(ary, pivotIndex, r); + var pivot = ary[r]; + + // Immediately after `j` is incremented in this loop, the following hold + // true: + // + // * Every element in `ary[p .. i]` is less than or equal to the pivot. + // + // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot) <= 0) { + i += 1; + swap(ary, i, j); + } + } + + swap(ary, i + 1, j); + var q = i + 1; + + // (2) Recurse on each half. + + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } +} + +/** + * Sort the given array in-place with the given comparator function. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + */ +exports.quickSort = function (ary, comparator) { + doQuickSort(ary, comparator, 0, ary.length - 1); +}; diff --git a/node_modules/uglify-js/node_modules/source-map/lib/source-map-consumer.js b/node_modules/uglify-js/node_modules/source-map/lib/source-map-consumer.js new file mode 100644 index 0000000..6abcc28 --- /dev/null +++ b/node_modules/uglify-js/node_modules/source-map/lib/source-map-consumer.js @@ -0,0 +1,1082 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util = require('./util'); +var binarySearch = require('./binary-search'); +var ArraySet = require('./array-set').ArraySet; +var base64VLQ = require('./base64-vlq'); +var quickSort = require('./quick-sort').quickSort; + +function SourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + return sourceMap.sections != null + ? new IndexedSourceMapConsumer(sourceMap) + : new BasicSourceMapConsumer(sourceMap); +} + +SourceMapConsumer.fromSourceMap = function(aSourceMap) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap); +} + +/** + * The version of the source mapping spec that we are consuming. + */ +SourceMapConsumer.prototype._version = 3; + +// `__generatedMappings` and `__originalMappings` are arrays that hold the +// parsed mapping coordinates from the source map's "mappings" attribute. They +// are lazily instantiated, accessed via the `_generatedMappings` and +// `_originalMappings` getters respectively, and we only parse the mappings +// and create these arrays once queried for a source location. We jump through +// these hoops because there can be many thousands of mappings, and parsing +// them is expensive, so we only want to do it if we must. +// +// Each object in the arrays is of the form: +// +// { +// generatedLine: The line number in the generated code, +// generatedColumn: The column number in the generated code, +// source: The path to the original source file that generated this +// chunk of code, +// originalLine: The line number in the original source that +// corresponds to this chunk of generated code, +// originalColumn: The column number in the original source that +// corresponds to this chunk of generated code, +// name: The name of the original symbol which generated this chunk of +// code. +// } +// +// All properties except for `generatedLine` and `generatedColumn` can be +// `null`. +// +// `_generatedMappings` is ordered by the generated positions. +// +// `_originalMappings` is ordered by the original positions. + +SourceMapConsumer.prototype.__generatedMappings = null; +Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + get: function () { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } +}); + +SourceMapConsumer.prototype.__originalMappings = null; +Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + get: function () { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } +}); + +SourceMapConsumer.prototype._charIsMappingSeparator = + function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ +SourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + +SourceMapConsumer.GENERATED_ORDER = 1; +SourceMapConsumer.ORIGINAL_ORDER = 2; + +SourceMapConsumer.GREATEST_LOWER_BOUND = 1; +SourceMapConsumer.LEAST_UPPER_BOUND = 2; + +/** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ +SourceMapConsumer.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + mappings.map(function (mapping) { + var source = mapping.source === null ? null : this._sources.at(mapping.source); + if (source != null && sourceRoot != null) { + source = util.join(sourceRoot, source); + } + return { + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : this._names.at(mapping.name) + }; + }, this).forEach(aCallback, context); + }; + +/** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a either the line we are searching for or the next + * closest line that has any mappings. Otherwise, returns all mappings + * corresponding to the given line and either the column we are searching for + * or the next closest column that has any offsets. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: Optional. the column number in the original source. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ +SourceMapConsumer.prototype.allGeneratedPositionsFor = + function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util.getArg(aArgs, 'line'); + + // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: line, + originalColumn: util.getArg(aArgs, 'column', 0) + }; + + if (this.sourceRoot != null) { + needle.source = util.relative(this.sourceRoot, needle.source); + } + if (!this._sources.has(needle.source)) { + return []; + } + needle.source = this._sources.indexOf(needle.source); + + var mappings = []; + + var index = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + binarySearch.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (aArgs.column === undefined) { + var originalLine = mapping.originalLine; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we found. Since + // mappings are sorted, this is guaranteed to find all mappings for + // the line we found. + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we were searching for. + // Since mappings are sorted, this is guaranteed to find all mappings for + // the line we are searching for. + while (mapping && + mapping.originalLine === line && + mapping.originalColumn == originalColumn) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } + } + + return mappings; + }; + +exports.SourceMapConsumer = SourceMapConsumer; + +/** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The only parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ +function BasicSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + sources = sources + .map(String) + // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + .map(util.normalize) + // Always ensure that absolute sources are internally stored relative to + // the source root, if the source root is absolute. Not doing this would + // be particularly problematic when the source root is a prefix of the + // source (valid, but why??). See github issue #199 and bugzil.la/1188982. + .map(function (source) { + return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) + ? util.relative(sourceRoot, source) + : source; + }); + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names.map(String), true); + this._sources = ArraySet.fromArray(sources, true); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this.file = file; +} + +BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); +BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + +/** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @returns BasicSourceMapConsumer + */ +BasicSourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + + // Because we are modifying the entries (by converting string sources and + // names to indices into the sources and names ArraySets), we have to make + // a copy of the entry or else bad things happen. Shared mutable state + // strikes again! See github issue #191. + + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping; + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + + destOriginalMappings.push(destMapping); + } + + destGeneratedMappings.push(destMapping); + } + + quickSort(smc.__originalMappings, util.compareByOriginalPositions); + + return smc; + }; + +/** + * The version of the source mapping spec that we are consuming. + */ +BasicSourceMapConsumer.prototype._version = 3; + +/** + * The list of original sources. + */ +Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function () { + return this._sources.toArray().map(function (s) { + return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; + }, this); + } +}); + +/** + * Provide the JIT with a nice shape / hidden class. + */ +function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; +} + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ +BasicSourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedSegments = {}; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; + + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + index++; + previousGeneratedColumn = 0; + } + else if (aStr.charAt(index) === ',') { + index++; + } + else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; + + // Because each offset is encoded relative to the previous one, + // many segments often have the same encoding. We can exploit this + // fact by caching the parsed variable length fields of each segment, + // allowing us to avoid a second parse if we encounter the same + // segment again. + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + str = aStr.slice(index, end); + + segment = cachedSegments[str]; + if (segment) { + index += str.length; + } else { + segment = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + + if (segment.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + if (segment.length === 3) { + throw new Error('Found a source and line, but no column'); + } + + cachedSegments[str] = segment; + } + + // Generated column. + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + + if (segment.length > 1) { + // Original source. + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + + // Original line. + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + + // Original column. + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + + if (segment.length > 4) { + // Original name. + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + + generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + originalMappings.push(mapping); + } + } + } + + quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); + this.__generatedMappings = generatedMappings; + + quickSort(originalMappings, util.compareByOriginalPositions); + this.__originalMappings = originalMappings; + }; + +/** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ +BasicSourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; + +/** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ +BasicSourceMapConsumer.prototype.computeColumnSpans = + function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + + // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + + // The last mapping for each line spans the entire line. + mapping.lastGeneratedColumn = Infinity; + } + }; + +/** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ +BasicSourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util.compareByGeneratedPositionsDeflated, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + if (source !== null) { + source = this._sources.at(source); + if (this.sourceRoot != null) { + source = util.join(this.sourceRoot, source); + } + } + var name = util.getArg(mapping, 'name', null); + if (name !== null) { + name = this._names.at(name); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: name + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + +/** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ +BasicSourceMapConsumer.prototype.hasContentsOfAllSources = + function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && + !this.sourcesContent.some(function (sc) { return sc == null; }); + }; + +/** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ +BasicSourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + if (this.sourceRoot != null) { + aSource = util.relative(this.sourceRoot, aSource); + } + + if (this._sources.has(aSource)) { + return this.sourcesContent[this._sources.indexOf(aSource)]; + } + + var url; + if (this.sourceRoot != null + && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + aSource)) { + return this.sourcesContent[this._sources.indexOf("/" + aSource)]; + } + } + + // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + +/** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ +BasicSourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util.getArg(aArgs, 'source'); + if (this.sourceRoot != null) { + source = util.relative(this.sourceRoot, source); + } + if (!this._sources.has(source)) { + return { + line: null, + column: null, + lastColumn: null + }; + } + source = this._sources.indexOf(source); + + var needle = { + source: source, + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + + return { + line: null, + column: null, + lastColumn: null + }; + }; + +exports.BasicSourceMapConsumer = BasicSourceMapConsumer; + +/** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The only parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ +function IndexedSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + this._sources = new ArraySet(); + this._names = new ArraySet(); + + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || + (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + lastOffset = offset; + + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map')) + } + }); +} + +IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); +IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + +/** + * The version of the source mapping spec that we are consuming. + */ +IndexedSourceMapConsumer.prototype._version = 3; + +/** + * The list of original sources. + */ +Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function () { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + return sources; + } +}); + +/** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ +IndexedSourceMapConsumer.prototype.originalPositionFor = + function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + // Find the section containing the generated position we're trying to map + // to an original position. + var sectionIndex = binarySearch.search(needle, this._sections, + function(needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + + return (needle.generatedColumn - + section.generatedOffset.generatedColumn); + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - + (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - + (section.generatedOffset.generatedLine === needle.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + bias: aArgs.bias + }); + }; + +/** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ +IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = + function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function (s) { + return s.consumer.hasContentsOfAllSources(); + }); + }; + +/** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ +IndexedSourceMapConsumer.prototype.sourceContentFor = + function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + var content = section.consumer.sourceContentFor(aSource, true); + if (content) { + return content; + } + } + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + +/** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ +IndexedSourceMapConsumer.prototype.generatedPositionFor = + function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + // Only consider this section if the requested source is in the list of + // sources of the consumer. + if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + + (section.generatedOffset.generatedLine === generatedPosition.line + ? section.generatedOffset.generatedColumn - 1 + : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; + }; + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ +IndexedSourceMapConsumer.prototype._parseMappings = + function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + + var source = section.consumer._sources.at(mapping.source); + if (section.consumer.sourceRoot !== null) { + source = util.join(section.consumer.sourceRoot, source); + } + this._sources.add(source); + source = this._sources.indexOf(source); + + var name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); + + // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + + (section.generatedOffset.generatedLine === mapping.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: name + }; + + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + } + } + + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); + }; + +exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; diff --git a/node_modules/uglify-js/node_modules/source-map/lib/source-map-generator.js b/node_modules/uglify-js/node_modules/source-map/lib/source-map-generator.js new file mode 100644 index 0000000..8fbb8e8 --- /dev/null +++ b/node_modules/uglify-js/node_modules/source-map/lib/source-map-generator.js @@ -0,0 +1,404 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var base64VLQ = require('./base64-vlq'); +var util = require('./util'); +var ArraySet = require('./array-set').ArraySet; +var MappingList = require('./mapping-list').MappingList; + +/** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ +function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; +} + +SourceMapGenerator.prototype._version = 3; + +/** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ +SourceMapGenerator.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator({ + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + }); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + +/** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ +SourceMapGenerator.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + this._validateMapping(generated, original, source, name); + } + + if (source != null) { + source = String(source); + if (!this._sources.has(source)) { + this._sources.add(source); + } + } + + if (name != null) { + name = String(name); + if (!this._names.has(name)) { + this._names.add(name); + } + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + +/** + * Set the source content for a source file. + */ +SourceMapGenerator.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = Object.create(null); + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + +/** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ +SourceMapGenerator.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + + 'or the source map\'s "file" property. Both were omitted.' + ); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "sourceFile" relative if an absolute Url is passed. + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + // Find mappings for the "sourceFile" + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source) + } + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + +/** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ +SourceMapGenerator.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aOriginal && 'line' in aOriginal && 'column' in aOriginal + && aGenerated.line > 0 && aGenerated.column >= 0 + && aOriginal.line > 0 && aOriginal.column >= 0 + && aSource) { + // Cases 2 and 3. + return; + } + else { + throw new Error('Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + })); + } + }; + +/** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ +SourceMapGenerator.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var next; + var mapping; + var nameIdx; + var sourceIdx; + + var mappings = this._mappings.toArray(); + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + next = '' + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + next += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + next += ','; + } + } + + next += base64VLQ.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + next += base64VLQ.encode(sourceIdx - previousSource); + previousSource = sourceIdx; + + // lines are stored 0-based in SourceMap spec version 3 + next += base64VLQ.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + next += base64VLQ.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + next += base64VLQ.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + + result += next; + } + + return result; + }; + +SourceMapGenerator.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) + ? this._sourcesContents[key] + : null; + }, this); + }; + +/** + * Externalize the source map. + */ +SourceMapGenerator.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + +/** + * Render the source map being generated to a string. + */ +SourceMapGenerator.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + +exports.SourceMapGenerator = SourceMapGenerator; diff --git a/node_modules/uglify-js/node_modules/source-map/lib/source-node.js b/node_modules/uglify-js/node_modules/source-map/lib/source-node.js new file mode 100644 index 0000000..e927f66 --- /dev/null +++ b/node_modules/uglify-js/node_modules/source-map/lib/source-node.js @@ -0,0 +1,407 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator; +var util = require('./util'); + +// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other +// operating systems these days (capturing the result). +var REGEX_NEWLINE = /(\r?\n)/; + +// Newline character code for charCodeAt() comparisons +var NEWLINE_CODE = 10; + +// Private symbol for identifying `SourceNode`s when multiple versions of +// the source-map library are loaded. This MUST NOT CHANGE across +// versions! +var isSourceNode = "$$$isSourceNode$$$"; + +/** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ +function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); +} + +/** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ +SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are removed from this array, by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var shiftNextLine = function() { + var lineContents = remainingLines.shift(); + // The last line of a file might not have a newline. + var newLine = remainingLines.shift() || ""; + return lineContents + newLine; + }; + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[0]; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[0] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[0]; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[0] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + if (remainingLines.length > 0) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.join("")); + } + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath + ? util.join(aRelativePath, mapping.source) + : mapping.source; + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name)); + } + } + }; + +/** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ +SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; +}; + +/** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ +SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; +}; + +/** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ +SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } +}; + +/** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ +SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; +}; + +/** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ +SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; +}; + +/** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ +SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + +/** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ +SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + +/** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ +SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; +}; + +/** + * Returns the string representation of this source node along with a source + * map. + */ +SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; +}; + +exports.SourceNode = SourceNode; diff --git a/node_modules/uglify-js/node_modules/source-map/lib/util.js b/node_modules/uglify-js/node_modules/source-map/lib/util.js new file mode 100644 index 0000000..44e0e45 --- /dev/null +++ b/node_modules/uglify-js/node_modules/source-map/lib/util.js @@ -0,0 +1,417 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +/** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ +function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } +} +exports.getArg = getArg; + +var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; +var dataUrlRegexp = /^data:.+\,.+$/; + +function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; +} +exports.urlParse = urlParse; + +function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; +} +exports.urlGenerate = urlGenerate; + +/** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consecutive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ +function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = exports.isAbsolute(path); + + var parts = path.split(/\/+/); + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; +} +exports.normalize = normalize; + +/** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ +function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; +} +exports.join = join; + +exports.isAbsolute = function (aPath) { + return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp); +}; + +/** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ +function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); + + // It is possible for the path to be above the root. In this case, simply + // checking whether the root is a prefix of the path won't work. Instead, we + // need to remove components from the root one by one, until either we find + // a prefix that fits, or we run out of components to remove. + var level = 0; + while (aPath.indexOf(aRoot + '/') !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + + // If the only part of the root that is left is the scheme (i.e. http://, + // file:///, etc.), one or more slashes (/), or simply nothing at all, we + // have exhausted all components, so the path is not relative to the root. + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + + ++level; + } + + // Make sure we add a "../" for each component we removed from the root. + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); +} +exports.relative = relative; + +var supportsNullProto = (function () { + var obj = Object.create(null); + return !('__proto__' in obj); +}()); + +function identity (s) { + return s; +} + +/** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ +function toSetString(aStr) { + if (isProtoString(aStr)) { + return '$' + aStr; + } + + return aStr; +} +exports.toSetString = supportsNullProto ? identity : toSetString; + +function fromSetString(aStr) { + if (isProtoString(aStr)) { + return aStr.slice(1); + } + + return aStr; +} +exports.fromSetString = supportsNullProto ? identity : fromSetString; + +function isProtoString(s) { + if (!s) { + return false; + } + + var length = s.length; + + if (length < 9 /* "__proto__".length */) { + return false; + } + + if (s.charCodeAt(length - 1) !== 95 /* '_' */ || + s.charCodeAt(length - 2) !== 95 /* '_' */ || + s.charCodeAt(length - 3) !== 111 /* 'o' */ || + s.charCodeAt(length - 4) !== 116 /* 't' */ || + s.charCodeAt(length - 5) !== 111 /* 'o' */ || + s.charCodeAt(length - 6) !== 114 /* 'r' */ || + s.charCodeAt(length - 7) !== 112 /* 'p' */ || + s.charCodeAt(length - 8) !== 95 /* '_' */ || + s.charCodeAt(length - 9) !== 95 /* '_' */) { + return false; + } + + for (var i = length - 10; i >= 0; i--) { + if (s.charCodeAt(i) !== 36 /* '$' */) { + return false; + } + } + + return true; +} + +/** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ +function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = mappingA.source - mappingB.source; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return mappingA.name - mappingB.name; +} +exports.compareByOriginalPositions = compareByOriginalPositions; + +/** + * Comparator between two mappings with deflated source and name indices where + * the generated positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ +function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = mappingA.source - mappingB.source; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return mappingA.name - mappingB.name; +} +exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + +function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + + if (aStr1 > aStr2) { + return 1; + } + + return -1; +} + +/** + * Comparator between two mappings with inflated source and name strings where + * the generated positions are compared. + */ +function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; diff --git a/node_modules/uglify-js/node_modules/source-map/package.json b/node_modules/uglify-js/node_modules/source-map/package.json new file mode 100644 index 0000000..fcecabd --- /dev/null +++ b/node_modules/uglify-js/node_modules/source-map/package.json @@ -0,0 +1,254 @@ +{ + "_args": [ + [ + { + "raw": "source-map@~0.5.1", + "scope": null, + "escapedName": "source-map", + "name": "source-map", + "rawSpec": "~0.5.1", + "spec": ">=0.5.1 <0.6.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/uglify-js" + ] + ], + "_from": "source-map@>=0.5.1 <0.6.0", + "_id": "source-map@0.5.6", + "_inCache": true, + "_location": "/uglify-js/source-map", + "_nodeVersion": "5.3.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/source-map-0.5.6.tgz_1462209962516_0.9263619624543935" + }, + "_npmUser": { + "name": "nickfitzgerald", + "email": "fitzgen@gmail.com" + }, + "_npmVersion": "3.3.12", + "_phantomChildren": {}, + "_requested": { + "raw": "source-map@~0.5.1", + "scope": null, + "escapedName": "source-map", + "name": "source-map", + "rawSpec": "~0.5.1", + "spec": ">=0.5.1 <0.6.0", + "type": "range" + }, + "_requiredBy": [ + "/uglify-js" + ], + "_resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", + "_shasum": "75ce38f52bf0733c5a7f0c118d81334a2bb5f412", + "_shrinkwrap": null, + "_spec": "source-map@~0.5.1", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/uglify-js", + "author": { + "name": "Nick Fitzgerald", + "email": "nfitzgerald@mozilla.com" + }, + "bugs": { + "url": "https://github.com/mozilla/source-map/issues" + }, + "contributors": [ + { + "name": "Tobias Koppers", + "email": "tobias.koppers@googlemail.com" + }, + { + "name": "Duncan Beevers", + "email": "duncan@dweebd.com" + }, + { + "name": "Stephen Crane", + "email": "scrane@mozilla.com" + }, + { + "name": "Ryan Seddon", + "email": "seddon.ryan@gmail.com" + }, + { + "name": "Miles Elam", + "email": "miles.elam@deem.com" + }, + { + "name": "Mihai Bazon", + "email": "mihai.bazon@gmail.com" + }, + { + "name": "Michael Ficarra", + "email": "github.public.email@michael.ficarra.me" + }, + { + "name": "Todd Wolfson", + "email": "todd@twolfson.com" + }, + { + "name": "Alexander Solovyov", + "email": "alexander@solovyov.net" + }, + { + "name": "Felix Gnass", + "email": "fgnass@gmail.com" + }, + { + "name": "Conrad Irwin", + "email": "conrad.irwin@gmail.com" + }, + { + "name": "usrbincc", + "email": "usrbincc@yahoo.com" + }, + { + "name": "David Glasser", + "email": "glasser@davidglasser.net" + }, + { + "name": "Chase Douglas", + "email": "chase@newrelic.com" + }, + { + "name": "Evan Wallace", + "email": "evan.exe@gmail.com" + }, + { + "name": "Heather Arthur", + "email": "fayearthur@gmail.com" + }, + { + "name": "Hugh Kennedy", + "email": "hughskennedy@gmail.com" + }, + { + "name": "David Glasser", + "email": "glasser@davidglasser.net" + }, + { + "name": "Simon Lydell", + "email": "simon.lydell@gmail.com" + }, + { + "name": "Jmeas Smith", + "email": "jellyes2@gmail.com" + }, + { + "name": "Michael Z Goddard", + "email": "mzgoddard@gmail.com" + }, + { + "name": "azu", + "email": "azu@users.noreply.github.com" + }, + { + "name": "John Gozde", + "email": "john@gozde.ca" + }, + { + "name": "Adam Kirkton", + "email": "akirkton@truefitinnovation.com" + }, + { + "name": "Chris Montgomery", + "email": "christopher.montgomery@dowjones.com" + }, + { + "name": "J. Ryan Stinnett", + "email": "jryans@gmail.com" + }, + { + "name": "Jack Herrington", + "email": "jherrington@walmartlabs.com" + }, + { + "name": "Chris Truter", + "email": "jeffpalentine@gmail.com" + }, + { + "name": "Daniel Espeset", + "email": "daniel@danielespeset.com" + }, + { + "name": "Jamie Wong", + "email": "jamie.lf.wong@gmail.com" + }, + { + "name": "Eddy Bruël", + "email": "ejpbruel@mozilla.com" + }, + { + "name": "Hawken Rives", + "email": "hawkrives@gmail.com" + }, + { + "name": "Gilad Peleg", + "email": "giladp007@gmail.com" + }, + { + "name": "djchie", + "email": "djchie.dev@gmail.com" + }, + { + "name": "Gary Ye", + "email": "garysye@gmail.com" + }, + { + "name": "Nicolas Lalevée", + "email": "nicolas.lalevee@hibnet.org" + } + ], + "dependencies": {}, + "description": "Generates and consumes source maps", + "devDependencies": { + "doctoc": "^0.15.0", + "webpack": "^1.12.0" + }, + "directories": {}, + "dist": { + "shasum": "75ce38f52bf0733c5a7f0c118d81334a2bb5f412", + "tarball": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "source-map.js", + "lib/", + "dist/source-map.debug.js", + "dist/source-map.js", + "dist/source-map.min.js", + "dist/source-map.min.js.map" + ], + "gitHead": "aa0398ced67beebea34f0d36f766505656c344f6", + "homepage": "https://github.com/mozilla/source-map", + "license": "BSD-3-Clause", + "main": "./source-map.js", + "maintainers": [ + { + "name": "mozilla-devtools", + "email": "mozilla-developer-tools@googlegroups.com" + }, + { + "name": "mozilla", + "email": "dherman@mozilla.com" + }, + { + "name": "nickfitzgerald", + "email": "fitzgen@gmail.com" + } + ], + "name": "source-map", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/mozilla/source-map.git" + }, + "scripts": { + "build": "webpack --color", + "test": "npm run build && node test/run-tests.js", + "toc": "doctoc --title '## Table of Contents' README.md && doctoc --title '## Table of Contents' CONTRIBUTING.md" + }, + "version": "0.5.6" +} diff --git a/node_modules/uglify-js/node_modules/source-map/source-map.js b/node_modules/uglify-js/node_modules/source-map/source-map.js new file mode 100644 index 0000000..bc88fe8 --- /dev/null +++ b/node_modules/uglify-js/node_modules/source-map/source-map.js @@ -0,0 +1,8 @@ +/* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ +exports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator; +exports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer; +exports.SourceNode = require('./lib/source-node').SourceNode; diff --git a/node_modules/uglify-js/package.json b/node_modules/uglify-js/package.json new file mode 100644 index 0000000..242d35e --- /dev/null +++ b/node_modules/uglify-js/package.json @@ -0,0 +1,128 @@ +{ + "_args": [ + [ + { + "raw": "uglify-js@^2.4.19", + "scope": null, + "escapedName": "uglify-js", + "name": "uglify-js", + "rawSpec": "^2.4.19", + "spec": ">=2.4.19 <3.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/jade" + ] + ], + "_from": "uglify-js@>=2.4.19 <3.0.0", + "_id": "uglify-js@2.8.22", + "_inCache": true, + "_location": "/uglify-js", + "_nodeVersion": "7.8.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/uglify-js-2.8.22.tgz_1491711254658_0.7903752939309925" + }, + "_npmUser": { + "name": "alexlamsl", + "email": "alexlamsl@gmail.com" + }, + "_npmVersion": "4.2.0", + "_phantomChildren": {}, + "_requested": { + "raw": "uglify-js@^2.4.19", + "scope": null, + "escapedName": "uglify-js", + "name": "uglify-js", + "rawSpec": "^2.4.19", + "spec": ">=2.4.19 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/jade" + ], + "_resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.22.tgz", + "_shasum": "d54934778a8da14903fa29a326fb24c0ab51a1a0", + "_shrinkwrap": null, + "_spec": "uglify-js@^2.4.19", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/jade", + "author": { + "name": "Mihai Bazon", + "email": "mihai.bazon@gmail.com", + "url": "http://lisperator.net/" + }, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "browserify": { + "transform": [ + "uglify-to-browserify" + ] + }, + "bugs": { + "url": "https://github.com/mishoo/UglifyJS2/issues" + }, + "dependencies": { + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" + }, + "description": "JavaScript parser, mangler/compressor and beautifier toolkit", + "devDependencies": { + "acorn": "~0.6.0", + "escodegen": "~1.3.3", + "esfuzz": "~0.3.1", + "estraverse": "~1.5.1", + "mocha": "~2.3.4" + }, + "directories": {}, + "dist": { + "shasum": "d54934778a8da14903fa29a326fb24c0ab51a1a0", + "tarball": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.22.tgz" + }, + "engines": { + "node": ">=0.8.0" + }, + "files": [ + "bin", + "lib", + "tools", + "LICENSE" + ], + "gitHead": "04b89645058d85b8b67bb94fb9e39252160a0959", + "homepage": "http://lisperator.net/uglifyjs", + "keywords": [ + "uglify", + "uglify-js", + "minify", + "minifier" + ], + "license": "BSD-2-Clause", + "main": "tools/node.js", + "maintainers": [ + { + "name": "alexlamsl", + "email": "alexlamsl@gmail.com" + }, + { + "name": "mishoo", + "email": "mihai.bazon@gmail.com" + }, + { + "name": "rvanvelzen1", + "email": "rvanvelzen1@gmail.com" + } + ], + "name": "uglify-js", + "optionalDependencies": { + "uglify-to-browserify": "~1.0.0" + }, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/mishoo/UglifyJS2.git" + }, + "scripts": { + "test": "node test/run-tests.js" + }, + "version": "2.8.22" +} diff --git a/node_modules/uglify-js/tools/domprops.json b/node_modules/uglify-js/tools/domprops.json new file mode 100644 index 0000000..6f6c221 --- /dev/null +++ b/node_modules/uglify-js/tools/domprops.json @@ -0,0 +1,5603 @@ +{ + "props": [ + "$&", + "$'", + "$*", + "$+", + "$1", + "$2", + "$3", + "$4", + "$5", + "$6", + "$7", + "$8", + "$9", + "$_", + "$`", + "$input", + "@@iterator", + "ABORT_ERR", + "ACTIVE", + "ACTIVE_ATTRIBUTES", + "ACTIVE_TEXTURE", + "ACTIVE_UNIFORMS", + "ADDITION", + "ALIASED_LINE_WIDTH_RANGE", + "ALIASED_POINT_SIZE_RANGE", + "ALLOW_KEYBOARD_INPUT", + "ALLPASS", + "ALPHA", + "ALPHA_BITS", + "ALT_MASK", + "ALWAYS", + "ANY_TYPE", + "ANY_UNORDERED_NODE_TYPE", + "ARRAY_BUFFER", + "ARRAY_BUFFER_BINDING", + "ATTACHED_SHADERS", + "ATTRIBUTE_NODE", + "AT_TARGET", + "AddSearchProvider", + "AnalyserNode", + "AnimationEvent", + "AnonXMLHttpRequest", + "ApplicationCache", + "ApplicationCacheErrorEvent", + "Array", + "ArrayBuffer", + "Attr", + "Audio", + "AudioBuffer", + "AudioBufferSourceNode", + "AudioContext", + "AudioDestinationNode", + "AudioListener", + "AudioNode", + "AudioParam", + "AudioProcessingEvent", + "AudioStreamTrack", + "AutocompleteErrorEvent", + "BACK", + "BAD_BOUNDARYPOINTS_ERR", + "BANDPASS", + "BLEND", + "BLEND_COLOR", + "BLEND_DST_ALPHA", + "BLEND_DST_RGB", + "BLEND_EQUATION", + "BLEND_EQUATION_ALPHA", + "BLEND_EQUATION_RGB", + "BLEND_SRC_ALPHA", + "BLEND_SRC_RGB", + "BLUE_BITS", + "BLUR", + "BOOL", + "BOOLEAN_TYPE", + "BOOL_VEC2", + "BOOL_VEC3", + "BOOL_VEC4", + "BOTH", + "BROWSER_DEFAULT_WEBGL", + "BUBBLING_PHASE", + "BUFFER_SIZE", + "BUFFER_USAGE", + "BYTE", + "BYTES_PER_ELEMENT", + "BarProp", + "BaseHref", + "BatteryManager", + "BeforeLoadEvent", + "BeforeUnloadEvent", + "BiquadFilterNode", + "Blob", + "BlobEvent", + "Boolean", + "CAPTURING_PHASE", + "CCW", + "CDATASection", + "CDATA_SECTION_NODE", + "CHANGE", + "CHARSET_RULE", + "CHECKING", + "CLAMP_TO_EDGE", + "CLICK", + "CLOSED", + "CLOSING", + "COLOR_ATTACHMENT0", + "COLOR_BUFFER_BIT", + "COLOR_CLEAR_VALUE", + "COLOR_WRITEMASK", + "COMMENT_NODE", + "COMPILE_STATUS", + "COMPRESSED_RGBA_S3TC_DXT1_EXT", + "COMPRESSED_RGBA_S3TC_DXT3_EXT", + "COMPRESSED_RGBA_S3TC_DXT5_EXT", + "COMPRESSED_RGB_S3TC_DXT1_EXT", + "COMPRESSED_TEXTURE_FORMATS", + "CONNECTING", + "CONSTANT_ALPHA", + "CONSTANT_COLOR", + "CONSTRAINT_ERR", + "CONTEXT_LOST_WEBGL", + "CONTROL_MASK", + "COUNTER_STYLE_RULE", + "CSS", + "CSS2Properties", + "CSSCharsetRule", + "CSSConditionRule", + "CSSCounterStyleRule", + "CSSFontFaceRule", + "CSSFontFeatureValuesRule", + "CSSGroupingRule", + "CSSImportRule", + "CSSKeyframeRule", + "CSSKeyframesRule", + "CSSMediaRule", + "CSSMozDocumentRule", + "CSSNameSpaceRule", + "CSSPageRule", + "CSSPrimitiveValue", + "CSSRule", + "CSSRuleList", + "CSSStyleDeclaration", + "CSSStyleRule", + "CSSStyleSheet", + "CSSSupportsRule", + "CSSUnknownRule", + "CSSValue", + "CSSValueList", + "CSSVariablesDeclaration", + "CSSVariablesRule", + "CSSViewportRule", + "CSS_ATTR", + "CSS_CM", + "CSS_COUNTER", + "CSS_CUSTOM", + "CSS_DEG", + "CSS_DIMENSION", + "CSS_EMS", + "CSS_EXS", + "CSS_FILTER_BLUR", + "CSS_FILTER_BRIGHTNESS", + "CSS_FILTER_CONTRAST", + "CSS_FILTER_CUSTOM", + "CSS_FILTER_DROP_SHADOW", + "CSS_FILTER_GRAYSCALE", + "CSS_FILTER_HUE_ROTATE", + "CSS_FILTER_INVERT", + "CSS_FILTER_OPACITY", + "CSS_FILTER_REFERENCE", + "CSS_FILTER_SATURATE", + "CSS_FILTER_SEPIA", + "CSS_GRAD", + "CSS_HZ", + "CSS_IDENT", + "CSS_IN", + "CSS_INHERIT", + "CSS_KHZ", + "CSS_MATRIX", + "CSS_MATRIX3D", + "CSS_MM", + "CSS_MS", + "CSS_NUMBER", + "CSS_PC", + "CSS_PERCENTAGE", + "CSS_PERSPECTIVE", + "CSS_PRIMITIVE_VALUE", + "CSS_PT", + "CSS_PX", + "CSS_RAD", + "CSS_RECT", + "CSS_RGBCOLOR", + "CSS_ROTATE", + "CSS_ROTATE3D", + "CSS_ROTATEX", + "CSS_ROTATEY", + "CSS_ROTATEZ", + "CSS_S", + "CSS_SCALE", + "CSS_SCALE3D", + "CSS_SCALEX", + "CSS_SCALEY", + "CSS_SCALEZ", + "CSS_SKEW", + "CSS_SKEWX", + "CSS_SKEWY", + "CSS_STRING", + "CSS_TRANSLATE", + "CSS_TRANSLATE3D", + "CSS_TRANSLATEX", + "CSS_TRANSLATEY", + "CSS_TRANSLATEZ", + "CSS_UNKNOWN", + "CSS_URI", + "CSS_VALUE_LIST", + "CSS_VH", + "CSS_VMAX", + "CSS_VMIN", + "CSS_VW", + "CULL_FACE", + "CULL_FACE_MODE", + "CURRENT_PROGRAM", + "CURRENT_VERTEX_ATTRIB", + "CUSTOM", + "CW", + "CanvasGradient", + "CanvasPattern", + "CanvasRenderingContext2D", + "CaretPosition", + "ChannelMergerNode", + "ChannelSplitterNode", + "CharacterData", + "ClientRect", + "ClientRectList", + "Clipboard", + "ClipboardEvent", + "CloseEvent", + "Collator", + "CommandEvent", + "Comment", + "CompositionEvent", + "Console", + "Controllers", + "ConvolverNode", + "Counter", + "Crypto", + "CryptoKey", + "CustomEvent", + "DATABASE_ERR", + "DATA_CLONE_ERR", + "DATA_ERR", + "DBLCLICK", + "DECR", + "DECR_WRAP", + "DELETE_STATUS", + "DEPTH_ATTACHMENT", + "DEPTH_BITS", + "DEPTH_BUFFER_BIT", + "DEPTH_CLEAR_VALUE", + "DEPTH_COMPONENT", + "DEPTH_COMPONENT16", + "DEPTH_FUNC", + "DEPTH_RANGE", + "DEPTH_STENCIL", + "DEPTH_STENCIL_ATTACHMENT", + "DEPTH_TEST", + "DEPTH_WRITEMASK", + "DIRECTION_DOWN", + "DIRECTION_LEFT", + "DIRECTION_RIGHT", + "DIRECTION_UP", + "DISABLED", + "DISPATCH_REQUEST_ERR", + "DITHER", + "DOCUMENT_FRAGMENT_NODE", + "DOCUMENT_NODE", + "DOCUMENT_POSITION_CONTAINED_BY", + "DOCUMENT_POSITION_CONTAINS", + "DOCUMENT_POSITION_DISCONNECTED", + "DOCUMENT_POSITION_FOLLOWING", + "DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC", + "DOCUMENT_POSITION_PRECEDING", + "DOCUMENT_TYPE_NODE", + "DOMCursor", + "DOMError", + "DOMException", + "DOMImplementation", + "DOMImplementationLS", + "DOMMatrix", + "DOMMatrixReadOnly", + "DOMParser", + "DOMPoint", + "DOMPointReadOnly", + "DOMQuad", + "DOMRect", + "DOMRectList", + "DOMRectReadOnly", + "DOMRequest", + "DOMSTRING_SIZE_ERR", + "DOMSettableTokenList", + "DOMStringList", + "DOMStringMap", + "DOMTokenList", + "DOMTransactionEvent", + "DOM_DELTA_LINE", + "DOM_DELTA_PAGE", + "DOM_DELTA_PIXEL", + "DOM_INPUT_METHOD_DROP", + "DOM_INPUT_METHOD_HANDWRITING", + "DOM_INPUT_METHOD_IME", + "DOM_INPUT_METHOD_KEYBOARD", + "DOM_INPUT_METHOD_MULTIMODAL", + "DOM_INPUT_METHOD_OPTION", + "DOM_INPUT_METHOD_PASTE", + "DOM_INPUT_METHOD_SCRIPT", + "DOM_INPUT_METHOD_UNKNOWN", + "DOM_INPUT_METHOD_VOICE", + "DOM_KEY_LOCATION_JOYSTICK", + "DOM_KEY_LOCATION_LEFT", + "DOM_KEY_LOCATION_MOBILE", + "DOM_KEY_LOCATION_NUMPAD", + "DOM_KEY_LOCATION_RIGHT", + "DOM_KEY_LOCATION_STANDARD", + "DOM_VK_0", + "DOM_VK_1", + "DOM_VK_2", + "DOM_VK_3", + "DOM_VK_4", + "DOM_VK_5", + "DOM_VK_6", + "DOM_VK_7", + "DOM_VK_8", + "DOM_VK_9", + "DOM_VK_A", + "DOM_VK_ACCEPT", + "DOM_VK_ADD", + "DOM_VK_ALT", + "DOM_VK_ALTGR", + "DOM_VK_AMPERSAND", + "DOM_VK_ASTERISK", + "DOM_VK_AT", + "DOM_VK_ATTN", + "DOM_VK_B", + "DOM_VK_BACKSPACE", + "DOM_VK_BACK_QUOTE", + "DOM_VK_BACK_SLASH", + "DOM_VK_BACK_SPACE", + "DOM_VK_C", + "DOM_VK_CANCEL", + "DOM_VK_CAPS_LOCK", + "DOM_VK_CIRCUMFLEX", + "DOM_VK_CLEAR", + "DOM_VK_CLOSE_BRACKET", + "DOM_VK_CLOSE_CURLY_BRACKET", + "DOM_VK_CLOSE_PAREN", + "DOM_VK_COLON", + "DOM_VK_COMMA", + "DOM_VK_CONTEXT_MENU", + "DOM_VK_CONTROL", + "DOM_VK_CONVERT", + "DOM_VK_CRSEL", + "DOM_VK_CTRL", + "DOM_VK_D", + "DOM_VK_DECIMAL", + "DOM_VK_DELETE", + "DOM_VK_DIVIDE", + "DOM_VK_DOLLAR", + "DOM_VK_DOUBLE_QUOTE", + "DOM_VK_DOWN", + "DOM_VK_E", + "DOM_VK_EISU", + "DOM_VK_END", + "DOM_VK_ENTER", + "DOM_VK_EQUALS", + "DOM_VK_EREOF", + "DOM_VK_ESCAPE", + "DOM_VK_EXCLAMATION", + "DOM_VK_EXECUTE", + "DOM_VK_EXSEL", + "DOM_VK_F", + "DOM_VK_F1", + "DOM_VK_F10", + "DOM_VK_F11", + "DOM_VK_F12", + "DOM_VK_F13", + "DOM_VK_F14", + "DOM_VK_F15", + "DOM_VK_F16", + "DOM_VK_F17", + "DOM_VK_F18", + "DOM_VK_F19", + "DOM_VK_F2", + "DOM_VK_F20", + "DOM_VK_F21", + "DOM_VK_F22", + "DOM_VK_F23", + "DOM_VK_F24", + "DOM_VK_F25", + "DOM_VK_F26", + "DOM_VK_F27", + "DOM_VK_F28", + "DOM_VK_F29", + "DOM_VK_F3", + "DOM_VK_F30", + "DOM_VK_F31", + "DOM_VK_F32", + "DOM_VK_F33", + "DOM_VK_F34", + "DOM_VK_F35", + "DOM_VK_F36", + "DOM_VK_F4", + "DOM_VK_F5", + "DOM_VK_F6", + "DOM_VK_F7", + "DOM_VK_F8", + "DOM_VK_F9", + "DOM_VK_FINAL", + "DOM_VK_FRONT", + "DOM_VK_G", + "DOM_VK_GREATER_THAN", + "DOM_VK_H", + "DOM_VK_HANGUL", + "DOM_VK_HANJA", + "DOM_VK_HASH", + "DOM_VK_HELP", + "DOM_VK_HK_TOGGLE", + "DOM_VK_HOME", + "DOM_VK_HYPHEN_MINUS", + "DOM_VK_I", + "DOM_VK_INSERT", + "DOM_VK_J", + "DOM_VK_JUNJA", + "DOM_VK_K", + "DOM_VK_KANA", + "DOM_VK_KANJI", + "DOM_VK_L", + "DOM_VK_LEFT", + "DOM_VK_LEFT_TAB", + "DOM_VK_LESS_THAN", + "DOM_VK_M", + "DOM_VK_META", + "DOM_VK_MODECHANGE", + "DOM_VK_MULTIPLY", + "DOM_VK_N", + "DOM_VK_NONCONVERT", + "DOM_VK_NUMPAD0", + "DOM_VK_NUMPAD1", + "DOM_VK_NUMPAD2", + "DOM_VK_NUMPAD3", + "DOM_VK_NUMPAD4", + "DOM_VK_NUMPAD5", + "DOM_VK_NUMPAD6", + "DOM_VK_NUMPAD7", + "DOM_VK_NUMPAD8", + "DOM_VK_NUMPAD9", + "DOM_VK_NUM_LOCK", + "DOM_VK_O", + "DOM_VK_OEM_1", + "DOM_VK_OEM_102", + "DOM_VK_OEM_2", + "DOM_VK_OEM_3", + "DOM_VK_OEM_4", + "DOM_VK_OEM_5", + "DOM_VK_OEM_6", + "DOM_VK_OEM_7", + "DOM_VK_OEM_8", + "DOM_VK_OEM_COMMA", + "DOM_VK_OEM_MINUS", + "DOM_VK_OEM_PERIOD", + "DOM_VK_OEM_PLUS", + "DOM_VK_OPEN_BRACKET", + "DOM_VK_OPEN_CURLY_BRACKET", + "DOM_VK_OPEN_PAREN", + "DOM_VK_P", + "DOM_VK_PA1", + "DOM_VK_PAGEDOWN", + "DOM_VK_PAGEUP", + "DOM_VK_PAGE_DOWN", + "DOM_VK_PAGE_UP", + "DOM_VK_PAUSE", + "DOM_VK_PERCENT", + "DOM_VK_PERIOD", + "DOM_VK_PIPE", + "DOM_VK_PLAY", + "DOM_VK_PLUS", + "DOM_VK_PRINT", + "DOM_VK_PRINTSCREEN", + "DOM_VK_PROCESSKEY", + "DOM_VK_PROPERITES", + "DOM_VK_Q", + "DOM_VK_QUESTION_MARK", + "DOM_VK_QUOTE", + "DOM_VK_R", + "DOM_VK_REDO", + "DOM_VK_RETURN", + "DOM_VK_RIGHT", + "DOM_VK_S", + "DOM_VK_SCROLL_LOCK", + "DOM_VK_SELECT", + "DOM_VK_SEMICOLON", + "DOM_VK_SEPARATOR", + "DOM_VK_SHIFT", + "DOM_VK_SLASH", + "DOM_VK_SLEEP", + "DOM_VK_SPACE", + "DOM_VK_SUBTRACT", + "DOM_VK_T", + "DOM_VK_TAB", + "DOM_VK_TILDE", + "DOM_VK_U", + "DOM_VK_UNDERSCORE", + "DOM_VK_UNDO", + "DOM_VK_UNICODE", + "DOM_VK_UP", + "DOM_VK_V", + "DOM_VK_VOLUME_DOWN", + "DOM_VK_VOLUME_MUTE", + "DOM_VK_VOLUME_UP", + "DOM_VK_W", + "DOM_VK_WIN", + "DOM_VK_WINDOW", + "DOM_VK_WIN_ICO_00", + "DOM_VK_WIN_ICO_CLEAR", + "DOM_VK_WIN_ICO_HELP", + "DOM_VK_WIN_OEM_ATTN", + "DOM_VK_WIN_OEM_AUTO", + "DOM_VK_WIN_OEM_BACKTAB", + "DOM_VK_WIN_OEM_CLEAR", + "DOM_VK_WIN_OEM_COPY", + "DOM_VK_WIN_OEM_CUSEL", + "DOM_VK_WIN_OEM_ENLW", + "DOM_VK_WIN_OEM_FINISH", + "DOM_VK_WIN_OEM_FJ_JISHO", + "DOM_VK_WIN_OEM_FJ_LOYA", + "DOM_VK_WIN_OEM_FJ_MASSHOU", + "DOM_VK_WIN_OEM_FJ_ROYA", + "DOM_VK_WIN_OEM_FJ_TOUROKU", + "DOM_VK_WIN_OEM_JUMP", + "DOM_VK_WIN_OEM_PA1", + "DOM_VK_WIN_OEM_PA2", + "DOM_VK_WIN_OEM_PA3", + "DOM_VK_WIN_OEM_RESET", + "DOM_VK_WIN_OEM_WSCTRL", + "DOM_VK_X", + "DOM_VK_XF86XK_ADD_FAVORITE", + "DOM_VK_XF86XK_APPLICATION_LEFT", + "DOM_VK_XF86XK_APPLICATION_RIGHT", + "DOM_VK_XF86XK_AUDIO_CYCLE_TRACK", + "DOM_VK_XF86XK_AUDIO_FORWARD", + "DOM_VK_XF86XK_AUDIO_LOWER_VOLUME", + "DOM_VK_XF86XK_AUDIO_MEDIA", + "DOM_VK_XF86XK_AUDIO_MUTE", + "DOM_VK_XF86XK_AUDIO_NEXT", + "DOM_VK_XF86XK_AUDIO_PAUSE", + "DOM_VK_XF86XK_AUDIO_PLAY", + "DOM_VK_XF86XK_AUDIO_PREV", + "DOM_VK_XF86XK_AUDIO_RAISE_VOLUME", + "DOM_VK_XF86XK_AUDIO_RANDOM_PLAY", + "DOM_VK_XF86XK_AUDIO_RECORD", + "DOM_VK_XF86XK_AUDIO_REPEAT", + "DOM_VK_XF86XK_AUDIO_REWIND", + "DOM_VK_XF86XK_AUDIO_STOP", + "DOM_VK_XF86XK_AWAY", + "DOM_VK_XF86XK_BACK", + "DOM_VK_XF86XK_BACK_FORWARD", + "DOM_VK_XF86XK_BATTERY", + "DOM_VK_XF86XK_BLUE", + "DOM_VK_XF86XK_BLUETOOTH", + "DOM_VK_XF86XK_BOOK", + "DOM_VK_XF86XK_BRIGHTNESS_ADJUST", + "DOM_VK_XF86XK_CALCULATOR", + "DOM_VK_XF86XK_CALENDAR", + "DOM_VK_XF86XK_CD", + "DOM_VK_XF86XK_CLOSE", + "DOM_VK_XF86XK_COMMUNITY", + "DOM_VK_XF86XK_CONTRAST_ADJUST", + "DOM_VK_XF86XK_COPY", + "DOM_VK_XF86XK_CUT", + "DOM_VK_XF86XK_CYCLE_ANGLE", + "DOM_VK_XF86XK_DISPLAY", + "DOM_VK_XF86XK_DOCUMENTS", + "DOM_VK_XF86XK_DOS", + "DOM_VK_XF86XK_EJECT", + "DOM_VK_XF86XK_EXCEL", + "DOM_VK_XF86XK_EXPLORER", + "DOM_VK_XF86XK_FAVORITES", + "DOM_VK_XF86XK_FINANCE", + "DOM_VK_XF86XK_FORWARD", + "DOM_VK_XF86XK_FRAME_BACK", + "DOM_VK_XF86XK_FRAME_FORWARD", + "DOM_VK_XF86XK_GAME", + "DOM_VK_XF86XK_GO", + "DOM_VK_XF86XK_GREEN", + "DOM_VK_XF86XK_HIBERNATE", + "DOM_VK_XF86XK_HISTORY", + "DOM_VK_XF86XK_HOME_PAGE", + "DOM_VK_XF86XK_HOT_LINKS", + "DOM_VK_XF86XK_I_TOUCH", + "DOM_VK_XF86XK_KBD_BRIGHTNESS_DOWN", + "DOM_VK_XF86XK_KBD_BRIGHTNESS_UP", + "DOM_VK_XF86XK_KBD_LIGHT_ON_OFF", + "DOM_VK_XF86XK_LAUNCH0", + "DOM_VK_XF86XK_LAUNCH1", + "DOM_VK_XF86XK_LAUNCH2", + "DOM_VK_XF86XK_LAUNCH3", + "DOM_VK_XF86XK_LAUNCH4", + "DOM_VK_XF86XK_LAUNCH5", + "DOM_VK_XF86XK_LAUNCH6", + "DOM_VK_XF86XK_LAUNCH7", + "DOM_VK_XF86XK_LAUNCH8", + "DOM_VK_XF86XK_LAUNCH9", + "DOM_VK_XF86XK_LAUNCH_A", + "DOM_VK_XF86XK_LAUNCH_B", + "DOM_VK_XF86XK_LAUNCH_C", + "DOM_VK_XF86XK_LAUNCH_D", + "DOM_VK_XF86XK_LAUNCH_E", + "DOM_VK_XF86XK_LAUNCH_F", + "DOM_VK_XF86XK_LIGHT_BULB", + "DOM_VK_XF86XK_LOG_OFF", + "DOM_VK_XF86XK_MAIL", + "DOM_VK_XF86XK_MAIL_FORWARD", + "DOM_VK_XF86XK_MARKET", + "DOM_VK_XF86XK_MEETING", + "DOM_VK_XF86XK_MEMO", + "DOM_VK_XF86XK_MENU_KB", + "DOM_VK_XF86XK_MENU_PB", + "DOM_VK_XF86XK_MESSENGER", + "DOM_VK_XF86XK_MON_BRIGHTNESS_DOWN", + "DOM_VK_XF86XK_MON_BRIGHTNESS_UP", + "DOM_VK_XF86XK_MUSIC", + "DOM_VK_XF86XK_MY_COMPUTER", + "DOM_VK_XF86XK_MY_SITES", + "DOM_VK_XF86XK_NEW", + "DOM_VK_XF86XK_NEWS", + "DOM_VK_XF86XK_OFFICE_HOME", + "DOM_VK_XF86XK_OPEN", + "DOM_VK_XF86XK_OPEN_URL", + "DOM_VK_XF86XK_OPTION", + "DOM_VK_XF86XK_PASTE", + "DOM_VK_XF86XK_PHONE", + "DOM_VK_XF86XK_PICTURES", + "DOM_VK_XF86XK_POWER_DOWN", + "DOM_VK_XF86XK_POWER_OFF", + "DOM_VK_XF86XK_RED", + "DOM_VK_XF86XK_REFRESH", + "DOM_VK_XF86XK_RELOAD", + "DOM_VK_XF86XK_REPLY", + "DOM_VK_XF86XK_ROCKER_DOWN", + "DOM_VK_XF86XK_ROCKER_ENTER", + "DOM_VK_XF86XK_ROCKER_UP", + "DOM_VK_XF86XK_ROTATE_WINDOWS", + "DOM_VK_XF86XK_ROTATION_KB", + "DOM_VK_XF86XK_ROTATION_PB", + "DOM_VK_XF86XK_SAVE", + "DOM_VK_XF86XK_SCREEN_SAVER", + "DOM_VK_XF86XK_SCROLL_CLICK", + "DOM_VK_XF86XK_SCROLL_DOWN", + "DOM_VK_XF86XK_SCROLL_UP", + "DOM_VK_XF86XK_SEARCH", + "DOM_VK_XF86XK_SEND", + "DOM_VK_XF86XK_SHOP", + "DOM_VK_XF86XK_SPELL", + "DOM_VK_XF86XK_SPLIT_SCREEN", + "DOM_VK_XF86XK_STANDBY", + "DOM_VK_XF86XK_START", + "DOM_VK_XF86XK_STOP", + "DOM_VK_XF86XK_SUBTITLE", + "DOM_VK_XF86XK_SUPPORT", + "DOM_VK_XF86XK_SUSPEND", + "DOM_VK_XF86XK_TASK_PANE", + "DOM_VK_XF86XK_TERMINAL", + "DOM_VK_XF86XK_TIME", + "DOM_VK_XF86XK_TOOLS", + "DOM_VK_XF86XK_TOP_MENU", + "DOM_VK_XF86XK_TO_DO_LIST", + "DOM_VK_XF86XK_TRAVEL", + "DOM_VK_XF86XK_USER1KB", + "DOM_VK_XF86XK_USER2KB", + "DOM_VK_XF86XK_USER_PB", + "DOM_VK_XF86XK_UWB", + "DOM_VK_XF86XK_VENDOR_HOME", + "DOM_VK_XF86XK_VIDEO", + "DOM_VK_XF86XK_VIEW", + "DOM_VK_XF86XK_WAKE_UP", + "DOM_VK_XF86XK_WEB_CAM", + "DOM_VK_XF86XK_WHEEL_BUTTON", + "DOM_VK_XF86XK_WLAN", + "DOM_VK_XF86XK_WORD", + "DOM_VK_XF86XK_WWW", + "DOM_VK_XF86XK_XFER", + "DOM_VK_XF86XK_YELLOW", + "DOM_VK_XF86XK_ZOOM_IN", + "DOM_VK_XF86XK_ZOOM_OUT", + "DOM_VK_Y", + "DOM_VK_Z", + "DOM_VK_ZOOM", + "DONE", + "DONT_CARE", + "DOWNLOADING", + "DRAGDROP", + "DST_ALPHA", + "DST_COLOR", + "DYNAMIC_DRAW", + "DataChannel", + "DataTransfer", + "DataTransferItem", + "DataTransferItemList", + "DataView", + "Date", + "DateTimeFormat", + "DelayNode", + "DesktopNotification", + "DesktopNotificationCenter", + "DeviceLightEvent", + "DeviceMotionEvent", + "DeviceOrientationEvent", + "DeviceProximityEvent", + "DeviceStorage", + "DeviceStorageChangeEvent", + "Document", + "DocumentFragment", + "DocumentType", + "DragEvent", + "DynamicsCompressorNode", + "E", + "ELEMENT_ARRAY_BUFFER", + "ELEMENT_ARRAY_BUFFER_BINDING", + "ELEMENT_NODE", + "EMPTY", + "ENCODING_ERR", + "ENDED", + "END_TO_END", + "END_TO_START", + "ENTITY_NODE", + "ENTITY_REFERENCE_NODE", + "EPSILON", + "EQUAL", + "EQUALPOWER", + "ERROR", + "EXPONENTIAL_DISTANCE", + "Element", + "ElementQuery", + "Entity", + "EntityReference", + "Error", + "ErrorEvent", + "EvalError", + "Event", + "EventException", + "EventSource", + "EventTarget", + "External", + "FASTEST", + "FIDOSDK", + "FILTER_ACCEPT", + "FILTER_INTERRUPT", + "FILTER_REJECT", + "FILTER_SKIP", + "FINISHED_STATE", + "FIRST_ORDERED_NODE_TYPE", + "FLOAT", + "FLOAT_MAT2", + "FLOAT_MAT3", + "FLOAT_MAT4", + "FLOAT_VEC2", + "FLOAT_VEC3", + "FLOAT_VEC4", + "FOCUS", + "FONT_FACE_RULE", + "FONT_FEATURE_VALUES_RULE", + "FRAGMENT_SHADER", + "FRAGMENT_SHADER_DERIVATIVE_HINT_OES", + "FRAMEBUFFER", + "FRAMEBUFFER_ATTACHMENT_OBJECT_NAME", + "FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE", + "FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE", + "FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL", + "FRAMEBUFFER_BINDING", + "FRAMEBUFFER_COMPLETE", + "FRAMEBUFFER_INCOMPLETE_ATTACHMENT", + "FRAMEBUFFER_INCOMPLETE_DIMENSIONS", + "FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT", + "FRAMEBUFFER_UNSUPPORTED", + "FRONT", + "FRONT_AND_BACK", + "FRONT_FACE", + "FUNC_ADD", + "FUNC_REVERSE_SUBTRACT", + "FUNC_SUBTRACT", + "Feed", + "FeedEntry", + "File", + "FileError", + "FileList", + "FileReader", + "FindInPage", + "Float32Array", + "Float64Array", + "FocusEvent", + "FontFace", + "FormData", + "Function", + "GENERATE_MIPMAP_HINT", + "GEQUAL", + "GREATER", + "GREEN_BITS", + "GainNode", + "Gamepad", + "GamepadButton", + "GamepadEvent", + "GestureEvent", + "HAVE_CURRENT_DATA", + "HAVE_ENOUGH_DATA", + "HAVE_FUTURE_DATA", + "HAVE_METADATA", + "HAVE_NOTHING", + "HEADERS_RECEIVED", + "HIDDEN", + "HIERARCHY_REQUEST_ERR", + "HIGHPASS", + "HIGHSHELF", + "HIGH_FLOAT", + "HIGH_INT", + "HORIZONTAL", + "HORIZONTAL_AXIS", + "HRTF", + "HTMLAllCollection", + "HTMLAnchorElement", + "HTMLAppletElement", + "HTMLAreaElement", + "HTMLAudioElement", + "HTMLBRElement", + "HTMLBaseElement", + "HTMLBaseFontElement", + "HTMLBlockquoteElement", + "HTMLBodyElement", + "HTMLButtonElement", + "HTMLCanvasElement", + "HTMLCollection", + "HTMLCommandElement", + "HTMLContentElement", + "HTMLDListElement", + "HTMLDataElement", + "HTMLDataListElement", + "HTMLDetailsElement", + "HTMLDialogElement", + "HTMLDirectoryElement", + "HTMLDivElement", + "HTMLDocument", + "HTMLElement", + "HTMLEmbedElement", + "HTMLFieldSetElement", + "HTMLFontElement", + "HTMLFormControlsCollection", + "HTMLFormElement", + "HTMLFrameElement", + "HTMLFrameSetElement", + "HTMLHRElement", + "HTMLHeadElement", + "HTMLHeadingElement", + "HTMLHtmlElement", + "HTMLIFrameElement", + "HTMLImageElement", + "HTMLInputElement", + "HTMLIsIndexElement", + "HTMLKeygenElement", + "HTMLLIElement", + "HTMLLabelElement", + "HTMLLegendElement", + "HTMLLinkElement", + "HTMLMapElement", + "HTMLMarqueeElement", + "HTMLMediaElement", + "HTMLMenuElement", + "HTMLMenuItemElement", + "HTMLMetaElement", + "HTMLMeterElement", + "HTMLModElement", + "HTMLOListElement", + "HTMLObjectElement", + "HTMLOptGroupElement", + "HTMLOptionElement", + "HTMLOptionsCollection", + "HTMLOutputElement", + "HTMLParagraphElement", + "HTMLParamElement", + "HTMLPictureElement", + "HTMLPreElement", + "HTMLProgressElement", + "HTMLPropertiesCollection", + "HTMLQuoteElement", + "HTMLScriptElement", + "HTMLSelectElement", + "HTMLShadowElement", + "HTMLSourceElement", + "HTMLSpanElement", + "HTMLStyleElement", + "HTMLTableCaptionElement", + "HTMLTableCellElement", + "HTMLTableColElement", + "HTMLTableElement", + "HTMLTableRowElement", + "HTMLTableSectionElement", + "HTMLTemplateElement", + "HTMLTextAreaElement", + "HTMLTimeElement", + "HTMLTitleElement", + "HTMLTrackElement", + "HTMLUListElement", + "HTMLUnknownElement", + "HTMLVideoElement", + "HashChangeEvent", + "Headers", + "History", + "ICE_CHECKING", + "ICE_CLOSED", + "ICE_COMPLETED", + "ICE_CONNECTED", + "ICE_FAILED", + "ICE_GATHERING", + "ICE_WAITING", + "IDBCursor", + "IDBCursorWithValue", + "IDBDatabase", + "IDBDatabaseException", + "IDBFactory", + "IDBFileHandle", + "IDBFileRequest", + "IDBIndex", + "IDBKeyRange", + "IDBMutableFile", + "IDBObjectStore", + "IDBOpenDBRequest", + "IDBRequest", + "IDBTransaction", + "IDBVersionChangeEvent", + "IDLE", + "IMPLEMENTATION_COLOR_READ_FORMAT", + "IMPLEMENTATION_COLOR_READ_TYPE", + "IMPORT_RULE", + "INCR", + "INCR_WRAP", + "INDEX_SIZE_ERR", + "INT", + "INT_VEC2", + "INT_VEC3", + "INT_VEC4", + "INUSE_ATTRIBUTE_ERR", + "INVALID_ACCESS_ERR", + "INVALID_CHARACTER_ERR", + "INVALID_ENUM", + "INVALID_EXPRESSION_ERR", + "INVALID_FRAMEBUFFER_OPERATION", + "INVALID_MODIFICATION_ERR", + "INVALID_NODE_TYPE_ERR", + "INVALID_OPERATION", + "INVALID_STATE_ERR", + "INVALID_VALUE", + "INVERSE_DISTANCE", + "INVERT", + "IceCandidate", + "Image", + "ImageBitmap", + "ImageData", + "Infinity", + "InputEvent", + "InputMethodContext", + "InstallTrigger", + "Int16Array", + "Int32Array", + "Int8Array", + "Intent", + "InternalError", + "Intl", + "IsSearchProviderInstalled", + "Iterator", + "JSON", + "KEEP", + "KEYDOWN", + "KEYFRAMES_RULE", + "KEYFRAME_RULE", + "KEYPRESS", + "KEYUP", + "KeyEvent", + "KeyboardEvent", + "LENGTHADJUST_SPACING", + "LENGTHADJUST_SPACINGANDGLYPHS", + "LENGTHADJUST_UNKNOWN", + "LEQUAL", + "LESS", + "LINEAR", + "LINEAR_DISTANCE", + "LINEAR_MIPMAP_LINEAR", + "LINEAR_MIPMAP_NEAREST", + "LINES", + "LINE_LOOP", + "LINE_STRIP", + "LINE_WIDTH", + "LINK_STATUS", + "LIVE", + "LN10", + "LN2", + "LOADED", + "LOADING", + "LOG10E", + "LOG2E", + "LOWPASS", + "LOWSHELF", + "LOW_FLOAT", + "LOW_INT", + "LSException", + "LSParserFilter", + "LUMINANCE", + "LUMINANCE_ALPHA", + "LocalMediaStream", + "Location", + "MAX_COMBINED_TEXTURE_IMAGE_UNITS", + "MAX_CUBE_MAP_TEXTURE_SIZE", + "MAX_FRAGMENT_UNIFORM_VECTORS", + "MAX_RENDERBUFFER_SIZE", + "MAX_SAFE_INTEGER", + "MAX_TEXTURE_IMAGE_UNITS", + "MAX_TEXTURE_MAX_ANISOTROPY_EXT", + "MAX_TEXTURE_SIZE", + "MAX_VALUE", + "MAX_VARYING_VECTORS", + "MAX_VERTEX_ATTRIBS", + "MAX_VERTEX_TEXTURE_IMAGE_UNITS", + "MAX_VERTEX_UNIFORM_VECTORS", + "MAX_VIEWPORT_DIMS", + "MEDIA_ERR_ABORTED", + "MEDIA_ERR_DECODE", + "MEDIA_ERR_ENCRYPTED", + "MEDIA_ERR_NETWORK", + "MEDIA_ERR_SRC_NOT_SUPPORTED", + "MEDIA_KEYERR_CLIENT", + "MEDIA_KEYERR_DOMAIN", + "MEDIA_KEYERR_HARDWARECHANGE", + "MEDIA_KEYERR_OUTPUT", + "MEDIA_KEYERR_SERVICE", + "MEDIA_KEYERR_UNKNOWN", + "MEDIA_RULE", + "MEDIUM_FLOAT", + "MEDIUM_INT", + "META_MASK", + "MIN_SAFE_INTEGER", + "MIN_VALUE", + "MIRRORED_REPEAT", + "MODE_ASYNCHRONOUS", + "MODE_SYNCHRONOUS", + "MODIFICATION", + "MOUSEDOWN", + "MOUSEDRAG", + "MOUSEMOVE", + "MOUSEOUT", + "MOUSEOVER", + "MOUSEUP", + "MOZ_KEYFRAMES_RULE", + "MOZ_KEYFRAME_RULE", + "MOZ_SOURCE_CURSOR", + "MOZ_SOURCE_ERASER", + "MOZ_SOURCE_KEYBOARD", + "MOZ_SOURCE_MOUSE", + "MOZ_SOURCE_PEN", + "MOZ_SOURCE_TOUCH", + "MOZ_SOURCE_UNKNOWN", + "MSGESTURE_FLAG_BEGIN", + "MSGESTURE_FLAG_CANCEL", + "MSGESTURE_FLAG_END", + "MSGESTURE_FLAG_INERTIA", + "MSGESTURE_FLAG_NONE", + "MSPOINTER_TYPE_MOUSE", + "MSPOINTER_TYPE_PEN", + "MSPOINTER_TYPE_TOUCH", + "MS_ASYNC_CALLBACK_STATUS_ASSIGN_DELEGATE", + "MS_ASYNC_CALLBACK_STATUS_CANCEL", + "MS_ASYNC_CALLBACK_STATUS_CHOOSEANY", + "MS_ASYNC_CALLBACK_STATUS_ERROR", + "MS_ASYNC_CALLBACK_STATUS_JOIN", + "MS_ASYNC_OP_STATUS_CANCELED", + "MS_ASYNC_OP_STATUS_ERROR", + "MS_ASYNC_OP_STATUS_SUCCESS", + "MS_MANIPULATION_STATE_ACTIVE", + "MS_MANIPULATION_STATE_CANCELLED", + "MS_MANIPULATION_STATE_COMMITTED", + "MS_MANIPULATION_STATE_DRAGGING", + "MS_MANIPULATION_STATE_INERTIA", + "MS_MANIPULATION_STATE_PRESELECT", + "MS_MANIPULATION_STATE_SELECTING", + "MS_MANIPULATION_STATE_STOPPED", + "MS_MEDIA_ERR_ENCRYPTED", + "MS_MEDIA_KEYERR_CLIENT", + "MS_MEDIA_KEYERR_DOMAIN", + "MS_MEDIA_KEYERR_HARDWARECHANGE", + "MS_MEDIA_KEYERR_OUTPUT", + "MS_MEDIA_KEYERR_SERVICE", + "MS_MEDIA_KEYERR_UNKNOWN", + "Map", + "Math", + "MediaController", + "MediaDevices", + "MediaElementAudioSourceNode", + "MediaEncryptedEvent", + "MediaError", + "MediaKeyError", + "MediaKeyEvent", + "MediaKeyMessageEvent", + "MediaKeyNeededEvent", + "MediaKeySession", + "MediaKeyStatusMap", + "MediaKeySystemAccess", + "MediaKeys", + "MediaList", + "MediaQueryList", + "MediaQueryListEvent", + "MediaRecorder", + "MediaSource", + "MediaStream", + "MediaStreamAudioDestinationNode", + "MediaStreamAudioSourceNode", + "MediaStreamEvent", + "MediaStreamTrack", + "MediaStreamTrackEvent", + "MessageChannel", + "MessageEvent", + "MessagePort", + "Methods", + "MimeType", + "MimeTypeArray", + "MouseEvent", + "MouseScrollEvent", + "MozAnimation", + "MozAnimationDelay", + "MozAnimationDirection", + "MozAnimationDuration", + "MozAnimationFillMode", + "MozAnimationIterationCount", + "MozAnimationName", + "MozAnimationPlayState", + "MozAnimationTimingFunction", + "MozAppearance", + "MozBackfaceVisibility", + "MozBinding", + "MozBorderBottomColors", + "MozBorderEnd", + "MozBorderEndColor", + "MozBorderEndStyle", + "MozBorderEndWidth", + "MozBorderImage", + "MozBorderLeftColors", + "MozBorderRightColors", + "MozBorderStart", + "MozBorderStartColor", + "MozBorderStartStyle", + "MozBorderStartWidth", + "MozBorderTopColors", + "MozBoxAlign", + "MozBoxDirection", + "MozBoxFlex", + "MozBoxOrdinalGroup", + "MozBoxOrient", + "MozBoxPack", + "MozBoxSizing", + "MozCSSKeyframeRule", + "MozCSSKeyframesRule", + "MozColumnCount", + "MozColumnFill", + "MozColumnGap", + "MozColumnRule", + "MozColumnRuleColor", + "MozColumnRuleStyle", + "MozColumnRuleWidth", + "MozColumnWidth", + "MozColumns", + "MozContactChangeEvent", + "MozFloatEdge", + "MozFontFeatureSettings", + "MozFontLanguageOverride", + "MozForceBrokenImageIcon", + "MozHyphens", + "MozImageRegion", + "MozMarginEnd", + "MozMarginStart", + "MozMmsEvent", + "MozMmsMessage", + "MozMobileMessageThread", + "MozOSXFontSmoothing", + "MozOrient", + "MozOutlineRadius", + "MozOutlineRadiusBottomleft", + "MozOutlineRadiusBottomright", + "MozOutlineRadiusTopleft", + "MozOutlineRadiusTopright", + "MozPaddingEnd", + "MozPaddingStart", + "MozPerspective", + "MozPerspectiveOrigin", + "MozPowerManager", + "MozSettingsEvent", + "MozSmsEvent", + "MozSmsMessage", + "MozStackSizing", + "MozTabSize", + "MozTextAlignLast", + "MozTextDecorationColor", + "MozTextDecorationLine", + "MozTextDecorationStyle", + "MozTextSizeAdjust", + "MozTransform", + "MozTransformOrigin", + "MozTransformStyle", + "MozTransition", + "MozTransitionDelay", + "MozTransitionDuration", + "MozTransitionProperty", + "MozTransitionTimingFunction", + "MozUserFocus", + "MozUserInput", + "MozUserModify", + "MozUserSelect", + "MozWindowDragging", + "MozWindowShadow", + "MutationEvent", + "MutationObserver", + "MutationRecord", + "NAMESPACE_ERR", + "NAMESPACE_RULE", + "NEAREST", + "NEAREST_MIPMAP_LINEAR", + "NEAREST_MIPMAP_NEAREST", + "NEGATIVE_INFINITY", + "NETWORK_EMPTY", + "NETWORK_ERR", + "NETWORK_IDLE", + "NETWORK_LOADED", + "NETWORK_LOADING", + "NETWORK_NO_SOURCE", + "NEVER", + "NEW", + "NEXT", + "NEXT_NO_DUPLICATE", + "NICEST", + "NODE_AFTER", + "NODE_BEFORE", + "NODE_BEFORE_AND_AFTER", + "NODE_INSIDE", + "NONE", + "NON_TRANSIENT_ERR", + "NOTATION_NODE", + "NOTCH", + "NOTEQUAL", + "NOT_ALLOWED_ERR", + "NOT_FOUND_ERR", + "NOT_READABLE_ERR", + "NOT_SUPPORTED_ERR", + "NO_DATA_ALLOWED_ERR", + "NO_ERR", + "NO_ERROR", + "NO_MODIFICATION_ALLOWED_ERR", + "NUMBER_TYPE", + "NUM_COMPRESSED_TEXTURE_FORMATS", + "NaN", + "NamedNodeMap", + "Navigator", + "NearbyLinks", + "NetworkInformation", + "Node", + "NodeFilter", + "NodeIterator", + "NodeList", + "Notation", + "Notification", + "NotifyPaintEvent", + "Number", + "NumberFormat", + "OBSOLETE", + "ONE", + "ONE_MINUS_CONSTANT_ALPHA", + "ONE_MINUS_CONSTANT_COLOR", + "ONE_MINUS_DST_ALPHA", + "ONE_MINUS_DST_COLOR", + "ONE_MINUS_SRC_ALPHA", + "ONE_MINUS_SRC_COLOR", + "OPEN", + "OPENED", + "OPENING", + "ORDERED_NODE_ITERATOR_TYPE", + "ORDERED_NODE_SNAPSHOT_TYPE", + "OUT_OF_MEMORY", + "Object", + "OfflineAudioCompletionEvent", + "OfflineAudioContext", + "OfflineResourceList", + "Option", + "OscillatorNode", + "OverflowEvent", + "PACK_ALIGNMENT", + "PAGE_RULE", + "PARSE_ERR", + "PATHSEG_ARC_ABS", + "PATHSEG_ARC_REL", + "PATHSEG_CLOSEPATH", + "PATHSEG_CURVETO_CUBIC_ABS", + "PATHSEG_CURVETO_CUBIC_REL", + "PATHSEG_CURVETO_CUBIC_SMOOTH_ABS", + "PATHSEG_CURVETO_CUBIC_SMOOTH_REL", + "PATHSEG_CURVETO_QUADRATIC_ABS", + "PATHSEG_CURVETO_QUADRATIC_REL", + "PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS", + "PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL", + "PATHSEG_LINETO_ABS", + "PATHSEG_LINETO_HORIZONTAL_ABS", + "PATHSEG_LINETO_HORIZONTAL_REL", + "PATHSEG_LINETO_REL", + "PATHSEG_LINETO_VERTICAL_ABS", + "PATHSEG_LINETO_VERTICAL_REL", + "PATHSEG_MOVETO_ABS", + "PATHSEG_MOVETO_REL", + "PATHSEG_UNKNOWN", + "PATH_EXISTS_ERR", + "PEAKING", + "PERMISSION_DENIED", + "PERSISTENT", + "PI", + "PLAYING_STATE", + "POINTS", + "POLYGON_OFFSET_FACTOR", + "POLYGON_OFFSET_FILL", + "POLYGON_OFFSET_UNITS", + "POSITION_UNAVAILABLE", + "POSITIVE_INFINITY", + "PREV", + "PREV_NO_DUPLICATE", + "PROCESSING_INSTRUCTION_NODE", + "PageChangeEvent", + "PageTransitionEvent", + "PaintRequest", + "PaintRequestList", + "PannerNode", + "Path2D", + "Performance", + "PerformanceEntry", + "PerformanceMark", + "PerformanceMeasure", + "PerformanceNavigation", + "PerformanceResourceTiming", + "PerformanceTiming", + "PeriodicWave", + "Plugin", + "PluginArray", + "PopStateEvent", + "PopupBlockedEvent", + "ProcessingInstruction", + "ProgressEvent", + "Promise", + "PropertyNodeList", + "Proxy", + "PushManager", + "PushSubscription", + "Q", + "QUOTA_ERR", + "QUOTA_EXCEEDED_ERR", + "QueryInterface", + "READ_ONLY", + "READ_ONLY_ERR", + "READ_WRITE", + "RED_BITS", + "REMOVAL", + "RENDERBUFFER", + "RENDERBUFFER_ALPHA_SIZE", + "RENDERBUFFER_BINDING", + "RENDERBUFFER_BLUE_SIZE", + "RENDERBUFFER_DEPTH_SIZE", + "RENDERBUFFER_GREEN_SIZE", + "RENDERBUFFER_HEIGHT", + "RENDERBUFFER_INTERNAL_FORMAT", + "RENDERBUFFER_RED_SIZE", + "RENDERBUFFER_STENCIL_SIZE", + "RENDERBUFFER_WIDTH", + "RENDERER", + "RENDERING_INTENT_ABSOLUTE_COLORIMETRIC", + "RENDERING_INTENT_AUTO", + "RENDERING_INTENT_PERCEPTUAL", + "RENDERING_INTENT_RELATIVE_COLORIMETRIC", + "RENDERING_INTENT_SATURATION", + "RENDERING_INTENT_UNKNOWN", + "REPEAT", + "REPLACE", + "RGB", + "RGB565", + "RGB5_A1", + "RGBA", + "RGBA4", + "RGBColor", + "ROTATION_CLOCKWISE", + "ROTATION_COUNTERCLOCKWISE", + "RTCDataChannelEvent", + "RTCIceCandidate", + "RTCPeerConnectionIceEvent", + "RTCRtpReceiver", + "RTCRtpSender", + "RTCSessionDescription", + "RTCStatsReport", + "RadioNodeList", + "Range", + "RangeError", + "RangeException", + "RecordErrorEvent", + "Rect", + "ReferenceError", + "RegExp", + "Request", + "Response", + "SAMPLER_2D", + "SAMPLER_CUBE", + "SAMPLES", + "SAMPLE_ALPHA_TO_COVERAGE", + "SAMPLE_BUFFERS", + "SAMPLE_COVERAGE", + "SAMPLE_COVERAGE_INVERT", + "SAMPLE_COVERAGE_VALUE", + "SAWTOOTH", + "SCHEDULED_STATE", + "SCISSOR_BOX", + "SCISSOR_TEST", + "SCROLL_PAGE_DOWN", + "SCROLL_PAGE_UP", + "SDP_ANSWER", + "SDP_OFFER", + "SDP_PRANSWER", + "SECURITY_ERR", + "SELECT", + "SERIALIZE_ERR", + "SEVERITY_ERROR", + "SEVERITY_FATAL_ERROR", + "SEVERITY_WARNING", + "SHADER_COMPILER", + "SHADER_TYPE", + "SHADING_LANGUAGE_VERSION", + "SHIFT_MASK", + "SHORT", + "SHOWING", + "SHOW_ALL", + "SHOW_ATTRIBUTE", + "SHOW_CDATA_SECTION", + "SHOW_COMMENT", + "SHOW_DOCUMENT", + "SHOW_DOCUMENT_FRAGMENT", + "SHOW_DOCUMENT_TYPE", + "SHOW_ELEMENT", + "SHOW_ENTITY", + "SHOW_ENTITY_REFERENCE", + "SHOW_NOTATION", + "SHOW_PROCESSING_INSTRUCTION", + "SHOW_TEXT", + "SINE", + "SOUNDFIELD", + "SQLException", + "SQRT1_2", + "SQRT2", + "SQUARE", + "SRC_ALPHA", + "SRC_ALPHA_SATURATE", + "SRC_COLOR", + "START_TO_END", + "START_TO_START", + "STATIC_DRAW", + "STENCIL_ATTACHMENT", + "STENCIL_BACK_FAIL", + "STENCIL_BACK_FUNC", + "STENCIL_BACK_PASS_DEPTH_FAIL", + "STENCIL_BACK_PASS_DEPTH_PASS", + "STENCIL_BACK_REF", + "STENCIL_BACK_VALUE_MASK", + "STENCIL_BACK_WRITEMASK", + "STENCIL_BITS", + "STENCIL_BUFFER_BIT", + "STENCIL_CLEAR_VALUE", + "STENCIL_FAIL", + "STENCIL_FUNC", + "STENCIL_INDEX", + "STENCIL_INDEX8", + "STENCIL_PASS_DEPTH_FAIL", + "STENCIL_PASS_DEPTH_PASS", + "STENCIL_REF", + "STENCIL_TEST", + "STENCIL_VALUE_MASK", + "STENCIL_WRITEMASK", + "STREAM_DRAW", + "STRING_TYPE", + "STYLE_RULE", + "SUBPIXEL_BITS", + "SUPPORTS_RULE", + "SVGAElement", + "SVGAltGlyphDefElement", + "SVGAltGlyphElement", + "SVGAltGlyphItemElement", + "SVGAngle", + "SVGAnimateColorElement", + "SVGAnimateElement", + "SVGAnimateMotionElement", + "SVGAnimateTransformElement", + "SVGAnimatedAngle", + "SVGAnimatedBoolean", + "SVGAnimatedEnumeration", + "SVGAnimatedInteger", + "SVGAnimatedLength", + "SVGAnimatedLengthList", + "SVGAnimatedNumber", + "SVGAnimatedNumberList", + "SVGAnimatedPreserveAspectRatio", + "SVGAnimatedRect", + "SVGAnimatedString", + "SVGAnimatedTransformList", + "SVGAnimationElement", + "SVGCircleElement", + "SVGClipPathElement", + "SVGColor", + "SVGComponentTransferFunctionElement", + "SVGCursorElement", + "SVGDefsElement", + "SVGDescElement", + "SVGDiscardElement", + "SVGDocument", + "SVGElement", + "SVGElementInstance", + "SVGElementInstanceList", + "SVGEllipseElement", + "SVGException", + "SVGFEBlendElement", + "SVGFEColorMatrixElement", + "SVGFEComponentTransferElement", + "SVGFECompositeElement", + "SVGFEConvolveMatrixElement", + "SVGFEDiffuseLightingElement", + "SVGFEDisplacementMapElement", + "SVGFEDistantLightElement", + "SVGFEDropShadowElement", + "SVGFEFloodElement", + "SVGFEFuncAElement", + "SVGFEFuncBElement", + "SVGFEFuncGElement", + "SVGFEFuncRElement", + "SVGFEGaussianBlurElement", + "SVGFEImageElement", + "SVGFEMergeElement", + "SVGFEMergeNodeElement", + "SVGFEMorphologyElement", + "SVGFEOffsetElement", + "SVGFEPointLightElement", + "SVGFESpecularLightingElement", + "SVGFESpotLightElement", + "SVGFETileElement", + "SVGFETurbulenceElement", + "SVGFilterElement", + "SVGFontElement", + "SVGFontFaceElement", + "SVGFontFaceFormatElement", + "SVGFontFaceNameElement", + "SVGFontFaceSrcElement", + "SVGFontFaceUriElement", + "SVGForeignObjectElement", + "SVGGElement", + "SVGGeometryElement", + "SVGGlyphElement", + "SVGGlyphRefElement", + "SVGGradientElement", + "SVGGraphicsElement", + "SVGHKernElement", + "SVGImageElement", + "SVGLength", + "SVGLengthList", + "SVGLineElement", + "SVGLinearGradientElement", + "SVGMPathElement", + "SVGMarkerElement", + "SVGMaskElement", + "SVGMatrix", + "SVGMetadataElement", + "SVGMissingGlyphElement", + "SVGNumber", + "SVGNumberList", + "SVGPaint", + "SVGPathElement", + "SVGPathSeg", + "SVGPathSegArcAbs", + "SVGPathSegArcRel", + "SVGPathSegClosePath", + "SVGPathSegCurvetoCubicAbs", + "SVGPathSegCurvetoCubicRel", + "SVGPathSegCurvetoCubicSmoothAbs", + "SVGPathSegCurvetoCubicSmoothRel", + "SVGPathSegCurvetoQuadraticAbs", + "SVGPathSegCurvetoQuadraticRel", + "SVGPathSegCurvetoQuadraticSmoothAbs", + "SVGPathSegCurvetoQuadraticSmoothRel", + "SVGPathSegLinetoAbs", + "SVGPathSegLinetoHorizontalAbs", + "SVGPathSegLinetoHorizontalRel", + "SVGPathSegLinetoRel", + "SVGPathSegLinetoVerticalAbs", + "SVGPathSegLinetoVerticalRel", + "SVGPathSegList", + "SVGPathSegMovetoAbs", + "SVGPathSegMovetoRel", + "SVGPatternElement", + "SVGPoint", + "SVGPointList", + "SVGPolygonElement", + "SVGPolylineElement", + "SVGPreserveAspectRatio", + "SVGRadialGradientElement", + "SVGRect", + "SVGRectElement", + "SVGRenderingIntent", + "SVGSVGElement", + "SVGScriptElement", + "SVGSetElement", + "SVGStopElement", + "SVGStringList", + "SVGStyleElement", + "SVGSwitchElement", + "SVGSymbolElement", + "SVGTRefElement", + "SVGTSpanElement", + "SVGTextContentElement", + "SVGTextElement", + "SVGTextPathElement", + "SVGTextPositioningElement", + "SVGTitleElement", + "SVGTransform", + "SVGTransformList", + "SVGUnitTypes", + "SVGUseElement", + "SVGVKernElement", + "SVGViewElement", + "SVGViewSpec", + "SVGZoomAndPan", + "SVGZoomEvent", + "SVG_ANGLETYPE_DEG", + "SVG_ANGLETYPE_GRAD", + "SVG_ANGLETYPE_RAD", + "SVG_ANGLETYPE_UNKNOWN", + "SVG_ANGLETYPE_UNSPECIFIED", + "SVG_CHANNEL_A", + "SVG_CHANNEL_B", + "SVG_CHANNEL_G", + "SVG_CHANNEL_R", + "SVG_CHANNEL_UNKNOWN", + "SVG_COLORTYPE_CURRENTCOLOR", + "SVG_COLORTYPE_RGBCOLOR", + "SVG_COLORTYPE_RGBCOLOR_ICCCOLOR", + "SVG_COLORTYPE_UNKNOWN", + "SVG_EDGEMODE_DUPLICATE", + "SVG_EDGEMODE_NONE", + "SVG_EDGEMODE_UNKNOWN", + "SVG_EDGEMODE_WRAP", + "SVG_FEBLEND_MODE_COLOR", + "SVG_FEBLEND_MODE_COLOR_BURN", + "SVG_FEBLEND_MODE_COLOR_DODGE", + "SVG_FEBLEND_MODE_DARKEN", + "SVG_FEBLEND_MODE_DIFFERENCE", + "SVG_FEBLEND_MODE_EXCLUSION", + "SVG_FEBLEND_MODE_HARD_LIGHT", + "SVG_FEBLEND_MODE_HUE", + "SVG_FEBLEND_MODE_LIGHTEN", + "SVG_FEBLEND_MODE_LUMINOSITY", + "SVG_FEBLEND_MODE_MULTIPLY", + "SVG_FEBLEND_MODE_NORMAL", + "SVG_FEBLEND_MODE_OVERLAY", + "SVG_FEBLEND_MODE_SATURATION", + "SVG_FEBLEND_MODE_SCREEN", + "SVG_FEBLEND_MODE_SOFT_LIGHT", + "SVG_FEBLEND_MODE_UNKNOWN", + "SVG_FECOLORMATRIX_TYPE_HUEROTATE", + "SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA", + "SVG_FECOLORMATRIX_TYPE_MATRIX", + "SVG_FECOLORMATRIX_TYPE_SATURATE", + "SVG_FECOLORMATRIX_TYPE_UNKNOWN", + "SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE", + "SVG_FECOMPONENTTRANSFER_TYPE_GAMMA", + "SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY", + "SVG_FECOMPONENTTRANSFER_TYPE_LINEAR", + "SVG_FECOMPONENTTRANSFER_TYPE_TABLE", + "SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN", + "SVG_FECOMPOSITE_OPERATOR_ARITHMETIC", + "SVG_FECOMPOSITE_OPERATOR_ATOP", + "SVG_FECOMPOSITE_OPERATOR_IN", + "SVG_FECOMPOSITE_OPERATOR_OUT", + "SVG_FECOMPOSITE_OPERATOR_OVER", + "SVG_FECOMPOSITE_OPERATOR_UNKNOWN", + "SVG_FECOMPOSITE_OPERATOR_XOR", + "SVG_INVALID_VALUE_ERR", + "SVG_LENGTHTYPE_CM", + "SVG_LENGTHTYPE_EMS", + "SVG_LENGTHTYPE_EXS", + "SVG_LENGTHTYPE_IN", + "SVG_LENGTHTYPE_MM", + "SVG_LENGTHTYPE_NUMBER", + "SVG_LENGTHTYPE_PC", + "SVG_LENGTHTYPE_PERCENTAGE", + "SVG_LENGTHTYPE_PT", + "SVG_LENGTHTYPE_PX", + "SVG_LENGTHTYPE_UNKNOWN", + "SVG_MARKERUNITS_STROKEWIDTH", + "SVG_MARKERUNITS_UNKNOWN", + "SVG_MARKERUNITS_USERSPACEONUSE", + "SVG_MARKER_ORIENT_ANGLE", + "SVG_MARKER_ORIENT_AUTO", + "SVG_MARKER_ORIENT_UNKNOWN", + "SVG_MASKTYPE_ALPHA", + "SVG_MASKTYPE_LUMINANCE", + "SVG_MATRIX_NOT_INVERTABLE", + "SVG_MEETORSLICE_MEET", + "SVG_MEETORSLICE_SLICE", + "SVG_MEETORSLICE_UNKNOWN", + "SVG_MORPHOLOGY_OPERATOR_DILATE", + "SVG_MORPHOLOGY_OPERATOR_ERODE", + "SVG_MORPHOLOGY_OPERATOR_UNKNOWN", + "SVG_PAINTTYPE_CURRENTCOLOR", + "SVG_PAINTTYPE_NONE", + "SVG_PAINTTYPE_RGBCOLOR", + "SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR", + "SVG_PAINTTYPE_UNKNOWN", + "SVG_PAINTTYPE_URI", + "SVG_PAINTTYPE_URI_CURRENTCOLOR", + "SVG_PAINTTYPE_URI_NONE", + "SVG_PAINTTYPE_URI_RGBCOLOR", + "SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR", + "SVG_PRESERVEASPECTRATIO_NONE", + "SVG_PRESERVEASPECTRATIO_UNKNOWN", + "SVG_PRESERVEASPECTRATIO_XMAXYMAX", + "SVG_PRESERVEASPECTRATIO_XMAXYMID", + "SVG_PRESERVEASPECTRATIO_XMAXYMIN", + "SVG_PRESERVEASPECTRATIO_XMIDYMAX", + "SVG_PRESERVEASPECTRATIO_XMIDYMID", + "SVG_PRESERVEASPECTRATIO_XMIDYMIN", + "SVG_PRESERVEASPECTRATIO_XMINYMAX", + "SVG_PRESERVEASPECTRATIO_XMINYMID", + "SVG_PRESERVEASPECTRATIO_XMINYMIN", + "SVG_SPREADMETHOD_PAD", + "SVG_SPREADMETHOD_REFLECT", + "SVG_SPREADMETHOD_REPEAT", + "SVG_SPREADMETHOD_UNKNOWN", + "SVG_STITCHTYPE_NOSTITCH", + "SVG_STITCHTYPE_STITCH", + "SVG_STITCHTYPE_UNKNOWN", + "SVG_TRANSFORM_MATRIX", + "SVG_TRANSFORM_ROTATE", + "SVG_TRANSFORM_SCALE", + "SVG_TRANSFORM_SKEWX", + "SVG_TRANSFORM_SKEWY", + "SVG_TRANSFORM_TRANSLATE", + "SVG_TRANSFORM_UNKNOWN", + "SVG_TURBULENCE_TYPE_FRACTALNOISE", + "SVG_TURBULENCE_TYPE_TURBULENCE", + "SVG_TURBULENCE_TYPE_UNKNOWN", + "SVG_UNIT_TYPE_OBJECTBOUNDINGBOX", + "SVG_UNIT_TYPE_UNKNOWN", + "SVG_UNIT_TYPE_USERSPACEONUSE", + "SVG_WRONG_TYPE_ERR", + "SVG_ZOOMANDPAN_DISABLE", + "SVG_ZOOMANDPAN_MAGNIFY", + "SVG_ZOOMANDPAN_UNKNOWN", + "SYNTAX_ERR", + "SavedPages", + "Screen", + "ScreenOrientation", + "Script", + "ScriptProcessorNode", + "ScrollAreaEvent", + "SecurityPolicyViolationEvent", + "Selection", + "ServiceWorker", + "ServiceWorkerContainer", + "ServiceWorkerRegistration", + "SessionDescription", + "Set", + "ShadowRoot", + "SharedWorker", + "SimpleGestureEvent", + "SpeechSynthesisEvent", + "SpeechSynthesisUtterance", + "StopIteration", + "Storage", + "StorageEvent", + "String", + "StyleSheet", + "StyleSheetList", + "SubtleCrypto", + "Symbol", + "SyntaxError", + "TEMPORARY", + "TEXTPATH_METHODTYPE_ALIGN", + "TEXTPATH_METHODTYPE_STRETCH", + "TEXTPATH_METHODTYPE_UNKNOWN", + "TEXTPATH_SPACINGTYPE_AUTO", + "TEXTPATH_SPACINGTYPE_EXACT", + "TEXTPATH_SPACINGTYPE_UNKNOWN", + "TEXTURE", + "TEXTURE0", + "TEXTURE1", + "TEXTURE10", + "TEXTURE11", + "TEXTURE12", + "TEXTURE13", + "TEXTURE14", + "TEXTURE15", + "TEXTURE16", + "TEXTURE17", + "TEXTURE18", + "TEXTURE19", + "TEXTURE2", + "TEXTURE20", + "TEXTURE21", + "TEXTURE22", + "TEXTURE23", + "TEXTURE24", + "TEXTURE25", + "TEXTURE26", + "TEXTURE27", + "TEXTURE28", + "TEXTURE29", + "TEXTURE3", + "TEXTURE30", + "TEXTURE31", + "TEXTURE4", + "TEXTURE5", + "TEXTURE6", + "TEXTURE7", + "TEXTURE8", + "TEXTURE9", + "TEXTURE_2D", + "TEXTURE_BINDING_2D", + "TEXTURE_BINDING_CUBE_MAP", + "TEXTURE_CUBE_MAP", + "TEXTURE_CUBE_MAP_NEGATIVE_X", + "TEXTURE_CUBE_MAP_NEGATIVE_Y", + "TEXTURE_CUBE_MAP_NEGATIVE_Z", + "TEXTURE_CUBE_MAP_POSITIVE_X", + "TEXTURE_CUBE_MAP_POSITIVE_Y", + "TEXTURE_CUBE_MAP_POSITIVE_Z", + "TEXTURE_MAG_FILTER", + "TEXTURE_MAX_ANISOTROPY_EXT", + "TEXTURE_MIN_FILTER", + "TEXTURE_WRAP_S", + "TEXTURE_WRAP_T", + "TEXT_NODE", + "TIMEOUT", + "TIMEOUT_ERR", + "TOO_LARGE_ERR", + "TRANSACTION_INACTIVE_ERR", + "TRIANGLE", + "TRIANGLES", + "TRIANGLE_FAN", + "TRIANGLE_STRIP", + "TYPE_BACK_FORWARD", + "TYPE_ERR", + "TYPE_MISMATCH_ERR", + "TYPE_NAVIGATE", + "TYPE_RELOAD", + "TYPE_RESERVED", + "Text", + "TextDecoder", + "TextEncoder", + "TextEvent", + "TextMetrics", + "TextTrack", + "TextTrackCue", + "TextTrackCueList", + "TextTrackList", + "TimeEvent", + "TimeRanges", + "Touch", + "TouchEvent", + "TouchList", + "TrackEvent", + "TransitionEvent", + "TreeWalker", + "TypeError", + "UIEvent", + "UNCACHED", + "UNKNOWN_ERR", + "UNKNOWN_RULE", + "UNMASKED_RENDERER_WEBGL", + "UNMASKED_VENDOR_WEBGL", + "UNORDERED_NODE_ITERATOR_TYPE", + "UNORDERED_NODE_SNAPSHOT_TYPE", + "UNPACK_ALIGNMENT", + "UNPACK_COLORSPACE_CONVERSION_WEBGL", + "UNPACK_FLIP_Y_WEBGL", + "UNPACK_PREMULTIPLY_ALPHA_WEBGL", + "UNSCHEDULED_STATE", + "UNSENT", + "UNSIGNED_BYTE", + "UNSIGNED_INT", + "UNSIGNED_SHORT", + "UNSIGNED_SHORT_4_4_4_4", + "UNSIGNED_SHORT_5_5_5_1", + "UNSIGNED_SHORT_5_6_5", + "UNSPECIFIED_EVENT_TYPE_ERR", + "UPDATEREADY", + "URIError", + "URL", + "URLSearchParams", + "URLUnencoded", + "URL_MISMATCH_ERR", + "UTC", + "Uint16Array", + "Uint32Array", + "Uint8Array", + "Uint8ClampedArray", + "UserMessageHandler", + "UserMessageHandlersNamespace", + "UserProximityEvent", + "VALIDATE_STATUS", + "VALIDATION_ERR", + "VARIABLES_RULE", + "VENDOR", + "VERSION", + "VERSION_CHANGE", + "VERSION_ERR", + "VERTEX_ATTRIB_ARRAY_BUFFER_BINDING", + "VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE", + "VERTEX_ATTRIB_ARRAY_ENABLED", + "VERTEX_ATTRIB_ARRAY_NORMALIZED", + "VERTEX_ATTRIB_ARRAY_POINTER", + "VERTEX_ATTRIB_ARRAY_SIZE", + "VERTEX_ATTRIB_ARRAY_STRIDE", + "VERTEX_ATTRIB_ARRAY_TYPE", + "VERTEX_SHADER", + "VERTICAL", + "VERTICAL_AXIS", + "VER_ERR", + "VIEWPORT", + "VIEWPORT_RULE", + "VTTCue", + "VTTRegion", + "ValidityState", + "VideoStreamTrack", + "WEBKIT_FILTER_RULE", + "WEBKIT_KEYFRAMES_RULE", + "WEBKIT_KEYFRAME_RULE", + "WEBKIT_REGION_RULE", + "WRONG_DOCUMENT_ERR", + "WaveShaperNode", + "WeakMap", + "WeakSet", + "WebGLActiveInfo", + "WebGLBuffer", + "WebGLContextEvent", + "WebGLFramebuffer", + "WebGLProgram", + "WebGLRenderbuffer", + "WebGLRenderingContext", + "WebGLShader", + "WebGLShaderPrecisionFormat", + "WebGLTexture", + "WebGLUniformLocation", + "WebGLVertexArray", + "WebKitAnimationEvent", + "WebKitBlobBuilder", + "WebKitCSSFilterRule", + "WebKitCSSFilterValue", + "WebKitCSSKeyframeRule", + "WebKitCSSKeyframesRule", + "WebKitCSSMatrix", + "WebKitCSSRegionRule", + "WebKitCSSTransformValue", + "WebKitDataCue", + "WebKitGamepad", + "WebKitMediaKeyError", + "WebKitMediaKeyMessageEvent", + "WebKitMediaKeySession", + "WebKitMediaKeys", + "WebKitMediaSource", + "WebKitMutationObserver", + "WebKitNamespace", + "WebKitPlaybackTargetAvailabilityEvent", + "WebKitPoint", + "WebKitShadowRoot", + "WebKitSourceBuffer", + "WebKitSourceBufferList", + "WebKitTransitionEvent", + "WebSocket", + "WheelEvent", + "Window", + "Worker", + "XMLDocument", + "XMLHttpRequest", + "XMLHttpRequestEventTarget", + "XMLHttpRequestException", + "XMLHttpRequestProgressEvent", + "XMLHttpRequestUpload", + "XMLSerializer", + "XMLStylesheetProcessingInstruction", + "XPathEvaluator", + "XPathException", + "XPathExpression", + "XPathNSResolver", + "XPathResult", + "XSLTProcessor", + "ZERO", + "_XD0M_", + "_YD0M_", + "__defineGetter__", + "__defineSetter__", + "__lookupGetter__", + "__lookupSetter__", + "__opera", + "__proto__", + "_browserjsran", + "a", + "aLink", + "abbr", + "abort", + "abs", + "absolute", + "acceleration", + "accelerationIncludingGravity", + "accelerator", + "accept", + "acceptCharset", + "acceptNode", + "accessKey", + "accessKeyLabel", + "accuracy", + "acos", + "acosh", + "action", + "actionURL", + "active", + "activeCues", + "activeElement", + "activeSourceBuffers", + "activeSourceCount", + "activeTexture", + "add", + "addBehavior", + "addCandidate", + "addColorStop", + "addCue", + "addElement", + "addEventListener", + "addFilter", + "addFromString", + "addFromUri", + "addIceCandidate", + "addImport", + "addListener", + "addNamed", + "addPageRule", + "addPath", + "addPointer", + "addRange", + "addRegion", + "addRule", + "addSearchEngine", + "addSourceBuffer", + "addStream", + "addTextTrack", + "addTrack", + "addWakeLockListener", + "addedNodes", + "additionalName", + "additiveSymbols", + "addons", + "adoptNode", + "adr", + "advance", + "alert", + "algorithm", + "align", + "align-content", + "align-items", + "align-self", + "alignContent", + "alignItems", + "alignSelf", + "alignmentBaseline", + "alinkColor", + "all", + "allowFullscreen", + "allowedDirections", + "alpha", + "alt", + "altGraphKey", + "altHtml", + "altKey", + "altLeft", + "altitude", + "altitudeAccuracy", + "amplitude", + "ancestorOrigins", + "anchor", + "anchorNode", + "anchorOffset", + "anchors", + "angle", + "animVal", + "animate", + "animatedInstanceRoot", + "animatedNormalizedPathSegList", + "animatedPathSegList", + "animatedPoints", + "animation", + "animation-delay", + "animation-direction", + "animation-duration", + "animation-fill-mode", + "animation-iteration-count", + "animation-name", + "animation-play-state", + "animation-timing-function", + "animationDelay", + "animationDirection", + "animationDuration", + "animationFillMode", + "animationIterationCount", + "animationName", + "animationPlayState", + "animationStartTime", + "animationTimingFunction", + "animationsPaused", + "anniversary", + "app", + "appCodeName", + "appMinorVersion", + "appName", + "appNotifications", + "appVersion", + "append", + "appendBuffer", + "appendChild", + "appendData", + "appendItem", + "appendMedium", + "appendNamed", + "appendRule", + "appendStream", + "appendWindowEnd", + "appendWindowStart", + "applets", + "applicationCache", + "apply", + "applyElement", + "arc", + "arcTo", + "archive", + "areas", + "arguments", + "arrayBuffer", + "asin", + "asinh", + "assert", + "assign", + "async", + "atEnd", + "atan", + "atan2", + "atanh", + "atob", + "attachEvent", + "attachShader", + "attachments", + "attack", + "attrChange", + "attrName", + "attributeName", + "attributeNamespace", + "attributes", + "audioTracks", + "autoIncrement", + "autobuffer", + "autocapitalize", + "autocomplete", + "autocorrect", + "autofocus", + "autoplay", + "availHeight", + "availLeft", + "availTop", + "availWidth", + "availability", + "available", + "aversion", + "axes", + "axis", + "azimuth", + "b", + "back", + "backface-visibility", + "backfaceVisibility", + "background", + "background-attachment", + "background-blend-mode", + "background-clip", + "background-color", + "background-image", + "background-origin", + "background-position", + "background-repeat", + "background-size", + "backgroundAttachment", + "backgroundBlendMode", + "backgroundClip", + "backgroundColor", + "backgroundImage", + "backgroundOrigin", + "backgroundPosition", + "backgroundPositionX", + "backgroundPositionY", + "backgroundRepeat", + "backgroundSize", + "badInput", + "balance", + "baseFrequencyX", + "baseFrequencyY", + "baseNode", + "baseOffset", + "baseURI", + "baseVal", + "baselineShift", + "battery", + "bday", + "beginElement", + "beginElementAt", + "beginPath", + "behavior", + "behaviorCookie", + "behaviorPart", + "behaviorUrns", + "beta", + "bezierCurveTo", + "bgColor", + "bgProperties", + "bias", + "big", + "binaryType", + "bind", + "bindAttribLocation", + "bindBuffer", + "bindFramebuffer", + "bindRenderbuffer", + "bindTexture", + "blendColor", + "blendEquation", + "blendEquationSeparate", + "blendFunc", + "blendFuncSeparate", + "blink", + "blob", + "blockDirection", + "blue", + "blur", + "body", + "bodyUsed", + "bold", + "bookmarks", + "booleanValue", + "border", + "border-bottom", + "border-bottom-color", + "border-bottom-left-radius", + "border-bottom-right-radius", + "border-bottom-style", + "border-bottom-width", + "border-collapse", + "border-color", + "border-image", + "border-image-outset", + "border-image-repeat", + "border-image-slice", + "border-image-source", + "border-image-width", + "border-left", + "border-left-color", + "border-left-style", + "border-left-width", + "border-radius", + "border-right", + "border-right-color", + "border-right-style", + "border-right-width", + "border-spacing", + "border-style", + "border-top", + "border-top-color", + "border-top-left-radius", + "border-top-right-radius", + "border-top-style", + "border-top-width", + "border-width", + "borderBottom", + "borderBottomColor", + "borderBottomLeftRadius", + "borderBottomRightRadius", + "borderBottomStyle", + "borderBottomWidth", + "borderCollapse", + "borderColor", + "borderColorDark", + "borderColorLight", + "borderImage", + "borderImageOutset", + "borderImageRepeat", + "borderImageSlice", + "borderImageSource", + "borderImageWidth", + "borderLeft", + "borderLeftColor", + "borderLeftStyle", + "borderLeftWidth", + "borderRadius", + "borderRight", + "borderRightColor", + "borderRightStyle", + "borderRightWidth", + "borderSpacing", + "borderStyle", + "borderTop", + "borderTopColor", + "borderTopLeftRadius", + "borderTopRightRadius", + "borderTopStyle", + "borderTopWidth", + "borderWidth", + "bottom", + "bottomMargin", + "bound", + "boundElements", + "boundingClientRect", + "boundingHeight", + "boundingLeft", + "boundingTop", + "boundingWidth", + "bounds", + "box-decoration-break", + "box-shadow", + "box-sizing", + "boxDecorationBreak", + "boxShadow", + "boxSizing", + "breakAfter", + "breakBefore", + "breakInside", + "browserLanguage", + "btoa", + "bubbles", + "buffer", + "bufferData", + "bufferDepth", + "bufferSize", + "bufferSubData", + "buffered", + "bufferedAmount", + "buildID", + "buildNumber", + "button", + "buttonID", + "buttons", + "byteLength", + "byteOffset", + "c", + "call", + "caller", + "canBeFormatted", + "canBeMounted", + "canBeShared", + "canHaveChildren", + "canHaveHTML", + "canPlayType", + "cancel", + "cancelAnimationFrame", + "cancelBubble", + "cancelScheduledValues", + "cancelable", + "candidate", + "canvas", + "caption", + "caption-side", + "captionSide", + "captureEvents", + "captureStackTrace", + "caretPositionFromPoint", + "caretRangeFromPoint", + "cast", + "catch", + "category", + "cbrt", + "cd", + "ceil", + "cellIndex", + "cellPadding", + "cellSpacing", + "cells", + "ch", + "chOff", + "chain", + "challenge", + "changedTouches", + "channel", + "channelCount", + "channelCountMode", + "channelInterpretation", + "char", + "charAt", + "charCode", + "charCodeAt", + "charIndex", + "characterSet", + "charging", + "chargingTime", + "charset", + "checkEnclosure", + "checkFramebufferStatus", + "checkIntersection", + "checkValidity", + "checked", + "childElementCount", + "childNodes", + "children", + "chrome", + "ciphertext", + "cite", + "classList", + "className", + "classid", + "clear", + "clearAttributes", + "clearColor", + "clearData", + "clearDepth", + "clearImmediate", + "clearInterval", + "clearMarks", + "clearMeasures", + "clearParameters", + "clearRect", + "clearResourceTimings", + "clearShadow", + "clearStencil", + "clearTimeout", + "clearWatch", + "click", + "clickCount", + "clientHeight", + "clientInformation", + "clientLeft", + "clientRect", + "clientRects", + "clientTop", + "clientWidth", + "clientX", + "clientY", + "clip", + "clip-path", + "clip-rule", + "clipBottom", + "clipLeft", + "clipPath", + "clipPathUnits", + "clipRight", + "clipRule", + "clipTop", + "clipboardData", + "clone", + "cloneContents", + "cloneNode", + "cloneRange", + "close", + "closePath", + "closed", + "closest", + "clz", + "clz32", + "cmp", + "code", + "codeBase", + "codePointAt", + "codeType", + "colSpan", + "collapse", + "collapseToEnd", + "collapseToStart", + "collapsed", + "collect", + "colno", + "color", + "color-interpolation", + "color-interpolation-filters", + "colorDepth", + "colorInterpolation", + "colorInterpolationFilters", + "colorMask", + "colorType", + "cols", + "columnCount", + "columnFill", + "columnGap", + "columnNumber", + "columnRule", + "columnRuleColor", + "columnRuleStyle", + "columnRuleWidth", + "columnSpan", + "columnWidth", + "columns", + "command", + "commitPreferences", + "commonAncestorContainer", + "compact", + "compareBoundaryPoints", + "compareDocumentPosition", + "compareEndPoints", + "compareNode", + "comparePoint", + "compatMode", + "compatible", + "compile", + "compileShader", + "complete", + "componentFromPoint", + "compositionEndOffset", + "compositionStartOffset", + "compressedTexImage2D", + "compressedTexSubImage2D", + "concat", + "conditionText", + "coneInnerAngle", + "coneOuterAngle", + "coneOuterGain", + "confirm", + "confirmComposition", + "confirmSiteSpecificTrackingException", + "confirmWebWideTrackingException", + "connect", + "connectEnd", + "connectStart", + "connected", + "connection", + "connectionSpeed", + "console", + "consolidate", + "constrictionActive", + "constructor", + "contactID", + "contains", + "containsNode", + "content", + "contentDocument", + "contentEditable", + "contentOverflow", + "contentScriptType", + "contentStyleType", + "contentType", + "contentWindow", + "context", + "contextMenu", + "contextmenu", + "continue", + "continuous", + "control", + "controller", + "controls", + "convertToSpecifiedUnits", + "cookie", + "cookieEnabled", + "coords", + "copyFromChannel", + "copyTexImage2D", + "copyTexSubImage2D", + "copyToChannel", + "copyWithin", + "correspondingElement", + "correspondingUseElement", + "cos", + "cosh", + "count", + "counter-increment", + "counter-reset", + "counterIncrement", + "counterReset", + "cpuClass", + "cpuSleepAllowed", + "create", + "createAnalyser", + "createAnswer", + "createAttribute", + "createAttributeNS", + "createBiquadFilter", + "createBuffer", + "createBufferSource", + "createCDATASection", + "createCSSStyleSheet", + "createCaption", + "createChannelMerger", + "createChannelSplitter", + "createComment", + "createContextualFragment", + "createControlRange", + "createConvolver", + "createDTMFSender", + "createDataChannel", + "createDelay", + "createDelayNode", + "createDocument", + "createDocumentFragment", + "createDocumentType", + "createDynamicsCompressor", + "createElement", + "createElementNS", + "createEntityReference", + "createEvent", + "createEventObject", + "createExpression", + "createFramebuffer", + "createFunction", + "createGain", + "createGainNode", + "createHTMLDocument", + "createImageBitmap", + "createImageData", + "createIndex", + "createJavaScriptNode", + "createLinearGradient", + "createMediaElementSource", + "createMediaKeys", + "createMediaStreamDestination", + "createMediaStreamSource", + "createMutableFile", + "createNSResolver", + "createNodeIterator", + "createNotification", + "createObjectStore", + "createObjectURL", + "createOffer", + "createOscillator", + "createPanner", + "createPattern", + "createPeriodicWave", + "createPopup", + "createProcessingInstruction", + "createProgram", + "createRadialGradient", + "createRange", + "createRangeCollection", + "createRenderbuffer", + "createSVGAngle", + "createSVGLength", + "createSVGMatrix", + "createSVGNumber", + "createSVGPathSegArcAbs", + "createSVGPathSegArcRel", + "createSVGPathSegClosePath", + "createSVGPathSegCurvetoCubicAbs", + "createSVGPathSegCurvetoCubicRel", + "createSVGPathSegCurvetoCubicSmoothAbs", + "createSVGPathSegCurvetoCubicSmoothRel", + "createSVGPathSegCurvetoQuadraticAbs", + "createSVGPathSegCurvetoQuadraticRel", + "createSVGPathSegCurvetoQuadraticSmoothAbs", + "createSVGPathSegCurvetoQuadraticSmoothRel", + "createSVGPathSegLinetoAbs", + "createSVGPathSegLinetoHorizontalAbs", + "createSVGPathSegLinetoHorizontalRel", + "createSVGPathSegLinetoRel", + "createSVGPathSegLinetoVerticalAbs", + "createSVGPathSegLinetoVerticalRel", + "createSVGPathSegMovetoAbs", + "createSVGPathSegMovetoRel", + "createSVGPoint", + "createSVGRect", + "createSVGTransform", + "createSVGTransformFromMatrix", + "createScriptProcessor", + "createSession", + "createShader", + "createShadowRoot", + "createStereoPanner", + "createStyleSheet", + "createTBody", + "createTFoot", + "createTHead", + "createTextNode", + "createTextRange", + "createTexture", + "createTouch", + "createTouchList", + "createTreeWalker", + "createWaveShaper", + "creationTime", + "crossOrigin", + "crypto", + "csi", + "cssFloat", + "cssRules", + "cssText", + "cssValueType", + "ctrlKey", + "ctrlLeft", + "cues", + "cullFace", + "currentNode", + "currentPage", + "currentScale", + "currentScript", + "currentSrc", + "currentState", + "currentStyle", + "currentTarget", + "currentTime", + "currentTranslate", + "currentView", + "cursor", + "curve", + "customError", + "cx", + "cy", + "d", + "data", + "dataFld", + "dataFormatAs", + "dataPageSize", + "dataSrc", + "dataTransfer", + "database", + "dataset", + "dateTime", + "db", + "debug", + "debuggerEnabled", + "declare", + "decode", + "decodeAudioData", + "decodeURI", + "decodeURIComponent", + "decrypt", + "default", + "defaultCharset", + "defaultChecked", + "defaultMuted", + "defaultPlaybackRate", + "defaultPrevented", + "defaultSelected", + "defaultStatus", + "defaultURL", + "defaultValue", + "defaultView", + "defaultstatus", + "defer", + "defineMagicFunction", + "defineMagicVariable", + "defineProperties", + "defineProperty", + "delayTime", + "delete", + "deleteBuffer", + "deleteCaption", + "deleteCell", + "deleteContents", + "deleteData", + "deleteDatabase", + "deleteFramebuffer", + "deleteFromDocument", + "deleteIndex", + "deleteMedium", + "deleteObjectStore", + "deleteProgram", + "deleteRenderbuffer", + "deleteRow", + "deleteRule", + "deleteShader", + "deleteTFoot", + "deleteTHead", + "deleteTexture", + "deliverChangeRecords", + "delivery", + "deliveryInfo", + "deliveryStatus", + "deliveryTimestamp", + "delta", + "deltaMode", + "deltaX", + "deltaY", + "deltaZ", + "depthFunc", + "depthMask", + "depthRange", + "deriveBits", + "deriveKey", + "description", + "deselectAll", + "designMode", + "destination", + "destinationURL", + "detach", + "detachEvent", + "detachShader", + "detail", + "detune", + "devicePixelRatio", + "deviceXDPI", + "deviceYDPI", + "diffuseConstant", + "digest", + "dimensions", + "dir", + "dirName", + "direction", + "dirxml", + "disable", + "disableVertexAttribArray", + "disabled", + "dischargingTime", + "disconnect", + "dispatchEvent", + "display", + "distanceModel", + "divisor", + "djsapi", + "djsproxy", + "doImport", + "doNotTrack", + "doScroll", + "doctype", + "document", + "documentElement", + "documentMode", + "documentURI", + "dolphin", + "dolphinGameCenter", + "dolphininfo", + "dolphinmeta", + "domComplete", + "domContentLoadedEventEnd", + "domContentLoadedEventStart", + "domInteractive", + "domLoading", + "domain", + "domainLookupEnd", + "domainLookupStart", + "dominant-baseline", + "dominantBaseline", + "done", + "dopplerFactor", + "download", + "dragDrop", + "draggable", + "drawArrays", + "drawArraysInstancedANGLE", + "drawCustomFocusRing", + "drawElements", + "drawElementsInstancedANGLE", + "drawFocusIfNeeded", + "drawImage", + "drawImageFromRect", + "drawSystemFocusRing", + "drawingBufferHeight", + "drawingBufferWidth", + "dropEffect", + "droppedVideoFrames", + "dropzone", + "dump", + "duplicate", + "duration", + "dvname", + "dvnum", + "dx", + "dy", + "dynsrc", + "e", + "edgeMode", + "effectAllowed", + "elapsedTime", + "elementFromPoint", + "elements", + "elevation", + "ellipse", + "email", + "embeds", + "empty", + "empty-cells", + "emptyCells", + "enable", + "enableBackground", + "enableStyleSheetsForSet", + "enableVertexAttribArray", + "enabled", + "enabledPlugin", + "encode", + "encodeURI", + "encodeURIComponent", + "encoding", + "encrypt", + "enctype", + "end", + "endContainer", + "endElement", + "endElementAt", + "endOfStream", + "endOffset", + "endTime", + "ended", + "endsWith", + "entities", + "entries", + "entryType", + "enumerate", + "enumerateEditable", + "error", + "errorCode", + "escape", + "eval", + "evaluate", + "event", + "eventPhase", + "every", + "exception", + "exec", + "execCommand", + "execCommandShowHelp", + "execScript", + "exitFullscreen", + "exitPointerLock", + "exp", + "expand", + "expandEntityReferences", + "expando", + "expansion", + "expiryDate", + "explicitOriginalTarget", + "expm1", + "exponent", + "exponentialRampToValueAtTime", + "exportKey", + "extend", + "extensions", + "extentNode", + "extentOffset", + "external", + "externalResourcesRequired", + "extractContents", + "extractable", + "f", + "face", + "factoryReset", + "fallback", + "familyName", + "farthestViewportElement", + "fastSeek", + "fatal", + "fetch", + "fetchStart", + "fftSize", + "fgColor", + "fileCreatedDate", + "fileHandle", + "fileModifiedDate", + "fileName", + "fileSize", + "fileUpdatedDate", + "filename", + "files", + "fill", + "fill-opacity", + "fill-rule", + "fillOpacity", + "fillRect", + "fillRule", + "fillStyle", + "fillText", + "filter", + "filterResX", + "filterResY", + "filterUnits", + "filters", + "find", + "findIndex", + "findRule", + "findText", + "finish", + "fireEvent", + "firstChild", + "firstElementChild", + "firstPage", + "fixed", + "flex", + "flex-basis", + "flex-direction", + "flex-flow", + "flex-grow", + "flex-shrink", + "flex-wrap", + "flexBasis", + "flexDirection", + "flexFlow", + "flexGrow", + "flexShrink", + "flexWrap", + "flipX", + "flipY", + "float", + "flood-color", + "flood-opacity", + "floodColor", + "floodOpacity", + "floor", + "flush", + "focus", + "focusNode", + "focusOffset", + "font", + "font-family", + "font-feature-settings", + "font-kerning", + "font-language-override", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-synthesis", + "font-variant", + "font-variant-alternates", + "font-variant-caps", + "font-variant-east-asian", + "font-variant-ligatures", + "font-variant-numeric", + "font-variant-position", + "font-weight", + "fontFamily", + "fontFeatureSettings", + "fontKerning", + "fontLanguageOverride", + "fontSize", + "fontSizeAdjust", + "fontSmoothingEnabled", + "fontStretch", + "fontStyle", + "fontSynthesis", + "fontVariant", + "fontVariantAlternates", + "fontVariantCaps", + "fontVariantEastAsian", + "fontVariantLigatures", + "fontVariantNumeric", + "fontVariantPosition", + "fontWeight", + "fontcolor", + "fonts", + "fontsize", + "for", + "forEach", + "forceRedraw", + "form", + "formAction", + "formEnctype", + "formMethod", + "formNoValidate", + "formTarget", + "format", + "forms", + "forward", + "fr", + "frame", + "frameBorder", + "frameElement", + "frameSpacing", + "framebufferRenderbuffer", + "framebufferTexture2D", + "frames", + "freeSpace", + "freeze", + "frequency", + "frequencyBinCount", + "from", + "fromCharCode", + "fromCodePoint", + "fromElement", + "frontFace", + "fround", + "fullScreen", + "fullscreenElement", + "fullscreenEnabled", + "fx", + "fy", + "gain", + "gamepad", + "gamma", + "genderIdentity", + "generateKey", + "generateMipmap", + "generateRequest", + "geolocation", + "gestureObject", + "get", + "getActiveAttrib", + "getActiveUniform", + "getAdjacentText", + "getAll", + "getAllResponseHeaders", + "getAsFile", + "getAsString", + "getAttachedShaders", + "getAttribLocation", + "getAttribute", + "getAttributeNS", + "getAttributeNode", + "getAttributeNodeNS", + "getAudioTracks", + "getBBox", + "getBattery", + "getBlob", + "getBookmark", + "getBoundingClientRect", + "getBufferParameter", + "getByteFrequencyData", + "getByteTimeDomainData", + "getCSSCanvasContext", + "getCTM", + "getCandidateWindowClientRect", + "getChannelData", + "getCharNumAtPosition", + "getClientRect", + "getClientRects", + "getCompositionAlternatives", + "getComputedStyle", + "getComputedTextLength", + "getConfiguration", + "getContext", + "getContextAttributes", + "getCounterValue", + "getCueAsHTML", + "getCueById", + "getCurrentPosition", + "getCurrentTime", + "getData", + "getDatabaseNames", + "getDate", + "getDay", + "getDefaultComputedStyle", + "getDestinationInsertionPoints", + "getDistributedNodes", + "getEditable", + "getElementById", + "getElementsByClassName", + "getElementsByName", + "getElementsByTagName", + "getElementsByTagNameNS", + "getEnclosureList", + "getEndPositionOfChar", + "getEntries", + "getEntriesByName", + "getEntriesByType", + "getError", + "getExtension", + "getExtentOfChar", + "getFeature", + "getFile", + "getFloat32", + "getFloat64", + "getFloatFrequencyData", + "getFloatTimeDomainData", + "getFloatValue", + "getFramebufferAttachmentParameter", + "getFrequencyResponse", + "getFullYear", + "getGamepads", + "getHours", + "getImageData", + "getInt16", + "getInt32", + "getInt8", + "getIntersectionList", + "getItem", + "getItems", + "getKey", + "getLineDash", + "getLocalStreams", + "getMarks", + "getMatchedCSSRules", + "getMeasures", + "getMetadata", + "getMilliseconds", + "getMinutes", + "getModifierState", + "getMonth", + "getNamedItem", + "getNamedItemNS", + "getNotifier", + "getNumberOfChars", + "getOverrideHistoryNavigationMode", + "getOverrideStyle", + "getOwnPropertyDescriptor", + "getOwnPropertyNames", + "getOwnPropertySymbols", + "getParameter", + "getPathSegAtLength", + "getPointAtLength", + "getPreference", + "getPreferenceDefault", + "getPresentationAttribute", + "getPreventDefault", + "getProgramInfoLog", + "getProgramParameter", + "getPropertyCSSValue", + "getPropertyPriority", + "getPropertyShorthand", + "getPropertyValue", + "getPrototypeOf", + "getRGBColorValue", + "getRandomValues", + "getRangeAt", + "getReceivers", + "getRectValue", + "getRegistration", + "getRemoteStreams", + "getRenderbufferParameter", + "getResponseHeader", + "getRoot", + "getRotationOfChar", + "getSVGDocument", + "getScreenCTM", + "getSeconds", + "getSelection", + "getSenders", + "getShaderInfoLog", + "getShaderParameter", + "getShaderPrecisionFormat", + "getShaderSource", + "getSimpleDuration", + "getSiteIcons", + "getSources", + "getSpeculativeParserUrls", + "getStartPositionOfChar", + "getStartTime", + "getStats", + "getStorageUpdates", + "getStreamById", + "getStringValue", + "getSubStringLength", + "getSubscription", + "getSupportedExtensions", + "getTexParameter", + "getTime", + "getTimezoneOffset", + "getTotalLength", + "getTrackById", + "getTracks", + "getTransformToElement", + "getUTCDate", + "getUTCDay", + "getUTCFullYear", + "getUTCHours", + "getUTCMilliseconds", + "getUTCMinutes", + "getUTCMonth", + "getUTCSeconds", + "getUint16", + "getUint32", + "getUint8", + "getUniform", + "getUniformLocation", + "getUserMedia", + "getValues", + "getVarDate", + "getVariableValue", + "getVertexAttrib", + "getVertexAttribOffset", + "getVideoPlaybackQuality", + "getVideoTracks", + "getWakeLockState", + "getYear", + "givenName", + "global", + "globalAlpha", + "globalCompositeOperation", + "glyphOrientationHorizontal", + "glyphOrientationVertical", + "glyphRef", + "go", + "gradientTransform", + "gradientUnits", + "grammars", + "green", + "group", + "groupCollapsed", + "groupEnd", + "hardwareConcurrency", + "has", + "hasAttribute", + "hasAttributeNS", + "hasAttributes", + "hasChildNodes", + "hasComposition", + "hasExtension", + "hasFeature", + "hasFocus", + "hasLayout", + "hasOwnProperty", + "hash", + "head", + "headers", + "heading", + "height", + "hidden", + "hide", + "hideFocus", + "high", + "hint", + "history", + "honorificPrefix", + "honorificSuffix", + "horizontalOverflow", + "host", + "hostname", + "href", + "hreflang", + "hspace", + "html5TagCheckInerface", + "htmlFor", + "htmlText", + "httpEquiv", + "hwTimestamp", + "hypot", + "iccId", + "iceConnectionState", + "iceGatheringState", + "icon", + "id", + "identifier", + "identity", + "ignoreBOM", + "ignoreCase", + "image-orientation", + "image-rendering", + "imageOrientation", + "imageRendering", + "images", + "ime-mode", + "imeMode", + "implementation", + "importKey", + "importNode", + "importStylesheet", + "imports", + "impp", + "imul", + "in1", + "in2", + "inBandMetadataTrackDispatchType", + "inRange", + "includes", + "incremental", + "indeterminate", + "index", + "indexNames", + "indexOf", + "indexedDB", + "inertiaDestinationX", + "inertiaDestinationY", + "info", + "init", + "initAnimationEvent", + "initBeforeLoadEvent", + "initClipboardEvent", + "initCloseEvent", + "initCommandEvent", + "initCompositionEvent", + "initCustomEvent", + "initData", + "initDeviceMotionEvent", + "initDeviceOrientationEvent", + "initDragEvent", + "initErrorEvent", + "initEvent", + "initFocusEvent", + "initGestureEvent", + "initHashChangeEvent", + "initKeyEvent", + "initKeyboardEvent", + "initMSManipulationEvent", + "initMessageEvent", + "initMouseEvent", + "initMouseScrollEvent", + "initMouseWheelEvent", + "initMutationEvent", + "initNSMouseEvent", + "initOverflowEvent", + "initPageEvent", + "initPageTransitionEvent", + "initPointerEvent", + "initPopStateEvent", + "initProgressEvent", + "initScrollAreaEvent", + "initSimpleGestureEvent", + "initStorageEvent", + "initTextEvent", + "initTimeEvent", + "initTouchEvent", + "initTransitionEvent", + "initUIEvent", + "initWebKitAnimationEvent", + "initWebKitTransitionEvent", + "initWebKitWheelEvent", + "initWheelEvent", + "initialTime", + "initialize", + "initiatorType", + "inner", + "innerHTML", + "innerHeight", + "innerText", + "innerWidth", + "input", + "inputBuffer", + "inputEncoding", + "inputMethod", + "insertAdjacentElement", + "insertAdjacentHTML", + "insertAdjacentText", + "insertBefore", + "insertCell", + "insertData", + "insertItemBefore", + "insertNode", + "insertRow", + "insertRule", + "instanceRoot", + "intercept", + "interimResults", + "internalSubset", + "intersectsNode", + "interval", + "invalidIteratorState", + "inverse", + "invertSelf", + "is", + "is2D", + "isAlternate", + "isArray", + "isBingCurrentSearchDefault", + "isBuffer", + "isCandidateWindowVisible", + "isChar", + "isCollapsed", + "isComposing", + "isContentEditable", + "isContentHandlerRegistered", + "isContextLost", + "isDefaultNamespace", + "isDisabled", + "isEnabled", + "isEqual", + "isEqualNode", + "isExtensible", + "isFinite", + "isFramebuffer", + "isFrozen", + "isGenerator", + "isId", + "isInjected", + "isInteger", + "isMap", + "isMultiLine", + "isNaN", + "isOpen", + "isPointInFill", + "isPointInPath", + "isPointInRange", + "isPointInStroke", + "isPrefAlternate", + "isPrimary", + "isProgram", + "isPropertyImplicit", + "isProtocolHandlerRegistered", + "isPrototypeOf", + "isRenderbuffer", + "isSafeInteger", + "isSameNode", + "isSealed", + "isShader", + "isSupported", + "isTextEdit", + "isTexture", + "isTrusted", + "isTypeSupported", + "isView", + "isolation", + "italics", + "item", + "itemId", + "itemProp", + "itemRef", + "itemScope", + "itemType", + "itemValue", + "iterateNext", + "iterator", + "javaEnabled", + "jobTitle", + "join", + "json", + "justify-content", + "justifyContent", + "k1", + "k2", + "k3", + "k4", + "kernelMatrix", + "kernelUnitLengthX", + "kernelUnitLengthY", + "kerning", + "key", + "keyCode", + "keyFor", + "keyIdentifier", + "keyLightEnabled", + "keyLocation", + "keyPath", + "keySystem", + "keyText", + "keyUsage", + "keys", + "keytype", + "kind", + "knee", + "label", + "labels", + "lang", + "language", + "languages", + "largeArcFlag", + "lastChild", + "lastElementChild", + "lastEventId", + "lastIndex", + "lastIndexOf", + "lastMatch", + "lastMessageSubject", + "lastMessageType", + "lastModified", + "lastModifiedDate", + "lastPage", + "lastParen", + "lastState", + "lastStyleSheetSet", + "latitude", + "layerX", + "layerY", + "layoutFlow", + "layoutGrid", + "layoutGridChar", + "layoutGridLine", + "layoutGridMode", + "layoutGridType", + "lbound", + "left", + "leftContext", + "leftMargin", + "length", + "lengthAdjust", + "lengthComputable", + "letter-spacing", + "letterSpacing", + "level", + "lighting-color", + "lightingColor", + "limitingConeAngle", + "line", + "line-height", + "lineAlign", + "lineBreak", + "lineCap", + "lineDashOffset", + "lineHeight", + "lineJoin", + "lineNumber", + "lineTo", + "lineWidth", + "linearRampToValueAtTime", + "lineno", + "link", + "linkColor", + "linkProgram", + "links", + "list", + "list-style", + "list-style-image", + "list-style-position", + "list-style-type", + "listStyle", + "listStyleImage", + "listStylePosition", + "listStyleType", + "listener", + "load", + "loadEventEnd", + "loadEventStart", + "loadTimes", + "loaded", + "localDescription", + "localName", + "localStorage", + "locale", + "localeCompare", + "location", + "locationbar", + "lock", + "lockedFile", + "log", + "log10", + "log1p", + "log2", + "logicalXDPI", + "logicalYDPI", + "longDesc", + "longitude", + "lookupNamespaceURI", + "lookupPrefix", + "loop", + "loopEnd", + "loopStart", + "looping", + "low", + "lower", + "lowerBound", + "lowerOpen", + "lowsrc", + "m11", + "m12", + "m13", + "m14", + "m21", + "m22", + "m23", + "m24", + "m31", + "m32", + "m33", + "m34", + "m41", + "m42", + "m43", + "m44", + "manifest", + "map", + "mapping", + "margin", + "margin-bottom", + "margin-left", + "margin-right", + "margin-top", + "marginBottom", + "marginHeight", + "marginLeft", + "marginRight", + "marginTop", + "marginWidth", + "mark", + "marker", + "marker-end", + "marker-mid", + "marker-offset", + "marker-start", + "markerEnd", + "markerHeight", + "markerMid", + "markerOffset", + "markerStart", + "markerUnits", + "markerWidth", + "marks", + "mask", + "mask-type", + "maskContentUnits", + "maskType", + "maskUnits", + "match", + "matchMedia", + "matchMedium", + "matches", + "matrix", + "matrixTransform", + "max", + "max-height", + "max-width", + "maxAlternatives", + "maxChannelCount", + "maxConnectionsPerServer", + "maxDecibels", + "maxDistance", + "maxHeight", + "maxLength", + "maxTouchPoints", + "maxValue", + "maxWidth", + "measure", + "measureText", + "media", + "mediaDevices", + "mediaElement", + "mediaGroup", + "mediaKeys", + "mediaText", + "meetOrSlice", + "memory", + "menubar", + "mergeAttributes", + "message", + "messageClass", + "messageHandlers", + "metaKey", + "method", + "mimeType", + "mimeTypes", + "min", + "min-height", + "min-width", + "minDecibels", + "minHeight", + "minValue", + "minWidth", + "miterLimit", + "mix-blend-mode", + "mixBlendMode", + "mode", + "modify", + "mount", + "move", + "moveBy", + "moveEnd", + "moveFirst", + "moveFocusDown", + "moveFocusLeft", + "moveFocusRight", + "moveFocusUp", + "moveNext", + "moveRow", + "moveStart", + "moveTo", + "moveToBookmark", + "moveToElementText", + "moveToPoint", + "mozAdd", + "mozAnimationStartTime", + "mozAnon", + "mozApps", + "mozAudioCaptured", + "mozAudioChannelType", + "mozAutoplayEnabled", + "mozCancelAnimationFrame", + "mozCancelFullScreen", + "mozCancelRequestAnimationFrame", + "mozCaptureStream", + "mozCaptureStreamUntilEnded", + "mozClearDataAt", + "mozContact", + "mozContacts", + "mozCreateFileHandle", + "mozCurrentTransform", + "mozCurrentTransformInverse", + "mozCursor", + "mozDash", + "mozDashOffset", + "mozDecodedFrames", + "mozExitPointerLock", + "mozFillRule", + "mozFragmentEnd", + "mozFrameDelay", + "mozFullScreen", + "mozFullScreenElement", + "mozFullScreenEnabled", + "mozGetAll", + "mozGetAllKeys", + "mozGetAsFile", + "mozGetDataAt", + "mozGetMetadata", + "mozGetUserMedia", + "mozHasAudio", + "mozHasItem", + "mozHidden", + "mozImageSmoothingEnabled", + "mozIndexedDB", + "mozInnerScreenX", + "mozInnerScreenY", + "mozInputSource", + "mozIsTextField", + "mozItem", + "mozItemCount", + "mozItems", + "mozLength", + "mozLockOrientation", + "mozMatchesSelector", + "mozMovementX", + "mozMovementY", + "mozOpaque", + "mozOrientation", + "mozPaintCount", + "mozPaintedFrames", + "mozParsedFrames", + "mozPay", + "mozPointerLockElement", + "mozPresentedFrames", + "mozPreservesPitch", + "mozPressure", + "mozPrintCallback", + "mozRTCIceCandidate", + "mozRTCPeerConnection", + "mozRTCSessionDescription", + "mozRemove", + "mozRequestAnimationFrame", + "mozRequestFullScreen", + "mozRequestPointerLock", + "mozSetDataAt", + "mozSetImageElement", + "mozSourceNode", + "mozSrcObject", + "mozSystem", + "mozTCPSocket", + "mozTextStyle", + "mozTypesAt", + "mozUnlockOrientation", + "mozUserCancelled", + "mozVisibilityState", + "msAnimation", + "msAnimationDelay", + "msAnimationDirection", + "msAnimationDuration", + "msAnimationFillMode", + "msAnimationIterationCount", + "msAnimationName", + "msAnimationPlayState", + "msAnimationStartTime", + "msAnimationTimingFunction", + "msBackfaceVisibility", + "msBlockProgression", + "msCSSOMElementFloatMetrics", + "msCaching", + "msCachingEnabled", + "msCancelRequestAnimationFrame", + "msCapsLockWarningOff", + "msClearImmediate", + "msClose", + "msContentZoomChaining", + "msContentZoomFactor", + "msContentZoomLimit", + "msContentZoomLimitMax", + "msContentZoomLimitMin", + "msContentZoomSnap", + "msContentZoomSnapPoints", + "msContentZoomSnapType", + "msContentZooming", + "msConvertURL", + "msCrypto", + "msDoNotTrack", + "msElementsFromPoint", + "msElementsFromRect", + "msExitFullscreen", + "msExtendedCode", + "msFillRule", + "msFirstPaint", + "msFlex", + "msFlexAlign", + "msFlexDirection", + "msFlexFlow", + "msFlexItemAlign", + "msFlexLinePack", + "msFlexNegative", + "msFlexOrder", + "msFlexPack", + "msFlexPositive", + "msFlexPreferredSize", + "msFlexWrap", + "msFlowFrom", + "msFlowInto", + "msFontFeatureSettings", + "msFullscreenElement", + "msFullscreenEnabled", + "msGetInputContext", + "msGetRegionContent", + "msGetUntransformedBounds", + "msGraphicsTrustStatus", + "msGridColumn", + "msGridColumnAlign", + "msGridColumnSpan", + "msGridColumns", + "msGridRow", + "msGridRowAlign", + "msGridRowSpan", + "msGridRows", + "msHidden", + "msHighContrastAdjust", + "msHyphenateLimitChars", + "msHyphenateLimitLines", + "msHyphenateLimitZone", + "msHyphens", + "msImageSmoothingEnabled", + "msImeAlign", + "msIndexedDB", + "msInterpolationMode", + "msIsStaticHTML", + "msKeySystem", + "msKeys", + "msLaunchUri", + "msLockOrientation", + "msManipulationViewsEnabled", + "msMatchMedia", + "msMatchesSelector", + "msMaxTouchPoints", + "msOrientation", + "msOverflowStyle", + "msPerspective", + "msPerspectiveOrigin", + "msPlayToDisabled", + "msPlayToPreferredSourceUri", + "msPlayToPrimary", + "msPointerEnabled", + "msRegionOverflow", + "msReleasePointerCapture", + "msRequestAnimationFrame", + "msRequestFullscreen", + "msSaveBlob", + "msSaveOrOpenBlob", + "msScrollChaining", + "msScrollLimit", + "msScrollLimitXMax", + "msScrollLimitXMin", + "msScrollLimitYMax", + "msScrollLimitYMin", + "msScrollRails", + "msScrollSnapPointsX", + "msScrollSnapPointsY", + "msScrollSnapType", + "msScrollSnapX", + "msScrollSnapY", + "msScrollTranslation", + "msSetImmediate", + "msSetMediaKeys", + "msSetPointerCapture", + "msTextCombineHorizontal", + "msTextSizeAdjust", + "msToBlob", + "msTouchAction", + "msTouchSelect", + "msTraceAsyncCallbackCompleted", + "msTraceAsyncCallbackStarting", + "msTraceAsyncOperationCompleted", + "msTraceAsyncOperationStarting", + "msTransform", + "msTransformOrigin", + "msTransformStyle", + "msTransition", + "msTransitionDelay", + "msTransitionDuration", + "msTransitionProperty", + "msTransitionTimingFunction", + "msUnlockOrientation", + "msUpdateAsyncCallbackRelation", + "msUserSelect", + "msVisibilityState", + "msWrapFlow", + "msWrapMargin", + "msWrapThrough", + "msWriteProfilerMark", + "msZoom", + "msZoomTo", + "mt", + "multiEntry", + "multiSelectionObj", + "multiline", + "multiple", + "multiply", + "multiplySelf", + "mutableFile", + "muted", + "n", + "name", + "nameProp", + "namedItem", + "namedRecordset", + "names", + "namespaceURI", + "namespaces", + "naturalHeight", + "naturalWidth", + "navigate", + "navigation", + "navigationMode", + "navigationStart", + "navigator", + "near", + "nearestViewportElement", + "negative", + "netscape", + "networkState", + "newScale", + "newTranslate", + "newURL", + "newValue", + "newValueSpecifiedUnits", + "newVersion", + "newhome", + "next", + "nextElementSibling", + "nextNode", + "nextPage", + "nextSibling", + "nickname", + "noHref", + "noResize", + "noShade", + "noValidate", + "noWrap", + "nodeName", + "nodeType", + "nodeValue", + "normalize", + "normalizedPathSegList", + "notationName", + "notations", + "note", + "noteGrainOn", + "noteOff", + "noteOn", + "now", + "numOctaves", + "number", + "numberOfChannels", + "numberOfInputs", + "numberOfItems", + "numberOfOutputs", + "numberValue", + "oMatchesSelector", + "object", + "object-fit", + "object-position", + "objectFit", + "objectPosition", + "objectStore", + "objectStoreNames", + "observe", + "of", + "offscreenBuffering", + "offset", + "offsetHeight", + "offsetLeft", + "offsetNode", + "offsetParent", + "offsetTop", + "offsetWidth", + "offsetX", + "offsetY", + "ok", + "oldURL", + "oldValue", + "oldVersion", + "olderShadowRoot", + "onLine", + "onabort", + "onactivate", + "onactive", + "onaddstream", + "onaddtrack", + "onafterprint", + "onafterscriptexecute", + "onafterupdate", + "onaudioend", + "onaudioprocess", + "onaudiostart", + "onautocomplete", + "onautocompleteerror", + "onbeforeactivate", + "onbeforecopy", + "onbeforecut", + "onbeforedeactivate", + "onbeforeeditfocus", + "onbeforepaste", + "onbeforeprint", + "onbeforescriptexecute", + "onbeforeunload", + "onbeforeupdate", + "onblocked", + "onblur", + "onbounce", + "onboundary", + "oncached", + "oncancel", + "oncandidatewindowhide", + "oncandidatewindowshow", + "oncandidatewindowupdate", + "oncanplay", + "oncanplaythrough", + "oncellchange", + "onchange", + "onchargingchange", + "onchargingtimechange", + "onchecking", + "onclick", + "onclose", + "oncompassneedscalibration", + "oncomplete", + "oncontextmenu", + "oncontrolselect", + "oncopy", + "oncuechange", + "oncut", + "ondataavailable", + "ondatachannel", + "ondatasetchanged", + "ondatasetcomplete", + "ondblclick", + "ondeactivate", + "ondevicelight", + "ondevicemotion", + "ondeviceorientation", + "ondeviceproximity", + "ondischargingtimechange", + "ondisplay", + "ondownloading", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onencrypted", + "onend", + "onended", + "onenter", + "onerror", + "onerrorupdate", + "onexit", + "onfilterchange", + "onfinish", + "onfocus", + "onfocusin", + "onfocusout", + "onfullscreenchange", + "onfullscreenerror", + "ongesturechange", + "ongestureend", + "ongesturestart", + "ongotpointercapture", + "onhashchange", + "onhelp", + "onicecandidate", + "oniceconnectionstatechange", + "oninactive", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onlanguagechange", + "onlayoutcomplete", + "onlevelchange", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadend", + "onloadstart", + "onlosecapture", + "onlostpointercapture", + "only", + "onmark", + "onmessage", + "onmousedown", + "onmouseenter", + "onmouseleave", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onmove", + "onmoveend", + "onmovestart", + "onmozfullscreenchange", + "onmozfullscreenerror", + "onmozorientationchange", + "onmozpointerlockchange", + "onmozpointerlockerror", + "onmscontentzoom", + "onmsfullscreenchange", + "onmsfullscreenerror", + "onmsgesturechange", + "onmsgesturedoubletap", + "onmsgestureend", + "onmsgesturehold", + "onmsgesturestart", + "onmsgesturetap", + "onmsgotpointercapture", + "onmsinertiastart", + "onmslostpointercapture", + "onmsmanipulationstatechanged", + "onmsneedkey", + "onmsorientationchange", + "onmspointercancel", + "onmspointerdown", + "onmspointerenter", + "onmspointerhover", + "onmspointerleave", + "onmspointermove", + "onmspointerout", + "onmspointerover", + "onmspointerup", + "onmssitemodejumplistitemremoved", + "onmsthumbnailclick", + "onnegotiationneeded", + "onnomatch", + "onnoupdate", + "onobsolete", + "onoffline", + "ononline", + "onopen", + "onorientationchange", + "onpagechange", + "onpagehide", + "onpageshow", + "onpaste", + "onpause", + "onplay", + "onplaying", + "onpluginstreamstart", + "onpointercancel", + "onpointerdown", + "onpointerenter", + "onpointerleave", + "onpointerlockchange", + "onpointerlockerror", + "onpointermove", + "onpointerout", + "onpointerover", + "onpointerup", + "onpopstate", + "onprogress", + "onpropertychange", + "onratechange", + "onreadystatechange", + "onremovestream", + "onremovetrack", + "onreset", + "onresize", + "onresizeend", + "onresizestart", + "onresourcetimingbufferfull", + "onresult", + "onresume", + "onrowenter", + "onrowexit", + "onrowsdelete", + "onrowsinserted", + "onscroll", + "onsearch", + "onseeked", + "onseeking", + "onselect", + "onselectionchange", + "onselectstart", + "onshow", + "onsignalingstatechange", + "onsoundend", + "onsoundstart", + "onspeechend", + "onspeechstart", + "onstalled", + "onstart", + "onstatechange", + "onstop", + "onstorage", + "onstoragecommit", + "onsubmit", + "onsuccess", + "onsuspend", + "ontextinput", + "ontimeout", + "ontimeupdate", + "ontoggle", + "ontouchcancel", + "ontouchend", + "ontouchmove", + "ontouchstart", + "ontransitionend", + "onunload", + "onupdateready", + "onupgradeneeded", + "onuserproximity", + "onversionchange", + "onvoiceschanged", + "onvolumechange", + "onwaiting", + "onwarning", + "onwebkitanimationend", + "onwebkitanimationiteration", + "onwebkitanimationstart", + "onwebkitcurrentplaybacktargetiswirelesschanged", + "onwebkitfullscreenchange", + "onwebkitfullscreenerror", + "onwebkitkeyadded", + "onwebkitkeyerror", + "onwebkitkeymessage", + "onwebkitneedkey", + "onwebkitorientationchange", + "onwebkitplaybacktargetavailabilitychanged", + "onwebkitpointerlockchange", + "onwebkitpointerlockerror", + "onwebkitresourcetimingbufferfull", + "onwebkittransitionend", + "onwheel", + "onzoom", + "opacity", + "open", + "openCursor", + "openDatabase", + "openKeyCursor", + "opener", + "opera", + "operationType", + "operator", + "opr", + "optimum", + "options", + "order", + "orderX", + "orderY", + "ordered", + "org", + "orient", + "orientAngle", + "orientType", + "orientation", + "origin", + "originalTarget", + "orphans", + "oscpu", + "outerHTML", + "outerHeight", + "outerText", + "outerWidth", + "outline", + "outline-color", + "outline-offset", + "outline-style", + "outline-width", + "outlineColor", + "outlineOffset", + "outlineStyle", + "outlineWidth", + "outputBuffer", + "overflow", + "overflow-x", + "overflow-y", + "overflowX", + "overflowY", + "overrideMimeType", + "oversample", + "ownerDocument", + "ownerElement", + "ownerNode", + "ownerRule", + "ownerSVGElement", + "owningElement", + "p1", + "p2", + "p3", + "p4", + "pad", + "padding", + "padding-bottom", + "padding-left", + "padding-right", + "padding-top", + "paddingBottom", + "paddingLeft", + "paddingRight", + "paddingTop", + "page", + "page-break-after", + "page-break-before", + "page-break-inside", + "pageBreakAfter", + "pageBreakBefore", + "pageBreakInside", + "pageCount", + "pageX", + "pageXOffset", + "pageY", + "pageYOffset", + "pages", + "paint-order", + "paintOrder", + "paintRequests", + "paintType", + "palette", + "panningModel", + "parent", + "parentElement", + "parentNode", + "parentRule", + "parentStyleSheet", + "parentTextEdit", + "parentWindow", + "parse", + "parseFloat", + "parseFromString", + "parseInt", + "participants", + "password", + "pasteHTML", + "path", + "pathLength", + "pathSegList", + "pathSegType", + "pathSegTypeAsLetter", + "pathname", + "pattern", + "patternContentUnits", + "patternMismatch", + "patternTransform", + "patternUnits", + "pause", + "pauseAnimations", + "pauseOnExit", + "paused", + "pending", + "performance", + "permission", + "persisted", + "personalbar", + "perspective", + "perspective-origin", + "perspectiveOrigin", + "phoneticFamilyName", + "phoneticGivenName", + "photo", + "ping", + "pitch", + "pixelBottom", + "pixelDepth", + "pixelHeight", + "pixelLeft", + "pixelRight", + "pixelStorei", + "pixelTop", + "pixelUnitToMillimeterX", + "pixelUnitToMillimeterY", + "pixelWidth", + "placeholder", + "platform", + "play", + "playbackRate", + "playbackState", + "playbackTime", + "played", + "plugins", + "pluginspage", + "pname", + "pointer-events", + "pointerBeforeReferenceNode", + "pointerEnabled", + "pointerEvents", + "pointerId", + "pointerLockElement", + "pointerType", + "points", + "pointsAtX", + "pointsAtY", + "pointsAtZ", + "polygonOffset", + "pop", + "popupWindowFeatures", + "popupWindowName", + "popupWindowURI", + "port", + "port1", + "port2", + "ports", + "posBottom", + "posHeight", + "posLeft", + "posRight", + "posTop", + "posWidth", + "position", + "positionAlign", + "postError", + "postMessage", + "poster", + "pow", + "powerOff", + "preMultiplySelf", + "precision", + "preferredStyleSheetSet", + "preferredStylesheetSet", + "prefix", + "preload", + "preserveAlpha", + "preserveAspectRatio", + "preserveAspectRatioString", + "pressed", + "pressure", + "prevValue", + "preventDefault", + "preventExtensions", + "previousElementSibling", + "previousNode", + "previousPage", + "previousScale", + "previousSibling", + "previousTranslate", + "primaryKey", + "primitiveType", + "primitiveUnits", + "principals", + "print", + "privateKey", + "probablySupportsContext", + "process", + "processIceMessage", + "product", + "productSub", + "profile", + "profileEnd", + "profiles", + "prompt", + "properties", + "propertyIsEnumerable", + "propertyName", + "protocol", + "protocolLong", + "prototype", + "pseudoClass", + "pseudoElement", + "publicId", + "publicKey", + "published", + "push", + "pushNotification", + "pushState", + "put", + "putImageData", + "quadraticCurveTo", + "qualifier", + "queryCommandEnabled", + "queryCommandIndeterm", + "queryCommandState", + "queryCommandSupported", + "queryCommandText", + "queryCommandValue", + "querySelector", + "querySelectorAll", + "quote", + "quotes", + "r", + "r1", + "r2", + "race", + "radiogroup", + "radiusX", + "radiusY", + "random", + "range", + "rangeCount", + "rangeMax", + "rangeMin", + "rangeOffset", + "rangeOverflow", + "rangeParent", + "rangeUnderflow", + "rate", + "ratio", + "raw", + "read", + "readAsArrayBuffer", + "readAsBinaryString", + "readAsBlob", + "readAsDataURL", + "readAsText", + "readOnly", + "readPixels", + "readReportRequested", + "readyState", + "reason", + "reboot", + "receiver", + "receivers", + "recordNumber", + "recordset", + "rect", + "red", + "redirectCount", + "redirectEnd", + "redirectStart", + "reduce", + "reduceRight", + "reduction", + "refDistance", + "refX", + "refY", + "referenceNode", + "referrer", + "refresh", + "region", + "regionAnchorX", + "regionAnchorY", + "regionId", + "regions", + "register", + "registerContentHandler", + "registerElement", + "registerProtocolHandler", + "reject", + "rel", + "relList", + "relatedNode", + "relatedTarget", + "release", + "releaseCapture", + "releaseEvents", + "releasePointerCapture", + "releaseShaderCompiler", + "reliable", + "reload", + "remainingSpace", + "remoteDescription", + "remove", + "removeAllRanges", + "removeAttribute", + "removeAttributeNS", + "removeAttributeNode", + "removeBehavior", + "removeChild", + "removeCue", + "removeEventListener", + "removeFilter", + "removeImport", + "removeItem", + "removeListener", + "removeNamedItem", + "removeNamedItemNS", + "removeNode", + "removeParameter", + "removeProperty", + "removeRange", + "removeRegion", + "removeRule", + "removeSiteSpecificTrackingException", + "removeSourceBuffer", + "removeStream", + "removeTrack", + "removeVariable", + "removeWakeLockListener", + "removeWebWideTrackingException", + "removedNodes", + "renderbufferStorage", + "renderedBuffer", + "renderingMode", + "repeat", + "replace", + "replaceAdjacentText", + "replaceChild", + "replaceData", + "replaceId", + "replaceItem", + "replaceNode", + "replaceState", + "replaceTrack", + "replaceWholeText", + "reportValidity", + "requestAnimationFrame", + "requestAutocomplete", + "requestData", + "requestFullscreen", + "requestMediaKeySystemAccess", + "requestPermission", + "requestPointerLock", + "requestStart", + "requestingWindow", + "required", + "requiredExtensions", + "requiredFeatures", + "reset", + "resetTransform", + "resize", + "resizeBy", + "resizeTo", + "resolve", + "response", + "responseBody", + "responseEnd", + "responseStart", + "responseText", + "responseType", + "responseURL", + "responseXML", + "restore", + "result", + "resultType", + "resume", + "returnValue", + "rev", + "reverse", + "reversed", + "revocable", + "revokeObjectURL", + "rgbColor", + "right", + "rightContext", + "rightMargin", + "rolloffFactor", + "root", + "rootElement", + "rotate", + "rotateAxisAngle", + "rotateAxisAngleSelf", + "rotateFromVector", + "rotateFromVectorSelf", + "rotateSelf", + "rotation", + "rotationRate", + "round", + "rowIndex", + "rowSpan", + "rows", + "rubyAlign", + "rubyOverhang", + "rubyPosition", + "rules", + "runtime", + "runtimeStyle", + "rx", + "ry", + "safari", + "sampleCoverage", + "sampleRate", + "sandbox", + "save", + "scale", + "scale3d", + "scale3dSelf", + "scaleNonUniform", + "scaleNonUniformSelf", + "scaleSelf", + "scheme", + "scissor", + "scope", + "scopeName", + "scoped", + "screen", + "screenBrightness", + "screenEnabled", + "screenLeft", + "screenPixelToMillimeterX", + "screenPixelToMillimeterY", + "screenTop", + "screenX", + "screenY", + "scripts", + "scroll", + "scroll-behavior", + "scrollAmount", + "scrollBehavior", + "scrollBy", + "scrollByLines", + "scrollByPages", + "scrollDelay", + "scrollHeight", + "scrollIntoView", + "scrollIntoViewIfNeeded", + "scrollLeft", + "scrollLeftMax", + "scrollMaxX", + "scrollMaxY", + "scrollTo", + "scrollTop", + "scrollTopMax", + "scrollWidth", + "scrollX", + "scrollY", + "scrollbar3dLightColor", + "scrollbarArrowColor", + "scrollbarBaseColor", + "scrollbarDarkShadowColor", + "scrollbarFaceColor", + "scrollbarHighlightColor", + "scrollbarShadowColor", + "scrollbarTrackColor", + "scrollbars", + "scrolling", + "sdp", + "sdpMLineIndex", + "sdpMid", + "seal", + "search", + "searchBox", + "searchBoxJavaBridge_", + "searchParams", + "sectionRowIndex", + "secureConnectionStart", + "security", + "seed", + "seekable", + "seeking", + "select", + "selectAllChildren", + "selectNode", + "selectNodeContents", + "selectNodes", + "selectSingleNode", + "selectSubString", + "selected", + "selectedIndex", + "selectedOptions", + "selectedStyleSheetSet", + "selectedStylesheetSet", + "selection", + "selectionDirection", + "selectionEnd", + "selectionStart", + "selector", + "selectorText", + "self", + "send", + "sendAsBinary", + "sendBeacon", + "sender", + "sentTimestamp", + "separator", + "serializeToString", + "serviceWorker", + "sessionId", + "sessionStorage", + "set", + "setActive", + "setAlpha", + "setAttribute", + "setAttributeNS", + "setAttributeNode", + "setAttributeNodeNS", + "setBaseAndExtent", + "setBingCurrentSearchDefault", + "setCapture", + "setColor", + "setCompositeOperation", + "setCurrentTime", + "setCustomValidity", + "setData", + "setDate", + "setDragImage", + "setEnd", + "setEndAfter", + "setEndBefore", + "setEndPoint", + "setFillColor", + "setFilterRes", + "setFloat32", + "setFloat64", + "setFloatValue", + "setFullYear", + "setHours", + "setImmediate", + "setInt16", + "setInt32", + "setInt8", + "setInterval", + "setItem", + "setLineCap", + "setLineDash", + "setLineJoin", + "setLineWidth", + "setLocalDescription", + "setMatrix", + "setMatrixValue", + "setMediaKeys", + "setMilliseconds", + "setMinutes", + "setMiterLimit", + "setMonth", + "setNamedItem", + "setNamedItemNS", + "setNonUserCodeExceptions", + "setOrientToAngle", + "setOrientToAuto", + "setOrientation", + "setOverrideHistoryNavigationMode", + "setPaint", + "setParameter", + "setPeriodicWave", + "setPointerCapture", + "setPosition", + "setPreference", + "setProperty", + "setPrototypeOf", + "setRGBColor", + "setRGBColorICCColor", + "setRadius", + "setRangeText", + "setRemoteDescription", + "setRequestHeader", + "setResizable", + "setResourceTimingBufferSize", + "setRotate", + "setScale", + "setSeconds", + "setSelectionRange", + "setServerCertificate", + "setShadow", + "setSkewX", + "setSkewY", + "setStart", + "setStartAfter", + "setStartBefore", + "setStdDeviation", + "setStringValue", + "setStrokeColor", + "setSuggestResult", + "setTargetAtTime", + "setTargetValueAtTime", + "setTime", + "setTimeout", + "setTransform", + "setTranslate", + "setUTCDate", + "setUTCFullYear", + "setUTCHours", + "setUTCMilliseconds", + "setUTCMinutes", + "setUTCMonth", + "setUTCSeconds", + "setUint16", + "setUint32", + "setUint8", + "setUri", + "setValueAtTime", + "setValueCurveAtTime", + "setVariable", + "setVelocity", + "setVersion", + "setYear", + "settingName", + "settingValue", + "sex", + "shaderSource", + "shadowBlur", + "shadowColor", + "shadowOffsetX", + "shadowOffsetY", + "shadowRoot", + "shape", + "shape-rendering", + "shapeRendering", + "sheet", + "shift", + "shiftKey", + "shiftLeft", + "show", + "showHelp", + "showModal", + "showModalDialog", + "showModelessDialog", + "showNotification", + "sidebar", + "sign", + "signalingState", + "sin", + "singleNodeValue", + "sinh", + "size", + "sizeToContent", + "sizes", + "skewX", + "skewXSelf", + "skewY", + "skewYSelf", + "slice", + "slope", + "small", + "smil", + "smoothingTimeConstant", + "snapToLines", + "snapshotItem", + "snapshotLength", + "some", + "sort", + "source", + "sourceBuffer", + "sourceBuffers", + "sourceIndex", + "spacing", + "span", + "speakAs", + "speaking", + "specified", + "specularConstant", + "specularExponent", + "speechSynthesis", + "speed", + "speedOfSound", + "spellcheck", + "splice", + "split", + "splitText", + "spreadMethod", + "sqrt", + "src", + "srcElement", + "srcFilter", + "srcUrn", + "srcdoc", + "srclang", + "srcset", + "stack", + "stackTraceLimit", + "stacktrace", + "standalone", + "standby", + "start", + "startContainer", + "startIce", + "startOffset", + "startRendering", + "startTime", + "startsWith", + "state", + "status", + "statusMessage", + "statusText", + "statusbar", + "stdDeviationX", + "stdDeviationY", + "stencilFunc", + "stencilFuncSeparate", + "stencilMask", + "stencilMaskSeparate", + "stencilOp", + "stencilOpSeparate", + "step", + "stepDown", + "stepMismatch", + "stepUp", + "sticky", + "stitchTiles", + "stop", + "stop-color", + "stop-opacity", + "stopColor", + "stopImmediatePropagation", + "stopOpacity", + "stopPropagation", + "storageArea", + "storageName", + "storageStatus", + "storeSiteSpecificTrackingException", + "storeWebWideTrackingException", + "stpVersion", + "stream", + "strike", + "stringValue", + "stringify", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "strokeDasharray", + "strokeDashoffset", + "strokeLinecap", + "strokeLinejoin", + "strokeMiterlimit", + "strokeOpacity", + "strokeRect", + "strokeStyle", + "strokeText", + "strokeWidth", + "style", + "styleFloat", + "styleMedia", + "styleSheet", + "styleSheetSets", + "styleSheets", + "sub", + "subarray", + "subject", + "submit", + "subscribe", + "substr", + "substring", + "substringData", + "subtle", + "suffix", + "suffixes", + "summary", + "sup", + "supports", + "surfaceScale", + "surroundContents", + "suspend", + "suspendRedraw", + "swapCache", + "swapNode", + "sweepFlag", + "symbols", + "system", + "systemCode", + "systemId", + "systemLanguage", + "systemXDPI", + "systemYDPI", + "tBodies", + "tFoot", + "tHead", + "tabIndex", + "table", + "table-layout", + "tableLayout", + "tableValues", + "tag", + "tagName", + "tagUrn", + "tags", + "taintEnabled", + "takeRecords", + "tan", + "tanh", + "target", + "targetElement", + "targetTouches", + "targetX", + "targetY", + "tel", + "terminate", + "test", + "texImage2D", + "texParameterf", + "texParameteri", + "texSubImage2D", + "text", + "text-align", + "text-anchor", + "text-decoration", + "text-decoration-color", + "text-decoration-line", + "text-decoration-style", + "text-indent", + "text-overflow", + "text-rendering", + "text-shadow", + "text-transform", + "textAlign", + "textAlignLast", + "textAnchor", + "textAutospace", + "textBaseline", + "textContent", + "textDecoration", + "textDecorationBlink", + "textDecorationColor", + "textDecorationLine", + "textDecorationLineThrough", + "textDecorationNone", + "textDecorationOverline", + "textDecorationStyle", + "textDecorationUnderline", + "textIndent", + "textJustify", + "textJustifyTrim", + "textKashida", + "textKashidaSpace", + "textLength", + "textOverflow", + "textRendering", + "textShadow", + "textTracks", + "textTransform", + "textUnderlinePosition", + "then", + "threadId", + "threshold", + "tiltX", + "tiltY", + "time", + "timeEnd", + "timeStamp", + "timeout", + "timestamp", + "timestampOffset", + "timing", + "title", + "toArray", + "toBlob", + "toDataURL", + "toDateString", + "toElement", + "toExponential", + "toFixed", + "toFloat32Array", + "toFloat64Array", + "toGMTString", + "toISOString", + "toJSON", + "toLocaleDateString", + "toLocaleFormat", + "toLocaleLowerCase", + "toLocaleString", + "toLocaleTimeString", + "toLocaleUpperCase", + "toLowerCase", + "toMethod", + "toPrecision", + "toSdp", + "toSource", + "toStaticHTML", + "toString", + "toStringTag", + "toTimeString", + "toUTCString", + "toUpperCase", + "toggle", + "toggleLongPressEnabled", + "tooLong", + "toolbar", + "top", + "topMargin", + "total", + "totalFrameDelay", + "totalVideoFrames", + "touchAction", + "touches", + "trace", + "track", + "transaction", + "transactions", + "transform", + "transform-origin", + "transform-style", + "transformOrigin", + "transformPoint", + "transformString", + "transformStyle", + "transformToDocument", + "transformToFragment", + "transition", + "transition-delay", + "transition-duration", + "transition-property", + "transition-timing-function", + "transitionDelay", + "transitionDuration", + "transitionProperty", + "transitionTimingFunction", + "translate", + "translateSelf", + "translationX", + "translationY", + "trim", + "trimLeft", + "trimRight", + "trueSpeed", + "trunc", + "truncate", + "type", + "typeDetail", + "typeMismatch", + "typeMustMatch", + "types", + "ubound", + "undefined", + "unescape", + "uneval", + "unicode-bidi", + "unicodeBidi", + "uniform1f", + "uniform1fv", + "uniform1i", + "uniform1iv", + "uniform2f", + "uniform2fv", + "uniform2i", + "uniform2iv", + "uniform3f", + "uniform3fv", + "uniform3i", + "uniform3iv", + "uniform4f", + "uniform4fv", + "uniform4i", + "uniform4iv", + "uniformMatrix2fv", + "uniformMatrix3fv", + "uniformMatrix4fv", + "unique", + "uniqueID", + "uniqueNumber", + "unitType", + "units", + "unloadEventEnd", + "unloadEventStart", + "unlock", + "unmount", + "unobserve", + "unpause", + "unpauseAnimations", + "unreadCount", + "unregister", + "unregisterContentHandler", + "unregisterProtocolHandler", + "unscopables", + "unselectable", + "unshift", + "unsubscribe", + "unsuspendRedraw", + "unsuspendRedrawAll", + "unwatch", + "unwrapKey", + "update", + "updateCommands", + "updateIce", + "updateInterval", + "updateSettings", + "updated", + "updating", + "upload", + "upper", + "upperBound", + "upperOpen", + "uri", + "url", + "urn", + "urns", + "usages", + "useCurrentView", + "useMap", + "useProgram", + "usedSpace", + "userAgent", + "userLanguage", + "username", + "v8BreakIterator", + "vAlign", + "vLink", + "valid", + "validateProgram", + "validationMessage", + "validity", + "value", + "valueAsDate", + "valueAsNumber", + "valueAsString", + "valueInSpecifiedUnits", + "valueMissing", + "valueOf", + "valueText", + "valueType", + "values", + "vector-effect", + "vectorEffect", + "velocityAngular", + "velocityExpansion", + "velocityX", + "velocityY", + "vendor", + "vendorSub", + "verify", + "version", + "vertexAttrib1f", + "vertexAttrib1fv", + "vertexAttrib2f", + "vertexAttrib2fv", + "vertexAttrib3f", + "vertexAttrib3fv", + "vertexAttrib4f", + "vertexAttrib4fv", + "vertexAttribDivisorANGLE", + "vertexAttribPointer", + "vertical", + "vertical-align", + "verticalAlign", + "verticalOverflow", + "vibrate", + "videoHeight", + "videoTracks", + "videoWidth", + "view", + "viewBox", + "viewBoxString", + "viewTarget", + "viewTargetString", + "viewport", + "viewportAnchorX", + "viewportAnchorY", + "viewportElement", + "visibility", + "visibilityState", + "visible", + "vlinkColor", + "voice", + "volume", + "vrml", + "vspace", + "w", + "wand", + "warn", + "wasClean", + "watch", + "watchPosition", + "webdriver", + "webkitAddKey", + "webkitAnimation", + "webkitAnimationDelay", + "webkitAnimationDirection", + "webkitAnimationDuration", + "webkitAnimationFillMode", + "webkitAnimationIterationCount", + "webkitAnimationName", + "webkitAnimationPlayState", + "webkitAnimationTimingFunction", + "webkitAppearance", + "webkitAudioContext", + "webkitAudioDecodedByteCount", + "webkitAudioPannerNode", + "webkitBackfaceVisibility", + "webkitBackground", + "webkitBackgroundAttachment", + "webkitBackgroundClip", + "webkitBackgroundColor", + "webkitBackgroundImage", + "webkitBackgroundOrigin", + "webkitBackgroundPosition", + "webkitBackgroundPositionX", + "webkitBackgroundPositionY", + "webkitBackgroundRepeat", + "webkitBackgroundSize", + "webkitBackingStorePixelRatio", + "webkitBorderImage", + "webkitBorderImageOutset", + "webkitBorderImageRepeat", + "webkitBorderImageSlice", + "webkitBorderImageSource", + "webkitBorderImageWidth", + "webkitBoxAlign", + "webkitBoxDirection", + "webkitBoxFlex", + "webkitBoxOrdinalGroup", + "webkitBoxOrient", + "webkitBoxPack", + "webkitBoxSizing", + "webkitCancelAnimationFrame", + "webkitCancelFullScreen", + "webkitCancelKeyRequest", + "webkitCancelRequestAnimationFrame", + "webkitClearResourceTimings", + "webkitClosedCaptionsVisible", + "webkitConvertPointFromNodeToPage", + "webkitConvertPointFromPageToNode", + "webkitCreateShadowRoot", + "webkitCurrentFullScreenElement", + "webkitCurrentPlaybackTargetIsWireless", + "webkitDirectionInvertedFromDevice", + "webkitDisplayingFullscreen", + "webkitEnterFullScreen", + "webkitEnterFullscreen", + "webkitExitFullScreen", + "webkitExitFullscreen", + "webkitExitPointerLock", + "webkitFullScreenKeyboardInputAllowed", + "webkitFullscreenElement", + "webkitFullscreenEnabled", + "webkitGenerateKeyRequest", + "webkitGetAsEntry", + "webkitGetDatabaseNames", + "webkitGetEntries", + "webkitGetEntriesByName", + "webkitGetEntriesByType", + "webkitGetFlowByName", + "webkitGetGamepads", + "webkitGetImageDataHD", + "webkitGetNamedFlows", + "webkitGetRegionFlowRanges", + "webkitGetUserMedia", + "webkitHasClosedCaptions", + "webkitHidden", + "webkitIDBCursor", + "webkitIDBDatabase", + "webkitIDBDatabaseError", + "webkitIDBDatabaseException", + "webkitIDBFactory", + "webkitIDBIndex", + "webkitIDBKeyRange", + "webkitIDBObjectStore", + "webkitIDBRequest", + "webkitIDBTransaction", + "webkitImageSmoothingEnabled", + "webkitIndexedDB", + "webkitInitMessageEvent", + "webkitIsFullScreen", + "webkitKeys", + "webkitLineDashOffset", + "webkitLockOrientation", + "webkitMatchesSelector", + "webkitMediaStream", + "webkitNotifications", + "webkitOfflineAudioContext", + "webkitOrientation", + "webkitPeerConnection00", + "webkitPersistentStorage", + "webkitPointerLockElement", + "webkitPostMessage", + "webkitPreservesPitch", + "webkitPutImageDataHD", + "webkitRTCPeerConnection", + "webkitRegionOverset", + "webkitRequestAnimationFrame", + "webkitRequestFileSystem", + "webkitRequestFullScreen", + "webkitRequestFullscreen", + "webkitRequestPointerLock", + "webkitResolveLocalFileSystemURL", + "webkitSetMediaKeys", + "webkitSetResourceTimingBufferSize", + "webkitShadowRoot", + "webkitShowPlaybackTargetPicker", + "webkitSlice", + "webkitSpeechGrammar", + "webkitSpeechGrammarList", + "webkitSpeechRecognition", + "webkitSpeechRecognitionError", + "webkitSpeechRecognitionEvent", + "webkitStorageInfo", + "webkitSupportsFullscreen", + "webkitTemporaryStorage", + "webkitTextSizeAdjust", + "webkitTransform", + "webkitTransformOrigin", + "webkitTransition", + "webkitTransitionDelay", + "webkitTransitionDuration", + "webkitTransitionProperty", + "webkitTransitionTimingFunction", + "webkitURL", + "webkitUnlockOrientation", + "webkitUserSelect", + "webkitVideoDecodedByteCount", + "webkitVisibilityState", + "webkitWirelessVideoPlaybackDisabled", + "webkitdropzone", + "webstore", + "weight", + "whatToShow", + "wheelDelta", + "wheelDeltaX", + "wheelDeltaY", + "which", + "white-space", + "whiteSpace", + "wholeText", + "widows", + "width", + "will-change", + "willChange", + "willValidate", + "window", + "withCredentials", + "word-break", + "word-spacing", + "word-wrap", + "wordBreak", + "wordSpacing", + "wordWrap", + "wrap", + "wrapKey", + "write", + "writeln", + "writingMode", + "x", + "x1", + "x2", + "xChannelSelector", + "xmlEncoding", + "xmlStandalone", + "xmlVersion", + "xmlbase", + "xmllang", + "xmlspace", + "y", + "y1", + "y2", + "yChannelSelector", + "yandex", + "z", + "z-index", + "zIndex", + "zoom", + "zoomAndPan", + "zoomRectScreen" + ] +} diff --git a/node_modules/uglify-js/tools/exports.js b/node_modules/uglify-js/tools/exports.js new file mode 100644 index 0000000..09acc13 --- /dev/null +++ b/node_modules/uglify-js/tools/exports.js @@ -0,0 +1,19 @@ +exports["Compressor"] = Compressor; +exports["DefaultsError"] = DefaultsError; +exports["Dictionary"] = Dictionary; +exports["JS_Parse_Error"] = JS_Parse_Error; +exports["MAP"] = MAP; +exports["OutputStream"] = OutputStream; +exports["SourceMap"] = SourceMap; +exports["TreeTransformer"] = TreeTransformer; +exports["TreeWalker"] = TreeWalker; +exports["base54"] = base54; +exports["defaults"] = defaults; +exports["mangle_properties"] = mangle_properties; +exports["merge"] = merge; +exports["parse"] = parse; +exports["push_uniq"] = push_uniq; +exports["string_template"] = string_template; +exports["tokenizer"] = tokenizer; +exports["is_identifier"] = is_identifier; +exports["SymbolDef"] = SymbolDef; diff --git a/node_modules/uglify-js/tools/node.js b/node_modules/uglify-js/tools/node.js new file mode 100644 index 0000000..147751a --- /dev/null +++ b/node_modules/uglify-js/tools/node.js @@ -0,0 +1,320 @@ +// workaround for tty output truncation upon process.exit() +[process.stdout, process.stderr].forEach(function(stream){ + if (stream._handle && stream._handle.setBlocking) + stream._handle.setBlocking(true); +}); + +var path = require("path"); +var fs = require("fs"); + +var UglifyJS = exports; +var FILES = UglifyJS.FILES = [ + "../lib/utils.js", + "../lib/ast.js", + "../lib/parse.js", + "../lib/transform.js", + "../lib/scope.js", + "../lib/output.js", + "../lib/compress.js", + "../lib/sourcemap.js", + "../lib/mozilla-ast.js", + "../lib/propmangle.js", + "./exports.js", +].map(function(file){ + return require.resolve(file); +}); + +new Function("MOZ_SourceMap", "exports", FILES.map(function(file){ + return fs.readFileSync(file, "utf8"); +}).join("\n\n"))( + require("source-map"), + UglifyJS +); + +UglifyJS.AST_Node.warn_function = function(txt) { + console.error("WARN: %s", txt); +}; + +function read_source_map(code) { + var match = /\n\/\/# sourceMappingURL=data:application\/json(;.*?)?;base64,(.*)/.exec(code); + if (!match) { + UglifyJS.AST_Node.warn("inline source map not found"); + return null; + } + return JSON.parse(new Buffer(match[2], "base64")); +} + +UglifyJS.minify = function(files, options) { + options = UglifyJS.defaults(options, { + compress : {}, + fromString : false, + inSourceMap : null, + mangle : {}, + mangleProperties : false, + nameCache : null, + outFileName : null, + output : null, + outSourceMap : null, + parse : {}, + sourceMapInline : false, + sourceMapUrl : null, + sourceRoot : null, + spidermonkey : false, + warnings : false, + }); + UglifyJS.base54.reset(); + + var inMap = options.inSourceMap; + if (typeof inMap == "string" && inMap != "inline") { + inMap = JSON.parse(fs.readFileSync(inMap, "utf8")); + } + + // 1. parse + var toplevel = null, + sourcesContent = {}; + + if (options.spidermonkey) { + if (inMap == "inline") { + throw new Error("inline source map only works with built-in parser"); + } + toplevel = UglifyJS.AST_Node.from_mozilla_ast(files); + } else { + function addFile(file, fileUrl) { + var code = options.fromString + ? file + : fs.readFileSync(file, "utf8"); + if (inMap == "inline") { + inMap = read_source_map(code); + } + sourcesContent[fileUrl] = code; + toplevel = UglifyJS.parse(code, { + filename: fileUrl, + toplevel: toplevel, + bare_returns: options.parse ? options.parse.bare_returns : undefined + }); + } + if (!options.fromString) { + files = UglifyJS.simple_glob(files); + if (inMap == "inline" && files.length > 1) { + throw new Error("inline source map only works with singular input"); + } + } + [].concat(files).forEach(function (files, i) { + if (typeof files === 'string') { + addFile(files, options.fromString ? i : files); + } else { + for (var fileUrl in files) { + addFile(files[fileUrl], fileUrl); + } + } + }); + } + if (options.wrap) { + toplevel = toplevel.wrap_commonjs(options.wrap, options.exportAll); + } + + // 2. compress + if (options.compress) { + var compress = { warnings: options.warnings }; + UglifyJS.merge(compress, options.compress); + toplevel.figure_out_scope(options.mangle); + var sq = UglifyJS.Compressor(compress); + toplevel = sq.compress(toplevel); + } + + // 3. mangle properties + if (options.mangleProperties || options.nameCache) { + options.mangleProperties.cache = UglifyJS.readNameCache(options.nameCache, "props"); + toplevel = UglifyJS.mangle_properties(toplevel, options.mangleProperties); + UglifyJS.writeNameCache(options.nameCache, "props", options.mangleProperties.cache); + } + + // 4. mangle + if (options.mangle) { + toplevel.figure_out_scope(options.mangle); + toplevel.compute_char_frequency(options.mangle); + toplevel.mangle_names(options.mangle); + } + + // 5. output + var output = { max_line_len: 32000 }; + if (options.outSourceMap || options.sourceMapInline) { + output.source_map = UglifyJS.SourceMap({ + // prefer outFileName, otherwise use outSourceMap without .map suffix + file: options.outFileName || (typeof options.outSourceMap === 'string' ? options.outSourceMap.replace(/\.map$/i, '') : null), + orig: inMap, + root: options.sourceRoot + }); + if (options.sourceMapIncludeSources) { + for (var file in sourcesContent) { + if (sourcesContent.hasOwnProperty(file)) { + output.source_map.get().setSourceContent(file, sourcesContent[file]); + } + } + } + + } + if (options.output) { + UglifyJS.merge(output, options.output); + } + var stream = UglifyJS.OutputStream(output); + toplevel.print(stream); + + + var source_map = output.source_map; + if (source_map) { + source_map = source_map + ""; + } + + var mappingUrlPrefix = "\n//# sourceMappingURL="; + if (options.sourceMapInline) { + stream += mappingUrlPrefix + "data:application/json;charset=utf-8;base64," + new Buffer(source_map).toString("base64"); + } else if (options.outSourceMap && typeof options.outSourceMap === "string" && options.sourceMapUrl !== false) { + stream += mappingUrlPrefix + (typeof options.sourceMapUrl === "string" ? options.sourceMapUrl : options.outSourceMap); + } + + return { + code : stream + "", + map : source_map + }; +}; + +// UglifyJS.describe_ast = function() { +// function doitem(ctor) { +// var sub = {}; +// ctor.SUBCLASSES.forEach(function(ctor){ +// sub[ctor.TYPE] = doitem(ctor); +// }); +// var ret = {}; +// if (ctor.SELF_PROPS.length > 0) ret.props = ctor.SELF_PROPS; +// if (ctor.SUBCLASSES.length > 0) ret.sub = sub; +// return ret; +// } +// return doitem(UglifyJS.AST_Node).sub; +// } + +UglifyJS.describe_ast = function() { + var out = UglifyJS.OutputStream({ beautify: true }); + function doitem(ctor) { + out.print("AST_" + ctor.TYPE); + var props = ctor.SELF_PROPS.filter(function(prop){ + return !/^\$/.test(prop); + }); + if (props.length > 0) { + out.space(); + out.with_parens(function(){ + props.forEach(function(prop, i){ + if (i) out.space(); + out.print(prop); + }); + }); + } + if (ctor.documentation) { + out.space(); + out.print_string(ctor.documentation); + } + if (ctor.SUBCLASSES.length > 0) { + out.space(); + out.with_block(function(){ + ctor.SUBCLASSES.forEach(function(ctor, i){ + out.indent(); + doitem(ctor); + out.newline(); + }); + }); + } + }; + doitem(UglifyJS.AST_Node); + return out + ""; +}; + +function readReservedFile(filename, reserved) { + if (!reserved) { + reserved = { vars: [], props: [] }; + } + var data = fs.readFileSync(filename, "utf8"); + data = JSON.parse(data); + if (data.vars) { + data.vars.forEach(function(name){ + UglifyJS.push_uniq(reserved.vars, name); + }); + } + if (data.props) { + data.props.forEach(function(name){ + UglifyJS.push_uniq(reserved.props, name); + }); + } + return reserved; +} + +UglifyJS.readReservedFile = readReservedFile; + +UglifyJS.readDefaultReservedFile = function(reserved) { + return readReservedFile(require.resolve("./domprops.json"), reserved); +}; + +UglifyJS.readNameCache = function(filename, key) { + var cache = null; + if (filename) { + try { + var cache = fs.readFileSync(filename, "utf8"); + cache = JSON.parse(cache)[key]; + if (!cache) throw "init"; + cache.props = UglifyJS.Dictionary.fromObject(cache.props); + } catch(ex) { + cache = { + cname: -1, + props: new UglifyJS.Dictionary() + }; + } + } + return cache; +}; + +UglifyJS.writeNameCache = function(filename, key, cache) { + if (filename) { + var data; + try { + data = fs.readFileSync(filename, "utf8"); + data = JSON.parse(data); + } catch(ex) { + data = {}; + } + data[key] = { + cname: cache.cname, + props: cache.props.toObject() + }; + fs.writeFileSync(filename, JSON.stringify(data, null, 2), "utf8"); + } +}; + +// A file glob function that only supports "*" and "?" wildcards in the basename. +// Example: "foo/bar/*baz??.*.js" +// Argument `glob` may be a string or an array of strings. +// Returns an array of strings. Garbage in, garbage out. +UglifyJS.simple_glob = function simple_glob(glob) { + if (Array.isArray(glob)) { + return [].concat.apply([], glob.map(simple_glob)); + } + if (glob.match(/\*|\?/)) { + var dir = path.dirname(glob); + try { + var entries = fs.readdirSync(dir); + } catch (ex) {} + if (entries) { + var pattern = "^" + path.basename(glob) + .replace(/[.+^$[\]\\(){}]/g, "\\$&") + .replace(/\*/g, "[^/\\\\]*") + .replace(/\?/g, "[^/\\\\]") + "$"; + var mod = process.platform === "win32" ? "i" : ""; + var rx = new RegExp(pattern, mod); + var results = entries.filter(function(name) { + return rx.test(name); + }).map(function(name) { + return path.join(dir, name); + }); + if (results.length) return results; + } + } + return [ glob ]; +}; diff --git a/node_modules/uglify-js/tools/props.html b/node_modules/uglify-js/tools/props.html new file mode 100644 index 0000000..f7c777a --- /dev/null +++ b/node_modules/uglify-js/tools/props.html @@ -0,0 +1,61 @@ + + + + + + + diff --git a/node_modules/uglify-to-browserify/.npmignore b/node_modules/uglify-to-browserify/.npmignore new file mode 100644 index 0000000..66d015b --- /dev/null +++ b/node_modules/uglify-to-browserify/.npmignore @@ -0,0 +1,14 @@ +lib-cov +*.seed +*.log +*.csv +*.dat +*.out +*.pid +*.gz +pids +logs +results +npm-debug.log +node_modules +/test/output.js diff --git a/node_modules/uglify-to-browserify/.travis.yml b/node_modules/uglify-to-browserify/.travis.yml new file mode 100644 index 0000000..9a61f6b --- /dev/null +++ b/node_modules/uglify-to-browserify/.travis.yml @@ -0,0 +1,3 @@ +language: node_js +node_js: + - "0.10" \ No newline at end of file diff --git a/node_modules/uglify-to-browserify/LICENSE b/node_modules/uglify-to-browserify/LICENSE new file mode 100644 index 0000000..dfb0b19 --- /dev/null +++ b/node_modules/uglify-to-browserify/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2013 Forbes Lindesay + +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. \ No newline at end of file diff --git a/node_modules/uglify-to-browserify/README.md b/node_modules/uglify-to-browserify/README.md new file mode 100644 index 0000000..99685da --- /dev/null +++ b/node_modules/uglify-to-browserify/README.md @@ -0,0 +1,15 @@ +# uglify-to-browserify + +A transform to make UglifyJS work in browserify. + +[![Build Status](https://travis-ci.org/ForbesLindesay/uglify-to-browserify.png?branch=master)](https://travis-ci.org/ForbesLindesay/uglify-to-browserify) +[![Dependency Status](https://gemnasium.com/ForbesLindesay/uglify-to-browserify.png)](https://gemnasium.com/ForbesLindesay/uglify-to-browserify) +[![NPM version](https://badge.fury.io/js/uglify-to-browserify.png)](http://badge.fury.io/js/uglify-to-browserify) + +## Installation + + npm install uglify-to-browserify + +## License + + MIT \ No newline at end of file diff --git a/node_modules/uglify-to-browserify/index.js b/node_modules/uglify-to-browserify/index.js new file mode 100644 index 0000000..2cea629 --- /dev/null +++ b/node_modules/uglify-to-browserify/index.js @@ -0,0 +1,49 @@ +'use strict' + +var fs = require('fs') +var PassThrough = require('stream').PassThrough +var Transform = require('stream').Transform + +if (typeof Transform === 'undefined') { + throw new Error('UglifyJS only supports browserify when using node >= 0.10.x') +} + +var cache = {} +module.exports = transform +function transform(file) { + if (!/tools\/node\.js$/.test(file.replace(/\\/g,'/'))) return new PassThrough(); + if (cache[file]) return makeStream(cache[file]) + var uglify = require(file) + var src = 'var sys = require("util");\nvar MOZ_SourceMap = require("source-map");\nvar UglifyJS = exports;\n' + uglify.FILES.map(function (path) { return fs.readFileSync(path, 'utf8') }).join('\n') + + var ast = uglify.parse(src) + ast.figure_out_scope() + + var variables = ast.variables + .map(function (node, name) { + return name + }) + + src += '\n\n' + variables.map(function (v) { return 'exports.' + v + ' = ' + v + ';' }).join('\n') + '\n\n' + + src += 'exports.AST_Node.warn_function = function (txt) { if (typeof console != "undefined" && typeof console.warn === "function") console.warn(txt) }\n\n' + + src += 'exports.minify = ' + uglify.minify.toString() + ';\n\n' + src += 'exports.describe_ast = ' + uglify.describe_ast.toString() + ';' + + // TODO: remove once https://github.com/substack/node-browserify/issues/631 is resolved + src = src.replace(/"for"/g, '"fo" + "r"') + + cache[file] = src + return makeStream(src); +} + +function makeStream(src) { + var res = new Transform(); + res._transform = function (chunk, encoding, callback) { callback() } + res._flush = function (callback) { + res.push(src) + callback() + } + return res; +} diff --git a/node_modules/uglify-to-browserify/package.json b/node_modules/uglify-to-browserify/package.json new file mode 100644 index 0000000..9683877 --- /dev/null +++ b/node_modules/uglify-to-browserify/package.json @@ -0,0 +1,80 @@ +{ + "_args": [ + [ + { + "raw": "uglify-to-browserify@~1.0.0", + "scope": null, + "escapedName": "uglify-to-browserify", + "name": "uglify-to-browserify", + "rawSpec": "~1.0.0", + "spec": ">=1.0.0 <1.1.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/uglify-js" + ] + ], + "_from": "uglify-to-browserify@>=1.0.0 <1.1.0", + "_id": "uglify-to-browserify@1.0.2", + "_inCache": true, + "_location": "/uglify-to-browserify", + "_npmUser": { + "name": "forbeslindesay", + "email": "forbes@lindeay.co.uk" + }, + "_npmVersion": "1.3.14", + "_phantomChildren": {}, + "_requested": { + "raw": "uglify-to-browserify@~1.0.0", + "scope": null, + "escapedName": "uglify-to-browserify", + "name": "uglify-to-browserify", + "rawSpec": "~1.0.0", + "spec": ">=1.0.0 <1.1.0", + "type": "range" + }, + "_requiredBy": [ + "/uglify-js" + ], + "_resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "_shasum": "6e0924d6bda6b5afe349e39a6d632850a0f882b7", + "_shrinkwrap": null, + "_spec": "uglify-to-browserify@~1.0.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/uglify-js", + "author": { + "name": "ForbesLindesay" + }, + "bugs": { + "url": "https://github.com/ForbesLindesay/uglify-to-browserify/issues" + }, + "dependencies": {}, + "description": "A transform to make UglifyJS work in browserify.", + "devDependencies": { + "source-map": "~0.1.27", + "uglify-js": "~2.4.0" + }, + "directories": {}, + "dist": { + "shasum": "6e0924d6bda6b5afe349e39a6d632850a0f882b7", + "tarball": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz" + }, + "homepage": "https://github.com/ForbesLindesay/uglify-to-browserify", + "keywords": [], + "license": "MIT", + "maintainers": [ + { + "name": "forbeslindesay", + "email": "forbes@lindesay.co.uk" + } + ], + "name": "uglify-to-browserify", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/ForbesLindesay/uglify-to-browserify.git" + }, + "scripts": { + "test": "node test/index.js" + }, + "version": "1.0.2" +} diff --git a/node_modules/uglify-to-browserify/test/index.js b/node_modules/uglify-to-browserify/test/index.js new file mode 100644 index 0000000..4117894 --- /dev/null +++ b/node_modules/uglify-to-browserify/test/index.js @@ -0,0 +1,22 @@ +var fs = require('fs') +var br = require('../') +var test = fs.readFileSync(require.resolve('uglify-js/test/run-tests.js'), 'utf8') + .replace(/^#.*\n/, '') + +var transform = br(require.resolve('uglify-js')) +transform.pipe(fs.createWriteStream(__dirname + '/output.js')) + .on('close', function () { + Function('module,require', test)({ + filename: require.resolve('uglify-js/test/run-tests.js') + }, + function (name) { + if (name === '../tools/node') { + return require('./output.js') + } else if (/^[a-z]+$/.test(name)) { + return require(name) + } else { + throw new Error('I didn\'t expect you to require ' + name) + } + }) + }) +transform.end(fs.readFileSync(require.resolve('uglify-js'), 'utf8')) \ No newline at end of file diff --git a/node_modules/umzug/.jshintrc b/node_modules/umzug/.jshintrc new file mode 100644 index 0000000..e8e1aa6 --- /dev/null +++ b/node_modules/umzug/.jshintrc @@ -0,0 +1,44 @@ +{ + "bitwise":false, + "boss":true, + "curly":false, + "eqeqeq":true, + "freeze":true, + "immed":true, // deprecated + "indent":2, // deprecated + "latedef":"true", + "newcap":true, // deprecated + "noarg":true, + "node":true, + "strict":true, + "undef":true, + "esnext":false, + "unused": "vars", + "nonbsp": true, + "maxdepth": 8, + "quotmark": true, // deprecated + + /* relaxing options */ + "laxbreak":true, + "laxcomma":true, + + /* questionable */ + "loopfunc":true, + + "globals": { + "Promise": true + }, + + "predef": [ + "alert", + "describe", + "it", + "before", + "beforeEach", + "after", + "afterEach", + "suite", + "setup", + "test" + ] +} diff --git a/node_modules/umzug/.npmignore b/node_modules/umzug/.npmignore new file mode 100644 index 0000000..2f9917b --- /dev/null +++ b/node_modules/umzug/.npmignore @@ -0,0 +1,30 @@ +# Logs +logs +*.log + +# Runtime data +pids +*.pid +*.seed + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directory +# Commenting this out is preferred by some people, see +# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git- +node_modules + +# Users Environment Variables +.lock-wscript + +test/tmp diff --git a/node_modules/umzug/.travis.yml b/node_modules/umzug/.travis.yml new file mode 100644 index 0000000..891db48 --- /dev/null +++ b/node_modules/umzug/.travis.yml @@ -0,0 +1,23 @@ +sudo: required +dist: trusty + +language: node_js + +node_js: + - '4' + - '5' + +env: + - SEQUELIZE=^1.0.0 + - SEQUELIZE=^2.0.0 + - SEQUELIZE=^3.0.0 + +before_script: + - npm install sequelize@$(echo $SEQUELIZE) + +script: + - "npm test" + +notifications: + irc: + - "chat.freenode.net#sequelizejs" diff --git a/node_modules/umzug/CHANGELOG.md b/node_modules/umzug/CHANGELOG.md new file mode 100644 index 0000000..b8ff53d --- /dev/null +++ b/node_modules/umzug/CHANGELOG.md @@ -0,0 +1,84 @@ +# Change Log +All notable changes to this project will be documented in this file. + + +## v1.12.0 - 2017-04-21 +### Added +- Option `timestamps` to Sequelize storage [#99](https://github.com/sequelize/umzug/pull/99) + +### Fixed +- Reject migration if umzug can't find the migration method [#115](https://github.com/sequelize/umzug/pull/115) + +## v1.11.0 - 2016-04-29 +### Added +- Events `migrating`, `migrated`, `reverting`, and `reverted` #76 +- Official support to all major Sequelize versions #73 +- Official support to Node.js v0.12, io.js v1-v3, and Node.js v4-v5 #73 + +### Fixed +- Compatibility issues with Sequelize >= 3.15.1 #67 + +## v1.10.0 - 2016-04-17 +### Added +- Option `from` to `up` and `down` methods #72 + +### Fixed +- Configurable `up` and `down` methods #70 + +## v1.9.1 - 2016-03-14 +### Fixed +- Call of `down` with empty object + +## v1.9.0 - 2016-02-09 +### Changed +- Set charset for SequelizeMeta table to `utf8` + +## v1.8.1 - 2016-02-09 +### Added +- Print details in error cases + +### Changed +- The `options` input object is not modified anymore +- Updated lodash to 4.3.0 + +## v1.8.0 - 2016-01-05 +### Added +- The `none` storage + +## v1.7.2 - 2015-12-27 +### Fixed +- Migrations on utf8mb4 databases + +## v1.7.1 - 2015-12-03 +### Changed +- Ensure existence of migration specified by `to` parameter + +## v1.7.0 - 2015-11-21 +### Added +- Option to define the database schema + +### Changed +- Sort table entries when reading currently executed migrations + +## 1.6.0 +### Changed +- Don't resolve the sequelize library anymore but use the instance's constructor + +## 1.5.0 +### Added +- ActiveRecord like logging + +## 1.4.0 +### Added +- Builds for all versions of sequelize + +### Changed +- Project is now compatible with all versions of sequelize + +## 1.3.1 +### Changed +- Update lodash to 3.0 + +## 1.3.0 +### Added +- Possibility to define the column type of the sequelize meta table diff --git a/node_modules/umzug/LICENSE b/node_modules/umzug/LICENSE new file mode 100644 index 0000000..07c8765 --- /dev/null +++ b/node_modules/umzug/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2014 sequelize + +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. + diff --git a/node_modules/umzug/README.md b/node_modules/umzug/README.md new file mode 100644 index 0000000..76c7e95 --- /dev/null +++ b/node_modules/umzug/README.md @@ -0,0 +1,314 @@ +# Umzug [![Build Status](https://travis-ci.org/sequelize/umzug.svg?branch=master)](https://travis-ci.org/sequelize/umzug) +The *umzug* lib is a framework agnostic migration tool for Node.JS. The tool itself is not specifically related to databases but basically provides a clean API for running and rolling back tasks. + +## Persistence +In order to keep track of already executed tasks, *umzug* logs successfully executed migrations. This is done in order to allow rollbacks of tasks. There are multiple storage presets available, from which you can choose. Adding a custom is super simple as well. + +## Storages + +### JSON +Using the [`json` storage](lib/storages/json.js) will create a JSON file which will contain an array with all the executed migrations. You can specify the path to the file. The default for that is `umzug.json` in the working directory of the process. + +#### Options + +```js +{ + // The path to the json storage. + // Defaults to process.cwd() + '/umzug.json'; + path: process.cwd() + '/db/sequelize-meta.json' +} +``` + +### Sequelize +Using the [`sequelize` storage](lib/storages/sequelize.js) will create a table in your database called `SequelizeMeta` containing an entry for each executed migration. You will have to pass a configured instance of Sequelize or an existing Sequelize model. Optionally you can specify the model name, table name, or column name. All major Sequelize versions are supported. + +#### Options + +```js +{ + // The configured instance of Sequelize. + // Optional if `model` is passed. + sequelize: instance, + + // The to be used Sequelize model. + // Must have column name matching `columnName` option + // Optional if `sequelize` is passed. + model: model, + + // The name of the to be used model. + // Defaults to 'SequelizeMeta' + modelName: 'Schema', + + // The name of table to create if `model` option is not supplied + // Defaults to `modelName` + tableName: 'Schema', + + // The name of table column holding migration name. + // Defaults to 'name'. + columnName: 'migration', + + // The type of the column holding migration name. + // Defaults to `Sequelize.STRING` + columnType: new Sequelize.STRING(100) +} +``` + +#### Events + +Umzug is an EventEmitter. Each of the following events will be called with `name, migration` as arguments. Events are a convenient place +to implement application-specific logic that must run around each migration: + +* *migrating* - A migration is about to be executed. +* *migrated* - A migration has successfully been executed. +* *reverting* - A migration is about to be reverted. +* *reverted* - A migration has successfully been reverted. + +### None +If want to run migrations without storing them anywhere, you can use the [`none` storage](lib/storages/none.js). + +### Custom +In order to use a custom storage, you can create and publish a module which has to fulfill the following API. You can just pass the name of the module to the configuration and *umzug* will require it accordingly. The API that needs to be exposed looks like this: + +```js +var Bluebird = require('bluebird'); +var redefine = require('redefine'); + +module.exports = redefine.Class({ + constructor: function (options) { + this.options = options; + this.options.storageOptions = _.extend({ + option1: 'defaultValue1' + }, this.options.storageOptions) + }, + + logMigration: function (migrationName) { + return new Bluebird(function (resolve, reject) { + // This function logs a migration as executed. + // It will get called once a migration was + // executed successfully. + }); + }, + + unlogMigration: function (migrationName) { + return new Bluebird(function (resolve, reject) { + // This function removes a previously logged migration. + // It will get called once a migration has been reverted. + }); + }, + + executed: function () { + return new Bluebird(function (resolve, reject) { + // This function lists the names of the logged + // migrations. It will be used to calculate + // pending migrations. The result has to be an + // array with the names of the migration files. + }); + } +}); +``` + +## Migrations +Migrations are basically files that describe ways of executing and reverting tasks. In order to allow asynchronicity, tasks have return a Promise object which provides a `then` method. + +### Format +A migration file ideally contains an `up` and a `down` method, which represent a function which achieves the task and a function that reverts a task. The file could look like this: + +```js +'use strict'; + +var Bluebird = require('bluebird'); + +module.exports = { + up: function () { + return new Bluebird(function (resolve, reject) { + // Describe how to achieve the task. + // Call resolve/reject at some point. + }); + }, + + down: function () { + return new Bluebird(function (resolve, reject) { + // Describe how to revert the task. + // Call resolve/reject at some point. + }); + } +}; +``` + +## Usage + +### Installation +The *umzug* lib is available on npm: + +```js +npm install umzug +``` + +### API +The basic usage of *umzug* is as simple as that: + +```js +var Umzug = require('umzug'); +var umzug = new Umzug({}); + +umzug.someMethod().then(function (result) { + // do something with the result +}); +``` + +#### Executing migrations +The `execute` method is a general purpose function that runs for every specified migrations the respective function. + +```js +umzug.execute({ + migrations: ['some-id', 'some-other-id'], + method: 'up' +}).then(function (migrations) { + // "migrations" will be an Array of all executed/reverted migrations. +}); +``` + +#### Getting all pending migrations +You can get a list of pending/not yet executed migrations like this: + +```js +umzug.pending().then(function (migrations) { + // "migrations" will be an Array with the names of + // pending migrations. +}); +``` + +#### Getting all executed migrations +You can get a list of already executed migrations like this: + +```js +umzug.executed().then(function (migrations) { + // "migrations" will be an Array of already executed migrations. +}); +``` + +#### Executing pending migrations +The `up` method can be used to execute all pending migrations. + +```js +umzug.up().then(function (migrations) { + // "migrations" will be an Array with the names of the + // executed migrations. +}); +``` + +It is also possible to pass the name of a migration in order to just run the migrations from the current state to the passed migration name. + +```js +umzug.up({ to: '20141101203500-task' }).then(function (migrations) {}); +``` + +You also have the ability to choose to run migrations *from* a specific migration, excluding it: + +```js +umzug.up({ from: '20141101203500-task' }).then(function (migrations) {}); +``` + +In the above example umzug will execute all the pending migrations found **after** the specified migration. This is particularly usefull if you are using migrations on your native desktop application and you don't need to run past migrations on new installs while they need to run on updated installations. + +You can combine `from` and `to` options to select a specific subset: + +```js +umzug.up({ from: '20141101203500-task', to: '20151201103412-items' }).then(function (migrations) {}); +``` + +Running specific migrations while ignoring the right order, can be done like this: + +```js +umzug.up({ migrations: ['20141101203500-task', '20141101203501-task-2'] }); +``` + +There are also shorthand version of that: + +```js +umzug.up('20141101203500-task'); // Runs just the passed migration +umzug.up(['20141101203500-task', '20141101203501-task-2']); +``` + +Running + +#### Reverting executed migration +The `down` method can be used to revert the last executed migration. + +```js +umzug.down().then(function (migration) { + // "migration" will the name of the reverted migration. +}); +``` + +It is possible to pass the name of a migration until which the migrations should be reverted. This allows the reverse of multiple migrations at once. + +```js +umzug.down({ to: '20141031080000-task' }).then(function (migrations) { + // "migrations" will be an Array with the names of all reverted migrations. +}); +``` + +To revert all migrations, you can pass 0 as the `to` parameter: + +```js +umzug.down({ to: 0 }); +``` + +Reverting specific migrations while ignoring the right order, can be done like this: + +```js +umzug.down({ migrations: ['20141101203500-task', '20141101203501-task-2'] }); +``` + +There are also shorthand version of that: + +```js +umzug.down('20141101203500-task'); // Runs just the passed migration +umzug.down(['20141101203500-task', '20141101203501-task-2']); +``` + +### Configuration + +It is possible to configure *umzug* instance via passing an object to the constructor. The possible options are: + +```js +{ + // The storage. + // Possible values: 'json', 'sequelize', an argument for `require()`, including absolute paths + storage: 'json', + + // The options for the storage. + // Check the available storages for further details. + storageOptions: {}, + + // The logging function. + // A function that gets executed everytime migrations start and have ended. + logging: false, + + // The name of the positive method in migrations. + upName: 'up', + + // The name of the negative method in migrations. + downName: 'down', + + migrations: { + // The params that gets passed to the migrations. + // Might be an array or a synchronous function which returns an array. + params: [], + + // The path to the migrations directory. + path: 'migrations', + + // The pattern that determines whether or not a file is a migration. + pattern: /^\d+[\w-]+\.js$/, + + // A function that receives and returns the to be executed function. + // This can be used to modify the function. + wrap: function (fun) { return fun; } + } +} +``` + +## License +MIT diff --git a/node_modules/umzug/gulpfile.js b/node_modules/umzug/gulpfile.js new file mode 100644 index 0000000..0bbb5b3 --- /dev/null +++ b/node_modules/umzug/gulpfile.js @@ -0,0 +1,35 @@ +'use strict'; + +var gulp = require('gulp'); +var jshint = require('gulp-jshint'); +var mocha = require('gulp-mocha'); +var path = require('path'); +var args = require('yargs').argv; + +gulp.task('default', ['lint','test'], function () {}); + +gulp.task('lint', function () { + gulp + .src([ + path.resolve(__dirname, 'gulpfile.js'), + path.resolve(__dirname, 'bin', 'sequelize'), + path.resolve(__dirname, 'lib', '**', '*.js'), + '!' + path.resolve(__dirname, 'lib', 'assets', '**', '*.js'), + path.resolve(__dirname, 'test', '**', '*.js'), + '!' + path.resolve(__dirname, 'test', 'support', 'tmp', '**', '*') + ]) + .pipe(jshint()) + .pipe(jshint.reporter(require('jshint-stylish'))) + .pipe(jshint.reporter(require('gulp-jshint-instafail'))); +}); + +gulp.task('test', function () { + gulp + .src(path.resolve(__dirname, 'test', '**', 'index.js'), { read: false }) + .pipe(mocha({ + reporter: 'spec', + ignoreLeaks: true, + timeout: 1000, + grep: args.grep + })); +}); diff --git a/node_modules/umzug/index.js b/node_modules/umzug/index.js new file mode 100644 index 0000000..de5bea4 --- /dev/null +++ b/node_modules/umzug/index.js @@ -0,0 +1,564 @@ +'use strict'; + +var _ = require('lodash'); +var Bluebird = require('bluebird'); +var fs = require('fs'); +var Migration = require('./lib/migration'); +var path = require('path'); +var redefine = require('redefine'); +var EventEmitter = require('events').EventEmitter; + +/** + * @class Umzug + * @extends EventEmitter + */ +var Umzug = module.exports = redefine.Class(/** @lends Umzug.prototype */ { + extend: EventEmitter, + + /** + * Constructs Umzug instance. + * + * @param {Object} [options] + * @param {String} [options.storage='json'] - The storage. Possible values: + * 'json', 'sequelize', an argument for `require()`, including absolute paths. + * @param {function|false} [options.logging=false] - The logging function. + * A function that gets executed every time migrations start and have ended. + * @param {String} [options.upName='up'] - The name of the positive method + * in migrations. + * @param {String} [options.downName='down'] - The name of the negative method + * in migrations. + * @param {Object} [options.storageOptions] - The options for the storage. + * Check the available storages for further details. + * @param {Object} [options.migrations] - + * @param {Array} [options.migrations.params] - The params that gets passed to + * the migrations. Might be an array or a synchronous function which returns + * an array. + * @param {String} [options.migrations.path] - The path to the migrations + * directory. + * @param {RegExp} [options.migrations.pattern] - The pattern that determines + * whether or not a file is a migration. + * @param {Migration~wrap} [options.migrations.wrap] - A function that + * receives and returns the to be executed function. This can be used to + * modify the function. + * @constructs Umzug + */ + constructor: function (options) { + this.options = _.assign({ + storage: 'json', + storageOptions: {}, + logging: false, + upName: 'up', + downName: 'down' + }, options); + + if (this.options.logging && !_.isFunction(this.options.logging)) { + throw new Error('The logging-option should be either a function or false'); + } + + this.options.migrations = _.assign({ + params: [], + path: path.resolve(process.cwd(), 'migrations'), + pattern: /^\d+[\w-]+\.js$/, + wrap: function (fun) { return fun; } + }, this.options.migrations); + + this.storage = this._initStorage(); + + EventEmitter.call(this); + }, + + /** + * Executes given migrations with a given method. + * + * @param {Object} [options] + * @param {String[]} [options.migrations=[]] + * @param {String} [options.method='up'] + * @returns {Promise} + */ + execute: function (options) { + var self = this; + + options = _.assign({ + migrations: [], + method: 'up' + }, options || {}); + + return Bluebird + .map(options.migrations, function (migration) { + return self._findMigration(migration); + }) + .then(function (migrations) { + return _.assign({}, options, { migrations: migrations }); + }) + .then(function (options) { + return Bluebird.each(options.migrations, function (migration) { + var name = path.basename(migration.file, path.extname(migration.file)); + var startTime; + return self + ._wasExecuted(migration) + .catch(function () { + return false; + }) + .then(function (executed) { + return (typeof executed === 'undefined') ? true : executed; + }) + .tap(function (executed) { + if (!executed || (options.method === 'down')) { + var fun = (migration[options.method] || Bluebird.resolve); + var params = self.options.migrations.params; + + if (typeof params === 'function') { + params = params(); + } + + if (options.method === 'up') { + self.log("== " + name + ": migrating ======="); + self.emit('migrating', name, migration); + } else { + self.log("== " + name + ": reverting ======="); + self.emit('reverting', name, migration); + } + + startTime = new Date(); + + return fun.apply(migration, params); + } + }) + .then(function (executed) { + if (!executed && (options.method === 'up')) { + return Bluebird.resolve(self.storage.logMigration(migration.file)); + } else if (options.method === 'down') { + return Bluebird.resolve(self.storage.unlogMigration(migration.file)); + } + }) + .tap(function () { + var duration = ((new Date() - startTime) / 1000).toFixed(3); + if (options.method === 'up') { + self.log("== " + name + ": migrated (" + duration + "s)\n"); + self.emit('migrated', name, migration); + } else { + self.log("== " + name + ": reverted (" + duration + "s)\n"); + self.emit('reverted', name, migration); + } + }); + }); + }); + }, + + /** + * Lists executed migrations. + * + * @returns {Promise.} + */ + executed: function () { + return Bluebird.resolve(this.storage.executed()).bind(this).map(function (file) { + return new Migration(file); + }); + }, + + /** + * Lists pending migrations. + * + * @returns {Promise.} + */ + pending: function () { + return this + ._findMigrations() + .bind(this) + .then(function (all) { + return Bluebird.join(all, this.executed()); + }) + .spread(function (all, executed) { + var executedFiles = executed.map(function (migration) { + return migration.file; + }); + + return all.filter(function (migration) { + return executedFiles.indexOf(migration.file) === -1; + }); + }); + }, + + /** + * Execute migrations up. + * + * If options is a migration name (String), it will be executed. + * If options is a list of migration names (String[]), them will be executed. + * If options is Object: + * - { from: 'migration-1', to: 'migration-n' } - execute migrations in range. + * - { migrations: [] } - execute migrations in array. + * + * @param {String|String[]|Object} options + * @param {String} [options.from] - The first migration to execute (exc). + * @param {String} [options.to] - The last migration to execute (inc). + * @param {String[]} [options.migrations] - List of migrations to execute. + * @returns {Promise} + */ + up: function (options) { + return this._run('up', options, this.pending.bind(this)); + }, + + /** + * Execute migrations down. + * + * If options is a migration name (String), it will be executed. + * If options is a list of migration names (String[]), them will be executed. + * If options is Object: + * - { from: 'migration-n', to: 'migration-1' } - execute migrations in range. + * - { migrations: [] } - execute migrations in array. + * + * @param {String|String[]|Object} options + * @param {String} [options.from] - The first migration to execute (exc). + * @param {String} [options.to] - The last migration to execute (inc). + * @param {String[]} [options.migrations] - List of migrations to execute. + * @returns {Promise} + */ + down: function (options) { + var getExecuted = function () { + return this.executed().bind(this).then(function(migrations) { + return migrations.reverse(); + }); + }.bind(this); + + if (typeof options === 'undefined' || _.isEqual(options, {})) { + return getExecuted().bind(this).then(function (migrations) { + return migrations[0] + ? this.down(migrations[0].file) + : Bluebird.resolve([]); + }); + } else { + return this._run('down', options, getExecuted.bind(this)); + } + }, + + /** + * Callback function to get migrations in right order. + * + * @callback Umzug~rest + * @return {Promise.} + */ + + /** + * Execute migrations either down or up. + * + * If options is a migration name (String), it will be executed. + * If options is a list of migration names (String[]), them will be executed. + * If options is Object: + * - { from: 'migration-1', to: 'migration-n' } - execute migrations in range. + * - { migrations: [] } - execute migrations in array. + * + * @param {String} method - Method to run. Either 'up' or 'down'. + * @param {String|String[]|Object} options + * @param {String} [options.from] - The first migration to execute (exc). + * @param {String} [options.to] - The last migration to execute (inc). + * @param {String[]} [options.migrations] - List of migrations to execute. + * @param {Umzug~rest} [rest] - Function to get migrations in right order. + * @returns {Promise} + * @private + */ + _run: function(method, options, rest) { + if (typeof options === 'string') { + return this._run(method, [ options ]); + } else if (Array.isArray(options)) { + return Bluebird.resolve(options).bind(this) + .map(function (migration) { + return this._findMigration(migration); + }) + .then(function (migrations) { + return method === 'up' ? + this._arePending(migrations) : + this._wereExecuted(migrations); + }) + .then(function () { + return this._run(method, { migrations: options }); + }); + } + + options = _.assign({ + to: null, + from: null, + migrations: null + }, options || {}); + + if (options.migrations) { + return this.execute({ + migrations: options.migrations, + method: method + }); + } else { + return rest().bind(this) + .then(function (migrations) { + var result = Bluebird.resolve().bind(this); + + if (options.to) { + result = result + .then(function () { + // There must be a migration matching to options.to... + return this._findMigration(options.to); + }) + .then(function (migration) { + // ... and it must be pending/executed. + return method === 'up' ? + this._isPending(migration) : + this._wasExecuted(migration); + }); + } + + return result.then(function () { + return Bluebird.resolve(migrations) + }); + }) + .then(function(migrations) { + if (options.from) { + return this._findMigrationsFromMatch(options.from, method); + } else { + return migrations; + } + }) + .then(function (migrations) { + return this._findMigrationsUntilMatch(options.to, migrations); + }) + .then(function (migrationFiles) { + return this._run(method, { migrations: migrationFiles }); + }); + } + }, + + /** + * Lists pending/executed migrations depending on method from a given + * migration excluding it. + * + * @param {String} from - Migration name to be searched. + * @param {String} method - Either 'up' or 'down'. If method is 'up', only + * pending migrations will be accepted. Otherwise only executed migrations + * will be accepted. + * @returns {Promise.} + * @private + */ + _findMigrationsFromMatch: function (from, method) { + // We'll fetch all migrations and work our way from start to finish + return this._findMigrations() + .bind(this) + .then(function(migrations) { + var found = false; + return migrations.filter(function(migration) { + if (migration.testFileName(from)) { + found = true; + return false; + } + return found; + }); + }) + .filter(function(fromMigration) { + // now check if they need to be run based on status and method + return this._wasExecuted(fromMigration) + .then(function() { + if (method === 'up') { + return false; + } else { + return true; + } + }) + .catch(function() { + if (method === 'up') { + return true; + } else { + return false; + } + }); + }); + }, + + /** + * Pass message to logger if logging is enabled. + * + * @param {*} message - Message to be logged. + */ + log: function(message) { + if (this.options.logging) { + this.options.logging(message); + } + }, + + /** + * Try to require and initialize storage. + * + * @returns {*|SequelizeStorage|JSONStorage|NoneStorage} + * @private + */ + _initStorage: function () { + var Storage; + + try { + Storage = require(__dirname + '/lib/storages/' + this.options.storage); + } catch (e) { + // We have not been able to find the storage locally. + // Let's try to require a module instead. + } + + try { + Storage = Storage || require(this.options.storage); + } catch (e) { + throw new Error('Unable to resolve the storage: ' + this.options.storage + ', ' + e); + } + + return new Storage(this.options); + }, + + /** + * Loads all migrations in ascending order. + * + * @returns {Promise.} + * @private + */ + _findMigrations: function () { + return Bluebird + .promisify(fs.readdir)(this.options.migrations.path) + .bind(this) + .filter(function (file) { + return this.options.migrations.pattern.test(file); + }) + .map(function (file) { + return path.resolve(this.options.migrations.path, file); + }) + .map(function (path) { + return new Migration(path, this.options); + }) + .then(function (migrations) { + return migrations.sort(function (a, b) { + if (a.file > b.file) { + return 1; + } else if (a.file < b.file) { + return -1; + } else { + return 0; + } + }); + }); + }, + + /** + * Gets a migration with a given name. + * + * @param {String} needle - Name of the migration. + * @returns {Promise.} + * @private + */ + _findMigration: function (needle) { + return this + ._findMigrations() + .then(function (migrations) { + return migrations.filter(function (migration) { + return migration.testFileName(needle); + })[0]; + }) + .then(function (migration) { + if (migration) { + return migration; + } else { + return Bluebird.reject(new Error('Unable to find migration: ' + needle)); + } + }); + }, + + /** + * Checks if migration is executed. It will success if and only if there is + * an executed migration with a given name. + * + * @param {String} _migration - Name of migration to be checked. + * @returns {Promise} + * @private + */ + _wasExecuted: function (_migration) { + return this.executed().filter(function (migration) { + return migration.testFileName(_migration.file); + }).then(function(migrations) { + if (migrations[0]) { + return Bluebird.resolve(); + } else { + return Bluebird.reject(new Error('Migration was not executed: ' + _migration.file)); + } + }); + }, + + /** + * Checks if a list of migrations are all executed. It will success if and + * only if there is an executed migration for each given name. + * + * @param {String[]} migrationNames - List of migration names to be checked. + * @returns {Promise} + * @private + */ + _wereExecuted: function (migrationNames) { + return Bluebird + .resolve(migrationNames) + .bind(this) + .map(function (migration) { + return this._wasExecuted(migration); + }); + }, + + /** + * Checks if migration is pending. It will success if and only if there is + * a pending migration with a given name. + * + * @param {String} _migration - Name of migration to be checked. + * @returns {Promise} + * @private + */ + _isPending: function (_migration) { + return this.pending().filter(function (migration) { + return migration.testFileName(_migration.file); + }).then(function(migrations) { + if (migrations[0]) { + return Bluebird.resolve(); + } else { + return Bluebird.reject(new Error('Migration is not pending: ' + _migration.file)); + } + }); + }, + + /** + * Checks if a list of migrations are all pending. It will success if and only + * if there is a pending migration for each given name. + * + * @param {String[]} migrationNames - List of migration names to be checked. + * @returns {Promise} + * @private + */ + _arePending: function (migrationNames) { + return Bluebird + .resolve(migrationNames) + .bind(this) + .map(function (migration) { + return this._isPending(migration); + }); + }, + + /** + * Skip migrations in a given migration list after `to` migration. + * + * @param {String} to - The last one migration to be accepted. + * @param {Migration[]} migrations - Migration list to be filtered. + * @returns {Promise.} - List of migrations before `to`. + * @private + */ + _findMigrationsUntilMatch: function (to, migrations) { + return Bluebird.resolve(migrations) + .map(function (migration) { return migration.file }) + .reduce(function (acc, migration) { + if (acc.add) { + acc.migrations.push(migration); + + if (to && (migration.indexOf(to) === 0)) { + // Stop adding the migrations once the final migration + // has been added. + acc.add = false; + } + } + + return acc; + }, { migrations: [], add: true }) + .get('migrations'); + } +}); diff --git a/node_modules/umzug/lib/helper.js b/node_modules/umzug/lib/helper.js new file mode 100644 index 0000000..bc271f1 --- /dev/null +++ b/node_modules/umzug/lib/helper.js @@ -0,0 +1,29 @@ +'use strict'; + +var resolve = require('resolve').sync; + +module.exports = { + /** + * Try to require module from file relative to process cwd or regular require. + * + * @param {string} packageName - Filename relative to process' cwd or package + * name to be required. + * @returns {*|undefined} Required module + */ + resolve: function (packageName) { + var result; + + try { + result = resolve(packageName, { basedir: process.cwd() }); + result = require(result); + } catch (e) { + try { + result = require(packageName); + } catch (e) { + result = undefined; + } + } + + return result; + } +}; diff --git a/node_modules/umzug/lib/migration.js b/node_modules/umzug/lib/migration.js new file mode 100644 index 0000000..b2ab444 --- /dev/null +++ b/node_modules/umzug/lib/migration.js @@ -0,0 +1,106 @@ +'use strict'; + +var _path = require('path'); +var Bluebird = require('bluebird'); +var helper = require('./helper'); +var redefine = require('redefine'); + +/** + * @class Migration + */ +module.exports = redefine.Class(/** @lends Migration.prototype */{ + /** + * Wrapper function for migration methods. + * + * @callback Migration~wrap + * @param {function} - Migration method to be wrapped. + * @return {*|Promise} + */ + + /** + * Constructs Migration. + * + * @param {String} path - Path of the migration file. + * @param {Object} options + * @param {String} options.upName - Name of the method `up` in migration + * module. + * @param {String} options.downName - Name of the method `down` in migration + * module. + * @param {Object} options.migrations + * @param {Migration~wrap} options.migrations.wrap - Wrapper function for + * migration methods. + * @constructs Migration + */ + constructor: function(path, options) { + this.path = _path.resolve(path); + this.file = _path.basename(this.path); + this.options = options; + }, + + /** + * Tries to require migration module. CoffeeScript support requires + * 'coffee-script' to be installed. + * + * @returns {Object} Required migration module + */ + migration: function () { + if (this.path.match(/\.coffee$/)) { + // 1.7.x compiler registration + helper.resolve('coffee-script/register') || + + // Prior to 1.7.x compiler registration + helper.resolve('coffee-script') || + /* jshint expr: true */ + (function () { + console.error('You have to add "coffee-script" to your package.json.'); + process.exit(1); + })(); + } + + return require(this.path); + }, + + /** + * Executes method `up` of migration. + * + * @returns {*|Promise} + */ + up: function () { + return this._exec(this.options.upName, [].slice.apply(arguments)); + }, + + /** + * Executes method `down` of migration. + * + * @returns {*|Promise} + */ + down: function () { + return this._exec(this.options.downName, [].slice.apply(arguments)); + }, + + /** + * Check if migration file name is starting with needle. + * @param {String} needle - The beginning of the file name. + * @returns {boolean} + */ + testFileName: function (needle) { + return this.file.indexOf(needle) === 0; + }, + + /** + * Executes a given method of migration with given arguments. + * + * @param {String} method - Name of the method to be called. + * @param {*} args - Arguments to be used when called the method. + * @returns {*|Promise} + * @private + */ + _exec: function (method, args) { + var migration = this.migration(); + var fun = migration[method]; + if (!fun) return Bluebird.reject('Could not find migration method: ' + method); + var wrappedFun = this.options.migrations.wrap(fun); + + return wrappedFun.apply(migration, args); + } +}); diff --git a/node_modules/umzug/lib/storages/json.js b/node_modules/umzug/lib/storages/json.js new file mode 100644 index 0000000..75e9a66 --- /dev/null +++ b/node_modules/umzug/lib/storages/json.js @@ -0,0 +1,86 @@ +'use strict'; + +var _ = require('lodash'); +var Bluebird = require('bluebird'); +var fs = require('fs'); +var path = require('path'); +var redefine = require('redefine'); + +/** + * @class JSONStorage + */ +module.exports = redefine.Class(/** @lends JSONStorage.prototype */ { + /** + * Constructs JSON file storage. + * + * @param {Object} [options] + * @param {Object} [options.storageOptions] + * @param {String} [options.storageOptions.path='./umzug.json'] - Path to JSON + * file where the log is stored. Defaults './umzug.json' relative to process' + * cwd. + * @constructs JSONStorage + */ + constructor: function (options) { + this.options = options || {}; + + this.options.storageOptions = _.assign({ + path: path.resolve(process.cwd(), 'umzug.json') + }, this.options.storageOptions || {}); + }, + + /** + * Logs migration to be considered as executed. + * + * @param {String} migrationName - Name of the migration to be logged. + * @returns {Promise} + */ + logMigration: function (migrationName) { + var filePath = this.options.storageOptions.path; + var readfile = Bluebird.promisify(fs.readFile); + var writefile = Bluebird.promisify(fs.writeFile); + + return readfile(filePath) + .catch(function () { return '[]'; }) + .then(function (content) { return JSON.parse(content); }) + .then(function (content) { + content.push(migrationName); + return writefile(filePath, JSON.stringify(content, null, ' ')); + }); + }, + + /** + * Unlogs migration to be considered as pending. + * + * @param {String} migrationName - Name of the migration to be unlogged. + * @returns {Promise} + */ + unlogMigration: function (migrationName) { + var filePath = this.options.storageOptions.path; + var readfile = Bluebird.promisify(fs.readFile); + var writefile = Bluebird.promisify(fs.writeFile); + + return readfile(filePath) + .catch(function () { return '[]'; }) + .then(function (content) { return JSON.parse(content); }) + .then(function (content) { + content = _.without(content, migrationName); + return writefile(filePath, JSON.stringify(content, null, ' ')); + }); + }, + + /** + * Gets list of executed migrations. + * + * @returns {Promise.} + */ + executed: function () { + var filePath = this.options.storageOptions.path; + var readfile = Bluebird.promisify(fs.readFile); + + return readfile(filePath) + .catch(function () { return '[]'; }) + .then(function (content) { + return JSON.parse(content); + }); + } +}); diff --git a/node_modules/umzug/lib/storages/none.js b/node_modules/umzug/lib/storages/none.js new file mode 100644 index 0000000..983579a --- /dev/null +++ b/node_modules/umzug/lib/storages/none.js @@ -0,0 +1,46 @@ +'use strict'; + +var Bluebird = require('bluebird'); +var redefine = require('redefine'); + +/** + * @class NoneStorage + */ +module.exports = redefine.Class(/** @lends NoneStorage.prototype */ { + /** + * Constructs none storage. + * + * @param {Object} [options] + * @constructs NoneStorage + */ + constructor: function (options) {}, + + /** + * Does nothing. + * + * @param {String} migrationName - Name of migration to be logged. + * @returns {Promise} + */ + logMigration: function (migrationName) { + return Bluebird.resolve(); + }, + + /** + * Does nothing. + * + * @param {String} migrationName - Name of migration to unlog. + * @returns {Promise} + */ + unlogMigration: function (migrationName) { + return Bluebird.resolve(); + }, + + /** + * Does nothing. + * + * @returns {Promise.} + */ + executed: function () { + return Bluebird.resolve([]); + } +}); diff --git a/node_modules/umzug/lib/storages/sequelize.js b/node_modules/umzug/lib/storages/sequelize.js new file mode 100644 index 0000000..f0d1264 --- /dev/null +++ b/node_modules/umzug/lib/storages/sequelize.js @@ -0,0 +1,170 @@ +'use strict'; + +var _ = require('lodash'); +var redefine = require('redefine'); + +/** + * @class SequelizeStorage + */ +module.exports = redefine.Class(/** @lends SequelizeStorage.prototype*/ { + /** + * Constructs Sequelize based storage. + * + * Stores migration in a database table using Sequelize. One of "sequelize" or + * "model" storage option is required. + * + * If "sequelize" option is supplied will create a model named "SequelizeMeta" + * with timestamps and an attribute "name" for storing migrations. The model + * name, table name, and column name are customizable with options. + * + * If "model" option is supplied will use existing model for storing + * migrations. The model must have an attribute "name", which can be + * customized. + * + * If the table does not exist it will be created automatically. + * + * @param {Object} [options] + * @param {Object} [options.storageOptions] + * @param {Object} [options.storageOptions.sequelize] - configured instance of + * Sequelize. + * @param {Object} [options.storageOptions.model] - Sequelize model - must + * have column name matching "columnName" option. + * @param {String} [options.storageOptions.modelName='SequelizeMeta'] - name + * of model to create if "model" option is not supplied. + * @param {String} [options.storageOptions.tableName=modelName] - name of + * table to create if "model" option is not supplied. + * @param {String} [options.storageOptions.schema=schema] - name of the schema + * to create the table under, defaults to undefined. + * @param {String} [options.storageOptions.columnName='name'] - name of table + * column holding migration name. + * @param {String} [options.storageOptions.columnType=Sequelize.STRING] - type + * of the column. For utf8mb4 charsets under InnoDB, you may need to set + * this <= 190. + * @param {Boolean} [options.storageOptions.timestamps=false] - option to add + * timestamps to model table + * + * @constructs SequelizeStorage + */ + constructor: function (options) { + this.options = options || {}; + this.options.storageOptions = _.assign({ + // note 'sequelize' or 'model' is required + modelName: 'SequelizeMeta', + // note 'tableName' (optional) also supported + columnName: 'name', + timestamps: false + }, this.options.storageOptions || {}); + + if (!this.options.storageOptions.model && !this.options.storageOptions.sequelize) { + throw new Error('One of "sequelize" or "model" storage option is required'); + } + + // initialize model + if (!this.options.storageOptions.model) { + var sequelize = this.options.storageOptions.sequelize; + var modelName = this.options.storageOptions.modelName; + var Sequelize = sequelize.constructor; + var columnType = this.options.storageOptions.columnType || Sequelize.STRING; + + if (sequelize.isDefined(modelName)) { + this.options.storageOptions.model = sequelize.model(modelName); + } else { + var attributes = {}; + + attributes[this.options.storageOptions.columnName] = { + type: columnType, + allowNull: false, + unique: true, + primaryKey: true, + autoIncrement: false + }; + + this.options.storageOptions.model = sequelize.define( + modelName, + attributes, + { + tableName: this.options.storageOptions.tableName, + schema: this.options.storageOptions.schema, + timestamps: this.options.storageOptions.timestamps, + charset: 'utf8', + collate: 'utf8_unicode_ci' + } + ); + } + } + }, + + /** + * Logs migration to be considered as executed. + * + * @param {String} migrationName - Name of the migration to be logged. + * @returns {Promise} + */ + logMigration: function (migrationName) { + var self = this; + + return this._model() + .sync() + .then(function(Model) { + var migration = {}; + migration[self.options.storageOptions.columnName] = migrationName; + return Model.create(migration); + }); + }, + + /** + * Unlogs migration to be considered as pending. + * + * @param {String} migrationName - Name of the migration to be unlogged. + * @returns {Promise} + */ + unlogMigration: function (migrationName) { + var self = this; + var sequelize = this.options.storageOptions.sequelize; + var sequelizeVersion = !!sequelize.modelManager ? 2 : 1; + + return this._model() + .sync() + .then(function(Model) { + var where = {}; + where[self.options.storageOptions.columnName] = migrationName; + + if (sequelizeVersion > 1) { + // This is an ugly hack to find out which function signature we have to use. + where = { where: where }; + } + + return Model.destroy(where); + }); + }, + + /** + * Gets list of executed migrations. + * + * @returns {Promise.} + */ + executed: function () { + var self = this; + + return this._model() + .sync() + .then(function(Model) { + return Model.findAll({ order: [ [ self.options.storageOptions.columnName, 'ASC' ] ] }); + }) + .then(function(migrations) { + return migrations.map(function(migration) { + return migration[self.options.storageOptions.columnName]; + }); + }); + }, + + /** + * Gets Sequelize model used as a storage. + * + * @returns {Sequelize.Model} + * @private + */ + _model: function () { + return this.options.storageOptions.model; + } +}); diff --git a/node_modules/umzug/node_modules/lodash/LICENSE b/node_modules/umzug/node_modules/lodash/LICENSE new file mode 100644 index 0000000..c6f2f61 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/LICENSE @@ -0,0 +1,47 @@ +Copyright JS Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +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. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/node_modules/umzug/node_modules/lodash/README.md b/node_modules/umzug/node_modules/lodash/README.md new file mode 100644 index 0000000..acdd128 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/README.md @@ -0,0 +1,39 @@ +# lodash v4.17.4 + +The [Lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules. + +## Installation + +Using npm: +```shell +$ npm i -g npm +$ npm i --save lodash +``` + +In Node.js: +```js +// Load the full build. +var _ = require('lodash'); +// Load the core build. +var _ = require('lodash/core'); +// Load the FP build for immutable auto-curried iteratee-first data-last methods. +var fp = require('lodash/fp'); + +// Load method categories. +var array = require('lodash/array'); +var object = require('lodash/fp/object'); + +// Cherry-pick methods for smaller browserify/rollup/webpack bundles. +var at = require('lodash/at'); +var curryN = require('lodash/fp/curryN'); +``` + +See the [package source](https://github.com/lodash/lodash/tree/4.17.4-npm) for more details. + +**Note:**
    +Install [n_](https://www.npmjs.com/package/n_) for Lodash use in the Node.js < 6 REPL. + +## Support + +Tested in Chrome 54-55, Firefox 49-50, IE 11, Edge 14, Safari 9-10, Node.js 6-7, & PhantomJS 2.1.1.
    +Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available. diff --git a/node_modules/umzug/node_modules/lodash/_DataView.js b/node_modules/umzug/node_modules/lodash/_DataView.js new file mode 100644 index 0000000..ac2d57c --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_DataView.js @@ -0,0 +1,7 @@ +var getNative = require('./_getNative'), + root = require('./_root'); + +/* Built-in method references that are verified to be native. */ +var DataView = getNative(root, 'DataView'); + +module.exports = DataView; diff --git a/node_modules/umzug/node_modules/lodash/_Hash.js b/node_modules/umzug/node_modules/lodash/_Hash.js new file mode 100644 index 0000000..b504fe3 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_Hash.js @@ -0,0 +1,32 @@ +var hashClear = require('./_hashClear'), + hashDelete = require('./_hashDelete'), + hashGet = require('./_hashGet'), + hashHas = require('./_hashHas'), + hashSet = require('./_hashSet'); + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; + +module.exports = Hash; diff --git a/node_modules/umzug/node_modules/lodash/_LazyWrapper.js b/node_modules/umzug/node_modules/lodash/_LazyWrapper.js new file mode 100644 index 0000000..81786c7 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_LazyWrapper.js @@ -0,0 +1,28 @@ +var baseCreate = require('./_baseCreate'), + baseLodash = require('./_baseLodash'); + +/** Used as references for the maximum length and index of an array. */ +var MAX_ARRAY_LENGTH = 4294967295; + +/** + * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. + * + * @private + * @constructor + * @param {*} value The value to wrap. + */ +function LazyWrapper(value) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__dir__ = 1; + this.__filtered__ = false; + this.__iteratees__ = []; + this.__takeCount__ = MAX_ARRAY_LENGTH; + this.__views__ = []; +} + +// Ensure `LazyWrapper` is an instance of `baseLodash`. +LazyWrapper.prototype = baseCreate(baseLodash.prototype); +LazyWrapper.prototype.constructor = LazyWrapper; + +module.exports = LazyWrapper; diff --git a/node_modules/umzug/node_modules/lodash/_ListCache.js b/node_modules/umzug/node_modules/lodash/_ListCache.js new file mode 100644 index 0000000..26895c3 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_ListCache.js @@ -0,0 +1,32 @@ +var listCacheClear = require('./_listCacheClear'), + listCacheDelete = require('./_listCacheDelete'), + listCacheGet = require('./_listCacheGet'), + listCacheHas = require('./_listCacheHas'), + listCacheSet = require('./_listCacheSet'); + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; + +module.exports = ListCache; diff --git a/node_modules/umzug/node_modules/lodash/_LodashWrapper.js b/node_modules/umzug/node_modules/lodash/_LodashWrapper.js new file mode 100644 index 0000000..c1e4d9d --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_LodashWrapper.js @@ -0,0 +1,22 @@ +var baseCreate = require('./_baseCreate'), + baseLodash = require('./_baseLodash'); + +/** + * The base constructor for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable explicit method chain sequences. + */ +function LodashWrapper(value, chainAll) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__chain__ = !!chainAll; + this.__index__ = 0; + this.__values__ = undefined; +} + +LodashWrapper.prototype = baseCreate(baseLodash.prototype); +LodashWrapper.prototype.constructor = LodashWrapper; + +module.exports = LodashWrapper; diff --git a/node_modules/umzug/node_modules/lodash/_Map.js b/node_modules/umzug/node_modules/lodash/_Map.js new file mode 100644 index 0000000..b73f29a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_Map.js @@ -0,0 +1,7 @@ +var getNative = require('./_getNative'), + root = require('./_root'); + +/* Built-in method references that are verified to be native. */ +var Map = getNative(root, 'Map'); + +module.exports = Map; diff --git a/node_modules/umzug/node_modules/lodash/_MapCache.js b/node_modules/umzug/node_modules/lodash/_MapCache.js new file mode 100644 index 0000000..4a4eea7 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_MapCache.js @@ -0,0 +1,32 @@ +var mapCacheClear = require('./_mapCacheClear'), + mapCacheDelete = require('./_mapCacheDelete'), + mapCacheGet = require('./_mapCacheGet'), + mapCacheHas = require('./_mapCacheHas'), + mapCacheSet = require('./_mapCacheSet'); + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; + +module.exports = MapCache; diff --git a/node_modules/umzug/node_modules/lodash/_Promise.js b/node_modules/umzug/node_modules/lodash/_Promise.js new file mode 100644 index 0000000..247b9e1 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_Promise.js @@ -0,0 +1,7 @@ +var getNative = require('./_getNative'), + root = require('./_root'); + +/* Built-in method references that are verified to be native. */ +var Promise = getNative(root, 'Promise'); + +module.exports = Promise; diff --git a/node_modules/umzug/node_modules/lodash/_Set.js b/node_modules/umzug/node_modules/lodash/_Set.js new file mode 100644 index 0000000..b3c8dcb --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_Set.js @@ -0,0 +1,7 @@ +var getNative = require('./_getNative'), + root = require('./_root'); + +/* Built-in method references that are verified to be native. */ +var Set = getNative(root, 'Set'); + +module.exports = Set; diff --git a/node_modules/umzug/node_modules/lodash/_SetCache.js b/node_modules/umzug/node_modules/lodash/_SetCache.js new file mode 100644 index 0000000..6468b06 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_SetCache.js @@ -0,0 +1,27 @@ +var MapCache = require('./_MapCache'), + setCacheAdd = require('./_setCacheAdd'), + setCacheHas = require('./_setCacheHas'); + +/** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ +function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new MapCache; + while (++index < length) { + this.add(values[index]); + } +} + +// Add methods to `SetCache`. +SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; +SetCache.prototype.has = setCacheHas; + +module.exports = SetCache; diff --git a/node_modules/umzug/node_modules/lodash/_Stack.js b/node_modules/umzug/node_modules/lodash/_Stack.js new file mode 100644 index 0000000..80b2cf1 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_Stack.js @@ -0,0 +1,27 @@ +var ListCache = require('./_ListCache'), + stackClear = require('./_stackClear'), + stackDelete = require('./_stackDelete'), + stackGet = require('./_stackGet'), + stackHas = require('./_stackHas'), + stackSet = require('./_stackSet'); + +/** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; +} + +// Add methods to `Stack`. +Stack.prototype.clear = stackClear; +Stack.prototype['delete'] = stackDelete; +Stack.prototype.get = stackGet; +Stack.prototype.has = stackHas; +Stack.prototype.set = stackSet; + +module.exports = Stack; diff --git a/node_modules/umzug/node_modules/lodash/_Symbol.js b/node_modules/umzug/node_modules/lodash/_Symbol.js new file mode 100644 index 0000000..a013f7c --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_Symbol.js @@ -0,0 +1,6 @@ +var root = require('./_root'); + +/** Built-in value references. */ +var Symbol = root.Symbol; + +module.exports = Symbol; diff --git a/node_modules/umzug/node_modules/lodash/_Uint8Array.js b/node_modules/umzug/node_modules/lodash/_Uint8Array.js new file mode 100644 index 0000000..2fb30e1 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_Uint8Array.js @@ -0,0 +1,6 @@ +var root = require('./_root'); + +/** Built-in value references. */ +var Uint8Array = root.Uint8Array; + +module.exports = Uint8Array; diff --git a/node_modules/umzug/node_modules/lodash/_WeakMap.js b/node_modules/umzug/node_modules/lodash/_WeakMap.js new file mode 100644 index 0000000..567f86c --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_WeakMap.js @@ -0,0 +1,7 @@ +var getNative = require('./_getNative'), + root = require('./_root'); + +/* Built-in method references that are verified to be native. */ +var WeakMap = getNative(root, 'WeakMap'); + +module.exports = WeakMap; diff --git a/node_modules/umzug/node_modules/lodash/_addMapEntry.js b/node_modules/umzug/node_modules/lodash/_addMapEntry.js new file mode 100644 index 0000000..5a69212 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_addMapEntry.js @@ -0,0 +1,15 @@ +/** + * Adds the key-value `pair` to `map`. + * + * @private + * @param {Object} map The map to modify. + * @param {Array} pair The key-value pair to add. + * @returns {Object} Returns `map`. + */ +function addMapEntry(map, pair) { + // Don't return `map.set` because it's not chainable in IE 11. + map.set(pair[0], pair[1]); + return map; +} + +module.exports = addMapEntry; diff --git a/node_modules/umzug/node_modules/lodash/_addSetEntry.js b/node_modules/umzug/node_modules/lodash/_addSetEntry.js new file mode 100644 index 0000000..1a07b70 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_addSetEntry.js @@ -0,0 +1,15 @@ +/** + * Adds `value` to `set`. + * + * @private + * @param {Object} set The set to modify. + * @param {*} value The value to add. + * @returns {Object} Returns `set`. + */ +function addSetEntry(set, value) { + // Don't return `set.add` because it's not chainable in IE 11. + set.add(value); + return set; +} + +module.exports = addSetEntry; diff --git a/node_modules/umzug/node_modules/lodash/_apply.js b/node_modules/umzug/node_modules/lodash/_apply.js new file mode 100644 index 0000000..36436dd --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_apply.js @@ -0,0 +1,21 @@ +/** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ +function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); +} + +module.exports = apply; diff --git a/node_modules/umzug/node_modules/lodash/_arrayAggregator.js b/node_modules/umzug/node_modules/lodash/_arrayAggregator.js new file mode 100644 index 0000000..d96c3ca --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_arrayAggregator.js @@ -0,0 +1,22 @@ +/** + * A specialized version of `baseAggregator` for arrays. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ +function arrayAggregator(array, setter, iteratee, accumulator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + var value = array[index]; + setter(accumulator, value, iteratee(value), array); + } + return accumulator; +} + +module.exports = arrayAggregator; diff --git a/node_modules/umzug/node_modules/lodash/_arrayEach.js b/node_modules/umzug/node_modules/lodash/_arrayEach.js new file mode 100644 index 0000000..2c5f579 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_arrayEach.js @@ -0,0 +1,22 @@ +/** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; +} + +module.exports = arrayEach; diff --git a/node_modules/umzug/node_modules/lodash/_arrayEachRight.js b/node_modules/umzug/node_modules/lodash/_arrayEachRight.js new file mode 100644 index 0000000..976ca5c --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_arrayEachRight.js @@ -0,0 +1,21 @@ +/** + * A specialized version of `_.forEachRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEachRight(array, iteratee) { + var length = array == null ? 0 : array.length; + + while (length--) { + if (iteratee(array[length], length, array) === false) { + break; + } + } + return array; +} + +module.exports = arrayEachRight; diff --git a/node_modules/umzug/node_modules/lodash/_arrayEvery.js b/node_modules/umzug/node_modules/lodash/_arrayEvery.js new file mode 100644 index 0000000..e26a918 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_arrayEvery.js @@ -0,0 +1,23 @@ +/** + * A specialized version of `_.every` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + */ +function arrayEvery(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (!predicate(array[index], index, array)) { + return false; + } + } + return true; +} + +module.exports = arrayEvery; diff --git a/node_modules/umzug/node_modules/lodash/_arrayFilter.js b/node_modules/umzug/node_modules/lodash/_arrayFilter.js new file mode 100644 index 0000000..75ea254 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_arrayFilter.js @@ -0,0 +1,25 @@ +/** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; +} + +module.exports = arrayFilter; diff --git a/node_modules/umzug/node_modules/lodash/_arrayIncludes.js b/node_modules/umzug/node_modules/lodash/_arrayIncludes.js new file mode 100644 index 0000000..3737a6d --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_arrayIncludes.js @@ -0,0 +1,17 @@ +var baseIndexOf = require('./_baseIndexOf'); + +/** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; +} + +module.exports = arrayIncludes; diff --git a/node_modules/umzug/node_modules/lodash/_arrayIncludesWith.js b/node_modules/umzug/node_modules/lodash/_arrayIncludesWith.js new file mode 100644 index 0000000..235fd97 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_arrayIncludesWith.js @@ -0,0 +1,22 @@ +/** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; +} + +module.exports = arrayIncludesWith; diff --git a/node_modules/umzug/node_modules/lodash/_arrayLikeKeys.js b/node_modules/umzug/node_modules/lodash/_arrayLikeKeys.js new file mode 100644 index 0000000..b2ec9ce --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_arrayLikeKeys.js @@ -0,0 +1,49 @@ +var baseTimes = require('./_baseTimes'), + isArguments = require('./isArguments'), + isArray = require('./isArray'), + isBuffer = require('./isBuffer'), + isIndex = require('./_isIndex'), + isTypedArray = require('./isTypedArray'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ +function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length) + ))) { + result.push(key); + } + } + return result; +} + +module.exports = arrayLikeKeys; diff --git a/node_modules/umzug/node_modules/lodash/_arrayMap.js b/node_modules/umzug/node_modules/lodash/_arrayMap.js new file mode 100644 index 0000000..22b2246 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_arrayMap.js @@ -0,0 +1,21 @@ +/** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; +} + +module.exports = arrayMap; diff --git a/node_modules/umzug/node_modules/lodash/_arrayPush.js b/node_modules/umzug/node_modules/lodash/_arrayPush.js new file mode 100644 index 0000000..7d742b3 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_arrayPush.js @@ -0,0 +1,20 @@ +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} + +module.exports = arrayPush; diff --git a/node_modules/umzug/node_modules/lodash/_arrayReduce.js b/node_modules/umzug/node_modules/lodash/_arrayReduce.js new file mode 100644 index 0000000..de8b79b --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_arrayReduce.js @@ -0,0 +1,26 @@ +/** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ +function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array == null ? 0 : array.length; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; +} + +module.exports = arrayReduce; diff --git a/node_modules/umzug/node_modules/lodash/_arrayReduceRight.js b/node_modules/umzug/node_modules/lodash/_arrayReduceRight.js new file mode 100644 index 0000000..22d8976 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_arrayReduceRight.js @@ -0,0 +1,24 @@ +/** + * A specialized version of `_.reduceRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the last element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ +function arrayReduceRight(array, iteratee, accumulator, initAccum) { + var length = array == null ? 0 : array.length; + if (initAccum && length) { + accumulator = array[--length]; + } + while (length--) { + accumulator = iteratee(accumulator, array[length], length, array); + } + return accumulator; +} + +module.exports = arrayReduceRight; diff --git a/node_modules/umzug/node_modules/lodash/_arraySample.js b/node_modules/umzug/node_modules/lodash/_arraySample.js new file mode 100644 index 0000000..fcab010 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_arraySample.js @@ -0,0 +1,15 @@ +var baseRandom = require('./_baseRandom'); + +/** + * A specialized version of `_.sample` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @returns {*} Returns the random element. + */ +function arraySample(array) { + var length = array.length; + return length ? array[baseRandom(0, length - 1)] : undefined; +} + +module.exports = arraySample; diff --git a/node_modules/umzug/node_modules/lodash/_arraySampleSize.js b/node_modules/umzug/node_modules/lodash/_arraySampleSize.js new file mode 100644 index 0000000..8c7e364 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_arraySampleSize.js @@ -0,0 +1,17 @@ +var baseClamp = require('./_baseClamp'), + copyArray = require('./_copyArray'), + shuffleSelf = require('./_shuffleSelf'); + +/** + * A specialized version of `_.sampleSize` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ +function arraySampleSize(array, n) { + return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); +} + +module.exports = arraySampleSize; diff --git a/node_modules/umzug/node_modules/lodash/_arrayShuffle.js b/node_modules/umzug/node_modules/lodash/_arrayShuffle.js new file mode 100644 index 0000000..46313a3 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_arrayShuffle.js @@ -0,0 +1,15 @@ +var copyArray = require('./_copyArray'), + shuffleSelf = require('./_shuffleSelf'); + +/** + * A specialized version of `_.shuffle` for arrays. + * + * @private + * @param {Array} array The array to shuffle. + * @returns {Array} Returns the new shuffled array. + */ +function arrayShuffle(array) { + return shuffleSelf(copyArray(array)); +} + +module.exports = arrayShuffle; diff --git a/node_modules/umzug/node_modules/lodash/_arraySome.js b/node_modules/umzug/node_modules/lodash/_arraySome.js new file mode 100644 index 0000000..6fd02fd --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_arraySome.js @@ -0,0 +1,23 @@ +/** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ +function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; +} + +module.exports = arraySome; diff --git a/node_modules/umzug/node_modules/lodash/_asciiSize.js b/node_modules/umzug/node_modules/lodash/_asciiSize.js new file mode 100644 index 0000000..11d29c3 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_asciiSize.js @@ -0,0 +1,12 @@ +var baseProperty = require('./_baseProperty'); + +/** + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ +var asciiSize = baseProperty('length'); + +module.exports = asciiSize; diff --git a/node_modules/umzug/node_modules/lodash/_asciiToArray.js b/node_modules/umzug/node_modules/lodash/_asciiToArray.js new file mode 100644 index 0000000..8e3dd5b --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_asciiToArray.js @@ -0,0 +1,12 @@ +/** + * Converts an ASCII `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function asciiToArray(string) { + return string.split(''); +} + +module.exports = asciiToArray; diff --git a/node_modules/umzug/node_modules/lodash/_asciiWords.js b/node_modules/umzug/node_modules/lodash/_asciiWords.js new file mode 100644 index 0000000..d765f0f --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_asciiWords.js @@ -0,0 +1,15 @@ +/** Used to match words composed of alphanumeric characters. */ +var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; + +/** + * Splits an ASCII `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ +function asciiWords(string) { + return string.match(reAsciiWord) || []; +} + +module.exports = asciiWords; diff --git a/node_modules/umzug/node_modules/lodash/_assignMergeValue.js b/node_modules/umzug/node_modules/lodash/_assignMergeValue.js new file mode 100644 index 0000000..cb1185e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_assignMergeValue.js @@ -0,0 +1,20 @@ +var baseAssignValue = require('./_baseAssignValue'), + eq = require('./eq'); + +/** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignMergeValue(object, key, value) { + if ((value !== undefined && !eq(object[key], value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } +} + +module.exports = assignMergeValue; diff --git a/node_modules/umzug/node_modules/lodash/_assignValue.js b/node_modules/umzug/node_modules/lodash/_assignValue.js new file mode 100644 index 0000000..4083957 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_assignValue.js @@ -0,0 +1,28 @@ +var baseAssignValue = require('./_baseAssignValue'), + eq = require('./eq'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } +} + +module.exports = assignValue; diff --git a/node_modules/umzug/node_modules/lodash/_assocIndexOf.js b/node_modules/umzug/node_modules/lodash/_assocIndexOf.js new file mode 100644 index 0000000..5b77a2b --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_assocIndexOf.js @@ -0,0 +1,21 @@ +var eq = require('./eq'); + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; +} + +module.exports = assocIndexOf; diff --git a/node_modules/umzug/node_modules/lodash/_baseAggregator.js b/node_modules/umzug/node_modules/lodash/_baseAggregator.js new file mode 100644 index 0000000..4bc9e91 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseAggregator.js @@ -0,0 +1,21 @@ +var baseEach = require('./_baseEach'); + +/** + * Aggregates elements of `collection` on `accumulator` with keys transformed + * by `iteratee` and values set by `setter`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ +function baseAggregator(collection, setter, iteratee, accumulator) { + baseEach(collection, function(value, key, collection) { + setter(accumulator, value, iteratee(value), collection); + }); + return accumulator; +} + +module.exports = baseAggregator; diff --git a/node_modules/umzug/node_modules/lodash/_baseAssign.js b/node_modules/umzug/node_modules/lodash/_baseAssign.js new file mode 100644 index 0000000..e5c4a1a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseAssign.js @@ -0,0 +1,17 @@ +var copyObject = require('./_copyObject'), + keys = require('./keys'); + +/** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); +} + +module.exports = baseAssign; diff --git a/node_modules/umzug/node_modules/lodash/_baseAssignIn.js b/node_modules/umzug/node_modules/lodash/_baseAssignIn.js new file mode 100644 index 0000000..6624f90 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseAssignIn.js @@ -0,0 +1,17 @@ +var copyObject = require('./_copyObject'), + keysIn = require('./keysIn'); + +/** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); +} + +module.exports = baseAssignIn; diff --git a/node_modules/umzug/node_modules/lodash/_baseAssignValue.js b/node_modules/umzug/node_modules/lodash/_baseAssignValue.js new file mode 100644 index 0000000..d6f66ef --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseAssignValue.js @@ -0,0 +1,25 @@ +var defineProperty = require('./_defineProperty'); + +/** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } +} + +module.exports = baseAssignValue; diff --git a/node_modules/umzug/node_modules/lodash/_baseAt.js b/node_modules/umzug/node_modules/lodash/_baseAt.js new file mode 100644 index 0000000..90e4237 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseAt.js @@ -0,0 +1,23 @@ +var get = require('./get'); + +/** + * The base implementation of `_.at` without support for individual paths. + * + * @private + * @param {Object} object The object to iterate over. + * @param {string[]} paths The property paths to pick. + * @returns {Array} Returns the picked elements. + */ +function baseAt(object, paths) { + var index = -1, + length = paths.length, + result = Array(length), + skip = object == null; + + while (++index < length) { + result[index] = skip ? undefined : get(object, paths[index]); + } + return result; +} + +module.exports = baseAt; diff --git a/node_modules/umzug/node_modules/lodash/_baseClamp.js b/node_modules/umzug/node_modules/lodash/_baseClamp.js new file mode 100644 index 0000000..a1c5692 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseClamp.js @@ -0,0 +1,22 @@ +/** + * The base implementation of `_.clamp` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + */ +function baseClamp(number, lower, upper) { + if (number === number) { + if (upper !== undefined) { + number = number <= upper ? number : upper; + } + if (lower !== undefined) { + number = number >= lower ? number : lower; + } + } + return number; +} + +module.exports = baseClamp; diff --git a/node_modules/umzug/node_modules/lodash/_baseClone.js b/node_modules/umzug/node_modules/lodash/_baseClone.js new file mode 100644 index 0000000..7c27a37 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseClone.js @@ -0,0 +1,153 @@ +var Stack = require('./_Stack'), + arrayEach = require('./_arrayEach'), + assignValue = require('./_assignValue'), + baseAssign = require('./_baseAssign'), + baseAssignIn = require('./_baseAssignIn'), + cloneBuffer = require('./_cloneBuffer'), + copyArray = require('./_copyArray'), + copySymbols = require('./_copySymbols'), + copySymbolsIn = require('./_copySymbolsIn'), + getAllKeys = require('./_getAllKeys'), + getAllKeysIn = require('./_getAllKeysIn'), + getTag = require('./_getTag'), + initCloneArray = require('./_initCloneArray'), + initCloneByTag = require('./_initCloneByTag'), + initCloneObject = require('./_initCloneObject'), + isArray = require('./isArray'), + isBuffer = require('./isBuffer'), + isObject = require('./isObject'), + keys = require('./keys'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values supported by `_.clone`. */ +var cloneableTags = {}; +cloneableTags[argsTag] = cloneableTags[arrayTag] = +cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = +cloneableTags[boolTag] = cloneableTags[dateTag] = +cloneableTags[float32Tag] = cloneableTags[float64Tag] = +cloneableTags[int8Tag] = cloneableTags[int16Tag] = +cloneableTags[int32Tag] = cloneableTags[mapTag] = +cloneableTags[numberTag] = cloneableTags[objectTag] = +cloneableTags[regexpTag] = cloneableTags[setTag] = +cloneableTags[stringTag] = cloneableTags[symbolTag] = +cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = +cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; +cloneableTags[errorTag] = cloneableTags[funcTag] = +cloneableTags[weakMapTag] = false; + +/** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ +function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; + + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; + + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = (isFlat || isFunc) ? {} : initCloneObject(value); + if (!isDeep) { + return isFlat + ? copySymbolsIn(value, baseAssignIn(result, value)) + : copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, baseClone, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + var keysFunc = isFull + ? (isFlat ? getAllKeysIn : getAllKeys) + : (isFlat ? keysIn : keys); + + var props = isArr ? undefined : keysFunc(value); + arrayEach(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; +} + +module.exports = baseClone; diff --git a/node_modules/umzug/node_modules/lodash/_baseConforms.js b/node_modules/umzug/node_modules/lodash/_baseConforms.js new file mode 100644 index 0000000..947e20d --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseConforms.js @@ -0,0 +1,18 @@ +var baseConformsTo = require('./_baseConformsTo'), + keys = require('./keys'); + +/** + * The base implementation of `_.conforms` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + */ +function baseConforms(source) { + var props = keys(source); + return function(object) { + return baseConformsTo(object, source, props); + }; +} + +module.exports = baseConforms; diff --git a/node_modules/umzug/node_modules/lodash/_baseConformsTo.js b/node_modules/umzug/node_modules/lodash/_baseConformsTo.js new file mode 100644 index 0000000..e449cb8 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseConformsTo.js @@ -0,0 +1,27 @@ +/** + * The base implementation of `_.conformsTo` which accepts `props` to check. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + */ +function baseConformsTo(object, source, props) { + var length = props.length; + if (object == null) { + return !length; + } + object = Object(object); + while (length--) { + var key = props[length], + predicate = source[key], + value = object[key]; + + if ((value === undefined && !(key in object)) || !predicate(value)) { + return false; + } + } + return true; +} + +module.exports = baseConformsTo; diff --git a/node_modules/umzug/node_modules/lodash/_baseCreate.js b/node_modules/umzug/node_modules/lodash/_baseCreate.js new file mode 100644 index 0000000..ffa6a52 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseCreate.js @@ -0,0 +1,30 @@ +var isObject = require('./isObject'); + +/** Built-in value references. */ +var objectCreate = Object.create; + +/** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ +var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; +}()); + +module.exports = baseCreate; diff --git a/node_modules/umzug/node_modules/lodash/_baseDelay.js b/node_modules/umzug/node_modules/lodash/_baseDelay.js new file mode 100644 index 0000000..1486d69 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseDelay.js @@ -0,0 +1,21 @@ +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {Array} args The arguments to provide to `func`. + * @returns {number|Object} Returns the timer id or timeout object. + */ +function baseDelay(func, wait, args) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return setTimeout(function() { func.apply(undefined, args); }, wait); +} + +module.exports = baseDelay; diff --git a/node_modules/umzug/node_modules/lodash/_baseDifference.js b/node_modules/umzug/node_modules/lodash/_baseDifference.js new file mode 100644 index 0000000..343ac19 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseDifference.js @@ -0,0 +1,67 @@ +var SetCache = require('./_SetCache'), + arrayIncludes = require('./_arrayIncludes'), + arrayIncludesWith = require('./_arrayIncludesWith'), + arrayMap = require('./_arrayMap'), + baseUnary = require('./_baseUnary'), + cacheHas = require('./_cacheHas'); + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * The base implementation of methods like `_.difference` without support + * for excluding multiple arrays or iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Array} values The values to exclude. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + */ +function baseDifference(array, values, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + isCommon = true, + length = array.length, + result = [], + valuesLength = values.length; + + if (!length) { + return result; + } + if (iteratee) { + values = arrayMap(values, baseUnary(iteratee)); + } + if (comparator) { + includes = arrayIncludesWith; + isCommon = false; + } + else if (values.length >= LARGE_ARRAY_SIZE) { + includes = cacheHas; + isCommon = false; + values = new SetCache(values); + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee == null ? value : iteratee(value); + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === computed) { + continue outer; + } + } + result.push(value); + } + else if (!includes(values, computed, comparator)) { + result.push(value); + } + } + return result; +} + +module.exports = baseDifference; diff --git a/node_modules/umzug/node_modules/lodash/_baseEach.js b/node_modules/umzug/node_modules/lodash/_baseEach.js new file mode 100644 index 0000000..512c067 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseEach.js @@ -0,0 +1,14 @@ +var baseForOwn = require('./_baseForOwn'), + createBaseEach = require('./_createBaseEach'); + +/** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ +var baseEach = createBaseEach(baseForOwn); + +module.exports = baseEach; diff --git a/node_modules/umzug/node_modules/lodash/_baseEachRight.js b/node_modules/umzug/node_modules/lodash/_baseEachRight.js new file mode 100644 index 0000000..0a8feec --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseEachRight.js @@ -0,0 +1,14 @@ +var baseForOwnRight = require('./_baseForOwnRight'), + createBaseEach = require('./_createBaseEach'); + +/** + * The base implementation of `_.forEachRight` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ +var baseEachRight = createBaseEach(baseForOwnRight, true); + +module.exports = baseEachRight; diff --git a/node_modules/umzug/node_modules/lodash/_baseEvery.js b/node_modules/umzug/node_modules/lodash/_baseEvery.js new file mode 100644 index 0000000..fa52f7b --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseEvery.js @@ -0,0 +1,21 @@ +var baseEach = require('./_baseEach'); + +/** + * The base implementation of `_.every` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ +function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function(value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; +} + +module.exports = baseEvery; diff --git a/node_modules/umzug/node_modules/lodash/_baseExtremum.js b/node_modules/umzug/node_modules/lodash/_baseExtremum.js new file mode 100644 index 0000000..9d6aa77 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseExtremum.js @@ -0,0 +1,32 @@ +var isSymbol = require('./isSymbol'); + +/** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ +function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if (current != null && (computed === undefined + ? (current === current && !isSymbol(current)) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } + } + return result; +} + +module.exports = baseExtremum; diff --git a/node_modules/umzug/node_modules/lodash/_baseFill.js b/node_modules/umzug/node_modules/lodash/_baseFill.js new file mode 100644 index 0000000..46ef9c7 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseFill.js @@ -0,0 +1,32 @@ +var toInteger = require('./toInteger'), + toLength = require('./toLength'); + +/** + * The base implementation of `_.fill` without an iteratee call guard. + * + * @private + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + */ +function baseFill(array, value, start, end) { + var length = array.length; + + start = toInteger(start); + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = (end === undefined || end > length) ? length : toInteger(end); + if (end < 0) { + end += length; + } + end = start > end ? 0 : toLength(end); + while (start < end) { + array[start++] = value; + } + return array; +} + +module.exports = baseFill; diff --git a/node_modules/umzug/node_modules/lodash/_baseFilter.js b/node_modules/umzug/node_modules/lodash/_baseFilter.js new file mode 100644 index 0000000..4678477 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseFilter.js @@ -0,0 +1,21 @@ +var baseEach = require('./_baseEach'); + +/** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; +} + +module.exports = baseFilter; diff --git a/node_modules/umzug/node_modules/lodash/_baseFindIndex.js b/node_modules/umzug/node_modules/lodash/_baseFindIndex.js new file mode 100644 index 0000000..e3f5d8a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseFindIndex.js @@ -0,0 +1,24 @@ +/** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; +} + +module.exports = baseFindIndex; diff --git a/node_modules/umzug/node_modules/lodash/_baseFindKey.js b/node_modules/umzug/node_modules/lodash/_baseFindKey.js new file mode 100644 index 0000000..2e430f3 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseFindKey.js @@ -0,0 +1,23 @@ +/** + * The base implementation of methods like `_.findKey` and `_.findLastKey`, + * without support for iteratee shorthands, which iterates over `collection` + * using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the found element or its key, else `undefined`. + */ +function baseFindKey(collection, predicate, eachFunc) { + var result; + eachFunc(collection, function(value, key, collection) { + if (predicate(value, key, collection)) { + result = key; + return false; + } + }); + return result; +} + +module.exports = baseFindKey; diff --git a/node_modules/umzug/node_modules/lodash/_baseFlatten.js b/node_modules/umzug/node_modules/lodash/_baseFlatten.js new file mode 100644 index 0000000..4b1e009 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseFlatten.js @@ -0,0 +1,38 @@ +var arrayPush = require('./_arrayPush'), + isFlattenable = require('./_isFlattenable'); + +/** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ +function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; +} + +module.exports = baseFlatten; diff --git a/node_modules/umzug/node_modules/lodash/_baseFor.js b/node_modules/umzug/node_modules/lodash/_baseFor.js new file mode 100644 index 0000000..d946590 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseFor.js @@ -0,0 +1,16 @@ +var createBaseFor = require('./_createBaseFor'); + +/** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ +var baseFor = createBaseFor(); + +module.exports = baseFor; diff --git a/node_modules/umzug/node_modules/lodash/_baseForOwn.js b/node_modules/umzug/node_modules/lodash/_baseForOwn.js new file mode 100644 index 0000000..503d523 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseForOwn.js @@ -0,0 +1,16 @@ +var baseFor = require('./_baseFor'), + keys = require('./keys'); + +/** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); +} + +module.exports = baseForOwn; diff --git a/node_modules/umzug/node_modules/lodash/_baseForOwnRight.js b/node_modules/umzug/node_modules/lodash/_baseForOwnRight.js new file mode 100644 index 0000000..a4b10e6 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseForOwnRight.js @@ -0,0 +1,16 @@ +var baseForRight = require('./_baseForRight'), + keys = require('./keys'); + +/** + * The base implementation of `_.forOwnRight` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwnRight(object, iteratee) { + return object && baseForRight(object, iteratee, keys); +} + +module.exports = baseForOwnRight; diff --git a/node_modules/umzug/node_modules/lodash/_baseForRight.js b/node_modules/umzug/node_modules/lodash/_baseForRight.js new file mode 100644 index 0000000..32842cd --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseForRight.js @@ -0,0 +1,15 @@ +var createBaseFor = require('./_createBaseFor'); + +/** + * This function is like `baseFor` except that it iterates over properties + * in the opposite order. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ +var baseForRight = createBaseFor(true); + +module.exports = baseForRight; diff --git a/node_modules/umzug/node_modules/lodash/_baseFunctions.js b/node_modules/umzug/node_modules/lodash/_baseFunctions.js new file mode 100644 index 0000000..d23bc9b --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseFunctions.js @@ -0,0 +1,19 @@ +var arrayFilter = require('./_arrayFilter'), + isFunction = require('./isFunction'); + +/** + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from `props`. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the function names. + */ +function baseFunctions(object, props) { + return arrayFilter(props, function(key) { + return isFunction(object[key]); + }); +} + +module.exports = baseFunctions; diff --git a/node_modules/umzug/node_modules/lodash/_baseGet.js b/node_modules/umzug/node_modules/lodash/_baseGet.js new file mode 100644 index 0000000..a194913 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseGet.js @@ -0,0 +1,24 @@ +var castPath = require('./_castPath'), + toKey = require('./_toKey'); + +/** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ +function baseGet(object, path) { + path = castPath(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return (index && index == length) ? object : undefined; +} + +module.exports = baseGet; diff --git a/node_modules/umzug/node_modules/lodash/_baseGetAllKeys.js b/node_modules/umzug/node_modules/lodash/_baseGetAllKeys.js new file mode 100644 index 0000000..8ad204e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseGetAllKeys.js @@ -0,0 +1,20 @@ +var arrayPush = require('./_arrayPush'), + isArray = require('./isArray'); + +/** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ +function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); +} + +module.exports = baseGetAllKeys; diff --git a/node_modules/umzug/node_modules/lodash/_baseGetTag.js b/node_modules/umzug/node_modules/lodash/_baseGetTag.js new file mode 100644 index 0000000..b927ccc --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseGetTag.js @@ -0,0 +1,28 @@ +var Symbol = require('./_Symbol'), + getRawTag = require('./_getRawTag'), + objectToString = require('./_objectToString'); + +/** `Object#toString` result references. */ +var nullTag = '[object Null]', + undefinedTag = '[object Undefined]'; + +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +/** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); +} + +module.exports = baseGetTag; diff --git a/node_modules/umzug/node_modules/lodash/_baseGt.js b/node_modules/umzug/node_modules/lodash/_baseGt.js new file mode 100644 index 0000000..502d273 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseGt.js @@ -0,0 +1,14 @@ +/** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ +function baseGt(value, other) { + return value > other; +} + +module.exports = baseGt; diff --git a/node_modules/umzug/node_modules/lodash/_baseHas.js b/node_modules/umzug/node_modules/lodash/_baseHas.js new file mode 100644 index 0000000..1b73032 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseHas.js @@ -0,0 +1,19 @@ +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.has` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHas(object, key) { + return object != null && hasOwnProperty.call(object, key); +} + +module.exports = baseHas; diff --git a/node_modules/umzug/node_modules/lodash/_baseHasIn.js b/node_modules/umzug/node_modules/lodash/_baseHasIn.js new file mode 100644 index 0000000..2e0d042 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseHasIn.js @@ -0,0 +1,13 @@ +/** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHasIn(object, key) { + return object != null && key in Object(object); +} + +module.exports = baseHasIn; diff --git a/node_modules/umzug/node_modules/lodash/_baseInRange.js b/node_modules/umzug/node_modules/lodash/_baseInRange.js new file mode 100644 index 0000000..ec95666 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseInRange.js @@ -0,0 +1,18 @@ +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * The base implementation of `_.inRange` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to check. + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + */ +function baseInRange(number, start, end) { + return number >= nativeMin(start, end) && number < nativeMax(start, end); +} + +module.exports = baseInRange; diff --git a/node_modules/umzug/node_modules/lodash/_baseIndexOf.js b/node_modules/umzug/node_modules/lodash/_baseIndexOf.js new file mode 100644 index 0000000..167e706 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseIndexOf.js @@ -0,0 +1,20 @@ +var baseFindIndex = require('./_baseFindIndex'), + baseIsNaN = require('./_baseIsNaN'), + strictIndexOf = require('./_strictIndexOf'); + +/** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseIndexOf(array, value, fromIndex) { + return value === value + ? strictIndexOf(array, value, fromIndex) + : baseFindIndex(array, baseIsNaN, fromIndex); +} + +module.exports = baseIndexOf; diff --git a/node_modules/umzug/node_modules/lodash/_baseIndexOfWith.js b/node_modules/umzug/node_modules/lodash/_baseIndexOfWith.js new file mode 100644 index 0000000..f815fe0 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseIndexOfWith.js @@ -0,0 +1,23 @@ +/** + * This function is like `baseIndexOf` except that it accepts a comparator. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @param {Function} comparator The comparator invoked per element. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseIndexOfWith(array, value, fromIndex, comparator) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (comparator(array[index], value)) { + return index; + } + } + return -1; +} + +module.exports = baseIndexOfWith; diff --git a/node_modules/umzug/node_modules/lodash/_baseIntersection.js b/node_modules/umzug/node_modules/lodash/_baseIntersection.js new file mode 100644 index 0000000..c1d250c --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseIntersection.js @@ -0,0 +1,74 @@ +var SetCache = require('./_SetCache'), + arrayIncludes = require('./_arrayIncludes'), + arrayIncludesWith = require('./_arrayIncludesWith'), + arrayMap = require('./_arrayMap'), + baseUnary = require('./_baseUnary'), + cacheHas = require('./_cacheHas'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * The base implementation of methods like `_.intersection`, without support + * for iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of shared values. + */ +function baseIntersection(arrays, iteratee, comparator) { + var includes = comparator ? arrayIncludesWith : arrayIncludes, + length = arrays[0].length, + othLength = arrays.length, + othIndex = othLength, + caches = Array(othLength), + maxLength = Infinity, + result = []; + + while (othIndex--) { + var array = arrays[othIndex]; + if (othIndex && iteratee) { + array = arrayMap(array, baseUnary(iteratee)); + } + maxLength = nativeMin(array.length, maxLength); + caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) + ? new SetCache(othIndex && array) + : undefined; + } + array = arrays[0]; + + var index = -1, + seen = caches[0]; + + outer: + while (++index < length && result.length < maxLength) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (!(seen + ? cacheHas(seen, computed) + : includes(result, computed, comparator) + )) { + othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if (!(cache + ? cacheHas(cache, computed) + : includes(arrays[othIndex], computed, comparator)) + ) { + continue outer; + } + } + if (seen) { + seen.push(computed); + } + result.push(value); + } + } + return result; +} + +module.exports = baseIntersection; diff --git a/node_modules/umzug/node_modules/lodash/_baseInverter.js b/node_modules/umzug/node_modules/lodash/_baseInverter.js new file mode 100644 index 0000000..fbc337f --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseInverter.js @@ -0,0 +1,21 @@ +var baseForOwn = require('./_baseForOwn'); + +/** + * The base implementation of `_.invert` and `_.invertBy` which inverts + * `object` with values transformed by `iteratee` and set by `setter`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform values. + * @param {Object} accumulator The initial inverted object. + * @returns {Function} Returns `accumulator`. + */ +function baseInverter(object, setter, iteratee, accumulator) { + baseForOwn(object, function(value, key, object) { + setter(accumulator, iteratee(value), key, object); + }); + return accumulator; +} + +module.exports = baseInverter; diff --git a/node_modules/umzug/node_modules/lodash/_baseInvoke.js b/node_modules/umzug/node_modules/lodash/_baseInvoke.js new file mode 100644 index 0000000..49bcf3c --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseInvoke.js @@ -0,0 +1,24 @@ +var apply = require('./_apply'), + castPath = require('./_castPath'), + last = require('./last'), + parent = require('./_parent'), + toKey = require('./_toKey'); + +/** + * The base implementation of `_.invoke` without support for individual + * method arguments. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {Array} args The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + */ +function baseInvoke(object, path, args) { + path = castPath(path, object); + object = parent(object, path); + var func = object == null ? object : object[toKey(last(path))]; + return func == null ? undefined : apply(func, object, args); +} + +module.exports = baseInvoke; diff --git a/node_modules/umzug/node_modules/lodash/_baseIsArguments.js b/node_modules/umzug/node_modules/lodash/_baseIsArguments.js new file mode 100644 index 0000000..b3562cc --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseIsArguments.js @@ -0,0 +1,18 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]'; + +/** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ +function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; +} + +module.exports = baseIsArguments; diff --git a/node_modules/umzug/node_modules/lodash/_baseIsArrayBuffer.js b/node_modules/umzug/node_modules/lodash/_baseIsArrayBuffer.js new file mode 100644 index 0000000..a2c4f30 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseIsArrayBuffer.js @@ -0,0 +1,17 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +var arrayBufferTag = '[object ArrayBuffer]'; + +/** + * The base implementation of `_.isArrayBuffer` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + */ +function baseIsArrayBuffer(value) { + return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; +} + +module.exports = baseIsArrayBuffer; diff --git a/node_modules/umzug/node_modules/lodash/_baseIsDate.js b/node_modules/umzug/node_modules/lodash/_baseIsDate.js new file mode 100644 index 0000000..ba67c78 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseIsDate.js @@ -0,0 +1,18 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var dateTag = '[object Date]'; + +/** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ +function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; +} + +module.exports = baseIsDate; diff --git a/node_modules/umzug/node_modules/lodash/_baseIsEqual.js b/node_modules/umzug/node_modules/lodash/_baseIsEqual.js new file mode 100644 index 0000000..00a68a4 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseIsEqual.js @@ -0,0 +1,28 @@ +var baseIsEqualDeep = require('./_baseIsEqualDeep'), + isObjectLike = require('./isObjectLike'); + +/** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ +function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); +} + +module.exports = baseIsEqual; diff --git a/node_modules/umzug/node_modules/lodash/_baseIsEqualDeep.js b/node_modules/umzug/node_modules/lodash/_baseIsEqualDeep.js new file mode 100644 index 0000000..e3cfd6a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseIsEqualDeep.js @@ -0,0 +1,83 @@ +var Stack = require('./_Stack'), + equalArrays = require('./_equalArrays'), + equalByTag = require('./_equalByTag'), + equalObjects = require('./_equalObjects'), + getTag = require('./_getTag'), + isArray = require('./isArray'), + isBuffer = require('./isBuffer'), + isTypedArray = require('./isTypedArray'); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + objectTag = '[object Object]'; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : getTag(object), + othTag = othIsArr ? arrayTag : getTag(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new Stack); + return (objIsArr || isTypedArray(object)) + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new Stack); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); +} + +module.exports = baseIsEqualDeep; diff --git a/node_modules/umzug/node_modules/lodash/_baseIsMap.js b/node_modules/umzug/node_modules/lodash/_baseIsMap.js new file mode 100644 index 0000000..02a4021 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseIsMap.js @@ -0,0 +1,18 @@ +var getTag = require('./_getTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var mapTag = '[object Map]'; + +/** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ +function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; +} + +module.exports = baseIsMap; diff --git a/node_modules/umzug/node_modules/lodash/_baseIsMatch.js b/node_modules/umzug/node_modules/lodash/_baseIsMatch.js new file mode 100644 index 0000000..72494be --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseIsMatch.js @@ -0,0 +1,62 @@ +var Stack = require('./_Stack'), + baseIsEqual = require('./_baseIsEqual'); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ +function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new Stack; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } + } + } + return true; +} + +module.exports = baseIsMatch; diff --git a/node_modules/umzug/node_modules/lodash/_baseIsNaN.js b/node_modules/umzug/node_modules/lodash/_baseIsNaN.js new file mode 100644 index 0000000..316f1eb --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseIsNaN.js @@ -0,0 +1,12 @@ +/** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ +function baseIsNaN(value) { + return value !== value; +} + +module.exports = baseIsNaN; diff --git a/node_modules/umzug/node_modules/lodash/_baseIsNative.js b/node_modules/umzug/node_modules/lodash/_baseIsNative.js new file mode 100644 index 0000000..8702330 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseIsNative.js @@ -0,0 +1,47 @@ +var isFunction = require('./isFunction'), + isMasked = require('./_isMasked'), + isObject = require('./isObject'), + toSource = require('./_toSource'); + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Used for built-in method references. */ +var funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} + +module.exports = baseIsNative; diff --git a/node_modules/umzug/node_modules/lodash/_baseIsRegExp.js b/node_modules/umzug/node_modules/lodash/_baseIsRegExp.js new file mode 100644 index 0000000..6cd7c1a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseIsRegExp.js @@ -0,0 +1,18 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var regexpTag = '[object RegExp]'; + +/** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ +function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; +} + +module.exports = baseIsRegExp; diff --git a/node_modules/umzug/node_modules/lodash/_baseIsSet.js b/node_modules/umzug/node_modules/lodash/_baseIsSet.js new file mode 100644 index 0000000..6dee367 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseIsSet.js @@ -0,0 +1,18 @@ +var getTag = require('./_getTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var setTag = '[object Set]'; + +/** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ +function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; +} + +module.exports = baseIsSet; diff --git a/node_modules/umzug/node_modules/lodash/_baseIsTypedArray.js b/node_modules/umzug/node_modules/lodash/_baseIsTypedArray.js new file mode 100644 index 0000000..1edb32f --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseIsTypedArray.js @@ -0,0 +1,60 @@ +var baseGetTag = require('./_baseGetTag'), + isLength = require('./isLength'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values of typed arrays. */ +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = +typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = +typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = +typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = +typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag] = typedArrayTags[arrayTag] = +typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = +typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = +typedArrayTags[errorTag] = typedArrayTags[funcTag] = +typedArrayTags[mapTag] = typedArrayTags[numberTag] = +typedArrayTags[objectTag] = typedArrayTags[regexpTag] = +typedArrayTags[setTag] = typedArrayTags[stringTag] = +typedArrayTags[weakMapTag] = false; + +/** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ +function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; +} + +module.exports = baseIsTypedArray; diff --git a/node_modules/umzug/node_modules/lodash/_baseIteratee.js b/node_modules/umzug/node_modules/lodash/_baseIteratee.js new file mode 100644 index 0000000..995c257 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseIteratee.js @@ -0,0 +1,31 @@ +var baseMatches = require('./_baseMatches'), + baseMatchesProperty = require('./_baseMatchesProperty'), + identity = require('./identity'), + isArray = require('./isArray'), + property = require('./property'); + +/** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ +function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity; + } + if (typeof value == 'object') { + return isArray(value) + ? baseMatchesProperty(value[0], value[1]) + : baseMatches(value); + } + return property(value); +} + +module.exports = baseIteratee; diff --git a/node_modules/umzug/node_modules/lodash/_baseKeys.js b/node_modules/umzug/node_modules/lodash/_baseKeys.js new file mode 100644 index 0000000..45e9e6f --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseKeys.js @@ -0,0 +1,30 @@ +var isPrototype = require('./_isPrototype'), + nativeKeys = require('./_nativeKeys'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; +} + +module.exports = baseKeys; diff --git a/node_modules/umzug/node_modules/lodash/_baseKeysIn.js b/node_modules/umzug/node_modules/lodash/_baseKeysIn.js new file mode 100644 index 0000000..ea8a0a1 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseKeysIn.js @@ -0,0 +1,33 @@ +var isObject = require('./isObject'), + isPrototype = require('./_isPrototype'), + nativeKeysIn = require('./_nativeKeysIn'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; +} + +module.exports = baseKeysIn; diff --git a/node_modules/umzug/node_modules/lodash/_baseLodash.js b/node_modules/umzug/node_modules/lodash/_baseLodash.js new file mode 100644 index 0000000..f76c790 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseLodash.js @@ -0,0 +1,10 @@ +/** + * The function whose prototype chain sequence wrappers inherit from. + * + * @private + */ +function baseLodash() { + // No operation performed. +} + +module.exports = baseLodash; diff --git a/node_modules/umzug/node_modules/lodash/_baseLt.js b/node_modules/umzug/node_modules/lodash/_baseLt.js new file mode 100644 index 0000000..8674d29 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseLt.js @@ -0,0 +1,14 @@ +/** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ +function baseLt(value, other) { + return value < other; +} + +module.exports = baseLt; diff --git a/node_modules/umzug/node_modules/lodash/_baseMap.js b/node_modules/umzug/node_modules/lodash/_baseMap.js new file mode 100644 index 0000000..0bf5cea --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseMap.js @@ -0,0 +1,22 @@ +var baseEach = require('./_baseEach'), + isArrayLike = require('./isArrayLike'); + +/** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; +} + +module.exports = baseMap; diff --git a/node_modules/umzug/node_modules/lodash/_baseMatches.js b/node_modules/umzug/node_modules/lodash/_baseMatches.js new file mode 100644 index 0000000..e56582a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseMatches.js @@ -0,0 +1,22 @@ +var baseIsMatch = require('./_baseIsMatch'), + getMatchData = require('./_getMatchData'), + matchesStrictComparable = require('./_matchesStrictComparable'); + +/** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || baseIsMatch(object, source, matchData); + }; +} + +module.exports = baseMatches; diff --git a/node_modules/umzug/node_modules/lodash/_baseMatchesProperty.js b/node_modules/umzug/node_modules/lodash/_baseMatchesProperty.js new file mode 100644 index 0000000..24afd89 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseMatchesProperty.js @@ -0,0 +1,33 @@ +var baseIsEqual = require('./_baseIsEqual'), + get = require('./get'), + hasIn = require('./hasIn'), + isKey = require('./_isKey'), + isStrictComparable = require('./_isStrictComparable'), + matchesStrictComparable = require('./_matchesStrictComparable'), + toKey = require('./_toKey'); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); + } + return function(object) { + var objValue = get(object, path); + return (objValue === undefined && objValue === srcValue) + ? hasIn(object, path) + : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; +} + +module.exports = baseMatchesProperty; diff --git a/node_modules/umzug/node_modules/lodash/_baseMean.js b/node_modules/umzug/node_modules/lodash/_baseMean.js new file mode 100644 index 0000000..fa9e00a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseMean.js @@ -0,0 +1,20 @@ +var baseSum = require('./_baseSum'); + +/** Used as references for various `Number` constants. */ +var NAN = 0 / 0; + +/** + * The base implementation of `_.mean` and `_.meanBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the mean. + */ +function baseMean(array, iteratee) { + var length = array == null ? 0 : array.length; + return length ? (baseSum(array, iteratee) / length) : NAN; +} + +module.exports = baseMean; diff --git a/node_modules/umzug/node_modules/lodash/_baseMerge.js b/node_modules/umzug/node_modules/lodash/_baseMerge.js new file mode 100644 index 0000000..f4cb8c6 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseMerge.js @@ -0,0 +1,41 @@ +var Stack = require('./_Stack'), + assignMergeValue = require('./_assignMergeValue'), + baseFor = require('./_baseFor'), + baseMergeDeep = require('./_baseMergeDeep'), + isObject = require('./isObject'), + keysIn = require('./keysIn'); + +/** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + baseFor(source, function(srcValue, key) { + if (isObject(srcValue)) { + stack || (stack = new Stack); + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } + else { + var newValue = customizer + ? customizer(object[key], srcValue, (key + ''), object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }, keysIn); +} + +module.exports = baseMerge; diff --git a/node_modules/umzug/node_modules/lodash/_baseMergeDeep.js b/node_modules/umzug/node_modules/lodash/_baseMergeDeep.js new file mode 100644 index 0000000..42b405a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseMergeDeep.js @@ -0,0 +1,93 @@ +var assignMergeValue = require('./_assignMergeValue'), + cloneBuffer = require('./_cloneBuffer'), + cloneTypedArray = require('./_cloneTypedArray'), + copyArray = require('./_copyArray'), + initCloneObject = require('./_initCloneObject'), + isArguments = require('./isArguments'), + isArray = require('./isArray'), + isArrayLikeObject = require('./isArrayLikeObject'), + isBuffer = require('./isBuffer'), + isFunction = require('./isFunction'), + isObject = require('./isObject'), + isPlainObject = require('./isPlainObject'), + isTypedArray = require('./isTypedArray'), + toPlainObject = require('./toPlainObject'); + +/** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = object[key], + srcValue = source[key], + stacked = stack.get(srcValue); + + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; + + var isCommon = newValue === undefined; + + if (isCommon) { + var isArr = isArray(srcValue), + isBuff = !isArr && isBuffer(srcValue), + isTyped = !isArr && !isBuff && isTypedArray(srcValue); + + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (isArray(objValue)) { + newValue = objValue; + } + else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } + else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } + else if (isTyped) { + isCommon = false; + newValue = cloneTypedArray(srcValue, true); + } + else { + newValue = []; + } + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } + else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { + newValue = initCloneObject(srcValue); + } + } + else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + assignMergeValue(object, key, newValue); +} + +module.exports = baseMergeDeep; diff --git a/node_modules/umzug/node_modules/lodash/_baseNth.js b/node_modules/umzug/node_modules/lodash/_baseNth.js new file mode 100644 index 0000000..0403c2a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseNth.js @@ -0,0 +1,20 @@ +var isIndex = require('./_isIndex'); + +/** + * The base implementation of `_.nth` which doesn't coerce arguments. + * + * @private + * @param {Array} array The array to query. + * @param {number} n The index of the element to return. + * @returns {*} Returns the nth element of `array`. + */ +function baseNth(array, n) { + var length = array.length; + if (!length) { + return; + } + n += n < 0 ? length : 0; + return isIndex(n, length) ? array[n] : undefined; +} + +module.exports = baseNth; diff --git a/node_modules/umzug/node_modules/lodash/_baseOrderBy.js b/node_modules/umzug/node_modules/lodash/_baseOrderBy.js new file mode 100644 index 0000000..d8a46ab --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseOrderBy.js @@ -0,0 +1,34 @@ +var arrayMap = require('./_arrayMap'), + baseIteratee = require('./_baseIteratee'), + baseMap = require('./_baseMap'), + baseSortBy = require('./_baseSortBy'), + baseUnary = require('./_baseUnary'), + compareMultiple = require('./_compareMultiple'), + identity = require('./identity'); + +/** + * The base implementation of `_.orderBy` without param guards. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ +function baseOrderBy(collection, iteratees, orders) { + var index = -1; + iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(baseIteratee)); + + var result = baseMap(collection, function(value, key, collection) { + var criteria = arrayMap(iteratees, function(iteratee) { + return iteratee(value); + }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); + + return baseSortBy(result, function(object, other) { + return compareMultiple(object, other, orders); + }); +} + +module.exports = baseOrderBy; diff --git a/node_modules/umzug/node_modules/lodash/_basePick.js b/node_modules/umzug/node_modules/lodash/_basePick.js new file mode 100644 index 0000000..09b458a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_basePick.js @@ -0,0 +1,19 @@ +var basePickBy = require('./_basePickBy'), + hasIn = require('./hasIn'); + +/** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ +function basePick(object, paths) { + return basePickBy(object, paths, function(value, path) { + return hasIn(object, path); + }); +} + +module.exports = basePick; diff --git a/node_modules/umzug/node_modules/lodash/_basePickBy.js b/node_modules/umzug/node_modules/lodash/_basePickBy.js new file mode 100644 index 0000000..85be68c --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_basePickBy.js @@ -0,0 +1,30 @@ +var baseGet = require('./_baseGet'), + baseSet = require('./_baseSet'), + castPath = require('./_castPath'); + +/** + * The base implementation of `_.pickBy` without support for iteratee shorthands. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @param {Function} predicate The function invoked per property. + * @returns {Object} Returns the new object. + */ +function basePickBy(object, paths, predicate) { + var index = -1, + length = paths.length, + result = {}; + + while (++index < length) { + var path = paths[index], + value = baseGet(object, path); + + if (predicate(value, path)) { + baseSet(result, castPath(path, object), value); + } + } + return result; +} + +module.exports = basePickBy; diff --git a/node_modules/umzug/node_modules/lodash/_baseProperty.js b/node_modules/umzug/node_modules/lodash/_baseProperty.js new file mode 100644 index 0000000..496281e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseProperty.js @@ -0,0 +1,14 @@ +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; +} + +module.exports = baseProperty; diff --git a/node_modules/umzug/node_modules/lodash/_basePropertyDeep.js b/node_modules/umzug/node_modules/lodash/_basePropertyDeep.js new file mode 100644 index 0000000..1e5aae5 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_basePropertyDeep.js @@ -0,0 +1,16 @@ +var baseGet = require('./_baseGet'); + +/** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function basePropertyDeep(path) { + return function(object) { + return baseGet(object, path); + }; +} + +module.exports = basePropertyDeep; diff --git a/node_modules/umzug/node_modules/lodash/_basePropertyOf.js b/node_modules/umzug/node_modules/lodash/_basePropertyOf.js new file mode 100644 index 0000000..4617399 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_basePropertyOf.js @@ -0,0 +1,14 @@ +/** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ +function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; +} + +module.exports = basePropertyOf; diff --git a/node_modules/umzug/node_modules/lodash/_basePullAll.js b/node_modules/umzug/node_modules/lodash/_basePullAll.js new file mode 100644 index 0000000..305720e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_basePullAll.js @@ -0,0 +1,51 @@ +var arrayMap = require('./_arrayMap'), + baseIndexOf = require('./_baseIndexOf'), + baseIndexOfWith = require('./_baseIndexOfWith'), + baseUnary = require('./_baseUnary'), + copyArray = require('./_copyArray'); + +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/** Built-in value references. */ +var splice = arrayProto.splice; + +/** + * The base implementation of `_.pullAllBy` without support for iteratee + * shorthands. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + */ +function basePullAll(array, values, iteratee, comparator) { + var indexOf = comparator ? baseIndexOfWith : baseIndexOf, + index = -1, + length = values.length, + seen = array; + + if (array === values) { + values = copyArray(values); + } + if (iteratee) { + seen = arrayMap(array, baseUnary(iteratee)); + } + while (++index < length) { + var fromIndex = 0, + value = values[index], + computed = iteratee ? iteratee(value) : value; + + while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { + if (seen !== array) { + splice.call(seen, fromIndex, 1); + } + splice.call(array, fromIndex, 1); + } + } + return array; +} + +module.exports = basePullAll; diff --git a/node_modules/umzug/node_modules/lodash/_basePullAt.js b/node_modules/umzug/node_modules/lodash/_basePullAt.js new file mode 100644 index 0000000..c3e9e71 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_basePullAt.js @@ -0,0 +1,37 @@ +var baseUnset = require('./_baseUnset'), + isIndex = require('./_isIndex'); + +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/** Built-in value references. */ +var splice = arrayProto.splice; + +/** + * The base implementation of `_.pullAt` without support for individual + * indexes or capturing the removed elements. + * + * @private + * @param {Array} array The array to modify. + * @param {number[]} indexes The indexes of elements to remove. + * @returns {Array} Returns `array`. + */ +function basePullAt(array, indexes) { + var length = array ? indexes.length : 0, + lastIndex = length - 1; + + while (length--) { + var index = indexes[length]; + if (length == lastIndex || index !== previous) { + var previous = index; + if (isIndex(index)) { + splice.call(array, index, 1); + } else { + baseUnset(array, index); + } + } + } + return array; +} + +module.exports = basePullAt; diff --git a/node_modules/umzug/node_modules/lodash/_baseRandom.js b/node_modules/umzug/node_modules/lodash/_baseRandom.js new file mode 100644 index 0000000..94f76a7 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseRandom.js @@ -0,0 +1,18 @@ +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeFloor = Math.floor, + nativeRandom = Math.random; + +/** + * The base implementation of `_.random` without support for returning + * floating-point numbers. + * + * @private + * @param {number} lower The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the random number. + */ +function baseRandom(lower, upper) { + return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); +} + +module.exports = baseRandom; diff --git a/node_modules/umzug/node_modules/lodash/_baseRange.js b/node_modules/umzug/node_modules/lodash/_baseRange.js new file mode 100644 index 0000000..0fb8e41 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseRange.js @@ -0,0 +1,28 @@ +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil, + nativeMax = Math.max; + +/** + * The base implementation of `_.range` and `_.rangeRight` which doesn't + * coerce arguments. + * + * @private + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @param {number} step The value to increment or decrement by. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the range of numbers. + */ +function baseRange(start, end, step, fromRight) { + var index = -1, + length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), + result = Array(length); + + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; + } + return result; +} + +module.exports = baseRange; diff --git a/node_modules/umzug/node_modules/lodash/_baseReduce.js b/node_modules/umzug/node_modules/lodash/_baseReduce.js new file mode 100644 index 0000000..5a1f8b5 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseReduce.js @@ -0,0 +1,23 @@ +/** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ +function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; +} + +module.exports = baseReduce; diff --git a/node_modules/umzug/node_modules/lodash/_baseRepeat.js b/node_modules/umzug/node_modules/lodash/_baseRepeat.js new file mode 100644 index 0000000..ee44c31 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseRepeat.js @@ -0,0 +1,35 @@ +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeFloor = Math.floor; + +/** + * The base implementation of `_.repeat` which doesn't coerce arguments. + * + * @private + * @param {string} string The string to repeat. + * @param {number} n The number of times to repeat the string. + * @returns {string} Returns the repeated string. + */ +function baseRepeat(string, n) { + var result = ''; + if (!string || n < 1 || n > MAX_SAFE_INTEGER) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + if (n) { + string += string; + } + } while (n); + + return result; +} + +module.exports = baseRepeat; diff --git a/node_modules/umzug/node_modules/lodash/_baseRest.js b/node_modules/umzug/node_modules/lodash/_baseRest.js new file mode 100644 index 0000000..d0dc4bd --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseRest.js @@ -0,0 +1,17 @@ +var identity = require('./identity'), + overRest = require('./_overRest'), + setToString = require('./_setToString'); + +/** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ +function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); +} + +module.exports = baseRest; diff --git a/node_modules/umzug/node_modules/lodash/_baseSample.js b/node_modules/umzug/node_modules/lodash/_baseSample.js new file mode 100644 index 0000000..58582b9 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseSample.js @@ -0,0 +1,15 @@ +var arraySample = require('./_arraySample'), + values = require('./values'); + +/** + * The base implementation of `_.sample`. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + */ +function baseSample(collection) { + return arraySample(values(collection)); +} + +module.exports = baseSample; diff --git a/node_modules/umzug/node_modules/lodash/_baseSampleSize.js b/node_modules/umzug/node_modules/lodash/_baseSampleSize.js new file mode 100644 index 0000000..5c90ec5 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseSampleSize.js @@ -0,0 +1,18 @@ +var baseClamp = require('./_baseClamp'), + shuffleSelf = require('./_shuffleSelf'), + values = require('./values'); + +/** + * The base implementation of `_.sampleSize` without param guards. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ +function baseSampleSize(collection, n) { + var array = values(collection); + return shuffleSelf(array, baseClamp(n, 0, array.length)); +} + +module.exports = baseSampleSize; diff --git a/node_modules/umzug/node_modules/lodash/_baseSet.js b/node_modules/umzug/node_modules/lodash/_baseSet.js new file mode 100644 index 0000000..612a24c --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseSet.js @@ -0,0 +1,47 @@ +var assignValue = require('./_assignValue'), + castPath = require('./_castPath'), + isIndex = require('./_isIndex'), + isObject = require('./isObject'), + toKey = require('./_toKey'); + +/** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ +function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } + path = castPath(path, object); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = toKey(path[index]), + newValue = value; + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) + ? objValue + : (isIndex(path[index + 1]) ? [] : {}); + } + } + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; +} + +module.exports = baseSet; diff --git a/node_modules/umzug/node_modules/lodash/_baseSetData.js b/node_modules/umzug/node_modules/lodash/_baseSetData.js new file mode 100644 index 0000000..c409947 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseSetData.js @@ -0,0 +1,17 @@ +var identity = require('./identity'), + metaMap = require('./_metaMap'); + +/** + * The base implementation of `setData` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ +var baseSetData = !metaMap ? identity : function(func, data) { + metaMap.set(func, data); + return func; +}; + +module.exports = baseSetData; diff --git a/node_modules/umzug/node_modules/lodash/_baseSetToString.js b/node_modules/umzug/node_modules/lodash/_baseSetToString.js new file mode 100644 index 0000000..89eaca3 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseSetToString.js @@ -0,0 +1,22 @@ +var constant = require('./constant'), + defineProperty = require('./_defineProperty'), + identity = require('./identity'); + +/** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ +var baseSetToString = !defineProperty ? identity : function(func, string) { + return defineProperty(func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': constant(string), + 'writable': true + }); +}; + +module.exports = baseSetToString; diff --git a/node_modules/umzug/node_modules/lodash/_baseShuffle.js b/node_modules/umzug/node_modules/lodash/_baseShuffle.js new file mode 100644 index 0000000..023077a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseShuffle.js @@ -0,0 +1,15 @@ +var shuffleSelf = require('./_shuffleSelf'), + values = require('./values'); + +/** + * The base implementation of `_.shuffle`. + * + * @private + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + */ +function baseShuffle(collection) { + return shuffleSelf(values(collection)); +} + +module.exports = baseShuffle; diff --git a/node_modules/umzug/node_modules/lodash/_baseSlice.js b/node_modules/umzug/node_modules/lodash/_baseSlice.js new file mode 100644 index 0000000..786f6c9 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseSlice.js @@ -0,0 +1,31 @@ +/** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ +function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; +} + +module.exports = baseSlice; diff --git a/node_modules/umzug/node_modules/lodash/_baseSome.js b/node_modules/umzug/node_modules/lodash/_baseSome.js new file mode 100644 index 0000000..58f3f44 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseSome.js @@ -0,0 +1,22 @@ +var baseEach = require('./_baseEach'); + +/** + * The base implementation of `_.some` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ +function baseSome(collection, predicate) { + var result; + + baseEach(collection, function(value, index, collection) { + result = predicate(value, index, collection); + return !result; + }); + return !!result; +} + +module.exports = baseSome; diff --git a/node_modules/umzug/node_modules/lodash/_baseSortBy.js b/node_modules/umzug/node_modules/lodash/_baseSortBy.js new file mode 100644 index 0000000..a25c92e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseSortBy.js @@ -0,0 +1,21 @@ +/** + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ +function baseSortBy(array, comparer) { + var length = array.length; + + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; +} + +module.exports = baseSortBy; diff --git a/node_modules/umzug/node_modules/lodash/_baseSortedIndex.js b/node_modules/umzug/node_modules/lodash/_baseSortedIndex.js new file mode 100644 index 0000000..638c366 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseSortedIndex.js @@ -0,0 +1,42 @@ +var baseSortedIndexBy = require('./_baseSortedIndexBy'), + identity = require('./identity'), + isSymbol = require('./isSymbol'); + +/** Used as references for the maximum length and index of an array. */ +var MAX_ARRAY_LENGTH = 4294967295, + HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; + +/** + * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which + * performs a binary search of `array` to determine the index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ +function baseSortedIndex(array, value, retHighest) { + var low = 0, + high = array == null ? low : array.length; + + if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { + while (low < high) { + var mid = (low + high) >>> 1, + computed = array[mid]; + + if (computed !== null && !isSymbol(computed) && + (retHighest ? (computed <= value) : (computed < value))) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + return baseSortedIndexBy(array, value, identity, retHighest); +} + +module.exports = baseSortedIndex; diff --git a/node_modules/umzug/node_modules/lodash/_baseSortedIndexBy.js b/node_modules/umzug/node_modules/lodash/_baseSortedIndexBy.js new file mode 100644 index 0000000..bb22e36 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseSortedIndexBy.js @@ -0,0 +1,64 @@ +var isSymbol = require('./isSymbol'); + +/** Used as references for the maximum length and index of an array. */ +var MAX_ARRAY_LENGTH = 4294967295, + MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeFloor = Math.floor, + nativeMin = Math.min; + +/** + * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy` + * which invokes `iteratee` for `value` and each element of `array` to compute + * their sort ranking. The iteratee is invoked with one argument; (value). + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} iteratee The iteratee invoked per element. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ +function baseSortedIndexBy(array, value, iteratee, retHighest) { + value = iteratee(value); + + var low = 0, + high = array == null ? 0 : array.length, + valIsNaN = value !== value, + valIsNull = value === null, + valIsSymbol = isSymbol(value), + valIsUndefined = value === undefined; + + while (low < high) { + var mid = nativeFloor((low + high) / 2), + computed = iteratee(array[mid]), + othIsDefined = computed !== undefined, + othIsNull = computed === null, + othIsReflexive = computed === computed, + othIsSymbol = isSymbol(computed); + + if (valIsNaN) { + var setLow = retHighest || othIsReflexive; + } else if (valIsUndefined) { + setLow = othIsReflexive && (retHighest || othIsDefined); + } else if (valIsNull) { + setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); + } else if (valIsSymbol) { + setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); + } else if (othIsNull || othIsSymbol) { + setLow = false; + } else { + setLow = retHighest ? (computed <= value) : (computed < value); + } + if (setLow) { + low = mid + 1; + } else { + high = mid; + } + } + return nativeMin(high, MAX_ARRAY_INDEX); +} + +module.exports = baseSortedIndexBy; diff --git a/node_modules/umzug/node_modules/lodash/_baseSortedUniq.js b/node_modules/umzug/node_modules/lodash/_baseSortedUniq.js new file mode 100644 index 0000000..802159a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseSortedUniq.js @@ -0,0 +1,30 @@ +var eq = require('./eq'); + +/** + * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ +function baseSortedUniq(array, iteratee) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + if (!index || !eq(computed, seen)) { + var seen = computed; + result[resIndex++] = value === 0 ? 0 : value; + } + } + return result; +} + +module.exports = baseSortedUniq; diff --git a/node_modules/umzug/node_modules/lodash/_baseSum.js b/node_modules/umzug/node_modules/lodash/_baseSum.js new file mode 100644 index 0000000..a9e84c1 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseSum.js @@ -0,0 +1,24 @@ +/** + * The base implementation of `_.sum` and `_.sumBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the sum. + */ +function baseSum(array, iteratee) { + var result, + index = -1, + length = array.length; + + while (++index < length) { + var current = iteratee(array[index]); + if (current !== undefined) { + result = result === undefined ? current : (result + current); + } + } + return result; +} + +module.exports = baseSum; diff --git a/node_modules/umzug/node_modules/lodash/_baseTimes.js b/node_modules/umzug/node_modules/lodash/_baseTimes.js new file mode 100644 index 0000000..0603fc3 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseTimes.js @@ -0,0 +1,20 @@ +/** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ +function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; +} + +module.exports = baseTimes; diff --git a/node_modules/umzug/node_modules/lodash/_baseToNumber.js b/node_modules/umzug/node_modules/lodash/_baseToNumber.js new file mode 100644 index 0000000..04859f3 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseToNumber.js @@ -0,0 +1,24 @@ +var isSymbol = require('./isSymbol'); + +/** Used as references for various `Number` constants. */ +var NAN = 0 / 0; + +/** + * The base implementation of `_.toNumber` which doesn't ensure correct + * conversions of binary, hexadecimal, or octal string values. + * + * @private + * @param {*} value The value to process. + * @returns {number} Returns the number. + */ +function baseToNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + return +value; +} + +module.exports = baseToNumber; diff --git a/node_modules/umzug/node_modules/lodash/_baseToPairs.js b/node_modules/umzug/node_modules/lodash/_baseToPairs.js new file mode 100644 index 0000000..bff1991 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseToPairs.js @@ -0,0 +1,18 @@ +var arrayMap = require('./_arrayMap'); + +/** + * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array + * of key-value pairs for `object` corresponding to the property names of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the key-value pairs. + */ +function baseToPairs(object, props) { + return arrayMap(props, function(key) { + return [key, object[key]]; + }); +} + +module.exports = baseToPairs; diff --git a/node_modules/umzug/node_modules/lodash/_baseToString.js b/node_modules/umzug/node_modules/lodash/_baseToString.js new file mode 100644 index 0000000..ada6ad2 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseToString.js @@ -0,0 +1,37 @@ +var Symbol = require('./_Symbol'), + arrayMap = require('./_arrayMap'), + isArray = require('./isArray'), + isSymbol = require('./isSymbol'); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return arrayMap(value, baseToString) + ''; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +module.exports = baseToString; diff --git a/node_modules/umzug/node_modules/lodash/_baseUnary.js b/node_modules/umzug/node_modules/lodash/_baseUnary.js new file mode 100644 index 0000000..98639e9 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseUnary.js @@ -0,0 +1,14 @@ +/** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ +function baseUnary(func) { + return function(value) { + return func(value); + }; +} + +module.exports = baseUnary; diff --git a/node_modules/umzug/node_modules/lodash/_baseUniq.js b/node_modules/umzug/node_modules/lodash/_baseUniq.js new file mode 100644 index 0000000..aea459d --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseUniq.js @@ -0,0 +1,72 @@ +var SetCache = require('./_SetCache'), + arrayIncludes = require('./_arrayIncludes'), + arrayIncludesWith = require('./_arrayIncludesWith'), + cacheHas = require('./_cacheHas'), + createSet = require('./_createSet'), + setToArray = require('./_setToArray'); + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ +function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache; + } + else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; +} + +module.exports = baseUniq; diff --git a/node_modules/umzug/node_modules/lodash/_baseUnset.js b/node_modules/umzug/node_modules/lodash/_baseUnset.js new file mode 100644 index 0000000..eefc6e3 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseUnset.js @@ -0,0 +1,20 @@ +var castPath = require('./_castPath'), + last = require('./last'), + parent = require('./_parent'), + toKey = require('./_toKey'); + +/** + * The base implementation of `_.unset`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The property path to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + */ +function baseUnset(object, path) { + path = castPath(path, object); + object = parent(object, path); + return object == null || delete object[toKey(last(path))]; +} + +module.exports = baseUnset; diff --git a/node_modules/umzug/node_modules/lodash/_baseUpdate.js b/node_modules/umzug/node_modules/lodash/_baseUpdate.js new file mode 100644 index 0000000..92a6237 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseUpdate.js @@ -0,0 +1,18 @@ +var baseGet = require('./_baseGet'), + baseSet = require('./_baseSet'); + +/** + * The base implementation of `_.update`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to update. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ +function baseUpdate(object, path, updater, customizer) { + return baseSet(object, path, updater(baseGet(object, path)), customizer); +} + +module.exports = baseUpdate; diff --git a/node_modules/umzug/node_modules/lodash/_baseValues.js b/node_modules/umzug/node_modules/lodash/_baseValues.js new file mode 100644 index 0000000..b95faad --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseValues.js @@ -0,0 +1,19 @@ +var arrayMap = require('./_arrayMap'); + +/** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ +function baseValues(object, props) { + return arrayMap(props, function(key) { + return object[key]; + }); +} + +module.exports = baseValues; diff --git a/node_modules/umzug/node_modules/lodash/_baseWhile.js b/node_modules/umzug/node_modules/lodash/_baseWhile.js new file mode 100644 index 0000000..07eac61 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseWhile.js @@ -0,0 +1,26 @@ +var baseSlice = require('./_baseSlice'); + +/** + * The base implementation of methods like `_.dropWhile` and `_.takeWhile` + * without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to query. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [isDrop] Specify dropping elements instead of taking them. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the slice of `array`. + */ +function baseWhile(array, predicate, isDrop, fromRight) { + var length = array.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length) && + predicate(array[index], index, array)) {} + + return isDrop + ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) + : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); +} + +module.exports = baseWhile; diff --git a/node_modules/umzug/node_modules/lodash/_baseWrapperValue.js b/node_modules/umzug/node_modules/lodash/_baseWrapperValue.js new file mode 100644 index 0000000..443e0df --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseWrapperValue.js @@ -0,0 +1,25 @@ +var LazyWrapper = require('./_LazyWrapper'), + arrayPush = require('./_arrayPush'), + arrayReduce = require('./_arrayReduce'); + +/** + * The base implementation of `wrapperValue` which returns the result of + * performing a sequence of actions on the unwrapped `value`, where each + * successive action is supplied the return value of the previous. + * + * @private + * @param {*} value The unwrapped value. + * @param {Array} actions Actions to perform to resolve the unwrapped value. + * @returns {*} Returns the resolved value. + */ +function baseWrapperValue(value, actions) { + var result = value; + if (result instanceof LazyWrapper) { + result = result.value(); + } + return arrayReduce(actions, function(result, action) { + return action.func.apply(action.thisArg, arrayPush([result], action.args)); + }, result); +} + +module.exports = baseWrapperValue; diff --git a/node_modules/umzug/node_modules/lodash/_baseXor.js b/node_modules/umzug/node_modules/lodash/_baseXor.js new file mode 100644 index 0000000..8e69338 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseXor.js @@ -0,0 +1,36 @@ +var baseDifference = require('./_baseDifference'), + baseFlatten = require('./_baseFlatten'), + baseUniq = require('./_baseUniq'); + +/** + * The base implementation of methods like `_.xor`, without support for + * iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of values. + */ +function baseXor(arrays, iteratee, comparator) { + var length = arrays.length; + if (length < 2) { + return length ? baseUniq(arrays[0]) : []; + } + var index = -1, + result = Array(length); + + while (++index < length) { + var array = arrays[index], + othIndex = -1; + + while (++othIndex < length) { + if (othIndex != index) { + result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator); + } + } + } + return baseUniq(baseFlatten(result, 1), iteratee, comparator); +} + +module.exports = baseXor; diff --git a/node_modules/umzug/node_modules/lodash/_baseZipObject.js b/node_modules/umzug/node_modules/lodash/_baseZipObject.js new file mode 100644 index 0000000..401f85b --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_baseZipObject.js @@ -0,0 +1,23 @@ +/** + * This base implementation of `_.zipObject` which assigns values using `assignFunc`. + * + * @private + * @param {Array} props The property identifiers. + * @param {Array} values The property values. + * @param {Function} assignFunc The function to assign values. + * @returns {Object} Returns the new object. + */ +function baseZipObject(props, values, assignFunc) { + var index = -1, + length = props.length, + valsLength = values.length, + result = {}; + + while (++index < length) { + var value = index < valsLength ? values[index] : undefined; + assignFunc(result, props[index], value); + } + return result; +} + +module.exports = baseZipObject; diff --git a/node_modules/umzug/node_modules/lodash/_cacheHas.js b/node_modules/umzug/node_modules/lodash/_cacheHas.js new file mode 100644 index 0000000..2dec892 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_cacheHas.js @@ -0,0 +1,13 @@ +/** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function cacheHas(cache, key) { + return cache.has(key); +} + +module.exports = cacheHas; diff --git a/node_modules/umzug/node_modules/lodash/_castArrayLikeObject.js b/node_modules/umzug/node_modules/lodash/_castArrayLikeObject.js new file mode 100644 index 0000000..92c75fa --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_castArrayLikeObject.js @@ -0,0 +1,14 @@ +var isArrayLikeObject = require('./isArrayLikeObject'); + +/** + * Casts `value` to an empty array if it's not an array like object. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array|Object} Returns the cast array-like object. + */ +function castArrayLikeObject(value) { + return isArrayLikeObject(value) ? value : []; +} + +module.exports = castArrayLikeObject; diff --git a/node_modules/umzug/node_modules/lodash/_castFunction.js b/node_modules/umzug/node_modules/lodash/_castFunction.js new file mode 100644 index 0000000..98c91ae --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_castFunction.js @@ -0,0 +1,14 @@ +var identity = require('./identity'); + +/** + * Casts `value` to `identity` if it's not a function. + * + * @private + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. + */ +function castFunction(value) { + return typeof value == 'function' ? value : identity; +} + +module.exports = castFunction; diff --git a/node_modules/umzug/node_modules/lodash/_castPath.js b/node_modules/umzug/node_modules/lodash/_castPath.js new file mode 100644 index 0000000..017e4c1 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_castPath.js @@ -0,0 +1,21 @@ +var isArray = require('./isArray'), + isKey = require('./_isKey'), + stringToPath = require('./_stringToPath'), + toString = require('./toString'); + +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath(toString(value)); +} + +module.exports = castPath; diff --git a/node_modules/umzug/node_modules/lodash/_castRest.js b/node_modules/umzug/node_modules/lodash/_castRest.js new file mode 100644 index 0000000..213c66f --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_castRest.js @@ -0,0 +1,14 @@ +var baseRest = require('./_baseRest'); + +/** + * A `baseRest` alias which can be replaced with `identity` by module + * replacement plugins. + * + * @private + * @type {Function} + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ +var castRest = baseRest; + +module.exports = castRest; diff --git a/node_modules/umzug/node_modules/lodash/_castSlice.js b/node_modules/umzug/node_modules/lodash/_castSlice.js new file mode 100644 index 0000000..071faeb --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_castSlice.js @@ -0,0 +1,18 @@ +var baseSlice = require('./_baseSlice'); + +/** + * Casts `array` to a slice if it's needed. + * + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. + */ +function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return (!start && end >= length) ? array : baseSlice(array, start, end); +} + +module.exports = castSlice; diff --git a/node_modules/umzug/node_modules/lodash/_charsEndIndex.js b/node_modules/umzug/node_modules/lodash/_charsEndIndex.js new file mode 100644 index 0000000..07908ff --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_charsEndIndex.js @@ -0,0 +1,19 @@ +var baseIndexOf = require('./_baseIndexOf'); + +/** + * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the last unmatched string symbol. + */ +function charsEndIndex(strSymbols, chrSymbols) { + var index = strSymbols.length; + + while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; +} + +module.exports = charsEndIndex; diff --git a/node_modules/umzug/node_modules/lodash/_charsStartIndex.js b/node_modules/umzug/node_modules/lodash/_charsStartIndex.js new file mode 100644 index 0000000..b17afd2 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_charsStartIndex.js @@ -0,0 +1,20 @@ +var baseIndexOf = require('./_baseIndexOf'); + +/** + * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the first unmatched string symbol. + */ +function charsStartIndex(strSymbols, chrSymbols) { + var index = -1, + length = strSymbols.length; + + while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; +} + +module.exports = charsStartIndex; diff --git a/node_modules/umzug/node_modules/lodash/_cloneArrayBuffer.js b/node_modules/umzug/node_modules/lodash/_cloneArrayBuffer.js new file mode 100644 index 0000000..c3d8f6e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_cloneArrayBuffer.js @@ -0,0 +1,16 @@ +var Uint8Array = require('./_Uint8Array'); + +/** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ +function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; +} + +module.exports = cloneArrayBuffer; diff --git a/node_modules/umzug/node_modules/lodash/_cloneBuffer.js b/node_modules/umzug/node_modules/lodash/_cloneBuffer.js new file mode 100644 index 0000000..27c4810 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_cloneBuffer.js @@ -0,0 +1,35 @@ +var root = require('./_root'); + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; + +/** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ +function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + + buffer.copy(result); + return result; +} + +module.exports = cloneBuffer; diff --git a/node_modules/umzug/node_modules/lodash/_cloneDataView.js b/node_modules/umzug/node_modules/lodash/_cloneDataView.js new file mode 100644 index 0000000..9c9b7b0 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_cloneDataView.js @@ -0,0 +1,16 @@ +var cloneArrayBuffer = require('./_cloneArrayBuffer'); + +/** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ +function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); +} + +module.exports = cloneDataView; diff --git a/node_modules/umzug/node_modules/lodash/_cloneMap.js b/node_modules/umzug/node_modules/lodash/_cloneMap.js new file mode 100644 index 0000000..334b73e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_cloneMap.js @@ -0,0 +1,22 @@ +var addMapEntry = require('./_addMapEntry'), + arrayReduce = require('./_arrayReduce'), + mapToArray = require('./_mapToArray'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1; + +/** + * Creates a clone of `map`. + * + * @private + * @param {Object} map The map to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned map. + */ +function cloneMap(map, isDeep, cloneFunc) { + var array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG) : mapToArray(map); + return arrayReduce(array, addMapEntry, new map.constructor); +} + +module.exports = cloneMap; diff --git a/node_modules/umzug/node_modules/lodash/_cloneRegExp.js b/node_modules/umzug/node_modules/lodash/_cloneRegExp.js new file mode 100644 index 0000000..64a30df --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_cloneRegExp.js @@ -0,0 +1,17 @@ +/** Used to match `RegExp` flags from their coerced string values. */ +var reFlags = /\w*$/; + +/** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ +function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; +} + +module.exports = cloneRegExp; diff --git a/node_modules/umzug/node_modules/lodash/_cloneSet.js b/node_modules/umzug/node_modules/lodash/_cloneSet.js new file mode 100644 index 0000000..713a2f7 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_cloneSet.js @@ -0,0 +1,22 @@ +var addSetEntry = require('./_addSetEntry'), + arrayReduce = require('./_arrayReduce'), + setToArray = require('./_setToArray'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1; + +/** + * Creates a clone of `set`. + * + * @private + * @param {Object} set The set to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned set. + */ +function cloneSet(set, isDeep, cloneFunc) { + var array = isDeep ? cloneFunc(setToArray(set), CLONE_DEEP_FLAG) : setToArray(set); + return arrayReduce(array, addSetEntry, new set.constructor); +} + +module.exports = cloneSet; diff --git a/node_modules/umzug/node_modules/lodash/_cloneSymbol.js b/node_modules/umzug/node_modules/lodash/_cloneSymbol.js new file mode 100644 index 0000000..bede39f --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_cloneSymbol.js @@ -0,0 +1,18 @@ +var Symbol = require('./_Symbol'); + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ +function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; +} + +module.exports = cloneSymbol; diff --git a/node_modules/umzug/node_modules/lodash/_cloneTypedArray.js b/node_modules/umzug/node_modules/lodash/_cloneTypedArray.js new file mode 100644 index 0000000..7aad84d --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_cloneTypedArray.js @@ -0,0 +1,16 @@ +var cloneArrayBuffer = require('./_cloneArrayBuffer'); + +/** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ +function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); +} + +module.exports = cloneTypedArray; diff --git a/node_modules/umzug/node_modules/lodash/_compareAscending.js b/node_modules/umzug/node_modules/lodash/_compareAscending.js new file mode 100644 index 0000000..8dc2791 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_compareAscending.js @@ -0,0 +1,41 @@ +var isSymbol = require('./isSymbol'); + +/** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ +function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = isSymbol(value); + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = isSymbol(other); + + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { + return 1; + } + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { + return -1; + } + } + return 0; +} + +module.exports = compareAscending; diff --git a/node_modules/umzug/node_modules/lodash/_compareMultiple.js b/node_modules/umzug/node_modules/lodash/_compareMultiple.js new file mode 100644 index 0000000..ad61f0f --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_compareMultiple.js @@ -0,0 +1,44 @@ +var compareAscending = require('./_compareAscending'); + +/** + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ +function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; +} + +module.exports = compareMultiple; diff --git a/node_modules/umzug/node_modules/lodash/_composeArgs.js b/node_modules/umzug/node_modules/lodash/_composeArgs.js new file mode 100644 index 0000000..1ce40f4 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_composeArgs.js @@ -0,0 +1,39 @@ +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates an array that is the composition of partially applied arguments, + * placeholders, and provided arguments into a single array of arguments. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to prepend to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ +function composeArgs(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersLength = holders.length, + leftIndex = -1, + leftLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(leftLength + rangeLength), + isUncurried = !isCurried; + + while (++leftIndex < leftLength) { + result[leftIndex] = partials[leftIndex]; + } + while (++argsIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[holders[argsIndex]] = args[argsIndex]; + } + } + while (rangeLength--) { + result[leftIndex++] = args[argsIndex++]; + } + return result; +} + +module.exports = composeArgs; diff --git a/node_modules/umzug/node_modules/lodash/_composeArgsRight.js b/node_modules/umzug/node_modules/lodash/_composeArgsRight.js new file mode 100644 index 0000000..8dc588d --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_composeArgsRight.js @@ -0,0 +1,41 @@ +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * This function is like `composeArgs` except that the arguments composition + * is tailored for `_.partialRight`. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to append to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ +function composeArgsRight(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersIndex = -1, + holdersLength = holders.length, + rightIndex = -1, + rightLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(rangeLength + rightLength), + isUncurried = !isCurried; + + while (++argsIndex < rangeLength) { + result[argsIndex] = args[argsIndex]; + } + var offset = argsIndex; + while (++rightIndex < rightLength) { + result[offset + rightIndex] = partials[rightIndex]; + } + while (++holdersIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[offset + holders[holdersIndex]] = args[argsIndex++]; + } + } + return result; +} + +module.exports = composeArgsRight; diff --git a/node_modules/umzug/node_modules/lodash/_copyArray.js b/node_modules/umzug/node_modules/lodash/_copyArray.js new file mode 100644 index 0000000..cd94d5d --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_copyArray.js @@ -0,0 +1,20 @@ +/** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ +function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; +} + +module.exports = copyArray; diff --git a/node_modules/umzug/node_modules/lodash/_copyObject.js b/node_modules/umzug/node_modules/lodash/_copyObject.js new file mode 100644 index 0000000..2f2a5c2 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_copyObject.js @@ -0,0 +1,40 @@ +var assignValue = require('./_assignValue'), + baseAssignValue = require('./_baseAssignValue'); + +/** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ +function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; +} + +module.exports = copyObject; diff --git a/node_modules/umzug/node_modules/lodash/_copySymbols.js b/node_modules/umzug/node_modules/lodash/_copySymbols.js new file mode 100644 index 0000000..c35944a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_copySymbols.js @@ -0,0 +1,16 @@ +var copyObject = require('./_copyObject'), + getSymbols = require('./_getSymbols'); + +/** + * Copies own symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); +} + +module.exports = copySymbols; diff --git a/node_modules/umzug/node_modules/lodash/_copySymbolsIn.js b/node_modules/umzug/node_modules/lodash/_copySymbolsIn.js new file mode 100644 index 0000000..fdf20a7 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_copySymbolsIn.js @@ -0,0 +1,16 @@ +var copyObject = require('./_copyObject'), + getSymbolsIn = require('./_getSymbolsIn'); + +/** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); +} + +module.exports = copySymbolsIn; diff --git a/node_modules/umzug/node_modules/lodash/_coreJsData.js b/node_modules/umzug/node_modules/lodash/_coreJsData.js new file mode 100644 index 0000000..f8e5b4e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_coreJsData.js @@ -0,0 +1,6 @@ +var root = require('./_root'); + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +module.exports = coreJsData; diff --git a/node_modules/umzug/node_modules/lodash/_countHolders.js b/node_modules/umzug/node_modules/lodash/_countHolders.js new file mode 100644 index 0000000..718fcda --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_countHolders.js @@ -0,0 +1,21 @@ +/** + * Gets the number of `placeholder` occurrences in `array`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} placeholder The placeholder to search for. + * @returns {number} Returns the placeholder count. + */ +function countHolders(array, placeholder) { + var length = array.length, + result = 0; + + while (length--) { + if (array[length] === placeholder) { + ++result; + } + } + return result; +} + +module.exports = countHolders; diff --git a/node_modules/umzug/node_modules/lodash/_createAggregator.js b/node_modules/umzug/node_modules/lodash/_createAggregator.js new file mode 100644 index 0000000..0be42c4 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_createAggregator.js @@ -0,0 +1,23 @@ +var arrayAggregator = require('./_arrayAggregator'), + baseAggregator = require('./_baseAggregator'), + baseIteratee = require('./_baseIteratee'), + isArray = require('./isArray'); + +/** + * Creates a function like `_.groupBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} [initializer] The accumulator object initializer. + * @returns {Function} Returns the new aggregator function. + */ +function createAggregator(setter, initializer) { + return function(collection, iteratee) { + var func = isArray(collection) ? arrayAggregator : baseAggregator, + accumulator = initializer ? initializer() : {}; + + return func(collection, setter, baseIteratee(iteratee, 2), accumulator); + }; +} + +module.exports = createAggregator; diff --git a/node_modules/umzug/node_modules/lodash/_createAssigner.js b/node_modules/umzug/node_modules/lodash/_createAssigner.js new file mode 100644 index 0000000..1f904c5 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_createAssigner.js @@ -0,0 +1,37 @@ +var baseRest = require('./_baseRest'), + isIterateeCall = require('./_isIterateeCall'); + +/** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ +function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); +} + +module.exports = createAssigner; diff --git a/node_modules/umzug/node_modules/lodash/_createBaseEach.js b/node_modules/umzug/node_modules/lodash/_createBaseEach.js new file mode 100644 index 0000000..d24fdd1 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_createBaseEach.js @@ -0,0 +1,32 @@ +var isArrayLike = require('./isArrayLike'); + +/** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; +} + +module.exports = createBaseEach; diff --git a/node_modules/umzug/node_modules/lodash/_createBaseFor.js b/node_modules/umzug/node_modules/lodash/_createBaseFor.js new file mode 100644 index 0000000..94cbf29 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_createBaseFor.js @@ -0,0 +1,25 @@ +/** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; +} + +module.exports = createBaseFor; diff --git a/node_modules/umzug/node_modules/lodash/_createBind.js b/node_modules/umzug/node_modules/lodash/_createBind.js new file mode 100644 index 0000000..07cb99f --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_createBind.js @@ -0,0 +1,28 @@ +var createCtor = require('./_createCtor'), + root = require('./_root'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1; + +/** + * Creates a function that wraps `func` to invoke it with the optional `this` + * binding of `thisArg`. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @returns {Function} Returns the new wrapped function. + */ +function createBind(func, bitmask, thisArg) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return fn.apply(isBind ? thisArg : this, arguments); + } + return wrapper; +} + +module.exports = createBind; diff --git a/node_modules/umzug/node_modules/lodash/_createCaseFirst.js b/node_modules/umzug/node_modules/lodash/_createCaseFirst.js new file mode 100644 index 0000000..fe8ea48 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_createCaseFirst.js @@ -0,0 +1,33 @@ +var castSlice = require('./_castSlice'), + hasUnicode = require('./_hasUnicode'), + stringToArray = require('./_stringToArray'), + toString = require('./toString'); + +/** + * Creates a function like `_.lowerFirst`. + * + * @private + * @param {string} methodName The name of the `String` case method to use. + * @returns {Function} Returns the new case function. + */ +function createCaseFirst(methodName) { + return function(string) { + string = toString(string); + + var strSymbols = hasUnicode(string) + ? stringToArray(string) + : undefined; + + var chr = strSymbols + ? strSymbols[0] + : string.charAt(0); + + var trailing = strSymbols + ? castSlice(strSymbols, 1).join('') + : string.slice(1); + + return chr[methodName]() + trailing; + }; +} + +module.exports = createCaseFirst; diff --git a/node_modules/umzug/node_modules/lodash/_createCompounder.js b/node_modules/umzug/node_modules/lodash/_createCompounder.js new file mode 100644 index 0000000..8d4cee2 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_createCompounder.js @@ -0,0 +1,24 @@ +var arrayReduce = require('./_arrayReduce'), + deburr = require('./deburr'), + words = require('./words'); + +/** Used to compose unicode capture groups. */ +var rsApos = "['\u2019]"; + +/** Used to match apostrophes. */ +var reApos = RegExp(rsApos, 'g'); + +/** + * Creates a function like `_.camelCase`. + * + * @private + * @param {Function} callback The function to combine each word. + * @returns {Function} Returns the new compounder function. + */ +function createCompounder(callback) { + return function(string) { + return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); + }; +} + +module.exports = createCompounder; diff --git a/node_modules/umzug/node_modules/lodash/_createCtor.js b/node_modules/umzug/node_modules/lodash/_createCtor.js new file mode 100644 index 0000000..9047aa5 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_createCtor.js @@ -0,0 +1,37 @@ +var baseCreate = require('./_baseCreate'), + isObject = require('./isObject'); + +/** + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. + */ +function createCtor(Ctor) { + return function() { + // Use a `switch` statement to work with class constructors. See + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + switch (args.length) { + case 0: return new Ctor; + case 1: return new Ctor(args[0]); + case 2: return new Ctor(args[0], args[1]); + case 3: return new Ctor(args[0], args[1], args[2]); + case 4: return new Ctor(args[0], args[1], args[2], args[3]); + case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); + case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); + case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); + } + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; +} + +module.exports = createCtor; diff --git a/node_modules/umzug/node_modules/lodash/_createCurry.js b/node_modules/umzug/node_modules/lodash/_createCurry.js new file mode 100644 index 0000000..f06c2cd --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_createCurry.js @@ -0,0 +1,46 @@ +var apply = require('./_apply'), + createCtor = require('./_createCtor'), + createHybrid = require('./_createHybrid'), + createRecurry = require('./_createRecurry'), + getHolder = require('./_getHolder'), + replaceHolders = require('./_replaceHolders'), + root = require('./_root'); + +/** + * Creates a function that wraps `func` to enable currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {number} arity The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ +function createCurry(func, bitmask, arity) { + var Ctor = createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length, + placeholder = getHolder(wrapper); + + while (index--) { + args[index] = arguments[index]; + } + var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) + ? [] + : replaceHolders(args, placeholder); + + length -= holders.length; + if (length < arity) { + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, undefined, + args, holders, undefined, undefined, arity - length); + } + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return apply(fn, this, args); + } + return wrapper; +} + +module.exports = createCurry; diff --git a/node_modules/umzug/node_modules/lodash/_createFind.js b/node_modules/umzug/node_modules/lodash/_createFind.js new file mode 100644 index 0000000..8859ff8 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_createFind.js @@ -0,0 +1,25 @@ +var baseIteratee = require('./_baseIteratee'), + isArrayLike = require('./isArrayLike'), + keys = require('./keys'); + +/** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ +function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = baseIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; +} + +module.exports = createFind; diff --git a/node_modules/umzug/node_modules/lodash/_createFlow.js b/node_modules/umzug/node_modules/lodash/_createFlow.js new file mode 100644 index 0000000..baaddbf --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_createFlow.js @@ -0,0 +1,78 @@ +var LodashWrapper = require('./_LodashWrapper'), + flatRest = require('./_flatRest'), + getData = require('./_getData'), + getFuncName = require('./_getFuncName'), + isArray = require('./isArray'), + isLaziable = require('./_isLaziable'); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** Used to compose bitmasks for function metadata. */ +var WRAP_CURRY_FLAG = 8, + WRAP_PARTIAL_FLAG = 32, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256; + +/** + * Creates a `_.flow` or `_.flowRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new flow function. + */ +function createFlow(fromRight) { + return flatRest(function(funcs) { + var length = funcs.length, + index = length, + prereq = LodashWrapper.prototype.thru; + + if (fromRight) { + funcs.reverse(); + } + while (index--) { + var func = funcs[index]; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (prereq && !wrapper && getFuncName(func) == 'wrapper') { + var wrapper = new LodashWrapper([], true); + } + } + index = wrapper ? index : length; + while (++index < length) { + func = funcs[index]; + + var funcName = getFuncName(func), + data = funcName == 'wrapper' ? getData(func) : undefined; + + if (data && isLaziable(data[0]) && + data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && + !data[4].length && data[9] == 1 + ) { + wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); + } else { + wrapper = (func.length == 1 && isLaziable(func)) + ? wrapper[funcName]() + : wrapper.thru(func); + } + } + return function() { + var args = arguments, + value = args[0]; + + if (wrapper && args.length == 1 && isArray(value)) { + return wrapper.plant(value).value(); + } + var index = 0, + result = length ? funcs[index].apply(this, args) : value; + + while (++index < length) { + result = funcs[index].call(this, result); + } + return result; + }; + }); +} + +module.exports = createFlow; diff --git a/node_modules/umzug/node_modules/lodash/_createHybrid.js b/node_modules/umzug/node_modules/lodash/_createHybrid.js new file mode 100644 index 0000000..b671bd1 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_createHybrid.js @@ -0,0 +1,92 @@ +var composeArgs = require('./_composeArgs'), + composeArgsRight = require('./_composeArgsRight'), + countHolders = require('./_countHolders'), + createCtor = require('./_createCtor'), + createRecurry = require('./_createRecurry'), + getHolder = require('./_getHolder'), + reorder = require('./_reorder'), + replaceHolders = require('./_replaceHolders'), + root = require('./_root'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_ARY_FLAG = 128, + WRAP_FLIP_FLAG = 512; + +/** + * Creates a function that wraps `func` to invoke it with optional `this` + * binding of `thisArg`, partial application, and currying. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [partialsRight] The arguments to append to those provided + * to the new function. + * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ +function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { + var isAry = bitmask & WRAP_ARY_FLAG, + isBind = bitmask & WRAP_BIND_FLAG, + isBindKey = bitmask & WRAP_BIND_KEY_FLAG, + isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), + isFlip = bitmask & WRAP_FLIP_FLAG, + Ctor = isBindKey ? undefined : createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length; + + while (index--) { + args[index] = arguments[index]; + } + if (isCurried) { + var placeholder = getHolder(wrapper), + holdersCount = countHolders(args, placeholder); + } + if (partials) { + args = composeArgs(args, partials, holders, isCurried); + } + if (partialsRight) { + args = composeArgsRight(args, partialsRight, holdersRight, isCurried); + } + length -= holdersCount; + if (isCurried && length < arity) { + var newHolders = replaceHolders(args, placeholder); + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, thisArg, + args, newHolders, argPos, ary, arity - length + ); + } + var thisBinding = isBind ? thisArg : this, + fn = isBindKey ? thisBinding[func] : func; + + length = args.length; + if (argPos) { + args = reorder(args, argPos); + } else if (isFlip && length > 1) { + args.reverse(); + } + if (isAry && ary < length) { + args.length = ary; + } + if (this && this !== root && this instanceof wrapper) { + fn = Ctor || createCtor(fn); + } + return fn.apply(thisBinding, args); + } + return wrapper; +} + +module.exports = createHybrid; diff --git a/node_modules/umzug/node_modules/lodash/_createInverter.js b/node_modules/umzug/node_modules/lodash/_createInverter.js new file mode 100644 index 0000000..6c0c562 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_createInverter.js @@ -0,0 +1,17 @@ +var baseInverter = require('./_baseInverter'); + +/** + * Creates a function like `_.invertBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} toIteratee The function to resolve iteratees. + * @returns {Function} Returns the new inverter function. + */ +function createInverter(setter, toIteratee) { + return function(object, iteratee) { + return baseInverter(object, setter, toIteratee(iteratee), {}); + }; +} + +module.exports = createInverter; diff --git a/node_modules/umzug/node_modules/lodash/_createMathOperation.js b/node_modules/umzug/node_modules/lodash/_createMathOperation.js new file mode 100644 index 0000000..f1e238a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_createMathOperation.js @@ -0,0 +1,38 @@ +var baseToNumber = require('./_baseToNumber'), + baseToString = require('./_baseToString'); + +/** + * Creates a function that performs a mathematical operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @param {number} [defaultValue] The value used for `undefined` arguments. + * @returns {Function} Returns the new mathematical operation function. + */ +function createMathOperation(operator, defaultValue) { + return function(value, other) { + var result; + if (value === undefined && other === undefined) { + return defaultValue; + } + if (value !== undefined) { + result = value; + } + if (other !== undefined) { + if (result === undefined) { + return other; + } + if (typeof value == 'string' || typeof other == 'string') { + value = baseToString(value); + other = baseToString(other); + } else { + value = baseToNumber(value); + other = baseToNumber(other); + } + result = operator(value, other); + } + return result; + }; +} + +module.exports = createMathOperation; diff --git a/node_modules/umzug/node_modules/lodash/_createOver.js b/node_modules/umzug/node_modules/lodash/_createOver.js new file mode 100644 index 0000000..3b94551 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_createOver.js @@ -0,0 +1,27 @@ +var apply = require('./_apply'), + arrayMap = require('./_arrayMap'), + baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'), + baseUnary = require('./_baseUnary'), + flatRest = require('./_flatRest'); + +/** + * Creates a function like `_.over`. + * + * @private + * @param {Function} arrayFunc The function to iterate over iteratees. + * @returns {Function} Returns the new over function. + */ +function createOver(arrayFunc) { + return flatRest(function(iteratees) { + iteratees = arrayMap(iteratees, baseUnary(baseIteratee)); + return baseRest(function(args) { + var thisArg = this; + return arrayFunc(iteratees, function(iteratee) { + return apply(iteratee, thisArg, args); + }); + }); + }); +} + +module.exports = createOver; diff --git a/node_modules/umzug/node_modules/lodash/_createPadding.js b/node_modules/umzug/node_modules/lodash/_createPadding.js new file mode 100644 index 0000000..2124612 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_createPadding.js @@ -0,0 +1,33 @@ +var baseRepeat = require('./_baseRepeat'), + baseToString = require('./_baseToString'), + castSlice = require('./_castSlice'), + hasUnicode = require('./_hasUnicode'), + stringSize = require('./_stringSize'), + stringToArray = require('./_stringToArray'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil; + +/** + * Creates the padding for `string` based on `length`. The `chars` string + * is truncated if the number of characters exceeds `length`. + * + * @private + * @param {number} length The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padding for `string`. + */ +function createPadding(length, chars) { + chars = chars === undefined ? ' ' : baseToString(chars); + + var charsLength = chars.length; + if (charsLength < 2) { + return charsLength ? baseRepeat(chars, length) : chars; + } + var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); + return hasUnicode(chars) + ? castSlice(stringToArray(result), 0, length).join('') + : result.slice(0, length); +} + +module.exports = createPadding; diff --git a/node_modules/umzug/node_modules/lodash/_createPartial.js b/node_modules/umzug/node_modules/lodash/_createPartial.js new file mode 100644 index 0000000..e16c248 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_createPartial.js @@ -0,0 +1,43 @@ +var apply = require('./_apply'), + createCtor = require('./_createCtor'), + root = require('./_root'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1; + +/** + * Creates a function that wraps `func` to invoke it with the `this` binding + * of `thisArg` and `partials` prepended to the arguments it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} partials The arguments to prepend to those provided to + * the new function. + * @returns {Function} Returns the new wrapped function. + */ +function createPartial(func, bitmask, thisArg, partials) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var argsIndex = -1, + argsLength = arguments.length, + leftIndex = -1, + leftLength = partials.length, + args = Array(leftLength + argsLength), + fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + return apply(fn, isBind ? thisArg : this, args); + } + return wrapper; +} + +module.exports = createPartial; diff --git a/node_modules/umzug/node_modules/lodash/_createRange.js b/node_modules/umzug/node_modules/lodash/_createRange.js new file mode 100644 index 0000000..9f52c77 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_createRange.js @@ -0,0 +1,30 @@ +var baseRange = require('./_baseRange'), + isIterateeCall = require('./_isIterateeCall'), + toFinite = require('./toFinite'); + +/** + * Creates a `_.range` or `_.rangeRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new range function. + */ +function createRange(fromRight) { + return function(start, end, step) { + if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { + end = step = undefined; + } + // Ensure the sign of `-0` is preserved. + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); + return baseRange(start, end, step, fromRight); + }; +} + +module.exports = createRange; diff --git a/node_modules/umzug/node_modules/lodash/_createRecurry.js b/node_modules/umzug/node_modules/lodash/_createRecurry.js new file mode 100644 index 0000000..eb29fb2 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_createRecurry.js @@ -0,0 +1,56 @@ +var isLaziable = require('./_isLaziable'), + setData = require('./_setData'), + setWrapToString = require('./_setWrapToString'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_BOUND_FLAG = 4, + WRAP_CURRY_FLAG = 8, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64; + +/** + * Creates a function that wraps `func` to continue currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {Function} wrapFunc The function to create the `func` wrapper. + * @param {*} placeholder The placeholder value. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ +function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { + var isCurry = bitmask & WRAP_CURRY_FLAG, + newHolders = isCurry ? holders : undefined, + newHoldersRight = isCurry ? undefined : holders, + newPartials = isCurry ? partials : undefined, + newPartialsRight = isCurry ? undefined : partials; + + bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG); + bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); + + if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { + bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); + } + var newData = [ + func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, + newHoldersRight, argPos, ary, arity + ]; + + var result = wrapFunc.apply(undefined, newData); + if (isLaziable(func)) { + setData(result, newData); + } + result.placeholder = placeholder; + return setWrapToString(result, func, bitmask); +} + +module.exports = createRecurry; diff --git a/node_modules/umzug/node_modules/lodash/_createRelationalOperation.js b/node_modules/umzug/node_modules/lodash/_createRelationalOperation.js new file mode 100644 index 0000000..a17c6b5 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_createRelationalOperation.js @@ -0,0 +1,20 @@ +var toNumber = require('./toNumber'); + +/** + * Creates a function that performs a relational operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @returns {Function} Returns the new relational operation function. + */ +function createRelationalOperation(operator) { + return function(value, other) { + if (!(typeof value == 'string' && typeof other == 'string')) { + value = toNumber(value); + other = toNumber(other); + } + return operator(value, other); + }; +} + +module.exports = createRelationalOperation; diff --git a/node_modules/umzug/node_modules/lodash/_createRound.js b/node_modules/umzug/node_modules/lodash/_createRound.js new file mode 100644 index 0000000..bf9b713 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_createRound.js @@ -0,0 +1,33 @@ +var toInteger = require('./toInteger'), + toNumber = require('./toNumber'), + toString = require('./toString'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * Creates a function like `_.round`. + * + * @private + * @param {string} methodName The name of the `Math` method to use when rounding. + * @returns {Function} Returns the new round function. + */ +function createRound(methodName) { + var func = Math[methodName]; + return function(number, precision) { + number = toNumber(number); + precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); + if (precision) { + // Shift with exponential notation to avoid floating-point issues. + // See [MDN](https://mdn.io/round#Examples) for more details. + var pair = (toString(number) + 'e').split('e'), + value = func(pair[0] + 'e' + (+pair[1] + precision)); + + pair = (toString(value) + 'e').split('e'); + return +(pair[0] + 'e' + (+pair[1] - precision)); + } + return func(number); + }; +} + +module.exports = createRound; diff --git a/node_modules/umzug/node_modules/lodash/_createSet.js b/node_modules/umzug/node_modules/lodash/_createSet.js new file mode 100644 index 0000000..0f644ee --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_createSet.js @@ -0,0 +1,19 @@ +var Set = require('./_Set'), + noop = require('./noop'), + setToArray = require('./_setToArray'); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ +var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { + return new Set(values); +}; + +module.exports = createSet; diff --git a/node_modules/umzug/node_modules/lodash/_createToPairs.js b/node_modules/umzug/node_modules/lodash/_createToPairs.js new file mode 100644 index 0000000..568417a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_createToPairs.js @@ -0,0 +1,30 @@ +var baseToPairs = require('./_baseToPairs'), + getTag = require('./_getTag'), + mapToArray = require('./_mapToArray'), + setToPairs = require('./_setToPairs'); + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + setTag = '[object Set]'; + +/** + * Creates a `_.toPairs` or `_.toPairsIn` function. + * + * @private + * @param {Function} keysFunc The function to get the keys of a given object. + * @returns {Function} Returns the new pairs function. + */ +function createToPairs(keysFunc) { + return function(object) { + var tag = getTag(object); + if (tag == mapTag) { + return mapToArray(object); + } + if (tag == setTag) { + return setToPairs(object); + } + return baseToPairs(object, keysFunc(object)); + }; +} + +module.exports = createToPairs; diff --git a/node_modules/umzug/node_modules/lodash/_createWrap.js b/node_modules/umzug/node_modules/lodash/_createWrap.js new file mode 100644 index 0000000..33f0633 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_createWrap.js @@ -0,0 +1,106 @@ +var baseSetData = require('./_baseSetData'), + createBind = require('./_createBind'), + createCurry = require('./_createCurry'), + createHybrid = require('./_createHybrid'), + createPartial = require('./_createPartial'), + getData = require('./_getData'), + mergeData = require('./_mergeData'), + setData = require('./_setData'), + setWrapToString = require('./_setWrapToString'), + toInteger = require('./toInteger'); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates a function that either curries or invokes `func` with optional + * `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` or `_.curryRight` of a bound function + * 8 - `_.curry` + * 16 - `_.curryRight` + * 32 - `_.partial` + * 64 - `_.partialRight` + * 128 - `_.rearg` + * 256 - `_.ary` + * 512 - `_.flip` + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to be partially applied. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ +function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { + var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; + if (!isBindKey && typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = partials ? partials.length : 0; + if (!length) { + bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); + partials = holders = undefined; + } + ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); + arity = arity === undefined ? arity : toInteger(arity); + length -= holders ? holders.length : 0; + + if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { + var partialsRight = partials, + holdersRight = holders; + + partials = holders = undefined; + } + var data = isBindKey ? undefined : getData(func); + + var newData = [ + func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, + argPos, ary, arity + ]; + + if (data) { + mergeData(newData, data); + } + func = newData[0]; + bitmask = newData[1]; + thisArg = newData[2]; + partials = newData[3]; + holders = newData[4]; + arity = newData[9] = newData[9] === undefined + ? (isBindKey ? 0 : func.length) + : nativeMax(newData[9] - length, 0); + + if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { + bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); + } + if (!bitmask || bitmask == WRAP_BIND_FLAG) { + var result = createBind(func, bitmask, thisArg); + } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { + result = createCurry(func, bitmask, arity); + } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { + result = createPartial(func, bitmask, thisArg, partials); + } else { + result = createHybrid.apply(undefined, newData); + } + var setter = data ? baseSetData : setData; + return setWrapToString(setter(result, newData), func, bitmask); +} + +module.exports = createWrap; diff --git a/node_modules/umzug/node_modules/lodash/_customDefaultsAssignIn.js b/node_modules/umzug/node_modules/lodash/_customDefaultsAssignIn.js new file mode 100644 index 0000000..1f49e6f --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_customDefaultsAssignIn.js @@ -0,0 +1,29 @@ +var eq = require('./eq'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used by `_.defaults` to customize its `_.assignIn` use to assign properties + * of source objects to the destination object for all destination properties + * that resolve to `undefined`. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to assign. + * @param {Object} object The parent object of `objValue`. + * @returns {*} Returns the value to assign. + */ +function customDefaultsAssignIn(objValue, srcValue, key, object) { + if (objValue === undefined || + (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { + return srcValue; + } + return objValue; +} + +module.exports = customDefaultsAssignIn; diff --git a/node_modules/umzug/node_modules/lodash/_customDefaultsMerge.js b/node_modules/umzug/node_modules/lodash/_customDefaultsMerge.js new file mode 100644 index 0000000..4cab317 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_customDefaultsMerge.js @@ -0,0 +1,28 @@ +var baseMerge = require('./_baseMerge'), + isObject = require('./isObject'); + +/** + * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source + * objects into destination objects that are passed thru. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to merge. + * @param {Object} object The parent object of `objValue`. + * @param {Object} source The parent object of `srcValue`. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + * @returns {*} Returns the value to assign. + */ +function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { + if (isObject(objValue) && isObject(srcValue)) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, objValue); + baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); + stack['delete'](srcValue); + } + return objValue; +} + +module.exports = customDefaultsMerge; diff --git a/node_modules/umzug/node_modules/lodash/_customOmitClone.js b/node_modules/umzug/node_modules/lodash/_customOmitClone.js new file mode 100644 index 0000000..968db2e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_customOmitClone.js @@ -0,0 +1,16 @@ +var isPlainObject = require('./isPlainObject'); + +/** + * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain + * objects. + * + * @private + * @param {*} value The value to inspect. + * @param {string} key The key of the property to inspect. + * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. + */ +function customOmitClone(value) { + return isPlainObject(value) ? undefined : value; +} + +module.exports = customOmitClone; diff --git a/node_modules/umzug/node_modules/lodash/_deburrLetter.js b/node_modules/umzug/node_modules/lodash/_deburrLetter.js new file mode 100644 index 0000000..3e531ed --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_deburrLetter.js @@ -0,0 +1,71 @@ +var basePropertyOf = require('./_basePropertyOf'); + +/** Used to map Latin Unicode letters to basic Latin letters. */ +var deburredLetters = { + // Latin-1 Supplement block. + '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', + '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', + '\xc7': 'C', '\xe7': 'c', + '\xd0': 'D', '\xf0': 'd', + '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', + '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', + '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', + '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', + '\xd1': 'N', '\xf1': 'n', + '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', + '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', + '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', + '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', + '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', + '\xc6': 'Ae', '\xe6': 'ae', + '\xde': 'Th', '\xfe': 'th', + '\xdf': 'ss', + // Latin Extended-A block. + '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', + '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', + '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', + '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', + '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', + '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', + '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', + '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', + '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', + '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', + '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', + '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', + '\u0134': 'J', '\u0135': 'j', + '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', + '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', + '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', + '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', + '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', + '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', + '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', + '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', + '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', + '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', + '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', + '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', + '\u0163': 't', '\u0165': 't', '\u0167': 't', + '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', + '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', + '\u0174': 'W', '\u0175': 'w', + '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', + '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', + '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', + '\u0132': 'IJ', '\u0133': 'ij', + '\u0152': 'Oe', '\u0153': 'oe', + '\u0149': "'n", '\u017f': 's' +}; + +/** + * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A + * letters to basic Latin letters. + * + * @private + * @param {string} letter The matched letter to deburr. + * @returns {string} Returns the deburred letter. + */ +var deburrLetter = basePropertyOf(deburredLetters); + +module.exports = deburrLetter; diff --git a/node_modules/umzug/node_modules/lodash/_defineProperty.js b/node_modules/umzug/node_modules/lodash/_defineProperty.js new file mode 100644 index 0000000..b6116d9 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_defineProperty.js @@ -0,0 +1,11 @@ +var getNative = require('./_getNative'); + +var defineProperty = (function() { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} +}()); + +module.exports = defineProperty; diff --git a/node_modules/umzug/node_modules/lodash/_equalArrays.js b/node_modules/umzug/node_modules/lodash/_equalArrays.js new file mode 100644 index 0000000..f6a3b7c --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_equalArrays.js @@ -0,0 +1,83 @@ +var SetCache = require('./_SetCache'), + arraySome = require('./_arraySome'), + cacheHas = require('./_cacheHas'); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ +function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(array); + if (stacked && stack.get(other)) { + return stacked == other; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!arraySome(other, function(othValue, othIndex) { + if (!cacheHas(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; +} + +module.exports = equalArrays; diff --git a/node_modules/umzug/node_modules/lodash/_equalByTag.js b/node_modules/umzug/node_modules/lodash/_equalByTag.js new file mode 100644 index 0000000..71919e8 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_equalByTag.js @@ -0,0 +1,112 @@ +var Symbol = require('./_Symbol'), + Uint8Array = require('./_Uint8Array'), + eq = require('./eq'), + equalArrays = require('./_equalArrays'), + mapToArray = require('./_mapToArray'), + setToArray = require('./_setToArray'); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]'; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new Uint8Array(object), new Uint8Array(other))) { + return false; + } + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + case mapTag: + var convert = mapToArray; + + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; +} + +module.exports = equalByTag; diff --git a/node_modules/umzug/node_modules/lodash/_equalObjects.js b/node_modules/umzug/node_modules/lodash/_equalObjects.js new file mode 100644 index 0000000..17421f3 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_equalObjects.js @@ -0,0 +1,89 @@ +var getAllKeys = require('./_getAllKeys'); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = getAllKeys(object), + objLength = objProps.length, + othProps = getAllKeys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked && stack.get(other)) { + return stacked == other; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; +} + +module.exports = equalObjects; diff --git a/node_modules/umzug/node_modules/lodash/_escapeHtmlChar.js b/node_modules/umzug/node_modules/lodash/_escapeHtmlChar.js new file mode 100644 index 0000000..7ca68ee --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_escapeHtmlChar.js @@ -0,0 +1,21 @@ +var basePropertyOf = require('./_basePropertyOf'); + +/** Used to map characters to HTML entities. */ +var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' +}; + +/** + * Used by `_.escape` to convert characters to HTML entities. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ +var escapeHtmlChar = basePropertyOf(htmlEscapes); + +module.exports = escapeHtmlChar; diff --git a/node_modules/umzug/node_modules/lodash/_escapeStringChar.js b/node_modules/umzug/node_modules/lodash/_escapeStringChar.js new file mode 100644 index 0000000..44eca96 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_escapeStringChar.js @@ -0,0 +1,22 @@ +/** Used to escape characters for inclusion in compiled string literals. */ +var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\u2028': 'u2028', + '\u2029': 'u2029' +}; + +/** + * Used by `_.template` to escape characters for inclusion in compiled string literals. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ +function escapeStringChar(chr) { + return '\\' + stringEscapes[chr]; +} + +module.exports = escapeStringChar; diff --git a/node_modules/umzug/node_modules/lodash/_flatRest.js b/node_modules/umzug/node_modules/lodash/_flatRest.js new file mode 100644 index 0000000..94ab6cc --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_flatRest.js @@ -0,0 +1,16 @@ +var flatten = require('./flatten'), + overRest = require('./_overRest'), + setToString = require('./_setToString'); + +/** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ +function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); +} + +module.exports = flatRest; diff --git a/node_modules/umzug/node_modules/lodash/_freeGlobal.js b/node_modules/umzug/node_modules/lodash/_freeGlobal.js new file mode 100644 index 0000000..bbec998 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_freeGlobal.js @@ -0,0 +1,4 @@ +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +module.exports = freeGlobal; diff --git a/node_modules/umzug/node_modules/lodash/_getAllKeys.js b/node_modules/umzug/node_modules/lodash/_getAllKeys.js new file mode 100644 index 0000000..a9ce699 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_getAllKeys.js @@ -0,0 +1,16 @@ +var baseGetAllKeys = require('./_baseGetAllKeys'), + getSymbols = require('./_getSymbols'), + keys = require('./keys'); + +/** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); +} + +module.exports = getAllKeys; diff --git a/node_modules/umzug/node_modules/lodash/_getAllKeysIn.js b/node_modules/umzug/node_modules/lodash/_getAllKeysIn.js new file mode 100644 index 0000000..1b46678 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_getAllKeysIn.js @@ -0,0 +1,17 @@ +var baseGetAllKeys = require('./_baseGetAllKeys'), + getSymbolsIn = require('./_getSymbolsIn'), + keysIn = require('./keysIn'); + +/** + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeysIn(object) { + return baseGetAllKeys(object, keysIn, getSymbolsIn); +} + +module.exports = getAllKeysIn; diff --git a/node_modules/umzug/node_modules/lodash/_getData.js b/node_modules/umzug/node_modules/lodash/_getData.js new file mode 100644 index 0000000..a1fe7b7 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_getData.js @@ -0,0 +1,15 @@ +var metaMap = require('./_metaMap'), + noop = require('./noop'); + +/** + * Gets metadata for `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {*} Returns the metadata for `func`. + */ +var getData = !metaMap ? noop : function(func) { + return metaMap.get(func); +}; + +module.exports = getData; diff --git a/node_modules/umzug/node_modules/lodash/_getFuncName.js b/node_modules/umzug/node_modules/lodash/_getFuncName.js new file mode 100644 index 0000000..21e15b3 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_getFuncName.js @@ -0,0 +1,31 @@ +var realNames = require('./_realNames'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Gets the name of `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {string} Returns the function name. + */ +function getFuncName(func) { + var result = (func.name + ''), + array = realNames[result], + length = hasOwnProperty.call(realNames, result) ? array.length : 0; + + while (length--) { + var data = array[length], + otherFunc = data.func; + if (otherFunc == null || otherFunc == func) { + return data.name; + } + } + return result; +} + +module.exports = getFuncName; diff --git a/node_modules/umzug/node_modules/lodash/_getHolder.js b/node_modules/umzug/node_modules/lodash/_getHolder.js new file mode 100644 index 0000000..65e94b5 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_getHolder.js @@ -0,0 +1,13 @@ +/** + * Gets the argument placeholder value for `func`. + * + * @private + * @param {Function} func The function to inspect. + * @returns {*} Returns the placeholder value. + */ +function getHolder(func) { + var object = func; + return object.placeholder; +} + +module.exports = getHolder; diff --git a/node_modules/umzug/node_modules/lodash/_getMapData.js b/node_modules/umzug/node_modules/lodash/_getMapData.js new file mode 100644 index 0000000..17f6303 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_getMapData.js @@ -0,0 +1,18 @@ +var isKeyable = require('./_isKeyable'); + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +module.exports = getMapData; diff --git a/node_modules/umzug/node_modules/lodash/_getMatchData.js b/node_modules/umzug/node_modules/lodash/_getMatchData.js new file mode 100644 index 0000000..2cc70f9 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_getMatchData.js @@ -0,0 +1,24 @@ +var isStrictComparable = require('./_isStrictComparable'), + keys = require('./keys'); + +/** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ +function getMatchData(object) { + var result = keys(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, isStrictComparable(value)]; + } + return result; +} + +module.exports = getMatchData; diff --git a/node_modules/umzug/node_modules/lodash/_getNative.js b/node_modules/umzug/node_modules/lodash/_getNative.js new file mode 100644 index 0000000..97a622b --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_getNative.js @@ -0,0 +1,17 @@ +var baseIsNative = require('./_baseIsNative'), + getValue = require('./_getValue'); + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} + +module.exports = getNative; diff --git a/node_modules/umzug/node_modules/lodash/_getPrototype.js b/node_modules/umzug/node_modules/lodash/_getPrototype.js new file mode 100644 index 0000000..e808612 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_getPrototype.js @@ -0,0 +1,6 @@ +var overArg = require('./_overArg'); + +/** Built-in value references. */ +var getPrototype = overArg(Object.getPrototypeOf, Object); + +module.exports = getPrototype; diff --git a/node_modules/umzug/node_modules/lodash/_getRawTag.js b/node_modules/umzug/node_modules/lodash/_getRawTag.js new file mode 100644 index 0000000..49a95c9 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_getRawTag.js @@ -0,0 +1,46 @@ +var Symbol = require('./_Symbol'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +/** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ +function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; +} + +module.exports = getRawTag; diff --git a/node_modules/umzug/node_modules/lodash/_getSymbols.js b/node_modules/umzug/node_modules/lodash/_getSymbols.js new file mode 100644 index 0000000..7d6eafe --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_getSymbols.js @@ -0,0 +1,30 @@ +var arrayFilter = require('./_arrayFilter'), + stubArray = require('./stubArray'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbols = !nativeGetSymbols ? stubArray : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); +}; + +module.exports = getSymbols; diff --git a/node_modules/umzug/node_modules/lodash/_getSymbolsIn.js b/node_modules/umzug/node_modules/lodash/_getSymbolsIn.js new file mode 100644 index 0000000..cec0855 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_getSymbolsIn.js @@ -0,0 +1,25 @@ +var arrayPush = require('./_arrayPush'), + getPrototype = require('./_getPrototype'), + getSymbols = require('./_getSymbols'), + stubArray = require('./stubArray'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own and inherited enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { + var result = []; + while (object) { + arrayPush(result, getSymbols(object)); + object = getPrototype(object); + } + return result; +}; + +module.exports = getSymbolsIn; diff --git a/node_modules/umzug/node_modules/lodash/_getTag.js b/node_modules/umzug/node_modules/lodash/_getTag.js new file mode 100644 index 0000000..deaf89d --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_getTag.js @@ -0,0 +1,58 @@ +var DataView = require('./_DataView'), + Map = require('./_Map'), + Promise = require('./_Promise'), + Set = require('./_Set'), + WeakMap = require('./_WeakMap'), + baseGetTag = require('./_baseGetTag'), + toSource = require('./_toSource'); + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + setTag = '[object Set]', + weakMapTag = '[object WeakMap]'; + +var dataViewTag = '[object DataView]'; + +/** Used to detect maps, sets, and weakmaps. */ +var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + +/** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +var getTag = baseGetTag; + +// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. +if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function(value) { + var result = baseGetTag(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; +} + +module.exports = getTag; diff --git a/node_modules/umzug/node_modules/lodash/_getValue.js b/node_modules/umzug/node_modules/lodash/_getValue.js new file mode 100644 index 0000000..5f7d773 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_getValue.js @@ -0,0 +1,13 @@ +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +module.exports = getValue; diff --git a/node_modules/umzug/node_modules/lodash/_getView.js b/node_modules/umzug/node_modules/lodash/_getView.js new file mode 100644 index 0000000..df1e5d4 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_getView.js @@ -0,0 +1,33 @@ +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * Gets the view, applying any `transforms` to the `start` and `end` positions. + * + * @private + * @param {number} start The start of the view. + * @param {number} end The end of the view. + * @param {Array} transforms The transformations to apply to the view. + * @returns {Object} Returns an object containing the `start` and `end` + * positions of the view. + */ +function getView(start, end, transforms) { + var index = -1, + length = transforms.length; + + while (++index < length) { + var data = transforms[index], + size = data.size; + + switch (data.type) { + case 'drop': start += size; break; + case 'dropRight': end -= size; break; + case 'take': end = nativeMin(end, start + size); break; + case 'takeRight': start = nativeMax(start, end - size); break; + } + } + return { 'start': start, 'end': end }; +} + +module.exports = getView; diff --git a/node_modules/umzug/node_modules/lodash/_getWrapDetails.js b/node_modules/umzug/node_modules/lodash/_getWrapDetails.js new file mode 100644 index 0000000..3bcc6e4 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_getWrapDetails.js @@ -0,0 +1,17 @@ +/** Used to match wrap detail comments. */ +var reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, + reSplitDetails = /,? & /; + +/** + * Extracts wrapper details from the `source` body comment. + * + * @private + * @param {string} source The source to inspect. + * @returns {Array} Returns the wrapper details. + */ +function getWrapDetails(source) { + var match = source.match(reWrapDetails); + return match ? match[1].split(reSplitDetails) : []; +} + +module.exports = getWrapDetails; diff --git a/node_modules/umzug/node_modules/lodash/_hasPath.js b/node_modules/umzug/node_modules/lodash/_hasPath.js new file mode 100644 index 0000000..93dbde1 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_hasPath.js @@ -0,0 +1,39 @@ +var castPath = require('./_castPath'), + isArguments = require('./isArguments'), + isArray = require('./isArray'), + isIndex = require('./_isIndex'), + isLength = require('./isLength'), + toKey = require('./_toKey'); + +/** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ +function hasPath(object, path, hasFunc) { + path = castPath(path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && isLength(length) && isIndex(key, length) && + (isArray(object) || isArguments(object)); +} + +module.exports = hasPath; diff --git a/node_modules/umzug/node_modules/lodash/_hasUnicode.js b/node_modules/umzug/node_modules/lodash/_hasUnicode.js new file mode 100644 index 0000000..cb6ca15 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_hasUnicode.js @@ -0,0 +1,26 @@ +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsZWJ = '\\u200d'; + +/** 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/). */ +var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); + +/** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ +function hasUnicode(string) { + return reHasUnicode.test(string); +} + +module.exports = hasUnicode; diff --git a/node_modules/umzug/node_modules/lodash/_hasUnicodeWord.js b/node_modules/umzug/node_modules/lodash/_hasUnicodeWord.js new file mode 100644 index 0000000..a35d6e5 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_hasUnicodeWord.js @@ -0,0 +1,15 @@ +/** Used to detect strings that need a more robust regexp to match words. */ +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 ]/; + +/** + * Checks if `string` contains a word composed of Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a word is found, else `false`. + */ +function hasUnicodeWord(string) { + return reHasUnicodeWord.test(string); +} + +module.exports = hasUnicodeWord; diff --git a/node_modules/umzug/node_modules/lodash/_hashClear.js b/node_modules/umzug/node_modules/lodash/_hashClear.js new file mode 100644 index 0000000..5d4b70c --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_hashClear.js @@ -0,0 +1,15 @@ +var nativeCreate = require('./_nativeCreate'); + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; +} + +module.exports = hashClear; diff --git a/node_modules/umzug/node_modules/lodash/_hashDelete.js b/node_modules/umzug/node_modules/lodash/_hashDelete.js new file mode 100644 index 0000000..ea9dabf --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_hashDelete.js @@ -0,0 +1,17 @@ +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; +} + +module.exports = hashDelete; diff --git a/node_modules/umzug/node_modules/lodash/_hashGet.js b/node_modules/umzug/node_modules/lodash/_hashGet.js new file mode 100644 index 0000000..1fc2f34 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_hashGet.js @@ -0,0 +1,30 @@ +var nativeCreate = require('./_nativeCreate'); + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} + +module.exports = hashGet; diff --git a/node_modules/umzug/node_modules/lodash/_hashHas.js b/node_modules/umzug/node_modules/lodash/_hashHas.js new file mode 100644 index 0000000..281a551 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_hashHas.js @@ -0,0 +1,23 @@ +var nativeCreate = require('./_nativeCreate'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); +} + +module.exports = hashHas; diff --git a/node_modules/umzug/node_modules/lodash/_hashSet.js b/node_modules/umzug/node_modules/lodash/_hashSet.js new file mode 100644 index 0000000..e105528 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_hashSet.js @@ -0,0 +1,23 @@ +var nativeCreate = require('./_nativeCreate'); + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +module.exports = hashSet; diff --git a/node_modules/umzug/node_modules/lodash/_initCloneArray.js b/node_modules/umzug/node_modules/lodash/_initCloneArray.js new file mode 100644 index 0000000..aef0212 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_initCloneArray.js @@ -0,0 +1,26 @@ +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ +function initCloneArray(array) { + var length = array.length, + result = array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; +} + +module.exports = initCloneArray; diff --git a/node_modules/umzug/node_modules/lodash/_initCloneByTag.js b/node_modules/umzug/node_modules/lodash/_initCloneByTag.js new file mode 100644 index 0000000..e7b77ed --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_initCloneByTag.js @@ -0,0 +1,80 @@ +var cloneArrayBuffer = require('./_cloneArrayBuffer'), + cloneDataView = require('./_cloneDataView'), + cloneMap = require('./_cloneMap'), + cloneRegExp = require('./_cloneRegExp'), + cloneSet = require('./_cloneSet'), + cloneSymbol = require('./_cloneSymbol'), + cloneTypedArray = require('./_cloneTypedArray'); + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneByTag(object, tag, cloneFunc, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return cloneDataView(object, isDeep); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return cloneTypedArray(object, isDeep); + + case mapTag: + return cloneMap(object, isDeep, cloneFunc); + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return cloneRegExp(object); + + case setTag: + return cloneSet(object, isDeep, cloneFunc); + + case symbolTag: + return cloneSymbol(object); + } +} + +module.exports = initCloneByTag; diff --git a/node_modules/umzug/node_modules/lodash/_initCloneObject.js b/node_modules/umzug/node_modules/lodash/_initCloneObject.js new file mode 100644 index 0000000..5a13e64 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_initCloneObject.js @@ -0,0 +1,18 @@ +var baseCreate = require('./_baseCreate'), + getPrototype = require('./_getPrototype'), + isPrototype = require('./_isPrototype'); + +/** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneObject(object) { + return (typeof object.constructor == 'function' && !isPrototype(object)) + ? baseCreate(getPrototype(object)) + : {}; +} + +module.exports = initCloneObject; diff --git a/node_modules/umzug/node_modules/lodash/_insertWrapDetails.js b/node_modules/umzug/node_modules/lodash/_insertWrapDetails.js new file mode 100644 index 0000000..e790808 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_insertWrapDetails.js @@ -0,0 +1,23 @@ +/** Used to match wrap detail comments. */ +var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/; + +/** + * Inserts wrapper `details` in a comment at the top of the `source` body. + * + * @private + * @param {string} source The source to modify. + * @returns {Array} details The details to insert. + * @returns {string} Returns the modified source. + */ +function insertWrapDetails(source, details) { + var length = details.length; + if (!length) { + return source; + } + var lastIndex = length - 1; + details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; + details = details.join(length > 2 ? ', ' : ' '); + return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); +} + +module.exports = insertWrapDetails; diff --git a/node_modules/umzug/node_modules/lodash/_isFlattenable.js b/node_modules/umzug/node_modules/lodash/_isFlattenable.js new file mode 100644 index 0000000..4cc2c24 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_isFlattenable.js @@ -0,0 +1,20 @@ +var Symbol = require('./_Symbol'), + isArguments = require('./isArguments'), + isArray = require('./isArray'); + +/** Built-in value references. */ +var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined; + +/** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ +function isFlattenable(value) { + return isArray(value) || isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); +} + +module.exports = isFlattenable; diff --git a/node_modules/umzug/node_modules/lodash/_isIndex.js b/node_modules/umzug/node_modules/lodash/_isIndex.js new file mode 100644 index 0000000..e123dde --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_isIndex.js @@ -0,0 +1,22 @@ +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** Used to detect unsigned integer values. */ +var reIsUint = /^(?:0|[1-9]\d*)$/; + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && + (typeof value == 'number' || reIsUint.test(value)) && + (value > -1 && value % 1 == 0 && value < length); +} + +module.exports = isIndex; diff --git a/node_modules/umzug/node_modules/lodash/_isIterateeCall.js b/node_modules/umzug/node_modules/lodash/_isIterateeCall.js new file mode 100644 index 0000000..a0bb5a9 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_isIterateeCall.js @@ -0,0 +1,30 @@ +var eq = require('./eq'), + isArrayLike = require('./isArrayLike'), + isIndex = require('./_isIndex'), + isObject = require('./isObject'); + +/** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ +function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; +} + +module.exports = isIterateeCall; diff --git a/node_modules/umzug/node_modules/lodash/_isKey.js b/node_modules/umzug/node_modules/lodash/_isKey.js new file mode 100644 index 0000000..ff08b06 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_isKey.js @@ -0,0 +1,29 @@ +var isArray = require('./isArray'), + isSymbol = require('./isSymbol'); + +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/; + +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); +} + +module.exports = isKey; diff --git a/node_modules/umzug/node_modules/lodash/_isKeyable.js b/node_modules/umzug/node_modules/lodash/_isKeyable.js new file mode 100644 index 0000000..39f1828 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_isKeyable.js @@ -0,0 +1,15 @@ +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +module.exports = isKeyable; diff --git a/node_modules/umzug/node_modules/lodash/_isLaziable.js b/node_modules/umzug/node_modules/lodash/_isLaziable.js new file mode 100644 index 0000000..a57c4f2 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_isLaziable.js @@ -0,0 +1,28 @@ +var LazyWrapper = require('./_LazyWrapper'), + getData = require('./_getData'), + getFuncName = require('./_getFuncName'), + lodash = require('./wrapperLodash'); + +/** + * Checks if `func` has a lazy counterpart. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` has a lazy counterpart, + * else `false`. + */ +function isLaziable(func) { + var funcName = getFuncName(func), + other = lodash[funcName]; + + if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { + return false; + } + if (func === other) { + return true; + } + var data = getData(other); + return !!data && func === data[0]; +} + +module.exports = isLaziable; diff --git a/node_modules/umzug/node_modules/lodash/_isMaskable.js b/node_modules/umzug/node_modules/lodash/_isMaskable.js new file mode 100644 index 0000000..eb98d09 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_isMaskable.js @@ -0,0 +1,14 @@ +var coreJsData = require('./_coreJsData'), + isFunction = require('./isFunction'), + stubFalse = require('./stubFalse'); + +/** + * Checks if `func` is capable of being masked. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `func` is maskable, else `false`. + */ +var isMaskable = coreJsData ? isFunction : stubFalse; + +module.exports = isMaskable; diff --git a/node_modules/umzug/node_modules/lodash/_isMasked.js b/node_modules/umzug/node_modules/lodash/_isMasked.js new file mode 100644 index 0000000..4b0f21b --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_isMasked.js @@ -0,0 +1,20 @@ +var coreJsData = require('./_coreJsData'); + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +module.exports = isMasked; diff --git a/node_modules/umzug/node_modules/lodash/_isPrototype.js b/node_modules/umzug/node_modules/lodash/_isPrototype.js new file mode 100644 index 0000000..0f29498 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_isPrototype.js @@ -0,0 +1,18 @@ +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ +function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; +} + +module.exports = isPrototype; diff --git a/node_modules/umzug/node_modules/lodash/_isStrictComparable.js b/node_modules/umzug/node_modules/lodash/_isStrictComparable.js new file mode 100644 index 0000000..b59f40b --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_isStrictComparable.js @@ -0,0 +1,15 @@ +var isObject = require('./isObject'); + +/** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ +function isStrictComparable(value) { + return value === value && !isObject(value); +} + +module.exports = isStrictComparable; diff --git a/node_modules/umzug/node_modules/lodash/_iteratorToArray.js b/node_modules/umzug/node_modules/lodash/_iteratorToArray.js new file mode 100644 index 0000000..4768566 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_iteratorToArray.js @@ -0,0 +1,18 @@ +/** + * Converts `iterator` to an array. + * + * @private + * @param {Object} iterator The iterator to convert. + * @returns {Array} Returns the converted array. + */ +function iteratorToArray(iterator) { + var data, + result = []; + + while (!(data = iterator.next()).done) { + result.push(data.value); + } + return result; +} + +module.exports = iteratorToArray; diff --git a/node_modules/umzug/node_modules/lodash/_lazyClone.js b/node_modules/umzug/node_modules/lodash/_lazyClone.js new file mode 100644 index 0000000..d8a51f8 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_lazyClone.js @@ -0,0 +1,23 @@ +var LazyWrapper = require('./_LazyWrapper'), + copyArray = require('./_copyArray'); + +/** + * Creates a clone of the lazy wrapper object. + * + * @private + * @name clone + * @memberOf LazyWrapper + * @returns {Object} Returns the cloned `LazyWrapper` object. + */ +function lazyClone() { + var result = new LazyWrapper(this.__wrapped__); + result.__actions__ = copyArray(this.__actions__); + result.__dir__ = this.__dir__; + result.__filtered__ = this.__filtered__; + result.__iteratees__ = copyArray(this.__iteratees__); + result.__takeCount__ = this.__takeCount__; + result.__views__ = copyArray(this.__views__); + return result; +} + +module.exports = lazyClone; diff --git a/node_modules/umzug/node_modules/lodash/_lazyReverse.js b/node_modules/umzug/node_modules/lodash/_lazyReverse.js new file mode 100644 index 0000000..c5b5219 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_lazyReverse.js @@ -0,0 +1,23 @@ +var LazyWrapper = require('./_LazyWrapper'); + +/** + * Reverses the direction of lazy iteration. + * + * @private + * @name reverse + * @memberOf LazyWrapper + * @returns {Object} Returns the new reversed `LazyWrapper` object. + */ +function lazyReverse() { + if (this.__filtered__) { + var result = new LazyWrapper(this); + result.__dir__ = -1; + result.__filtered__ = true; + } else { + result = this.clone(); + result.__dir__ *= -1; + } + return result; +} + +module.exports = lazyReverse; diff --git a/node_modules/umzug/node_modules/lodash/_lazyValue.js b/node_modules/umzug/node_modules/lodash/_lazyValue.js new file mode 100644 index 0000000..371ca8d --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_lazyValue.js @@ -0,0 +1,69 @@ +var baseWrapperValue = require('./_baseWrapperValue'), + getView = require('./_getView'), + isArray = require('./isArray'); + +/** Used to indicate the type of lazy iteratees. */ +var LAZY_FILTER_FLAG = 1, + LAZY_MAP_FLAG = 2; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * Extracts the unwrapped value from its lazy wrapper. + * + * @private + * @name value + * @memberOf LazyWrapper + * @returns {*} Returns the unwrapped value. + */ +function lazyValue() { + var array = this.__wrapped__.value(), + dir = this.__dir__, + isArr = isArray(array), + isRight = dir < 0, + arrLength = isArr ? array.length : 0, + view = getView(0, arrLength, this.__views__), + start = view.start, + end = view.end, + length = end - start, + index = isRight ? end : (start - 1), + iteratees = this.__iteratees__, + iterLength = iteratees.length, + resIndex = 0, + takeCount = nativeMin(length, this.__takeCount__); + + if (!isArr || (!isRight && arrLength == length && takeCount == length)) { + return baseWrapperValue(array, this.__actions__); + } + var result = []; + + outer: + while (length-- && resIndex < takeCount) { + index += dir; + + var iterIndex = -1, + value = array[index]; + + while (++iterIndex < iterLength) { + var data = iteratees[iterIndex], + iteratee = data.iteratee, + type = data.type, + computed = iteratee(value); + + if (type == LAZY_MAP_FLAG) { + value = computed; + } else if (!computed) { + if (type == LAZY_FILTER_FLAG) { + continue outer; + } else { + break outer; + } + } + } + result[resIndex++] = value; + } + return result; +} + +module.exports = lazyValue; diff --git a/node_modules/umzug/node_modules/lodash/_listCacheClear.js b/node_modules/umzug/node_modules/lodash/_listCacheClear.js new file mode 100644 index 0000000..acbe39a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_listCacheClear.js @@ -0,0 +1,13 @@ +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; + this.size = 0; +} + +module.exports = listCacheClear; diff --git a/node_modules/umzug/node_modules/lodash/_listCacheDelete.js b/node_modules/umzug/node_modules/lodash/_listCacheDelete.js new file mode 100644 index 0000000..b1384ad --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_listCacheDelete.js @@ -0,0 +1,35 @@ +var assocIndexOf = require('./_assocIndexOf'); + +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/** Built-in value references. */ +var splice = arrayProto.splice; + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; +} + +module.exports = listCacheDelete; diff --git a/node_modules/umzug/node_modules/lodash/_listCacheGet.js b/node_modules/umzug/node_modules/lodash/_listCacheGet.js new file mode 100644 index 0000000..f8192fc --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_listCacheGet.js @@ -0,0 +1,19 @@ +var assocIndexOf = require('./_assocIndexOf'); + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +module.exports = listCacheGet; diff --git a/node_modules/umzug/node_modules/lodash/_listCacheHas.js b/node_modules/umzug/node_modules/lodash/_listCacheHas.js new file mode 100644 index 0000000..2adf671 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_listCacheHas.js @@ -0,0 +1,16 @@ +var assocIndexOf = require('./_assocIndexOf'); + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} + +module.exports = listCacheHas; diff --git a/node_modules/umzug/node_modules/lodash/_listCacheSet.js b/node_modules/umzug/node_modules/lodash/_listCacheSet.js new file mode 100644 index 0000000..5855c95 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_listCacheSet.js @@ -0,0 +1,26 @@ +var assocIndexOf = require('./_assocIndexOf'); + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +module.exports = listCacheSet; diff --git a/node_modules/umzug/node_modules/lodash/_mapCacheClear.js b/node_modules/umzug/node_modules/lodash/_mapCacheClear.js new file mode 100644 index 0000000..bc9ca20 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_mapCacheClear.js @@ -0,0 +1,21 @@ +var Hash = require('./_Hash'), + ListCache = require('./_ListCache'), + Map = require('./_Map'); + +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; +} + +module.exports = mapCacheClear; diff --git a/node_modules/umzug/node_modules/lodash/_mapCacheDelete.js b/node_modules/umzug/node_modules/lodash/_mapCacheDelete.js new file mode 100644 index 0000000..946ca3c --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_mapCacheDelete.js @@ -0,0 +1,18 @@ +var getMapData = require('./_getMapData'); + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; +} + +module.exports = mapCacheDelete; diff --git a/node_modules/umzug/node_modules/lodash/_mapCacheGet.js b/node_modules/umzug/node_modules/lodash/_mapCacheGet.js new file mode 100644 index 0000000..f29f55c --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_mapCacheGet.js @@ -0,0 +1,16 @@ +var getMapData = require('./_getMapData'); + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} + +module.exports = mapCacheGet; diff --git a/node_modules/umzug/node_modules/lodash/_mapCacheHas.js b/node_modules/umzug/node_modules/lodash/_mapCacheHas.js new file mode 100644 index 0000000..a1214c0 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_mapCacheHas.js @@ -0,0 +1,16 @@ +var getMapData = require('./_getMapData'); + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} + +module.exports = mapCacheHas; diff --git a/node_modules/umzug/node_modules/lodash/_mapCacheSet.js b/node_modules/umzug/node_modules/lodash/_mapCacheSet.js new file mode 100644 index 0000000..7346849 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_mapCacheSet.js @@ -0,0 +1,22 @@ +var getMapData = require('./_getMapData'); + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; +} + +module.exports = mapCacheSet; diff --git a/node_modules/umzug/node_modules/lodash/_mapToArray.js b/node_modules/umzug/node_modules/lodash/_mapToArray.js new file mode 100644 index 0000000..fe3dd53 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_mapToArray.js @@ -0,0 +1,18 @@ +/** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ +function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; +} + +module.exports = mapToArray; diff --git a/node_modules/umzug/node_modules/lodash/_matchesStrictComparable.js b/node_modules/umzug/node_modules/lodash/_matchesStrictComparable.js new file mode 100644 index 0000000..f608af9 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_matchesStrictComparable.js @@ -0,0 +1,20 @@ +/** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; +} + +module.exports = matchesStrictComparable; diff --git a/node_modules/umzug/node_modules/lodash/_memoizeCapped.js b/node_modules/umzug/node_modules/lodash/_memoizeCapped.js new file mode 100644 index 0000000..7f71c8f --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_memoizeCapped.js @@ -0,0 +1,26 @@ +var memoize = require('./memoize'); + +/** Used as the maximum memoize cache size. */ +var MAX_MEMOIZE_SIZE = 500; + +/** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ +function memoizeCapped(func) { + var result = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; +} + +module.exports = memoizeCapped; diff --git a/node_modules/umzug/node_modules/lodash/_mergeData.js b/node_modules/umzug/node_modules/lodash/_mergeData.js new file mode 100644 index 0000000..cb570f9 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_mergeData.js @@ -0,0 +1,90 @@ +var composeArgs = require('./_composeArgs'), + composeArgsRight = require('./_composeArgsRight'), + replaceHolders = require('./_replaceHolders'); + +/** Used as the internal argument placeholder. */ +var PLACEHOLDER = '__lodash_placeholder__'; + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_BOUND_FLAG = 4, + WRAP_CURRY_FLAG = 8, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * Merges the function metadata of `source` into `data`. + * + * Merging metadata reduces the number of wrappers used to invoke a function. + * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` + * may be applied regardless of execution order. Methods like `_.ary` and + * `_.rearg` modify function arguments, making the order in which they are + * executed important, preventing the merging of metadata. However, we make + * an exception for a safe combined case where curried functions have `_.ary` + * and or `_.rearg` applied. + * + * @private + * @param {Array} data The destination metadata. + * @param {Array} source The source metadata. + * @returns {Array} Returns `data`. + */ +function mergeData(data, source) { + var bitmask = data[1], + srcBitmask = source[1], + newBitmask = bitmask | srcBitmask, + isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); + + var isCombo = + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) || + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) || + ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG)); + + // Exit early if metadata can't be merged. + if (!(isCommon || isCombo)) { + return data; + } + // Use source `thisArg` if available. + if (srcBitmask & WRAP_BIND_FLAG) { + data[2] = source[2]; + // Set when currying a bound function. + newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; + } + // Compose partial arguments. + var value = source[3]; + if (value) { + var partials = data[3]; + data[3] = partials ? composeArgs(partials, value, source[4]) : value; + data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; + } + // Compose partial right arguments. + value = source[5]; + if (value) { + partials = data[5]; + data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; + data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; + } + // Use source `argPos` if available. + value = source[7]; + if (value) { + data[7] = value; + } + // Use source `ary` if it's smaller. + if (srcBitmask & WRAP_ARY_FLAG) { + data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); + } + // Use source `arity` if one is not provided. + if (data[9] == null) { + data[9] = source[9]; + } + // Use source `func` and merge bitmasks. + data[0] = source[0]; + data[1] = newBitmask; + + return data; +} + +module.exports = mergeData; diff --git a/node_modules/umzug/node_modules/lodash/_metaMap.js b/node_modules/umzug/node_modules/lodash/_metaMap.js new file mode 100644 index 0000000..0157a0b --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_metaMap.js @@ -0,0 +1,6 @@ +var WeakMap = require('./_WeakMap'); + +/** Used to store function metadata. */ +var metaMap = WeakMap && new WeakMap; + +module.exports = metaMap; diff --git a/node_modules/umzug/node_modules/lodash/_nativeCreate.js b/node_modules/umzug/node_modules/lodash/_nativeCreate.js new file mode 100644 index 0000000..c7aede8 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_nativeCreate.js @@ -0,0 +1,6 @@ +var getNative = require('./_getNative'); + +/* Built-in method references that are verified to be native. */ +var nativeCreate = getNative(Object, 'create'); + +module.exports = nativeCreate; diff --git a/node_modules/umzug/node_modules/lodash/_nativeKeys.js b/node_modules/umzug/node_modules/lodash/_nativeKeys.js new file mode 100644 index 0000000..479a104 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_nativeKeys.js @@ -0,0 +1,6 @@ +var overArg = require('./_overArg'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeKeys = overArg(Object.keys, Object); + +module.exports = nativeKeys; diff --git a/node_modules/umzug/node_modules/lodash/_nativeKeysIn.js b/node_modules/umzug/node_modules/lodash/_nativeKeysIn.js new file mode 100644 index 0000000..00ee505 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_nativeKeysIn.js @@ -0,0 +1,20 @@ +/** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; +} + +module.exports = nativeKeysIn; diff --git a/node_modules/umzug/node_modules/lodash/_nodeUtil.js b/node_modules/umzug/node_modules/lodash/_nodeUtil.js new file mode 100644 index 0000000..14e179f --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_nodeUtil.js @@ -0,0 +1,22 @@ +var freeGlobal = require('./_freeGlobal'); + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Detect free variable `process` from Node.js. */ +var freeProcess = moduleExports && freeGlobal.process; + +/** Used to access faster Node.js helpers. */ +var nodeUtil = (function() { + try { + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} +}()); + +module.exports = nodeUtil; diff --git a/node_modules/umzug/node_modules/lodash/_objectToString.js b/node_modules/umzug/node_modules/lodash/_objectToString.js new file mode 100644 index 0000000..c614ec0 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_objectToString.js @@ -0,0 +1,22 @@ +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ +function objectToString(value) { + return nativeObjectToString.call(value); +} + +module.exports = objectToString; diff --git a/node_modules/umzug/node_modules/lodash/_overArg.js b/node_modules/umzug/node_modules/lodash/_overArg.js new file mode 100644 index 0000000..651c5c5 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_overArg.js @@ -0,0 +1,15 @@ +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +module.exports = overArg; diff --git a/node_modules/umzug/node_modules/lodash/_overRest.js b/node_modules/umzug/node_modules/lodash/_overRest.js new file mode 100644 index 0000000..c7cdef3 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_overRest.js @@ -0,0 +1,36 @@ +var apply = require('./_apply'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ +function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; +} + +module.exports = overRest; diff --git a/node_modules/umzug/node_modules/lodash/_parent.js b/node_modules/umzug/node_modules/lodash/_parent.js new file mode 100644 index 0000000..f174328 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_parent.js @@ -0,0 +1,16 @@ +var baseGet = require('./_baseGet'), + baseSlice = require('./_baseSlice'); + +/** + * Gets the parent value at `path` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} path The path to get the parent value of. + * @returns {*} Returns the parent value. + */ +function parent(object, path) { + return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); +} + +module.exports = parent; diff --git a/node_modules/umzug/node_modules/lodash/_reEscape.js b/node_modules/umzug/node_modules/lodash/_reEscape.js new file mode 100644 index 0000000..7f47eda --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_reEscape.js @@ -0,0 +1,4 @@ +/** Used to match template delimiters. */ +var reEscape = /<%-([\s\S]+?)%>/g; + +module.exports = reEscape; diff --git a/node_modules/umzug/node_modules/lodash/_reEvaluate.js b/node_modules/umzug/node_modules/lodash/_reEvaluate.js new file mode 100644 index 0000000..6adfc31 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_reEvaluate.js @@ -0,0 +1,4 @@ +/** Used to match template delimiters. */ +var reEvaluate = /<%([\s\S]+?)%>/g; + +module.exports = reEvaluate; diff --git a/node_modules/umzug/node_modules/lodash/_reInterpolate.js b/node_modules/umzug/node_modules/lodash/_reInterpolate.js new file mode 100644 index 0000000..d02ff0b --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_reInterpolate.js @@ -0,0 +1,4 @@ +/** Used to match template delimiters. */ +var reInterpolate = /<%=([\s\S]+?)%>/g; + +module.exports = reInterpolate; diff --git a/node_modules/umzug/node_modules/lodash/_realNames.js b/node_modules/umzug/node_modules/lodash/_realNames.js new file mode 100644 index 0000000..aa0d529 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_realNames.js @@ -0,0 +1,4 @@ +/** Used to lookup unminified function names. */ +var realNames = {}; + +module.exports = realNames; diff --git a/node_modules/umzug/node_modules/lodash/_reorder.js b/node_modules/umzug/node_modules/lodash/_reorder.js new file mode 100644 index 0000000..a3502b0 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_reorder.js @@ -0,0 +1,29 @@ +var copyArray = require('./_copyArray'), + isIndex = require('./_isIndex'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * Reorder `array` according to the specified indexes where the element at + * the first index is assigned as the first element, the element at + * the second index is assigned as the second element, and so on. + * + * @private + * @param {Array} array The array to reorder. + * @param {Array} indexes The arranged array indexes. + * @returns {Array} Returns `array`. + */ +function reorder(array, indexes) { + var arrLength = array.length, + length = nativeMin(indexes.length, arrLength), + oldArray = copyArray(array); + + while (length--) { + var index = indexes[length]; + array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; + } + return array; +} + +module.exports = reorder; diff --git a/node_modules/umzug/node_modules/lodash/_replaceHolders.js b/node_modules/umzug/node_modules/lodash/_replaceHolders.js new file mode 100644 index 0000000..74360ec --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_replaceHolders.js @@ -0,0 +1,29 @@ +/** Used as the internal argument placeholder. */ +var PLACEHOLDER = '__lodash_placeholder__'; + +/** + * Replaces all `placeholder` elements in `array` with an internal placeholder + * and returns an array of their indexes. + * + * @private + * @param {Array} array The array to modify. + * @param {*} placeholder The placeholder to replace. + * @returns {Array} Returns the new array of placeholder indexes. + */ +function replaceHolders(array, placeholder) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value === placeholder || value === PLACEHOLDER) { + array[index] = PLACEHOLDER; + result[resIndex++] = index; + } + } + return result; +} + +module.exports = replaceHolders; diff --git a/node_modules/umzug/node_modules/lodash/_root.js b/node_modules/umzug/node_modules/lodash/_root.js new file mode 100644 index 0000000..d2852be --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_root.js @@ -0,0 +1,9 @@ +var freeGlobal = require('./_freeGlobal'); + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +module.exports = root; diff --git a/node_modules/umzug/node_modules/lodash/_setCacheAdd.js b/node_modules/umzug/node_modules/lodash/_setCacheAdd.js new file mode 100644 index 0000000..1081a74 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_setCacheAdd.js @@ -0,0 +1,19 @@ +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ +function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; +} + +module.exports = setCacheAdd; diff --git a/node_modules/umzug/node_modules/lodash/_setCacheHas.js b/node_modules/umzug/node_modules/lodash/_setCacheHas.js new file mode 100644 index 0000000..9a49255 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_setCacheHas.js @@ -0,0 +1,14 @@ +/** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ +function setCacheHas(value) { + return this.__data__.has(value); +} + +module.exports = setCacheHas; diff --git a/node_modules/umzug/node_modules/lodash/_setData.js b/node_modules/umzug/node_modules/lodash/_setData.js new file mode 100644 index 0000000..e5cf3eb --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_setData.js @@ -0,0 +1,20 @@ +var baseSetData = require('./_baseSetData'), + shortOut = require('./_shortOut'); + +/** + * Sets metadata for `func`. + * + * **Note:** If this function becomes hot, i.e. is invoked a lot in a short + * period of time, it will trip its breaker and transition to an identity + * function to avoid garbage collection pauses in V8. See + * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) + * for more details. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ +var setData = shortOut(baseSetData); + +module.exports = setData; diff --git a/node_modules/umzug/node_modules/lodash/_setToArray.js b/node_modules/umzug/node_modules/lodash/_setToArray.js new file mode 100644 index 0000000..b87f074 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_setToArray.js @@ -0,0 +1,18 @@ +/** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ +function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} + +module.exports = setToArray; diff --git a/node_modules/umzug/node_modules/lodash/_setToPairs.js b/node_modules/umzug/node_modules/lodash/_setToPairs.js new file mode 100644 index 0000000..36ad37a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_setToPairs.js @@ -0,0 +1,18 @@ +/** + * Converts `set` to its value-value pairs. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the value-value pairs. + */ +function setToPairs(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = [value, value]; + }); + return result; +} + +module.exports = setToPairs; diff --git a/node_modules/umzug/node_modules/lodash/_setToString.js b/node_modules/umzug/node_modules/lodash/_setToString.js new file mode 100644 index 0000000..6ca8419 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_setToString.js @@ -0,0 +1,14 @@ +var baseSetToString = require('./_baseSetToString'), + shortOut = require('./_shortOut'); + +/** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ +var setToString = shortOut(baseSetToString); + +module.exports = setToString; diff --git a/node_modules/umzug/node_modules/lodash/_setWrapToString.js b/node_modules/umzug/node_modules/lodash/_setWrapToString.js new file mode 100644 index 0000000..decdc44 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_setWrapToString.js @@ -0,0 +1,21 @@ +var getWrapDetails = require('./_getWrapDetails'), + insertWrapDetails = require('./_insertWrapDetails'), + setToString = require('./_setToString'), + updateWrapDetails = require('./_updateWrapDetails'); + +/** + * Sets the `toString` method of `wrapper` to mimic the source of `reference` + * with wrapper details in a comment at the top of the source body. + * + * @private + * @param {Function} wrapper The function to modify. + * @param {Function} reference The reference function. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Function} Returns `wrapper`. + */ +function setWrapToString(wrapper, reference, bitmask) { + var source = (reference + ''); + return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); +} + +module.exports = setWrapToString; diff --git a/node_modules/umzug/node_modules/lodash/_shortOut.js b/node_modules/umzug/node_modules/lodash/_shortOut.js new file mode 100644 index 0000000..3300a07 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_shortOut.js @@ -0,0 +1,37 @@ +/** Used to detect hot functions by number of calls within a span of milliseconds. */ +var HOT_COUNT = 800, + HOT_SPAN = 16; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeNow = Date.now; + +/** + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. + * + * @private + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. + */ +function shortOut(func) { + var count = 0, + lastCalled = 0; + + return function() { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined, arguments); + }; +} + +module.exports = shortOut; diff --git a/node_modules/umzug/node_modules/lodash/_shuffleSelf.js b/node_modules/umzug/node_modules/lodash/_shuffleSelf.js new file mode 100644 index 0000000..8bcc4f5 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_shuffleSelf.js @@ -0,0 +1,28 @@ +var baseRandom = require('./_baseRandom'); + +/** + * A specialized version of `_.shuffle` which mutates and sets the size of `array`. + * + * @private + * @param {Array} array The array to shuffle. + * @param {number} [size=array.length] The size of `array`. + * @returns {Array} Returns `array`. + */ +function shuffleSelf(array, size) { + var index = -1, + length = array.length, + lastIndex = length - 1; + + size = size === undefined ? length : size; + while (++index < size) { + var rand = baseRandom(index, lastIndex), + value = array[rand]; + + array[rand] = array[index]; + array[index] = value; + } + array.length = size; + return array; +} + +module.exports = shuffleSelf; diff --git a/node_modules/umzug/node_modules/lodash/_stackClear.js b/node_modules/umzug/node_modules/lodash/_stackClear.js new file mode 100644 index 0000000..ce8e5a9 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_stackClear.js @@ -0,0 +1,15 @@ +var ListCache = require('./_ListCache'); + +/** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ +function stackClear() { + this.__data__ = new ListCache; + this.size = 0; +} + +module.exports = stackClear; diff --git a/node_modules/umzug/node_modules/lodash/_stackDelete.js b/node_modules/umzug/node_modules/lodash/_stackDelete.js new file mode 100644 index 0000000..ff9887a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_stackDelete.js @@ -0,0 +1,18 @@ +/** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + + this.size = data.size; + return result; +} + +module.exports = stackDelete; diff --git a/node_modules/umzug/node_modules/lodash/_stackGet.js b/node_modules/umzug/node_modules/lodash/_stackGet.js new file mode 100644 index 0000000..1cdf004 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_stackGet.js @@ -0,0 +1,14 @@ +/** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function stackGet(key) { + return this.__data__.get(key); +} + +module.exports = stackGet; diff --git a/node_modules/umzug/node_modules/lodash/_stackHas.js b/node_modules/umzug/node_modules/lodash/_stackHas.js new file mode 100644 index 0000000..16a3ad1 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_stackHas.js @@ -0,0 +1,14 @@ +/** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function stackHas(key) { + return this.__data__.has(key); +} + +module.exports = stackHas; diff --git a/node_modules/umzug/node_modules/lodash/_stackSet.js b/node_modules/umzug/node_modules/lodash/_stackSet.js new file mode 100644 index 0000000..b790ac5 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_stackSet.js @@ -0,0 +1,34 @@ +var ListCache = require('./_ListCache'), + Map = require('./_Map'), + MapCache = require('./_MapCache'); + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ +function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; +} + +module.exports = stackSet; diff --git a/node_modules/umzug/node_modules/lodash/_strictIndexOf.js b/node_modules/umzug/node_modules/lodash/_strictIndexOf.js new file mode 100644 index 0000000..0486a49 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_strictIndexOf.js @@ -0,0 +1,23 @@ +/** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; +} + +module.exports = strictIndexOf; diff --git a/node_modules/umzug/node_modules/lodash/_strictLastIndexOf.js b/node_modules/umzug/node_modules/lodash/_strictLastIndexOf.js new file mode 100644 index 0000000..d7310dc --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_strictLastIndexOf.js @@ -0,0 +1,21 @@ +/** + * A specialized version of `_.lastIndexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function strictLastIndexOf(array, value, fromIndex) { + var index = fromIndex + 1; + while (index--) { + if (array[index] === value) { + return index; + } + } + return index; +} + +module.exports = strictLastIndexOf; diff --git a/node_modules/umzug/node_modules/lodash/_stringSize.js b/node_modules/umzug/node_modules/lodash/_stringSize.js new file mode 100644 index 0000000..17ef462 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_stringSize.js @@ -0,0 +1,18 @@ +var asciiSize = require('./_asciiSize'), + hasUnicode = require('./_hasUnicode'), + unicodeSize = require('./_unicodeSize'); + +/** + * Gets the number of symbols in `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the string size. + */ +function stringSize(string) { + return hasUnicode(string) + ? unicodeSize(string) + : asciiSize(string); +} + +module.exports = stringSize; diff --git a/node_modules/umzug/node_modules/lodash/_stringToArray.js b/node_modules/umzug/node_modules/lodash/_stringToArray.js new file mode 100644 index 0000000..d161158 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_stringToArray.js @@ -0,0 +1,18 @@ +var asciiToArray = require('./_asciiToArray'), + hasUnicode = require('./_hasUnicode'), + unicodeToArray = require('./_unicodeToArray'); + +/** + * Converts `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function stringToArray(string) { + return hasUnicode(string) + ? unicodeToArray(string) + : asciiToArray(string); +} + +module.exports = stringToArray; diff --git a/node_modules/umzug/node_modules/lodash/_stringToPath.js b/node_modules/umzug/node_modules/lodash/_stringToPath.js new file mode 100644 index 0000000..db7b0f7 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_stringToPath.js @@ -0,0 +1,28 @@ +var memoizeCapped = require('./_memoizeCapped'); + +/** Used to match property names within property paths. */ +var reLeadingDot = /^\./, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; + +/** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ +var stringToPath = memoizeCapped(function(string) { + var result = []; + if (reLeadingDot.test(string)) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, string) { + result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +}); + +module.exports = stringToPath; diff --git a/node_modules/umzug/node_modules/lodash/_toKey.js b/node_modules/umzug/node_modules/lodash/_toKey.js new file mode 100644 index 0000000..c6d645c --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_toKey.js @@ -0,0 +1,21 @@ +var isSymbol = require('./isSymbol'); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +module.exports = toKey; diff --git a/node_modules/umzug/node_modules/lodash/_toSource.js b/node_modules/umzug/node_modules/lodash/_toSource.js new file mode 100644 index 0000000..a020b38 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_toSource.js @@ -0,0 +1,26 @@ +/** Used for built-in method references. */ +var funcProto = Function.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +module.exports = toSource; diff --git a/node_modules/umzug/node_modules/lodash/_unescapeHtmlChar.js b/node_modules/umzug/node_modules/lodash/_unescapeHtmlChar.js new file mode 100644 index 0000000..a71fecb --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_unescapeHtmlChar.js @@ -0,0 +1,21 @@ +var basePropertyOf = require('./_basePropertyOf'); + +/** Used to map HTML entities to characters. */ +var htmlUnescapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'" +}; + +/** + * Used by `_.unescape` to convert HTML entities to characters. + * + * @private + * @param {string} chr The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ +var unescapeHtmlChar = basePropertyOf(htmlUnescapes); + +module.exports = unescapeHtmlChar; diff --git a/node_modules/umzug/node_modules/lodash/_unicodeSize.js b/node_modules/umzug/node_modules/lodash/_unicodeSize.js new file mode 100644 index 0000000..68137ec --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_unicodeSize.js @@ -0,0 +1,44 @@ +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsAstral = '[' + rsAstralRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsZWJ = '\\u200d'; + +/** Used to compose unicode regexes. */ +var reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + +/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ +var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + +/** + * Gets the size of a Unicode `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ +function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; + } + return result; +} + +module.exports = unicodeSize; diff --git a/node_modules/umzug/node_modules/lodash/_unicodeToArray.js b/node_modules/umzug/node_modules/lodash/_unicodeToArray.js new file mode 100644 index 0000000..2a725c0 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_unicodeToArray.js @@ -0,0 +1,40 @@ +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsAstral = '[' + rsAstralRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsZWJ = '\\u200d'; + +/** Used to compose unicode regexes. */ +var reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + +/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ +var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + +/** + * Converts a Unicode `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function unicodeToArray(string) { + return string.match(reUnicode) || []; +} + +module.exports = unicodeToArray; diff --git a/node_modules/umzug/node_modules/lodash/_unicodeWords.js b/node_modules/umzug/node_modules/lodash/_unicodeWords.js new file mode 100644 index 0000000..d8b822a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_unicodeWords.js @@ -0,0 +1,69 @@ +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsDingbatRange = '\\u2700-\\u27bf', + rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', + rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', + rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', + rsPunctuationRange = '\\u2000-\\u206f', + 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', + rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', + rsVarRange = '\\ufe0e\\ufe0f', + rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; + +/** Used to compose unicode capture groups. */ +var rsApos = "['\u2019]", + rsBreak = '[' + rsBreakRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsDigits = '\\d+', + rsDingbat = '[' + rsDingbatRange + ']', + rsLower = '[' + rsLowerRange + ']', + rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsUpper = '[' + rsUpperRange + ']', + rsZWJ = '\\u200d'; + +/** Used to compose unicode regexes. */ +var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', + rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', + rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', + rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', + reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsOrdLower = '\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)', + rsOrdUpper = '\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq; + +/** Used to match complex or compound words. */ +var reUnicodeWord = RegExp([ + rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', + rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', + rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, + rsUpper + '+' + rsOptContrUpper, + rsOrdUpper, + rsOrdLower, + rsDigits, + rsEmoji +].join('|'), 'g'); + +/** + * Splits a Unicode `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ +function unicodeWords(string) { + return string.match(reUnicodeWord) || []; +} + +module.exports = unicodeWords; diff --git a/node_modules/umzug/node_modules/lodash/_updateWrapDetails.js b/node_modules/umzug/node_modules/lodash/_updateWrapDetails.js new file mode 100644 index 0000000..8759fbd --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_updateWrapDetails.js @@ -0,0 +1,46 @@ +var arrayEach = require('./_arrayEach'), + arrayIncludes = require('./_arrayIncludes'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256, + WRAP_FLIP_FLAG = 512; + +/** Used to associate wrap methods with their bit flags. */ +var wrapFlags = [ + ['ary', WRAP_ARY_FLAG], + ['bind', WRAP_BIND_FLAG], + ['bindKey', WRAP_BIND_KEY_FLAG], + ['curry', WRAP_CURRY_FLAG], + ['curryRight', WRAP_CURRY_RIGHT_FLAG], + ['flip', WRAP_FLIP_FLAG], + ['partial', WRAP_PARTIAL_FLAG], + ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], + ['rearg', WRAP_REARG_FLAG] +]; + +/** + * Updates wrapper `details` based on `bitmask` flags. + * + * @private + * @returns {Array} details The details to modify. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Array} Returns `details`. + */ +function updateWrapDetails(details, bitmask) { + arrayEach(wrapFlags, function(pair) { + var value = '_.' + pair[0]; + if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { + details.push(value); + } + }); + return details.sort(); +} + +module.exports = updateWrapDetails; diff --git a/node_modules/umzug/node_modules/lodash/_wrapperClone.js b/node_modules/umzug/node_modules/lodash/_wrapperClone.js new file mode 100644 index 0000000..7bb58a2 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/_wrapperClone.js @@ -0,0 +1,23 @@ +var LazyWrapper = require('./_LazyWrapper'), + LodashWrapper = require('./_LodashWrapper'), + copyArray = require('./_copyArray'); + +/** + * Creates a clone of `wrapper`. + * + * @private + * @param {Object} wrapper The wrapper to clone. + * @returns {Object} Returns the cloned wrapper. + */ +function wrapperClone(wrapper) { + if (wrapper instanceof LazyWrapper) { + return wrapper.clone(); + } + var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); + result.__actions__ = copyArray(wrapper.__actions__); + result.__index__ = wrapper.__index__; + result.__values__ = wrapper.__values__; + return result; +} + +module.exports = wrapperClone; diff --git a/node_modules/umzug/node_modules/lodash/add.js b/node_modules/umzug/node_modules/lodash/add.js new file mode 100644 index 0000000..f069515 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/add.js @@ -0,0 +1,22 @@ +var createMathOperation = require('./_createMathOperation'); + +/** + * Adds two numbers. + * + * @static + * @memberOf _ + * @since 3.4.0 + * @category Math + * @param {number} augend The first number in an addition. + * @param {number} addend The second number in an addition. + * @returns {number} Returns the total. + * @example + * + * _.add(6, 4); + * // => 10 + */ +var add = createMathOperation(function(augend, addend) { + return augend + addend; +}, 0); + +module.exports = add; diff --git a/node_modules/umzug/node_modules/lodash/after.js b/node_modules/umzug/node_modules/lodash/after.js new file mode 100644 index 0000000..3900c97 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/after.js @@ -0,0 +1,42 @@ +var toInteger = require('./toInteger'); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * The opposite of `_.before`; this method creates a function that invokes + * `func` once it's called `n` or more times. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {number} n The number of calls before `func` is invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => Logs 'done saving!' after the two async saves have completed. + */ +function after(n, func) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; +} + +module.exports = after; diff --git a/node_modules/umzug/node_modules/lodash/array.js b/node_modules/umzug/node_modules/lodash/array.js new file mode 100644 index 0000000..af688d3 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/array.js @@ -0,0 +1,67 @@ +module.exports = { + 'chunk': require('./chunk'), + 'compact': require('./compact'), + 'concat': require('./concat'), + 'difference': require('./difference'), + 'differenceBy': require('./differenceBy'), + 'differenceWith': require('./differenceWith'), + 'drop': require('./drop'), + 'dropRight': require('./dropRight'), + 'dropRightWhile': require('./dropRightWhile'), + 'dropWhile': require('./dropWhile'), + 'fill': require('./fill'), + 'findIndex': require('./findIndex'), + 'findLastIndex': require('./findLastIndex'), + 'first': require('./first'), + 'flatten': require('./flatten'), + 'flattenDeep': require('./flattenDeep'), + 'flattenDepth': require('./flattenDepth'), + 'fromPairs': require('./fromPairs'), + 'head': require('./head'), + 'indexOf': require('./indexOf'), + 'initial': require('./initial'), + 'intersection': require('./intersection'), + 'intersectionBy': require('./intersectionBy'), + 'intersectionWith': require('./intersectionWith'), + 'join': require('./join'), + 'last': require('./last'), + 'lastIndexOf': require('./lastIndexOf'), + 'nth': require('./nth'), + 'pull': require('./pull'), + 'pullAll': require('./pullAll'), + 'pullAllBy': require('./pullAllBy'), + 'pullAllWith': require('./pullAllWith'), + 'pullAt': require('./pullAt'), + 'remove': require('./remove'), + 'reverse': require('./reverse'), + 'slice': require('./slice'), + 'sortedIndex': require('./sortedIndex'), + 'sortedIndexBy': require('./sortedIndexBy'), + 'sortedIndexOf': require('./sortedIndexOf'), + 'sortedLastIndex': require('./sortedLastIndex'), + 'sortedLastIndexBy': require('./sortedLastIndexBy'), + 'sortedLastIndexOf': require('./sortedLastIndexOf'), + 'sortedUniq': require('./sortedUniq'), + 'sortedUniqBy': require('./sortedUniqBy'), + 'tail': require('./tail'), + 'take': require('./take'), + 'takeRight': require('./takeRight'), + 'takeRightWhile': require('./takeRightWhile'), + 'takeWhile': require('./takeWhile'), + 'union': require('./union'), + 'unionBy': require('./unionBy'), + 'unionWith': require('./unionWith'), + 'uniq': require('./uniq'), + 'uniqBy': require('./uniqBy'), + 'uniqWith': require('./uniqWith'), + 'unzip': require('./unzip'), + 'unzipWith': require('./unzipWith'), + 'without': require('./without'), + 'xor': require('./xor'), + 'xorBy': require('./xorBy'), + 'xorWith': require('./xorWith'), + 'zip': require('./zip'), + 'zipObject': require('./zipObject'), + 'zipObjectDeep': require('./zipObjectDeep'), + 'zipWith': require('./zipWith') +}; diff --git a/node_modules/umzug/node_modules/lodash/ary.js b/node_modules/umzug/node_modules/lodash/ary.js new file mode 100644 index 0000000..70c87d0 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/ary.js @@ -0,0 +1,29 @@ +var createWrap = require('./_createWrap'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_ARY_FLAG = 128; + +/** + * Creates a function that invokes `func`, with up to `n` arguments, + * ignoring any additional arguments. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @param {number} [n=func.length] The arity cap. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.ary(parseInt, 1)); + * // => [6, 8, 10] + */ +function ary(func, n, guard) { + n = guard ? undefined : n; + n = (func && n == null) ? func.length : n; + return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); +} + +module.exports = ary; diff --git a/node_modules/umzug/node_modules/lodash/assign.js b/node_modules/umzug/node_modules/lodash/assign.js new file mode 100644 index 0000000..909db26 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/assign.js @@ -0,0 +1,58 @@ +var assignValue = require('./_assignValue'), + copyObject = require('./_copyObject'), + createAssigner = require('./_createAssigner'), + isArrayLike = require('./isArrayLike'), + isPrototype = require('./_isPrototype'), + keys = require('./keys'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Assigns own enumerable string keyed properties of source objects to the + * destination object. Source objects are applied from left to right. + * Subsequent sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assignIn + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } + */ +var assign = createAssigner(function(object, source) { + if (isPrototype(source) || isArrayLike(source)) { + copyObject(source, keys(source), object); + return; + } + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + assignValue(object, key, source[key]); + } + } +}); + +module.exports = assign; diff --git a/node_modules/umzug/node_modules/lodash/assignIn.js b/node_modules/umzug/node_modules/lodash/assignIn.js new file mode 100644 index 0000000..e663473 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/assignIn.js @@ -0,0 +1,40 @@ +var copyObject = require('./_copyObject'), + createAssigner = require('./_createAssigner'), + keysIn = require('./keysIn'); + +/** + * This method is like `_.assign` except that it iterates over own and + * inherited source properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assign + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } + */ +var assignIn = createAssigner(function(object, source) { + copyObject(source, keysIn(source), object); +}); + +module.exports = assignIn; diff --git a/node_modules/umzug/node_modules/lodash/assignInWith.js b/node_modules/umzug/node_modules/lodash/assignInWith.js new file mode 100644 index 0000000..68fcc0b --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/assignInWith.js @@ -0,0 +1,38 @@ +var copyObject = require('./_copyObject'), + createAssigner = require('./_createAssigner'), + keysIn = require('./keysIn'); + +/** + * This method is like `_.assignIn` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extendWith + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignInWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ +var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keysIn(source), object, customizer); +}); + +module.exports = assignInWith; diff --git a/node_modules/umzug/node_modules/lodash/assignWith.js b/node_modules/umzug/node_modules/lodash/assignWith.js new file mode 100644 index 0000000..7dc6c76 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/assignWith.js @@ -0,0 +1,37 @@ +var copyObject = require('./_copyObject'), + createAssigner = require('./_createAssigner'), + keys = require('./keys'); + +/** + * This method is like `_.assign` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignInWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ +var assignWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keys(source), object, customizer); +}); + +module.exports = assignWith; diff --git a/node_modules/umzug/node_modules/lodash/at.js b/node_modules/umzug/node_modules/lodash/at.js new file mode 100644 index 0000000..781ee9e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/at.js @@ -0,0 +1,23 @@ +var baseAt = require('./_baseAt'), + flatRest = require('./_flatRest'); + +/** + * Creates an array of values corresponding to `paths` of `object`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Array} Returns the picked values. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _.at(object, ['a[0].b.c', 'a[1]']); + * // => [3, 4] + */ +var at = flatRest(baseAt); + +module.exports = at; diff --git a/node_modules/umzug/node_modules/lodash/attempt.js b/node_modules/umzug/node_modules/lodash/attempt.js new file mode 100644 index 0000000..624d015 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/attempt.js @@ -0,0 +1,35 @@ +var apply = require('./_apply'), + baseRest = require('./_baseRest'), + isError = require('./isError'); + +/** + * Attempts to invoke `func`, returning either the result or the caught error + * object. Any additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {Function} func The function to attempt. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {*} Returns the `func` result or error object. + * @example + * + * // Avoid throwing errors for invalid selectors. + * var elements = _.attempt(function(selector) { + * return document.querySelectorAll(selector); + * }, '>_>'); + * + * if (_.isError(elements)) { + * elements = []; + * } + */ +var attempt = baseRest(function(func, args) { + try { + return apply(func, undefined, args); + } catch (e) { + return isError(e) ? e : new Error(e); + } +}); + +module.exports = attempt; diff --git a/node_modules/umzug/node_modules/lodash/before.js b/node_modules/umzug/node_modules/lodash/before.js new file mode 100644 index 0000000..a3e0a16 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/before.js @@ -0,0 +1,40 @@ +var toInteger = require('./toInteger'); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it's called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery(element).on('click', _.before(5, addContactToList)); + * // => Allows adding up to 4 contacts to the list. + */ +function before(n, func) { + var result; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; +} + +module.exports = before; diff --git a/node_modules/umzug/node_modules/lodash/bind.js b/node_modules/umzug/node_modules/lodash/bind.js new file mode 100644 index 0000000..b1076e9 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/bind.js @@ -0,0 +1,57 @@ +var baseRest = require('./_baseRest'), + createWrap = require('./_createWrap'), + getHolder = require('./_getHolder'), + replaceHolders = require('./_replaceHolders'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_PARTIAL_FLAG = 32; + +/** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and `partials` prepended to the arguments it receives. + * + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * function greet(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // Bound with placeholders. + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ +var bind = baseRest(function(func, thisArg, partials) { + var bitmask = WRAP_BIND_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bind)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(func, bitmask, thisArg, partials, holders); +}); + +// Assign default placeholders. +bind.placeholder = {}; + +module.exports = bind; diff --git a/node_modules/umzug/node_modules/lodash/bindAll.js b/node_modules/umzug/node_modules/lodash/bindAll.js new file mode 100644 index 0000000..a35706d --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/bindAll.js @@ -0,0 +1,41 @@ +var arrayEach = require('./_arrayEach'), + baseAssignValue = require('./_baseAssignValue'), + bind = require('./bind'), + flatRest = require('./_flatRest'), + toKey = require('./_toKey'); + +/** + * Binds methods of an object to the object itself, overwriting the existing + * method. + * + * **Note:** This method doesn't set the "length" property of bound functions. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {Object} object The object to bind and assign the bound methods to. + * @param {...(string|string[])} methodNames The object method names to bind. + * @returns {Object} Returns `object`. + * @example + * + * var view = { + * 'label': 'docs', + * 'click': function() { + * console.log('clicked ' + this.label); + * } + * }; + * + * _.bindAll(view, ['click']); + * jQuery(element).on('click', view.click); + * // => Logs 'clicked docs' when clicked. + */ +var bindAll = flatRest(function(object, methodNames) { + arrayEach(methodNames, function(key) { + key = toKey(key); + baseAssignValue(object, key, bind(object[key], object)); + }); + return object; +}); + +module.exports = bindAll; diff --git a/node_modules/umzug/node_modules/lodash/bindKey.js b/node_modules/umzug/node_modules/lodash/bindKey.js new file mode 100644 index 0000000..f7fd64c --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/bindKey.js @@ -0,0 +1,68 @@ +var baseRest = require('./_baseRest'), + createWrap = require('./_createWrap'), + getHolder = require('./_getHolder'), + replaceHolders = require('./_replaceHolders'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_PARTIAL_FLAG = 32; + +/** + * Creates a function that invokes the method at `object[key]` with `partials` + * prepended to the arguments it receives. + * + * This method differs from `_.bind` by allowing bound functions to reference + * methods that may be redefined or don't yet exist. See + * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) + * for more details. + * + * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Function + * @param {Object} object The object to invoke the method on. + * @param {string} key The key of the method. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'user': 'fred', + * 'greet': function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * }; + * + * var bound = _.bindKey(object, 'greet', 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * object.greet = function(greeting, punctuation) { + * return greeting + 'ya ' + this.user + punctuation; + * }; + * + * bound('!'); + * // => 'hiya fred!' + * + * // Bound with placeholders. + * var bound = _.bindKey(object, 'greet', _, '!'); + * bound('hi'); + * // => 'hiya fred!' + */ +var bindKey = baseRest(function(object, key, partials) { + var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bindKey)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(key, bitmask, object, partials, holders); +}); + +// Assign default placeholders. +bindKey.placeholder = {}; + +module.exports = bindKey; diff --git a/node_modules/umzug/node_modules/lodash/camelCase.js b/node_modules/umzug/node_modules/lodash/camelCase.js new file mode 100644 index 0000000..d7390de --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/camelCase.js @@ -0,0 +1,29 @@ +var capitalize = require('./capitalize'), + createCompounder = require('./_createCompounder'); + +/** + * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the camel cased string. + * @example + * + * _.camelCase('Foo Bar'); + * // => 'fooBar' + * + * _.camelCase('--foo-bar--'); + * // => 'fooBar' + * + * _.camelCase('__FOO_BAR__'); + * // => 'fooBar' + */ +var camelCase = createCompounder(function(result, word, index) { + word = word.toLowerCase(); + return result + (index ? capitalize(word) : word); +}); + +module.exports = camelCase; diff --git a/node_modules/umzug/node_modules/lodash/capitalize.js b/node_modules/umzug/node_modules/lodash/capitalize.js new file mode 100644 index 0000000..3e1600e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/capitalize.js @@ -0,0 +1,23 @@ +var toString = require('./toString'), + upperFirst = require('./upperFirst'); + +/** + * Converts the first character of `string` to upper case and the remaining + * to lower case. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to capitalize. + * @returns {string} Returns the capitalized string. + * @example + * + * _.capitalize('FRED'); + * // => 'Fred' + */ +function capitalize(string) { + return upperFirst(toString(string).toLowerCase()); +} + +module.exports = capitalize; diff --git a/node_modules/umzug/node_modules/lodash/castArray.js b/node_modules/umzug/node_modules/lodash/castArray.js new file mode 100644 index 0000000..e470bdb --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/castArray.js @@ -0,0 +1,44 @@ +var isArray = require('./isArray'); + +/** + * Casts `value` as an array if it's not one. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Lang + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast array. + * @example + * + * _.castArray(1); + * // => [1] + * + * _.castArray({ 'a': 1 }); + * // => [{ 'a': 1 }] + * + * _.castArray('abc'); + * // => ['abc'] + * + * _.castArray(null); + * // => [null] + * + * _.castArray(undefined); + * // => [undefined] + * + * _.castArray(); + * // => [] + * + * var array = [1, 2, 3]; + * console.log(_.castArray(array) === array); + * // => true + */ +function castArray() { + if (!arguments.length) { + return []; + } + var value = arguments[0]; + return isArray(value) ? value : [value]; +} + +module.exports = castArray; diff --git a/node_modules/umzug/node_modules/lodash/ceil.js b/node_modules/umzug/node_modules/lodash/ceil.js new file mode 100644 index 0000000..56c8722 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/ceil.js @@ -0,0 +1,26 @@ +var createRound = require('./_createRound'); + +/** + * Computes `number` rounded up to `precision`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Math + * @param {number} number The number to round up. + * @param {number} [precision=0] The precision to round up to. + * @returns {number} Returns the rounded up number. + * @example + * + * _.ceil(4.006); + * // => 5 + * + * _.ceil(6.004, 2); + * // => 6.01 + * + * _.ceil(6040, -2); + * // => 6100 + */ +var ceil = createRound('ceil'); + +module.exports = ceil; diff --git a/node_modules/umzug/node_modules/lodash/chain.js b/node_modules/umzug/node_modules/lodash/chain.js new file mode 100644 index 0000000..f6cd647 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/chain.js @@ -0,0 +1,38 @@ +var lodash = require('./wrapperLodash'); + +/** + * Creates a `lodash` wrapper instance that wraps `value` with explicit method + * chain sequences enabled. The result of such sequences must be unwrapped + * with `_#value`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Seq + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _ + * .chain(users) + * .sortBy('age') + * .map(function(o) { + * return o.user + ' is ' + o.age; + * }) + * .head() + * .value(); + * // => 'pebbles is 1' + */ +function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; +} + +module.exports = chain; diff --git a/node_modules/umzug/node_modules/lodash/chunk.js b/node_modules/umzug/node_modules/lodash/chunk.js new file mode 100644 index 0000000..5b562fe --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/chunk.js @@ -0,0 +1,50 @@ +var baseSlice = require('./_baseSlice'), + isIterateeCall = require('./_isIterateeCall'), + toInteger = require('./toInteger'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil, + nativeMax = Math.max; + +/** + * Creates an array of elements split into groups the length of `size`. + * If `array` can't be split evenly, the final chunk will be the remaining + * elements. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to process. + * @param {number} [size=1] The length of each chunk + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the new array of chunks. + * @example + * + * _.chunk(['a', 'b', 'c', 'd'], 2); + * // => [['a', 'b'], ['c', 'd']] + * + * _.chunk(['a', 'b', 'c', 'd'], 3); + * // => [['a', 'b', 'c'], ['d']] + */ +function chunk(array, size, guard) { + if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) { + size = 1; + } else { + size = nativeMax(toInteger(size), 0); + } + var length = array == null ? 0 : array.length; + if (!length || size < 1) { + return []; + } + var index = 0, + resIndex = 0, + result = Array(nativeCeil(length / size)); + + while (index < length) { + result[resIndex++] = baseSlice(array, index, (index += size)); + } + return result; +} + +module.exports = chunk; diff --git a/node_modules/umzug/node_modules/lodash/clamp.js b/node_modules/umzug/node_modules/lodash/clamp.js new file mode 100644 index 0000000..91a72c9 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/clamp.js @@ -0,0 +1,39 @@ +var baseClamp = require('./_baseClamp'), + toNumber = require('./toNumber'); + +/** + * Clamps `number` within the inclusive `lower` and `upper` bounds. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Number + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + * @example + * + * _.clamp(-10, -5, 5); + * // => -5 + * + * _.clamp(10, -5, 5); + * // => 5 + */ +function clamp(number, lower, upper) { + if (upper === undefined) { + upper = lower; + lower = undefined; + } + if (upper !== undefined) { + upper = toNumber(upper); + upper = upper === upper ? upper : 0; + } + if (lower !== undefined) { + lower = toNumber(lower); + lower = lower === lower ? lower : 0; + } + return baseClamp(toNumber(number), lower, upper); +} + +module.exports = clamp; diff --git a/node_modules/umzug/node_modules/lodash/clone.js b/node_modules/umzug/node_modules/lodash/clone.js new file mode 100644 index 0000000..dd439d6 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/clone.js @@ -0,0 +1,36 @@ +var baseClone = require('./_baseClone'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_SYMBOLS_FLAG = 4; + +/** + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true + */ +function clone(value) { + return baseClone(value, CLONE_SYMBOLS_FLAG); +} + +module.exports = clone; diff --git a/node_modules/umzug/node_modules/lodash/cloneDeep.js b/node_modules/umzug/node_modules/lodash/cloneDeep.js new file mode 100644 index 0000000..4425fbe --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/cloneDeep.js @@ -0,0 +1,29 @@ +var baseClone = require('./_baseClone'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_SYMBOLS_FLAG = 4; + +/** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ +function cloneDeep(value) { + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); +} + +module.exports = cloneDeep; diff --git a/node_modules/umzug/node_modules/lodash/cloneDeepWith.js b/node_modules/umzug/node_modules/lodash/cloneDeepWith.js new file mode 100644 index 0000000..fd9c6c0 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/cloneDeepWith.js @@ -0,0 +1,40 @@ +var baseClone = require('./_baseClone'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_SYMBOLS_FLAG = 4; + +/** + * This method is like `_.cloneWith` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the deep cloned value. + * @see _.cloneWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(true); + * } + * } + * + * var el = _.cloneDeepWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 20 + */ +function cloneDeepWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); +} + +module.exports = cloneDeepWith; diff --git a/node_modules/umzug/node_modules/lodash/cloneWith.js b/node_modules/umzug/node_modules/lodash/cloneWith.js new file mode 100644 index 0000000..d2f4e75 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/cloneWith.js @@ -0,0 +1,42 @@ +var baseClone = require('./_baseClone'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_SYMBOLS_FLAG = 4; + +/** + * This method is like `_.clone` except that it accepts `customizer` which + * is invoked to produce the cloned value. If `customizer` returns `undefined`, + * cloning is handled by the method instead. The `customizer` is invoked with + * up to four arguments; (value [, index|key, object, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the cloned value. + * @see _.cloneDeepWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(false); + * } + * } + * + * var el = _.cloneWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 0 + */ +function cloneWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); +} + +module.exports = cloneWith; diff --git a/node_modules/umzug/node_modules/lodash/collection.js b/node_modules/umzug/node_modules/lodash/collection.js new file mode 100644 index 0000000..77fe837 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/collection.js @@ -0,0 +1,30 @@ +module.exports = { + 'countBy': require('./countBy'), + 'each': require('./each'), + 'eachRight': require('./eachRight'), + 'every': require('./every'), + 'filter': require('./filter'), + 'find': require('./find'), + 'findLast': require('./findLast'), + 'flatMap': require('./flatMap'), + 'flatMapDeep': require('./flatMapDeep'), + 'flatMapDepth': require('./flatMapDepth'), + 'forEach': require('./forEach'), + 'forEachRight': require('./forEachRight'), + 'groupBy': require('./groupBy'), + 'includes': require('./includes'), + 'invokeMap': require('./invokeMap'), + 'keyBy': require('./keyBy'), + 'map': require('./map'), + 'orderBy': require('./orderBy'), + 'partition': require('./partition'), + 'reduce': require('./reduce'), + 'reduceRight': require('./reduceRight'), + 'reject': require('./reject'), + 'sample': require('./sample'), + 'sampleSize': require('./sampleSize'), + 'shuffle': require('./shuffle'), + 'size': require('./size'), + 'some': require('./some'), + 'sortBy': require('./sortBy') +}; diff --git a/node_modules/umzug/node_modules/lodash/commit.js b/node_modules/umzug/node_modules/lodash/commit.js new file mode 100644 index 0000000..fe4db71 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/commit.js @@ -0,0 +1,33 @@ +var LodashWrapper = require('./_LodashWrapper'); + +/** + * Executes the chain sequence and returns the wrapped result. + * + * @name commit + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).push(3); + * + * console.log(array); + * // => [1, 2] + * + * wrapped = wrapped.commit(); + * console.log(array); + * // => [1, 2, 3] + * + * wrapped.last(); + * // => 3 + * + * console.log(array); + * // => [1, 2, 3] + */ +function wrapperCommit() { + return new LodashWrapper(this.value(), this.__chain__); +} + +module.exports = wrapperCommit; diff --git a/node_modules/umzug/node_modules/lodash/compact.js b/node_modules/umzug/node_modules/lodash/compact.js new file mode 100644 index 0000000..031fab4 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/compact.js @@ -0,0 +1,31 @@ +/** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ +function compact(array) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result[resIndex++] = value; + } + } + return result; +} + +module.exports = compact; diff --git a/node_modules/umzug/node_modules/lodash/concat.js b/node_modules/umzug/node_modules/lodash/concat.js new file mode 100644 index 0000000..1da48a4 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/concat.js @@ -0,0 +1,43 @@ +var arrayPush = require('./_arrayPush'), + baseFlatten = require('./_baseFlatten'), + copyArray = require('./_copyArray'), + isArray = require('./isArray'); + +/** + * Creates a new array concatenating `array` with any additional arrays + * and/or values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to concatenate. + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var other = _.concat(array, 2, [3], [[4]]); + * + * console.log(other); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ +function concat() { + var length = arguments.length; + if (!length) { + return []; + } + var args = Array(length - 1), + array = arguments[0], + index = length; + + while (index--) { + args[index - 1] = arguments[index]; + } + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); +} + +module.exports = concat; diff --git a/node_modules/umzug/node_modules/lodash/cond.js b/node_modules/umzug/node_modules/lodash/cond.js new file mode 100644 index 0000000..6455598 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/cond.js @@ -0,0 +1,60 @@ +var apply = require('./_apply'), + arrayMap = require('./_arrayMap'), + baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that iterates over `pairs` and invokes the corresponding + * function of the first predicate to return truthy. The predicate-function + * pairs are invoked with the `this` binding and arguments of the created + * function. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {Array} pairs The predicate-function pairs. + * @returns {Function} Returns the new composite function. + * @example + * + * var func = _.cond([ + * [_.matches({ 'a': 1 }), _.constant('matches A')], + * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')], + * [_.stubTrue, _.constant('no match')] + * ]); + * + * func({ 'a': 1, 'b': 2 }); + * // => 'matches A' + * + * func({ 'a': 0, 'b': 1 }); + * // => 'matches B' + * + * func({ 'a': '1', 'b': '2' }); + * // => 'no match' + */ +function cond(pairs) { + var length = pairs == null ? 0 : pairs.length, + toIteratee = baseIteratee; + + pairs = !length ? [] : arrayMap(pairs, function(pair) { + if (typeof pair[1] != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return [toIteratee(pair[0]), pair[1]]; + }); + + return baseRest(function(args) { + var index = -1; + while (++index < length) { + var pair = pairs[index]; + if (apply(pair[0], this, args)) { + return apply(pair[1], this, args); + } + } + }); +} + +module.exports = cond; diff --git a/node_modules/umzug/node_modules/lodash/conforms.js b/node_modules/umzug/node_modules/lodash/conforms.js new file mode 100644 index 0000000..5501a94 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/conforms.js @@ -0,0 +1,35 @@ +var baseClone = require('./_baseClone'), + baseConforms = require('./_baseConforms'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1; + +/** + * Creates a function that invokes the predicate properties of `source` with + * the corresponding property values of a given object, returning `true` if + * all predicates return truthy, else `false`. + * + * **Note:** The created function is equivalent to `_.conformsTo` with + * `source` partially applied. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + * @example + * + * var objects = [ + * { 'a': 2, 'b': 1 }, + * { 'a': 1, 'b': 2 } + * ]; + * + * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } })); + * // => [{ 'a': 1, 'b': 2 }] + */ +function conforms(source) { + return baseConforms(baseClone(source, CLONE_DEEP_FLAG)); +} + +module.exports = conforms; diff --git a/node_modules/umzug/node_modules/lodash/conformsTo.js b/node_modules/umzug/node_modules/lodash/conformsTo.js new file mode 100644 index 0000000..b8a93eb --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/conformsTo.js @@ -0,0 +1,32 @@ +var baseConformsTo = require('./_baseConformsTo'), + keys = require('./keys'); + +/** + * Checks if `object` conforms to `source` by invoking the predicate + * properties of `source` with the corresponding property values of `object`. + * + * **Note:** This method is equivalent to `_.conforms` when `source` is + * partially applied. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); + * // => true + * + * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); + * // => false + */ +function conformsTo(object, source) { + return source == null || baseConformsTo(object, source, keys(source)); +} + +module.exports = conformsTo; diff --git a/node_modules/umzug/node_modules/lodash/constant.js b/node_modules/umzug/node_modules/lodash/constant.js new file mode 100644 index 0000000..655ece3 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/constant.js @@ -0,0 +1,26 @@ +/** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new constant function. + * @example + * + * var objects = _.times(2, _.constant({ 'a': 1 })); + * + * console.log(objects); + * // => [{ 'a': 1 }, { 'a': 1 }] + * + * console.log(objects[0] === objects[1]); + * // => true + */ +function constant(value) { + return function() { + return value; + }; +} + +module.exports = constant; diff --git a/node_modules/umzug/node_modules/lodash/core.js b/node_modules/umzug/node_modules/lodash/core.js new file mode 100644 index 0000000..88c263f --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/core.js @@ -0,0 +1,3836 @@ +/** + * @license + * Lodash (Custom Build) + * Build: `lodash core -o ./dist/lodash.core.js` + * Copyright JS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ +;(function() { + + /** Used as a safe reference for `undefined` in pre-ES5 environments. */ + var undefined; + + /** Used as the semantic version number. */ + var VERSION = '4.17.4'; + + /** Error message constants. */ + var FUNC_ERROR_TEXT = 'Expected a function'; + + /** Used to compose bitmasks for value comparisons. */ + var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + + /** Used to compose bitmasks for function metadata. */ + var WRAP_BIND_FLAG = 1, + WRAP_PARTIAL_FLAG = 32; + + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + numberTag = '[object Number]', + objectTag = '[object Object]', + proxyTag = '[object Proxy]', + regexpTag = '[object RegExp]', + stringTag = '[object String]'; + + /** Used to match HTML entities and HTML characters. */ + var reUnescapedHtml = /[&<>"']/g, + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + + /** Used to map characters to HTML entities. */ + var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' + }; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); + + /** Detect free variable `exports`. */ + var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + + /** Detect free variable `module`. */ + var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + + /*--------------------------------------------------------------------------*/ + + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + array.push.apply(array, values); + return array; + } + + /** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ + function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ + function baseValues(object, props) { + return baseMap(props, function(key) { + return object[key]; + }); + } + + /** + * Used by `_.escape` to convert characters to HTML entities. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + var escapeHtmlChar = basePropertyOf(htmlEscapes); + + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + + /*--------------------------------------------------------------------------*/ + + /** Used for built-in method references. */ + var arrayProto = Array.prototype, + objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to generate unique IDs. */ + var idCounter = 0; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** Used to restore the original `_` reference in `_.noConflict`. */ + var oldDash = root._; + + /** Built-in value references. */ + var objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeIsFinite = root.isFinite, + nativeKeys = overArg(Object.keys, Object), + nativeMax = Math.max; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object which wraps `value` to enable implicit method + * chain sequences. Methods that operate on and return arrays, collections, + * and functions can be chained together. Methods that retrieve a single value + * or may return a primitive value will automatically end the chain sequence + * and return the unwrapped value. Otherwise, the value must be unwrapped + * with `_#value`. + * + * Explicit chain sequences, which must be unwrapped with `_#value`, may be + * enabled using `_.chain`. + * + * The execution of chained methods is lazy, that is, it's deferred until + * `_#value` is implicitly or explicitly called. + * + * Lazy evaluation allows several methods to support shortcut fusion. + * Shortcut fusion is an optimization to merge iteratee calls; this avoids + * the creation of intermediate arrays and can greatly reduce the number of + * iteratee executions. Sections of a chain sequence qualify for shortcut + * fusion if the section is applied to an array and iteratees accept only + * one argument. The heuristic for whether a section qualifies for shortcut + * fusion is subject to change. + * + * Chaining is supported in custom builds as long as the `_#value` method is + * directly or indirectly included in the build. + * + * In addition to lodash methods, wrappers have `Array` and `String` methods. + * + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` + * + * The wrapper methods that support shortcut fusion are: + * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, + * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, + * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` + * + * The chainable wrapper methods are: + * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, + * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, + * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, + * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, + * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, + * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, + * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, + * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, + * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, + * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, + * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, + * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, + * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, + * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, + * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, + * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, + * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, + * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, + * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, + * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, + * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, + * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, + * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, + * `zipObject`, `zipObjectDeep`, and `zipWith` + * + * The wrapper methods that are **not** chainable by default are: + * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, + * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, + * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, + * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, + * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, + * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, + * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, + * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, + * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, + * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, + * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, + * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, + * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, + * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, + * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, + * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, + * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, + * `upperFirst`, `value`, and `words` + * + * @name _ + * @constructor + * @category Seq + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2, 3]); + * + * // Returns an unwrapped value. + * wrapped.reduce(_.add); + * // => 6 + * + * // Returns a wrapped value. + * var squares = wrapped.map(square); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ + function lodash(value) { + return value instanceof LodashWrapper + ? value + : new LodashWrapper(value); + } + + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ + var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; + }()); + + /** + * The base constructor for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable explicit method chain sequences. + */ + function LodashWrapper(value, chainAll) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__chain__ = !!chainAll; + } + + LodashWrapper.prototype = baseCreate(lodash.prototype); + LodashWrapper.prototype.constructor = LodashWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } + } + + /** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function baseAssignValue(object, key, value) { + object[key] = value; + } + + /** + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {Array} args The arguments to provide to `func`. + * @returns {number|Object} Returns the timer id or timeout object. + */ + function baseDelay(func, wait, args) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return setTimeout(function() { func.apply(undefined, args); }, wait); + } + + /** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEach = createBaseEach(baseForOwn); + + /** + * The base implementation of `_.every` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ + function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function(value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; + } + + /** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ + function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if (current != null && (computed === undefined + ? (current === current && !false) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } + } + return result; + } + + /** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; + } + + /** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ + function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + + /** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseFor = createBaseFor(); + + /** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); + } + + /** + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from `props`. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the function names. + */ + function baseFunctions(object, props) { + return baseFilter(props, function(key) { + return isFunction(object[key]); + }); + } + + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + return objectToString(value); + } + + /** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ + function baseGt(value, other) { + return value > other; + } + + /** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ + var baseIsArguments = noop; + + /** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ + function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; + } + + /** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); + } + + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : baseGetTag(object), + othTag = othIsArr ? arrayTag : baseGetTag(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + stack || (stack = []); + var objStack = find(stack, function(entry) { + return entry[0] == object; + }); + var othStack = find(stack, function(entry) { + return entry[0] == other; + }); + if (objStack && othStack) { + return objStack[1] == other; + } + stack.push([object, other]); + stack.push([other, object]); + if (isSameTag && !objIsObj) { + var result = (objIsArr) + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + stack.pop(); + return result; + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + var result = equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + stack.pop(); + return result; + } + } + if (!isSameTag) { + return false; + } + var result = equalObjects(object, other, bitmask, customizer, equalFunc, stack); + stack.pop(); + return result; + } + + /** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ + function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; + } + + /** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ + function baseIteratee(func) { + if (typeof func == 'function') { + return func; + } + if (func == null) { + return identity; + } + return (typeof func == 'object' ? baseMatches : baseProperty)(func); + } + + /** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ + function baseLt(value, other) { + return value < other; + } + + /** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; + } + + /** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatches(source) { + var props = nativeKeys(source); + return function(object) { + var length = props.length; + if (object == null) { + return !length; + } + object = Object(object); + while (length--) { + var key = props[length]; + if (!(key in object && + baseIsEqual(source[key], object[key], COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG) + )) { + return false; + } + } + return true; + }; + } + + /** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ + function basePick(object, props) { + object = Object(object); + return reduce(props, function(result, key) { + if (key in object) { + result[key] = object[key]; + } + return result; + }, {}); + } + + /** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ + function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); + } + + /** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; + } + + /** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ + function copyArray(source) { + return baseSlice(source, 0, source.length); + } + + /** + * The base implementation of `_.some` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function baseSome(collection, predicate) { + var result; + + baseEach(collection, function(value, index, collection) { + result = predicate(value, index, collection); + return !result; + }); + return !!result; + } + + /** + * The base implementation of `wrapperValue` which returns the result of + * performing a sequence of actions on the unwrapped `value`, where each + * successive action is supplied the return value of the previous. + * + * @private + * @param {*} value The unwrapped value. + * @param {Array} actions Actions to perform to resolve the unwrapped value. + * @returns {*} Returns the resolved value. + */ + function baseWrapperValue(value, actions) { + var result = value; + return reduce(actions, function(result, action) { + return action.func.apply(action.thisArg, arrayPush([result], action.args)); + }, result); + } + + /** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ + function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = false; + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = false; + + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { + return 1; + } + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { + return -1; + } + } + return 0; + } + + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ + function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; + } + + /** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ + function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); + } + + /** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; + } + + /** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + + /** + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. + */ + function createCtor(Ctor) { + return function() { + // Use a `switch` statement to work with class constructors. See + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; + } + + /** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ + function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = baseIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; + } + + /** + * Creates a function that wraps `func` to invoke it with the `this` binding + * of `thisArg` and `partials` prepended to the arguments it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} partials The arguments to prepend to those provided to + * the new function. + * @returns {Function} Returns the new wrapped function. + */ + function createPartial(func, bitmask, thisArg, partials) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var argsIndex = -1, + argsLength = arguments.length, + leftIndex = -1, + leftLength = partials.length, + args = Array(leftLength + argsLength), + fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + return fn.apply(isBind ? thisArg : this, args); + } + return wrapper; + } + + /** + * Used by `_.defaults` to customize its `_.assignIn` use to assign properties + * of source objects to the destination object for all destination properties + * that resolve to `undefined`. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to assign. + * @param {Object} object The parent object of `objValue`. + * @returns {*} Returns the value to assign. + */ + function customDefaultsAssignIn(objValue, srcValue, key, object) { + if (objValue === undefined || + (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { + return srcValue; + } + return objValue; + } + + /** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? [] : undefined; + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + var compared; + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!baseSome(other, function(othValue, othIndex) { + if (!indexOf(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + return result; + } + + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + } + return false; + } + + /** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = keys(object), + objLength = objProps.length, + othProps = keys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + var result = true; + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + var compared; + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + return result; + } + + /** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); + } + + /** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ + function isFlattenable(value) { + return isArray(value) || isArguments(value); + } + + /** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; + } + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString.call(value); + } + + /** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ + function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return func.apply(this, otherArgs); + }; + } + + /** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var setToString = identity; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ + function compact(array) { + return baseFilter(array, Boolean); + } + + /** + * Creates a new array concatenating `array` with any additional arrays + * and/or values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to concatenate. + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var other = _.concat(array, 2, [3], [[4]]); + * + * console.log(other); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ + function concat() { + var length = arguments.length; + if (!length) { + return []; + } + var args = Array(length - 1), + array = arguments[0], + index = length; + + while (index--) { + args[index - 1] = arguments[index]; + } + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); + } + + /** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ + function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, baseIteratee(predicate, 3), index); + } + + /** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ + function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; + } + + /** + * Recursively flattens `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, [3, [4]], 5]]); + * // => [1, 2, 3, 4, 5] + */ + function flattenDeep(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, INFINITY) : []; + } + + /** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias first + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.head([1, 2, 3]); + * // => 1 + * + * _.head([]); + * // => undefined + */ + function head(array) { + return (array && array.length) ? array[0] : undefined; + } + + /** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the + * offset from the end of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // Search from the `fromIndex`. + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + */ + function indexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (typeof fromIndex == 'number') { + fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex; + } else { + fromIndex = 0; + } + var index = (fromIndex || 0) - 1, + isReflexive = value === value; + + while (++index < length) { + var other = array[index]; + if ((isReflexive ? other === value : other !== other)) { + return index; + } + } + return -1; + } + + /** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ + function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; + } + + /** + * Creates a slice of `array` from `start` up to, but not including, `end`. + * + * **Note:** This method is used instead of + * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are + * returned. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function slice(array, start, end) { + var length = array == null ? 0 : array.length; + start = start == null ? 0 : +start; + end = end === undefined ? length : +end; + return length ? baseSlice(array, start, end) : []; + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` wrapper instance that wraps `value` with explicit method + * chain sequences enabled. The result of such sequences must be unwrapped + * with `_#value`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Seq + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _ + * .chain(users) + * .sortBy('age') + * .map(function(o) { + * return o.user + ' is ' + o.age; + * }) + * .head() + * .value(); + * // => 'pebbles is 1' + */ + function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; + } + + /** + * This method invokes `interceptor` and returns `value`. The interceptor + * is invoked with one argument; (value). The purpose of this method is to + * "tap into" a method chain sequence in order to modify intermediate results. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns `value`. + * @example + * + * _([1, 2, 3]) + * .tap(function(array) { + * // Mutate input array. + * array.pop(); + * }) + * .reverse() + * .value(); + * // => [2, 1] + */ + function tap(value, interceptor) { + interceptor(value); + return value; + } + + /** + * This method is like `_.tap` except that it returns the result of `interceptor`. + * The purpose of this method is to "pass thru" values replacing intermediate + * results in a method chain sequence. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns the result of `interceptor`. + * @example + * + * _(' abc ') + * .chain() + * .trim() + * .thru(function(value) { + * return [value]; + * }) + * .value(); + * // => ['abc'] + */ + function thru(value, interceptor) { + return interceptor(value); + } + + /** + * Creates a `lodash` wrapper instance with explicit method chain sequences enabled. + * + * @name chain + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * // A sequence without explicit chaining. + * _(users).head(); + * // => { 'user': 'barney', 'age': 36 } + * + * // A sequence with explicit chaining. + * _(users) + * .chain() + * .head() + * .pick('user') + * .value(); + * // => { 'user': 'barney' } + */ + function wrapperChain() { + return chain(this); + } + + /** + * Executes the chain sequence to resolve the unwrapped value. + * + * @name value + * @memberOf _ + * @since 0.1.0 + * @alias toJSON, valueOf + * @category Seq + * @returns {*} Returns the resolved unwrapped value. + * @example + * + * _([1, 2, 3]).value(); + * // => [1, 2, 3] + */ + function wrapperValue() { + return baseWrapperValue(this.__wrapped__, this.__actions__); + } + + /*------------------------------------------------------------------------*/ + + /** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * Iteration is stopped once `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.every(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.every(users, 'active'); + * // => false + */ + function every(collection, predicate, guard) { + predicate = guard ? undefined : predicate; + return baseEvery(collection, baseIteratee(predicate)); + } + + /** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + */ + function filter(collection, predicate) { + return baseFilter(collection, baseIteratee(predicate)); + } + + /** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ + var find = createFind(findIndex); + + /** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forEach(collection, iteratee) { + return baseEach(collection, baseIteratee(iteratee)); + } + + /** + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ + function map(collection, iteratee) { + return baseMap(collection, baseIteratee(iteratee)); + } + + /** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` thru `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not given, the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduceRight + * @example + * + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) + */ + function reduce(collection, iteratee, accumulator) { + return baseReduce(collection, baseIteratee(iteratee), accumulator, arguments.length < 3, baseEach); + } + + /** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable string keyed properties for objects. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the collection size. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ + function size(collection) { + if (collection == null) { + return 0; + } + collection = isArrayLike(collection) ? collection : nativeKeys(collection); + return collection.length; + } + + /** + * Checks if `predicate` returns truthy for **any** element of `collection`. + * Iteration is stopped once `predicate` returns truthy. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.some(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.some(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.some(users, 'active'); + * // => true + */ + function some(collection, predicate, guard) { + predicate = guard ? undefined : predicate; + return baseSome(collection, baseIteratee(predicate)); + } + + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection thru each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] + */ + function sortBy(collection, iteratee) { + var index = 0; + iteratee = baseIteratee(iteratee); + + return baseMap(baseMap(collection, function(value, key, collection) { + return { 'value': value, 'index': index++, 'criteria': iteratee(value, key, collection) }; + }).sort(function(object, other) { + return compareAscending(object.criteria, other.criteria) || (object.index - other.index); + }), baseProperty('value')); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it's called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery(element).on('click', _.before(5, addContactToList)); + * // => Allows adding up to 4 contacts to the list. + */ + function before(n, func) { + var result; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; + } + + /** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and `partials` prepended to the arguments it receives. + * + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * function greet(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // Bound with placeholders. + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ + var bind = baseRest(function(func, thisArg, partials) { + return createPartial(func, WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG, thisArg, partials); + }); + + /** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // => Logs 'deferred' after one millisecond. + */ + var defer = baseRest(function(func, args) { + return baseDelay(func, 1, args); + }); + + /** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => Logs 'later' after one second. + */ + var delay = baseRest(function(func, wait, args) { + return baseDelay(func, toNumber(wait) || 0, args); + }); + + /** + * Creates a function that negates the result of the predicate `func`. The + * `func` predicate is invoked with the `this` binding and arguments of the + * created function. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} predicate The predicate to negate. + * @returns {Function} Returns the new negated function. + * @example + * + * function isEven(n) { + * return n % 2 == 0; + * } + * + * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); + * // => [1, 3, 5] + */ + function negate(predicate) { + if (typeof predicate != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function() { + var args = arguments; + return !predicate.apply(this, args); + }; + } + + /** + * Creates a function that is restricted to invoking `func` once. Repeat calls + * to the function return the value of the first invocation. The `func` is + * invoked with the `this` binding and arguments of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // => `createApplication` is invoked once + */ + function once(func) { + return before(2, func); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true + */ + function clone(value) { + if (!isObject(value)) { + return value; + } + return isArray(value) ? copyArray(value) : copyObject(value, nativeKeys(value)); + } + + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + function eq(value, other) { + return value === other || (value !== value && other !== other); + } + + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); + }; + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + var isArray = Array.isArray; + + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + + /** + * Checks if `value` is classified as a boolean primitive or object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. + * @example + * + * _.isBoolean(false); + * // => true + * + * _.isBoolean(null); + * // => false + */ + function isBoolean(value) { + return value === true || value === false || + (isObjectLike(value) && baseGetTag(value) == boolTag); + } + + /** + * Checks if `value` is classified as a `Date` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + * + * _.isDate('Mon April 23 2012'); + * // => false + */ + var isDate = baseIsDate; + + /** + * Checks if `value` is an empty object, collection, map, or set. + * + * Objects are considered empty if they have no own enumerable string keyed + * properties. + * + * Array-like values such as `arguments` objects, arrays, buffers, strings, or + * jQuery-like collections are considered empty if they have a `length` of `0`. + * Similarly, maps and sets are considered empty if they have a `size` of `0`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ + function isEmpty(value) { + if (isArrayLike(value) && + (isArray(value) || isString(value) || + isFunction(value.splice) || isArguments(value))) { + return !value.length; + } + return !nativeKeys(value).length; + } + + /** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are compared by strict equality, i.e. `===`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ + function isEqual(value, other) { + return baseIsEqual(value, other); + } + + /** + * Checks if `value` is a finite primitive number. + * + * **Note:** This method is based on + * [`Number.isFinite`](https://mdn.io/Number/isFinite). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. + * @example + * + * _.isFinite(3); + * // => true + * + * _.isFinite(Number.MIN_VALUE); + * // => true + * + * _.isFinite(Infinity); + * // => false + * + * _.isFinite('3'); + * // => false + */ + function isFinite(value) { + return typeof value == 'number' && nativeIsFinite(value); + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + + /** + * Checks if `value` is `NaN`. + * + * **Note:** This method is based on + * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as + * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for + * `undefined` and other non-number values. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ + function isNaN(value) { + // An `NaN` primitive is the only value that is not equal to itself. + // Perform the `toStringTag` check first to avoid errors with some + // ActiveX objects in IE. + return isNumber(value) && value != +value; + } + + /** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(void 0); + * // => false + */ + function isNull(value) { + return value === null; + } + + /** + * Checks if `value` is classified as a `Number` primitive or object. + * + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are + * classified as numbers, use the `_.isFinite` method. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. + * @example + * + * _.isNumber(3); + * // => true + * + * _.isNumber(Number.MIN_VALUE); + * // => true + * + * _.isNumber(Infinity); + * // => true + * + * _.isNumber('3'); + * // => false + */ + function isNumber(value) { + return typeof value == 'number' || + (isObjectLike(value) && baseGetTag(value) == numberTag); + } + + /** + * Checks if `value` is classified as a `RegExp` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + * @example + * + * _.isRegExp(/abc/); + * // => true + * + * _.isRegExp('/abc/'); + * // => false + */ + var isRegExp = baseIsRegExp; + + /** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ + function isString(value) { + return typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); + } + + /** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ + function isUndefined(value) { + return value === undefined; + } + + /** + * Converts `value` to an array. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {Array} Returns the converted array. + * @example + * + * _.toArray({ 'a': 1, 'b': 2 }); + * // => [1, 2] + * + * _.toArray('abc'); + * // => ['a', 'b', 'c'] + * + * _.toArray(1); + * // => [] + * + * _.toArray(null); + * // => [] + */ + function toArray(value) { + if (!isArrayLike(value)) { + return values(value); + } + return value.length ? copyArray(value) : []; + } + + /** + * Converts `value` to an integer. + * + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ + var toInteger = Number; + + /** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ + var toNumber = Number; + + /** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ + function toString(value) { + if (typeof value == 'string') { + return value; + } + return value == null ? '' : (value + ''); + } + + /*------------------------------------------------------------------------*/ + + /** + * Assigns own enumerable string keyed properties of source objects to the + * destination object. Source objects are applied from left to right. + * Subsequent sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assignIn + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } + */ + var assign = createAssigner(function(object, source) { + copyObject(source, nativeKeys(source), object); + }); + + /** + * This method is like `_.assign` except that it iterates over own and + * inherited source properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assign + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } + */ + var assignIn = createAssigner(function(object, source) { + copyObject(source, nativeKeysIn(source), object); + }); + + /** + * This method is like `_.assignIn` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extendWith + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignInWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keysIn(source), object, customizer); + }); + + /** + * Creates an object that inherits from the `prototype` object. If a + * `properties` object is given, its own enumerable string keyed properties + * are assigned to the created object. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ + function create(prototype, properties) { + var result = baseCreate(prototype); + return properties == null ? result : assign(result, properties); + } + + /** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var defaults = baseRest(function(args) { + args.push(undefined, customDefaultsAssignIn); + return assignInWith.apply(undefined, args); + }); + + /** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ + function has(object, path) { + return object != null && hasOwnProperty.call(object, path); + } + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + var keys = nativeKeys; + + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + var keysIn = nativeKeysIn; + + /** + * Creates an object composed of the picked `object` properties. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ + var pick = flatRest(function(object, paths) { + return object == null ? {} : basePick(object, paths); + }); + + /** + * This method is like `_.get` except that if the resolved value is a + * function it's invoked with the `this` binding of its parent object and + * its result is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to resolve. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; + * + * _.result(object, 'a[0].b.c1'); + * // => 3 + * + * _.result(object, 'a[0].b.c2'); + * // => 4 + * + * _.result(object, 'a[0].b.c3', 'default'); + * // => 'default' + * + * _.result(object, 'a[0].b.c3', _.constant('default')); + * // => 'default' + */ + function result(object, path, defaultValue) { + var value = object == null ? undefined : object[path]; + if (value === undefined) { + value = defaultValue; + } + return isFunction(value) ? value.call(object) : value; + } + + /** + * Creates an array of the own enumerable string keyed property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ + function values(object) { + return object == null ? [] : baseValues(object, keys(object)); + } + + /*------------------------------------------------------------------------*/ + + /** + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. + * + * **Note:** No other characters are escaped. To escape additional + * characters use a third-party library like [_he_](https://mths.be/he). + * + * Though the ">" character is escaped for symmetry, characters like + * ">" and "/" don't need escaping in HTML and have no special meaning + * unless they're part of a tag or unquoted attribute value. See + * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) + * (under "semi-related fun fact") for more details. + * + * When working with HTML you should always + * [quote attribute values](http://wonko.com/post/html-escaping) to reduce + * XSS vectors. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ + function escape(string) { + string = toString(string); + return (string && reHasUnescapedHtml.test(string)) + ? string.replace(reUnescapedHtml, escapeHtmlChar) + : string; + } + + /*------------------------------------------------------------------------*/ + + /** + * This method returns the first argument it receives. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'a': 1 }; + * + * console.log(_.identity(object) === object); + * // => true + */ + function identity(value) { + return value; + } + + /** + * Creates a function that invokes `func` with the arguments of the created + * function. If `func` is a property name, the created function returns the + * property value for a given element. If `func` is an array or object, the + * created function returns `true` for elements that contain the equivalent + * source properties, otherwise it returns `false`. + * + * @static + * @since 4.0.0 + * @memberOf _ + * @category Util + * @param {*} [func=_.identity] The value to convert to a callback. + * @returns {Function} Returns the callback. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true })); + * // => [{ 'user': 'barney', 'age': 36, 'active': true }] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, _.iteratee(['user', 'fred'])); + * // => [{ 'user': 'fred', 'age': 40 }] + * + * // The `_.property` iteratee shorthand. + * _.map(users, _.iteratee('user')); + * // => ['barney', 'fred'] + * + * // Create custom iteratee shorthands. + * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) { + * return !_.isRegExp(func) ? iteratee(func) : function(string) { + * return func.test(string); + * }; + * }); + * + * _.filter(['abc', 'def'], /ef/); + * // => ['def'] + */ + var iteratee = baseIteratee; + + /** + * Creates a function that performs a partial deep comparison between a given + * object and `source`, returning `true` if the given object has equivalent + * property values, else `false`. + * + * **Note:** The created function is equivalent to `_.isMatch` with `source` + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + * @example + * + * var objects = [ + * { 'a': 1, 'b': 2, 'c': 3 }, + * { 'a': 4, 'b': 5, 'c': 6 } + * ]; + * + * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); + * // => [{ 'a': 4, 'b': 5, 'c': 6 }] + */ + function matches(source) { + return baseMatches(assign({}, source)); + } + + /** + * Adds all own enumerable string keyed function properties of a source + * object to the destination object. If `object` is a function, then methods + * are added to its prototype as well. + * + * **Note:** Use `_.runInContext` to create a pristine `lodash` function to + * avoid conflicts caused by modifying the original. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {Function|Object} [object=lodash] The destination object. + * @param {Object} source The object of functions to add. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.chain=true] Specify whether mixins are chainable. + * @returns {Function|Object} Returns `object`. + * @example + * + * function vowels(string) { + * return _.filter(string, function(v) { + * return /[aeiou]/i.test(v); + * }); + * } + * + * _.mixin({ 'vowels': vowels }); + * _.vowels('fred'); + * // => ['e'] + * + * _('fred').vowels().value(); + * // => ['e'] + * + * _.mixin({ 'vowels': vowels }, { 'chain': false }); + * _('fred').vowels(); + * // => ['e'] + */ + function mixin(object, source, options) { + var props = keys(source), + methodNames = baseFunctions(source, props); + + if (options == null && + !(isObject(source) && (methodNames.length || !props.length))) { + options = source; + source = object; + object = this; + methodNames = baseFunctions(source, keys(source)); + } + var chain = !(isObject(options) && 'chain' in options) || !!options.chain, + isFunc = isFunction(object); + + baseEach(methodNames, function(methodName) { + var func = source[methodName]; + object[methodName] = func; + if (isFunc) { + object.prototype[methodName] = function() { + var chainAll = this.__chain__; + if (chain || chainAll) { + var result = object(this.__wrapped__), + actions = result.__actions__ = copyArray(this.__actions__); + + actions.push({ 'func': func, 'args': arguments, 'thisArg': object }); + result.__chain__ = chainAll; + return result; + } + return func.apply(object, arrayPush([this.value()], arguments)); + }; + } + }); + + return object; + } + + /** + * Reverts the `_` variable to its previous value and returns a reference to + * the `lodash` function. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @returns {Function} Returns the `lodash` function. + * @example + * + * var lodash = _.noConflict(); + */ + function noConflict() { + if (root._ === this) { + root._ = oldDash; + } + return this; + } + + /** + * This method returns `undefined`. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] + */ + function noop() { + // No operation performed. + } + + /** + * Generates a unique ID. If `prefix` is given, the ID is appended to it. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {string} [prefix=''] The value to prefix the ID with. + * @returns {string} Returns the unique ID. + * @example + * + * _.uniqueId('contact_'); + * // => 'contact_104' + * + * _.uniqueId(); + * // => '105' + */ + function uniqueId(prefix) { + var id = ++idCounter; + return toString(prefix) + id; + } + + /*------------------------------------------------------------------------*/ + + /** + * Computes the maximum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the maximum value. + * @example + * + * _.max([4, 2, 8, 6]); + * // => 8 + * + * _.max([]); + * // => undefined + */ + function max(array) { + return (array && array.length) + ? baseExtremum(array, identity, baseGt) + : undefined; + } + + /** + * Computes the minimum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the minimum value. + * @example + * + * _.min([4, 2, 8, 6]); + * // => 2 + * + * _.min([]); + * // => undefined + */ + function min(array) { + return (array && array.length) + ? baseExtremum(array, identity, baseLt) + : undefined; + } + + /*------------------------------------------------------------------------*/ + + // Add methods that return wrapped values in chain sequences. + lodash.assignIn = assignIn; + lodash.before = before; + lodash.bind = bind; + lodash.chain = chain; + lodash.compact = compact; + lodash.concat = concat; + lodash.create = create; + lodash.defaults = defaults; + lodash.defer = defer; + lodash.delay = delay; + lodash.filter = filter; + lodash.flatten = flatten; + lodash.flattenDeep = flattenDeep; + lodash.iteratee = iteratee; + lodash.keys = keys; + lodash.map = map; + lodash.matches = matches; + lodash.mixin = mixin; + lodash.negate = negate; + lodash.once = once; + lodash.pick = pick; + lodash.slice = slice; + lodash.sortBy = sortBy; + lodash.tap = tap; + lodash.thru = thru; + lodash.toArray = toArray; + lodash.values = values; + + // Add aliases. + lodash.extend = assignIn; + + // Add methods to `lodash.prototype`. + mixin(lodash, lodash); + + /*------------------------------------------------------------------------*/ + + // Add methods that return unwrapped values in chain sequences. + lodash.clone = clone; + lodash.escape = escape; + lodash.every = every; + lodash.find = find; + lodash.forEach = forEach; + lodash.has = has; + lodash.head = head; + lodash.identity = identity; + lodash.indexOf = indexOf; + lodash.isArguments = isArguments; + lodash.isArray = isArray; + lodash.isBoolean = isBoolean; + lodash.isDate = isDate; + lodash.isEmpty = isEmpty; + lodash.isEqual = isEqual; + lodash.isFinite = isFinite; + lodash.isFunction = isFunction; + lodash.isNaN = isNaN; + lodash.isNull = isNull; + lodash.isNumber = isNumber; + lodash.isObject = isObject; + lodash.isRegExp = isRegExp; + lodash.isString = isString; + lodash.isUndefined = isUndefined; + lodash.last = last; + lodash.max = max; + lodash.min = min; + lodash.noConflict = noConflict; + lodash.noop = noop; + lodash.reduce = reduce; + lodash.result = result; + lodash.size = size; + lodash.some = some; + lodash.uniqueId = uniqueId; + + // Add aliases. + lodash.each = forEach; + lodash.first = head; + + mixin(lodash, (function() { + var source = {}; + baseForOwn(lodash, function(func, methodName) { + if (!hasOwnProperty.call(lodash.prototype, methodName)) { + source[methodName] = func; + } + }); + return source; + }()), { 'chain': false }); + + /*------------------------------------------------------------------------*/ + + /** + * The semantic version number. + * + * @static + * @memberOf _ + * @type {string} + */ + lodash.VERSION = VERSION; + + // Add `Array` methods to `lodash.prototype`. + baseEach(['pop', 'join', 'replace', 'reverse', 'split', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) { + var func = (/^(?:replace|split)$/.test(methodName) ? String.prototype : arrayProto)[methodName], + chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru', + retUnwrapped = /^(?:pop|join|replace|shift)$/.test(methodName); + + lodash.prototype[methodName] = function() { + var args = arguments; + if (retUnwrapped && !this.__chain__) { + var value = this.value(); + return func.apply(isArray(value) ? value : [], args); + } + return this[chainName](function(value) { + return func.apply(isArray(value) ? value : [], args); + }); + }; + }); + + // Add chain sequence methods to the `lodash` wrapper. + lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue; + + /*--------------------------------------------------------------------------*/ + + // Some AMD build optimizers, like r.js, check for condition patterns like: + if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) { + // Expose Lodash on the global object to prevent errors when Lodash is + // loaded by a script tag in the presence of an AMD loader. + // See http://requirejs.org/docs/errors.html#mismatch for more details. + // Use `_.noConflict` to remove Lodash from the global object. + root._ = lodash; + + // Define as an anonymous module so, through path mapping, it can be + // referenced as the "underscore" module. + define(function() { + return lodash; + }); + } + // Check for `exports` after `define` in case a build optimizer adds it. + else if (freeModule) { + // Export for Node.js. + (freeModule.exports = lodash)._ = lodash; + // Export for CommonJS support. + freeExports._ = lodash; + } + else { + // Export to the global object. + root._ = lodash; + } +}.call(this)); diff --git a/node_modules/umzug/node_modules/lodash/core.min.js b/node_modules/umzug/node_modules/lodash/core.min.js new file mode 100644 index 0000000..b909d31 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/core.min.js @@ -0,0 +1,29 @@ +/** + * @license + * Lodash (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE + * Build: `lodash core -o ./dist/lodash.core.js` + */ +;(function(){function n(n){return K(n)&&pn.call(n,"callee")&&!bn.call(n,"callee")}function t(n,t){return n.push.apply(n,t),n}function r(n){return function(t){return null==t?nn:t[n]}}function e(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function u(n,t){return j(t,function(t){return n[t]})}function o(n){return n instanceof i?n:new i(n)}function i(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function c(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function"); +return setTimeout(function(){n.apply(nn,r)},t)}function f(n,t){var r=true;return mn(n,function(n,e,u){return r=!!t(n,e,u)}),r}function a(n,t,r){for(var e=-1,u=n.length;++et}function y(n,t,r,e,u){return n===t||(null==n||null==t||!K(n)&&!K(t)?n!==n&&t!==t:b(n,t,r,e,y,u))}function b(n,t,r,e,u,o){var i=Nn(n),c=Nn(t),f=i?"[object Array]":hn.call(n),a=c?"[object Array]":hn.call(t),f="[object Arguments]"==f?"[object Object]":f,a="[object Arguments]"==a?"[object Object]":a,l="[object Object]"==f,c="[object Object]"==a,a=f==a;o||(o=[]);var p=An(o,function(t){return t[0]==n}),s=An(o,function(n){ +return n[0]==t});if(p&&s)return p[1]==t;if(o.push([n,t]),o.push([t,n]),a&&!l){if(i)r=B(n,t,r,e,u,o);else n:{switch(f){case"[object Boolean]":case"[object Date]":case"[object Number]":r=M(+n,+t);break n;case"[object Error]":r=n.name==t.name&&n.message==t.message;break n;case"[object RegExp]":case"[object String]":r=n==t+"";break n}r=false}return o.pop(),r}return 1&r||(i=l&&pn.call(n,"__wrapped__"),f=c&&pn.call(t,"__wrapped__"),!i&&!f)?!!a&&(r=R(n,t,r,e,u,o),o.pop(),r):(i=i?n.value():n,f=f?t.value():t, +r=u(i,f,r,e,o),o.pop(),r)}function g(n){return typeof n=="function"?n:null==n?Y:(typeof n=="object"?d:r)(n)}function _(n,t){return nt&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++ei))return false;for(var c=-1,f=true,a=2&r?[]:nn;++cr?jn(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++rarguments.length,mn)}function J(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Fn(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=nn),r}}function M(n,t){return n===t||n!==n&&t!==t}function U(n){var t;return(t=null!=n)&&(t=n.length,t=typeof t=="number"&&-1=t),t&&!V(n)}function V(n){return!!H(n)&&(n=hn.call(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n); +}function H(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function K(n){return null!=n&&typeof n=="object"}function L(n){return typeof n=="number"||K(n)&&"[object Number]"==hn.call(n)}function Q(n){return typeof n=="string"||!Nn(n)&&K(n)&&"[object String]"==hn.call(n)}function W(n){return typeof n=="string"?n:null==n?"":n+""}function X(n){return null==n?[]:u(n,In(n))}function Y(n){return n}function Z(n,r,e){var u=In(r),o=h(r,u);null!=e||H(r)&&(o.length||!u.length)||(e=r,r=n,n=this,o=h(r,In(r))); +var i=!(H(e)&&"chain"in e&&!e.chain),c=V(n);return mn(o,function(e){var u=r[e];n[e]=u,c&&(n.prototype[e]=function(){var r=this.__chain__;if(i||r){var e=n(this.__wrapped__);return(e.__actions__=A(this.__actions__)).push({func:u,args:arguments,thisArg:n}),e.__chain__=r,e}return u.apply(n,t([this.value()],arguments))})}),n}var nn,tn=1/0,rn=/[&<>"']/g,en=RegExp(rn.source),un=typeof self=="object"&&self&&self.Object===Object&&self,on=typeof global=="object"&&global&&global.Object===Object&&global||un||Function("return this")(),cn=(un=typeof exports=="object"&&exports&&!exports.nodeType&&exports)&&typeof module=="object"&&module&&!module.nodeType&&module,fn=function(n){ +return function(t){return null==n?nn:n[t]}}({"&":"&","<":"<",">":">",'"':""","'":"'"}),an=Array.prototype,ln=Object.prototype,pn=ln.hasOwnProperty,sn=0,hn=ln.toString,vn=on._,yn=Object.create,bn=ln.propertyIsEnumerable,gn=on.isFinite,_n=function(n,t){return function(r){return n(t(r))}}(Object.keys,Object),jn=Math.max,dn=function(){function n(){}return function(t){return H(t)?yn?yn(t):(n.prototype=t,t=new n,n.prototype=nn,t):{}}}();i.prototype=dn(o.prototype),i.prototype.constructor=i; +var mn=function(n,t){return function(r,e){if(null==r)return r;if(!U(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++or&&(r=jn(e+r,0));n:{for(t=g(t),e=n.length,r+=-1;++re||o&&c&&a||!u&&a||!i){r=1;break n}if(!o&&r { '4': 1, '6': 2 } + * + * // The `_.property` iteratee shorthand. + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ +var countBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + ++result[key]; + } else { + baseAssignValue(result, key, 1); + } +}); + +module.exports = countBy; diff --git a/node_modules/umzug/node_modules/lodash/create.js b/node_modules/umzug/node_modules/lodash/create.js new file mode 100644 index 0000000..919edb8 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/create.js @@ -0,0 +1,43 @@ +var baseAssign = require('./_baseAssign'), + baseCreate = require('./_baseCreate'); + +/** + * Creates an object that inherits from the `prototype` object. If a + * `properties` object is given, its own enumerable string keyed properties + * are assigned to the created object. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ +function create(prototype, properties) { + var result = baseCreate(prototype); + return properties == null ? result : baseAssign(result, properties); +} + +module.exports = create; diff --git a/node_modules/umzug/node_modules/lodash/curry.js b/node_modules/umzug/node_modules/lodash/curry.js new file mode 100644 index 0000000..918db1a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/curry.js @@ -0,0 +1,57 @@ +var createWrap = require('./_createWrap'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_CURRY_FLAG = 8; + +/** + * Creates a function that accepts arguments of `func` and either invokes + * `func` returning its result, if at least `arity` number of arguments have + * been provided, or returns a function that accepts the remaining `func` + * arguments, and so on. The arity of `func` may be specified if `func.length` + * is not sufficient. + * + * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curry(abc); + * + * curried(1)(2)(3); + * // => [1, 2, 3] + * + * curried(1, 2)(3); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(1)(_, 3)(2); + * // => [1, 2, 3] + */ +function curry(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curry.placeholder; + return result; +} + +// Assign default placeholders. +curry.placeholder = {}; + +module.exports = curry; diff --git a/node_modules/umzug/node_modules/lodash/curryRight.js b/node_modules/umzug/node_modules/lodash/curryRight.js new file mode 100644 index 0000000..c85b6f3 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/curryRight.js @@ -0,0 +1,54 @@ +var createWrap = require('./_createWrap'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_CURRY_RIGHT_FLAG = 16; + +/** + * This method is like `_.curry` except that arguments are applied to `func` + * in the manner of `_.partialRight` instead of `_.partial`. + * + * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curryRight(abc); + * + * curried(3)(2)(1); + * // => [1, 2, 3] + * + * curried(2, 3)(1); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(3)(1, _)(2); + * // => [1, 2, 3] + */ +function curryRight(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curryRight.placeholder; + return result; +} + +// Assign default placeholders. +curryRight.placeholder = {}; + +module.exports = curryRight; diff --git a/node_modules/umzug/node_modules/lodash/date.js b/node_modules/umzug/node_modules/lodash/date.js new file mode 100644 index 0000000..cbf5b41 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/date.js @@ -0,0 +1,3 @@ +module.exports = { + 'now': require('./now') +}; diff --git a/node_modules/umzug/node_modules/lodash/debounce.js b/node_modules/umzug/node_modules/lodash/debounce.js new file mode 100644 index 0000000..04d7dfd --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/debounce.js @@ -0,0 +1,188 @@ +var isObject = require('./isObject'), + now = require('./now'), + toNumber = require('./toNumber'); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ +function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + result = wait - timeSinceLastCall; + + return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; +} + +module.exports = debounce; diff --git a/node_modules/umzug/node_modules/lodash/deburr.js b/node_modules/umzug/node_modules/lodash/deburr.js new file mode 100644 index 0000000..f85e314 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/deburr.js @@ -0,0 +1,45 @@ +var deburrLetter = require('./_deburrLetter'), + toString = require('./toString'); + +/** Used to match Latin Unicode letters (excluding mathematical operators). */ +var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; + +/** Used to compose unicode character classes. */ +var rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange; + +/** Used to compose unicode capture groups. */ +var rsCombo = '[' + rsComboRange + ']'; + +/** + * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and + * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). + */ +var reComboMark = RegExp(rsCombo, 'g'); + +/** + * Deburrs `string` by converting + * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) + * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) + * letters to basic Latin letters and removing + * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to deburr. + * @returns {string} Returns the deburred string. + * @example + * + * _.deburr('déjà vu'); + * // => 'deja vu' + */ +function deburr(string) { + string = toString(string); + return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); +} + +module.exports = deburr; diff --git a/node_modules/umzug/node_modules/lodash/defaultTo.js b/node_modules/umzug/node_modules/lodash/defaultTo.js new file mode 100644 index 0000000..5b33359 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/defaultTo.js @@ -0,0 +1,25 @@ +/** + * Checks `value` to determine whether a default value should be returned in + * its place. The `defaultValue` is returned if `value` is `NaN`, `null`, + * or `undefined`. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Util + * @param {*} value The value to check. + * @param {*} defaultValue The default value. + * @returns {*} Returns the resolved value. + * @example + * + * _.defaultTo(1, 10); + * // => 1 + * + * _.defaultTo(undefined, 10); + * // => 10 + */ +function defaultTo(value, defaultValue) { + return (value == null || value !== value) ? defaultValue : value; +} + +module.exports = defaultTo; diff --git a/node_modules/umzug/node_modules/lodash/defaults.js b/node_modules/umzug/node_modules/lodash/defaults.js new file mode 100644 index 0000000..6b75ee0 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/defaults.js @@ -0,0 +1,32 @@ +var apply = require('./_apply'), + assignInWith = require('./assignInWith'), + baseRest = require('./_baseRest'), + customDefaultsAssignIn = require('./_customDefaultsAssignIn'); + +/** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ +var defaults = baseRest(function(args) { + args.push(undefined, customDefaultsAssignIn); + return apply(assignInWith, undefined, args); +}); + +module.exports = defaults; diff --git a/node_modules/umzug/node_modules/lodash/defaultsDeep.js b/node_modules/umzug/node_modules/lodash/defaultsDeep.js new file mode 100644 index 0000000..9b5fa3e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/defaultsDeep.js @@ -0,0 +1,30 @@ +var apply = require('./_apply'), + baseRest = require('./_baseRest'), + customDefaultsMerge = require('./_customDefaultsMerge'), + mergeWith = require('./mergeWith'); + +/** + * This method is like `_.defaults` except that it recursively assigns + * default properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaults + * @example + * + * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); + * // => { 'a': { 'b': 2, 'c': 3 } } + */ +var defaultsDeep = baseRest(function(args) { + args.push(undefined, customDefaultsMerge); + return apply(mergeWith, undefined, args); +}); + +module.exports = defaultsDeep; diff --git a/node_modules/umzug/node_modules/lodash/defer.js b/node_modules/umzug/node_modules/lodash/defer.js new file mode 100644 index 0000000..f6d6c6f --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/defer.js @@ -0,0 +1,26 @@ +var baseDelay = require('./_baseDelay'), + baseRest = require('./_baseRest'); + +/** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // => Logs 'deferred' after one millisecond. + */ +var defer = baseRest(function(func, args) { + return baseDelay(func, 1, args); +}); + +module.exports = defer; diff --git a/node_modules/umzug/node_modules/lodash/delay.js b/node_modules/umzug/node_modules/lodash/delay.js new file mode 100644 index 0000000..bd55479 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/delay.js @@ -0,0 +1,28 @@ +var baseDelay = require('./_baseDelay'), + baseRest = require('./_baseRest'), + toNumber = require('./toNumber'); + +/** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => Logs 'later' after one second. + */ +var delay = baseRest(function(func, wait, args) { + return baseDelay(func, toNumber(wait) || 0, args); +}); + +module.exports = delay; diff --git a/node_modules/umzug/node_modules/lodash/difference.js b/node_modules/umzug/node_modules/lodash/difference.js new file mode 100644 index 0000000..fa28bb3 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/difference.js @@ -0,0 +1,33 @@ +var baseDifference = require('./_baseDifference'), + baseFlatten = require('./_baseFlatten'), + baseRest = require('./_baseRest'), + isArrayLikeObject = require('./isArrayLikeObject'); + +/** + * Creates an array of `array` values not included in the other given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * **Note:** Unlike `_.pullAll`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.without, _.xor + * @example + * + * _.difference([2, 1], [2, 3]); + * // => [1] + */ +var difference = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) + : []; +}); + +module.exports = difference; diff --git a/node_modules/umzug/node_modules/lodash/differenceBy.js b/node_modules/umzug/node_modules/lodash/differenceBy.js new file mode 100644 index 0000000..2cd63e7 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/differenceBy.js @@ -0,0 +1,44 @@ +var baseDifference = require('./_baseDifference'), + baseFlatten = require('./_baseFlatten'), + baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'), + isArrayLikeObject = require('./isArrayLikeObject'), + last = require('./last'); + +/** + * This method is like `_.difference` except that it accepts `iteratee` which + * is invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * **Note:** Unlike `_.pullAllBy`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2] + * + * // The `_.property` iteratee shorthand. + * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ +var differenceBy = baseRest(function(array, values) { + var iteratee = last(values); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), baseIteratee(iteratee, 2)) + : []; +}); + +module.exports = differenceBy; diff --git a/node_modules/umzug/node_modules/lodash/differenceWith.js b/node_modules/umzug/node_modules/lodash/differenceWith.js new file mode 100644 index 0000000..c0233f4 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/differenceWith.js @@ -0,0 +1,40 @@ +var baseDifference = require('./_baseDifference'), + baseFlatten = require('./_baseFlatten'), + baseRest = require('./_baseRest'), + isArrayLikeObject = require('./isArrayLikeObject'), + last = require('./last'); + +/** + * This method is like `_.difference` except that it accepts `comparator` + * which is invoked to compare elements of `array` to `values`. The order and + * references of result values are determined by the first array. The comparator + * is invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.pullAllWith`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * + * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); + * // => [{ 'x': 2, 'y': 1 }] + */ +var differenceWith = baseRest(function(array, values) { + var comparator = last(values); + if (isArrayLikeObject(comparator)) { + comparator = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator) + : []; +}); + +module.exports = differenceWith; diff --git a/node_modules/umzug/node_modules/lodash/divide.js b/node_modules/umzug/node_modules/lodash/divide.js new file mode 100644 index 0000000..8cae0cd --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/divide.js @@ -0,0 +1,22 @@ +var createMathOperation = require('./_createMathOperation'); + +/** + * Divide two numbers. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Math + * @param {number} dividend The first number in a division. + * @param {number} divisor The second number in a division. + * @returns {number} Returns the quotient. + * @example + * + * _.divide(6, 4); + * // => 1.5 + */ +var divide = createMathOperation(function(dividend, divisor) { + return dividend / divisor; +}, 1); + +module.exports = divide; diff --git a/node_modules/umzug/node_modules/lodash/drop.js b/node_modules/umzug/node_modules/lodash/drop.js new file mode 100644 index 0000000..d5c3cba --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/drop.js @@ -0,0 +1,38 @@ +var baseSlice = require('./_baseSlice'), + toInteger = require('./toInteger'); + +/** + * Creates a slice of `array` with `n` elements dropped from the beginning. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.drop([1, 2, 3]); + * // => [2, 3] + * + * _.drop([1, 2, 3], 2); + * // => [3] + * + * _.drop([1, 2, 3], 5); + * // => [] + * + * _.drop([1, 2, 3], 0); + * // => [1, 2, 3] + */ +function drop(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, n < 0 ? 0 : n, length); +} + +module.exports = drop; diff --git a/node_modules/umzug/node_modules/lodash/dropRight.js b/node_modules/umzug/node_modules/lodash/dropRight.js new file mode 100644 index 0000000..441fe99 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/dropRight.js @@ -0,0 +1,39 @@ +var baseSlice = require('./_baseSlice'), + toInteger = require('./toInteger'); + +/** + * Creates a slice of `array` with `n` elements dropped from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRight([1, 2, 3]); + * // => [1, 2] + * + * _.dropRight([1, 2, 3], 2); + * // => [1] + * + * _.dropRight([1, 2, 3], 5); + * // => [] + * + * _.dropRight([1, 2, 3], 0); + * // => [1, 2, 3] + */ +function dropRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, 0, n < 0 ? 0 : n); +} + +module.exports = dropRight; diff --git a/node_modules/umzug/node_modules/lodash/dropRightWhile.js b/node_modules/umzug/node_modules/lodash/dropRightWhile.js new file mode 100644 index 0000000..9ad36a0 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/dropRightWhile.js @@ -0,0 +1,45 @@ +var baseIteratee = require('./_baseIteratee'), + baseWhile = require('./_baseWhile'); + +/** + * Creates a slice of `array` excluding elements dropped from the end. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.dropRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney'] + * + * // The `_.matches` iteratee shorthand. + * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropRightWhile(users, ['active', false]); + * // => objects for ['barney'] + * + * // The `_.property` iteratee shorthand. + * _.dropRightWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ +function dropRightWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, baseIteratee(predicate, 3), true, true) + : []; +} + +module.exports = dropRightWhile; diff --git a/node_modules/umzug/node_modules/lodash/dropWhile.js b/node_modules/umzug/node_modules/lodash/dropWhile.js new file mode 100644 index 0000000..903ef56 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/dropWhile.js @@ -0,0 +1,45 @@ +var baseIteratee = require('./_baseIteratee'), + baseWhile = require('./_baseWhile'); + +/** + * Creates a slice of `array` excluding elements dropped from the beginning. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.dropWhile(users, function(o) { return !o.active; }); + * // => objects for ['pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.dropWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropWhile(users, ['active', false]); + * // => objects for ['pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.dropWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ +function dropWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, baseIteratee(predicate, 3), true) + : []; +} + +module.exports = dropWhile; diff --git a/node_modules/umzug/node_modules/lodash/each.js b/node_modules/umzug/node_modules/lodash/each.js new file mode 100644 index 0000000..8800f42 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/each.js @@ -0,0 +1 @@ +module.exports = require('./forEach'); diff --git a/node_modules/umzug/node_modules/lodash/eachRight.js b/node_modules/umzug/node_modules/lodash/eachRight.js new file mode 100644 index 0000000..3252b2a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/eachRight.js @@ -0,0 +1 @@ +module.exports = require('./forEachRight'); diff --git a/node_modules/umzug/node_modules/lodash/endsWith.js b/node_modules/umzug/node_modules/lodash/endsWith.js new file mode 100644 index 0000000..76fc866 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/endsWith.js @@ -0,0 +1,43 @@ +var baseClamp = require('./_baseClamp'), + baseToString = require('./_baseToString'), + toInteger = require('./toInteger'), + toString = require('./toString'); + +/** + * Checks if `string` ends with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=string.length] The position to search up to. + * @returns {boolean} Returns `true` if `string` ends with `target`, + * else `false`. + * @example + * + * _.endsWith('abc', 'c'); + * // => true + * + * _.endsWith('abc', 'b'); + * // => false + * + * _.endsWith('abc', 'b', 2); + * // => true + */ +function endsWith(string, target, position) { + string = toString(string); + target = baseToString(target); + + var length = string.length; + position = position === undefined + ? length + : baseClamp(toInteger(position), 0, length); + + var end = position; + position -= target.length; + return position >= 0 && string.slice(position, end) == target; +} + +module.exports = endsWith; diff --git a/node_modules/umzug/node_modules/lodash/entries.js b/node_modules/umzug/node_modules/lodash/entries.js new file mode 100644 index 0000000..7a88df2 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/entries.js @@ -0,0 +1 @@ +module.exports = require('./toPairs'); diff --git a/node_modules/umzug/node_modules/lodash/entriesIn.js b/node_modules/umzug/node_modules/lodash/entriesIn.js new file mode 100644 index 0000000..f6c6331 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/entriesIn.js @@ -0,0 +1 @@ +module.exports = require('./toPairsIn'); diff --git a/node_modules/umzug/node_modules/lodash/eq.js b/node_modules/umzug/node_modules/lodash/eq.js new file mode 100644 index 0000000..a940688 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/eq.js @@ -0,0 +1,37 @@ +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +module.exports = eq; diff --git a/node_modules/umzug/node_modules/lodash/escape.js b/node_modules/umzug/node_modules/lodash/escape.js new file mode 100644 index 0000000..9247e00 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/escape.js @@ -0,0 +1,43 @@ +var escapeHtmlChar = require('./_escapeHtmlChar'), + toString = require('./toString'); + +/** Used to match HTML entities and HTML characters. */ +var reUnescapedHtml = /[&<>"']/g, + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + +/** + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. + * + * **Note:** No other characters are escaped. To escape additional + * characters use a third-party library like [_he_](https://mths.be/he). + * + * Though the ">" character is escaped for symmetry, characters like + * ">" and "/" don't need escaping in HTML and have no special meaning + * unless they're part of a tag or unquoted attribute value. See + * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) + * (under "semi-related fun fact") for more details. + * + * When working with HTML you should always + * [quote attribute values](http://wonko.com/post/html-escaping) to reduce + * XSS vectors. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ +function escape(string) { + string = toString(string); + return (string && reHasUnescapedHtml.test(string)) + ? string.replace(reUnescapedHtml, escapeHtmlChar) + : string; +} + +module.exports = escape; diff --git a/node_modules/umzug/node_modules/lodash/escapeRegExp.js b/node_modules/umzug/node_modules/lodash/escapeRegExp.js new file mode 100644 index 0000000..0a58c69 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/escapeRegExp.js @@ -0,0 +1,32 @@ +var toString = require('./toString'); + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, + reHasRegExpChar = RegExp(reRegExpChar.source); + +/** + * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", + * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escapeRegExp('[lodash](https://lodash.com/)'); + * // => '\[lodash\]\(https://lodash\.com/\)' + */ +function escapeRegExp(string) { + string = toString(string); + return (string && reHasRegExpChar.test(string)) + ? string.replace(reRegExpChar, '\\$&') + : string; +} + +module.exports = escapeRegExp; diff --git a/node_modules/umzug/node_modules/lodash/every.js b/node_modules/umzug/node_modules/lodash/every.js new file mode 100644 index 0000000..25080da --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/every.js @@ -0,0 +1,56 @@ +var arrayEvery = require('./_arrayEvery'), + baseEvery = require('./_baseEvery'), + baseIteratee = require('./_baseIteratee'), + isArray = require('./isArray'), + isIterateeCall = require('./_isIterateeCall'); + +/** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * Iteration is stopped once `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.every(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.every(users, 'active'); + * // => false + */ +function every(collection, predicate, guard) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, baseIteratee(predicate, 3)); +} + +module.exports = every; diff --git a/node_modules/umzug/node_modules/lodash/extend.js b/node_modules/umzug/node_modules/lodash/extend.js new file mode 100644 index 0000000..e00166c --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/extend.js @@ -0,0 +1 @@ +module.exports = require('./assignIn'); diff --git a/node_modules/umzug/node_modules/lodash/extendWith.js b/node_modules/umzug/node_modules/lodash/extendWith.js new file mode 100644 index 0000000..dbdcb3b --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/extendWith.js @@ -0,0 +1 @@ +module.exports = require('./assignInWith'); diff --git a/node_modules/umzug/node_modules/lodash/fill.js b/node_modules/umzug/node_modules/lodash/fill.js new file mode 100644 index 0000000..ae13aa1 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fill.js @@ -0,0 +1,45 @@ +var baseFill = require('./_baseFill'), + isIterateeCall = require('./_isIterateeCall'); + +/** + * Fills elements of `array` with `value` from `start` up to, but not + * including, `end`. + * + * **Note:** This method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Array + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.fill(array, 'a'); + * console.log(array); + * // => ['a', 'a', 'a'] + * + * _.fill(Array(3), 2); + * // => [2, 2, 2] + * + * _.fill([4, 6, 8, 10], '*', 1, 3); + * // => [4, '*', '*', 10] + */ +function fill(array, value, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { + start = 0; + end = length; + } + return baseFill(array, value, start, end); +} + +module.exports = fill; diff --git a/node_modules/umzug/node_modules/lodash/filter.js b/node_modules/umzug/node_modules/lodash/filter.js new file mode 100644 index 0000000..52616be --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/filter.js @@ -0,0 +1,48 @@ +var arrayFilter = require('./_arrayFilter'), + baseFilter = require('./_baseFilter'), + baseIteratee = require('./_baseIteratee'), + isArray = require('./isArray'); + +/** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + */ +function filter(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, baseIteratee(predicate, 3)); +} + +module.exports = filter; diff --git a/node_modules/umzug/node_modules/lodash/find.js b/node_modules/umzug/node_modules/lodash/find.js new file mode 100644 index 0000000..de732cc --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/find.js @@ -0,0 +1,42 @@ +var createFind = require('./_createFind'), + findIndex = require('./findIndex'); + +/** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ +var find = createFind(findIndex); + +module.exports = find; diff --git a/node_modules/umzug/node_modules/lodash/findIndex.js b/node_modules/umzug/node_modules/lodash/findIndex.js new file mode 100644 index 0000000..4689069 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/findIndex.js @@ -0,0 +1,55 @@ +var baseFindIndex = require('./_baseFindIndex'), + baseIteratee = require('./_baseIteratee'), + toInteger = require('./toInteger'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ +function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, baseIteratee(predicate, 3), index); +} + +module.exports = findIndex; diff --git a/node_modules/umzug/node_modules/lodash/findKey.js b/node_modules/umzug/node_modules/lodash/findKey.js new file mode 100644 index 0000000..cac0248 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/findKey.js @@ -0,0 +1,44 @@ +var baseFindKey = require('./_baseFindKey'), + baseForOwn = require('./_baseForOwn'), + baseIteratee = require('./_baseIteratee'); + +/** + * This method is like `_.find` except that it returns the key of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findKey(users, function(o) { return o.age < 40; }); + * // => 'barney' (iteration order is not guaranteed) + * + * // The `_.matches` iteratee shorthand. + * _.findKey(users, { 'age': 1, 'active': true }); + * // => 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findKey(users, 'active'); + * // => 'barney' + */ +function findKey(object, predicate) { + return baseFindKey(object, baseIteratee(predicate, 3), baseForOwn); +} + +module.exports = findKey; diff --git a/node_modules/umzug/node_modules/lodash/findLast.js b/node_modules/umzug/node_modules/lodash/findLast.js new file mode 100644 index 0000000..70b4271 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/findLast.js @@ -0,0 +1,25 @@ +var createFind = require('./_createFind'), + findLastIndex = require('./findLastIndex'); + +/** + * This method is like `_.find` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=collection.length-1] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(n) { + * return n % 2 == 1; + * }); + * // => 3 + */ +var findLast = createFind(findLastIndex); + +module.exports = findLast; diff --git a/node_modules/umzug/node_modules/lodash/findLastIndex.js b/node_modules/umzug/node_modules/lodash/findLastIndex.js new file mode 100644 index 0000000..7da3431 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/findLastIndex.js @@ -0,0 +1,59 @@ +var baseFindIndex = require('./_baseFindIndex'), + baseIteratee = require('./_baseIteratee'), + toInteger = require('./toInteger'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * This method is like `_.findIndex` except that it iterates over elements + * of `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); + * // => 2 + * + * // The `_.matches` iteratee shorthand. + * _.findLastIndex(users, { 'user': 'barney', 'active': true }); + * // => 0 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastIndex(users, ['active', false]); + * // => 2 + * + * // The `_.property` iteratee shorthand. + * _.findLastIndex(users, 'active'); + * // => 0 + */ +function findLastIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length - 1; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = fromIndex < 0 + ? nativeMax(length + index, 0) + : nativeMin(index, length - 1); + } + return baseFindIndex(array, baseIteratee(predicate, 3), index, true); +} + +module.exports = findLastIndex; diff --git a/node_modules/umzug/node_modules/lodash/findLastKey.js b/node_modules/umzug/node_modules/lodash/findLastKey.js new file mode 100644 index 0000000..66fb9fb --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/findLastKey.js @@ -0,0 +1,44 @@ +var baseFindKey = require('./_baseFindKey'), + baseForOwnRight = require('./_baseForOwnRight'), + baseIteratee = require('./_baseIteratee'); + +/** + * This method is like `_.findKey` except that it iterates over elements of + * a collection in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findLastKey(users, function(o) { return o.age < 40; }); + * // => returns 'pebbles' assuming `_.findKey` returns 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.findLastKey(users, { 'age': 36, 'active': true }); + * // => 'barney' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findLastKey(users, 'active'); + * // => 'pebbles' + */ +function findLastKey(object, predicate) { + return baseFindKey(object, baseIteratee(predicate, 3), baseForOwnRight); +} + +module.exports = findLastKey; diff --git a/node_modules/umzug/node_modules/lodash/first.js b/node_modules/umzug/node_modules/lodash/first.js new file mode 100644 index 0000000..53f4ad1 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/first.js @@ -0,0 +1 @@ +module.exports = require('./head'); diff --git a/node_modules/umzug/node_modules/lodash/flatMap.js b/node_modules/umzug/node_modules/lodash/flatMap.js new file mode 100644 index 0000000..e668506 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/flatMap.js @@ -0,0 +1,29 @@ +var baseFlatten = require('./_baseFlatten'), + map = require('./map'); + +/** + * Creates a flattened array of values by running each element in `collection` + * thru `iteratee` and flattening the mapped results. The iteratee is invoked + * with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [n, n]; + * } + * + * _.flatMap([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ +function flatMap(collection, iteratee) { + return baseFlatten(map(collection, iteratee), 1); +} + +module.exports = flatMap; diff --git a/node_modules/umzug/node_modules/lodash/flatMapDeep.js b/node_modules/umzug/node_modules/lodash/flatMapDeep.js new file mode 100644 index 0000000..4653d60 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/flatMapDeep.js @@ -0,0 +1,31 @@ +var baseFlatten = require('./_baseFlatten'), + map = require('./map'); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDeep([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ +function flatMapDeep(collection, iteratee) { + return baseFlatten(map(collection, iteratee), INFINITY); +} + +module.exports = flatMapDeep; diff --git a/node_modules/umzug/node_modules/lodash/flatMapDepth.js b/node_modules/umzug/node_modules/lodash/flatMapDepth.js new file mode 100644 index 0000000..6d72005 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/flatMapDepth.js @@ -0,0 +1,31 @@ +var baseFlatten = require('./_baseFlatten'), + map = require('./map'), + toInteger = require('./toInteger'); + +/** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDepth([1, 2], duplicate, 2); + * // => [[1, 1], [2, 2]] + */ +function flatMapDepth(collection, iteratee, depth) { + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(map(collection, iteratee), depth); +} + +module.exports = flatMapDepth; diff --git a/node_modules/umzug/node_modules/lodash/flatten.js b/node_modules/umzug/node_modules/lodash/flatten.js new file mode 100644 index 0000000..3f09f7f --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/flatten.js @@ -0,0 +1,22 @@ +var baseFlatten = require('./_baseFlatten'); + +/** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ +function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; +} + +module.exports = flatten; diff --git a/node_modules/umzug/node_modules/lodash/flattenDeep.js b/node_modules/umzug/node_modules/lodash/flattenDeep.js new file mode 100644 index 0000000..8ad585c --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/flattenDeep.js @@ -0,0 +1,25 @@ +var baseFlatten = require('./_baseFlatten'); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Recursively flattens `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, [3, [4]], 5]]); + * // => [1, 2, 3, 4, 5] + */ +function flattenDeep(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, INFINITY) : []; +} + +module.exports = flattenDeep; diff --git a/node_modules/umzug/node_modules/lodash/flattenDepth.js b/node_modules/umzug/node_modules/lodash/flattenDepth.js new file mode 100644 index 0000000..441fdcc --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/flattenDepth.js @@ -0,0 +1,33 @@ +var baseFlatten = require('./_baseFlatten'), + toInteger = require('./toInteger'); + +/** + * Recursively flatten `array` up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Array + * @param {Array} array The array to flatten. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * var array = [1, [2, [3, [4]], 5]]; + * + * _.flattenDepth(array, 1); + * // => [1, 2, [3, [4]], 5] + * + * _.flattenDepth(array, 2); + * // => [1, 2, 3, [4], 5] + */ +function flattenDepth(array, depth) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(array, depth); +} + +module.exports = flattenDepth; diff --git a/node_modules/umzug/node_modules/lodash/flip.js b/node_modules/umzug/node_modules/lodash/flip.js new file mode 100644 index 0000000..c28dd78 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/flip.js @@ -0,0 +1,28 @@ +var createWrap = require('./_createWrap'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_FLIP_FLAG = 512; + +/** + * Creates a function that invokes `func` with arguments reversed. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to flip arguments for. + * @returns {Function} Returns the new flipped function. + * @example + * + * var flipped = _.flip(function() { + * return _.toArray(arguments); + * }); + * + * flipped('a', 'b', 'c', 'd'); + * // => ['d', 'c', 'b', 'a'] + */ +function flip(func) { + return createWrap(func, WRAP_FLIP_FLAG); +} + +module.exports = flip; diff --git a/node_modules/umzug/node_modules/lodash/floor.js b/node_modules/umzug/node_modules/lodash/floor.js new file mode 100644 index 0000000..ab6dfa2 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/floor.js @@ -0,0 +1,26 @@ +var createRound = require('./_createRound'); + +/** + * Computes `number` rounded down to `precision`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Math + * @param {number} number The number to round down. + * @param {number} [precision=0] The precision to round down to. + * @returns {number} Returns the rounded down number. + * @example + * + * _.floor(4.006); + * // => 4 + * + * _.floor(0.046, 2); + * // => 0.04 + * + * _.floor(4060, -2); + * // => 4000 + */ +var floor = createRound('floor'); + +module.exports = floor; diff --git a/node_modules/umzug/node_modules/lodash/flow.js b/node_modules/umzug/node_modules/lodash/flow.js new file mode 100644 index 0000000..74b6b62 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/flow.js @@ -0,0 +1,27 @@ +var createFlow = require('./_createFlow'); + +/** + * Creates a function that returns the result of invoking the given functions + * with the `this` binding of the created function, where each successive + * invocation is supplied the return value of the previous. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {...(Function|Function[])} [funcs] The functions to invoke. + * @returns {Function} Returns the new composite function. + * @see _.flowRight + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flow([_.add, square]); + * addSquare(1, 2); + * // => 9 + */ +var flow = createFlow(); + +module.exports = flow; diff --git a/node_modules/umzug/node_modules/lodash/flowRight.js b/node_modules/umzug/node_modules/lodash/flowRight.js new file mode 100644 index 0000000..1146141 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/flowRight.js @@ -0,0 +1,26 @@ +var createFlow = require('./_createFlow'); + +/** + * This method is like `_.flow` except that it creates a function that + * invokes the given functions from right to left. + * + * @static + * @since 3.0.0 + * @memberOf _ + * @category Util + * @param {...(Function|Function[])} [funcs] The functions to invoke. + * @returns {Function} Returns the new composite function. + * @see _.flow + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flowRight([square, _.add]); + * addSquare(1, 2); + * // => 9 + */ +var flowRight = createFlow(true); + +module.exports = flowRight; diff --git a/node_modules/umzug/node_modules/lodash/forEach.js b/node_modules/umzug/node_modules/lodash/forEach.js new file mode 100644 index 0000000..c64eaa7 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/forEach.js @@ -0,0 +1,41 @@ +var arrayEach = require('./_arrayEach'), + baseEach = require('./_baseEach'), + castFunction = require('./_castFunction'), + isArray = require('./isArray'); + +/** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ +function forEach(collection, iteratee) { + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, castFunction(iteratee)); +} + +module.exports = forEach; diff --git a/node_modules/umzug/node_modules/lodash/forEachRight.js b/node_modules/umzug/node_modules/lodash/forEachRight.js new file mode 100644 index 0000000..7390eba --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/forEachRight.js @@ -0,0 +1,31 @@ +var arrayEachRight = require('./_arrayEachRight'), + baseEachRight = require('./_baseEachRight'), + castFunction = require('./_castFunction'), + isArray = require('./isArray'); + +/** + * This method is like `_.forEach` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @alias eachRight + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEach + * @example + * + * _.forEachRight([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `2` then `1`. + */ +function forEachRight(collection, iteratee) { + var func = isArray(collection) ? arrayEachRight : baseEachRight; + return func(collection, castFunction(iteratee)); +} + +module.exports = forEachRight; diff --git a/node_modules/umzug/node_modules/lodash/forIn.js b/node_modules/umzug/node_modules/lodash/forIn.js new file mode 100644 index 0000000..583a596 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/forIn.js @@ -0,0 +1,39 @@ +var baseFor = require('./_baseFor'), + castFunction = require('./_castFunction'), + keysIn = require('./keysIn'); + +/** + * Iterates over own and inherited enumerable string keyed properties of an + * object and invokes `iteratee` for each property. The iteratee is invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forInRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). + */ +function forIn(object, iteratee) { + return object == null + ? object + : baseFor(object, castFunction(iteratee), keysIn); +} + +module.exports = forIn; diff --git a/node_modules/umzug/node_modules/lodash/forInRight.js b/node_modules/umzug/node_modules/lodash/forInRight.js new file mode 100644 index 0000000..4aedf58 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/forInRight.js @@ -0,0 +1,37 @@ +var baseForRight = require('./_baseForRight'), + castFunction = require('./_castFunction'), + keysIn = require('./keysIn'); + +/** + * This method is like `_.forIn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forIn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forInRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'. + */ +function forInRight(object, iteratee) { + return object == null + ? object + : baseForRight(object, castFunction(iteratee), keysIn); +} + +module.exports = forInRight; diff --git a/node_modules/umzug/node_modules/lodash/forOwn.js b/node_modules/umzug/node_modules/lodash/forOwn.js new file mode 100644 index 0000000..94eed84 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/forOwn.js @@ -0,0 +1,36 @@ +var baseForOwn = require('./_baseForOwn'), + castFunction = require('./_castFunction'); + +/** + * Iterates over own enumerable string keyed properties of an object and + * invokes `iteratee` for each property. The iteratee is invoked with three + * arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwnRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ +function forOwn(object, iteratee) { + return object && baseForOwn(object, castFunction(iteratee)); +} + +module.exports = forOwn; diff --git a/node_modules/umzug/node_modules/lodash/forOwnRight.js b/node_modules/umzug/node_modules/lodash/forOwnRight.js new file mode 100644 index 0000000..86f338f --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/forOwnRight.js @@ -0,0 +1,34 @@ +var baseForOwnRight = require('./_baseForOwnRight'), + castFunction = require('./_castFunction'); + +/** + * This method is like `_.forOwn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwnRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. + */ +function forOwnRight(object, iteratee) { + return object && baseForOwnRight(object, castFunction(iteratee)); +} + +module.exports = forOwnRight; diff --git a/node_modules/umzug/node_modules/lodash/fp.js b/node_modules/umzug/node_modules/lodash/fp.js new file mode 100644 index 0000000..e372dbb --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp.js @@ -0,0 +1,2 @@ +var _ = require('./lodash.min').runInContext(); +module.exports = require('./fp/_baseConvert')(_, _); diff --git a/node_modules/umzug/node_modules/lodash/fp/F.js b/node_modules/umzug/node_modules/lodash/fp/F.js new file mode 100644 index 0000000..a05a63a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/F.js @@ -0,0 +1 @@ +module.exports = require('./stubFalse'); diff --git a/node_modules/umzug/node_modules/lodash/fp/T.js b/node_modules/umzug/node_modules/lodash/fp/T.js new file mode 100644 index 0000000..e2ba8ea --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/T.js @@ -0,0 +1 @@ +module.exports = require('./stubTrue'); diff --git a/node_modules/umzug/node_modules/lodash/fp/__.js b/node_modules/umzug/node_modules/lodash/fp/__.js new file mode 100644 index 0000000..4af98de --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/__.js @@ -0,0 +1 @@ +module.exports = require('./placeholder'); diff --git a/node_modules/umzug/node_modules/lodash/fp/_baseConvert.js b/node_modules/umzug/node_modules/lodash/fp/_baseConvert.js new file mode 100644 index 0000000..7af2765 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/_baseConvert.js @@ -0,0 +1,568 @@ +var mapping = require('./_mapping'), + fallbackHolder = require('./placeholder'); + +/** Built-in value reference. */ +var push = Array.prototype.push; + +/** + * Creates a function, with an arity of `n`, that invokes `func` with the + * arguments it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} n The arity of the new function. + * @returns {Function} Returns the new function. + */ +function baseArity(func, n) { + return n == 2 + ? function(a, b) { return func.apply(undefined, arguments); } + : function(a) { return func.apply(undefined, arguments); }; +} + +/** + * Creates a function that invokes `func`, with up to `n` arguments, ignoring + * any additional arguments. + * + * @private + * @param {Function} func The function to cap arguments for. + * @param {number} n The arity cap. + * @returns {Function} Returns the new function. + */ +function baseAry(func, n) { + return n == 2 + ? function(a, b) { return func(a, b); } + : function(a) { return func(a); }; +} + +/** + * Creates a clone of `array`. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the cloned array. + */ +function cloneArray(array) { + var length = array ? array.length : 0, + result = Array(length); + + while (length--) { + result[length] = array[length]; + } + return result; +} + +/** + * Creates a function that clones a given object using the assignment `func`. + * + * @private + * @param {Function} func The assignment function. + * @returns {Function} Returns the new cloner function. + */ +function createCloner(func) { + return function(object) { + return func({}, object); + }; +} + +/** + * A specialized version of `_.spread` which flattens the spread array into + * the arguments of the invoked `func`. + * + * @private + * @param {Function} func The function to spread arguments over. + * @param {number} start The start position of the spread. + * @returns {Function} Returns the new function. + */ +function flatSpread(func, start) { + return function() { + var length = arguments.length, + lastIndex = length - 1, + args = Array(length); + + while (length--) { + args[length] = arguments[length]; + } + var array = args[start], + otherArgs = args.slice(0, start); + + if (array) { + push.apply(otherArgs, array); + } + if (start != lastIndex) { + push.apply(otherArgs, args.slice(start + 1)); + } + return func.apply(this, otherArgs); + }; +} + +/** + * Creates a function that wraps `func` and uses `cloner` to clone the first + * argument it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} cloner The function to clone arguments. + * @returns {Function} Returns the new immutable function. + */ +function wrapImmutable(func, cloner) { + return function() { + var length = arguments.length; + if (!length) { + return; + } + var args = Array(length); + while (length--) { + args[length] = arguments[length]; + } + var result = args[0] = cloner.apply(undefined, args); + func.apply(undefined, args); + return result; + }; +} + +/** + * The base implementation of `convert` which accepts a `util` object of methods + * required to perform conversions. + * + * @param {Object} util The util object. + * @param {string} name The name of the function to convert. + * @param {Function} func The function to convert. + * @param {Object} [options] The options object. + * @param {boolean} [options.cap=true] Specify capping iteratee arguments. + * @param {boolean} [options.curry=true] Specify currying. + * @param {boolean} [options.fixed=true] Specify fixed arity. + * @param {boolean} [options.immutable=true] Specify immutable operations. + * @param {boolean} [options.rearg=true] Specify rearranging arguments. + * @returns {Function|Object} Returns the converted function or object. + */ +function baseConvert(util, name, func, options) { + var setPlaceholder, + isLib = typeof name == 'function', + isObj = name === Object(name); + + if (isObj) { + options = func; + func = name; + name = undefined; + } + if (func == null) { + throw new TypeError; + } + options || (options = {}); + + var config = { + 'cap': 'cap' in options ? options.cap : true, + 'curry': 'curry' in options ? options.curry : true, + 'fixed': 'fixed' in options ? options.fixed : true, + 'immutable': 'immutable' in options ? options.immutable : true, + 'rearg': 'rearg' in options ? options.rearg : true + }; + + var forceCurry = ('curry' in options) && options.curry, + forceFixed = ('fixed' in options) && options.fixed, + forceRearg = ('rearg' in options) && options.rearg, + placeholder = isLib ? func : fallbackHolder, + pristine = isLib ? func.runInContext() : undefined; + + var helpers = isLib ? func : { + 'ary': util.ary, + 'assign': util.assign, + 'clone': util.clone, + 'curry': util.curry, + 'forEach': util.forEach, + 'isArray': util.isArray, + 'isFunction': util.isFunction, + 'iteratee': util.iteratee, + 'keys': util.keys, + 'rearg': util.rearg, + 'toInteger': util.toInteger, + 'toPath': util.toPath + }; + + var ary = helpers.ary, + assign = helpers.assign, + clone = helpers.clone, + curry = helpers.curry, + each = helpers.forEach, + isArray = helpers.isArray, + isFunction = helpers.isFunction, + keys = helpers.keys, + rearg = helpers.rearg, + toInteger = helpers.toInteger, + toPath = helpers.toPath; + + var aryMethodKeys = keys(mapping.aryMethod); + + var wrappers = { + 'castArray': function(castArray) { + return function() { + var value = arguments[0]; + return isArray(value) + ? castArray(cloneArray(value)) + : castArray.apply(undefined, arguments); + }; + }, + 'iteratee': function(iteratee) { + return function() { + var func = arguments[0], + arity = arguments[1], + result = iteratee(func, arity), + length = result.length; + + if (config.cap && typeof arity == 'number') { + arity = arity > 2 ? (arity - 2) : 1; + return (length && length <= arity) ? result : baseAry(result, arity); + } + return result; + }; + }, + 'mixin': function(mixin) { + return function(source) { + var func = this; + if (!isFunction(func)) { + return mixin(func, Object(source)); + } + var pairs = []; + each(keys(source), function(key) { + if (isFunction(source[key])) { + pairs.push([key, func.prototype[key]]); + } + }); + + mixin(func, Object(source)); + + each(pairs, function(pair) { + var value = pair[1]; + if (isFunction(value)) { + func.prototype[pair[0]] = value; + } else { + delete func.prototype[pair[0]]; + } + }); + return func; + }; + }, + 'nthArg': function(nthArg) { + return function(n) { + var arity = n < 0 ? 1 : (toInteger(n) + 1); + return curry(nthArg(n), arity); + }; + }, + 'rearg': function(rearg) { + return function(func, indexes) { + var arity = indexes ? indexes.length : 0; + return curry(rearg(func, indexes), arity); + }; + }, + 'runInContext': function(runInContext) { + return function(context) { + return baseConvert(util, runInContext(context), options); + }; + } + }; + + /*--------------------------------------------------------------------------*/ + + /** + * Casts `func` to a function with an arity capped iteratee if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @returns {Function} Returns the cast function. + */ + function castCap(name, func) { + if (config.cap) { + var indexes = mapping.iterateeRearg[name]; + if (indexes) { + return iterateeRearg(func, indexes); + } + var n = !isLib && mapping.iterateeAry[name]; + if (n) { + return iterateeAry(func, n); + } + } + return func; + } + + /** + * Casts `func` to a curried function if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @param {number} n The arity of `func`. + * @returns {Function} Returns the cast function. + */ + function castCurry(name, func, n) { + return (forceCurry || (config.curry && n > 1)) + ? curry(func, n) + : func; + } + + /** + * Casts `func` to a fixed arity function if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @param {number} n The arity cap. + * @returns {Function} Returns the cast function. + */ + function castFixed(name, func, n) { + if (config.fixed && (forceFixed || !mapping.skipFixed[name])) { + var data = mapping.methodSpread[name], + start = data && data.start; + + return start === undefined ? ary(func, n) : flatSpread(func, start); + } + return func; + } + + /** + * Casts `func` to an rearged function if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @param {number} n The arity of `func`. + * @returns {Function} Returns the cast function. + */ + function castRearg(name, func, n) { + return (config.rearg && n > 1 && (forceRearg || !mapping.skipRearg[name])) + ? rearg(func, mapping.methodRearg[name] || mapping.aryRearg[n]) + : func; + } + + /** + * Creates a clone of `object` by `path`. + * + * @private + * @param {Object} object The object to clone. + * @param {Array|string} path The path to clone by. + * @returns {Object} Returns the cloned object. + */ + function cloneByPath(object, path) { + path = toPath(path); + + var index = -1, + length = path.length, + lastIndex = length - 1, + result = clone(Object(object)), + nested = result; + + while (nested != null && ++index < length) { + var key = path[index], + value = nested[key]; + + if (value != null) { + nested[path[index]] = clone(index == lastIndex ? value : Object(value)); + } + nested = nested[key]; + } + return result; + } + + /** + * Converts `lodash` to an immutable auto-curried iteratee-first data-last + * version with conversion `options` applied. + * + * @param {Object} [options] The options object. See `baseConvert` for more details. + * @returns {Function} Returns the converted `lodash`. + */ + function convertLib(options) { + return _.runInContext.convert(options)(undefined); + } + + /** + * Create a converter function for `func` of `name`. + * + * @param {string} name The name of the function to convert. + * @param {Function} func The function to convert. + * @returns {Function} Returns the new converter function. + */ + function createConverter(name, func) { + var realName = mapping.aliasToReal[name] || name, + methodName = mapping.remap[realName] || realName, + oldOptions = options; + + return function(options) { + var newUtil = isLib ? pristine : helpers, + newFunc = isLib ? pristine[methodName] : func, + newOptions = assign(assign({}, oldOptions), options); + + return baseConvert(newUtil, realName, newFunc, newOptions); + }; + } + + /** + * Creates a function that wraps `func` to invoke its iteratee, with up to `n` + * arguments, ignoring any additional arguments. + * + * @private + * @param {Function} func The function to cap iteratee arguments for. + * @param {number} n The arity cap. + * @returns {Function} Returns the new function. + */ + function iterateeAry(func, n) { + return overArg(func, function(func) { + return typeof func == 'function' ? baseAry(func, n) : func; + }); + } + + /** + * Creates a function that wraps `func` to invoke its iteratee with arguments + * arranged according to the specified `indexes` where the argument value at + * the first index is provided as the first argument, the argument value at + * the second index is provided as the second argument, and so on. + * + * @private + * @param {Function} func The function to rearrange iteratee arguments for. + * @param {number[]} indexes The arranged argument indexes. + * @returns {Function} Returns the new function. + */ + function iterateeRearg(func, indexes) { + return overArg(func, function(func) { + var n = indexes.length; + return baseArity(rearg(baseAry(func, n), indexes), n); + }); + } + + /** + * Creates a function that invokes `func` with its first argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function() { + var length = arguments.length; + if (!length) { + return func(); + } + var args = Array(length); + while (length--) { + args[length] = arguments[length]; + } + var index = config.rearg ? 0 : (length - 1); + args[index] = transform(args[index]); + return func.apply(undefined, args); + }; + } + + /** + * Creates a function that wraps `func` and applys the conversions + * rules by `name`. + * + * @private + * @param {string} name The name of the function to wrap. + * @param {Function} func The function to wrap. + * @returns {Function} Returns the converted function. + */ + function wrap(name, func) { + var result, + realName = mapping.aliasToReal[name] || name, + wrapped = func, + wrapper = wrappers[realName]; + + if (wrapper) { + wrapped = wrapper(func); + } + else if (config.immutable) { + if (mapping.mutate.array[realName]) { + wrapped = wrapImmutable(func, cloneArray); + } + else if (mapping.mutate.object[realName]) { + wrapped = wrapImmutable(func, createCloner(func)); + } + else if (mapping.mutate.set[realName]) { + wrapped = wrapImmutable(func, cloneByPath); + } + } + each(aryMethodKeys, function(aryKey) { + each(mapping.aryMethod[aryKey], function(otherName) { + if (realName == otherName) { + var data = mapping.methodSpread[realName], + afterRearg = data && data.afterRearg; + + result = afterRearg + ? castFixed(realName, castRearg(realName, wrapped, aryKey), aryKey) + : castRearg(realName, castFixed(realName, wrapped, aryKey), aryKey); + + result = castCap(realName, result); + result = castCurry(realName, result, aryKey); + return false; + } + }); + return !result; + }); + + result || (result = wrapped); + if (result == func) { + result = forceCurry ? curry(result, 1) : function() { + return func.apply(this, arguments); + }; + } + result.convert = createConverter(realName, func); + if (mapping.placeholder[realName]) { + setPlaceholder = true; + result.placeholder = func.placeholder = placeholder; + } + return result; + } + + /*--------------------------------------------------------------------------*/ + + if (!isObj) { + return wrap(name, func); + } + var _ = func; + + // Convert methods by ary cap. + var pairs = []; + each(aryMethodKeys, function(aryKey) { + each(mapping.aryMethod[aryKey], function(key) { + var func = _[mapping.remap[key] || key]; + if (func) { + pairs.push([key, wrap(key, func)]); + } + }); + }); + + // Convert remaining methods. + each(keys(_), function(key) { + var func = _[key]; + if (typeof func == 'function') { + var length = pairs.length; + while (length--) { + if (pairs[length][0] == key) { + return; + } + } + func.convert = createConverter(key, func); + pairs.push([key, func]); + } + }); + + // Assign to `_` leaving `_.prototype` unchanged to allow chaining. + each(pairs, function(pair) { + _[pair[0]] = pair[1]; + }); + + _.convert = convertLib; + if (setPlaceholder) { + _.placeholder = placeholder; + } + // Assign aliases. + each(keys(_), function(key) { + each(mapping.realToAlias[key] || [], function(alias) { + _[alias] = _[key]; + }); + }); + + return _; +} + +module.exports = baseConvert; diff --git a/node_modules/umzug/node_modules/lodash/fp/_convertBrowser.js b/node_modules/umzug/node_modules/lodash/fp/_convertBrowser.js new file mode 100644 index 0000000..bde030d --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/_convertBrowser.js @@ -0,0 +1,18 @@ +var baseConvert = require('./_baseConvert'); + +/** + * Converts `lodash` to an immutable auto-curried iteratee-first data-last + * version with conversion `options` applied. + * + * @param {Function} lodash The lodash function to convert. + * @param {Object} [options] The options object. See `baseConvert` for more details. + * @returns {Function} Returns the converted `lodash`. + */ +function browserConvert(lodash, options) { + return baseConvert(lodash, lodash, options); +} + +if (typeof _ == 'function' && typeof _.runInContext == 'function') { + _ = browserConvert(_.runInContext()); +} +module.exports = browserConvert; diff --git a/node_modules/umzug/node_modules/lodash/fp/_falseOptions.js b/node_modules/umzug/node_modules/lodash/fp/_falseOptions.js new file mode 100644 index 0000000..773235e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/_falseOptions.js @@ -0,0 +1,7 @@ +module.exports = { + 'cap': false, + 'curry': false, + 'fixed': false, + 'immutable': false, + 'rearg': false +}; diff --git a/node_modules/umzug/node_modules/lodash/fp/_mapping.js b/node_modules/umzug/node_modules/lodash/fp/_mapping.js new file mode 100644 index 0000000..8f5ddf2 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/_mapping.js @@ -0,0 +1,368 @@ +/** Used to map aliases to their real names. */ +exports.aliasToReal = { + + // Lodash aliases. + 'each': 'forEach', + 'eachRight': 'forEachRight', + 'entries': 'toPairs', + 'entriesIn': 'toPairsIn', + 'extend': 'assignIn', + 'extendAll': 'assignInAll', + 'extendAllWith': 'assignInAllWith', + 'extendWith': 'assignInWith', + 'first': 'head', + + // Methods that are curried variants of others. + 'conforms': 'conformsTo', + 'matches': 'isMatch', + 'property': 'get', + + // Ramda aliases. + '__': 'placeholder', + 'F': 'stubFalse', + 'T': 'stubTrue', + 'all': 'every', + 'allPass': 'overEvery', + 'always': 'constant', + 'any': 'some', + 'anyPass': 'overSome', + 'apply': 'spread', + 'assoc': 'set', + 'assocPath': 'set', + 'complement': 'negate', + 'compose': 'flowRight', + 'contains': 'includes', + 'dissoc': 'unset', + 'dissocPath': 'unset', + 'dropLast': 'dropRight', + 'dropLastWhile': 'dropRightWhile', + 'equals': 'isEqual', + 'identical': 'eq', + 'indexBy': 'keyBy', + 'init': 'initial', + 'invertObj': 'invert', + 'juxt': 'over', + 'omitAll': 'omit', + 'nAry': 'ary', + 'path': 'get', + 'pathEq': 'matchesProperty', + 'pathOr': 'getOr', + 'paths': 'at', + 'pickAll': 'pick', + 'pipe': 'flow', + 'pluck': 'map', + 'prop': 'get', + 'propEq': 'matchesProperty', + 'propOr': 'getOr', + 'props': 'at', + 'symmetricDifference': 'xor', + 'symmetricDifferenceBy': 'xorBy', + 'symmetricDifferenceWith': 'xorWith', + 'takeLast': 'takeRight', + 'takeLastWhile': 'takeRightWhile', + 'unapply': 'rest', + 'unnest': 'flatten', + 'useWith': 'overArgs', + 'where': 'conformsTo', + 'whereEq': 'isMatch', + 'zipObj': 'zipObject' +}; + +/** Used to map ary to method names. */ +exports.aryMethod = { + '1': [ + 'assignAll', 'assignInAll', 'attempt', 'castArray', 'ceil', 'create', + 'curry', 'curryRight', 'defaultsAll', 'defaultsDeepAll', 'floor', 'flow', + 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', 'mergeAll', + 'methodOf', 'mixin', 'nthArg', 'over', 'overEvery', 'overSome','rest', 'reverse', + 'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart', + 'uniqueId', 'words', 'zipAll' + ], + '2': [ + 'add', 'after', 'ary', 'assign', 'assignAllWith', 'assignIn', 'assignInAllWith', + 'at', 'before', 'bind', 'bindAll', 'bindKey', 'chunk', 'cloneDeepWith', + 'cloneWith', 'concat', 'conformsTo', 'countBy', 'curryN', 'curryRightN', + 'debounce', 'defaults', 'defaultsDeep', 'defaultTo', 'delay', 'difference', + 'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq', + 'every', 'filter', 'find', 'findIndex', 'findKey', 'findLast', 'findLastIndex', + 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth', 'forEach', + 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight', 'get', + 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf', 'intersection', + 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch', 'join', 'keyBy', + 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues', 'matchesProperty', + 'maxBy', 'meanBy', 'merge', 'mergeAllWith', 'minBy', 'multiply', 'nth', 'omit', + 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial', + 'partialRight', 'partition', 'pick', 'pickBy', 'propertyOf', 'pull', 'pullAll', + 'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove', + 'repeat', 'restFrom', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex', + 'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy', + 'split', 'spreadFrom', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight', + 'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', 'times', 'trimChars', + 'trimCharsEnd', 'trimCharsStart', 'truncate', 'union', 'uniqBy', 'uniqWith', + 'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject', + 'zipObjectDeep' + ], + '3': [ + 'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith', + 'findFrom', 'findIndexFrom', 'findLastFrom', 'findLastIndexFrom', 'getOr', + 'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith', + 'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth', + 'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd', + 'padCharsStart', 'pullAllBy', 'pullAllWith', 'rangeStep', 'rangeStepRight', + 'reduce', 'reduceRight', 'replace', 'set', 'slice', 'sortedIndexBy', + 'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith', 'update', 'xorBy', + 'xorWith', 'zipWith' + ], + '4': [ + 'fill', 'setWith', 'updateWith' + ] +}; + +/** Used to map ary to rearg configs. */ +exports.aryRearg = { + '2': [1, 0], + '3': [2, 0, 1], + '4': [3, 2, 0, 1] +}; + +/** Used to map method names to their iteratee ary. */ +exports.iterateeAry = { + 'dropRightWhile': 1, + 'dropWhile': 1, + 'every': 1, + 'filter': 1, + 'find': 1, + 'findFrom': 1, + 'findIndex': 1, + 'findIndexFrom': 1, + 'findKey': 1, + 'findLast': 1, + 'findLastFrom': 1, + 'findLastIndex': 1, + 'findLastIndexFrom': 1, + 'findLastKey': 1, + 'flatMap': 1, + 'flatMapDeep': 1, + 'flatMapDepth': 1, + 'forEach': 1, + 'forEachRight': 1, + 'forIn': 1, + 'forInRight': 1, + 'forOwn': 1, + 'forOwnRight': 1, + 'map': 1, + 'mapKeys': 1, + 'mapValues': 1, + 'partition': 1, + 'reduce': 2, + 'reduceRight': 2, + 'reject': 1, + 'remove': 1, + 'some': 1, + 'takeRightWhile': 1, + 'takeWhile': 1, + 'times': 1, + 'transform': 2 +}; + +/** Used to map method names to iteratee rearg configs. */ +exports.iterateeRearg = { + 'mapKeys': [1], + 'reduceRight': [1, 0] +}; + +/** Used to map method names to rearg configs. */ +exports.methodRearg = { + 'assignInAllWith': [1, 0], + 'assignInWith': [1, 2, 0], + 'assignAllWith': [1, 0], + 'assignWith': [1, 2, 0], + 'differenceBy': [1, 2, 0], + 'differenceWith': [1, 2, 0], + 'getOr': [2, 1, 0], + 'intersectionBy': [1, 2, 0], + 'intersectionWith': [1, 2, 0], + 'isEqualWith': [1, 2, 0], + 'isMatchWith': [2, 1, 0], + 'mergeAllWith': [1, 0], + 'mergeWith': [1, 2, 0], + 'padChars': [2, 1, 0], + 'padCharsEnd': [2, 1, 0], + 'padCharsStart': [2, 1, 0], + 'pullAllBy': [2, 1, 0], + 'pullAllWith': [2, 1, 0], + 'rangeStep': [1, 2, 0], + 'rangeStepRight': [1, 2, 0], + 'setWith': [3, 1, 2, 0], + 'sortedIndexBy': [2, 1, 0], + 'sortedLastIndexBy': [2, 1, 0], + 'unionBy': [1, 2, 0], + 'unionWith': [1, 2, 0], + 'updateWith': [3, 1, 2, 0], + 'xorBy': [1, 2, 0], + 'xorWith': [1, 2, 0], + 'zipWith': [1, 2, 0] +}; + +/** Used to map method names to spread configs. */ +exports.methodSpread = { + 'assignAll': { 'start': 0 }, + 'assignAllWith': { 'start': 0 }, + 'assignInAll': { 'start': 0 }, + 'assignInAllWith': { 'start': 0 }, + 'defaultsAll': { 'start': 0 }, + 'defaultsDeepAll': { 'start': 0 }, + 'invokeArgs': { 'start': 2 }, + 'invokeArgsMap': { 'start': 2 }, + 'mergeAll': { 'start': 0 }, + 'mergeAllWith': { 'start': 0 }, + 'partial': { 'start': 1 }, + 'partialRight': { 'start': 1 }, + 'without': { 'start': 1 }, + 'zipAll': { 'start': 0 } +}; + +/** Used to identify methods which mutate arrays or objects. */ +exports.mutate = { + 'array': { + 'fill': true, + 'pull': true, + 'pullAll': true, + 'pullAllBy': true, + 'pullAllWith': true, + 'pullAt': true, + 'remove': true, + 'reverse': true + }, + 'object': { + 'assign': true, + 'assignAll': true, + 'assignAllWith': true, + 'assignIn': true, + 'assignInAll': true, + 'assignInAllWith': true, + 'assignInWith': true, + 'assignWith': true, + 'defaults': true, + 'defaultsAll': true, + 'defaultsDeep': true, + 'defaultsDeepAll': true, + 'merge': true, + 'mergeAll': true, + 'mergeAllWith': true, + 'mergeWith': true, + }, + 'set': { + 'set': true, + 'setWith': true, + 'unset': true, + 'update': true, + 'updateWith': true + } +}; + +/** Used to track methods with placeholder support */ +exports.placeholder = { + 'bind': true, + 'bindKey': true, + 'curry': true, + 'curryRight': true, + 'partial': true, + 'partialRight': true +}; + +/** Used to map real names to their aliases. */ +exports.realToAlias = (function() { + var hasOwnProperty = Object.prototype.hasOwnProperty, + object = exports.aliasToReal, + result = {}; + + for (var key in object) { + var value = object[key]; + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } + } + return result; +}()); + +/** Used to map method names to other names. */ +exports.remap = { + 'assignAll': 'assign', + 'assignAllWith': 'assignWith', + 'assignInAll': 'assignIn', + 'assignInAllWith': 'assignInWith', + 'curryN': 'curry', + 'curryRightN': 'curryRight', + 'defaultsAll': 'defaults', + 'defaultsDeepAll': 'defaultsDeep', + 'findFrom': 'find', + 'findIndexFrom': 'findIndex', + 'findLastFrom': 'findLast', + 'findLastIndexFrom': 'findLastIndex', + 'getOr': 'get', + 'includesFrom': 'includes', + 'indexOfFrom': 'indexOf', + 'invokeArgs': 'invoke', + 'invokeArgsMap': 'invokeMap', + 'lastIndexOfFrom': 'lastIndexOf', + 'mergeAll': 'merge', + 'mergeAllWith': 'mergeWith', + 'padChars': 'pad', + 'padCharsEnd': 'padEnd', + 'padCharsStart': 'padStart', + 'propertyOf': 'get', + 'rangeStep': 'range', + 'rangeStepRight': 'rangeRight', + 'restFrom': 'rest', + 'spreadFrom': 'spread', + 'trimChars': 'trim', + 'trimCharsEnd': 'trimEnd', + 'trimCharsStart': 'trimStart', + 'zipAll': 'zip' +}; + +/** Used to track methods that skip fixing their arity. */ +exports.skipFixed = { + 'castArray': true, + 'flow': true, + 'flowRight': true, + 'iteratee': true, + 'mixin': true, + 'rearg': true, + 'runInContext': true +}; + +/** Used to track methods that skip rearranging arguments. */ +exports.skipRearg = { + 'add': true, + 'assign': true, + 'assignIn': true, + 'bind': true, + 'bindKey': true, + 'concat': true, + 'difference': true, + 'divide': true, + 'eq': true, + 'gt': true, + 'gte': true, + 'isEqual': true, + 'lt': true, + 'lte': true, + 'matchesProperty': true, + 'merge': true, + 'multiply': true, + 'overArgs': true, + 'partial': true, + 'partialRight': true, + 'propertyOf': true, + 'random': true, + 'range': true, + 'rangeRight': true, + 'subtract': true, + 'zip': true, + 'zipObject': true, + 'zipObjectDeep': true +}; diff --git a/node_modules/umzug/node_modules/lodash/fp/_util.js b/node_modules/umzug/node_modules/lodash/fp/_util.js new file mode 100644 index 0000000..7084463 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/_util.js @@ -0,0 +1,14 @@ +module.exports = { + 'ary': require('../ary'), + 'assign': require('../_baseAssign'), + 'clone': require('../clone'), + 'curry': require('../curry'), + 'forEach': require('../_arrayEach'), + 'isArray': require('../isArray'), + 'isFunction': require('../isFunction'), + 'iteratee': require('../iteratee'), + 'keys': require('../_baseKeys'), + 'rearg': require('../rearg'), + 'toInteger': require('../toInteger'), + 'toPath': require('../toPath') +}; diff --git a/node_modules/umzug/node_modules/lodash/fp/add.js b/node_modules/umzug/node_modules/lodash/fp/add.js new file mode 100644 index 0000000..816eeec --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/add.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('add', require('../add')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/after.js b/node_modules/umzug/node_modules/lodash/fp/after.js new file mode 100644 index 0000000..21a0167 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/after.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('after', require('../after')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/all.js b/node_modules/umzug/node_modules/lodash/fp/all.js new file mode 100644 index 0000000..d0839f7 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/all.js @@ -0,0 +1 @@ +module.exports = require('./every'); diff --git a/node_modules/umzug/node_modules/lodash/fp/allPass.js b/node_modules/umzug/node_modules/lodash/fp/allPass.js new file mode 100644 index 0000000..79b73ef --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/allPass.js @@ -0,0 +1 @@ +module.exports = require('./overEvery'); diff --git a/node_modules/umzug/node_modules/lodash/fp/always.js b/node_modules/umzug/node_modules/lodash/fp/always.js new file mode 100644 index 0000000..9887703 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/always.js @@ -0,0 +1 @@ +module.exports = require('./constant'); diff --git a/node_modules/umzug/node_modules/lodash/fp/any.js b/node_modules/umzug/node_modules/lodash/fp/any.js new file mode 100644 index 0000000..900ac25 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/any.js @@ -0,0 +1 @@ +module.exports = require('./some'); diff --git a/node_modules/umzug/node_modules/lodash/fp/anyPass.js b/node_modules/umzug/node_modules/lodash/fp/anyPass.js new file mode 100644 index 0000000..2774ab3 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/anyPass.js @@ -0,0 +1 @@ +module.exports = require('./overSome'); diff --git a/node_modules/umzug/node_modules/lodash/fp/apply.js b/node_modules/umzug/node_modules/lodash/fp/apply.js new file mode 100644 index 0000000..2b75712 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/apply.js @@ -0,0 +1 @@ +module.exports = require('./spread'); diff --git a/node_modules/umzug/node_modules/lodash/fp/array.js b/node_modules/umzug/node_modules/lodash/fp/array.js new file mode 100644 index 0000000..fe939c2 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/array.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../array')); diff --git a/node_modules/umzug/node_modules/lodash/fp/ary.js b/node_modules/umzug/node_modules/lodash/fp/ary.js new file mode 100644 index 0000000..8edf187 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/ary.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('ary', require('../ary')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/assign.js b/node_modules/umzug/node_modules/lodash/fp/assign.js new file mode 100644 index 0000000..23f47af --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/assign.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assign', require('../assign')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/assignAll.js b/node_modules/umzug/node_modules/lodash/fp/assignAll.js new file mode 100644 index 0000000..b1d36c7 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/assignAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignAll', require('../assign')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/assignAllWith.js b/node_modules/umzug/node_modules/lodash/fp/assignAllWith.js new file mode 100644 index 0000000..21e836e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/assignAllWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignAllWith', require('../assignWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/assignIn.js b/node_modules/umzug/node_modules/lodash/fp/assignIn.js new file mode 100644 index 0000000..6e7c65f --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/assignIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignIn', require('../assignIn')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/assignInAll.js b/node_modules/umzug/node_modules/lodash/fp/assignInAll.js new file mode 100644 index 0000000..7ba75db --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/assignInAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignInAll', require('../assignIn')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/assignInAllWith.js b/node_modules/umzug/node_modules/lodash/fp/assignInAllWith.js new file mode 100644 index 0000000..e766903 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/assignInAllWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignInAllWith', require('../assignInWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/assignInWith.js b/node_modules/umzug/node_modules/lodash/fp/assignInWith.js new file mode 100644 index 0000000..acb5923 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/assignInWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignInWith', require('../assignInWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/assignWith.js b/node_modules/umzug/node_modules/lodash/fp/assignWith.js new file mode 100644 index 0000000..eb92521 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/assignWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignWith', require('../assignWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/assoc.js b/node_modules/umzug/node_modules/lodash/fp/assoc.js new file mode 100644 index 0000000..7648820 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/assoc.js @@ -0,0 +1 @@ +module.exports = require('./set'); diff --git a/node_modules/umzug/node_modules/lodash/fp/assocPath.js b/node_modules/umzug/node_modules/lodash/fp/assocPath.js new file mode 100644 index 0000000..7648820 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/assocPath.js @@ -0,0 +1 @@ +module.exports = require('./set'); diff --git a/node_modules/umzug/node_modules/lodash/fp/at.js b/node_modules/umzug/node_modules/lodash/fp/at.js new file mode 100644 index 0000000..cc39d25 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/at.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('at', require('../at')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/attempt.js b/node_modules/umzug/node_modules/lodash/fp/attempt.js new file mode 100644 index 0000000..26ca42e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/attempt.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('attempt', require('../attempt')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/before.js b/node_modules/umzug/node_modules/lodash/fp/before.js new file mode 100644 index 0000000..7a2de65 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/before.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('before', require('../before')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/bind.js b/node_modules/umzug/node_modules/lodash/fp/bind.js new file mode 100644 index 0000000..5cbe4f3 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/bind.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('bind', require('../bind')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/bindAll.js b/node_modules/umzug/node_modules/lodash/fp/bindAll.js new file mode 100644 index 0000000..6b4a4a0 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/bindAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('bindAll', require('../bindAll')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/bindKey.js b/node_modules/umzug/node_modules/lodash/fp/bindKey.js new file mode 100644 index 0000000..6a46c6b --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/bindKey.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('bindKey', require('../bindKey')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/camelCase.js b/node_modules/umzug/node_modules/lodash/fp/camelCase.js new file mode 100644 index 0000000..87b77b4 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/camelCase.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('camelCase', require('../camelCase'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/capitalize.js b/node_modules/umzug/node_modules/lodash/fp/capitalize.js new file mode 100644 index 0000000..cac74e1 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/capitalize.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('capitalize', require('../capitalize'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/castArray.js b/node_modules/umzug/node_modules/lodash/fp/castArray.js new file mode 100644 index 0000000..8681c09 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/castArray.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('castArray', require('../castArray')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/ceil.js b/node_modules/umzug/node_modules/lodash/fp/ceil.js new file mode 100644 index 0000000..f416b72 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/ceil.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('ceil', require('../ceil')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/chain.js b/node_modules/umzug/node_modules/lodash/fp/chain.js new file mode 100644 index 0000000..604fe39 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/chain.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('chain', require('../chain'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/chunk.js b/node_modules/umzug/node_modules/lodash/fp/chunk.js new file mode 100644 index 0000000..871ab08 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/chunk.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('chunk', require('../chunk')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/clamp.js b/node_modules/umzug/node_modules/lodash/fp/clamp.js new file mode 100644 index 0000000..3b06c01 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/clamp.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('clamp', require('../clamp')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/clone.js b/node_modules/umzug/node_modules/lodash/fp/clone.js new file mode 100644 index 0000000..cadb59c --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/clone.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('clone', require('../clone'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/cloneDeep.js b/node_modules/umzug/node_modules/lodash/fp/cloneDeep.js new file mode 100644 index 0000000..a6107aa --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/cloneDeep.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('cloneDeep', require('../cloneDeep'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/cloneDeepWith.js b/node_modules/umzug/node_modules/lodash/fp/cloneDeepWith.js new file mode 100644 index 0000000..6f01e44 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/cloneDeepWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('cloneDeepWith', require('../cloneDeepWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/cloneWith.js b/node_modules/umzug/node_modules/lodash/fp/cloneWith.js new file mode 100644 index 0000000..aa88578 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/cloneWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('cloneWith', require('../cloneWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/collection.js b/node_modules/umzug/node_modules/lodash/fp/collection.js new file mode 100644 index 0000000..fc8b328 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/collection.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../collection')); diff --git a/node_modules/umzug/node_modules/lodash/fp/commit.js b/node_modules/umzug/node_modules/lodash/fp/commit.js new file mode 100644 index 0000000..130a894 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/commit.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('commit', require('../commit'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/compact.js b/node_modules/umzug/node_modules/lodash/fp/compact.js new file mode 100644 index 0000000..ce8f7a1 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/compact.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('compact', require('../compact'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/complement.js b/node_modules/umzug/node_modules/lodash/fp/complement.js new file mode 100644 index 0000000..93eb462 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/complement.js @@ -0,0 +1 @@ +module.exports = require('./negate'); diff --git a/node_modules/umzug/node_modules/lodash/fp/compose.js b/node_modules/umzug/node_modules/lodash/fp/compose.js new file mode 100644 index 0000000..1954e94 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/compose.js @@ -0,0 +1 @@ +module.exports = require('./flowRight'); diff --git a/node_modules/umzug/node_modules/lodash/fp/concat.js b/node_modules/umzug/node_modules/lodash/fp/concat.js new file mode 100644 index 0000000..e59346a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/concat.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('concat', require('../concat')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/cond.js b/node_modules/umzug/node_modules/lodash/fp/cond.js new file mode 100644 index 0000000..6a0120e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/cond.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('cond', require('../cond'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/conforms.js b/node_modules/umzug/node_modules/lodash/fp/conforms.js new file mode 100644 index 0000000..3247f64 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/conforms.js @@ -0,0 +1 @@ +module.exports = require('./conformsTo'); diff --git a/node_modules/umzug/node_modules/lodash/fp/conformsTo.js b/node_modules/umzug/node_modules/lodash/fp/conformsTo.js new file mode 100644 index 0000000..aa7f41e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/conformsTo.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('conformsTo', require('../conformsTo')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/constant.js b/node_modules/umzug/node_modules/lodash/fp/constant.js new file mode 100644 index 0000000..9e406fc --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/constant.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('constant', require('../constant'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/contains.js b/node_modules/umzug/node_modules/lodash/fp/contains.js new file mode 100644 index 0000000..594722a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/contains.js @@ -0,0 +1 @@ +module.exports = require('./includes'); diff --git a/node_modules/umzug/node_modules/lodash/fp/convert.js b/node_modules/umzug/node_modules/lodash/fp/convert.js new file mode 100644 index 0000000..4795dc4 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/convert.js @@ -0,0 +1,18 @@ +var baseConvert = require('./_baseConvert'), + util = require('./_util'); + +/** + * Converts `func` of `name` to an immutable auto-curried iteratee-first data-last + * version with conversion `options` applied. If `name` is an object its methods + * will be converted. + * + * @param {string} name The name of the function to wrap. + * @param {Function} [func] The function to wrap. + * @param {Object} [options] The options object. See `baseConvert` for more details. + * @returns {Function|Object} Returns the converted function or object. + */ +function convert(name, func, options) { + return baseConvert(util, name, func, options); +} + +module.exports = convert; diff --git a/node_modules/umzug/node_modules/lodash/fp/countBy.js b/node_modules/umzug/node_modules/lodash/fp/countBy.js new file mode 100644 index 0000000..dfa4643 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/countBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('countBy', require('../countBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/create.js b/node_modules/umzug/node_modules/lodash/fp/create.js new file mode 100644 index 0000000..752025f --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/create.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('create', require('../create')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/curry.js b/node_modules/umzug/node_modules/lodash/fp/curry.js new file mode 100644 index 0000000..b0b4168 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/curry.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('curry', require('../curry')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/curryN.js b/node_modules/umzug/node_modules/lodash/fp/curryN.js new file mode 100644 index 0000000..2ae7d00 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/curryN.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('curryN', require('../curry')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/curryRight.js b/node_modules/umzug/node_modules/lodash/fp/curryRight.js new file mode 100644 index 0000000..cb619eb --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/curryRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('curryRight', require('../curryRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/curryRightN.js b/node_modules/umzug/node_modules/lodash/fp/curryRightN.js new file mode 100644 index 0000000..2495afc --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/curryRightN.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('curryRightN', require('../curryRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/date.js b/node_modules/umzug/node_modules/lodash/fp/date.js new file mode 100644 index 0000000..82cb952 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/date.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../date')); diff --git a/node_modules/umzug/node_modules/lodash/fp/debounce.js b/node_modules/umzug/node_modules/lodash/fp/debounce.js new file mode 100644 index 0000000..2612229 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/debounce.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('debounce', require('../debounce')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/deburr.js b/node_modules/umzug/node_modules/lodash/fp/deburr.js new file mode 100644 index 0000000..96463ab --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/deburr.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('deburr', require('../deburr'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/defaultTo.js b/node_modules/umzug/node_modules/lodash/fp/defaultTo.js new file mode 100644 index 0000000..d6b52a4 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/defaultTo.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defaultTo', require('../defaultTo')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/defaults.js b/node_modules/umzug/node_modules/lodash/fp/defaults.js new file mode 100644 index 0000000..e1a8e6e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/defaults.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defaults', require('../defaults')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/defaultsAll.js b/node_modules/umzug/node_modules/lodash/fp/defaultsAll.js new file mode 100644 index 0000000..238fcc3 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/defaultsAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defaultsAll', require('../defaults')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/defaultsDeep.js b/node_modules/umzug/node_modules/lodash/fp/defaultsDeep.js new file mode 100644 index 0000000..1f172ff --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/defaultsDeep.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defaultsDeep', require('../defaultsDeep')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/defaultsDeepAll.js b/node_modules/umzug/node_modules/lodash/fp/defaultsDeepAll.js new file mode 100644 index 0000000..6835f2f --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/defaultsDeepAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defaultsDeepAll', require('../defaultsDeep')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/defer.js b/node_modules/umzug/node_modules/lodash/fp/defer.js new file mode 100644 index 0000000..ec7990f --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/defer.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defer', require('../defer'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/delay.js b/node_modules/umzug/node_modules/lodash/fp/delay.js new file mode 100644 index 0000000..556dbd5 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/delay.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('delay', require('../delay')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/difference.js b/node_modules/umzug/node_modules/lodash/fp/difference.js new file mode 100644 index 0000000..2d03765 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/difference.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('difference', require('../difference')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/differenceBy.js b/node_modules/umzug/node_modules/lodash/fp/differenceBy.js new file mode 100644 index 0000000..2f91491 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/differenceBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('differenceBy', require('../differenceBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/differenceWith.js b/node_modules/umzug/node_modules/lodash/fp/differenceWith.js new file mode 100644 index 0000000..bcf5ad2 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/differenceWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('differenceWith', require('../differenceWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/dissoc.js b/node_modules/umzug/node_modules/lodash/fp/dissoc.js new file mode 100644 index 0000000..7ec7be1 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/dissoc.js @@ -0,0 +1 @@ +module.exports = require('./unset'); diff --git a/node_modules/umzug/node_modules/lodash/fp/dissocPath.js b/node_modules/umzug/node_modules/lodash/fp/dissocPath.js new file mode 100644 index 0000000..7ec7be1 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/dissocPath.js @@ -0,0 +1 @@ +module.exports = require('./unset'); diff --git a/node_modules/umzug/node_modules/lodash/fp/divide.js b/node_modules/umzug/node_modules/lodash/fp/divide.js new file mode 100644 index 0000000..82048c5 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/divide.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('divide', require('../divide')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/drop.js b/node_modules/umzug/node_modules/lodash/fp/drop.js new file mode 100644 index 0000000..2fa9b4f --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/drop.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('drop', require('../drop')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/dropLast.js b/node_modules/umzug/node_modules/lodash/fp/dropLast.js new file mode 100644 index 0000000..174e525 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/dropLast.js @@ -0,0 +1 @@ +module.exports = require('./dropRight'); diff --git a/node_modules/umzug/node_modules/lodash/fp/dropLastWhile.js b/node_modules/umzug/node_modules/lodash/fp/dropLastWhile.js new file mode 100644 index 0000000..be2a9d2 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/dropLastWhile.js @@ -0,0 +1 @@ +module.exports = require('./dropRightWhile'); diff --git a/node_modules/umzug/node_modules/lodash/fp/dropRight.js b/node_modules/umzug/node_modules/lodash/fp/dropRight.js new file mode 100644 index 0000000..e98881f --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/dropRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('dropRight', require('../dropRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/dropRightWhile.js b/node_modules/umzug/node_modules/lodash/fp/dropRightWhile.js new file mode 100644 index 0000000..cacaa70 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/dropRightWhile.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('dropRightWhile', require('../dropRightWhile')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/dropWhile.js b/node_modules/umzug/node_modules/lodash/fp/dropWhile.js new file mode 100644 index 0000000..285f864 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/dropWhile.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('dropWhile', require('../dropWhile')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/each.js b/node_modules/umzug/node_modules/lodash/fp/each.js new file mode 100644 index 0000000..8800f42 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/each.js @@ -0,0 +1 @@ +module.exports = require('./forEach'); diff --git a/node_modules/umzug/node_modules/lodash/fp/eachRight.js b/node_modules/umzug/node_modules/lodash/fp/eachRight.js new file mode 100644 index 0000000..3252b2a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/eachRight.js @@ -0,0 +1 @@ +module.exports = require('./forEachRight'); diff --git a/node_modules/umzug/node_modules/lodash/fp/endsWith.js b/node_modules/umzug/node_modules/lodash/fp/endsWith.js new file mode 100644 index 0000000..17dc2a4 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/endsWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('endsWith', require('../endsWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/entries.js b/node_modules/umzug/node_modules/lodash/fp/entries.js new file mode 100644 index 0000000..7a88df2 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/entries.js @@ -0,0 +1 @@ +module.exports = require('./toPairs'); diff --git a/node_modules/umzug/node_modules/lodash/fp/entriesIn.js b/node_modules/umzug/node_modules/lodash/fp/entriesIn.js new file mode 100644 index 0000000..f6c6331 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/entriesIn.js @@ -0,0 +1 @@ +module.exports = require('./toPairsIn'); diff --git a/node_modules/umzug/node_modules/lodash/fp/eq.js b/node_modules/umzug/node_modules/lodash/fp/eq.js new file mode 100644 index 0000000..9a3d21b --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/eq.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('eq', require('../eq')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/equals.js b/node_modules/umzug/node_modules/lodash/fp/equals.js new file mode 100644 index 0000000..e6a5ce0 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/equals.js @@ -0,0 +1 @@ +module.exports = require('./isEqual'); diff --git a/node_modules/umzug/node_modules/lodash/fp/escape.js b/node_modules/umzug/node_modules/lodash/fp/escape.js new file mode 100644 index 0000000..52c1fbb --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/escape.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('escape', require('../escape'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/escapeRegExp.js b/node_modules/umzug/node_modules/lodash/fp/escapeRegExp.js new file mode 100644 index 0000000..369b2ef --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/escapeRegExp.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('escapeRegExp', require('../escapeRegExp'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/every.js b/node_modules/umzug/node_modules/lodash/fp/every.js new file mode 100644 index 0000000..95c2776 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/every.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('every', require('../every')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/extend.js b/node_modules/umzug/node_modules/lodash/fp/extend.js new file mode 100644 index 0000000..e00166c --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/extend.js @@ -0,0 +1 @@ +module.exports = require('./assignIn'); diff --git a/node_modules/umzug/node_modules/lodash/fp/extendAll.js b/node_modules/umzug/node_modules/lodash/fp/extendAll.js new file mode 100644 index 0000000..cc55b64 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/extendAll.js @@ -0,0 +1 @@ +module.exports = require('./assignInAll'); diff --git a/node_modules/umzug/node_modules/lodash/fp/extendAllWith.js b/node_modules/umzug/node_modules/lodash/fp/extendAllWith.js new file mode 100644 index 0000000..6679d20 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/extendAllWith.js @@ -0,0 +1 @@ +module.exports = require('./assignInAllWith'); diff --git a/node_modules/umzug/node_modules/lodash/fp/extendWith.js b/node_modules/umzug/node_modules/lodash/fp/extendWith.js new file mode 100644 index 0000000..dbdcb3b --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/extendWith.js @@ -0,0 +1 @@ +module.exports = require('./assignInWith'); diff --git a/node_modules/umzug/node_modules/lodash/fp/fill.js b/node_modules/umzug/node_modules/lodash/fp/fill.js new file mode 100644 index 0000000..b2d47e8 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/fill.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('fill', require('../fill')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/filter.js b/node_modules/umzug/node_modules/lodash/fp/filter.js new file mode 100644 index 0000000..796d501 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/filter.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('filter', require('../filter')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/find.js b/node_modules/umzug/node_modules/lodash/fp/find.js new file mode 100644 index 0000000..f805d33 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/find.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('find', require('../find')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/findFrom.js b/node_modules/umzug/node_modules/lodash/fp/findFrom.js new file mode 100644 index 0000000..da8275e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/findFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findFrom', require('../find')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/findIndex.js b/node_modules/umzug/node_modules/lodash/fp/findIndex.js new file mode 100644 index 0000000..8c15fd1 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/findIndex.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findIndex', require('../findIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/findIndexFrom.js b/node_modules/umzug/node_modules/lodash/fp/findIndexFrom.js new file mode 100644 index 0000000..32e98cb --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/findIndexFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findIndexFrom', require('../findIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/findKey.js b/node_modules/umzug/node_modules/lodash/fp/findKey.js new file mode 100644 index 0000000..475bcfa --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/findKey.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findKey', require('../findKey')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/findLast.js b/node_modules/umzug/node_modules/lodash/fp/findLast.js new file mode 100644 index 0000000..093fe94 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/findLast.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findLast', require('../findLast')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/findLastFrom.js b/node_modules/umzug/node_modules/lodash/fp/findLastFrom.js new file mode 100644 index 0000000..76c38fb --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/findLastFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findLastFrom', require('../findLast')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/findLastIndex.js b/node_modules/umzug/node_modules/lodash/fp/findLastIndex.js new file mode 100644 index 0000000..36986df --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/findLastIndex.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findLastIndex', require('../findLastIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/findLastIndexFrom.js b/node_modules/umzug/node_modules/lodash/fp/findLastIndexFrom.js new file mode 100644 index 0000000..34c8176 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/findLastIndexFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findLastIndexFrom', require('../findLastIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/findLastKey.js b/node_modules/umzug/node_modules/lodash/fp/findLastKey.js new file mode 100644 index 0000000..5f81b60 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/findLastKey.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findLastKey', require('../findLastKey')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/first.js b/node_modules/umzug/node_modules/lodash/fp/first.js new file mode 100644 index 0000000..53f4ad1 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/first.js @@ -0,0 +1 @@ +module.exports = require('./head'); diff --git a/node_modules/umzug/node_modules/lodash/fp/flatMap.js b/node_modules/umzug/node_modules/lodash/fp/flatMap.js new file mode 100644 index 0000000..d01dc4d --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/flatMap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flatMap', require('../flatMap')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/flatMapDeep.js b/node_modules/umzug/node_modules/lodash/fp/flatMapDeep.js new file mode 100644 index 0000000..569c42e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/flatMapDeep.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flatMapDeep', require('../flatMapDeep')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/flatMapDepth.js b/node_modules/umzug/node_modules/lodash/fp/flatMapDepth.js new file mode 100644 index 0000000..6eb68fd --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/flatMapDepth.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flatMapDepth', require('../flatMapDepth')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/flatten.js b/node_modules/umzug/node_modules/lodash/fp/flatten.js new file mode 100644 index 0000000..30425d8 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/flatten.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flatten', require('../flatten'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/flattenDeep.js b/node_modules/umzug/node_modules/lodash/fp/flattenDeep.js new file mode 100644 index 0000000..aed5db2 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/flattenDeep.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flattenDeep', require('../flattenDeep'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/flattenDepth.js b/node_modules/umzug/node_modules/lodash/fp/flattenDepth.js new file mode 100644 index 0000000..ad65e37 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/flattenDepth.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flattenDepth', require('../flattenDepth')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/flip.js b/node_modules/umzug/node_modules/lodash/fp/flip.js new file mode 100644 index 0000000..0547e7b --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/flip.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flip', require('../flip'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/floor.js b/node_modules/umzug/node_modules/lodash/fp/floor.js new file mode 100644 index 0000000..a6cf335 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/floor.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('floor', require('../floor')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/flow.js b/node_modules/umzug/node_modules/lodash/fp/flow.js new file mode 100644 index 0000000..cd83677 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/flow.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flow', require('../flow')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/flowRight.js b/node_modules/umzug/node_modules/lodash/fp/flowRight.js new file mode 100644 index 0000000..972a5b9 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/flowRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flowRight', require('../flowRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/forEach.js b/node_modules/umzug/node_modules/lodash/fp/forEach.js new file mode 100644 index 0000000..2f49452 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/forEach.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('forEach', require('../forEach')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/forEachRight.js b/node_modules/umzug/node_modules/lodash/fp/forEachRight.js new file mode 100644 index 0000000..3ff9733 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/forEachRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('forEachRight', require('../forEachRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/forIn.js b/node_modules/umzug/node_modules/lodash/fp/forIn.js new file mode 100644 index 0000000..9341749 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/forIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('forIn', require('../forIn')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/forInRight.js b/node_modules/umzug/node_modules/lodash/fp/forInRight.js new file mode 100644 index 0000000..cecf8bb --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/forInRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('forInRight', require('../forInRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/forOwn.js b/node_modules/umzug/node_modules/lodash/fp/forOwn.js new file mode 100644 index 0000000..246449e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/forOwn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('forOwn', require('../forOwn')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/forOwnRight.js b/node_modules/umzug/node_modules/lodash/fp/forOwnRight.js new file mode 100644 index 0000000..c5e826e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/forOwnRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('forOwnRight', require('../forOwnRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/fromPairs.js b/node_modules/umzug/node_modules/lodash/fp/fromPairs.js new file mode 100644 index 0000000..f8cc596 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/fromPairs.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('fromPairs', require('../fromPairs')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/function.js b/node_modules/umzug/node_modules/lodash/fp/function.js new file mode 100644 index 0000000..dfe69b1 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/function.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../function')); diff --git a/node_modules/umzug/node_modules/lodash/fp/functions.js b/node_modules/umzug/node_modules/lodash/fp/functions.js new file mode 100644 index 0000000..09d1bb1 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/functions.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('functions', require('../functions'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/functionsIn.js b/node_modules/umzug/node_modules/lodash/fp/functionsIn.js new file mode 100644 index 0000000..2cfeb83 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/functionsIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('functionsIn', require('../functionsIn'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/get.js b/node_modules/umzug/node_modules/lodash/fp/get.js new file mode 100644 index 0000000..6d3a328 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/get.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('get', require('../get')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/getOr.js b/node_modules/umzug/node_modules/lodash/fp/getOr.js new file mode 100644 index 0000000..7dbf771 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/getOr.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('getOr', require('../get')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/groupBy.js b/node_modules/umzug/node_modules/lodash/fp/groupBy.js new file mode 100644 index 0000000..fc0bc78 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/groupBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('groupBy', require('../groupBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/gt.js b/node_modules/umzug/node_modules/lodash/fp/gt.js new file mode 100644 index 0000000..9e57c80 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/gt.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('gt', require('../gt')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/gte.js b/node_modules/umzug/node_modules/lodash/fp/gte.js new file mode 100644 index 0000000..4584786 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/gte.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('gte', require('../gte')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/has.js b/node_modules/umzug/node_modules/lodash/fp/has.js new file mode 100644 index 0000000..b901298 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/has.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('has', require('../has')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/hasIn.js b/node_modules/umzug/node_modules/lodash/fp/hasIn.js new file mode 100644 index 0000000..b3c3d1a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/hasIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('hasIn', require('../hasIn')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/head.js b/node_modules/umzug/node_modules/lodash/fp/head.js new file mode 100644 index 0000000..2694f0a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/head.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('head', require('../head'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/identical.js b/node_modules/umzug/node_modules/lodash/fp/identical.js new file mode 100644 index 0000000..85563f4 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/identical.js @@ -0,0 +1 @@ +module.exports = require('./eq'); diff --git a/node_modules/umzug/node_modules/lodash/fp/identity.js b/node_modules/umzug/node_modules/lodash/fp/identity.js new file mode 100644 index 0000000..096415a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/identity.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('identity', require('../identity'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/inRange.js b/node_modules/umzug/node_modules/lodash/fp/inRange.js new file mode 100644 index 0000000..202d940 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/inRange.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('inRange', require('../inRange')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/includes.js b/node_modules/umzug/node_modules/lodash/fp/includes.js new file mode 100644 index 0000000..1146780 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/includes.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('includes', require('../includes')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/includesFrom.js b/node_modules/umzug/node_modules/lodash/fp/includesFrom.js new file mode 100644 index 0000000..683afdb --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/includesFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('includesFrom', require('../includes')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/indexBy.js b/node_modules/umzug/node_modules/lodash/fp/indexBy.js new file mode 100644 index 0000000..7e64bc0 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/indexBy.js @@ -0,0 +1 @@ +module.exports = require('./keyBy'); diff --git a/node_modules/umzug/node_modules/lodash/fp/indexOf.js b/node_modules/umzug/node_modules/lodash/fp/indexOf.js new file mode 100644 index 0000000..524658e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/indexOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('indexOf', require('../indexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/indexOfFrom.js b/node_modules/umzug/node_modules/lodash/fp/indexOfFrom.js new file mode 100644 index 0000000..d99c822 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/indexOfFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('indexOfFrom', require('../indexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/init.js b/node_modules/umzug/node_modules/lodash/fp/init.js new file mode 100644 index 0000000..2f88d8b --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/init.js @@ -0,0 +1 @@ +module.exports = require('./initial'); diff --git a/node_modules/umzug/node_modules/lodash/fp/initial.js b/node_modules/umzug/node_modules/lodash/fp/initial.js new file mode 100644 index 0000000..b732ba0 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/initial.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('initial', require('../initial'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/intersection.js b/node_modules/umzug/node_modules/lodash/fp/intersection.js new file mode 100644 index 0000000..52936d5 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/intersection.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('intersection', require('../intersection')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/intersectionBy.js b/node_modules/umzug/node_modules/lodash/fp/intersectionBy.js new file mode 100644 index 0000000..72629f2 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/intersectionBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('intersectionBy', require('../intersectionBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/intersectionWith.js b/node_modules/umzug/node_modules/lodash/fp/intersectionWith.js new file mode 100644 index 0000000..e064f40 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/intersectionWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('intersectionWith', require('../intersectionWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/invert.js b/node_modules/umzug/node_modules/lodash/fp/invert.js new file mode 100644 index 0000000..2d5d1f0 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/invert.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('invert', require('../invert')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/invertBy.js b/node_modules/umzug/node_modules/lodash/fp/invertBy.js new file mode 100644 index 0000000..63ca97e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/invertBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('invertBy', require('../invertBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/invertObj.js b/node_modules/umzug/node_modules/lodash/fp/invertObj.js new file mode 100644 index 0000000..f1d842e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/invertObj.js @@ -0,0 +1 @@ +module.exports = require('./invert'); diff --git a/node_modules/umzug/node_modules/lodash/fp/invoke.js b/node_modules/umzug/node_modules/lodash/fp/invoke.js new file mode 100644 index 0000000..fcf17f0 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/invoke.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('invoke', require('../invoke')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/invokeArgs.js b/node_modules/umzug/node_modules/lodash/fp/invokeArgs.js new file mode 100644 index 0000000..d3f2953 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/invokeArgs.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('invokeArgs', require('../invoke')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/invokeArgsMap.js b/node_modules/umzug/node_modules/lodash/fp/invokeArgsMap.js new file mode 100644 index 0000000..eaa9f84 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/invokeArgsMap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('invokeArgsMap', require('../invokeMap')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/invokeMap.js b/node_modules/umzug/node_modules/lodash/fp/invokeMap.js new file mode 100644 index 0000000..6515fd7 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/invokeMap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('invokeMap', require('../invokeMap')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/isArguments.js b/node_modules/umzug/node_modules/lodash/fp/isArguments.js new file mode 100644 index 0000000..1d93c9e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/isArguments.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isArguments', require('../isArguments'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/isArray.js b/node_modules/umzug/node_modules/lodash/fp/isArray.js new file mode 100644 index 0000000..ba7ade8 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/isArray.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isArray', require('../isArray'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/isArrayBuffer.js b/node_modules/umzug/node_modules/lodash/fp/isArrayBuffer.js new file mode 100644 index 0000000..5088513 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/isArrayBuffer.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isArrayBuffer', require('../isArrayBuffer'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/isArrayLike.js b/node_modules/umzug/node_modules/lodash/fp/isArrayLike.js new file mode 100644 index 0000000..8f1856b --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/isArrayLike.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isArrayLike', require('../isArrayLike'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/isArrayLikeObject.js b/node_modules/umzug/node_modules/lodash/fp/isArrayLikeObject.js new file mode 100644 index 0000000..2108498 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/isArrayLikeObject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isArrayLikeObject', require('../isArrayLikeObject'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/isBoolean.js b/node_modules/umzug/node_modules/lodash/fp/isBoolean.js new file mode 100644 index 0000000..9339f75 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/isBoolean.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isBoolean', require('../isBoolean'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/isBuffer.js b/node_modules/umzug/node_modules/lodash/fp/isBuffer.js new file mode 100644 index 0000000..e60b123 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/isBuffer.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isBuffer', require('../isBuffer'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/isDate.js b/node_modules/umzug/node_modules/lodash/fp/isDate.js new file mode 100644 index 0000000..dc41d08 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/isDate.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isDate', require('../isDate'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/isElement.js b/node_modules/umzug/node_modules/lodash/fp/isElement.js new file mode 100644 index 0000000..18ee039 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/isElement.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isElement', require('../isElement'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/isEmpty.js b/node_modules/umzug/node_modules/lodash/fp/isEmpty.js new file mode 100644 index 0000000..0f4ae84 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/isEmpty.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isEmpty', require('../isEmpty'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/isEqual.js b/node_modules/umzug/node_modules/lodash/fp/isEqual.js new file mode 100644 index 0000000..4138386 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/isEqual.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isEqual', require('../isEqual')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/isEqualWith.js b/node_modules/umzug/node_modules/lodash/fp/isEqualWith.js new file mode 100644 index 0000000..029ff5c --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/isEqualWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isEqualWith', require('../isEqualWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/isError.js b/node_modules/umzug/node_modules/lodash/fp/isError.js new file mode 100644 index 0000000..3dfd81c --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/isError.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isError', require('../isError'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/isFinite.js b/node_modules/umzug/node_modules/lodash/fp/isFinite.js new file mode 100644 index 0000000..0b647b8 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/isFinite.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isFinite', require('../isFinite'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/isFunction.js b/node_modules/umzug/node_modules/lodash/fp/isFunction.js new file mode 100644 index 0000000..ff8e5c4 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/isFunction.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isFunction', require('../isFunction'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/isInteger.js b/node_modules/umzug/node_modules/lodash/fp/isInteger.js new file mode 100644 index 0000000..67af4ff --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/isInteger.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isInteger', require('../isInteger'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/isLength.js b/node_modules/umzug/node_modules/lodash/fp/isLength.js new file mode 100644 index 0000000..fc101c5 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/isLength.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isLength', require('../isLength'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/isMap.js b/node_modules/umzug/node_modules/lodash/fp/isMap.js new file mode 100644 index 0000000..a209aa6 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/isMap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isMap', require('../isMap'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/isMatch.js b/node_modules/umzug/node_modules/lodash/fp/isMatch.js new file mode 100644 index 0000000..6264ca1 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/isMatch.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isMatch', require('../isMatch')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/isMatchWith.js b/node_modules/umzug/node_modules/lodash/fp/isMatchWith.js new file mode 100644 index 0000000..d95f319 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/isMatchWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isMatchWith', require('../isMatchWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/isNaN.js b/node_modules/umzug/node_modules/lodash/fp/isNaN.js new file mode 100644 index 0000000..66a978f --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/isNaN.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isNaN', require('../isNaN'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/isNative.js b/node_modules/umzug/node_modules/lodash/fp/isNative.js new file mode 100644 index 0000000..3d775ba --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/isNative.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isNative', require('../isNative'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/isNil.js b/node_modules/umzug/node_modules/lodash/fp/isNil.js new file mode 100644 index 0000000..5952c02 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/isNil.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isNil', require('../isNil'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/isNull.js b/node_modules/umzug/node_modules/lodash/fp/isNull.js new file mode 100644 index 0000000..f201a35 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/isNull.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isNull', require('../isNull'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/isNumber.js b/node_modules/umzug/node_modules/lodash/fp/isNumber.js new file mode 100644 index 0000000..a2b5fa0 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/isNumber.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isNumber', require('../isNumber'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/isObject.js b/node_modules/umzug/node_modules/lodash/fp/isObject.js new file mode 100644 index 0000000..231ace0 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/isObject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isObject', require('../isObject'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/isObjectLike.js b/node_modules/umzug/node_modules/lodash/fp/isObjectLike.js new file mode 100644 index 0000000..f16082e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/isObjectLike.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isObjectLike', require('../isObjectLike'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/isPlainObject.js b/node_modules/umzug/node_modules/lodash/fp/isPlainObject.js new file mode 100644 index 0000000..b5bea90 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/isPlainObject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isPlainObject', require('../isPlainObject'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/isRegExp.js b/node_modules/umzug/node_modules/lodash/fp/isRegExp.js new file mode 100644 index 0000000..12a1a3d --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/isRegExp.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isRegExp', require('../isRegExp'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/isSafeInteger.js b/node_modules/umzug/node_modules/lodash/fp/isSafeInteger.js new file mode 100644 index 0000000..7230f55 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/isSafeInteger.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isSafeInteger', require('../isSafeInteger'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/isSet.js b/node_modules/umzug/node_modules/lodash/fp/isSet.js new file mode 100644 index 0000000..35c01f6 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/isSet.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isSet', require('../isSet'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/isString.js b/node_modules/umzug/node_modules/lodash/fp/isString.js new file mode 100644 index 0000000..1fd0679 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/isString.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isString', require('../isString'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/isSymbol.js b/node_modules/umzug/node_modules/lodash/fp/isSymbol.js new file mode 100644 index 0000000..3867695 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/isSymbol.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isSymbol', require('../isSymbol'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/isTypedArray.js b/node_modules/umzug/node_modules/lodash/fp/isTypedArray.js new file mode 100644 index 0000000..8567953 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/isTypedArray.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isTypedArray', require('../isTypedArray'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/isUndefined.js b/node_modules/umzug/node_modules/lodash/fp/isUndefined.js new file mode 100644 index 0000000..ddbca31 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/isUndefined.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isUndefined', require('../isUndefined'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/isWeakMap.js b/node_modules/umzug/node_modules/lodash/fp/isWeakMap.js new file mode 100644 index 0000000..ef60c61 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/isWeakMap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isWeakMap', require('../isWeakMap'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/isWeakSet.js b/node_modules/umzug/node_modules/lodash/fp/isWeakSet.js new file mode 100644 index 0000000..c99bfaa --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/isWeakSet.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isWeakSet', require('../isWeakSet'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/iteratee.js b/node_modules/umzug/node_modules/lodash/fp/iteratee.js new file mode 100644 index 0000000..9f0f717 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/iteratee.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('iteratee', require('../iteratee')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/join.js b/node_modules/umzug/node_modules/lodash/fp/join.js new file mode 100644 index 0000000..a220e00 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/join.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('join', require('../join')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/juxt.js b/node_modules/umzug/node_modules/lodash/fp/juxt.js new file mode 100644 index 0000000..f71e04e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/juxt.js @@ -0,0 +1 @@ +module.exports = require('./over'); diff --git a/node_modules/umzug/node_modules/lodash/fp/kebabCase.js b/node_modules/umzug/node_modules/lodash/fp/kebabCase.js new file mode 100644 index 0000000..60737f1 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/kebabCase.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('kebabCase', require('../kebabCase'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/keyBy.js b/node_modules/umzug/node_modules/lodash/fp/keyBy.js new file mode 100644 index 0000000..9a6a85d --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/keyBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('keyBy', require('../keyBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/keys.js b/node_modules/umzug/node_modules/lodash/fp/keys.js new file mode 100644 index 0000000..e12bb07 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/keys.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('keys', require('../keys'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/keysIn.js b/node_modules/umzug/node_modules/lodash/fp/keysIn.js new file mode 100644 index 0000000..f3eb36a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/keysIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('keysIn', require('../keysIn'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/lang.js b/node_modules/umzug/node_modules/lodash/fp/lang.js new file mode 100644 index 0000000..08cc9c1 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/lang.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../lang')); diff --git a/node_modules/umzug/node_modules/lodash/fp/last.js b/node_modules/umzug/node_modules/lodash/fp/last.js new file mode 100644 index 0000000..0f71699 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/last.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('last', require('../last'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/lastIndexOf.js b/node_modules/umzug/node_modules/lodash/fp/lastIndexOf.js new file mode 100644 index 0000000..ddf39c3 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/lastIndexOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('lastIndexOf', require('../lastIndexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/lastIndexOfFrom.js b/node_modules/umzug/node_modules/lodash/fp/lastIndexOfFrom.js new file mode 100644 index 0000000..1ff6a0b --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/lastIndexOfFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('lastIndexOfFrom', require('../lastIndexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/lowerCase.js b/node_modules/umzug/node_modules/lodash/fp/lowerCase.js new file mode 100644 index 0000000..ea64bc1 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/lowerCase.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('lowerCase', require('../lowerCase'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/lowerFirst.js b/node_modules/umzug/node_modules/lodash/fp/lowerFirst.js new file mode 100644 index 0000000..539720a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/lowerFirst.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('lowerFirst', require('../lowerFirst'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/lt.js b/node_modules/umzug/node_modules/lodash/fp/lt.js new file mode 100644 index 0000000..a31d21e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/lt.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('lt', require('../lt')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/lte.js b/node_modules/umzug/node_modules/lodash/fp/lte.js new file mode 100644 index 0000000..d795d10 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/lte.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('lte', require('../lte')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/map.js b/node_modules/umzug/node_modules/lodash/fp/map.js new file mode 100644 index 0000000..cf98794 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/map.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('map', require('../map')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/mapKeys.js b/node_modules/umzug/node_modules/lodash/fp/mapKeys.js new file mode 100644 index 0000000..1684587 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/mapKeys.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mapKeys', require('../mapKeys')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/mapValues.js b/node_modules/umzug/node_modules/lodash/fp/mapValues.js new file mode 100644 index 0000000..4004972 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/mapValues.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mapValues', require('../mapValues')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/matches.js b/node_modules/umzug/node_modules/lodash/fp/matches.js new file mode 100644 index 0000000..29d1e1e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/matches.js @@ -0,0 +1 @@ +module.exports = require('./isMatch'); diff --git a/node_modules/umzug/node_modules/lodash/fp/matchesProperty.js b/node_modules/umzug/node_modules/lodash/fp/matchesProperty.js new file mode 100644 index 0000000..4575bd2 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/matchesProperty.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('matchesProperty', require('../matchesProperty')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/math.js b/node_modules/umzug/node_modules/lodash/fp/math.js new file mode 100644 index 0000000..e8f50f7 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/math.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../math')); diff --git a/node_modules/umzug/node_modules/lodash/fp/max.js b/node_modules/umzug/node_modules/lodash/fp/max.js new file mode 100644 index 0000000..a66acac --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/max.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('max', require('../max'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/maxBy.js b/node_modules/umzug/node_modules/lodash/fp/maxBy.js new file mode 100644 index 0000000..d083fd6 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/maxBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('maxBy', require('../maxBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/mean.js b/node_modules/umzug/node_modules/lodash/fp/mean.js new file mode 100644 index 0000000..3117246 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/mean.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mean', require('../mean'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/meanBy.js b/node_modules/umzug/node_modules/lodash/fp/meanBy.js new file mode 100644 index 0000000..556f25e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/meanBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('meanBy', require('../meanBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/memoize.js b/node_modules/umzug/node_modules/lodash/fp/memoize.js new file mode 100644 index 0000000..638eec6 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/memoize.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('memoize', require('../memoize')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/merge.js b/node_modules/umzug/node_modules/lodash/fp/merge.js new file mode 100644 index 0000000..ac66add --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/merge.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('merge', require('../merge')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/mergeAll.js b/node_modules/umzug/node_modules/lodash/fp/mergeAll.js new file mode 100644 index 0000000..a3674d6 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/mergeAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mergeAll', require('../merge')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/mergeAllWith.js b/node_modules/umzug/node_modules/lodash/fp/mergeAllWith.js new file mode 100644 index 0000000..4bd4206 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/mergeAllWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mergeAllWith', require('../mergeWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/mergeWith.js b/node_modules/umzug/node_modules/lodash/fp/mergeWith.js new file mode 100644 index 0000000..00d44d5 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/mergeWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mergeWith', require('../mergeWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/method.js b/node_modules/umzug/node_modules/lodash/fp/method.js new file mode 100644 index 0000000..f4060c6 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/method.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('method', require('../method')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/methodOf.js b/node_modules/umzug/node_modules/lodash/fp/methodOf.js new file mode 100644 index 0000000..6139905 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/methodOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('methodOf', require('../methodOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/min.js b/node_modules/umzug/node_modules/lodash/fp/min.js new file mode 100644 index 0000000..d12c6b4 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/min.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('min', require('../min'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/minBy.js b/node_modules/umzug/node_modules/lodash/fp/minBy.js new file mode 100644 index 0000000..fdb9e24 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/minBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('minBy', require('../minBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/mixin.js b/node_modules/umzug/node_modules/lodash/fp/mixin.js new file mode 100644 index 0000000..332e6fb --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/mixin.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mixin', require('../mixin')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/multiply.js b/node_modules/umzug/node_modules/lodash/fp/multiply.js new file mode 100644 index 0000000..4dcf0b0 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/multiply.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('multiply', require('../multiply')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/nAry.js b/node_modules/umzug/node_modules/lodash/fp/nAry.js new file mode 100644 index 0000000..f262a76 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/nAry.js @@ -0,0 +1 @@ +module.exports = require('./ary'); diff --git a/node_modules/umzug/node_modules/lodash/fp/negate.js b/node_modules/umzug/node_modules/lodash/fp/negate.js new file mode 100644 index 0000000..8b6dc7c --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/negate.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('negate', require('../negate'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/next.js b/node_modules/umzug/node_modules/lodash/fp/next.js new file mode 100644 index 0000000..140155e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/next.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('next', require('../next'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/noop.js b/node_modules/umzug/node_modules/lodash/fp/noop.js new file mode 100644 index 0000000..b9e32cc --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/noop.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('noop', require('../noop'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/now.js b/node_modules/umzug/node_modules/lodash/fp/now.js new file mode 100644 index 0000000..6de2068 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/now.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('now', require('../now'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/nth.js b/node_modules/umzug/node_modules/lodash/fp/nth.js new file mode 100644 index 0000000..da4fda7 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/nth.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('nth', require('../nth')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/nthArg.js b/node_modules/umzug/node_modules/lodash/fp/nthArg.js new file mode 100644 index 0000000..fce3165 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/nthArg.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('nthArg', require('../nthArg')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/number.js b/node_modules/umzug/node_modules/lodash/fp/number.js new file mode 100644 index 0000000..5c10b88 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/number.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../number')); diff --git a/node_modules/umzug/node_modules/lodash/fp/object.js b/node_modules/umzug/node_modules/lodash/fp/object.js new file mode 100644 index 0000000..ae39a13 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/object.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../object')); diff --git a/node_modules/umzug/node_modules/lodash/fp/omit.js b/node_modules/umzug/node_modules/lodash/fp/omit.js new file mode 100644 index 0000000..fd68529 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/omit.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('omit', require('../omit')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/omitAll.js b/node_modules/umzug/node_modules/lodash/fp/omitAll.js new file mode 100644 index 0000000..144cf4b --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/omitAll.js @@ -0,0 +1 @@ +module.exports = require('./omit'); diff --git a/node_modules/umzug/node_modules/lodash/fp/omitBy.js b/node_modules/umzug/node_modules/lodash/fp/omitBy.js new file mode 100644 index 0000000..90df738 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/omitBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('omitBy', require('../omitBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/once.js b/node_modules/umzug/node_modules/lodash/fp/once.js new file mode 100644 index 0000000..f8f0a5c --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/once.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('once', require('../once'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/orderBy.js b/node_modules/umzug/node_modules/lodash/fp/orderBy.js new file mode 100644 index 0000000..848e210 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/orderBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('orderBy', require('../orderBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/over.js b/node_modules/umzug/node_modules/lodash/fp/over.js new file mode 100644 index 0000000..01eba7b --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/over.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('over', require('../over')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/overArgs.js b/node_modules/umzug/node_modules/lodash/fp/overArgs.js new file mode 100644 index 0000000..738556f --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/overArgs.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('overArgs', require('../overArgs')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/overEvery.js b/node_modules/umzug/node_modules/lodash/fp/overEvery.js new file mode 100644 index 0000000..9f5a032 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/overEvery.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('overEvery', require('../overEvery')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/overSome.js b/node_modules/umzug/node_modules/lodash/fp/overSome.js new file mode 100644 index 0000000..15939d5 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/overSome.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('overSome', require('../overSome')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/pad.js b/node_modules/umzug/node_modules/lodash/fp/pad.js new file mode 100644 index 0000000..f1dea4a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/pad.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pad', require('../pad')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/padChars.js b/node_modules/umzug/node_modules/lodash/fp/padChars.js new file mode 100644 index 0000000..d6e0804 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/padChars.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('padChars', require('../pad')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/padCharsEnd.js b/node_modules/umzug/node_modules/lodash/fp/padCharsEnd.js new file mode 100644 index 0000000..d4ab79a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/padCharsEnd.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('padCharsEnd', require('../padEnd')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/padCharsStart.js b/node_modules/umzug/node_modules/lodash/fp/padCharsStart.js new file mode 100644 index 0000000..a08a300 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/padCharsStart.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('padCharsStart', require('../padStart')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/padEnd.js b/node_modules/umzug/node_modules/lodash/fp/padEnd.js new file mode 100644 index 0000000..a8522ec --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/padEnd.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('padEnd', require('../padEnd')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/padStart.js b/node_modules/umzug/node_modules/lodash/fp/padStart.js new file mode 100644 index 0000000..f4ca79d --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/padStart.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('padStart', require('../padStart')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/parseInt.js b/node_modules/umzug/node_modules/lodash/fp/parseInt.js new file mode 100644 index 0000000..27314cc --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/parseInt.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('parseInt', require('../parseInt')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/partial.js b/node_modules/umzug/node_modules/lodash/fp/partial.js new file mode 100644 index 0000000..5d46015 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/partial.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('partial', require('../partial')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/partialRight.js b/node_modules/umzug/node_modules/lodash/fp/partialRight.js new file mode 100644 index 0000000..7f05fed --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/partialRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('partialRight', require('../partialRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/partition.js b/node_modules/umzug/node_modules/lodash/fp/partition.js new file mode 100644 index 0000000..2ebcacc --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/partition.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('partition', require('../partition')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/path.js b/node_modules/umzug/node_modules/lodash/fp/path.js new file mode 100644 index 0000000..b29cfb2 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/path.js @@ -0,0 +1 @@ +module.exports = require('./get'); diff --git a/node_modules/umzug/node_modules/lodash/fp/pathEq.js b/node_modules/umzug/node_modules/lodash/fp/pathEq.js new file mode 100644 index 0000000..36c027a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/pathEq.js @@ -0,0 +1 @@ +module.exports = require('./matchesProperty'); diff --git a/node_modules/umzug/node_modules/lodash/fp/pathOr.js b/node_modules/umzug/node_modules/lodash/fp/pathOr.js new file mode 100644 index 0000000..4ab5820 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/pathOr.js @@ -0,0 +1 @@ +module.exports = require('./getOr'); diff --git a/node_modules/umzug/node_modules/lodash/fp/paths.js b/node_modules/umzug/node_modules/lodash/fp/paths.js new file mode 100644 index 0000000..1eb7950 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/paths.js @@ -0,0 +1 @@ +module.exports = require('./at'); diff --git a/node_modules/umzug/node_modules/lodash/fp/pick.js b/node_modules/umzug/node_modules/lodash/fp/pick.js new file mode 100644 index 0000000..197393d --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/pick.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pick', require('../pick')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/pickAll.js b/node_modules/umzug/node_modules/lodash/fp/pickAll.js new file mode 100644 index 0000000..a8ecd46 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/pickAll.js @@ -0,0 +1 @@ +module.exports = require('./pick'); diff --git a/node_modules/umzug/node_modules/lodash/fp/pickBy.js b/node_modules/umzug/node_modules/lodash/fp/pickBy.js new file mode 100644 index 0000000..d832d16 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/pickBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pickBy', require('../pickBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/pipe.js b/node_modules/umzug/node_modules/lodash/fp/pipe.js new file mode 100644 index 0000000..b2e1e2c --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/pipe.js @@ -0,0 +1 @@ +module.exports = require('./flow'); diff --git a/node_modules/umzug/node_modules/lodash/fp/placeholder.js b/node_modules/umzug/node_modules/lodash/fp/placeholder.js new file mode 100644 index 0000000..1ce1739 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/placeholder.js @@ -0,0 +1,6 @@ +/** + * The default argument placeholder value for methods. + * + * @type {Object} + */ +module.exports = {}; diff --git a/node_modules/umzug/node_modules/lodash/fp/plant.js b/node_modules/umzug/node_modules/lodash/fp/plant.js new file mode 100644 index 0000000..eca8f32 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/plant.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('plant', require('../plant'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/pluck.js b/node_modules/umzug/node_modules/lodash/fp/pluck.js new file mode 100644 index 0000000..0d1e1ab --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/pluck.js @@ -0,0 +1 @@ +module.exports = require('./map'); diff --git a/node_modules/umzug/node_modules/lodash/fp/prop.js b/node_modules/umzug/node_modules/lodash/fp/prop.js new file mode 100644 index 0000000..b29cfb2 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/prop.js @@ -0,0 +1 @@ +module.exports = require('./get'); diff --git a/node_modules/umzug/node_modules/lodash/fp/propEq.js b/node_modules/umzug/node_modules/lodash/fp/propEq.js new file mode 100644 index 0000000..36c027a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/propEq.js @@ -0,0 +1 @@ +module.exports = require('./matchesProperty'); diff --git a/node_modules/umzug/node_modules/lodash/fp/propOr.js b/node_modules/umzug/node_modules/lodash/fp/propOr.js new file mode 100644 index 0000000..4ab5820 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/propOr.js @@ -0,0 +1 @@ +module.exports = require('./getOr'); diff --git a/node_modules/umzug/node_modules/lodash/fp/property.js b/node_modules/umzug/node_modules/lodash/fp/property.js new file mode 100644 index 0000000..b29cfb2 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/property.js @@ -0,0 +1 @@ +module.exports = require('./get'); diff --git a/node_modules/umzug/node_modules/lodash/fp/propertyOf.js b/node_modules/umzug/node_modules/lodash/fp/propertyOf.js new file mode 100644 index 0000000..f6273ee --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/propertyOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('propertyOf', require('../get')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/props.js b/node_modules/umzug/node_modules/lodash/fp/props.js new file mode 100644 index 0000000..1eb7950 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/props.js @@ -0,0 +1 @@ +module.exports = require('./at'); diff --git a/node_modules/umzug/node_modules/lodash/fp/pull.js b/node_modules/umzug/node_modules/lodash/fp/pull.js new file mode 100644 index 0000000..8d7084f --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/pull.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pull', require('../pull')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/pullAll.js b/node_modules/umzug/node_modules/lodash/fp/pullAll.js new file mode 100644 index 0000000..98d5c9a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/pullAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pullAll', require('../pullAll')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/pullAllBy.js b/node_modules/umzug/node_modules/lodash/fp/pullAllBy.js new file mode 100644 index 0000000..876bc3b --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/pullAllBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pullAllBy', require('../pullAllBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/pullAllWith.js b/node_modules/umzug/node_modules/lodash/fp/pullAllWith.js new file mode 100644 index 0000000..f71ba4d --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/pullAllWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pullAllWith', require('../pullAllWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/pullAt.js b/node_modules/umzug/node_modules/lodash/fp/pullAt.js new file mode 100644 index 0000000..e8b3bb6 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/pullAt.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pullAt', require('../pullAt')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/random.js b/node_modules/umzug/node_modules/lodash/fp/random.js new file mode 100644 index 0000000..99d852e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/random.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('random', require('../random')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/range.js b/node_modules/umzug/node_modules/lodash/fp/range.js new file mode 100644 index 0000000..a6bb591 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/range.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('range', require('../range')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/rangeRight.js b/node_modules/umzug/node_modules/lodash/fp/rangeRight.js new file mode 100644 index 0000000..fdb712f --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/rangeRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('rangeRight', require('../rangeRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/rangeStep.js b/node_modules/umzug/node_modules/lodash/fp/rangeStep.js new file mode 100644 index 0000000..d72dfc2 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/rangeStep.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('rangeStep', require('../range')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/rangeStepRight.js b/node_modules/umzug/node_modules/lodash/fp/rangeStepRight.js new file mode 100644 index 0000000..8b2a67b --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/rangeStepRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('rangeStepRight', require('../rangeRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/rearg.js b/node_modules/umzug/node_modules/lodash/fp/rearg.js new file mode 100644 index 0000000..678e02a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/rearg.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('rearg', require('../rearg')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/reduce.js b/node_modules/umzug/node_modules/lodash/fp/reduce.js new file mode 100644 index 0000000..4cef0a0 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/reduce.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('reduce', require('../reduce')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/reduceRight.js b/node_modules/umzug/node_modules/lodash/fp/reduceRight.js new file mode 100644 index 0000000..caf5bb5 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/reduceRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('reduceRight', require('../reduceRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/reject.js b/node_modules/umzug/node_modules/lodash/fp/reject.js new file mode 100644 index 0000000..c163273 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/reject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('reject', require('../reject')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/remove.js b/node_modules/umzug/node_modules/lodash/fp/remove.js new file mode 100644 index 0000000..e9d1327 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/remove.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('remove', require('../remove')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/repeat.js b/node_modules/umzug/node_modules/lodash/fp/repeat.js new file mode 100644 index 0000000..08470f2 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/repeat.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('repeat', require('../repeat')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/replace.js b/node_modules/umzug/node_modules/lodash/fp/replace.js new file mode 100644 index 0000000..2227db6 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/replace.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('replace', require('../replace')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/rest.js b/node_modules/umzug/node_modules/lodash/fp/rest.js new file mode 100644 index 0000000..c1f3d64 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/rest.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('rest', require('../rest')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/restFrom.js b/node_modules/umzug/node_modules/lodash/fp/restFrom.js new file mode 100644 index 0000000..714e42b --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/restFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('restFrom', require('../rest')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/result.js b/node_modules/umzug/node_modules/lodash/fp/result.js new file mode 100644 index 0000000..f86ce07 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/result.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('result', require('../result')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/reverse.js b/node_modules/umzug/node_modules/lodash/fp/reverse.js new file mode 100644 index 0000000..07c9f5e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/reverse.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('reverse', require('../reverse')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/round.js b/node_modules/umzug/node_modules/lodash/fp/round.js new file mode 100644 index 0000000..4c0e5c8 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/round.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('round', require('../round')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/sample.js b/node_modules/umzug/node_modules/lodash/fp/sample.js new file mode 100644 index 0000000..6bea125 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/sample.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sample', require('../sample'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/sampleSize.js b/node_modules/umzug/node_modules/lodash/fp/sampleSize.js new file mode 100644 index 0000000..359ed6f --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/sampleSize.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sampleSize', require('../sampleSize')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/seq.js b/node_modules/umzug/node_modules/lodash/fp/seq.js new file mode 100644 index 0000000..d8f42b0 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/seq.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../seq')); diff --git a/node_modules/umzug/node_modules/lodash/fp/set.js b/node_modules/umzug/node_modules/lodash/fp/set.js new file mode 100644 index 0000000..0b56a56 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/set.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('set', require('../set')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/setWith.js b/node_modules/umzug/node_modules/lodash/fp/setWith.js new file mode 100644 index 0000000..0b58495 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/setWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('setWith', require('../setWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/shuffle.js b/node_modules/umzug/node_modules/lodash/fp/shuffle.js new file mode 100644 index 0000000..aa3a1ca --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/shuffle.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('shuffle', require('../shuffle'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/size.js b/node_modules/umzug/node_modules/lodash/fp/size.js new file mode 100644 index 0000000..7490136 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/size.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('size', require('../size'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/slice.js b/node_modules/umzug/node_modules/lodash/fp/slice.js new file mode 100644 index 0000000..15945d3 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/slice.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('slice', require('../slice')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/snakeCase.js b/node_modules/umzug/node_modules/lodash/fp/snakeCase.js new file mode 100644 index 0000000..a0ff780 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/snakeCase.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('snakeCase', require('../snakeCase'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/some.js b/node_modules/umzug/node_modules/lodash/fp/some.js new file mode 100644 index 0000000..a4fa2d0 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/some.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('some', require('../some')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/sortBy.js b/node_modules/umzug/node_modules/lodash/fp/sortBy.js new file mode 100644 index 0000000..e0790ad --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/sortBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortBy', require('../sortBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/sortedIndex.js b/node_modules/umzug/node_modules/lodash/fp/sortedIndex.js new file mode 100644 index 0000000..364a054 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/sortedIndex.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedIndex', require('../sortedIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/sortedIndexBy.js b/node_modules/umzug/node_modules/lodash/fp/sortedIndexBy.js new file mode 100644 index 0000000..9593dbd --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/sortedIndexBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedIndexBy', require('../sortedIndexBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/sortedIndexOf.js b/node_modules/umzug/node_modules/lodash/fp/sortedIndexOf.js new file mode 100644 index 0000000..c9084ca --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/sortedIndexOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedIndexOf', require('../sortedIndexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/sortedLastIndex.js b/node_modules/umzug/node_modules/lodash/fp/sortedLastIndex.js new file mode 100644 index 0000000..47fe241 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/sortedLastIndex.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedLastIndex', require('../sortedLastIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/sortedLastIndexBy.js b/node_modules/umzug/node_modules/lodash/fp/sortedLastIndexBy.js new file mode 100644 index 0000000..0f9a347 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/sortedLastIndexBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedLastIndexBy', require('../sortedLastIndexBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/sortedLastIndexOf.js b/node_modules/umzug/node_modules/lodash/fp/sortedLastIndexOf.js new file mode 100644 index 0000000..0d4d932 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/sortedLastIndexOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedLastIndexOf', require('../sortedLastIndexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/sortedUniq.js b/node_modules/umzug/node_modules/lodash/fp/sortedUniq.js new file mode 100644 index 0000000..882d283 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/sortedUniq.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedUniq', require('../sortedUniq'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/sortedUniqBy.js b/node_modules/umzug/node_modules/lodash/fp/sortedUniqBy.js new file mode 100644 index 0000000..033db91 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/sortedUniqBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedUniqBy', require('../sortedUniqBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/split.js b/node_modules/umzug/node_modules/lodash/fp/split.js new file mode 100644 index 0000000..14de1a7 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/split.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('split', require('../split')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/spread.js b/node_modules/umzug/node_modules/lodash/fp/spread.js new file mode 100644 index 0000000..2d11b70 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/spread.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('spread', require('../spread')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/spreadFrom.js b/node_modules/umzug/node_modules/lodash/fp/spreadFrom.js new file mode 100644 index 0000000..0b630df --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/spreadFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('spreadFrom', require('../spread')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/startCase.js b/node_modules/umzug/node_modules/lodash/fp/startCase.js new file mode 100644 index 0000000..ada98c9 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/startCase.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('startCase', require('../startCase'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/startsWith.js b/node_modules/umzug/node_modules/lodash/fp/startsWith.js new file mode 100644 index 0000000..985e2f2 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/startsWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('startsWith', require('../startsWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/string.js b/node_modules/umzug/node_modules/lodash/fp/string.js new file mode 100644 index 0000000..773b037 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/string.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../string')); diff --git a/node_modules/umzug/node_modules/lodash/fp/stubArray.js b/node_modules/umzug/node_modules/lodash/fp/stubArray.js new file mode 100644 index 0000000..cd604cb --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/stubArray.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubArray', require('../stubArray'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/stubFalse.js b/node_modules/umzug/node_modules/lodash/fp/stubFalse.js new file mode 100644 index 0000000..3296664 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/stubFalse.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubFalse', require('../stubFalse'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/stubObject.js b/node_modules/umzug/node_modules/lodash/fp/stubObject.js new file mode 100644 index 0000000..c6c8ec4 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/stubObject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubObject', require('../stubObject'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/stubString.js b/node_modules/umzug/node_modules/lodash/fp/stubString.js new file mode 100644 index 0000000..701051e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/stubString.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubString', require('../stubString'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/stubTrue.js b/node_modules/umzug/node_modules/lodash/fp/stubTrue.js new file mode 100644 index 0000000..9249082 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/stubTrue.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubTrue', require('../stubTrue'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/subtract.js b/node_modules/umzug/node_modules/lodash/fp/subtract.js new file mode 100644 index 0000000..d32b16d --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/subtract.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('subtract', require('../subtract')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/sum.js b/node_modules/umzug/node_modules/lodash/fp/sum.js new file mode 100644 index 0000000..5cce12b --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/sum.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sum', require('../sum'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/sumBy.js b/node_modules/umzug/node_modules/lodash/fp/sumBy.js new file mode 100644 index 0000000..c882656 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/sumBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sumBy', require('../sumBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/symmetricDifference.js b/node_modules/umzug/node_modules/lodash/fp/symmetricDifference.js new file mode 100644 index 0000000..78c16ad --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/symmetricDifference.js @@ -0,0 +1 @@ +module.exports = require('./xor'); diff --git a/node_modules/umzug/node_modules/lodash/fp/symmetricDifferenceBy.js b/node_modules/umzug/node_modules/lodash/fp/symmetricDifferenceBy.js new file mode 100644 index 0000000..298fc7f --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/symmetricDifferenceBy.js @@ -0,0 +1 @@ +module.exports = require('./xorBy'); diff --git a/node_modules/umzug/node_modules/lodash/fp/symmetricDifferenceWith.js b/node_modules/umzug/node_modules/lodash/fp/symmetricDifferenceWith.js new file mode 100644 index 0000000..70bc6fa --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/symmetricDifferenceWith.js @@ -0,0 +1 @@ +module.exports = require('./xorWith'); diff --git a/node_modules/umzug/node_modules/lodash/fp/tail.js b/node_modules/umzug/node_modules/lodash/fp/tail.js new file mode 100644 index 0000000..f122f0a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/tail.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('tail', require('../tail'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/take.js b/node_modules/umzug/node_modules/lodash/fp/take.js new file mode 100644 index 0000000..9af98a7 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/take.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('take', require('../take')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/takeLast.js b/node_modules/umzug/node_modules/lodash/fp/takeLast.js new file mode 100644 index 0000000..e98c84a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/takeLast.js @@ -0,0 +1 @@ +module.exports = require('./takeRight'); diff --git a/node_modules/umzug/node_modules/lodash/fp/takeLastWhile.js b/node_modules/umzug/node_modules/lodash/fp/takeLastWhile.js new file mode 100644 index 0000000..5367968 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/takeLastWhile.js @@ -0,0 +1 @@ +module.exports = require('./takeRightWhile'); diff --git a/node_modules/umzug/node_modules/lodash/fp/takeRight.js b/node_modules/umzug/node_modules/lodash/fp/takeRight.js new file mode 100644 index 0000000..b82950a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/takeRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('takeRight', require('../takeRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/takeRightWhile.js b/node_modules/umzug/node_modules/lodash/fp/takeRightWhile.js new file mode 100644 index 0000000..8ffb0a2 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/takeRightWhile.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('takeRightWhile', require('../takeRightWhile')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/takeWhile.js b/node_modules/umzug/node_modules/lodash/fp/takeWhile.js new file mode 100644 index 0000000..2813664 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/takeWhile.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('takeWhile', require('../takeWhile')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/tap.js b/node_modules/umzug/node_modules/lodash/fp/tap.js new file mode 100644 index 0000000..d33ad6e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/tap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('tap', require('../tap')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/template.js b/node_modules/umzug/node_modules/lodash/fp/template.js new file mode 100644 index 0000000..74857e1 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/template.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('template', require('../template')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/templateSettings.js b/node_modules/umzug/node_modules/lodash/fp/templateSettings.js new file mode 100644 index 0000000..7bcc0a8 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/templateSettings.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('templateSettings', require('../templateSettings'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/throttle.js b/node_modules/umzug/node_modules/lodash/fp/throttle.js new file mode 100644 index 0000000..77fff14 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/throttle.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('throttle', require('../throttle')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/thru.js b/node_modules/umzug/node_modules/lodash/fp/thru.js new file mode 100644 index 0000000..d42b3b1 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/thru.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('thru', require('../thru')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/times.js b/node_modules/umzug/node_modules/lodash/fp/times.js new file mode 100644 index 0000000..0dab06d --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/times.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('times', require('../times')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/toArray.js b/node_modules/umzug/node_modules/lodash/fp/toArray.js new file mode 100644 index 0000000..f0c360a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/toArray.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toArray', require('../toArray'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/toFinite.js b/node_modules/umzug/node_modules/lodash/fp/toFinite.js new file mode 100644 index 0000000..3a47687 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/toFinite.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toFinite', require('../toFinite'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/toInteger.js b/node_modules/umzug/node_modules/lodash/fp/toInteger.js new file mode 100644 index 0000000..e0af6a7 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/toInteger.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toInteger', require('../toInteger'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/toIterator.js b/node_modules/umzug/node_modules/lodash/fp/toIterator.js new file mode 100644 index 0000000..65e6baa --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/toIterator.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toIterator', require('../toIterator'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/toJSON.js b/node_modules/umzug/node_modules/lodash/fp/toJSON.js new file mode 100644 index 0000000..2d718d0 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/toJSON.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toJSON', require('../toJSON'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/toLength.js b/node_modules/umzug/node_modules/lodash/fp/toLength.js new file mode 100644 index 0000000..b97cdd9 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/toLength.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toLength', require('../toLength'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/toLower.js b/node_modules/umzug/node_modules/lodash/fp/toLower.js new file mode 100644 index 0000000..616ef36 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/toLower.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toLower', require('../toLower'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/toNumber.js b/node_modules/umzug/node_modules/lodash/fp/toNumber.js new file mode 100644 index 0000000..d0c6f4d --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/toNumber.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toNumber', require('../toNumber'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/toPairs.js b/node_modules/umzug/node_modules/lodash/fp/toPairs.js new file mode 100644 index 0000000..af78378 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/toPairs.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toPairs', require('../toPairs'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/toPairsIn.js b/node_modules/umzug/node_modules/lodash/fp/toPairsIn.js new file mode 100644 index 0000000..66504ab --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/toPairsIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toPairsIn', require('../toPairsIn'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/toPath.js b/node_modules/umzug/node_modules/lodash/fp/toPath.js new file mode 100644 index 0000000..b4d5e50 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/toPath.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toPath', require('../toPath'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/toPlainObject.js b/node_modules/umzug/node_modules/lodash/fp/toPlainObject.js new file mode 100644 index 0000000..278bb86 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/toPlainObject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toPlainObject', require('../toPlainObject'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/toSafeInteger.js b/node_modules/umzug/node_modules/lodash/fp/toSafeInteger.js new file mode 100644 index 0000000..367a26f --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/toSafeInteger.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toSafeInteger', require('../toSafeInteger'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/toString.js b/node_modules/umzug/node_modules/lodash/fp/toString.js new file mode 100644 index 0000000..cec4f8e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/toString.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toString', require('../toString'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/toUpper.js b/node_modules/umzug/node_modules/lodash/fp/toUpper.js new file mode 100644 index 0000000..54f9a56 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/toUpper.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toUpper', require('../toUpper'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/transform.js b/node_modules/umzug/node_modules/lodash/fp/transform.js new file mode 100644 index 0000000..759d088 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/transform.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('transform', require('../transform')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/trim.js b/node_modules/umzug/node_modules/lodash/fp/trim.js new file mode 100644 index 0000000..e6319a7 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/trim.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('trim', require('../trim')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/trimChars.js b/node_modules/umzug/node_modules/lodash/fp/trimChars.js new file mode 100644 index 0000000..c9294de --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/trimChars.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('trimChars', require('../trim')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/trimCharsEnd.js b/node_modules/umzug/node_modules/lodash/fp/trimCharsEnd.js new file mode 100644 index 0000000..284bc2f --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/trimCharsEnd.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('trimCharsEnd', require('../trimEnd')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/trimCharsStart.js b/node_modules/umzug/node_modules/lodash/fp/trimCharsStart.js new file mode 100644 index 0000000..ff0ee65 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/trimCharsStart.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('trimCharsStart', require('../trimStart')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/trimEnd.js b/node_modules/umzug/node_modules/lodash/fp/trimEnd.js new file mode 100644 index 0000000..7190880 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/trimEnd.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('trimEnd', require('../trimEnd')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/trimStart.js b/node_modules/umzug/node_modules/lodash/fp/trimStart.js new file mode 100644 index 0000000..fda902c --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/trimStart.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('trimStart', require('../trimStart')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/truncate.js b/node_modules/umzug/node_modules/lodash/fp/truncate.js new file mode 100644 index 0000000..d265c1d --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/truncate.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('truncate', require('../truncate')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/unapply.js b/node_modules/umzug/node_modules/lodash/fp/unapply.js new file mode 100644 index 0000000..c5dfe77 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/unapply.js @@ -0,0 +1 @@ +module.exports = require('./rest'); diff --git a/node_modules/umzug/node_modules/lodash/fp/unary.js b/node_modules/umzug/node_modules/lodash/fp/unary.js new file mode 100644 index 0000000..286c945 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/unary.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unary', require('../unary'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/unescape.js b/node_modules/umzug/node_modules/lodash/fp/unescape.js new file mode 100644 index 0000000..fddcb46 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/unescape.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unescape', require('../unescape'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/union.js b/node_modules/umzug/node_modules/lodash/fp/union.js new file mode 100644 index 0000000..ef8228d --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/union.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('union', require('../union')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/unionBy.js b/node_modules/umzug/node_modules/lodash/fp/unionBy.js new file mode 100644 index 0000000..603687a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/unionBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unionBy', require('../unionBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/unionWith.js b/node_modules/umzug/node_modules/lodash/fp/unionWith.js new file mode 100644 index 0000000..65bb3a7 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/unionWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unionWith', require('../unionWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/uniq.js b/node_modules/umzug/node_modules/lodash/fp/uniq.js new file mode 100644 index 0000000..bc18524 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/uniq.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('uniq', require('../uniq'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/uniqBy.js b/node_modules/umzug/node_modules/lodash/fp/uniqBy.js new file mode 100644 index 0000000..634c6a8 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/uniqBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('uniqBy', require('../uniqBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/uniqWith.js b/node_modules/umzug/node_modules/lodash/fp/uniqWith.js new file mode 100644 index 0000000..0ec601a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/uniqWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('uniqWith', require('../uniqWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/uniqueId.js b/node_modules/umzug/node_modules/lodash/fp/uniqueId.js new file mode 100644 index 0000000..aa8fc2f --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/uniqueId.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('uniqueId', require('../uniqueId')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/unnest.js b/node_modules/umzug/node_modules/lodash/fp/unnest.js new file mode 100644 index 0000000..5d34060 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/unnest.js @@ -0,0 +1 @@ +module.exports = require('./flatten'); diff --git a/node_modules/umzug/node_modules/lodash/fp/unset.js b/node_modules/umzug/node_modules/lodash/fp/unset.js new file mode 100644 index 0000000..ea203a0 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/unset.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unset', require('../unset')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/unzip.js b/node_modules/umzug/node_modules/lodash/fp/unzip.js new file mode 100644 index 0000000..cc364b3 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/unzip.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unzip', require('../unzip'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/unzipWith.js b/node_modules/umzug/node_modules/lodash/fp/unzipWith.js new file mode 100644 index 0000000..182eaa1 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/unzipWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unzipWith', require('../unzipWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/update.js b/node_modules/umzug/node_modules/lodash/fp/update.js new file mode 100644 index 0000000..b8ce2cc --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/update.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('update', require('../update')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/updateWith.js b/node_modules/umzug/node_modules/lodash/fp/updateWith.js new file mode 100644 index 0000000..d5e8282 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/updateWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('updateWith', require('../updateWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/upperCase.js b/node_modules/umzug/node_modules/lodash/fp/upperCase.js new file mode 100644 index 0000000..c886f20 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/upperCase.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('upperCase', require('../upperCase'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/upperFirst.js b/node_modules/umzug/node_modules/lodash/fp/upperFirst.js new file mode 100644 index 0000000..d8c04df --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/upperFirst.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('upperFirst', require('../upperFirst'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/useWith.js b/node_modules/umzug/node_modules/lodash/fp/useWith.js new file mode 100644 index 0000000..d8b3df5 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/useWith.js @@ -0,0 +1 @@ +module.exports = require('./overArgs'); diff --git a/node_modules/umzug/node_modules/lodash/fp/util.js b/node_modules/umzug/node_modules/lodash/fp/util.js new file mode 100644 index 0000000..18c00ba --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/util.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../util')); diff --git a/node_modules/umzug/node_modules/lodash/fp/value.js b/node_modules/umzug/node_modules/lodash/fp/value.js new file mode 100644 index 0000000..555eec7 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/value.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('value', require('../value'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/valueOf.js b/node_modules/umzug/node_modules/lodash/fp/valueOf.js new file mode 100644 index 0000000..f968807 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/valueOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('valueOf', require('../valueOf'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/values.js b/node_modules/umzug/node_modules/lodash/fp/values.js new file mode 100644 index 0000000..2dfc561 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/values.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('values', require('../values'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/valuesIn.js b/node_modules/umzug/node_modules/lodash/fp/valuesIn.js new file mode 100644 index 0000000..a1b2bb8 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/valuesIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('valuesIn', require('../valuesIn'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/where.js b/node_modules/umzug/node_modules/lodash/fp/where.js new file mode 100644 index 0000000..3247f64 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/where.js @@ -0,0 +1 @@ +module.exports = require('./conformsTo'); diff --git a/node_modules/umzug/node_modules/lodash/fp/whereEq.js b/node_modules/umzug/node_modules/lodash/fp/whereEq.js new file mode 100644 index 0000000..29d1e1e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/whereEq.js @@ -0,0 +1 @@ +module.exports = require('./isMatch'); diff --git a/node_modules/umzug/node_modules/lodash/fp/without.js b/node_modules/umzug/node_modules/lodash/fp/without.js new file mode 100644 index 0000000..bad9e12 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/without.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('without', require('../without')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/words.js b/node_modules/umzug/node_modules/lodash/fp/words.js new file mode 100644 index 0000000..4a90141 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/words.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('words', require('../words')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/wrap.js b/node_modules/umzug/node_modules/lodash/fp/wrap.js new file mode 100644 index 0000000..e93bd8a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/wrap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('wrap', require('../wrap')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/wrapperAt.js b/node_modules/umzug/node_modules/lodash/fp/wrapperAt.js new file mode 100644 index 0000000..8f0a310 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/wrapperAt.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('wrapperAt', require('../wrapperAt'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/wrapperChain.js b/node_modules/umzug/node_modules/lodash/fp/wrapperChain.js new file mode 100644 index 0000000..2a48ea2 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/wrapperChain.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('wrapperChain', require('../wrapperChain'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/wrapperLodash.js b/node_modules/umzug/node_modules/lodash/fp/wrapperLodash.js new file mode 100644 index 0000000..a7162d0 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/wrapperLodash.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('wrapperLodash', require('../wrapperLodash'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/wrapperReverse.js b/node_modules/umzug/node_modules/lodash/fp/wrapperReverse.js new file mode 100644 index 0000000..e1481aa --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/wrapperReverse.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('wrapperReverse', require('../wrapperReverse'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/wrapperValue.js b/node_modules/umzug/node_modules/lodash/fp/wrapperValue.js new file mode 100644 index 0000000..8eb9112 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/wrapperValue.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('wrapperValue', require('../wrapperValue'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/xor.js b/node_modules/umzug/node_modules/lodash/fp/xor.js new file mode 100644 index 0000000..29e2819 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/xor.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('xor', require('../xor')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/xorBy.js b/node_modules/umzug/node_modules/lodash/fp/xorBy.js new file mode 100644 index 0000000..b355686 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/xorBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('xorBy', require('../xorBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/xorWith.js b/node_modules/umzug/node_modules/lodash/fp/xorWith.js new file mode 100644 index 0000000..8e05739 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/xorWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('xorWith', require('../xorWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/zip.js b/node_modules/umzug/node_modules/lodash/fp/zip.js new file mode 100644 index 0000000..69e147a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/zip.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('zip', require('../zip')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/zipAll.js b/node_modules/umzug/node_modules/lodash/fp/zipAll.js new file mode 100644 index 0000000..efa8ccb --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/zipAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('zipAll', require('../zip')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/zipObj.js b/node_modules/umzug/node_modules/lodash/fp/zipObj.js new file mode 100644 index 0000000..f4a3453 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/zipObj.js @@ -0,0 +1 @@ +module.exports = require('./zipObject'); diff --git a/node_modules/umzug/node_modules/lodash/fp/zipObject.js b/node_modules/umzug/node_modules/lodash/fp/zipObject.js new file mode 100644 index 0000000..462dbb6 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/zipObject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('zipObject', require('../zipObject')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/zipObjectDeep.js b/node_modules/umzug/node_modules/lodash/fp/zipObjectDeep.js new file mode 100644 index 0000000..53a5d33 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/zipObjectDeep.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('zipObjectDeep', require('../zipObjectDeep')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fp/zipWith.js b/node_modules/umzug/node_modules/lodash/fp/zipWith.js new file mode 100644 index 0000000..c5cf9e2 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fp/zipWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('zipWith', require('../zipWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/umzug/node_modules/lodash/fromPairs.js b/node_modules/umzug/node_modules/lodash/fromPairs.js new file mode 100644 index 0000000..ee7940d --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/fromPairs.js @@ -0,0 +1,28 @@ +/** + * The inverse of `_.toPairs`; this method returns an object composed + * from key-value `pairs`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} pairs The key-value pairs. + * @returns {Object} Returns the new object. + * @example + * + * _.fromPairs([['a', 1], ['b', 2]]); + * // => { 'a': 1, 'b': 2 } + */ +function fromPairs(pairs) { + var index = -1, + length = pairs == null ? 0 : pairs.length, + result = {}; + + while (++index < length) { + var pair = pairs[index]; + result[pair[0]] = pair[1]; + } + return result; +} + +module.exports = fromPairs; diff --git a/node_modules/umzug/node_modules/lodash/function.js b/node_modules/umzug/node_modules/lodash/function.js new file mode 100644 index 0000000..b0fc6d9 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/function.js @@ -0,0 +1,25 @@ +module.exports = { + 'after': require('./after'), + 'ary': require('./ary'), + 'before': require('./before'), + 'bind': require('./bind'), + 'bindKey': require('./bindKey'), + 'curry': require('./curry'), + 'curryRight': require('./curryRight'), + 'debounce': require('./debounce'), + 'defer': require('./defer'), + 'delay': require('./delay'), + 'flip': require('./flip'), + 'memoize': require('./memoize'), + 'negate': require('./negate'), + 'once': require('./once'), + 'overArgs': require('./overArgs'), + 'partial': require('./partial'), + 'partialRight': require('./partialRight'), + 'rearg': require('./rearg'), + 'rest': require('./rest'), + 'spread': require('./spread'), + 'throttle': require('./throttle'), + 'unary': require('./unary'), + 'wrap': require('./wrap') +}; diff --git a/node_modules/umzug/node_modules/lodash/functions.js b/node_modules/umzug/node_modules/lodash/functions.js new file mode 100644 index 0000000..9722928 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/functions.js @@ -0,0 +1,31 @@ +var baseFunctions = require('./_baseFunctions'), + keys = require('./keys'); + +/** + * Creates an array of function property names from own enumerable properties + * of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functionsIn + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functions(new Foo); + * // => ['a', 'b'] + */ +function functions(object) { + return object == null ? [] : baseFunctions(object, keys(object)); +} + +module.exports = functions; diff --git a/node_modules/umzug/node_modules/lodash/functionsIn.js b/node_modules/umzug/node_modules/lodash/functionsIn.js new file mode 100644 index 0000000..f00345d --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/functionsIn.js @@ -0,0 +1,31 @@ +var baseFunctions = require('./_baseFunctions'), + keysIn = require('./keysIn'); + +/** + * Creates an array of function property names from own and inherited + * enumerable properties of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functions + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functionsIn(new Foo); + * // => ['a', 'b', 'c'] + */ +function functionsIn(object) { + return object == null ? [] : baseFunctions(object, keysIn(object)); +} + +module.exports = functionsIn; diff --git a/node_modules/umzug/node_modules/lodash/get.js b/node_modules/umzug/node_modules/lodash/get.js new file mode 100644 index 0000000..8805ff9 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/get.js @@ -0,0 +1,33 @@ +var baseGet = require('./_baseGet'); + +/** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ +function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, path); + return result === undefined ? defaultValue : result; +} + +module.exports = get; diff --git a/node_modules/umzug/node_modules/lodash/groupBy.js b/node_modules/umzug/node_modules/lodash/groupBy.js new file mode 100644 index 0000000..babf4f6 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/groupBy.js @@ -0,0 +1,41 @@ +var baseAssignValue = require('./_baseAssignValue'), + createAggregator = require('./_createAggregator'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The order of grouped values + * is determined by the order they occur in `collection`. The corresponding + * value of each key is an array of elements responsible for generating the + * key. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': [4.2], '6': [6.1, 6.3] } + * + * // The `_.property` iteratee shorthand. + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ +var groupBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + result[key].push(value); + } else { + baseAssignValue(result, key, [value]); + } +}); + +module.exports = groupBy; diff --git a/node_modules/umzug/node_modules/lodash/gt.js b/node_modules/umzug/node_modules/lodash/gt.js new file mode 100644 index 0000000..3a66282 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/gt.js @@ -0,0 +1,29 @@ +var baseGt = require('./_baseGt'), + createRelationalOperation = require('./_createRelationalOperation'); + +/** + * Checks if `value` is greater than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + * @see _.lt + * @example + * + * _.gt(3, 1); + * // => true + * + * _.gt(3, 3); + * // => false + * + * _.gt(1, 3); + * // => false + */ +var gt = createRelationalOperation(baseGt); + +module.exports = gt; diff --git a/node_modules/umzug/node_modules/lodash/gte.js b/node_modules/umzug/node_modules/lodash/gte.js new file mode 100644 index 0000000..4180a68 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/gte.js @@ -0,0 +1,30 @@ +var createRelationalOperation = require('./_createRelationalOperation'); + +/** + * Checks if `value` is greater than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than or equal to + * `other`, else `false`. + * @see _.lte + * @example + * + * _.gte(3, 1); + * // => true + * + * _.gte(3, 3); + * // => true + * + * _.gte(1, 3); + * // => false + */ +var gte = createRelationalOperation(function(value, other) { + return value >= other; +}); + +module.exports = gte; diff --git a/node_modules/umzug/node_modules/lodash/has.js b/node_modules/umzug/node_modules/lodash/has.js new file mode 100644 index 0000000..34df55e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/has.js @@ -0,0 +1,35 @@ +var baseHas = require('./_baseHas'), + hasPath = require('./_hasPath'); + +/** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ +function has(object, path) { + return object != null && hasPath(object, path, baseHas); +} + +module.exports = has; diff --git a/node_modules/umzug/node_modules/lodash/hasIn.js b/node_modules/umzug/node_modules/lodash/hasIn.js new file mode 100644 index 0000000..06a3686 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/hasIn.js @@ -0,0 +1,34 @@ +var baseHasIn = require('./_baseHasIn'), + hasPath = require('./_hasPath'); + +/** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ +function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); +} + +module.exports = hasIn; diff --git a/node_modules/umzug/node_modules/lodash/head.js b/node_modules/umzug/node_modules/lodash/head.js new file mode 100644 index 0000000..dee9d1f --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/head.js @@ -0,0 +1,23 @@ +/** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias first + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.head([1, 2, 3]); + * // => 1 + * + * _.head([]); + * // => undefined + */ +function head(array) { + return (array && array.length) ? array[0] : undefined; +} + +module.exports = head; diff --git a/node_modules/umzug/node_modules/lodash/identity.js b/node_modules/umzug/node_modules/lodash/identity.js new file mode 100644 index 0000000..2d5d963 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/identity.js @@ -0,0 +1,21 @@ +/** + * This method returns the first argument it receives. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'a': 1 }; + * + * console.log(_.identity(object) === object); + * // => true + */ +function identity(value) { + return value; +} + +module.exports = identity; diff --git a/node_modules/umzug/node_modules/lodash/inRange.js b/node_modules/umzug/node_modules/lodash/inRange.js new file mode 100644 index 0000000..f20728d --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/inRange.js @@ -0,0 +1,55 @@ +var baseInRange = require('./_baseInRange'), + toFinite = require('./toFinite'), + toNumber = require('./toNumber'); + +/** + * Checks if `n` is between `start` and up to, but not including, `end`. If + * `end` is not specified, it's set to `start` with `start` then set to `0`. + * If `start` is greater than `end` the params are swapped to support + * negative ranges. + * + * @static + * @memberOf _ + * @since 3.3.0 + * @category Number + * @param {number} number The number to check. + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + * @see _.range, _.rangeRight + * @example + * + * _.inRange(3, 2, 4); + * // => true + * + * _.inRange(4, 8); + * // => true + * + * _.inRange(4, 2); + * // => false + * + * _.inRange(2, 2); + * // => false + * + * _.inRange(1.2, 2); + * // => true + * + * _.inRange(5.2, 4); + * // => false + * + * _.inRange(-3, -2, -6); + * // => true + */ +function inRange(number, start, end) { + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + number = toNumber(number); + return baseInRange(number, start, end); +} + +module.exports = inRange; diff --git a/node_modules/umzug/node_modules/lodash/includes.js b/node_modules/umzug/node_modules/lodash/includes.js new file mode 100644 index 0000000..ae0deed --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/includes.js @@ -0,0 +1,53 @@ +var baseIndexOf = require('./_baseIndexOf'), + isArrayLike = require('./isArrayLike'), + isString = require('./isString'), + toInteger = require('./toInteger'), + values = require('./values'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Checks if `value` is in `collection`. If `collection` is a string, it's + * checked for a substring of `value`, otherwise + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * is used for equality comparisons. If `fromIndex` is negative, it's used as + * the offset from the end of `collection`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {boolean} Returns `true` if `value` is found, else `false`. + * @example + * + * _.includes([1, 2, 3], 1); + * // => true + * + * _.includes([1, 2, 3], 1, 2); + * // => false + * + * _.includes({ 'a': 1, 'b': 2 }, 1); + * // => true + * + * _.includes('abcd', 'bc'); + * // => true + */ +function includes(collection, value, fromIndex, guard) { + collection = isArrayLike(collection) ? collection : values(collection); + fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; + + var length = collection.length; + if (fromIndex < 0) { + fromIndex = nativeMax(length + fromIndex, 0); + } + return isString(collection) + ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) + : (!!length && baseIndexOf(collection, value, fromIndex) > -1); +} + +module.exports = includes; diff --git a/node_modules/umzug/node_modules/lodash/index.js b/node_modules/umzug/node_modules/lodash/index.js new file mode 100644 index 0000000..5d063e2 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/index.js @@ -0,0 +1 @@ +module.exports = require('./lodash'); \ No newline at end of file diff --git a/node_modules/umzug/node_modules/lodash/indexOf.js b/node_modules/umzug/node_modules/lodash/indexOf.js new file mode 100644 index 0000000..3c644af --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/indexOf.js @@ -0,0 +1,42 @@ +var baseIndexOf = require('./_baseIndexOf'), + toInteger = require('./toInteger'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the + * offset from the end of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // Search from the `fromIndex`. + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + */ +function indexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseIndexOf(array, value, index); +} + +module.exports = indexOf; diff --git a/node_modules/umzug/node_modules/lodash/initial.js b/node_modules/umzug/node_modules/lodash/initial.js new file mode 100644 index 0000000..f47fc50 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/initial.js @@ -0,0 +1,22 @@ +var baseSlice = require('./_baseSlice'); + +/** + * Gets all but the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + */ +function initial(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 0, -1) : []; +} + +module.exports = initial; diff --git a/node_modules/umzug/node_modules/lodash/intersection.js b/node_modules/umzug/node_modules/lodash/intersection.js new file mode 100644 index 0000000..a94c135 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/intersection.js @@ -0,0 +1,30 @@ +var arrayMap = require('./_arrayMap'), + baseIntersection = require('./_baseIntersection'), + baseRest = require('./_baseRest'), + castArrayLikeObject = require('./_castArrayLikeObject'); + +/** + * Creates an array of unique values that are included in all given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersection([2, 1], [2, 3]); + * // => [2] + */ +var intersection = baseRest(function(arrays) { + var mapped = arrayMap(arrays, castArrayLikeObject); + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped) + : []; +}); + +module.exports = intersection; diff --git a/node_modules/umzug/node_modules/lodash/intersectionBy.js b/node_modules/umzug/node_modules/lodash/intersectionBy.js new file mode 100644 index 0000000..31461aa --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/intersectionBy.js @@ -0,0 +1,45 @@ +var arrayMap = require('./_arrayMap'), + baseIntersection = require('./_baseIntersection'), + baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'), + castArrayLikeObject = require('./_castArrayLikeObject'), + last = require('./last'); + +/** + * This method is like `_.intersection` except that it accepts `iteratee` + * which is invoked for each element of each `arrays` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [2.1] + * + * // The `_.property` iteratee shorthand. + * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }] + */ +var intersectionBy = baseRest(function(arrays) { + var iteratee = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + if (iteratee === last(mapped)) { + iteratee = undefined; + } else { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, baseIteratee(iteratee, 2)) + : []; +}); + +module.exports = intersectionBy; diff --git a/node_modules/umzug/node_modules/lodash/intersectionWith.js b/node_modules/umzug/node_modules/lodash/intersectionWith.js new file mode 100644 index 0000000..63cabfa --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/intersectionWith.js @@ -0,0 +1,41 @@ +var arrayMap = require('./_arrayMap'), + baseIntersection = require('./_baseIntersection'), + baseRest = require('./_baseRest'), + castArrayLikeObject = require('./_castArrayLikeObject'), + last = require('./last'); + +/** + * This method is like `_.intersection` except that it accepts `comparator` + * which is invoked to compare elements of `arrays`. The order and references + * of result values are determined by the first array. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.intersectionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }] + */ +var intersectionWith = baseRest(function(arrays) { + var comparator = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + comparator = typeof comparator == 'function' ? comparator : undefined; + if (comparator) { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, undefined, comparator) + : []; +}); + +module.exports = intersectionWith; diff --git a/node_modules/umzug/node_modules/lodash/invert.js b/node_modules/umzug/node_modules/lodash/invert.js new file mode 100644 index 0000000..21d10ab --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/invert.js @@ -0,0 +1,27 @@ +var constant = require('./constant'), + createInverter = require('./_createInverter'), + identity = require('./identity'); + +/** + * Creates an object composed of the inverted keys and values of `object`. + * If `object` contains duplicate values, subsequent values overwrite + * property assignments of previous values. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Object + * @param {Object} object The object to invert. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invert(object); + * // => { '1': 'c', '2': 'b' } + */ +var invert = createInverter(function(result, value, key) { + result[value] = key; +}, constant(identity)); + +module.exports = invert; diff --git a/node_modules/umzug/node_modules/lodash/invertBy.js b/node_modules/umzug/node_modules/lodash/invertBy.js new file mode 100644 index 0000000..e5ba0f7 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/invertBy.js @@ -0,0 +1,44 @@ +var baseIteratee = require('./_baseIteratee'), + createInverter = require('./_createInverter'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * This method is like `_.invert` except that the inverted object is generated + * from the results of running each element of `object` thru `iteratee`. The + * corresponding inverted value of each inverted key is an array of keys + * responsible for generating the inverted value. The iteratee is invoked + * with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Object + * @param {Object} object The object to invert. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invertBy(object); + * // => { '1': ['a', 'c'], '2': ['b'] } + * + * _.invertBy(object, function(value) { + * return 'group' + value; + * }); + * // => { 'group1': ['a', 'c'], 'group2': ['b'] } + */ +var invertBy = createInverter(function(result, value, key) { + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } +}, baseIteratee); + +module.exports = invertBy; diff --git a/node_modules/umzug/node_modules/lodash/invoke.js b/node_modules/umzug/node_modules/lodash/invoke.js new file mode 100644 index 0000000..97d51eb --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/invoke.js @@ -0,0 +1,24 @@ +var baseInvoke = require('./_baseInvoke'), + baseRest = require('./_baseRest'); + +/** + * Invokes the method at `path` of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + * @example + * + * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }; + * + * _.invoke(object, 'a[0].b.c.slice', 1, 3); + * // => [2, 3] + */ +var invoke = baseRest(baseInvoke); + +module.exports = invoke; diff --git a/node_modules/umzug/node_modules/lodash/invokeMap.js b/node_modules/umzug/node_modules/lodash/invokeMap.js new file mode 100644 index 0000000..8da5126 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/invokeMap.js @@ -0,0 +1,41 @@ +var apply = require('./_apply'), + baseEach = require('./_baseEach'), + baseInvoke = require('./_baseInvoke'), + baseRest = require('./_baseRest'), + isArrayLike = require('./isArrayLike'); + +/** + * Invokes the method at `path` of each element in `collection`, returning + * an array of the results of each invoked method. Any additional arguments + * are provided to each invoked method. If `path` is a function, it's invoked + * for, and `this` bound to, each element in `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array|Function|string} path The path of the method to invoke or + * the function invoked per iteration. + * @param {...*} [args] The arguments to invoke each method with. + * @returns {Array} Returns the array of results. + * @example + * + * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invokeMap([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ +var invokeMap = baseRest(function(collection, path, args) { + var index = -1, + isFunc = typeof path == 'function', + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value) { + result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); + }); + return result; +}); + +module.exports = invokeMap; diff --git a/node_modules/umzug/node_modules/lodash/isArguments.js b/node_modules/umzug/node_modules/lodash/isArguments.js new file mode 100644 index 0000000..8b9ed66 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/isArguments.js @@ -0,0 +1,36 @@ +var baseIsArguments = require('./_baseIsArguments'), + isObjectLike = require('./isObjectLike'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); +}; + +module.exports = isArguments; diff --git a/node_modules/umzug/node_modules/lodash/isArray.js b/node_modules/umzug/node_modules/lodash/isArray.js new file mode 100644 index 0000000..88ab55f --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/isArray.js @@ -0,0 +1,26 @@ +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +module.exports = isArray; diff --git a/node_modules/umzug/node_modules/lodash/isArrayBuffer.js b/node_modules/umzug/node_modules/lodash/isArrayBuffer.js new file mode 100644 index 0000000..12904a6 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/isArrayBuffer.js @@ -0,0 +1,27 @@ +var baseIsArrayBuffer = require('./_baseIsArrayBuffer'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer; + +/** + * Checks if `value` is classified as an `ArrayBuffer` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + * @example + * + * _.isArrayBuffer(new ArrayBuffer(2)); + * // => true + * + * _.isArrayBuffer(new Array(2)); + * // => false + */ +var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; + +module.exports = isArrayBuffer; diff --git a/node_modules/umzug/node_modules/lodash/isArrayLike.js b/node_modules/umzug/node_modules/lodash/isArrayLike.js new file mode 100644 index 0000000..0f96680 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/isArrayLike.js @@ -0,0 +1,33 @@ +var isFunction = require('./isFunction'), + isLength = require('./isLength'); + +/** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ +function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); +} + +module.exports = isArrayLike; diff --git a/node_modules/umzug/node_modules/lodash/isArrayLikeObject.js b/node_modules/umzug/node_modules/lodash/isArrayLikeObject.js new file mode 100644 index 0000000..6c4812a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/isArrayLikeObject.js @@ -0,0 +1,33 @@ +var isArrayLike = require('./isArrayLike'), + isObjectLike = require('./isObjectLike'); + +/** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ +function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); +} + +module.exports = isArrayLikeObject; diff --git a/node_modules/umzug/node_modules/lodash/isBoolean.js b/node_modules/umzug/node_modules/lodash/isBoolean.js new file mode 100644 index 0000000..a43ed4b --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/isBoolean.js @@ -0,0 +1,29 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]'; + +/** + * Checks if `value` is classified as a boolean primitive or object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. + * @example + * + * _.isBoolean(false); + * // => true + * + * _.isBoolean(null); + * // => false + */ +function isBoolean(value) { + return value === true || value === false || + (isObjectLike(value) && baseGetTag(value) == boolTag); +} + +module.exports = isBoolean; diff --git a/node_modules/umzug/node_modules/lodash/isBuffer.js b/node_modules/umzug/node_modules/lodash/isBuffer.js new file mode 100644 index 0000000..c103cc7 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/isBuffer.js @@ -0,0 +1,38 @@ +var root = require('./_root'), + stubFalse = require('./stubFalse'); + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; + +/** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ +var isBuffer = nativeIsBuffer || stubFalse; + +module.exports = isBuffer; diff --git a/node_modules/umzug/node_modules/lodash/isDate.js b/node_modules/umzug/node_modules/lodash/isDate.js new file mode 100644 index 0000000..7f0209f --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/isDate.js @@ -0,0 +1,27 @@ +var baseIsDate = require('./_baseIsDate'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsDate = nodeUtil && nodeUtil.isDate; + +/** + * Checks if `value` is classified as a `Date` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + * + * _.isDate('Mon April 23 2012'); + * // => false + */ +var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; + +module.exports = isDate; diff --git a/node_modules/umzug/node_modules/lodash/isElement.js b/node_modules/umzug/node_modules/lodash/isElement.js new file mode 100644 index 0000000..76ae29c --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/isElement.js @@ -0,0 +1,25 @@ +var isObjectLike = require('./isObjectLike'), + isPlainObject = require('./isPlainObject'); + +/** + * Checks if `value` is likely a DOM element. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. + * @example + * + * _.isElement(document.body); + * // => true + * + * _.isElement(''); + * // => false + */ +function isElement(value) { + return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); +} + +module.exports = isElement; diff --git a/node_modules/umzug/node_modules/lodash/isEmpty.js b/node_modules/umzug/node_modules/lodash/isEmpty.js new file mode 100644 index 0000000..3597294 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/isEmpty.js @@ -0,0 +1,77 @@ +var baseKeys = require('./_baseKeys'), + getTag = require('./_getTag'), + isArguments = require('./isArguments'), + isArray = require('./isArray'), + isArrayLike = require('./isArrayLike'), + isBuffer = require('./isBuffer'), + isPrototype = require('./_isPrototype'), + isTypedArray = require('./isTypedArray'); + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + setTag = '[object Set]'; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Checks if `value` is an empty object, collection, map, or set. + * + * Objects are considered empty if they have no own enumerable string keyed + * properties. + * + * Array-like values such as `arguments` objects, arrays, buffers, strings, or + * jQuery-like collections are considered empty if they have a `length` of `0`. + * Similarly, maps and sets are considered empty if they have a `size` of `0`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ +function isEmpty(value) { + if (value == null) { + return true; + } + if (isArrayLike(value) && + (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || + isBuffer(value) || isTypedArray(value) || isArguments(value))) { + return !value.length; + } + var tag = getTag(value); + if (tag == mapTag || tag == setTag) { + return !value.size; + } + if (isPrototype(value)) { + return !baseKeys(value).length; + } + for (var key in value) { + if (hasOwnProperty.call(value, key)) { + return false; + } + } + return true; +} + +module.exports = isEmpty; diff --git a/node_modules/umzug/node_modules/lodash/isEqual.js b/node_modules/umzug/node_modules/lodash/isEqual.js new file mode 100644 index 0000000..5e23e76 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/isEqual.js @@ -0,0 +1,35 @@ +var baseIsEqual = require('./_baseIsEqual'); + +/** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are compared by strict equality, i.e. `===`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ +function isEqual(value, other) { + return baseIsEqual(value, other); +} + +module.exports = isEqual; diff --git a/node_modules/umzug/node_modules/lodash/isEqualWith.js b/node_modules/umzug/node_modules/lodash/isEqualWith.js new file mode 100644 index 0000000..21bdc7f --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/isEqualWith.js @@ -0,0 +1,41 @@ +var baseIsEqual = require('./_baseIsEqual'); + +/** + * This method is like `_.isEqual` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with up to + * six arguments: (objValue, othValue [, index|key, object, other, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, othValue) { + * if (isGreeting(objValue) && isGreeting(othValue)) { + * return true; + * } + * } + * + * var array = ['hello', 'goodbye']; + * var other = ['hi', 'goodbye']; + * + * _.isEqualWith(array, other, customizer); + * // => true + */ +function isEqualWith(value, other, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + var result = customizer ? customizer(value, other) : undefined; + return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; +} + +module.exports = isEqualWith; diff --git a/node_modules/umzug/node_modules/lodash/isError.js b/node_modules/umzug/node_modules/lodash/isError.js new file mode 100644 index 0000000..b4f41e0 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/isError.js @@ -0,0 +1,36 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'), + isPlainObject = require('./isPlainObject'); + +/** `Object#toString` result references. */ +var domExcTag = '[object DOMException]', + errorTag = '[object Error]'; + +/** + * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, + * `SyntaxError`, `TypeError`, or `URIError` object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an error object, else `false`. + * @example + * + * _.isError(new Error); + * // => true + * + * _.isError(Error); + * // => false + */ +function isError(value) { + if (!isObjectLike(value)) { + return false; + } + var tag = baseGetTag(value); + return tag == errorTag || tag == domExcTag || + (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)); +} + +module.exports = isError; diff --git a/node_modules/umzug/node_modules/lodash/isFinite.js b/node_modules/umzug/node_modules/lodash/isFinite.js new file mode 100644 index 0000000..601842b --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/isFinite.js @@ -0,0 +1,36 @@ +var root = require('./_root'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsFinite = root.isFinite; + +/** + * Checks if `value` is a finite primitive number. + * + * **Note:** This method is based on + * [`Number.isFinite`](https://mdn.io/Number/isFinite). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. + * @example + * + * _.isFinite(3); + * // => true + * + * _.isFinite(Number.MIN_VALUE); + * // => true + * + * _.isFinite(Infinity); + * // => false + * + * _.isFinite('3'); + * // => false + */ +function isFinite(value) { + return typeof value == 'number' && nativeIsFinite(value); +} + +module.exports = isFinite; diff --git a/node_modules/umzug/node_modules/lodash/isFunction.js b/node_modules/umzug/node_modules/lodash/isFunction.js new file mode 100644 index 0000000..907a8cd --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/isFunction.js @@ -0,0 +1,37 @@ +var baseGetTag = require('./_baseGetTag'), + isObject = require('./isObject'); + +/** `Object#toString` result references. */ +var asyncTag = '[object AsyncFunction]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + proxyTag = '[object Proxy]'; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; +} + +module.exports = isFunction; diff --git a/node_modules/umzug/node_modules/lodash/isInteger.js b/node_modules/umzug/node_modules/lodash/isInteger.js new file mode 100644 index 0000000..66aa87d --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/isInteger.js @@ -0,0 +1,33 @@ +var toInteger = require('./toInteger'); + +/** + * Checks if `value` is an integer. + * + * **Note:** This method is based on + * [`Number.isInteger`](https://mdn.io/Number/isInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an integer, else `false`. + * @example + * + * _.isInteger(3); + * // => true + * + * _.isInteger(Number.MIN_VALUE); + * // => false + * + * _.isInteger(Infinity); + * // => false + * + * _.isInteger('3'); + * // => false + */ +function isInteger(value) { + return typeof value == 'number' && value == toInteger(value); +} + +module.exports = isInteger; diff --git a/node_modules/umzug/node_modules/lodash/isLength.js b/node_modules/umzug/node_modules/lodash/isLength.js new file mode 100644 index 0000000..3a95caa --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/isLength.js @@ -0,0 +1,35 @@ +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +module.exports = isLength; diff --git a/node_modules/umzug/node_modules/lodash/isMap.js b/node_modules/umzug/node_modules/lodash/isMap.js new file mode 100644 index 0000000..44f8517 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/isMap.js @@ -0,0 +1,27 @@ +var baseIsMap = require('./_baseIsMap'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsMap = nodeUtil && nodeUtil.isMap; + +/** + * Checks if `value` is classified as a `Map` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @example + * + * _.isMap(new Map); + * // => true + * + * _.isMap(new WeakMap); + * // => false + */ +var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; + +module.exports = isMap; diff --git a/node_modules/umzug/node_modules/lodash/isMatch.js b/node_modules/umzug/node_modules/lodash/isMatch.js new file mode 100644 index 0000000..9773a18 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/isMatch.js @@ -0,0 +1,36 @@ +var baseIsMatch = require('./_baseIsMatch'), + getMatchData = require('./_getMatchData'); + +/** + * Performs a partial deep comparison between `object` and `source` to + * determine if `object` contains equivalent property values. + * + * **Note:** This method is equivalent to `_.matches` when `source` is + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.isMatch(object, { 'b': 2 }); + * // => true + * + * _.isMatch(object, { 'b': 1 }); + * // => false + */ +function isMatch(object, source) { + return object === source || baseIsMatch(object, source, getMatchData(source)); +} + +module.exports = isMatch; diff --git a/node_modules/umzug/node_modules/lodash/isMatchWith.js b/node_modules/umzug/node_modules/lodash/isMatchWith.js new file mode 100644 index 0000000..187b6a6 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/isMatchWith.js @@ -0,0 +1,41 @@ +var baseIsMatch = require('./_baseIsMatch'), + getMatchData = require('./_getMatchData'); + +/** + * This method is like `_.isMatch` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with five + * arguments: (objValue, srcValue, index|key, object, source). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, srcValue) { + * if (isGreeting(objValue) && isGreeting(srcValue)) { + * return true; + * } + * } + * + * var object = { 'greeting': 'hello' }; + * var source = { 'greeting': 'hi' }; + * + * _.isMatchWith(object, source, customizer); + * // => true + */ +function isMatchWith(object, source, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseIsMatch(object, source, getMatchData(source), customizer); +} + +module.exports = isMatchWith; diff --git a/node_modules/umzug/node_modules/lodash/isNaN.js b/node_modules/umzug/node_modules/lodash/isNaN.js new file mode 100644 index 0000000..7d0d783 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/isNaN.js @@ -0,0 +1,38 @@ +var isNumber = require('./isNumber'); + +/** + * Checks if `value` is `NaN`. + * + * **Note:** This method is based on + * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as + * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for + * `undefined` and other non-number values. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ +function isNaN(value) { + // An `NaN` primitive is the only value that is not equal to itself. + // Perform the `toStringTag` check first to avoid errors with some + // ActiveX objects in IE. + return isNumber(value) && value != +value; +} + +module.exports = isNaN; diff --git a/node_modules/umzug/node_modules/lodash/isNative.js b/node_modules/umzug/node_modules/lodash/isNative.js new file mode 100644 index 0000000..f0cb8d5 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/isNative.js @@ -0,0 +1,40 @@ +var baseIsNative = require('./_baseIsNative'), + isMaskable = require('./_isMaskable'); + +/** Error message constants. */ +var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.'; + +/** + * Checks if `value` is a pristine native function. + * + * **Note:** This method can't reliably detect native functions in the presence + * of the core-js package because core-js circumvents this kind of detection. + * Despite multiple requests, the core-js maintainer has made it clear: any + * attempt to fix the detection will be obstructed. As a result, we're left + * with little choice but to throw an error. Unfortunately, this also affects + * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), + * which rely on core-js. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ +function isNative(value) { + if (isMaskable(value)) { + throw new Error(CORE_ERROR_TEXT); + } + return baseIsNative(value); +} + +module.exports = isNative; diff --git a/node_modules/umzug/node_modules/lodash/isNil.js b/node_modules/umzug/node_modules/lodash/isNil.js new file mode 100644 index 0000000..79f0505 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/isNil.js @@ -0,0 +1,25 @@ +/** + * Checks if `value` is `null` or `undefined`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is nullish, else `false`. + * @example + * + * _.isNil(null); + * // => true + * + * _.isNil(void 0); + * // => true + * + * _.isNil(NaN); + * // => false + */ +function isNil(value) { + return value == null; +} + +module.exports = isNil; diff --git a/node_modules/umzug/node_modules/lodash/isNull.js b/node_modules/umzug/node_modules/lodash/isNull.js new file mode 100644 index 0000000..c0a374d --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/isNull.js @@ -0,0 +1,22 @@ +/** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(void 0); + * // => false + */ +function isNull(value) { + return value === null; +} + +module.exports = isNull; diff --git a/node_modules/umzug/node_modules/lodash/isNumber.js b/node_modules/umzug/node_modules/lodash/isNumber.js new file mode 100644 index 0000000..cd34ee4 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/isNumber.js @@ -0,0 +1,38 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var numberTag = '[object Number]'; + +/** + * Checks if `value` is classified as a `Number` primitive or object. + * + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are + * classified as numbers, use the `_.isFinite` method. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. + * @example + * + * _.isNumber(3); + * // => true + * + * _.isNumber(Number.MIN_VALUE); + * // => true + * + * _.isNumber(Infinity); + * // => true + * + * _.isNumber('3'); + * // => false + */ +function isNumber(value) { + return typeof value == 'number' || + (isObjectLike(value) && baseGetTag(value) == numberTag); +} + +module.exports = isNumber; diff --git a/node_modules/umzug/node_modules/lodash/isObject.js b/node_modules/umzug/node_modules/lodash/isObject.js new file mode 100644 index 0000000..1dc8939 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/isObject.js @@ -0,0 +1,31 @@ +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); +} + +module.exports = isObject; diff --git a/node_modules/umzug/node_modules/lodash/isObjectLike.js b/node_modules/umzug/node_modules/lodash/isObjectLike.js new file mode 100644 index 0000000..301716b --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/isObjectLike.js @@ -0,0 +1,29 @@ +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return value != null && typeof value == 'object'; +} + +module.exports = isObjectLike; diff --git a/node_modules/umzug/node_modules/lodash/isPlainObject.js b/node_modules/umzug/node_modules/lodash/isPlainObject.js new file mode 100644 index 0000000..2387373 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/isPlainObject.js @@ -0,0 +1,62 @@ +var baseGetTag = require('./_baseGetTag'), + getPrototype = require('./_getPrototype'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var objectTag = '[object Object]'; + +/** Used for built-in method references. */ +var funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to infer the `Object` constructor. */ +var objectCtorString = funcToString.call(Object); + +/** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ +function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; +} + +module.exports = isPlainObject; diff --git a/node_modules/umzug/node_modules/lodash/isRegExp.js b/node_modules/umzug/node_modules/lodash/isRegExp.js new file mode 100644 index 0000000..76c9b6e --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/isRegExp.js @@ -0,0 +1,27 @@ +var baseIsRegExp = require('./_baseIsRegExp'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsRegExp = nodeUtil && nodeUtil.isRegExp; + +/** + * Checks if `value` is classified as a `RegExp` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + * @example + * + * _.isRegExp(/abc/); + * // => true + * + * _.isRegExp('/abc/'); + * // => false + */ +var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; + +module.exports = isRegExp; diff --git a/node_modules/umzug/node_modules/lodash/isSafeInteger.js b/node_modules/umzug/node_modules/lodash/isSafeInteger.js new file mode 100644 index 0000000..2a48526 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/isSafeInteger.js @@ -0,0 +1,37 @@ +var isInteger = require('./isInteger'); + +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 + * double precision number which isn't the result of a rounded unsafe integer. + * + * **Note:** This method is based on + * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. + * @example + * + * _.isSafeInteger(3); + * // => true + * + * _.isSafeInteger(Number.MIN_VALUE); + * // => false + * + * _.isSafeInteger(Infinity); + * // => false + * + * _.isSafeInteger('3'); + * // => false + */ +function isSafeInteger(value) { + return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; +} + +module.exports = isSafeInteger; diff --git a/node_modules/umzug/node_modules/lodash/isSet.js b/node_modules/umzug/node_modules/lodash/isSet.js new file mode 100644 index 0000000..ab88bdf --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/isSet.js @@ -0,0 +1,27 @@ +var baseIsSet = require('./_baseIsSet'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsSet = nodeUtil && nodeUtil.isSet; + +/** + * Checks if `value` is classified as a `Set` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @example + * + * _.isSet(new Set); + * // => true + * + * _.isSet(new WeakSet); + * // => false + */ +var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; + +module.exports = isSet; diff --git a/node_modules/umzug/node_modules/lodash/isString.js b/node_modules/umzug/node_modules/lodash/isString.js new file mode 100644 index 0000000..627eb9c --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/isString.js @@ -0,0 +1,30 @@ +var baseGetTag = require('./_baseGetTag'), + isArray = require('./isArray'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var stringTag = '[object String]'; + +/** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ +function isString(value) { + return typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); +} + +module.exports = isString; diff --git a/node_modules/umzug/node_modules/lodash/isSymbol.js b/node_modules/umzug/node_modules/lodash/isSymbol.js new file mode 100644 index 0000000..dfb60b9 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/isSymbol.js @@ -0,0 +1,29 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && baseGetTag(value) == symbolTag); +} + +module.exports = isSymbol; diff --git a/node_modules/umzug/node_modules/lodash/isTypedArray.js b/node_modules/umzug/node_modules/lodash/isTypedArray.js new file mode 100644 index 0000000..da3f8dd --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/isTypedArray.js @@ -0,0 +1,27 @@ +var baseIsTypedArray = require('./_baseIsTypedArray'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + +/** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ +var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + +module.exports = isTypedArray; diff --git a/node_modules/umzug/node_modules/lodash/isUndefined.js b/node_modules/umzug/node_modules/lodash/isUndefined.js new file mode 100644 index 0000000..377d121 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/isUndefined.js @@ -0,0 +1,22 @@ +/** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ +function isUndefined(value) { + return value === undefined; +} + +module.exports = isUndefined; diff --git a/node_modules/umzug/node_modules/lodash/isWeakMap.js b/node_modules/umzug/node_modules/lodash/isWeakMap.js new file mode 100644 index 0000000..8d36f66 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/isWeakMap.js @@ -0,0 +1,28 @@ +var getTag = require('./_getTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var weakMapTag = '[object WeakMap]'; + +/** + * Checks if `value` is classified as a `WeakMap` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. + * @example + * + * _.isWeakMap(new WeakMap); + * // => true + * + * _.isWeakMap(new Map); + * // => false + */ +function isWeakMap(value) { + return isObjectLike(value) && getTag(value) == weakMapTag; +} + +module.exports = isWeakMap; diff --git a/node_modules/umzug/node_modules/lodash/isWeakSet.js b/node_modules/umzug/node_modules/lodash/isWeakSet.js new file mode 100644 index 0000000..e628b26 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/isWeakSet.js @@ -0,0 +1,28 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var weakSetTag = '[object WeakSet]'; + +/** + * Checks if `value` is classified as a `WeakSet` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. + * @example + * + * _.isWeakSet(new WeakSet); + * // => true + * + * _.isWeakSet(new Set); + * // => false + */ +function isWeakSet(value) { + return isObjectLike(value) && baseGetTag(value) == weakSetTag; +} + +module.exports = isWeakSet; diff --git a/node_modules/umzug/node_modules/lodash/iteratee.js b/node_modules/umzug/node_modules/lodash/iteratee.js new file mode 100644 index 0000000..61b73a8 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/iteratee.js @@ -0,0 +1,53 @@ +var baseClone = require('./_baseClone'), + baseIteratee = require('./_baseIteratee'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1; + +/** + * Creates a function that invokes `func` with the arguments of the created + * function. If `func` is a property name, the created function returns the + * property value for a given element. If `func` is an array or object, the + * created function returns `true` for elements that contain the equivalent + * source properties, otherwise it returns `false`. + * + * @static + * @since 4.0.0 + * @memberOf _ + * @category Util + * @param {*} [func=_.identity] The value to convert to a callback. + * @returns {Function} Returns the callback. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true })); + * // => [{ 'user': 'barney', 'age': 36, 'active': true }] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, _.iteratee(['user', 'fred'])); + * // => [{ 'user': 'fred', 'age': 40 }] + * + * // The `_.property` iteratee shorthand. + * _.map(users, _.iteratee('user')); + * // => ['barney', 'fred'] + * + * // Create custom iteratee shorthands. + * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) { + * return !_.isRegExp(func) ? iteratee(func) : function(string) { + * return func.test(string); + * }; + * }); + * + * _.filter(['abc', 'def'], /ef/); + * // => ['def'] + */ +function iteratee(func) { + return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG)); +} + +module.exports = iteratee; diff --git a/node_modules/umzug/node_modules/lodash/join.js b/node_modules/umzug/node_modules/lodash/join.js new file mode 100644 index 0000000..45de079 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/join.js @@ -0,0 +1,26 @@ +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeJoin = arrayProto.join; + +/** + * Converts all elements in `array` into a string separated by `separator`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to convert. + * @param {string} [separator=','] The element separator. + * @returns {string} Returns the joined string. + * @example + * + * _.join(['a', 'b', 'c'], '~'); + * // => 'a~b~c' + */ +function join(array, separator) { + return array == null ? '' : nativeJoin.call(array, separator); +} + +module.exports = join; diff --git a/node_modules/umzug/node_modules/lodash/kebabCase.js b/node_modules/umzug/node_modules/lodash/kebabCase.js new file mode 100644 index 0000000..8a52be6 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/kebabCase.js @@ -0,0 +1,28 @@ +var createCompounder = require('./_createCompounder'); + +/** + * Converts `string` to + * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the kebab cased string. + * @example + * + * _.kebabCase('Foo Bar'); + * // => 'foo-bar' + * + * _.kebabCase('fooBar'); + * // => 'foo-bar' + * + * _.kebabCase('__FOO_BAR__'); + * // => 'foo-bar' + */ +var kebabCase = createCompounder(function(result, word, index) { + return result + (index ? '-' : '') + word.toLowerCase(); +}); + +module.exports = kebabCase; diff --git a/node_modules/umzug/node_modules/lodash/keyBy.js b/node_modules/umzug/node_modules/lodash/keyBy.js new file mode 100644 index 0000000..acc007a --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/keyBy.js @@ -0,0 +1,36 @@ +var baseAssignValue = require('./_baseAssignValue'), + createAggregator = require('./_createAggregator'); + +/** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the last element responsible for generating the key. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var array = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.keyBy(array, function(o) { + * return String.fromCharCode(o.code); + * }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.keyBy(array, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + */ +var keyBy = createAggregator(function(result, value, key) { + baseAssignValue(result, key, value); +}); + +module.exports = keyBy; diff --git a/node_modules/umzug/node_modules/lodash/keys.js b/node_modules/umzug/node_modules/lodash/keys.js new file mode 100644 index 0000000..d143c71 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/keys.js @@ -0,0 +1,37 @@ +var arrayLikeKeys = require('./_arrayLikeKeys'), + baseKeys = require('./_baseKeys'), + isArrayLike = require('./isArrayLike'); + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); +} + +module.exports = keys; diff --git a/node_modules/umzug/node_modules/lodash/keysIn.js b/node_modules/umzug/node_modules/lodash/keysIn.js new file mode 100644 index 0000000..a62308f --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/keysIn.js @@ -0,0 +1,32 @@ +var arrayLikeKeys = require('./_arrayLikeKeys'), + baseKeysIn = require('./_baseKeysIn'), + isArrayLike = require('./isArrayLike'); + +/** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ +function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); +} + +module.exports = keysIn; diff --git a/node_modules/umzug/node_modules/lodash/lang.js b/node_modules/umzug/node_modules/lodash/lang.js new file mode 100644 index 0000000..a396216 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/lang.js @@ -0,0 +1,58 @@ +module.exports = { + 'castArray': require('./castArray'), + 'clone': require('./clone'), + 'cloneDeep': require('./cloneDeep'), + 'cloneDeepWith': require('./cloneDeepWith'), + 'cloneWith': require('./cloneWith'), + 'conformsTo': require('./conformsTo'), + 'eq': require('./eq'), + 'gt': require('./gt'), + 'gte': require('./gte'), + 'isArguments': require('./isArguments'), + 'isArray': require('./isArray'), + 'isArrayBuffer': require('./isArrayBuffer'), + 'isArrayLike': require('./isArrayLike'), + 'isArrayLikeObject': require('./isArrayLikeObject'), + 'isBoolean': require('./isBoolean'), + 'isBuffer': require('./isBuffer'), + 'isDate': require('./isDate'), + 'isElement': require('./isElement'), + 'isEmpty': require('./isEmpty'), + 'isEqual': require('./isEqual'), + 'isEqualWith': require('./isEqualWith'), + 'isError': require('./isError'), + 'isFinite': require('./isFinite'), + 'isFunction': require('./isFunction'), + 'isInteger': require('./isInteger'), + 'isLength': require('./isLength'), + 'isMap': require('./isMap'), + 'isMatch': require('./isMatch'), + 'isMatchWith': require('./isMatchWith'), + 'isNaN': require('./isNaN'), + 'isNative': require('./isNative'), + 'isNil': require('./isNil'), + 'isNull': require('./isNull'), + 'isNumber': require('./isNumber'), + 'isObject': require('./isObject'), + 'isObjectLike': require('./isObjectLike'), + 'isPlainObject': require('./isPlainObject'), + 'isRegExp': require('./isRegExp'), + 'isSafeInteger': require('./isSafeInteger'), + 'isSet': require('./isSet'), + 'isString': require('./isString'), + 'isSymbol': require('./isSymbol'), + 'isTypedArray': require('./isTypedArray'), + 'isUndefined': require('./isUndefined'), + 'isWeakMap': require('./isWeakMap'), + 'isWeakSet': require('./isWeakSet'), + 'lt': require('./lt'), + 'lte': require('./lte'), + 'toArray': require('./toArray'), + 'toFinite': require('./toFinite'), + 'toInteger': require('./toInteger'), + 'toLength': require('./toLength'), + 'toNumber': require('./toNumber'), + 'toPlainObject': require('./toPlainObject'), + 'toSafeInteger': require('./toSafeInteger'), + 'toString': require('./toString') +}; diff --git a/node_modules/umzug/node_modules/lodash/last.js b/node_modules/umzug/node_modules/lodash/last.js new file mode 100644 index 0000000..cad1eaf --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/last.js @@ -0,0 +1,20 @@ +/** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ +function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; +} + +module.exports = last; diff --git a/node_modules/umzug/node_modules/lodash/lastIndexOf.js b/node_modules/umzug/node_modules/lodash/lastIndexOf.js new file mode 100644 index 0000000..dabfb61 --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/lastIndexOf.js @@ -0,0 +1,46 @@ +var baseFindIndex = require('./_baseFindIndex'), + baseIsNaN = require('./_baseIsNaN'), + strictLastIndexOf = require('./_strictLastIndexOf'), + toInteger = require('./toInteger'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * This method is like `_.indexOf` except that it iterates over elements of + * `array` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.lastIndexOf([1, 2, 1, 2], 2); + * // => 3 + * + * // Search from the `fromIndex`. + * _.lastIndexOf([1, 2, 1, 2], 2, 2); + * // => 1 + */ +function lastIndexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); + } + return value === value + ? strictLastIndexOf(array, value, index) + : baseFindIndex(array, baseIsNaN, index, true); +} + +module.exports = lastIndexOf; diff --git a/node_modules/umzug/node_modules/lodash/lodash.js b/node_modules/umzug/node_modules/lodash/lodash.js new file mode 100644 index 0000000..b39ddce --- /dev/null +++ b/node_modules/umzug/node_modules/lodash/lodash.js @@ -0,0 +1,17084 @@ +/** + * @license + * Lodash + * Copyright JS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ +;(function() { + + /** Used as a safe reference for `undefined` in pre-ES5 environments. */ + var undefined; + + /** Used as the semantic version number. */ + var VERSION = '4.17.4'; + + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + + /** Error message constants. */ + var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.', + FUNC_ERROR_TEXT = 'Expected a function'; + + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED = '__lodash_hash_undefined__'; + + /** Used as the maximum memoize cache size. */ + var MAX_MEMOIZE_SIZE = 500; + + /** Used as the internal argument placeholder. */ + var PLACEHOLDER = '__lodash_placeholder__'; + + /** Used to compose bitmasks for cloning. */ + var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; + + /** Used to compose bitmasks for value comparisons. */ + var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + + /** Used to compose bitmasks for function metadata. */ + var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_BOUND_FLAG = 4, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256, + WRAP_FLIP_FLAG = 512; + + /** Used as default options for `_.truncate`. */ + var DEFAULT_TRUNC_LENGTH = 30, + DEFAULT_TRUNC_OMISSION = '...'; + + /** Used to detect hot functions by number of calls within a span of milliseconds. */ + var HOT_COUNT = 800, + HOT_SPAN = 16; + + /** Used to indicate the type of lazy iteratees. */ + var LAZY_FILTER_FLAG = 1, + LAZY_MAP_FLAG = 2, + LAZY_WHILE_FLAG = 3; + + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991, + MAX_INTEGER = 1.7976931348623157e+308, + NAN = 0 / 0; + + /** Used as references for the maximum length and index of an array. */ + var MAX_ARRAY_LENGTH = 4294967295, + MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, + HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; + + /** Used to associate wrap methods with their bit flags. */ + var wrapFlags = [ + ['ary', WRAP_ARY_FLAG], + ['bind', WRAP_BIND_FLAG], + ['bindKey', WRAP_BIND_KEY_FLAG], + ['curry', WRAP_CURRY_FLAG], + ['curryRight', WRAP_CURRY_RIGHT_FLAG], + ['flip', WRAP_FLIP_FLAG], + ['partial', WRAP_PARTIAL_FLAG], + ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], + ['rearg', WRAP_REARG_FLAG] + ]; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + domExcTag = '[object DOMException]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + nullTag = '[object Null]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + proxyTag = '[object Proxy]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + undefinedTag = '[object Undefined]', + weakMapTag = '[object WeakMap]', + weakSetTag = '[object WeakSet]'; + + var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + + /** Used to match empty string literals in compiled template source. */ + var reEmptyStringLeading = /\b__p \+= '';/g, + reEmptyStringMiddle = /\b(__p \+=) '' \+/g, + reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; + + /** Used to match HTML entities and HTML characters. */ + var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, + reUnescapedHtml = /[&<>"']/g, + reHasEscapedHtml = RegExp(reEscapedHtml.source), + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + + /** Used to match template delimiters. */ + var reEscape = /<%-([\s\S]+?)%>/g, + reEvaluate = /<%([\s\S]+?)%>/g, + reInterpolate = /<%=([\s\S]+?)%>/g; + + /** Used to match property names within property paths. */ + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/, + reLeadingDot = /^\./, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + + /** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, + reHasRegExpChar = RegExp(reRegExpChar.source); + + /** Used to match leading and trailing whitespace. */ + var reTrim = /^\s+|\s+$/g, + reTrimStart = /^\s+/, + reTrimEnd = /\s+$/; + + /** Used to match wrap detail comments. */ + var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, + reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, + reSplitDetails = /,? & /; + + /** Used to match words composed of alphanumeric characters. */ + var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; + + /** Used to match backslashes in property paths. */ + var reEscapeChar = /\\(\\)?/g; + + /** + * Used to match + * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components). + */ + var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; + + /** Used to match `RegExp` flags from their coerced string values. */ + var reFlags = /\w*$/; + + /** Used to detect bad signed hexadecimal string values. */ + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + + /** Used to detect binary string values. */ + var reIsBinary = /^0b[01]+$/i; + + /** Used to detect host constructors (Safari). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** Used to detect octal string values. */ + var reIsOctal = /^0o[0-7]+$/i; + + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; + + /** Used to match Latin Unicode letters (excluding mathematical operators). */ + var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; + + /** Used to ensure capturing order of template delimiters. */ + var reNoMatch = /($^)/; + + /** Used to match unescaped characters in compiled string literals. */ + var reUnescapedString = /['\n\r\u2028\u2029\\]/g; + + /** Used to compose unicode character classes. */ + var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsDingbatRange = '\\u2700-\\u27bf', + rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', + rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', + rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', + rsPunctuationRange = '\\u2000-\\u206f', + 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', + rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', + rsVarRange = '\\ufe0e\\ufe0f', + rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; + + /** Used to compose unicode capture groups. */ + var rsApos = "['\u2019]", + rsAstral = '[' + rsAstralRange + ']', + rsBreak = '[' + rsBreakRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsDigits = '\\d+', + rsDingbat = '[' + rsDingbatRange + ']', + rsLower = '[' + rsLowerRange + ']', + rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsUpper = '[' + rsUpperRange + ']', + rsZWJ = '\\u200d'; + + /** Used to compose unicode regexes. */ + var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', + rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', + rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', + rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', + reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsOrdLower = '\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)', + rsOrdUpper = '\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + + /** Used to match apostrophes. */ + var reApos = RegExp(rsApos, 'g'); + + /** + * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and + * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). + */ + var reComboMark = RegExp(rsCombo, 'g'); + + /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ + var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + + /** Used to match complex or compound words. */ + var reUnicodeWord = RegExp([ + rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', + rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', + rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, + rsUpper + '+' + rsOptContrUpper, + rsOrdUpper, + rsOrdLower, + rsDigits, + rsEmoji + ].join('|'), 'g'); + + /** 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/). */ + var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); + + /** Used to detect strings that need a more robust regexp to match words. */ + 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 ]/; + + /** Used to assign default `context` object properties. */ + var contextProps = [ + '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' + ]; + + /** Used to make template sourceURLs easier to identify. */ + var templateCounter = -1; + + /** Used to identify `toStringTag` values of typed arrays. */ + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = + typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = + typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = + typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = + typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = + typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = + typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = + typedArrayTags[errorTag] = typedArrayTags[funcTag] = + typedArrayTags[mapTag] = typedArrayTags[numberTag] = + typedArrayTags[objectTag] = typedArrayTags[regexpTag] = + typedArrayTags[setTag] = typedArrayTags[stringTag] = + typedArrayTags[weakMapTag] = false; + + /** Used to identify `toStringTag` values supported by `_.clone`. */ + var cloneableTags = {}; + cloneableTags[argsTag] = cloneableTags[arrayTag] = + cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = + cloneableTags[boolTag] = cloneableTags[dateTag] = + cloneableTags[float32Tag] = cloneableTags[float64Tag] = + cloneableTags[int8Tag] = cloneableTags[int16Tag] = + cloneableTags[int32Tag] = cloneableTags[mapTag] = + cloneableTags[numberTag] = cloneableTags[objectTag] = + cloneableTags[regexpTag] = cloneableTags[setTag] = + cloneableTags[stringTag] = cloneableTags[symbolTag] = + cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = + cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; + cloneableTags[errorTag] = cloneableTags[funcTag] = + cloneableTags[weakMapTag] = false; + + /** Used to map Latin Unicode letters to basic Latin letters. */ + var deburredLetters = { + // Latin-1 Supplement block. + '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', + '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', + '\xc7': 'C', '\xe7': 'c', + '\xd0': 'D', '\xf0': 'd', + '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', + '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', + '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', + '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', + '\xd1': 'N', '\xf1': 'n', + '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', + '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', + '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', + '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', + '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', + '\xc6': 'Ae', '\xe6': 'ae', + '\xde': 'Th', '\xfe': 'th', + '\xdf': 'ss', + // Latin Extended-A block. + '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', + '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', + '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', + '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', + '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', + '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', + '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', + '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', + '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', + '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', + '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', + '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', + '\u0134': 'J', '\u0135': 'j', + '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', + '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', + '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', + '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', + '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', + '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', + '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', + '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', + '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', + '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', + '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', + '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', + '\u0163': 't', '\u0165': 't', '\u0167': 't', + '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', + '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', + '\u0174': 'W', '\u0175': 'w', + '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', + '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', + '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', + '\u0132': 'IJ', '\u0133': 'ij', + '\u0152': 'Oe', '\u0153': 'oe', + '\u0149': "'n", '\u017f': 's' + }; + + /** Used to map characters to HTML entities. */ + var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' + }; + + /** Used to map HTML entities to characters. */ + var htmlUnescapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'" + }; + + /** Used to escape characters for inclusion in compiled string literals. */ + var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\u2028': 'u2028', + '\u2029': 'u2029' + }; + + /** Built-in method references without a dependency on `root`. */ + var freeParseFloat = parseFloat, + freeParseInt = parseInt; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); + + /** Detect free variable `exports`. */ + var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + + /** Detect free variable `module`. */ + var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = freeModule && freeModule.exports === freeExports; + + /** Detect free variable `process` from Node.js. */ + var freeProcess = moduleExports && freeGlobal.process; + + /** Used to access faster Node.js helpers. */ + var nodeUtil = (function() { + try { + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} + }()); + + /* Node.js helper references. */ + var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, + nodeIsDate = nodeUtil && nodeUtil.isDate, + nodeIsMap = nodeUtil && nodeUtil.isMap, + nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, + nodeIsSet = nodeUtil && nodeUtil.isSet, + nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + + /*--------------------------------------------------------------------------*/ + + /** + * Adds the key-value `pair` to `map`. + * + * @private + * @param {Object} map The map to modify. + * @param {Array} pair The key-value pair to add. + * @returns {Object} Returns `map`. + */ + function addMapEntry(map, pair) { + // Don't return `map.set` because it's not chainable in IE 11. + map.set(pair[0], pair[1]); + return map; + } + + /** + * Adds `value` to `set`. + * + * @private + * @param {Object} set The set to modify. + * @param {*} value The value to add. + * @returns {Object} Returns `set`. + */ + function addSetEntry(set, value) { + // Don't return `set.add` because it's not chainable in IE 11. + set.add(value); + return set; + } + + /** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ + function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); + } + + /** + * A specialized version of `baseAggregator` for arrays. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function arrayAggregator(array, setter, iteratee, accumulator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + var value = array[index]; + setter(accumulator, value, iteratee(value), array); + } + return accumulator; + } + + /** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.forEachRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEachRight(array, iteratee) { + var length = array == null ? 0 : array.length; + + while (length--) { + if (iteratee(array[length], length, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.every` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + */ + function arrayEvery(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (!predicate(array[index], index, array)) { + return false; + } + } + return true; + } + + /** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; + } + + /** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; + } + + /** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; + } + + /** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; + } + + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + + /** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array == null ? 0 : array.length; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; + } + + /** + * A specialized version of `_.reduceRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the last element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduceRight(array, iteratee, accumulator, initAccum) { + var length = array == null ? 0 : array.length; + if (initAccum && length) { + accumulator = array[--length]; + } + while (length--) { + accumulator = iteratee(accumulator, array[length], length, array); + } + return accumulator; + } + + /** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; + } + + /** + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + var asciiSize = baseProperty('length'); + + /** + * Converts an ASCII `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function asciiToArray(string) { + return string.split(''); + } + + /** + * Splits an ASCII `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function asciiWords(string) { + return string.match(reAsciiWord) || []; + } + + /** + * The base implementation of methods like `_.findKey` and `_.findLastKey`, + * without support for iteratee shorthands, which iterates over `collection` + * using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the found element or its key, else `undefined`. + */ + function baseFindKey(collection, predicate, eachFunc) { + var result; + eachFunc(collection, function(value, key, collection) { + if (predicate(value, key, collection)) { + result = key; + return false; + } + }); + return result; + } + + /** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOf(array, value, fromIndex) { + return value === value + ? strictIndexOf(array, value, fromIndex) + : baseFindIndex(array, baseIsNaN, fromIndex); + } + + /** + * This function is like `baseIndexOf` except that it accepts a comparator. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @param {Function} comparator The comparator invoked per element. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOfWith(array, value, fromIndex, comparator) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (comparator(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ + function baseIsNaN(value) { + return value !== value; + } + + /** + * The base implementation of `_.mean` and `_.meanBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the mean. + */ + function baseMean(array, iteratee) { + var length = array == null ? 0 : array.length; + return length ? (baseSum(array, iteratee) / length) : NAN; + } + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ + function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ + function baseSortBy(array, comparer) { + var length = array.length; + + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; + } + + /** + * The base implementation of `_.sum` and `_.sumBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the sum. + */ + function baseSum(array, iteratee) { + var result, + index = -1, + length = array.length; + + while (++index < length) { + var current = iteratee(array[index]); + if (current !== undefined) { + result = result === undefined ? current : (result + current); + } + } + return result; + } + + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + + /** + * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array + * of key-value pairs for `object` corresponding to the property names of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the key-value pairs. + */ + function baseToPairs(object, props) { + return arrayMap(props, function(key) { + return [key, object[key]]; + }); + } + + /** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ + function baseUnary(func) { + return function(value) { + return func(value); + }; + } + + /** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ + function baseValues(object, props) { + return arrayMap(props, function(key) { + return object[key]; + }); + } + + /** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function cacheHas(cache, key) { + return cache.has(key); + } + + /** + * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the first unmatched string symbol. + */ + function charsStartIndex(strSymbols, chrSymbols) { + var index = -1, + length = strSymbols.length; + + while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } + + /** + * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the last unmatched string symbol. + */ + function charsEndIndex(strSymbols, chrSymbols) { + var index = strSymbols.length; + + while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } + + /** + * Gets the number of `placeholder` occurrences in `array`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} placeholder The placeholder to search for. + * @returns {number} Returns the placeholder count. + */ + function countHolders(array, placeholder) { + var length = array.length, + result = 0; + + while (length--) { + if (array[length] === placeholder) { + ++result; + } + } + return result; + } + + /** + * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A + * letters to basic Latin letters. + * + * @private + * @param {string} letter The matched letter to deburr. + * @returns {string} Returns the deburred letter. + */ + var deburrLetter = basePropertyOf(deburredLetters); + + /** + * Used by `_.escape` to convert characters to HTML entities. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + var escapeHtmlChar = basePropertyOf(htmlEscapes); + + /** + * Used by `_.template` to escape characters for inclusion in compiled string literals. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + function escapeStringChar(chr) { + return '\\' + stringEscapes[chr]; + } + + /** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function getValue(object, key) { + return object == null ? undefined : object[key]; + } + + /** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ + function hasUnicode(string) { + return reHasUnicode.test(string); + } + + /** + * Checks if `string` contains a word composed of Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a word is found, else `false`. + */ + function hasUnicodeWord(string) { + return reHasUnicodeWord.test(string); + } + + /** + * Converts `iterator` to an array. + * + * @private + * @param {Object} iterator The iterator to convert. + * @returns {Array} Returns the converted array. + */ + function iteratorToArray(iterator) { + var data, + result = []; + + while (!(data = iterator.next()).done) { + result.push(data.value); + } + return result; + } + + /** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ + function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; + } + + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + + /** + * Replaces all `placeholder` elements in `array` with an internal placeholder + * and returns an array of their indexes. + * + * @private + * @param {Array} array The array to modify. + * @param {*} placeholder The placeholder to replace. + * @returns {Array} Returns the new array of placeholder indexes. + */ + function replaceHolders(array, placeholder) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value === placeholder || value === PLACEHOLDER) { + array[index] = PLACEHOLDER; + result[resIndex++] = index; + } + } + return result; + } + + /** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ + function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; + } + + /** + * Converts `set` to its value-value pairs. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the value-value pairs. + */ + function setToPairs(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = [value, value]; + }); + return result; + } + + /** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * A specialized version of `_.lastIndexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictLastIndexOf(array, value, fromIndex) { + var index = fromIndex + 1; + while (index--) { + if (array[index] === value) { + return index; + } + } + return index; + } + + /** + * Gets the number of symbols in `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the string size. + */ + function stringSize(string) { + return hasUnicode(string) + ? unicodeSize(string) + : asciiSize(string); + } + + /** + * Converts `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function stringToArray(string) { + return hasUnicode(string) + ? unicodeToArray(string) + : asciiToArray(string); + } + + /** + * Used by `_.unescape` to convert HTML entities to characters. + * + * @private + * @param {string} chr The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ + var unescapeHtmlChar = basePropertyOf(htmlUnescapes); + + /** + * Gets the size of a Unicode `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; + } + return result; + } + + /** + * Converts a Unicode `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function unicodeToArray(string) { + return string.match(reUnicode) || []; + } + + /** + * Splits a Unicode `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function unicodeWords(string) { + return string.match(reUnicodeWord) || []; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Create a new pristine `lodash` function using the `context` object. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Util + * @param {Object} [context=root] The context object. + * @returns {Function} Returns a new `lodash` function. + * @example + * + * _.mixin({ 'foo': _.constant('foo') }); + * + * var lodash = _.runInContext(); + * lodash.mixin({ 'bar': lodash.constant('bar') }); + * + * _.isFunction(_.foo); + * // => true + * _.isFunction(_.bar); + * // => false + * + * lodash.isFunction(lodash.foo); + * // => false + * lodash.isFunction(lodash.bar); + * // => true + * + * // Create a suped-up `defer` in Node.js. + * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; + */ + var runInContext = (function runInContext(context) { + context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps)); + + /** Built-in constructor references. */ + var Array = context.Array, + Date = context.Date, + Error = context.Error, + Function = context.Function, + Math = context.Math, + Object = context.Object, + RegExp = context.RegExp, + String = context.String, + TypeError = context.TypeError; + + /** Used for built-in method references. */ + var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + + /** Used to detect overreaching core-js shims. */ + var coreJsData = context['__core-js_shared__']; + + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to generate unique IDs. */ + var idCounter = 0; + + /** Used to detect methods masquerading as native. */ + var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; + }()); + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** Used to infer the `Object` constructor. */ + var objectCtorString = funcToString.call(Object); + + /** Used to restore the original `_` reference in `_.noConflict`. */ + var oldDash = root._; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); + + /** Built-in value references. */ + var Buffer = moduleExports ? context.Buffer : undefined, + Symbol = context.Symbol, + Uint8Array = context.Uint8Array, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined, + getPrototype = overArg(Object.getPrototypeOf, Object), + objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice, + spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined, + symIterator = Symbol ? Symbol.iterator : undefined, + symToStringTag = Symbol ? Symbol.toStringTag : undefined; + + var defineProperty = (function() { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} + }()); + + /** Mocked built-ins. */ + var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, + ctxNow = Date && Date.now !== root.Date.now && Date.now, + ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeCeil = Math.ceil, + nativeFloor = Math.floor, + nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeIsFinite = context.isFinite, + nativeJoin = arrayProto.join, + nativeKeys = overArg(Object.keys, Object), + nativeMax = Math.max, + nativeMin = Math.min, + nativeNow = Date.now, + nativeParseInt = context.parseInt, + nativeRandom = Math.random, + nativeReverse = arrayProto.reverse; + + /* Built-in method references that are verified to be native. */ + var DataView = getNative(context, 'DataView'), + Map = getNative(context, 'Map'), + Promise = getNative(context, 'Promise'), + Set = getNative(context, 'Set'), + WeakMap = getNative(context, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); + + /** Used to store function metadata. */ + var metaMap = WeakMap && new WeakMap; + + /** Used to lookup unminified function names. */ + var realNames = {}; + + /** Used to detect maps, sets, and weakmaps. */ + var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + + /** Used to convert symbols to primitives and strings. */ + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object which wraps `value` to enable implicit method + * chain sequences. Methods that operate on and return arrays, collections, + * and functions can be chained together. Methods that retrieve a single value + * or may return a primitive value will automatically end the chain sequence + * and return the unwrapped value. Otherwise, the value must be unwrapped + * with `_#value`. + * + * Explicit chain sequences, which must be unwrapped with `_#value`, may be + * enabled using `_.chain`. + * + * The execution of chained methods is lazy, that is, it's deferred until + * `_#value` is implicitly or explicitly called. + * + * Lazy evaluation allows several methods to support shortcut fusion. + * Shortcut fusion is an optimization to merge iteratee calls; this avoids + * the creation of intermediate arrays and can greatly reduce the number of + * iteratee executions. Sections of a chain sequence qualify for shortcut + * fusion if the section is applied to an array and iteratees accept only + * one argument. The heuristic for whether a section qualifies for shortcut + * fusion is subject to change. + * + * Chaining is supported in custom builds as long as the `_#value` method is + * directly or indirectly included in the build. + * + * In addition to lodash methods, wrappers have `Array` and `String` methods. + * + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` + * + * The wrapper methods that support shortcut fusion are: + * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, + * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, + * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` + * + * The chainable wrapper methods are: + * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, + * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, + * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, + * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, + * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, + * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, + * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, + * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, + * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, + * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, + * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, + * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, + * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, + * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, + * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, + * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, + * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, + * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, + * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, + * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, + * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, + * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, + * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, + * `zipObject`, `zipObjectDeep`, and `zipWith` + * + * The wrapper methods that are **not** chainable by default are: + * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, + * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, + * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, + * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, + * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, + * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, + * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, + * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, + * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, + * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, + * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, + * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, + * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, + * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, + * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, + * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, + * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, + * `upperFirst`, `value`, and `words` + * + * @name _ + * @constructor + * @category Seq + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2, 3]); + * + * // Returns an unwrapped value. + * wrapped.reduce(_.add); + * // => 6 + * + * // Returns a wrapped value. + * var squares = wrapped.map(square); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ + function lodash(value) { + if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { + if (value instanceof LodashWrapper) { + return value; + } + if (hasOwnProperty.call(value, '__wrapped__')) { + return wrapperClone(value); + } + } + return new LodashWrapper(value); + } + + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ + var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; + }()); + + /** + * The function whose prototype chain sequence wrappers inherit from. + * + * @private + */ + function baseLodash() { + // No operation performed. + } + + /** + * The base constructor for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable explicit method chain sequences. + */ + function LodashWrapper(value, chainAll) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__chain__ = !!chainAll; + this.__index__ = 0; + this.__values__ = undefined; + } + + /** + * By default, the template delimiters used by lodash are like those in + * embedded Ruby (ERB) as well as ES2015 template strings. Change the + * following template settings to use alternative delimiters. + * + * @static + * @memberOf _ + * @type {Object} + */ + lodash.templateSettings = { + + /** + * Used to detect `data` property values to be HTML-escaped. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'escape': reEscape, + + /** + * Used to detect code to be evaluated. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'evaluate': reEvaluate, + + /** + * Used to detect `data` property values to inject. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'interpolate': reInterpolate, + + /** + * Used to reference the data object in the template text. + * + * @memberOf _.templateSettings + * @type {string} + */ + 'variable': '', + + /** + * Used to import variables into the compiled template. + * + * @memberOf _.templateSettings + * @type {Object} + */ + 'imports': { + + /** + * A reference to the `lodash` function. + * + * @memberOf _.templateSettings.imports + * @type {Function} + */ + '_': lodash + } + }; + + // Ensure wrappers are instances of `baseLodash`. + lodash.prototype = baseLodash.prototype; + lodash.prototype.constructor = lodash; + + LodashWrapper.prototype = baseCreate(baseLodash.prototype); + LodashWrapper.prototype.constructor = LodashWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. + * + * @private + * @constructor + * @param {*} value The value to wrap. + */ + function LazyWrapper(value) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__dir__ = 1; + this.__filtered__ = false; + this.__iteratees__ = []; + this.__takeCount__ = MAX_ARRAY_LENGTH; + this.__views__ = []; + } + + /** + * Creates a clone of the lazy wrapper object. + * + * @private + * @name clone + * @memberOf LazyWrapper + * @returns {Object} Returns the cloned `LazyWrapper` object. + */ + function lazyClone() { + var result = new LazyWrapper(this.__wrapped__); + result.__actions__ = copyArray(this.__actions__); + result.__dir__ = this.__dir__; + result.__filtered__ = this.__filtered__; + result.__iteratees__ = copyArray(this.__iteratees__); + result.__takeCount__ = this.__takeCount__; + result.__views__ = copyArray(this.__views__); + return result; + } + + /** + * Reverses the direction of lazy iteration. + * + * @private + * @name reverse + * @memberOf LazyWrapper + * @returns {Object} Returns the new reversed `LazyWrapper` object. + */ + function lazyReverse() { + if (this.__filtered__) { + var result = new LazyWrapper(this); + result.__dir__ = -1; + result.__filtered__ = true; + } else { + result = this.clone(); + result.__dir__ *= -1; + } + return result; + } + + /** + * Extracts the unwrapped value from its lazy wrapper. + * + * @private + * @name value + * @memberOf LazyWrapper + * @returns {*} Returns the unwrapped value. + */ + function lazyValue() { + var array = this.__wrapped__.value(), + dir = this.__dir__, + isArr = isArray(array), + isRight = dir < 0, + arrLength = isArr ? array.length : 0, + view = getView(0, arrLength, this.__views__), + start = view.start, + end = view.end, + length = end - start, + index = isRight ? end : (start - 1), + iteratees = this.__iteratees__, + iterLength = iteratees.length, + resIndex = 0, + takeCount = nativeMin(length, this.__takeCount__); + + if (!isArr || (!isRight && arrLength == length && takeCount == length)) { + return baseWrapperValue(array, this.__actions__); + } + var result = []; + + outer: + while (length-- && resIndex < takeCount) { + index += dir; + + var iterIndex = -1, + value = array[index]; + + while (++iterIndex < iterLength) { + var data = iteratees[iterIndex], + iteratee = data.iteratee, + type = data.type, + computed = iteratee(value); + + if (type == LAZY_MAP_FLAG) { + value = computed; + } else if (!computed) { + if (type == LAZY_FILTER_FLAG) { + continue outer; + } else { + break outer; + } + } + } + result[resIndex++] = value; + } + return result; + } + + // Ensure `LazyWrapper` is an instance of `baseLodash`. + LazyWrapper.prototype = baseCreate(baseLodash.prototype); + LazyWrapper.prototype.constructor = LazyWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; + } + + /** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; + } + + /** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; + } + + /** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); + } + + /** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; + } + + // Add methods to `Hash`. + Hash.prototype.clear = hashClear; + Hash.prototype['delete'] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + + /** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; + } + + /** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; + } + + /** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + + /** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ + function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + + // Add methods to `ListCache`. + ListCache.prototype.clear = listCacheClear; + ListCache.prototype['delete'] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ + function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; + } + + /** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; + } + + /** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + + /** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + + /** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ + function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; + } + + // Add methods to `MapCache`. + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype['delete'] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + + /*------------------------------------------------------------------------*/ + + /** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ + function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new MapCache; + while (++index < length) { + this.add(values[index]); + } + } + + /** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; + } + + /** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ + function setCacheHas(value) { + return this.__data__.has(value); + } + + // Add methods to `SetCache`. + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; + } + + /** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ + function stackClear() { + this.__data__ = new ListCache; + this.size = 0; + } + + /** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + + this.size = data.size; + return result; + } + + /** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function stackGet(key) { + return this.__data__.get(key); + } + + /** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function stackHas(key) { + return this.__data__.has(key); + } + + /** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ + function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; + } + + // Add methods to `Stack`. + Stack.prototype.clear = stackClear; + Stack.prototype['delete'] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ + function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length) + ))) { + result.push(key); + } + } + return result; + } + + /** + * A specialized version of `_.sample` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @returns {*} Returns the random element. + */ + function arraySample(array) { + var length = array.length; + return length ? array[baseRandom(0, length - 1)] : undefined; + } + + /** + * A specialized version of `_.sampleSize` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function arraySampleSize(array, n) { + return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); + } + + /** + * A specialized version of `_.shuffle` for arrays. + * + * @private + * @param {Array} array The array to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function arrayShuffle(array) { + return shuffleSelf(copyArray(array)); + } + + /** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignMergeValue(object, key, value) { + if ((value !== undefined && !eq(object[key], value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } + } + + /** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } + } + + /** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + + /** + * Aggregates elements of `collection` on `accumulator` with keys transformed + * by `iteratee` and values set by `setter`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function baseAggregator(collection, setter, iteratee, accumulator) { + baseEach(collection, function(value, key, collection) { + setter(accumulator, value, iteratee(value), collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); + } + + /** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); + } + + /** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } + } + + /** + * The base implementation of `_.at` without support for individual paths. + * + * @private + * @param {Object} object The object to iterate over. + * @param {string[]} paths The property paths to pick. + * @returns {Array} Returns the picked elements. + */ + function baseAt(object, paths) { + var index = -1, + length = paths.length, + result = Array(length), + skip = object == null; + + while (++index < length) { + result[index] = skip ? undefined : get(object, paths[index]); + } + return result; + } + + /** + * The base implementation of `_.clamp` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + */ + function baseClamp(number, lower, upper) { + if (number === number) { + if (upper !== undefined) { + number = number <= upper ? number : upper; + } + if (lower !== undefined) { + number = number >= lower ? number : lower; + } + } + return number; + } + + /** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ + function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; + + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; + + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = (isFlat || isFunc) ? {} : initCloneObject(value); + if (!isDeep) { + return isFlat + ? copySymbolsIn(value, baseAssignIn(result, value)) + : copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, baseClone, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + var keysFunc = isFull + ? (isFlat ? getAllKeysIn : getAllKeys) + : (isFlat ? keysIn : keys); + + var props = isArr ? undefined : keysFunc(value); + arrayEach(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; + } + + /** + * The base implementation of `_.conforms` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + */ + function baseConforms(source) { + var props = keys(source); + return function(object) { + return baseConformsTo(object, source, props); + }; + } + + /** + * The base implementation of `_.conformsTo` which accepts `props` to check. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + */ + function baseConformsTo(object, source, props) { + var length = props.length; + if (object == null) { + return !length; + } + object = Object(object); + while (length--) { + var key = props[length], + predicate = source[key], + value = object[key]; + + if ((value === undefined && !(key in object)) || !predicate(value)) { + return false; + } + } + return true; + } + + /** + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {Array} args The arguments to provide to `func`. + * @returns {number|Object} Returns the timer id or timeout object. + */ + function baseDelay(func, wait, args) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return setTimeout(function() { func.apply(undefined, args); }, wait); + } + + /** + * The base implementation of methods like `_.difference` without support + * for excluding multiple arrays or iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Array} values The values to exclude. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + */ + function baseDifference(array, values, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + isCommon = true, + length = array.length, + result = [], + valuesLength = values.length; + + if (!length) { + return result; + } + if (iteratee) { + values = arrayMap(values, baseUnary(iteratee)); + } + if (comparator) { + includes = arrayIncludesWith; + isCommon = false; + } + else if (values.length >= LARGE_ARRAY_SIZE) { + includes = cacheHas; + isCommon = false; + values = new SetCache(values); + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee == null ? value : iteratee(value); + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === computed) { + continue outer; + } + } + result.push(value); + } + else if (!includes(values, computed, comparator)) { + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEach = createBaseEach(baseForOwn); + + /** + * The base implementation of `_.forEachRight` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEachRight = createBaseEach(baseForOwnRight, true); + + /** + * The base implementation of `_.every` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ + function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function(value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; + } + + /** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ + function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if (current != null && (computed === undefined + ? (current === current && !isSymbol(current)) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } + } + return result; + } + + /** + * The base implementation of `_.fill` without an iteratee call guard. + * + * @private + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + */ + function baseFill(array, value, start, end) { + var length = array.length; + + start = toInteger(start); + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = (end === undefined || end > length) ? length : toInteger(end); + if (end < 0) { + end += length; + } + end = start > end ? 0 : toLength(end); + while (start < end) { + array[start++] = value; + } + return array; + } + + /** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; + } + + /** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ + function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + + /** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseFor = createBaseFor(); + + /** + * This function is like `baseFor` except that it iterates over properties + * in the opposite order. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseForRight = createBaseFor(true); + + /** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); + } + + /** + * The base implementation of `_.forOwnRight` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwnRight(object, iteratee) { + return object && baseForRight(object, iteratee, keys); + } + + /** + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from `props`. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the function names. + */ + function baseFunctions(object, props) { + return arrayFilter(props, function(key) { + return isFunction(object[key]); + }); + } + + /** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ + function baseGet(object, path) { + path = castPath(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return (index && index == length) ? object : undefined; + } + + /** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); + } + + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); + } + + /** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ + function baseGt(value, other) { + return value > other; + } + + /** + * The base implementation of `_.has` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHas(object, key) { + return object != null && hasOwnProperty.call(object, key); + } + + /** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHasIn(object, key) { + return object != null && key in Object(object); + } + + /** + * The base implementation of `_.inRange` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to check. + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + */ + function baseInRange(number, start, end) { + return number >= nativeMin(start, end) && number < nativeMax(start, end); + } + + /** + * The base implementation of methods like `_.intersection`, without support + * for iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of shared values. + */ + function baseIntersection(arrays, iteratee, comparator) { + var includes = comparator ? arrayIncludesWith : arrayIncludes, + length = arrays[0].length, + othLength = arrays.length, + othIndex = othLength, + caches = Array(othLength), + maxLength = Infinity, + result = []; + + while (othIndex--) { + var array = arrays[othIndex]; + if (othIndex && iteratee) { + array = arrayMap(array, baseUnary(iteratee)); + } + maxLength = nativeMin(array.length, maxLength); + caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) + ? new SetCache(othIndex && array) + : undefined; + } + array = arrays[0]; + + var index = -1, + seen = caches[0]; + + outer: + while (++index < length && result.length < maxLength) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (!(seen + ? cacheHas(seen, computed) + : includes(result, computed, comparator) + )) { + othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if (!(cache + ? cacheHas(cache, computed) + : includes(arrays[othIndex], computed, comparator)) + ) { + continue outer; + } + } + if (seen) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.invert` and `_.invertBy` which inverts + * `object` with values transformed by `iteratee` and set by `setter`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform values. + * @param {Object} accumulator The initial inverted object. + * @returns {Function} Returns `accumulator`. + */ + function baseInverter(object, setter, iteratee, accumulator) { + baseForOwn(object, function(value, key, object) { + setter(accumulator, iteratee(value), key, object); + }); + return accumulator; + } + + /** + * The base implementation of `_.invoke` without support for individual + * method arguments. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {Array} args The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + */ + function baseInvoke(object, path, args) { + path = castPath(path, object); + object = parent(object, path); + var func = object == null ? object : object[toKey(last(path))]; + return func == null ? undefined : apply(func, object, args); + } + + /** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; + } + + /** + * The base implementation of `_.isArrayBuffer` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + */ + function baseIsArrayBuffer(value) { + return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; + } + + /** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ + function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; + } + + /** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); + } + + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : getTag(object), + othTag = othIsArr ? arrayTag : getTag(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new Stack); + return (objIsArr || isTypedArray(object)) + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new Stack); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); + } + + /** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ + function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; + } + + /** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ + function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new Stack; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } + } + } + return true; + } + + /** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + + /** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ + function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; + } + + /** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ + function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; + } + + /** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ + function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; + } + + /** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ + function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity; + } + if (typeof value == 'object') { + return isArray(value) + ? baseMatchesProperty(value[0], value[1]) + : baseMatches(value); + } + return property(value); + } + + /** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; + } + + /** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; + } + + /** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ + function baseLt(value, other) { + return value < other; + } + + /** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; + } + + /** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || baseIsMatch(object, source, matchData); + }; + } + + /** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); + } + return function(object) { + var objValue = get(object, path); + return (objValue === undefined && objValue === srcValue) + ? hasIn(object, path) + : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; + } + + /** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ + function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + baseFor(source, function(srcValue, key) { + if (isObject(srcValue)) { + stack || (stack = new Stack); + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } + else { + var newValue = customizer + ? customizer(object[key], srcValue, (key + ''), object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }, keysIn); + } + + /** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ + function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = object[key], + srcValue = source[key], + stacked = stack.get(srcValue); + + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; + + var isCommon = newValue === undefined; + + if (isCommon) { + var isArr = isArray(srcValue), + isBuff = !isArr && isBuffer(srcValue), + isTyped = !isArr && !isBuff && isTypedArray(srcValue); + + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (isArray(objValue)) { + newValue = objValue; + } + else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } + else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } + else if (isTyped) { + isCommon = false; + newValue = cloneTypedArray(srcValue, true); + } + else { + newValue = []; + } + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } + else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { + newValue = initCloneObject(srcValue); + } + } + else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + assignMergeValue(object, key, newValue); + } + + /** + * The base implementation of `_.nth` which doesn't coerce arguments. + * + * @private + * @param {Array} array The array to query. + * @param {number} n The index of the element to return. + * @returns {*} Returns the nth element of `array`. + */ + function baseNth(array, n) { + var length = array.length; + if (!length) { + return; + } + n += n < 0 ? length : 0; + return isIndex(n, length) ? array[n] : undefined; + } + + /** + * The base implementation of `_.orderBy` without param guards. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ + function baseOrderBy(collection, iteratees, orders) { + var index = -1; + iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee())); + + var result = baseMap(collection, function(value, key, collection) { + var criteria = arrayMap(iteratees, function(iteratee) { + return iteratee(value); + }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); + + return baseSortBy(result, function(object, other) { + return compareMultiple(object, other, orders); + }); + } + + /** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ + function basePick(object, paths) { + return basePickBy(object, paths, function(value, path) { + return hasIn(object, path); + }); + } + + /** + * The base implementation of `_.pickBy` without support for iteratee shorthands. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @param {Function} predicate The function invoked per property. + * @returns {Object} Returns the new object. + */ + function basePickBy(object, paths, predicate) { + var index = -1, + length = paths.length, + result = {}; + + while (++index < length) { + var path = paths[index], + value = baseGet(object, path); + + if (predicate(value, path)) { + baseSet(result, castPath(path, object), value); + } + } + return result; + } + + /** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyDeep(path) { + return function(object) { + return baseGet(object, path); + }; + } + + /** + * The base implementation of `_.pullAllBy` without support for iteratee + * shorthands. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + */ + function basePullAll(array, values, iteratee, comparator) { + var indexOf = comparator ? baseIndexOfWith : baseIndexOf, + index = -1, + length = values.length, + seen = array; + + if (array === values) { + values = copyArray(values); + } + if (iteratee) { + seen = arrayMap(array, baseUnary(iteratee)); + } + while (++index < length) { + var fromIndex = 0, + value = values[index], + computed = iteratee ? iteratee(value) : value; + + while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { + if (seen !== array) { + splice.call(seen, fromIndex, 1); + } + splice.call(array, fromIndex, 1); + } + } + return array; + } + + /** + * The base implementation of `_.pullAt` without support for individual + * indexes or capturing the removed elements. + * + * @private + * @param {Array} array The array to modify. + * @param {number[]} indexes The indexes of elements to remove. + * @returns {Array} Returns `array`. + */ + function basePullAt(array, indexes) { + var length = array ? indexes.length : 0, + lastIndex = length - 1; + + while (length--) { + var index = indexes[length]; + if (length == lastIndex || index !== previous) { + var previous = index; + if (isIndex(index)) { + splice.call(array, index, 1); + } else { + baseUnset(array, index); + } + } + } + return array; + } + + /** + * The base implementation of `_.random` without support for returning + * floating-point numbers. + * + * @private + * @param {number} lower The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the random number. + */ + function baseRandom(lower, upper) { + return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); + } + + /** + * The base implementation of `_.range` and `_.rangeRight` which doesn't + * coerce arguments. + * + * @private + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @param {number} step The value to increment or decrement by. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the range of numbers. + */ + function baseRange(start, end, step, fromRight) { + var index = -1, + length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), + result = Array(length); + + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; + } + return result; + } + + /** + * The base implementation of `_.repeat` which doesn't coerce arguments. + * + * @private + * @param {string} string The string to repeat. + * @param {number} n The number of times to repeat the string. + * @returns {string} Returns the repeated string. + */ + function baseRepeat(string, n) { + var result = ''; + if (!string || n < 1 || n > MAX_SAFE_INTEGER) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + if (n) { + string += string; + } + } while (n); + + return result; + } + + /** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ + function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); + } + + /** + * The base implementation of `_.sample`. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + */ + function baseSample(collection) { + return arraySample(values(collection)); + } + + /** + * The base implementation of `_.sampleSize` without param guards. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function baseSampleSize(collection, n) { + var array = values(collection); + return shuffleSelf(array, baseClamp(n, 0, array.length)); + } + + /** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } + path = castPath(path, object); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = toKey(path[index]), + newValue = value; + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) + ? objValue + : (isIndex(path[index + 1]) ? [] : {}); + } + } + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; + } + + /** + * The base implementation of `setData` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var baseSetData = !metaMap ? identity : function(func, data) { + metaMap.set(func, data); + return func; + }; + + /** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var baseSetToString = !defineProperty ? identity : function(func, string) { + return defineProperty(func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': constant(string), + 'writable': true + }); + }; + + /** + * The base implementation of `_.shuffle`. + * + * @private + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function baseShuffle(collection) { + return shuffleSelf(values(collection)); + } + + /** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; + } + + /** + * The base implementation of `_.some` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function baseSome(collection, predicate) { + var result; + + baseEach(collection, function(value, index, collection) { + result = predicate(value, index, collection); + return !result; + }); + return !!result; + } + + /** + * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which + * performs a binary search of `array` to determine the index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function baseSortedIndex(array, value, retHighest) { + var low = 0, + high = array == null ? low : array.length; + + if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { + while (low < high) { + var mid = (low + high) >>> 1, + computed = array[mid]; + + if (computed !== null && !isSymbol(computed) && + (retHighest ? (computed <= value) : (computed < value))) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + return baseSortedIndexBy(array, value, identity, retHighest); + } + + /** + * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy` + * which invokes `iteratee` for `value` and each element of `array` to compute + * their sort ranking. The iteratee is invoked with one argument; (value). + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} iteratee The iteratee invoked per element. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function baseSortedIndexBy(array, value, iteratee, retHighest) { + value = iteratee(value); + + var low = 0, + high = array == null ? 0 : array.length, + valIsNaN = value !== value, + valIsNull = value === null, + valIsSymbol = isSymbol(value), + valIsUndefined = value === undefined; + + while (low < high) { + var mid = nativeFloor((low + high) / 2), + computed = iteratee(array[mid]), + othIsDefined = computed !== undefined, + othIsNull = computed === null, + othIsReflexive = computed === computed, + othIsSymbol = isSymbol(computed); + + if (valIsNaN) { + var setLow = retHighest || othIsReflexive; + } else if (valIsUndefined) { + setLow = othIsReflexive && (retHighest || othIsDefined); + } else if (valIsNull) { + setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); + } else if (valIsSymbol) { + setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); + } else if (othIsNull || othIsSymbol) { + setLow = false; + } else { + setLow = retHighest ? (computed <= value) : (computed < value); + } + if (setLow) { + low = mid + 1; + } else { + high = mid; + } + } + return nativeMin(high, MAX_ARRAY_INDEX); + } + + /** + * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ + function baseSortedUniq(array, iteratee) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + if (!index || !eq(computed, seen)) { + var seen = computed; + result[resIndex++] = value === 0 ? 0 : value; + } + } + return result; + } + + /** + * The base implementation of `_.toNumber` which doesn't ensure correct + * conversions of binary, hexadecimal, or octal string values. + * + * @private + * @param {*} value The value to process. + * @returns {number} Returns the number. + */ + function baseToNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + return +value; + } + + /** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ + function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return arrayMap(value, baseToString) + ''; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + } + + /** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ + function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache; + } + else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.unset`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The property path to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + */ + function baseUnset(object, path) { + path = castPath(path, object); + object = parent(object, path); + return object == null || delete object[toKey(last(path))]; + } + + /** + * The base implementation of `_.update`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to update. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseUpdate(object, path, updater, customizer) { + return baseSet(object, path, updater(baseGet(object, path)), customizer); + } + + /** + * The base implementation of methods like `_.dropWhile` and `_.takeWhile` + * without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to query. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [isDrop] Specify dropping elements instead of taking them. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the slice of `array`. + */ + function baseWhile(array, predicate, isDrop, fromRight) { + var length = array.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length) && + predicate(array[index], index, array)) {} + + return isDrop + ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) + : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); + } + + /** + * The base implementation of `wrapperValue` which returns the result of + * performing a sequence of actions on the unwrapped `value`, where each + * successive action is supplied the return value of the previous. + * + * @private + * @param {*} value The unwrapped value. + * @param {Array} actions Actions to perform to resolve the unwrapped value. + * @returns {*} Returns the resolved value. + */ + function baseWrapperValue(value, actions) { + var result = value; + if (result instanceof LazyWrapper) { + result = result.value(); + } + return arrayReduce(actions, function(result, action) { + return action.func.apply(action.thisArg, arrayPush([result], action.args)); + }, result); + } + + /** + * The base implementation of methods like `_.xor`, without support for + * iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of values. + */ + function baseXor(arrays, iteratee, comparator) { + var length = arrays.length; + if (length < 2) { + return length ? baseUniq(arrays[0]) : []; + } + var index = -1, + result = Array(length); + + while (++index < length) { + var array = arrays[index], + othIndex = -1; + + while (++othIndex < length) { + if (othIndex != index) { + result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator); + } + } + } + return baseUniq(baseFlatten(result, 1), iteratee, comparator); + } + + /** + * This base implementation of `_.zipObject` which assigns values using `assignFunc`. + * + * @private + * @param {Array} props The property identifiers. + * @param {Array} values The property values. + * @param {Function} assignFunc The function to assign values. + * @returns {Object} Returns the new object. + */ + function baseZipObject(props, values, assignFunc) { + var index = -1, + length = props.length, + valsLength = values.length, + result = {}; + + while (++index < length) { + var value = index < valsLength ? values[index] : undefined; + assignFunc(result, props[index], value); + } + return result; + } + + /** + * Casts `value` to an empty array if it's not an array like object. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array|Object} Returns the cast array-like object. + */ + function castArrayLikeObject(value) { + return isArrayLikeObject(value) ? value : []; + } + + /** + * Casts `value` to `identity` if it's not a function. + * + * @private + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. + */ + function castFunction(value) { + return typeof value == 'function' ? value : identity; + } + + /** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ + function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath(toString(value)); + } + + /** + * A `baseRest` alias which can be replaced with `identity` by module + * replacement plugins. + * + * @private + * @type {Function} + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + var castRest = baseRest; + + /** + * Casts `array` to a slice if it's needed. + * + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. + */ + function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return (!start && end >= length) ? array : baseSlice(array, start, end); + } + + /** + * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout). + * + * @private + * @param {number|Object} id The timer id or timeout object of the timer to clear. + */ + var clearTimeout = ctxClearTimeout || function(id) { + return root.clearTimeout(id); + }; + + /** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ + function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + + buffer.copy(result); + return result; + } + + /** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ + function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; + } + + /** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ + function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); + } + + /** + * Creates a clone of `map`. + * + * @private + * @param {Object} map The map to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned map. + */ + function cloneMap(map, isDeep, cloneFunc) { + var array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG) : mapToArray(map); + return arrayReduce(array, addMapEntry, new map.constructor); + } + + /** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ + function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; + } + + /** + * Creates a clone of `set`. + * + * @private + * @param {Object} set The set to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned set. + */ + function cloneSet(set, isDeep, cloneFunc) { + var array = isDeep ? cloneFunc(setToArray(set), CLONE_DEEP_FLAG) : setToArray(set); + return arrayReduce(array, addSetEntry, new set.constructor); + } + + /** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ + function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; + } + + /** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ + function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); + } + + /** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ + function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = isSymbol(value); + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = isSymbol(other); + + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { + return 1; + } + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { + return -1; + } + } + return 0; + } + + /** + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ + function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; + } + + /** + * Creates an array that is the composition of partially applied arguments, + * placeholders, and provided arguments into a single array of arguments. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to prepend to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgs(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersLength = holders.length, + leftIndex = -1, + leftLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(leftLength + rangeLength), + isUncurried = !isCurried; + + while (++leftIndex < leftLength) { + result[leftIndex] = partials[leftIndex]; + } + while (++argsIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[holders[argsIndex]] = args[argsIndex]; + } + } + while (rangeLength--) { + result[leftIndex++] = args[argsIndex++]; + } + return result; + } + + /** + * This function is like `composeArgs` except that the arguments composition + * is tailored for `_.partialRight`. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to append to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgsRight(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersIndex = -1, + holdersLength = holders.length, + rightIndex = -1, + rightLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(rangeLength + rightLength), + isUncurried = !isCurried; + + while (++argsIndex < rangeLength) { + result[argsIndex] = args[argsIndex]; + } + var offset = argsIndex; + while (++rightIndex < rightLength) { + result[offset + rightIndex] = partials[rightIndex]; + } + while (++holdersIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[offset + holders[holdersIndex]] = args[argsIndex++]; + } + } + return result; + } + + /** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ + function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; + } + + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ + function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; + } + + /** + * Copies own symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); + } + + /** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); + } + + /** + * Creates a function like `_.groupBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} [initializer] The accumulator object initializer. + * @returns {Function} Returns the new aggregator function. + */ + function createAggregator(setter, initializer) { + return function(collection, iteratee) { + var func = isArray(collection) ? arrayAggregator : baseAggregator, + accumulator = initializer ? initializer() : {}; + + return func(collection, setter, getIteratee(iteratee, 2), accumulator); + }; + } + + /** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ + function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); + } + + /** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; + } + + /** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + + /** + * Creates a function that wraps `func` to invoke it with the optional `this` + * binding of `thisArg`. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createBind(func, bitmask, thisArg) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return fn.apply(isBind ? thisArg : this, arguments); + } + return wrapper; + } + + /** + * Creates a function like `_.lowerFirst`. + * + * @private + * @param {string} methodName The name of the `String` case method to use. + * @returns {Function} Returns the new case function. + */ + function createCaseFirst(methodName) { + return function(string) { + string = toString(string); + + var strSymbols = hasUnicode(string) + ? stringToArray(string) + : undefined; + + var chr = strSymbols + ? strSymbols[0] + : string.charAt(0); + + var trailing = strSymbols + ? castSlice(strSymbols, 1).join('') + : string.slice(1); + + return chr[methodName]() + trailing; + }; + } + + /** + * Creates a function like `_.camelCase`. + * + * @private + * @param {Function} callback The function to combine each word. + * @returns {Function} Returns the new compounder function. + */ + function createCompounder(callback) { + return function(string) { + return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); + }; + } + + /** + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. + */ + function createCtor(Ctor) { + return function() { + // Use a `switch` statement to work with class constructors. See + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + switch (args.length) { + case 0: return new Ctor; + case 1: return new Ctor(args[0]); + case 2: return new Ctor(args[0], args[1]); + case 3: return new Ctor(args[0], args[1], args[2]); + case 4: return new Ctor(args[0], args[1], args[2], args[3]); + case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); + case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); + case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); + } + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; + } + + /** + * Creates a function that wraps `func` to enable currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {number} arity The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createCurry(func, bitmask, arity) { + var Ctor = createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length, + placeholder = getHolder(wrapper); + + while (index--) { + args[index] = arguments[index]; + } + var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) + ? [] + : replaceHolders(args, placeholder); + + length -= holders.length; + if (length < arity) { + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, undefined, + args, holders, undefined, undefined, arity - length); + } + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return apply(fn, this, args); + } + return wrapper; + } + + /** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ + function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = getIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; + } + + /** + * Creates a `_.flow` or `_.flowRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new flow function. + */ + function createFlow(fromRight) { + return flatRest(function(funcs) { + var length = funcs.length, + index = length, + prereq = LodashWrapper.prototype.thru; + + if (fromRight) { + funcs.reverse(); + } + while (index--) { + var func = funcs[index]; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (prereq && !wrapper && getFuncName(func) == 'wrapper') { + var wrapper = new LodashWrapper([], true); + } + } + index = wrapper ? index : length; + while (++index < length) { + func = funcs[index]; + + var funcName = getFuncName(func), + data = funcName == 'wrapper' ? getData(func) : undefined; + + if (data && isLaziable(data[0]) && + data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && + !data[4].length && data[9] == 1 + ) { + wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); + } else { + wrapper = (func.length == 1 && isLaziable(func)) + ? wrapper[funcName]() + : wrapper.thru(func); + } + } + return function() { + var args = arguments, + value = args[0]; + + if (wrapper && args.length == 1 && isArray(value)) { + return wrapper.plant(value).value(); + } + var index = 0, + result = length ? funcs[index].apply(this, args) : value; + + while (++index < length) { + result = funcs[index].call(this, result); + } + return result; + }; + }); + } + + /** + * Creates a function that wraps `func` to invoke it with optional `this` + * binding of `thisArg`, partial application, and currying. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [partialsRight] The arguments to append to those provided + * to the new function. + * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { + var isAry = bitmask & WRAP_ARY_FLAG, + isBind = bitmask & WRAP_BIND_FLAG, + isBindKey = bitmask & WRAP_BIND_KEY_FLAG, + isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), + isFlip = bitmask & WRAP_FLIP_FLAG, + Ctor = isBindKey ? undefined : createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length; + + while (index--) { + args[index] = arguments[index]; + } + if (isCurried) { + var placeholder = getHolder(wrapper), + holdersCount = countHolders(args, placeholder); + } + if (partials) { + args = composeArgs(args, partials, holders, isCurried); + } + if (partialsRight) { + args = composeArgsRight(args, partialsRight, holdersRight, isCurried); + } + length -= holdersCount; + if (isCurried && length < arity) { + var newHolders = replaceHolders(args, placeholder); + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, thisArg, + args, newHolders, argPos, ary, arity - length + ); + } + var thisBinding = isBind ? thisArg : this, + fn = isBindKey ? thisBinding[func] : func; + + length = args.length; + if (argPos) { + args = reorder(args, argPos); + } else if (isFlip && length > 1) { + args.reverse(); + } + if (isAry && ary < length) { + args.length = ary; + } + if (this && this !== root && this instanceof wrapper) { + fn = Ctor || createCtor(fn); + } + return fn.apply(thisBinding, args); + } + return wrapper; + } + + /** + * Creates a function like `_.invertBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} toIteratee The function to resolve iteratees. + * @returns {Function} Returns the new inverter function. + */ + function createInverter(setter, toIteratee) { + return function(object, iteratee) { + return baseInverter(object, setter, toIteratee(iteratee), {}); + }; + } + + /** + * Creates a function that performs a mathematical operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @param {number} [defaultValue] The value used for `undefined` arguments. + * @returns {Function} Returns the new mathematical operation function. + */ + function createMathOperation(operator, defaultValue) { + return function(value, other) { + var result; + if (value === undefined && other === undefined) { + return defaultValue; + } + if (value !== undefined) { + result = value; + } + if (other !== undefined) { + if (result === undefined) { + return other; + } + if (typeof value == 'string' || typeof other == 'string') { + value = baseToString(value); + other = baseToString(other); + } else { + value = baseToNumber(value); + other = baseToNumber(other); + } + result = operator(value, other); + } + return result; + }; + } + + /** + * Creates a function like `_.over`. + * + * @private + * @param {Function} arrayFunc The function to iterate over iteratees. + * @returns {Function} Returns the new over function. + */ + function createOver(arrayFunc) { + return flatRest(function(iteratees) { + iteratees = arrayMap(iteratees, baseUnary(getIteratee())); + return baseRest(function(args) { + var thisArg = this; + return arrayFunc(iteratees, function(iteratee) { + return apply(iteratee, thisArg, args); + }); + }); + }); + } + + /** + * Creates the padding for `string` based on `length`. The `chars` string + * is truncated if the number of characters exceeds `length`. + * + * @private + * @param {number} length The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padding for `string`. + */ + function createPadding(length, chars) { + chars = chars === undefined ? ' ' : baseToString(chars); + + var charsLength = chars.length; + if (charsLength < 2) { + return charsLength ? baseRepeat(chars, length) : chars; + } + var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); + return hasUnicode(chars) + ? castSlice(stringToArray(result), 0, length).join('') + : result.slice(0, length); + } + + /** + * Creates a function that wraps `func` to invoke it with the `this` binding + * of `thisArg` and `partials` prepended to the arguments it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} partials The arguments to prepend to those provided to + * the new function. + * @returns {Function} Returns the new wrapped function. + */ + function createPartial(func, bitmask, thisArg, partials) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var argsIndex = -1, + argsLength = arguments.length, + leftIndex = -1, + leftLength = partials.length, + args = Array(leftLength + argsLength), + fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + return apply(fn, isBind ? thisArg : this, args); + } + return wrapper; + } + + /** + * Creates a `_.range` or `_.rangeRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new range function. + */ + function createRange(fromRight) { + return function(start, end, step) { + if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { + end = step = undefined; + } + // Ensure the sign of `-0` is preserved. + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); + return baseRange(start, end, step, fromRight); + }; + } + + /** + * Creates a function that performs a relational operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @returns {Function} Returns the new relational operation function. + */ + function createRelationalOperation(operator) { + return function(value, other) { + if (!(typeof value == 'string' && typeof other == 'string')) { + value = toNumber(value); + other = toNumber(other); + } + return operator(value, other); + }; + } + + /** + * Creates a function that wraps `func` to continue currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {Function} wrapFunc The function to create the `func` wrapper. + * @param {*} placeholder The placeholder value. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { + var isCurry = bitmask & WRAP_CURRY_FLAG, + newHolders = isCurry ? holders : undefined, + newHoldersRight = isCurry ? undefined : holders, + newPartials = isCurry ? partials : undefined, + newPartialsRight = isCurry ? undefined : partials; + + bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG); + bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); + + if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { + bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); + } + var newData = [ + func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, + newHoldersRight, argPos, ary, arity + ]; + + var result = wrapFunc.apply(undefined, newData); + if (isLaziable(func)) { + setData(result, newData); + } + result.placeholder = placeholder; + return setWrapToString(result, func, bitmask); + } + + /** + * Creates a function like `_.round`. + * + * @private + * @param {string} methodName The name of the `Math` method to use when rounding. + * @returns {Function} Returns the new round function. + */ + function createRound(methodName) { + var func = Math[methodName]; + return function(number, precision) { + number = toNumber(number); + precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); + if (precision) { + // Shift with exponential notation to avoid floating-point issues. + // See [MDN](https://mdn.io/round#Examples) for more details. + var pair = (toString(number) + 'e').split('e'), + value = func(pair[0] + 'e' + (+pair[1] + precision)); + + pair = (toString(value) + 'e').split('e'); + return +(pair[0] + 'e' + (+pair[1] - precision)); + } + return func(number); + }; + } + + /** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ + var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { + return new Set(values); + }; + + /** + * Creates a `_.toPairs` or `_.toPairsIn` function. + * + * @private + * @param {Function} keysFunc The function to get the keys of a given object. + * @returns {Function} Returns the new pairs function. + */ + function createToPairs(keysFunc) { + return function(object) { + var tag = getTag(object); + if (tag == mapTag) { + return mapToArray(object); + } + if (tag == setTag) { + return setToPairs(object); + } + return baseToPairs(object, keysFunc(object)); + }; + } + + /** + * Creates a function that either curries or invokes `func` with optional + * `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` or `_.curryRight` of a bound function + * 8 - `_.curry` + * 16 - `_.curryRight` + * 32 - `_.partial` + * 64 - `_.partialRight` + * 128 - `_.rearg` + * 256 - `_.ary` + * 512 - `_.flip` + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to be partially applied. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { + var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; + if (!isBindKey && typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = partials ? partials.length : 0; + if (!length) { + bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); + partials = holders = undefined; + } + ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); + arity = arity === undefined ? arity : toInteger(arity); + length -= holders ? holders.length : 0; + + if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { + var partialsRight = partials, + holdersRight = holders; + + partials = holders = undefined; + } + var data = isBindKey ? undefined : getData(func); + + var newData = [ + func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, + argPos, ary, arity + ]; + + if (data) { + mergeData(newData, data); + } + func = newData[0]; + bitmask = newData[1]; + thisArg = newData[2]; + partials = newData[3]; + holders = newData[4]; + arity = newData[9] = newData[9] === undefined + ? (isBindKey ? 0 : func.length) + : nativeMax(newData[9] - length, 0); + + if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { + bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); + } + if (!bitmask || bitmask == WRAP_BIND_FLAG) { + var result = createBind(func, bitmask, thisArg); + } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { + result = createCurry(func, bitmask, arity); + } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { + result = createPartial(func, bitmask, thisArg, partials); + } else { + result = createHybrid.apply(undefined, newData); + } + var setter = data ? baseSetData : setData; + return setWrapToString(setter(result, newData), func, bitmask); + } + + /** + * Used by `_.defaults` to customize its `_.assignIn` use to assign properties + * of source objects to the destination object for all destination properties + * that resolve to `undefined`. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to assign. + * @param {Object} object The parent object of `objValue`. + * @returns {*} Returns the value to assign. + */ + function customDefaultsAssignIn(objValue, srcValue, key, object) { + if (objValue === undefined || + (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { + return srcValue; + } + return objValue; + } + + /** + * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source + * objects into destination objects that are passed thru. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to merge. + * @param {Object} object The parent object of `objValue`. + * @param {Object} source The parent object of `srcValue`. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + * @returns {*} Returns the value to assign. + */ + function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { + if (isObject(objValue) && isObject(srcValue)) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, objValue); + baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); + stack['delete'](srcValue); + } + return objValue; + } + + /** + * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain + * objects. + * + * @private + * @param {*} value The value to inspect. + * @param {string} key The key of the property to inspect. + * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. + */ + function customOmitClone(value) { + return isPlainObject(value) ? undefined : value; + } + + /** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(array); + if (stacked && stack.get(other)) { + return stacked == other; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!arraySome(other, function(othValue, othIndex) { + if (!cacheHas(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; + } + + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new Uint8Array(object), new Uint8Array(other))) { + return false; + } + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + case mapTag: + var convert = mapToArray; + + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; + } + + /** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = getAllKeys(object), + objLength = objProps.length, + othProps = getAllKeys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked && stack.get(other)) { + return stacked == other; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; + } + + /** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); + } + + /** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); + } + + /** + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeysIn(object) { + return baseGetAllKeys(object, keysIn, getSymbolsIn); + } + + /** + * Gets metadata for `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {*} Returns the metadata for `func`. + */ + var getData = !metaMap ? noop : function(func) { + return metaMap.get(func); + }; + + /** + * Gets the name of `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {string} Returns the function name. + */ + function getFuncName(func) { + var result = (func.name + ''), + array = realNames[result], + length = hasOwnProperty.call(realNames, result) ? array.length : 0; + + while (length--) { + var data = array[length], + otherFunc = data.func; + if (otherFunc == null || otherFunc == func) { + return data.name; + } + } + return result; + } + + /** + * Gets the argument placeholder value for `func`. + * + * @private + * @param {Function} func The function to inspect. + * @returns {*} Returns the placeholder value. + */ + function getHolder(func) { + var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func; + return object.placeholder; + } + + /** + * Gets the appropriate "iteratee" function. If `_.iteratee` is customized, + * this function returns the custom method, otherwise it returns `baseIteratee`. + * If arguments are provided, the chosen function is invoked with them and + * its result is returned. + * + * @private + * @param {*} [value] The value to convert to an iteratee. + * @param {number} [arity] The arity of the created iteratee. + * @returns {Function} Returns the chosen function or its result. + */ + function getIteratee() { + var result = lodash.iteratee || iteratee; + result = result === iteratee ? baseIteratee : result; + return arguments.length ? result(arguments[0], arguments[1]) : result; + } + + /** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; + } + + /** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ + function getMatchData(object) { + var result = keys(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, isStrictComparable(value)]; + } + return result; + } + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; + } + + /** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; + } + + /** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbols = !nativeGetSymbols ? stubArray : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); + }; + + /** + * Creates an array of the own and inherited enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { + var result = []; + while (object) { + arrayPush(result, getSymbols(object)); + object = getPrototype(object); + } + return result; + }; + + /** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + var getTag = baseGetTag; + + // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. + if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function(value) { + var result = baseGetTag(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; + } + + /** + * Gets the view, applying any `transforms` to the `start` and `end` positions. + * + * @private + * @param {number} start The start of the view. + * @param {number} end The end of the view. + * @param {Array} transforms The transformations to apply to the view. + * @returns {Object} Returns an object containing the `start` and `end` + * positions of the view. + */ + function getView(start, end, transforms) { + var index = -1, + length = transforms.length; + + while (++index < length) { + var data = transforms[index], + size = data.size; + + switch (data.type) { + case 'drop': start += size; break; + case 'dropRight': end -= size; break; + case 'take': end = nativeMin(end, start + size); break; + case 'takeRight': start = nativeMax(start, end - size); break; + } + } + return { 'start': start, 'end': end }; + } + + /** + * Extracts wrapper details from the `source` body comment. + * + * @private + * @param {string} source The source to inspect. + * @returns {Array} Returns the wrapper details. + */ + function getWrapDetails(source) { + var match = source.match(reWrapDetails); + return match ? match[1].split(reSplitDetails) : []; + } + + /** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ + function hasPath(object, path, hasFunc) { + path = castPath(path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && isLength(length) && isIndex(key, length) && + (isArray(object) || isArguments(object)); + } + + /** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ + function initCloneArray(array) { + var length = array.length, + result = array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; + } + + /** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneObject(object) { + return (typeof object.constructor == 'function' && !isPrototype(object)) + ? baseCreate(getPrototype(object)) + : {}; + } + + /** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneByTag(object, tag, cloneFunc, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return cloneDataView(object, isDeep); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return cloneTypedArray(object, isDeep); + + case mapTag: + return cloneMap(object, isDeep, cloneFunc); + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return cloneRegExp(object); + + case setTag: + return cloneSet(object, isDeep, cloneFunc); + + case symbolTag: + return cloneSymbol(object); + } + } + + /** + * Inserts wrapper `details` in a comment at the top of the `source` body. + * + * @private + * @param {string} source The source to modify. + * @returns {Array} details The details to insert. + * @returns {string} Returns the modified source. + */ + function insertWrapDetails(source, details) { + var length = details.length; + if (!length) { + return source; + } + var lastIndex = length - 1; + details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; + details = details.join(length > 2 ? ', ' : ' '); + return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); + } + + /** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ + function isFlattenable(value) { + return isArray(value) || isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); + } + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && + (typeof value == 'number' || reIsUint.test(value)) && + (value > -1 && value % 1 == 0 && value < length); + } + + /** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; + } + + /** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ + function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); + } + + /** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ + function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); + } + + /** + * Checks if `func` has a lazy counterpart. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` has a lazy counterpart, + * else `false`. + */ + function isLaziable(func) { + var funcName = getFuncName(func), + other = lodash[funcName]; + + if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { + return false; + } + if (func === other) { + return true; + } + var data = getData(other); + return !!data && func === data[0]; + } + + /** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ + function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); + } + + /** + * Checks if `func` is capable of being masked. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `func` is maskable, else `false`. + */ + var isMaskable = coreJsData ? isFunction : stubFalse; + + /** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; + } + + /** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ + function isStrictComparable(value) { + return value === value && !isObject(value); + } + + /** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; + } + + /** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ + function memoizeCapped(func) { + var result = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; + } + + /** + * Merges the function metadata of `source` into `data`. + * + * Merging metadata reduces the number of wrappers used to invoke a function. + * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` + * may be applied regardless of execution order. Methods like `_.ary` and + * `_.rearg` modify function arguments, making the order in which they are + * executed important, preventing the merging of metadata. However, we make + * an exception for a safe combined case where curried functions have `_.ary` + * and or `_.rearg` applied. + * + * @private + * @param {Array} data The destination metadata. + * @param {Array} source The source metadata. + * @returns {Array} Returns `data`. + */ + function mergeData(data, source) { + var bitmask = data[1], + srcBitmask = source[1], + newBitmask = bitmask | srcBitmask, + isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); + + var isCombo = + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) || + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) || + ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG)); + + // Exit early if metadata can't be merged. + if (!(isCommon || isCombo)) { + return data; + } + // Use source `thisArg` if available. + if (srcBitmask & WRAP_BIND_FLAG) { + data[2] = source[2]; + // Set when currying a bound function. + newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; + } + // Compose partial arguments. + var value = source[3]; + if (value) { + var partials = data[3]; + data[3] = partials ? composeArgs(partials, value, source[4]) : value; + data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; + } + // Compose partial right arguments. + value = source[5]; + if (value) { + partials = data[5]; + data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; + data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; + } + // Use source `argPos` if available. + value = source[7]; + if (value) { + data[7] = value; + } + // Use source `ary` if it's smaller. + if (srcBitmask & WRAP_ARY_FLAG) { + data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); + } + // Use source `arity` if one is not provided. + if (data[9] == null) { + data[9] = source[9]; + } + // Use source `func` and merge bitmasks. + data[0] = source[0]; + data[1] = newBitmask; + + return data; + } + + /** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; + } + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString.call(value); + } + + /** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ + function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; + } + + /** + * Gets the parent value at `path` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} path The path to get the parent value of. + * @returns {*} Returns the parent value. + */ + function parent(object, path) { + return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); + } + + /** + * Reorder `array` according to the specified indexes where the element at + * the first index is assigned as the first element, the element at + * the second index is assigned as the second element, and so on. + * + * @private + * @param {Array} array The array to reorder. + * @param {Array} indexes The arranged array indexes. + * @returns {Array} Returns `array`. + */ + function reorder(array, indexes) { + var arrLength = array.length, + length = nativeMin(indexes.length, arrLength), + oldArray = copyArray(array); + + while (length--) { + var index = indexes[length]; + array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; + } + return array; + } + + /** + * Sets metadata for `func`. + * + * **Note:** If this function becomes hot, i.e. is invoked a lot in a short + * period of time, it will trip its breaker and transition to an identity + * function to avoid garbage collection pauses in V8. See + * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) + * for more details. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var setData = shortOut(baseSetData); + + /** + * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout). + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @returns {number|Object} Returns the timer id or timeout object. + */ + var setTimeout = ctxSetTimeout || function(func, wait) { + return root.setTimeout(func, wait); + }; + + /** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var setToString = shortOut(baseSetToString); + + /** + * Sets the `toString` method of `wrapper` to mimic the source of `reference` + * with wrapper details in a comment at the top of the source body. + * + * @private + * @param {Function} wrapper The function to modify. + * @param {Function} reference The reference function. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Function} Returns `wrapper`. + */ + function setWrapToString(wrapper, reference, bitmask) { + var source = (reference + ''); + return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); + } + + /** + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. + * + * @private + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. + */ + function shortOut(func) { + var count = 0, + lastCalled = 0; + + return function() { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined, arguments); + }; + } + + /** + * A specialized version of `_.shuffle` which mutates and sets the size of `array`. + * + * @private + * @param {Array} array The array to shuffle. + * @param {number} [size=array.length] The size of `array`. + * @returns {Array} Returns `array`. + */ + function shuffleSelf(array, size) { + var index = -1, + length = array.length, + lastIndex = length - 1; + + size = size === undefined ? length : size; + while (++index < size) { + var rand = baseRandom(index, lastIndex), + value = array[rand]; + + array[rand] = array[index]; + array[index] = value; + } + array.length = size; + return array; + } + + /** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ + var stringToPath = memoizeCapped(function(string) { + var result = []; + if (reLeadingDot.test(string)) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, string) { + result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; + }); + + /** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ + function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + } + + /** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; + } + + /** + * Updates wrapper `details` based on `bitmask` flags. + * + * @private + * @returns {Array} details The details to modify. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Array} Returns `details`. + */ + function updateWrapDetails(details, bitmask) { + arrayEach(wrapFlags, function(pair) { + var value = '_.' + pair[0]; + if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { + details.push(value); + } + }); + return details.sort(); + } + + /** + * Creates a clone of `wrapper`. + * + * @private + * @param {Object} wrapper The wrapper to clone. + * @returns {Object} Returns the cloned wrapper. + */ + function wrapperClone(wrapper) { + if (wrapper instanceof LazyWrapper) { + return wrapper.clone(); + } + var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); + result.__actions__ = copyArray(wrapper.__actions__); + result.__index__ = wrapper.__index__; + result.__values__ = wrapper.__values__; + return result; + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of elements split into groups the length of `size`. + * If `array` can't be split evenly, the final chunk will be the remaining + * elements. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to process. + * @param {number} [size=1] The length of each chunk + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the new array of chunks. + * @example + * + * _.chunk(['a', 'b', 'c', 'd'], 2); + * // => [['a', 'b'], ['c', 'd']] + * + * _.chunk(['a', 'b', 'c', 'd'], 3); + * // => [['a', 'b', 'c'], ['d']] + */ + function chunk(array, size, guard) { + if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) { + size = 1; + } else { + size = nativeMax(toInteger(size), 0); + } + var length = array == null ? 0 : array.length; + if (!length || size < 1) { + return []; + } + var index = 0, + resIndex = 0, + result = Array(nativeCeil(length / size)); + + while (index < length) { + result[resIndex++] = baseSlice(array, index, (index += size)); + } + return result; + } + + /** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ + function compact(array) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result[resIndex++] = value; + } + } + return result; + } + + /** + * Creates a new array concatenating `array` with any additional arrays + * and/or values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to concatenate. + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var other = _.concat(array, 2, [3], [[4]]); + * + * console.log(other); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ + function concat() { + var length = arguments.length; + if (!length) { + return []; + } + var args = Array(length - 1), + array = arguments[0], + index = length; + + while (index--) { + args[index - 1] = arguments[index]; + } + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); + } + + /** + * Creates an array of `array` values not included in the other given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * **Note:** Unlike `_.pullAll`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.without, _.xor + * @example + * + * _.difference([2, 1], [2, 3]); + * // => [1] + */ + var difference = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) + : []; + }); + + /** + * This method is like `_.difference` except that it accepts `iteratee` which + * is invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * **Note:** Unlike `_.pullAllBy`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2] + * + * // The `_.property` iteratee shorthand. + * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + var differenceBy = baseRest(function(array, values) { + var iteratee = last(values); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)) + : []; + }); + + /** + * This method is like `_.difference` except that it accepts `comparator` + * which is invoked to compare elements of `array` to `values`. The order and + * references of result values are determined by the first array. The comparator + * is invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.pullAllWith`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * + * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); + * // => [{ 'x': 2, 'y': 1 }] + */ + var differenceWith = baseRest(function(array, values) { + var comparator = last(values); + if (isArrayLikeObject(comparator)) { + comparator = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator) + : []; + }); + + /** + * Creates a slice of `array` with `n` elements dropped from the beginning. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.drop([1, 2, 3]); + * // => [2, 3] + * + * _.drop([1, 2, 3], 2); + * // => [3] + * + * _.drop([1, 2, 3], 5); + * // => [] + * + * _.drop([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function drop(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, n < 0 ? 0 : n, length); + } + + /** + * Creates a slice of `array` with `n` elements dropped from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRight([1, 2, 3]); + * // => [1, 2] + * + * _.dropRight([1, 2, 3], 2); + * // => [1] + * + * _.dropRight([1, 2, 3], 5); + * // => [] + * + * _.dropRight([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function dropRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` excluding elements dropped from the end. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.dropRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney'] + * + * // The `_.matches` iteratee shorthand. + * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropRightWhile(users, ['active', false]); + * // => objects for ['barney'] + * + * // The `_.property` iteratee shorthand. + * _.dropRightWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ + function dropRightWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), true, true) + : []; + } + + /** + * Creates a slice of `array` excluding elements dropped from the beginning. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.dropWhile(users, function(o) { return !o.active; }); + * // => objects for ['pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.dropWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropWhile(users, ['active', false]); + * // => objects for ['pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.dropWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ + function dropWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), true) + : []; + } + + /** + * Fills elements of `array` with `value` from `start` up to, but not + * including, `end`. + * + * **Note:** This method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Array + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.fill(array, 'a'); + * console.log(array); + * // => ['a', 'a', 'a'] + * + * _.fill(Array(3), 2); + * // => [2, 2, 2] + * + * _.fill([4, 6, 8, 10], '*', 1, 3); + * // => [4, '*', '*', 10] + */ + function fill(array, value, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { + start = 0; + end = length; + } + return baseFill(array, value, start, end); + } + + /** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ + function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, getIteratee(predicate, 3), index); + } + + /** + * This method is like `_.findIndex` except that it iterates over elements + * of `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); + * // => 2 + * + * // The `_.matches` iteratee shorthand. + * _.findLastIndex(users, { 'user': 'barney', 'active': true }); + * // => 0 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastIndex(users, ['active', false]); + * // => 2 + * + * // The `_.property` iteratee shorthand. + * _.findLastIndex(users, 'active'); + * // => 0 + */ + function findLastIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length - 1; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = fromIndex < 0 + ? nativeMax(length + index, 0) + : nativeMin(index, length - 1); + } + return baseFindIndex(array, getIteratee(predicate, 3), index, true); + } + + /** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ + function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; + } + + /** + * Recursively flattens `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, [3, [4]], 5]]); + * // => [1, 2, 3, 4, 5] + */ + function flattenDeep(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, INFINITY) : []; + } + + /** + * Recursively flatten `array` up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Array + * @param {Array} array The array to flatten. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * var array = [1, [2, [3, [4]], 5]]; + * + * _.flattenDepth(array, 1); + * // => [1, 2, [3, [4]], 5] + * + * _.flattenDepth(array, 2); + * // => [1, 2, 3, [4], 5] + */ + function flattenDepth(array, depth) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(array, depth); + } + + /** + * The inverse of `_.toPairs`; this method returns an object composed + * from key-value `pairs`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} pairs The key-value pairs. + * @returns {Object} Returns the new object. + * @example + * + * _.fromPairs([['a', 1], ['b', 2]]); + * // => { 'a': 1, 'b': 2 } + */ + function fromPairs(pairs) { + var index = -1, + length = pairs == null ? 0 : pairs.length, + result = {}; + + while (++index < length) { + var pair = pairs[index]; + result[pair[0]] = pair[1]; + } + return result; + } + + /** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias first + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.head([1, 2, 3]); + * // => 1 + * + * _.head([]); + * // => undefined + */ + function head(array) { + return (array && array.length) ? array[0] : undefined; + } + + /** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the + * offset from the end of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // Search from the `fromIndex`. + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + */ + function indexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseIndexOf(array, value, index); + } + + /** + * Gets all but the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + */ + function initial(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 0, -1) : []; + } + + /** + * Creates an array of unique values that are included in all given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersection([2, 1], [2, 3]); + * // => [2] + */ + var intersection = baseRest(function(arrays) { + var mapped = arrayMap(arrays, castArrayLikeObject); + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped) + : []; + }); + + /** + * This method is like `_.intersection` except that it accepts `iteratee` + * which is invoked for each element of each `arrays` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [2.1] + * + * // The `_.property` iteratee shorthand. + * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }] + */ + var intersectionBy = baseRest(function(arrays) { + var iteratee = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + if (iteratee === last(mapped)) { + iteratee = undefined; + } else { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, getIteratee(iteratee, 2)) + : []; + }); + + /** + * This method is like `_.intersection` except that it accepts `comparator` + * which is invoked to compare elements of `arrays`. The order and references + * of result values are determined by the first array. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.intersectionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }] + */ + var intersectionWith = baseRest(function(arrays) { + var comparator = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + comparator = typeof comparator == 'function' ? comparator : undefined; + if (comparator) { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, undefined, comparator) + : []; + }); + + /** + * Converts all elements in `array` into a string separated by `separator`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to convert. + * @param {string} [separator=','] The element separator. + * @returns {string} Returns the joined string. + * @example + * + * _.join(['a', 'b', 'c'], '~'); + * // => 'a~b~c' + */ + function join(array, separator) { + return array == null ? '' : nativeJoin.call(array, separator); + } + + /** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ + function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; + } + + /** + * This method is like `_.indexOf` except that it iterates over elements of + * `array` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.lastIndexOf([1, 2, 1, 2], 2); + * // => 3 + * + * // Search from the `fromIndex`. + * _.lastIndexOf([1, 2, 1, 2], 2, 2); + * // => 1 + */ + function lastIndexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); + } + return value === value + ? strictLastIndexOf(array, value, index) + : baseFindIndex(array, baseIsNaN, index, true); + } + + /** + * Gets the element at index `n` of `array`. If `n` is negative, the nth + * element from the end is returned. + * + * @static + * @memberOf _ + * @since 4.11.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=0] The index of the element to return. + * @returns {*} Returns the nth element of `array`. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * + * _.nth(array, 1); + * // => 'b' + * + * _.nth(array, -2); + * // => 'c'; + */ + function nth(array, n) { + return (array && array.length) ? baseNth(array, toInteger(n)) : undefined; + } + + /** + * Removes all given values from `array` using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove` + * to remove elements from an array by predicate. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...*} [values] The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pull(array, 'a', 'c'); + * console.log(array); + * // => ['b', 'b'] + */ + var pull = baseRest(pullAll); + + /** + * This method is like `_.pull` except that it accepts an array of values to remove. + * + * **Note:** Unlike `_.difference`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pullAll(array, ['a', 'c']); + * console.log(array); + * // => ['b', 'b'] + */ + function pullAll(array, values) { + return (array && array.length && values && values.length) + ? basePullAll(array, values) + : array; + } + + /** + * This method is like `_.pullAll` except that it accepts `iteratee` which is + * invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The iteratee is invoked with one argument: (value). + * + * **Note:** Unlike `_.differenceBy`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; + * + * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x'); + * console.log(array); + * // => [{ 'x': 2 }] + */ + function pullAllBy(array, values, iteratee) { + return (array && array.length && values && values.length) + ? basePullAll(array, values, getIteratee(iteratee, 2)) + : array; + } + + /** + * This method is like `_.pullAll` except that it accepts `comparator` which + * is invoked to compare elements of `array` to `values`. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.differenceWith`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }]; + * + * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual); + * console.log(array); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }] + */ + function pullAllWith(array, values, comparator) { + return (array && array.length && values && values.length) + ? basePullAll(array, values, undefined, comparator) + : array; + } + + /** + * Removes elements from `array` corresponding to `indexes` and returns an + * array of removed elements. + * + * **Note:** Unlike `_.at`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...(number|number[])} [indexes] The indexes of elements to remove. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * var pulled = _.pullAt(array, [1, 3]); + * + * console.log(array); + * // => ['a', 'c'] + * + * console.log(pulled); + * // => ['b', 'd'] + */ + var pullAt = flatRest(function(array, indexes) { + var length = array == null ? 0 : array.length, + result = baseAt(array, indexes); + + basePullAt(array, arrayMap(indexes, function(index) { + return isIndex(index, length) ? +index : index; + }).sort(compareAscending)); + + return result; + }); + + /** + * Removes all elements from `array` that `predicate` returns truthy for + * and returns an array of the removed elements. The predicate is invoked + * with three arguments: (value, index, array). + * + * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull` + * to pull elements from an array by value. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = [1, 2, 3, 4]; + * var evens = _.remove(array, function(n) { + * return n % 2 == 0; + * }); + * + * console.log(array); + * // => [1, 3] + * + * console.log(evens); + * // => [2, 4] + */ + function remove(array, predicate) { + var result = []; + if (!(array && array.length)) { + return result; + } + var index = -1, + indexes = [], + length = array.length; + + predicate = getIteratee(predicate, 3); + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result.push(value); + indexes.push(index); + } + } + basePullAt(array, indexes); + return result; + } + + /** + * Reverses `array` so that the first element becomes the last, the second + * element becomes the second to last, and so on. + * + * **Note:** This method mutates `array` and is based on + * [`Array#reverse`](https://mdn.io/Array/reverse). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.reverse(array); + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function reverse(array) { + return array == null ? array : nativeReverse.call(array); + } + + /** + * Creates a slice of `array` from `start` up to, but not including, `end`. + * + * **Note:** This method is used instead of + * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are + * returned. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function slice(array, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { + start = 0; + end = length; + } + else { + start = start == null ? 0 : toInteger(start); + end = end === undefined ? length : toInteger(end); + } + return baseSlice(array, start, end); + } + + /** + * Uses a binary search to determine the lowest index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedIndex([30, 50], 40); + * // => 1 + */ + function sortedIndex(array, value) { + return baseSortedIndex(array, value); + } + + /** + * This method is like `_.sortedIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.sortedIndexBy(objects, { 'x': 4 }, 'x'); + * // => 0 + */ + function sortedIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2)); + } + + /** + * This method is like `_.indexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedIndexOf([4, 5, 5, 5, 6], 5); + * // => 1 + */ + function sortedIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value); + if (index < length && eq(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.sortedIndex` except that it returns the highest + * index at which `value` should be inserted into `array` in order to + * maintain its sort order. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedLastIndex([4, 5, 5, 5, 6], 5); + * // => 4 + */ + function sortedLastIndex(array, value) { + return baseSortedIndex(array, value, true); + } + + /** + * This method is like `_.sortedLastIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 1 + * + * // The `_.property` iteratee shorthand. + * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x'); + * // => 1 + */ + function sortedLastIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true); + } + + /** + * This method is like `_.lastIndexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5); + * // => 3 + */ + function sortedLastIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value, true) - 1; + if (eq(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.uniq` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniq([1, 1, 2]); + * // => [1, 2] + */ + function sortedUniq(array) { + return (array && array.length) + ? baseSortedUniq(array) + : []; + } + + /** + * This method is like `_.uniqBy` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); + * // => [1.1, 2.3] + */ + function sortedUniqBy(array, iteratee) { + return (array && array.length) + ? baseSortedUniq(array, getIteratee(iteratee, 2)) + : []; + } + + /** + * Gets all but the first element of `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.tail([1, 2, 3]); + * // => [2, 3] + */ + function tail(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 1, length) : []; + } + + /** + * Creates a slice of `array` with `n` elements taken from the beginning. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.take([1, 2, 3]); + * // => [1] + * + * _.take([1, 2, 3], 2); + * // => [1, 2] + * + * _.take([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.take([1, 2, 3], 0); + * // => [] + */ + function take(array, n, guard) { + if (!(array && array.length)) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` with `n` elements taken from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeRight([1, 2, 3]); + * // => [3] + * + * _.takeRight([1, 2, 3], 2); + * // => [2, 3] + * + * _.takeRight([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.takeRight([1, 2, 3], 0); + * // => [] + */ + function takeRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, n < 0 ? 0 : n, length); + } + + /** + * Creates a slice of `array` with elements taken from the end. Elements are + * taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.takeRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeRightWhile(users, ['active', false]); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.takeRightWhile(users, 'active'); + * // => [] + */ + function takeRightWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), false, true) + : []; + } + + /** + * Creates a slice of `array` with elements taken from the beginning. Elements + * are taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.takeWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matches` iteratee shorthand. + * _.takeWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeWhile(users, ['active', false]); + * // => objects for ['barney', 'fred'] + * + * // The `_.property` iteratee shorthand. + * _.takeWhile(users, 'active'); + * // => [] + */ + function takeWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3)) + : []; + } + + /** + * Creates an array of unique values, in order, from all given arrays using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.union([2], [1, 2]); + * // => [2, 1] + */ + var union = baseRest(function(arrays) { + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); + }); + + /** + * This method is like `_.union` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which uniqueness is computed. Result values are chosen from the first + * array in which the value occurs. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.unionBy([2.1], [1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + var unionBy = baseRest(function(arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)); + }); + + /** + * This method is like `_.union` except that it accepts `comparator` which + * is invoked to compare elements of `arrays`. Result values are chosen from + * the first array in which the value occurs. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.unionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + var unionWith = baseRest(function(arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator); + }); + + /** + * Creates a duplicate-free version of an array, using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurrence of each element + * is kept. The order of result values is determined by the order they occur + * in the array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniq([2, 1, 2]); + * // => [2, 1] + */ + function uniq(array) { + return (array && array.length) ? baseUniq(array) : []; + } + + /** + * This method is like `_.uniq` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * uniqueness is computed. The order of result values is determined by the + * order they occur in the array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniqBy([2.1, 1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + function uniqBy(array, iteratee) { + return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : []; + } + + /** + * This method is like `_.uniq` except that it accepts `comparator` which + * is invoked to compare elements of `array`. The order of result values is + * determined by the order they occur in the array.The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.uniqWith(objects, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] + */ + function uniqWith(array, comparator) { + comparator = typeof comparator == 'function' ? comparator : undefined; + return (array && array.length) ? baseUniq(array, undefined, comparator) : []; + } + + /** + * This method is like `_.zip` except that it accepts an array of grouped + * elements and creates an array regrouping the elements to their pre-zip + * configuration. + * + * @static + * @memberOf _ + * @since 1.2.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + * + * _.unzip(zipped); + * // => [['a', 'b'], [1, 2], [true, false]] + */ + function unzip(array) { + if (!(array && array.length)) { + return []; + } + var length = 0; + array = arrayFilter(array, function(group) { + if (isArrayLikeObject(group)) { + length = nativeMax(group.length, length); + return true; + } + }); + return baseTimes(length, function(index) { + return arrayMap(array, baseProperty(index)); + }); + } + + /** + * This method is like `_.unzip` except that it accepts `iteratee` to specify + * how regrouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @param {Function} [iteratee=_.identity] The function to combine + * regrouped values. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip([1, 2], [10, 20], [100, 200]); + * // => [[1, 10, 100], [2, 20, 200]] + * + * _.unzipWith(zipped, _.add); + * // => [3, 30, 300] + */ + function unzipWith(array, iteratee) { + if (!(array && array.length)) { + return []; + } + var result = unzip(array); + if (iteratee == null) { + return result; + } + return arrayMap(result, function(group) { + return apply(iteratee, undefined, group); + }); + } + + /** + * Creates an array excluding all given values using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.pull`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...*} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.xor + * @example + * + * _.without([2, 1, 2, 3], 1, 2); + * // => [3] + */ + var without = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, values) + : []; + }); + + /** + * Creates an array of unique values that is the + * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) + * of the given arrays. The order of result values is determined by the order + * they occur in the arrays. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.without + * @example + * + * _.xor([2, 1], [2, 3]); + * // => [1, 3] + */ + var xor = baseRest(function(arrays) { + return baseXor(arrayFilter(arrays, isArrayLikeObject)); + }); + + /** + * This method is like `_.xor` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which by which they're compared. The order of result values is determined + * by the order they occur in the arrays. The iteratee is invoked with one + * argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2, 3.4] + * + * // The `_.property` iteratee shorthand. + * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + var xorBy = baseRest(function(arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2)); + }); + + /** + * This method is like `_.xor` except that it accepts `comparator` which is + * invoked to compare elements of `arrays`. The order of result values is + * determined by the order they occur in the arrays. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.xorWith(objects, others, _.isEqual); + * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + var xorWith = baseRest(function(arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator); + }); + + /** + * Creates an array of grouped elements, the first of which contains the + * first elements of the given arrays, the second of which contains the + * second elements of the given arrays, and so on. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + */ + var zip = baseRest(unzip); + + /** + * This method is like `_.fromPairs` except that it accepts two arrays, + * one of property identifiers and one of corresponding values. + * + * @static + * @memberOf _ + * @since 0.4.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObject(['a', 'b'], [1, 2]); + * // => { 'a': 1, 'b': 2 } + */ + function zipObject(props, values) { + return baseZipObject(props || [], values || [], assignValue); + } + + /** + * This method is like `_.zipObject` except that it supports property paths. + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]); + * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } } + */ + function zipObjectDeep(props, values) { + return baseZipObject(props || [], values || [], baseSet); + } + + /** + * This method is like `_.zip` except that it accepts `iteratee` to specify + * how grouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @param {Function} [iteratee=_.identity] The function to combine + * grouped values. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) { + * return a + b + c; + * }); + * // => [111, 222] + */ + var zipWith = baseRest(function(arrays) { + var length = arrays.length, + iteratee = length > 1 ? arrays[length - 1] : undefined; + + iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined; + return unzipWith(arrays, iteratee); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` wrapper instance that wraps `value` with explicit method + * chain sequences enabled. The result of such sequences must be unwrapped + * with `_#value`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Seq + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _ + * .chain(users) + * .sortBy('age') + * .map(function(o) { + * return o.user + ' is ' + o.age; + * }) + * .head() + * .value(); + * // => 'pebbles is 1' + */ + function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; + } + + /** + * This method invokes `interceptor` and returns `value`. The interceptor + * is invoked with one argument; (value). The purpose of this method is to + * "tap into" a method chain sequence in order to modify intermediate results. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns `value`. + * @example + * + * _([1, 2, 3]) + * .tap(function(array) { + * // Mutate input array. + * array.pop(); + * }) + * .reverse() + * .value(); + * // => [2, 1] + */ + function tap(value, interceptor) { + interceptor(value); + return value; + } + + /** + * This method is like `_.tap` except that it returns the result of `interceptor`. + * The purpose of this method is to "pass thru" values replacing intermediate + * results in a method chain sequence. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns the result of `interceptor`. + * @example + * + * _(' abc ') + * .chain() + * .trim() + * .thru(function(value) { + * return [value]; + * }) + * .value(); + * // => ['abc'] + */ + function thru(value, interceptor) { + return interceptor(value); + } + + /** + * This method is the wrapper version of `_.at`. + * + * @name at + * @memberOf _ + * @since 1.0.0 + * @category Seq + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _(object).at(['a[0].b.c', 'a[1]']).value(); + * // => [3, 4] + */ + var wrapperAt = flatRest(function(paths) { + var length = paths.length, + start = length ? paths[0] : 0, + value = this.__wrapped__, + interceptor = function(object) { return baseAt(object, paths); }; + + if (length > 1 || this.__actions__.length || + !(value instanceof LazyWrapper) || !isIndex(start)) { + return this.thru(interceptor); + } + value = value.slice(start, +start + (length ? 1 : 0)); + value.__actions__.push({ + 'func': thru, + 'args': [interceptor], + 'thisArg': undefined + }); + return new LodashWrapper(value, this.__chain__).thru(function(array) { + if (length && !array.length) { + array.push(undefined); + } + return array; + }); + }); + + /** + * Creates a `lodash` wrapper instance with explicit method chain sequences enabled. + * + * @name chain + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * // A sequence without explicit chaining. + * _(users).head(); + * // => { 'user': 'barney', 'age': 36 } + * + * // A sequence with explicit chaining. + * _(users) + * .chain() + * .head() + * .pick('user') + * .value(); + * // => { 'user': 'barney' } + */ + function wrapperChain() { + return chain(this); + } + + /** + * Executes the chain sequence and returns the wrapped result. + * + * @name commit + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).push(3); + * + * console.log(array); + * // => [1, 2] + * + * wrapped = wrapped.commit(); + * console.log(array); + * // => [1, 2, 3] + * + * wrapped.last(); + * // => 3 + * + * console.log(array); + * // => [1, 2, 3] + */ + function wrapperCommit() { + return new LodashWrapper(this.value(), this.__chain__); + } + + /** + * Gets the next value on a wrapped object following the + * [iterator protocol](https://mdn.io/iteration_protocols#iterator). + * + * @name next + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the next iterator value. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped.next(); + * // => { 'done': false, 'value': 1 } + * + * wrapped.next(); + * // => { 'done': false, 'value': 2 } + * + * wrapped.next(); + * // => { 'done': true, 'value': undefined } + */ + function wrapperNext() { + if (this.__values__ === undefined) { + this.__values__ = toArray(this.value()); + } + var done = this.__index__ >= this.__values__.length, + value = done ? undefined : this.__values__[this.__index__++]; + + return { 'done': done, 'value': value }; + } + + /** + * Enables the wrapper to be iterable. + * + * @name Symbol.iterator + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the wrapper object. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped[Symbol.iterator]() === wrapped; + * // => true + * + * Array.from(wrapped); + * // => [1, 2] + */ + function wrapperToIterator() { + return this; + } + + /** + * Creates a clone of the chain sequence planting `value` as the wrapped value. + * + * @name plant + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @param {*} value The value to plant. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2]).map(square); + * var other = wrapped.plant([3, 4]); + * + * other.value(); + * // => [9, 16] + * + * wrapped.value(); + * // => [1, 4] + */ + function wrapperPlant(value) { + var result, + parent = this; + + while (parent instanceof baseLodash) { + var clone = wrapperClone(parent); + clone.__index__ = 0; + clone.__values__ = undefined; + if (result) { + previous.__wrapped__ = clone; + } else { + result = clone; + } + var previous = clone; + parent = parent.__wrapped__; + } + previous.__wrapped__ = value; + return result; + } + + /** + * This method is the wrapper version of `_.reverse`. + * + * **Note:** This method mutates the wrapped array. + * + * @name reverse + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2, 3]; + * + * _(array).reverse().value() + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function wrapperReverse() { + var value = this.__wrapped__; + if (value instanceof LazyWrapper) { + var wrapped = value; + if (this.__actions__.length) { + wrapped = new LazyWrapper(this); + } + wrapped = wrapped.reverse(); + wrapped.__actions__.push({ + 'func': thru, + 'args': [reverse], + 'thisArg': undefined + }); + return new LodashWrapper(wrapped, this.__chain__); + } + return this.thru(reverse); + } + + /** + * Executes the chain sequence to resolve the unwrapped value. + * + * @name value + * @memberOf _ + * @since 0.1.0 + * @alias toJSON, valueOf + * @category Seq + * @returns {*} Returns the resolved unwrapped value. + * @example + * + * _([1, 2, 3]).value(); + * // => [1, 2, 3] + */ + function wrapperValue() { + return baseWrapperValue(this.__wrapped__, this.__actions__); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the number of times the key was returned by `iteratee`. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.countBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': 1, '6': 2 } + * + * // The `_.property` iteratee shorthand. + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ + var countBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + ++result[key]; + } else { + baseAssignValue(result, key, 1); + } + }); + + /** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * Iteration is stopped once `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.every(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.every(users, 'active'); + * // => false + */ + function every(collection, predicate, guard) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + */ + function filter(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ + var find = createFind(findIndex); + + /** + * This method is like `_.find` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=collection.length-1] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(n) { + * return n % 2 == 1; + * }); + * // => 3 + */ + var findLast = createFind(findLastIndex); + + /** + * Creates a flattened array of values by running each element in `collection` + * thru `iteratee` and flattening the mapped results. The iteratee is invoked + * with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [n, n]; + * } + * + * _.flatMap([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ + function flatMap(collection, iteratee) { + return baseFlatten(map(collection, iteratee), 1); + } + + /** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDeep([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ + function flatMapDeep(collection, iteratee) { + return baseFlatten(map(collection, iteratee), INFINITY); + } + + /** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDepth([1, 2], duplicate, 2); + * // => [[1, 1], [2, 2]] + */ + function flatMapDepth(collection, iteratee, depth) { + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(map(collection, iteratee), depth); + } + + /** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forEach(collection, iteratee) { + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.forEach` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @alias eachRight + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEach + * @example + * + * _.forEachRight([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `2` then `1`. + */ + function forEachRight(collection, iteratee) { + var func = isArray(collection) ? arrayEachRight : baseEachRight; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The order of grouped values + * is determined by the order they occur in `collection`. The corresponding + * value of each key is an array of elements responsible for generating the + * key. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': [4.2], '6': [6.1, 6.3] } + * + * // The `_.property` iteratee shorthand. + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ + var groupBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + result[key].push(value); + } else { + baseAssignValue(result, key, [value]); + } + }); + + /** + * Checks if `value` is in `collection`. If `collection` is a string, it's + * checked for a substring of `value`, otherwise + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * is used for equality comparisons. If `fromIndex` is negative, it's used as + * the offset from the end of `collection`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {boolean} Returns `true` if `value` is found, else `false`. + * @example + * + * _.includes([1, 2, 3], 1); + * // => true + * + * _.includes([1, 2, 3], 1, 2); + * // => false + * + * _.includes({ 'a': 1, 'b': 2 }, 1); + * // => true + * + * _.includes('abcd', 'bc'); + * // => true + */ + function includes(collection, value, fromIndex, guard) { + collection = isArrayLike(collection) ? collection : values(collection); + fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; + + var length = collection.length; + if (fromIndex < 0) { + fromIndex = nativeMax(length + fromIndex, 0); + } + return isString(collection) + ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) + : (!!length && baseIndexOf(collection, value, fromIndex) > -1); + } + + /** + * Invokes the method at `path` of each element in `collection`, returning + * an array of the results of each invoked method. Any additional arguments + * are provided to each invoked method. If `path` is a function, it's invoked + * for, and `this` bound to, each element in `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array|Function|string} path The path of the method to invoke or + * the function invoked per iteration. + * @param {...*} [args] The arguments to invoke each method with. + * @returns {Array} Returns the array of results. + * @example + * + * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invokeMap([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ + var invokeMap = baseRest(function(collection, path, args) { + var index = -1, + isFunc = typeof path == 'function', + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value) { + result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); + }); + return result; + }); + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the last element responsible for generating the key. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var array = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.keyBy(array, function(o) { + * return String.fromCharCode(o.code); + * }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.keyBy(array, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + */ + var keyBy = createAggregator(function(result, value, key) { + baseAssignValue(result, key, value); + }); + + /** + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ + function map(collection, iteratee) { + var func = isArray(collection) ? arrayMap : baseMap; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.sortBy` except that it allows specifying the sort + * orders of the iteratees to sort by. If `orders` is unspecified, all values + * are sorted in ascending order. Otherwise, specify an order of "desc" for + * descending or "asc" for ascending sort order of corresponding values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]] + * The iteratees to sort by. + * @param {string[]} [orders] The sort orders of `iteratees`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 34 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 36 } + * ]; + * + * // Sort by `user` in ascending order and by `age` in descending order. + * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + */ + function orderBy(collection, iteratees, orders, guard) { + if (collection == null) { + return []; + } + if (!isArray(iteratees)) { + iteratees = iteratees == null ? [] : [iteratees]; + } + orders = guard ? undefined : orders; + if (!isArray(orders)) { + orders = orders == null ? [] : [orders]; + } + return baseOrderBy(collection, iteratees, orders); + } + + /** + * Creates an array of elements split into two groups, the first of which + * contains elements `predicate` returns truthy for, the second of which + * contains elements `predicate` returns falsey for. The predicate is + * invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the array of grouped elements. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true }, + * { 'user': 'pebbles', 'age': 1, 'active': false } + * ]; + * + * _.partition(users, function(o) { return o.active; }); + * // => objects for [['fred'], ['barney', 'pebbles']] + * + * // The `_.matches` iteratee shorthand. + * _.partition(users, { 'age': 1, 'active': false }); + * // => objects for [['pebbles'], ['barney', 'fred']] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.partition(users, ['active', false]); + * // => objects for [['barney', 'pebbles'], ['fred']] + * + * // The `_.property` iteratee shorthand. + * _.partition(users, 'active'); + * // => objects for [['fred'], ['barney', 'pebbles']] + */ + var partition = createAggregator(function(result, value, key) { + result[key ? 0 : 1].push(value); + }, function() { return [[], []]; }); + + /** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` thru `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not given, the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduceRight + * @example + * + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) + */ + function reduce(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduce : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach); + } + + /** + * This method is like `_.reduce` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduce + * @example + * + * var array = [[0, 1], [2, 3], [4, 5]]; + * + * _.reduceRight(array, function(flattened, other) { + * return flattened.concat(other); + * }, []); + * // => [4, 5, 2, 3, 0, 1] + */ + function reduceRight(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduceRight : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight); + } + + /** + * The opposite of `_.filter`; this method returns the elements of `collection` + * that `predicate` does **not** return truthy for. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.filter + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true } + * ]; + * + * _.reject(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.reject(users, { 'age': 40, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.reject(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.reject(users, 'active'); + * // => objects for ['barney'] + */ + function reject(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, negate(getIteratee(predicate, 3))); + } + + /** + * Gets a random element from `collection`. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + * @example + * + * _.sample([1, 2, 3, 4]); + * // => 2 + */ + function sample(collection) { + var func = isArray(collection) ? arraySample : baseSample; + return func(collection); + } + + /** + * Gets `n` random elements at unique keys from `collection` up to the + * size of `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @param {number} [n=1] The number of elements to sample. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the random elements. + * @example + * + * _.sampleSize([1, 2, 3], 2); + * // => [3, 1] + * + * _.sampleSize([1, 2, 3], 4); + * // => [2, 3, 1] + */ + function sampleSize(collection, n, guard) { + if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) { + n = 1; + } else { + n = toInteger(n); + } + var func = isArray(collection) ? arraySampleSize : baseSampleSize; + return func(collection, n); + } + + /** + * Creates an array of shuffled values, using a version of the + * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + * @example + * + * _.shuffle([1, 2, 3, 4]); + * // => [4, 1, 3, 2] + */ + function shuffle(collection) { + var func = isArray(collection) ? arrayShuffle : baseShuffle; + return func(collection); + } + + /** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable string keyed properties for objects. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the collection size. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ + function size(collection) { + if (collection == null) { + return 0; + } + if (isArrayLike(collection)) { + return isString(collection) ? stringSize(collection) : collection.length; + } + var tag = getTag(collection); + if (tag == mapTag || tag == setTag) { + return collection.size; + } + return baseKeys(collection).length; + } + + /** + * Checks if `predicate` returns truthy for **any** element of `collection`. + * Iteration is stopped once `predicate` returns truthy. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.some(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.some(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.some(users, 'active'); + * // => true + */ + function some(collection, predicate, guard) { + var func = isArray(collection) ? arraySome : baseSome; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection thru each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] + */ + var sortBy = baseRest(function(collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { + iteratees = [iteratees[0]]; + } + return baseOrderBy(collection, baseFlatten(iteratees, 1), []); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ + var now = ctxNow || function() { + return root.Date.now(); + }; + + /*------------------------------------------------------------------------*/ + + /** + * The opposite of `_.before`; this method creates a function that invokes + * `func` once it's called `n` or more times. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {number} n The number of calls before `func` is invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => Logs 'done saving!' after the two async saves have completed. + */ + function after(n, func) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; + } + + /** + * Creates a function that invokes `func`, with up to `n` arguments, + * ignoring any additional arguments. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @param {number} [n=func.length] The arity cap. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.ary(parseInt, 1)); + * // => [6, 8, 10] + */ + function ary(func, n, guard) { + n = guard ? undefined : n; + n = (func && n == null) ? func.length : n; + return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); + } + + /** + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it's called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery(element).on('click', _.before(5, addContactToList)); + * // => Allows adding up to 4 contacts to the list. + */ + function before(n, func) { + var result; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; + } + + /** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and `partials` prepended to the arguments it receives. + * + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * function greet(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // Bound with placeholders. + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ + var bind = baseRest(function(func, thisArg, partials) { + var bitmask = WRAP_BIND_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bind)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(func, bitmask, thisArg, partials, holders); + }); + + /** + * Creates a function that invokes the method at `object[key]` with `partials` + * prepended to the arguments it receives. + * + * This method differs from `_.bind` by allowing bound functions to reference + * methods that may be redefined or don't yet exist. See + * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) + * for more details. + * + * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Function + * @param {Object} object The object to invoke the method on. + * @param {string} key The key of the method. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'user': 'fred', + * 'greet': function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * }; + * + * var bound = _.bindKey(object, 'greet', 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * object.greet = function(greeting, punctuation) { + * return greeting + 'ya ' + this.user + punctuation; + * }; + * + * bound('!'); + * // => 'hiya fred!' + * + * // Bound with placeholders. + * var bound = _.bindKey(object, 'greet', _, '!'); + * bound('hi'); + * // => 'hiya fred!' + */ + var bindKey = baseRest(function(object, key, partials) { + var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bindKey)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(key, bitmask, object, partials, holders); + }); + + /** + * Creates a function that accepts arguments of `func` and either invokes + * `func` returning its result, if at least `arity` number of arguments have + * been provided, or returns a function that accepts the remaining `func` + * arguments, and so on. The arity of `func` may be specified if `func.length` + * is not sufficient. + * + * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curry(abc); + * + * curried(1)(2)(3); + * // => [1, 2, 3] + * + * curried(1, 2)(3); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(1)(_, 3)(2); + * // => [1, 2, 3] + */ + function curry(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curry.placeholder; + return result; + } + + /** + * This method is like `_.curry` except that arguments are applied to `func` + * in the manner of `_.partialRight` instead of `_.partial`. + * + * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curryRight(abc); + * + * curried(3)(2)(1); + * // => [1, 2, 3] + * + * curried(2, 3)(1); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(3)(1, _)(2); + * // => [1, 2, 3] + */ + function curryRight(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curryRight.placeholder; + return result; + } + + /** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ + function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + result = wait - timeSinceLastCall; + + return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; + } + + /** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // => Logs 'deferred' after one millisecond. + */ + var defer = baseRest(function(func, args) { + return baseDelay(func, 1, args); + }); + + /** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => Logs 'later' after one second. + */ + var delay = baseRest(function(func, wait, args) { + return baseDelay(func, toNumber(wait) || 0, args); + }); + + /** + * Creates a function that invokes `func` with arguments reversed. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to flip arguments for. + * @returns {Function} Returns the new flipped function. + * @example + * + * var flipped = _.flip(function() { + * return _.toArray(arguments); + * }); + * + * flipped('a', 'b', 'c', 'd'); + * // => ['d', 'c', 'b', 'a'] + */ + function flip(func) { + return createWrap(func, WRAP_FLIP_FLAG); + } + + /** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `clear`, `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ + function memoize(func, resolver) { + if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || MapCache); + return memoized; + } + + // Expose `MapCache`. + memoize.Cache = MapCache; + + /** + * Creates a function that negates the result of the predicate `func`. The + * `func` predicate is invoked with the `this` binding and arguments of the + * created function. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} predicate The predicate to negate. + * @returns {Function} Returns the new negated function. + * @example + * + * function isEven(n) { + * return n % 2 == 0; + * } + * + * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); + * // => [1, 3, 5] + */ + function negate(predicate) { + if (typeof predicate != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function() { + var args = arguments; + switch (args.length) { + case 0: return !predicate.call(this); + case 1: return !predicate.call(this, args[0]); + case 2: return !predicate.call(this, args[0], args[1]); + case 3: return !predicate.call(this, args[0], args[1], args[2]); + } + return !predicate.apply(this, args); + }; + } + + /** + * Creates a function that is restricted to invoking `func` once. Repeat calls + * to the function return the value of the first invocation. The `func` is + * invoked with the `this` binding and arguments of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // => `createApplication` is invoked once + */ + function once(func) { + return before(2, func); + } + + /** + * Creates a function that invokes `func` with its arguments transformed. + * + * @static + * @since 4.0.0 + * @memberOf _ + * @category Function + * @param {Function} func The function to wrap. + * @param {...(Function|Function[])} [transforms=[_.identity]] + * The argument transforms. + * @returns {Function} Returns the new function. + * @example + * + * function doubled(n) { + * return n * 2; + * } + * + * function square(n) { + * return n * n; + * } + * + * var func = _.overArgs(function(x, y) { + * return [x, y]; + * }, [square, doubled]); + * + * func(9, 3); + * // => [81, 6] + * + * func(10, 5); + * // => [100, 10] + */ + var overArgs = castRest(function(func, transforms) { + transforms = (transforms.length == 1 && isArray(transforms[0])) + ? arrayMap(transforms[0], baseUnary(getIteratee())) + : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee())); + + var funcsLength = transforms.length; + return baseRest(function(args) { + var index = -1, + length = nativeMin(args.length, funcsLength); + + while (++index < length) { + args[index] = transforms[index].call(this, args[index]); + } + return apply(func, this, args); + }); + }); + + /** + * Creates a function that invokes `func` with `partials` prepended to the + * arguments it receives. This method is like `_.bind` except it does **not** + * alter the `this` binding. + * + * The `_.partial.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 0.2.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var sayHelloTo = _.partial(greet, 'hello'); + * sayHelloTo('fred'); + * // => 'hello fred' + * + * // Partially applied with placeholders. + * var greetFred = _.partial(greet, _, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + */ + var partial = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partial)); + return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders); + }); + + /** + * This method is like `_.partial` except that partially applied arguments + * are appended to the arguments it receives. + * + * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var greetFred = _.partialRight(greet, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + * + * // Partially applied with placeholders. + * var sayHelloTo = _.partialRight(greet, 'hello', _); + * sayHelloTo('fred'); + * // => 'hello fred' + */ + var partialRight = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partialRight)); + return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders); + }); + + /** + * Creates a function that invokes `func` with arguments arranged according + * to the specified `indexes` where the argument value at the first index is + * provided as the first argument, the argument value at the second index is + * provided as the second argument, and so on. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to rearrange arguments for. + * @param {...(number|number[])} indexes The arranged argument indexes. + * @returns {Function} Returns the new function. + * @example + * + * var rearged = _.rearg(function(a, b, c) { + * return [a, b, c]; + * }, [2, 0, 1]); + * + * rearged('b', 'c', 'a') + * // => ['a', 'b', 'c'] + */ + var rearg = flatRest(function(func, indexes) { + return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes); + }); + + /** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as + * an array. + * + * **Note:** This method is based on the + * [rest parameter](https://mdn.io/rest_parameters). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.rest(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ + function rest(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start === undefined ? start : toInteger(start); + return baseRest(func, start); + } + + /** + * Creates a function that invokes `func` with the `this` binding of the + * create function and an array of arguments much like + * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply). + * + * **Note:** This method is based on the + * [spread operator](https://mdn.io/spread_operator). + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Function + * @param {Function} func The function to spread arguments over. + * @param {number} [start=0] The start position of the spread. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.spread(function(who, what) { + * return who + ' says ' + what; + * }); + * + * say(['fred', 'hello']); + * // => 'fred says hello' + * + * var numbers = Promise.all([ + * Promise.resolve(40), + * Promise.resolve(36) + * ]); + * + * numbers.then(_.spread(function(x, y) { + * return x + y; + * })); + * // => a Promise of 76 + */ + function spread(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start == null ? 0 : nativeMax(toInteger(start), 0); + return baseRest(function(args) { + var array = args[start], + otherArgs = castSlice(args, 0, start); + + if (array) { + arrayPush(otherArgs, array); + } + return apply(func, this, otherArgs); + }); + } + + /** + * Creates a throttled function that only invokes `func` at most once per + * every `wait` milliseconds. The throttled function comes with a `cancel` + * method to cancel delayed `func` invocations and a `flush` method to + * immediately invoke them. Provide `options` to indicate whether `func` + * should be invoked on the leading and/or trailing edge of the `wait` + * timeout. The `func` is invoked with the last arguments provided to the + * throttled function. Subsequent calls to the throttled function return the + * result of the last `func` invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the throttled function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.throttle` and `_.debounce`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to throttle. + * @param {number} [wait=0] The number of milliseconds to throttle invocations to. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=true] + * Specify invoking on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // Avoid excessively updating the position while scrolling. + * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); + * + * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. + * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); + * jQuery(element).on('click', throttled); + * + * // Cancel the trailing throttled invocation. + * jQuery(window).on('popstate', throttled.cancel); + */ + function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (isObject(options)) { + leading = 'leading' in options ? !!options.leading : leading; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + return debounce(func, wait, { + 'leading': leading, + 'maxWait': wait, + 'trailing': trailing + }); + } + + /** + * Creates a function that accepts up to one argument, ignoring any + * additional arguments. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.unary(parseInt)); + * // => [6, 8, 10] + */ + function unary(func) { + return ary(func, 1); + } + + /** + * Creates a function that provides `value` to `wrapper` as its first + * argument. Any additional arguments provided to the function are appended + * to those provided to the `wrapper`. The wrapper is invoked with the `this` + * binding of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {*} value The value to wrap. + * @param {Function} [wrapper=identity] The wrapper function. + * @returns {Function} Returns the new function. + * @example + * + * var p = _.wrap(_.escape, function(func, text) { + * return '

    ' + func(text) + '

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

    fred, barney, & pebbles

    ' + */ + function wrap(value, wrapper) { + return partial(castFunction(wrapper), value); + } + + /*------------------------------------------------------------------------*/ + + /** + * Casts `value` as an array if it's not one. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Lang + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast array. + * @example + * + * _.castArray(1); + * // => [1] + * + * _.castArray({ 'a': 1 }); + * // => [{ 'a': 1 }] + * + * _.castArray('abc'); + * // => ['abc'] + * + * _.castArray(null); + * // => [null] + * + * _.castArray(undefined); + * // => [undefined] + * + * _.castArray(); + * // => [] + * + * var array = [1, 2, 3]; + * console.log(_.castArray(array) === array); + * // => true + */ + function castArray() { + if (!arguments.length) { + return []; + } + var value = arguments[0]; + return isArray(value) ? value : [value]; + } + + /** + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true + */ + function clone(value) { + return baseClone(value, CLONE_SYMBOLS_FLAG); + } + + /** + * This method is like `_.clone` except that it accepts `customizer` which + * is invoked to produce the cloned value. If `customizer` returns `undefined`, + * cloning is handled by the method instead. The `customizer` is invoked with + * up to four arguments; (value [, index|key, object, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the cloned value. + * @see _.cloneDeepWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(false); + * } + * } + * + * var el = _.cloneWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 0 + */ + function cloneWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); + } + + /** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ + function cloneDeep(value) { + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); + } + + /** + * This method is like `_.cloneWith` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the deep cloned value. + * @see _.cloneWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(true); + * } + * } + * + * var el = _.cloneDeepWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 20 + */ + function cloneDeepWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); + } + + /** + * Checks if `object` conforms to `source` by invoking the predicate + * properties of `source` with the corresponding property values of `object`. + * + * **Note:** This method is equivalent to `_.conforms` when `source` is + * partially applied. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); + * // => true + * + * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); + * // => false + */ + function conformsTo(object, source) { + return source == null || baseConformsTo(object, source, keys(source)); + } + + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + function eq(value, other) { + return value === other || (value !== value && other !== other); + } + + /** + * Checks if `value` is greater than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + * @see _.lt + * @example + * + * _.gt(3, 1); + * // => true + * + * _.gt(3, 3); + * // => false + * + * _.gt(1, 3); + * // => false + */ + var gt = createRelationalOperation(baseGt); + + /** + * Checks if `value` is greater than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than or equal to + * `other`, else `false`. + * @see _.lte + * @example + * + * _.gte(3, 1); + * // => true + * + * _.gte(3, 3); + * // => true + * + * _.gte(1, 3); + * // => false + */ + var gte = createRelationalOperation(function(value, other) { + return value >= other; + }); + + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); + }; + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + var isArray = Array.isArray; + + /** + * Checks if `value` is classified as an `ArrayBuffer` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + * @example + * + * _.isArrayBuffer(new ArrayBuffer(2)); + * // => true + * + * _.isArrayBuffer(new Array(2)); + * // => false + */ + var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; + + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + + /** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + + /** + * Checks if `value` is classified as a boolean primitive or object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. + * @example + * + * _.isBoolean(false); + * // => true + * + * _.isBoolean(null); + * // => false + */ + function isBoolean(value) { + return value === true || value === false || + (isObjectLike(value) && baseGetTag(value) == boolTag); + } + + /** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ + var isBuffer = nativeIsBuffer || stubFalse; + + /** + * Checks if `value` is classified as a `Date` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + * + * _.isDate('Mon April 23 2012'); + * // => false + */ + var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; + + /** + * Checks if `value` is likely a DOM element. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. + * @example + * + * _.isElement(document.body); + * // => true + * + * _.isElement(''); + * // => false + */ + function isElement(value) { + return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); + } + + /** + * Checks if `value` is an empty object, collection, map, or set. + * + * Objects are considered empty if they have no own enumerable string keyed + * properties. + * + * Array-like values such as `arguments` objects, arrays, buffers, strings, or + * jQuery-like collections are considered empty if they have a `length` of `0`. + * Similarly, maps and sets are considered empty if they have a `size` of `0`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ + function isEmpty(value) { + if (value == null) { + return true; + } + if (isArrayLike(value) && + (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || + isBuffer(value) || isTypedArray(value) || isArguments(value))) { + return !value.length; + } + var tag = getTag(value); + if (tag == mapTag || tag == setTag) { + return !value.size; + } + if (isPrototype(value)) { + return !baseKeys(value).length; + } + for (var key in value) { + if (hasOwnProperty.call(value, key)) { + return false; + } + } + return true; + } + + /** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are compared by strict equality, i.e. `===`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ + function isEqual(value, other) { + return baseIsEqual(value, other); + } + + /** + * This method is like `_.isEqual` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with up to + * six arguments: (objValue, othValue [, index|key, object, other, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, othValue) { + * if (isGreeting(objValue) && isGreeting(othValue)) { + * return true; + * } + * } + * + * var array = ['hello', 'goodbye']; + * var other = ['hi', 'goodbye']; + * + * _.isEqualWith(array, other, customizer); + * // => true + */ + function isEqualWith(value, other, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + var result = customizer ? customizer(value, other) : undefined; + return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; + } + + /** + * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, + * `SyntaxError`, `TypeError`, or `URIError` object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an error object, else `false`. + * @example + * + * _.isError(new Error); + * // => true + * + * _.isError(Error); + * // => false + */ + function isError(value) { + if (!isObjectLike(value)) { + return false; + } + var tag = baseGetTag(value); + return tag == errorTag || tag == domExcTag || + (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)); + } + + /** + * Checks if `value` is a finite primitive number. + * + * **Note:** This method is based on + * [`Number.isFinite`](https://mdn.io/Number/isFinite). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. + * @example + * + * _.isFinite(3); + * // => true + * + * _.isFinite(Number.MIN_VALUE); + * // => true + * + * _.isFinite(Infinity); + * // => false + * + * _.isFinite('3'); + * // => false + */ + function isFinite(value) { + return typeof value == 'number' && nativeIsFinite(value); + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + + /** + * Checks if `value` is an integer. + * + * **Note:** This method is based on + * [`Number.isInteger`](https://mdn.io/Number/isInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an integer, else `false`. + * @example + * + * _.isInteger(3); + * // => true + * + * _.isInteger(Number.MIN_VALUE); + * // => false + * + * _.isInteger(Infinity); + * // => false + * + * _.isInteger('3'); + * // => false + */ + function isInteger(value) { + return typeof value == 'number' && value == toInteger(value); + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + + /** + * Checks if `value` is classified as a `Map` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @example + * + * _.isMap(new Map); + * // => true + * + * _.isMap(new WeakMap); + * // => false + */ + var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; + + /** + * Performs a partial deep comparison between `object` and `source` to + * determine if `object` contains equivalent property values. + * + * **Note:** This method is equivalent to `_.matches` when `source` is + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.isMatch(object, { 'b': 2 }); + * // => true + * + * _.isMatch(object, { 'b': 1 }); + * // => false + */ + function isMatch(object, source) { + return object === source || baseIsMatch(object, source, getMatchData(source)); + } + + /** + * This method is like `_.isMatch` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with five + * arguments: (objValue, srcValue, index|key, object, source). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, srcValue) { + * if (isGreeting(objValue) && isGreeting(srcValue)) { + * return true; + * } + * } + * + * var object = { 'greeting': 'hello' }; + * var source = { 'greeting': 'hi' }; + * + * _.isMatchWith(object, source, customizer); + * // => true + */ + function isMatchWith(object, source, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseIsMatch(object, source, getMatchData(source), customizer); + } + + /** + * Checks if `value` is `NaN`. + * + * **Note:** This method is based on + * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as + * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for + * `undefined` and other non-number values. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ + function isNaN(value) { + // An `NaN` primitive is the only value that is not equal to itself. + // Perform the `toStringTag` check first to avoid errors with some + // ActiveX objects in IE. + return isNumber(value) && value != +value; + } + + /** + * Checks if `value` is a pristine native function. + * + * **Note:** This method can't reliably detect native functions in the presence + * of the core-js package because core-js circumvents this kind of detection. + * Despite multiple requests, the core-js maintainer has made it clear: any + * attempt to fix the detection will be obstructed. As a result, we're left + * with little choice but to throw an error. Unfortunately, this also affects + * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), + * which rely on core-js. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ + function isNative(value) { + if (isMaskable(value)) { + throw new Error(CORE_ERROR_TEXT); + } + return baseIsNative(value); + } + + /** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(void 0); + * // => false + */ + function isNull(value) { + return value === null; + } + + /** + * Checks if `value` is `null` or `undefined`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is nullish, else `false`. + * @example + * + * _.isNil(null); + * // => true + * + * _.isNil(void 0); + * // => true + * + * _.isNil(NaN); + * // => false + */ + function isNil(value) { + return value == null; + } + + /** + * Checks if `value` is classified as a `Number` primitive or object. + * + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are + * classified as numbers, use the `_.isFinite` method. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. + * @example + * + * _.isNumber(3); + * // => true + * + * _.isNumber(Number.MIN_VALUE); + * // => true + * + * _.isNumber(Infinity); + * // => true + * + * _.isNumber('3'); + * // => false + */ + function isNumber(value) { + return typeof value == 'number' || + (isObjectLike(value) && baseGetTag(value) == numberTag); + } + + /** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ + function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; + } + + /** + * Checks if `value` is classified as a `RegExp` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + * @example + * + * _.isRegExp(/abc/); + * // => true + * + * _.isRegExp('/abc/'); + * // => false + */ + var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; + + /** + * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 + * double precision number which isn't the result of a rounded unsafe integer. + * + * **Note:** This method is based on + * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. + * @example + * + * _.isSafeInteger(3); + * // => true + * + * _.isSafeInteger(Number.MIN_VALUE); + * // => false + * + * _.isSafeInteger(Infinity); + * // => false + * + * _.isSafeInteger('3'); + * // => false + */ + function isSafeInteger(value) { + return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is classified as a `Set` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @example + * + * _.isSet(new Set); + * // => true + * + * _.isSet(new WeakSet); + * // => false + */ + var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; + + /** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ + function isString(value) { + return typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); + } + + /** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ + function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && baseGetTag(value) == symbolTag); + } + + /** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + + /** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ + function isUndefined(value) { + return value === undefined; + } + + /** + * Checks if `value` is classified as a `WeakMap` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. + * @example + * + * _.isWeakMap(new WeakMap); + * // => true + * + * _.isWeakMap(new Map); + * // => false + */ + function isWeakMap(value) { + return isObjectLike(value) && getTag(value) == weakMapTag; + } + + /** + * Checks if `value` is classified as a `WeakSet` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. + * @example + * + * _.isWeakSet(new WeakSet); + * // => true + * + * _.isWeakSet(new Set); + * // => false + */ + function isWeakSet(value) { + return isObjectLike(value) && baseGetTag(value) == weakSetTag; + } + + /** + * Checks if `value` is less than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + * @see _.gt + * @example + * + * _.lt(1, 3); + * // => true + * + * _.lt(3, 3); + * // => false + * + * _.lt(3, 1); + * // => false + */ + var lt = createRelationalOperation(baseLt); + + /** + * Checks if `value` is less than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than or equal to + * `other`, else `false`. + * @see _.gte + * @example + * + * _.lte(1, 3); + * // => true + * + * _.lte(3, 3); + * // => true + * + * _.lte(3, 1); + * // => false + */ + var lte = createRelationalOperation(function(value, other) { + return value <= other; + }); + + /** + * Converts `value` to an array. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {Array} Returns the converted array. + * @example + * + * _.toArray({ 'a': 1, 'b': 2 }); + * // => [1, 2] + * + * _.toArray('abc'); + * // => ['a', 'b', 'c'] + * + * _.toArray(1); + * // => [] + * + * _.toArray(null); + * // => [] + */ + function toArray(value) { + if (!value) { + return []; + } + if (isArrayLike(value)) { + return isString(value) ? stringToArray(value) : copyArray(value); + } + if (symIterator && value[symIterator]) { + return iteratorToArray(value[symIterator]()); + } + var tag = getTag(value), + func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values); + + return func(value); + } + + /** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted number. + * @example + * + * _.toFinite(3.2); + * // => 3.2 + * + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toFinite(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toFinite('3.2'); + * // => 3.2 + */ + function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = (value < 0 ? -1 : 1); + return sign * MAX_INTEGER; + } + return value === value ? value : 0; + } + + /** + * Converts `value` to an integer. + * + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ + function toInteger(value) { + var result = toFinite(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; + } + + /** + * Converts `value` to an integer suitable for use as the length of an + * array-like object. + * + * **Note:** This method is based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toLength(3.2); + * // => 3 + * + * _.toLength(Number.MIN_VALUE); + * // => 0 + * + * _.toLength(Infinity); + * // => 4294967295 + * + * _.toLength('3.2'); + * // => 3 + */ + function toLength(value) { + return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0; + } + + /** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ + function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ''); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); + } + + /** + * Converts `value` to a plain object flattening inherited enumerable string + * keyed properties of `value` to own properties of the plain object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ + function toPlainObject(value) { + return copyObject(value, keysIn(value)); + } + + /** + * Converts `value` to a safe integer. A safe integer can be compared and + * represented correctly. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toSafeInteger(3.2); + * // => 3 + * + * _.toSafeInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toSafeInteger(Infinity); + * // => 9007199254740991 + * + * _.toSafeInteger('3.2'); + * // => 3 + */ + function toSafeInteger(value) { + return value + ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) + : (value === 0 ? value : 0); + } + + /** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ + function toString(value) { + return value == null ? '' : baseToString(value); + } + + /*------------------------------------------------------------------------*/ + + /** + * Assigns own enumerable string keyed properties of source objects to the + * destination object. Source objects are applied from left to right. + * Subsequent sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assignIn + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } + */ + var assign = createAssigner(function(object, source) { + if (isPrototype(source) || isArrayLike(source)) { + copyObject(source, keys(source), object); + return; + } + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + assignValue(object, key, source[key]); + } + } + }); + + /** + * This method is like `_.assign` except that it iterates over own and + * inherited source properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assign + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } + */ + var assignIn = createAssigner(function(object, source) { + copyObject(source, keysIn(source), object); + }); + + /** + * This method is like `_.assignIn` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extendWith + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignInWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keysIn(source), object, customizer); + }); + + /** + * This method is like `_.assign` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignInWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var assignWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keys(source), object, customizer); + }); + + /** + * Creates an array of values corresponding to `paths` of `object`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Array} Returns the picked values. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _.at(object, ['a[0].b.c', 'a[1]']); + * // => [3, 4] + */ + var at = flatRest(baseAt); + + /** + * Creates an object that inherits from the `prototype` object. If a + * `properties` object is given, its own enumerable string keyed properties + * are assigned to the created object. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ + function create(prototype, properties) { + var result = baseCreate(prototype); + return properties == null ? result : baseAssign(result, properties); + } + + /** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var defaults = baseRest(function(args) { + args.push(undefined, customDefaultsAssignIn); + return apply(assignInWith, undefined, args); + }); + + /** + * This method is like `_.defaults` except that it recursively assigns + * default properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaults + * @example + * + * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); + * // => { 'a': { 'b': 2, 'c': 3 } } + */ + var defaultsDeep = baseRest(function(args) { + args.push(undefined, customDefaultsMerge); + return apply(mergeWith, undefined, args); + }); + + /** + * This method is like `_.find` except that it returns the key of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findKey(users, function(o) { return o.age < 40; }); + * // => 'barney' (iteration order is not guaranteed) + * + * // The `_.matches` iteratee shorthand. + * _.findKey(users, { 'age': 1, 'active': true }); + * // => 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findKey(users, 'active'); + * // => 'barney' + */ + function findKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwn); + } + + /** + * This method is like `_.findKey` except that it iterates over elements of + * a collection in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findLastKey(users, function(o) { return o.age < 40; }); + * // => returns 'pebbles' assuming `_.findKey` returns 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.findLastKey(users, { 'age': 36, 'active': true }); + * // => 'barney' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findLastKey(users, 'active'); + * // => 'pebbles' + */ + function findLastKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight); + } + + /** + * Iterates over own and inherited enumerable string keyed properties of an + * object and invokes `iteratee` for each property. The iteratee is invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forInRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). + */ + function forIn(object, iteratee) { + return object == null + ? object + : baseFor(object, getIteratee(iteratee, 3), keysIn); + } + + /** + * This method is like `_.forIn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forIn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forInRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'. + */ + function forInRight(object, iteratee) { + return object == null + ? object + : baseForRight(object, getIteratee(iteratee, 3), keysIn); + } + + /** + * Iterates over own enumerable string keyed properties of an object and + * invokes `iteratee` for each property. The iteratee is invoked with three + * arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwnRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forOwn(object, iteratee) { + return object && baseForOwn(object, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.forOwn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwnRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. + */ + function forOwnRight(object, iteratee) { + return object && baseForOwnRight(object, getIteratee(iteratee, 3)); + } + + /** + * Creates an array of function property names from own enumerable properties + * of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functionsIn + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functions(new Foo); + * // => ['a', 'b'] + */ + function functions(object) { + return object == null ? [] : baseFunctions(object, keys(object)); + } + + /** + * Creates an array of function property names from own and inherited + * enumerable properties of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functions + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functionsIn(new Foo); + * // => ['a', 'b', 'c'] + */ + function functionsIn(object) { + return object == null ? [] : baseFunctions(object, keysIn(object)); + } + + /** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ + function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, path); + return result === undefined ? defaultValue : result; + } + + /** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ + function has(object, path) { + return object != null && hasPath(object, path, baseHas); + } + + /** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ + function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); + } + + /** + * Creates an object composed of the inverted keys and values of `object`. + * If `object` contains duplicate values, subsequent values overwrite + * property assignments of previous values. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Object + * @param {Object} object The object to invert. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invert(object); + * // => { '1': 'c', '2': 'b' } + */ + var invert = createInverter(function(result, value, key) { + result[value] = key; + }, constant(identity)); + + /** + * This method is like `_.invert` except that the inverted object is generated + * from the results of running each element of `object` thru `iteratee`. The + * corresponding inverted value of each inverted key is an array of keys + * responsible for generating the inverted value. The iteratee is invoked + * with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Object + * @param {Object} object The object to invert. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invertBy(object); + * // => { '1': ['a', 'c'], '2': ['b'] } + * + * _.invertBy(object, function(value) { + * return 'group' + value; + * }); + * // => { 'group1': ['a', 'c'], 'group2': ['b'] } + */ + var invertBy = createInverter(function(result, value, key) { + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } + }, getIteratee); + + /** + * Invokes the method at `path` of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + * @example + * + * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }; + * + * _.invoke(object, 'a[0].b.c.slice', 1, 3); + * // => [2, 3] + */ + var invoke = baseRest(baseInvoke); + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); + } + + /** + * The opposite of `_.mapValues`; this method creates an object with the + * same values as `object` and keys generated by running each own enumerable + * string keyed property of `object` thru `iteratee`. The iteratee is invoked + * with three arguments: (value, key, object). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapValues + * @example + * + * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { + * return key + value; + * }); + * // => { 'a1': 1, 'b2': 2 } + */ + function mapKeys(object, iteratee) { + var result = {}; + iteratee = getIteratee(iteratee, 3); + + baseForOwn(object, function(value, key, object) { + baseAssignValue(result, iteratee(value, key, object), value); + }); + return result; + } + + /** + * Creates an object with the same keys as `object` and values generated + * by running each own enumerable string keyed property of `object` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, key, object). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapKeys + * @example + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * _.mapValues(users, function(o) { return o.age; }); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + * + * // The `_.property` iteratee shorthand. + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + */ + function mapValues(object, iteratee) { + var result = {}; + iteratee = getIteratee(iteratee, 3); + + baseForOwn(object, function(value, key, object) { + baseAssignValue(result, key, iteratee(value, key, object)); + }); + return result; + } + + /** + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable string keyed properties of source objects into the + * destination object. Source properties that resolve to `undefined` are + * skipped if a destination value exists. Array and plain object properties + * are merged recursively. Other objects and value types are overridden by + * assignment. Source objects are applied from left to right. Subsequent + * sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] + * }; + * + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] + * }; + * + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } + */ + var merge = createAssigner(function(object, source, srcIndex) { + baseMerge(object, source, srcIndex); + }); + + /** + * This method is like `_.merge` except that it accepts `customizer` which + * is invoked to produce the merged values of the destination and source + * properties. If `customizer` returns `undefined`, merging is handled by the + * method instead. The `customizer` is invoked with six arguments: + * (objValue, srcValue, key, object, source, stack). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} customizer The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * function customizer(objValue, srcValue) { + * if (_.isArray(objValue)) { + * return objValue.concat(srcValue); + * } + * } + * + * var object = { 'a': [1], 'b': [2] }; + * var other = { 'a': [3], 'b': [4] }; + * + * _.mergeWith(object, other, customizer); + * // => { 'a': [1, 3], 'b': [2, 4] } + */ + var mergeWith = createAssigner(function(object, source, srcIndex, customizer) { + baseMerge(object, source, srcIndex, customizer); + }); + + /** + * The opposite of `_.pick`; this method creates an object composed of the + * own and inherited enumerable property paths of `object` that are not omitted. + * + * **Note:** This method is considerably slower than `_.pick`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to omit. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omit(object, ['a', 'c']); + * // => { 'b': '2' } + */ + var omit = flatRest(function(object, paths) { + var result = {}; + if (object == null) { + return result; + } + var isDeep = false; + paths = arrayMap(paths, function(path) { + path = castPath(path, object); + isDeep || (isDeep = path.length > 1); + return path; + }); + copyObject(object, getAllKeysIn(object), result); + if (isDeep) { + result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone); + } + var length = paths.length; + while (length--) { + baseUnset(result, paths[length]); + } + return result; + }); + + /** + * The opposite of `_.pickBy`; this method creates an object composed of + * the own and inherited enumerable string keyed properties of `object` that + * `predicate` doesn't return truthy for. The predicate is invoked with two + * arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omitBy(object, _.isNumber); + * // => { 'b': '2' } + */ + function omitBy(object, predicate) { + return pickBy(object, negate(getIteratee(predicate))); + } + + /** + * Creates an object composed of the picked `object` properties. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ + var pick = flatRest(function(object, paths) { + return object == null ? {} : basePick(object, paths); + }); + + /** + * Creates an object composed of the `object` properties `predicate` returns + * truthy for. The predicate is invoked with two arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pickBy(object, _.isNumber); + * // => { 'a': 1, 'c': 3 } + */ + function pickBy(object, predicate) { + if (object == null) { + return {}; + } + var props = arrayMap(getAllKeysIn(object), function(prop) { + return [prop]; + }); + predicate = getIteratee(predicate); + return basePickBy(object, props, function(value, path) { + return predicate(value, path[0]); + }); + } + + /** + * This method is like `_.get` except that if the resolved value is a + * function it's invoked with the `this` binding of its parent object and + * its result is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to resolve. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; + * + * _.result(object, 'a[0].b.c1'); + * // => 3 + * + * _.result(object, 'a[0].b.c2'); + * // => 4 + * + * _.result(object, 'a[0].b.c3', 'default'); + * // => 'default' + * + * _.result(object, 'a[0].b.c3', _.constant('default')); + * // => 'default' + */ + function result(object, path, defaultValue) { + path = castPath(path, object); + + var index = -1, + length = path.length; + + // Ensure the loop is entered when path is empty. + if (!length) { + length = 1; + object = undefined; + } + while (++index < length) { + var value = object == null ? undefined : object[toKey(path[index])]; + if (value === undefined) { + index = length; + value = defaultValue; + } + object = isFunction(value) ? value.call(object) : value; + } + return object; + } + + /** + * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, + * it's created. Arrays are created for missing index properties while objects + * are created for all other missing properties. Use `_.setWith` to customize + * `path` creation. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.set(object, 'a[0].b.c', 4); + * console.log(object.a[0].b.c); + * // => 4 + * + * _.set(object, ['x', '0', 'y', 'z'], 5); + * console.log(object.x[0].y.z); + * // => 5 + */ + function set(object, path, value) { + return object == null ? object : baseSet(object, path, value); + } + + /** + * This method is like `_.set` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * var object = {}; + * + * _.setWith(object, '[0][1]', 'a', Object); + * // => { '0': { '1': 'a' } } + */ + function setWith(object, path, value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : baseSet(object, path, value, customizer); + } + + /** + * Creates an array of own enumerable string keyed-value pairs for `object` + * which can be consumed by `_.fromPairs`. If `object` is a map or set, its + * entries are returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias entries + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairs(new Foo); + * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed) + */ + var toPairs = createToPairs(keys); + + /** + * Creates an array of own and inherited enumerable string keyed-value pairs + * for `object` which can be consumed by `_.fromPairs`. If `object` is a map + * or set, its entries are returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias entriesIn + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairsIn(new Foo); + * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed) + */ + var toPairsIn = createToPairs(keysIn); + + /** + * An alternative to `_.reduce`; this method transforms `object` to a new + * `accumulator` object which is the result of running each of its own + * enumerable string keyed properties thru `iteratee`, with each invocation + * potentially mutating the `accumulator` object. If `accumulator` is not + * provided, a new object with the same `[[Prototype]]` will be used. The + * iteratee is invoked with four arguments: (accumulator, value, key, object). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The custom accumulator value. + * @returns {*} Returns the accumulated value. + * @example + * + * _.transform([2, 3, 4], function(result, n) { + * result.push(n *= n); + * return n % 2 == 0; + * }, []); + * // => [4, 9] + * + * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } + */ + function transform(object, iteratee, accumulator) { + var isArr = isArray(object), + isArrLike = isArr || isBuffer(object) || isTypedArray(object); + + iteratee = getIteratee(iteratee, 4); + if (accumulator == null) { + var Ctor = object && object.constructor; + if (isArrLike) { + accumulator = isArr ? new Ctor : []; + } + else if (isObject(object)) { + accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; + } + else { + accumulator = {}; + } + } + (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) { + return iteratee(accumulator, value, index, object); + }); + return accumulator; + } + + /** + * Removes the property at `path` of `object`. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 7 } }] }; + * _.unset(object, 'a[0].b.c'); + * // => true + * + * console.log(object); + * // => { 'a': [{ 'b': {} }] }; + * + * _.unset(object, ['a', '0', 'b', 'c']); + * // => true + * + * console.log(object); + * // => { 'a': [{ 'b': {} }] }; + */ + function unset(object, path) { + return object == null ? true : baseUnset(object, path); + } + + /** + * This method is like `_.set` except that accepts `updater` to produce the + * value to set. Use `_.updateWith` to customize `path` creation. The `updater` + * is invoked with one argument: (value). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.update(object, 'a[0].b.c', function(n) { return n * n; }); + * console.log(object.a[0].b.c); + * // => 9 + * + * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; }); + * console.log(object.x[0].y.z); + * // => 0 + */ + function update(object, path, updater) { + return object == null ? object : baseUpdate(object, path, castFunction(updater)); + } + + /** + * This method is like `_.update` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * var object = {}; + * + * _.updateWith(object, '[0][1]', _.constant('a'), Object); + * // => { '0': { '1': 'a' } } + */ + function updateWith(object, path, updater, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer); + } + + /** + * Creates an array of the own enumerable string keyed property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ + function values(object) { + return object == null ? [] : baseValues(object, keys(object)); + } + + /** + * Creates an array of the own and inherited enumerable string keyed property + * values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.valuesIn(new Foo); + * // => [1, 2, 3] (iteration order is not guaranteed) + */ + function valuesIn(object) { + return object == null ? [] : baseValues(object, keysIn(object)); + } + + /*------------------------------------------------------------------------*/ + + /** + * Clamps `number` within the inclusive `lower` and `upper` bounds. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Number + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + * @example + * + * _.clamp(-10, -5, 5); + * // => -5 + * + * _.clamp(10, -5, 5); + * // => 5 + */ + function clamp(number, lower, upper) { + if (upper === undefined) { + upper = lower; + lower = undefined; + } + if (upper !== undefined) { + upper = toNumber(upper); + upper = upper === upper ? upper : 0; + } + if (lower !== undefined) { + lower = toNumber(lower); + lower = lower === lower ? lower : 0; + } + return baseClamp(toNumber(number), lower, upper); + } + + /** + * Checks if `n` is between `start` and up to, but not including, `end`. If + * `end` is not specified, it's set to `start` with `start` then set to `0`. + * If `start` is greater than `end` the params are swapped to support + * negative ranges. + * + * @static + * @memberOf _ + * @since 3.3.0 + * @category Number + * @param {number} number The number to check. + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + * @see _.range, _.rangeRight + * @example + * + * _.inRange(3, 2, 4); + * // => true + * + * _.inRange(4, 8); + * // => true + * + * _.inRange(4, 2); + * // => false + * + * _.inRange(2, 2); + * // => false + * + * _.inRange(1.2, 2); + * // => true + * + * _.inRange(5.2, 4); + * // => false + * + * _.inRange(-3, -2, -6); + * // => true + */ + function inRange(number, start, end) { + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + number = toNumber(number); + return baseInRange(number, start, end); + } + + /** + * Produces a random number between the inclusive `lower` and `upper` bounds. + * If only one argument is provided a number between `0` and the given number + * is returned. If `floating` is `true`, or either `lower` or `upper` are + * floats, a floating-point number is returned instead of an integer. + * + * **Note:** JavaScript follows the IEEE-754 standard for resolving + * floating-point values which can produce unexpected results. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Number + * @param {number} [lower=0] The lower bound. + * @param {number} [upper=1] The upper bound. + * @param {boolean} [floating] Specify returning a floating-point number. + * @returns {number} Returns the random number. + * @example + * + * _.random(0, 5); + * // => an integer between 0 and 5 + * + * _.random(5); + * // => also an integer between 0 and 5 + * + * _.random(5, true); + * // => a floating-point number between 0 and 5 + * + * _.random(1.2, 5.2); + * // => a floating-point number between 1.2 and 5.2 + */ + function random(lower, upper, floating) { + if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) { + upper = floating = undefined; + } + if (floating === undefined) { + if (typeof upper == 'boolean') { + floating = upper; + upper = undefined; + } + else if (typeof lower == 'boolean') { + floating = lower; + lower = undefined; + } + } + if (lower === undefined && upper === undefined) { + lower = 0; + upper = 1; + } + else { + lower = toFinite(lower); + if (upper === undefined) { + upper = lower; + lower = 0; + } else { + upper = toFinite(upper); + } + } + if (lower > upper) { + var temp = lower; + lower = upper; + upper = temp; + } + if (floating || lower % 1 || upper % 1) { + var rand = nativeRandom(); + return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper); + } + return baseRandom(lower, upper); + } + + /*------------------------------------------------------------------------*/ + + /** + * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the camel cased string. + * @example + * + * _.camelCase('Foo Bar'); + * // => 'fooBar' + * + * _.camelCase('--foo-bar--'); + * // => 'fooBar' + * + * _.camelCase('__FOO_BAR__'); + * // => 'fooBar' + */ + var camelCase = createCompounder(function(result, word, index) { + word = word.toLowerCase(); + return result + (index ? capitalize(word) : word); + }); + + /** + * Converts the first character of `string` to upper case and the remaining + * to lower case. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to capitalize. + * @returns {string} Returns the capitalized string. + * @example + * + * _.capitalize('FRED'); + * // => 'Fred' + */ + function capitalize(string) { + return upperFirst(toString(string).toLowerCase()); + } + + /** + * Deburrs `string` by converting + * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) + * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) + * letters to basic Latin letters and removing + * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to deburr. + * @returns {string} Returns the deburred string. + * @example + * + * _.deburr('déjà vu'); + * // => 'deja vu' + */ + function deburr(string) { + string = toString(string); + return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); + } + + /** + * Checks if `string` ends with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=string.length] The position to search up to. + * @returns {boolean} Returns `true` if `string` ends with `target`, + * else `false`. + * @example + * + * _.endsWith('abc', 'c'); + * // => true + * + * _.endsWith('abc', 'b'); + * // => false + * + * _.endsWith('abc', 'b', 2); + * // => true + */ + function endsWith(string, target, position) { + string = toString(string); + target = baseToString(target); + + var length = string.length; + position = position === undefined + ? length + : baseClamp(toInteger(position), 0, length); + + var end = position; + position -= target.length; + return position >= 0 && string.slice(position, end) == target; + } + + /** + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. + * + * **Note:** No other characters are escaped. To escape additional + * characters use a third-party library like [_he_](https://mths.be/he). + * + * Though the ">" character is escaped for symmetry, characters like + * ">" and "/" don't need escaping in HTML and have no special meaning + * unless they're part of a tag or unquoted attribute value. See + * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) + * (under "semi-related fun fact") for more details. + * + * When working with HTML you should always + * [quote attribute values](http://wonko.com/post/html-escaping) to reduce + * XSS vectors. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ + function escape(string) { + string = toString(string); + return (string && reHasUnescapedHtml.test(string)) + ? string.replace(reUnescapedHtml, escapeHtmlChar) + : string; + } + + /** + * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", + * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escapeRegExp('[lodash](https://lodash.com/)'); + * // => '\[lodash\]\(https://lodash\.com/\)' + */ + function escapeRegExp(string) { + string = toString(string); + return (string && reHasRegExpChar.test(string)) + ? string.replace(reRegExpChar, '\\$&') + : string; + } + + /** + * Converts `string` to + * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the kebab cased string. + * @example + * + * _.kebabCase('Foo Bar'); + * // => 'foo-bar' + * + * _.kebabCase('fooBar'); + * // => 'foo-bar' + * + * _.kebabCase('__FOO_BAR__'); + * // => 'foo-bar' + */ + var kebabCase = createCompounder(function(result, word, index) { + return result + (index ? '-' : '') + word.toLowerCase(); + }); + + /** + * Converts `string`, as space separated words, to lower case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the lower cased string. + * @example + * + * _.lowerCase('--Foo-Bar--'); + * // => 'foo bar' + * + * _.lowerCase('fooBar'); + * // => 'foo bar' + * + * _.lowerCase('__FOO_BAR__'); + * // => 'foo bar' + */ + var lowerCase = createCompounder(function(result, word, index) { + return result + (index ? ' ' : '') + word.toLowerCase(); + }); + + /** + * Converts the first character of `string` to lower case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.lowerFirst('Fred'); + * // => 'fred' + * + * _.lowerFirst('FRED'); + * // => 'fRED' + */ + var lowerFirst = createCaseFirst('toLowerCase'); + + /** + * Pads `string` on the left and right sides if it's shorter than `length`. + * Padding characters are truncated if they can't be evenly divided by `length`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.pad('abc', 8); + * // => ' abc ' + * + * _.pad('abc', 8, '_-'); + * // => '_-abc_-_' + * + * _.pad('abc', 3); + * // => 'abc' + */ + function pad(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + if (!length || strLength >= length) { + return string; + } + var mid = (length - strLength) / 2; + return ( + createPadding(nativeFloor(mid), chars) + + string + + createPadding(nativeCeil(mid), chars) + ); + } + + /** + * Pads `string` on the right side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padEnd('abc', 6); + * // => 'abc ' + * + * _.padEnd('abc', 6, '_-'); + * // => 'abc_-_' + * + * _.padEnd('abc', 3); + * // => 'abc' + */ + function padEnd(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + return (length && strLength < length) + ? (string + createPadding(length - strLength, chars)) + : string; + } + + /** + * Pads `string` on the left side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padStart('abc', 6); + * // => ' abc' + * + * _.padStart('abc', 6, '_-'); + * // => '_-_abc' + * + * _.padStart('abc', 3); + * // => 'abc' + */ + function padStart(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + return (length && strLength < length) + ? (createPadding(length - strLength, chars) + string) + : string; + } + + /** + * Converts `string` to an integer of the specified radix. If `radix` is + * `undefined` or `0`, a `radix` of `10` is used unless `value` is a + * hexadecimal, in which case a `radix` of `16` is used. + * + * **Note:** This method aligns with the + * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category String + * @param {string} string The string to convert. + * @param {number} [radix=10] The radix to interpret `value` by. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {number} Returns the converted integer. + * @example + * + * _.parseInt('08'); + * // => 8 + * + * _.map(['6', '08', '10'], _.parseInt); + * // => [6, 8, 10] + */ + function parseInt(string, radix, guard) { + if (guard || radix == null) { + radix = 0; + } else if (radix) { + radix = +radix; + } + return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0); + } + + /** + * Repeats the given string `n` times. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to repeat. + * @param {number} [n=1] The number of times to repeat the string. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the repeated string. + * @example + * + * _.repeat('*', 3); + * // => '***' + * + * _.repeat('abc', 2); + * // => 'abcabc' + * + * _.repeat('abc', 0); + * // => '' + */ + function repeat(string, n, guard) { + if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) { + n = 1; + } else { + n = toInteger(n); + } + return baseRepeat(toString(string), n); + } + + /** + * Replaces matches for `pattern` in `string` with `replacement`. + * + * **Note:** This method is based on + * [`String#replace`](https://mdn.io/String/replace). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to modify. + * @param {RegExp|string} pattern The pattern to replace. + * @param {Function|string} replacement The match replacement. + * @returns {string} Returns the modified string. + * @example + * + * _.replace('Hi Fred', 'Fred', 'Barney'); + * // => 'Hi Barney' + */ + function replace() { + var args = arguments, + string = toString(args[0]); + + return args.length < 3 ? string : string.replace(args[1], args[2]); + } + + /** + * Converts `string` to + * [snake case](https://en.wikipedia.org/wiki/Snake_case). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the snake cased string. + * @example + * + * _.snakeCase('Foo Bar'); + * // => 'foo_bar' + * + * _.snakeCase('fooBar'); + * // => 'foo_bar' + * + * _.snakeCase('--FOO-BAR--'); + * // => 'foo_bar' + */ + var snakeCase = createCompounder(function(result, word, index) { + return result + (index ? '_' : '') + word.toLowerCase(); + }); + + /** + * Splits `string` by `separator`. + * + * **Note:** This method is based on + * [`String#split`](https://mdn.io/String/split). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to split. + * @param {RegExp|string} separator The separator pattern to split by. + * @param {number} [limit] The length to truncate results to. + * @returns {Array} Returns the string segments. + * @example + * + * _.split('a-b-c', '-', 2); + * // => ['a', 'b'] + */ + function split(string, separator, limit) { + if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) { + separator = limit = undefined; + } + limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0; + if (!limit) { + return []; + } + string = toString(string); + if (string && ( + typeof separator == 'string' || + (separator != null && !isRegExp(separator)) + )) { + separator = baseToString(separator); + if (!separator && hasUnicode(string)) { + return castSlice(stringToArray(string), 0, limit); + } + } + return string.split(separator, limit); + } + + /** + * Converts `string` to + * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). + * + * @static + * @memberOf _ + * @since 3.1.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the start cased string. + * @example + * + * _.startCase('--foo-bar--'); + * // => 'Foo Bar' + * + * _.startCase('fooBar'); + * // => 'Foo Bar' + * + * _.startCase('__FOO_BAR__'); + * // => 'FOO BAR' + */ + var startCase = createCompounder(function(result, word, index) { + return result + (index ? ' ' : '') + upperFirst(word); + }); + + /** + * Checks if `string` starts with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=0] The position to search from. + * @returns {boolean} Returns `true` if `string` starts with `target`, + * else `false`. + * @example + * + * _.startsWith('abc', 'a'); + * // => true + * + * _.startsWith('abc', 'b'); + * // => false + * + * _.startsWith('abc', 'b', 1); + * // => true + */ + function startsWith(string, target, position) { + string = toString(string); + position = position == null + ? 0 + : baseClamp(toInteger(position), 0, string.length); + + target = baseToString(target); + return string.slice(position, position + target.length) == target; + } + + /** + * Creates a compiled template function that can interpolate data properties + * in "interpolate" delimiters, HTML-escape interpolated data properties in + * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data + * properties may be accessed as free variables in the template. If a setting + * object is given, it takes precedence over `_.templateSettings` values. + * + * **Note:** In the development build `_.template` utilizes + * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) + * for easier debugging. + * + * For more information on precompiling templates see + * [lodash's custom builds documentation](https://lodash.com/custom-builds). + * + * For more information on Chrome extension sandboxes see + * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The template string. + * @param {Object} [options={}] The options object. + * @param {RegExp} [options.escape=_.templateSettings.escape] + * The HTML "escape" delimiter. + * @param {RegExp} [options.evaluate=_.templateSettings.evaluate] + * The "evaluate" delimiter. + * @param {Object} [options.imports=_.templateSettings.imports] + * An object to import into the template as free variables. + * @param {RegExp} [options.interpolate=_.templateSettings.interpolate] + * The "interpolate" delimiter. + * @param {string} [options.sourceURL='lodash.templateSources[n]'] + * The sourceURL of the compiled template. + * @param {string} [options.variable='obj'] + * The data object variable name. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the compiled template function. + * @example + * + * // Use the "interpolate" delimiter to create a compiled template. + * var compiled = _.template('hello <%= user %>!'); + * compiled({ 'user': 'fred' }); + * // => 'hello fred!' + * + * // Use the HTML "escape" delimiter to escape data property values. + * var compiled = _.template('<%- value %>'); + * compiled({ 'value': ' + + +``` + +(Note: Do not do this in production. Just don't. wzrd.in is a great service, but if you're deploying a "real" service you should be using a packaging tool like browserify or webpack. If you do go this route you would be well advised to link to a specific version instead of `uuid@latest` to avoid having your code break when we roll out breaking changes.) + + +## API + +### uuid(...) + +Generate a V4 uuid. See uuid.v4 documentation below. + +### uuid.v1([`options` [, `buffer` [, `offset`]]]) + +Generate and return a RFC4122 v1 (timestamp-based) UUID. + +* `options` - (Object) Optional uuid state to apply. Properties may include: + + * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1. + * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used. + * `msecs` - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used. + * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2. + +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Notes: + +1. The randomly generated node id is only guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.) + +Example: Generate string UUID with fully-specified options + +```javascript +uuid.v1({ + node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], + clockseq: 0x1234, + msecs: new Date('2011-11-01').getTime(), + nsecs: 5678 +}); // -> "710b962e-041c-11e1-9234-0123456789ab" +``` + +Example: In-place generation of two binary IDs + +```javascript +// Generate two ids in an array +const arr = new Array(32); // -> [] +uuid.v1(null, arr, 0); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15] +uuid.v1(null, arr, 16); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15] +``` + +### uuid.v4([`options` [, `buffer` [, `offset`]]]) + +Generate and return a RFC4122 v4 UUID. + +* `options` - (Object) Optional uuid state to apply. Properties may include: + + * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values + * `rng` - (Function) Random # generator to use. Set to one of the built-in generators - `uuid.mathRNG` (all platforms), `uuid.nodeRNG` (node.js only), `uuid.whatwgRNG` (WebKit only) - or a custom function that returns an array[16] of byte values. + +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Example: Generate string UUID with fully-specified options + +```javascript +uuid.v4({ + random: [ + 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, + 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36 + ] +}); +// -> "109156be-c4fb-41ea-b1b4-efe1671c5836" +``` + +Example: Generate two IDs in a single buffer + +```javascript +const buffer = new Array(32); // (or 'new Buffer' in node.js) +uuid.v4(null, buffer, 0); +uuid.v4(null, buffer, 16); +``` + +## Testing + +``` +npm test +``` + +## Legacy node-uuid package + +The code for the legacy node-uuid package is available in the `node-uuid` branch. diff --git a/node_modules/uuid/bin/uuid b/node_modules/uuid/bin/uuid new file mode 100755 index 0000000..f732e99 --- /dev/null +++ b/node_modules/uuid/bin/uuid @@ -0,0 +1,26 @@ +#!/usr/bin/env node + +var path = require('path'); +var uuid = require(path.join(__dirname, '..')); + +var arg = process.argv[2]; + +if ('--help' === arg) { + console.log('\n USAGE: uuid [version] [options]\n\n'); + console.log(' options:\n'); + console.log(' --help Display this message and exit\n'); + process.exit(0); +} + +if (null == arg) { + console.log(uuid()); + process.exit(0); +} + +if ('v1' !== arg && 'v4' !== arg) { + console.error('Version must be RFC4122 version 1 or version 4, denoted as "v1" or "v4"'); + process.exit(1); +} + +console.log(uuid[arg]()); +process.exit(0); diff --git a/node_modules/uuid/index.js b/node_modules/uuid/index.js new file mode 100644 index 0000000..e96791a --- /dev/null +++ b/node_modules/uuid/index.js @@ -0,0 +1,8 @@ +var v1 = require('./v1'); +var v4 = require('./v4'); + +var uuid = v4; +uuid.v1 = v1; +uuid.v4 = v4; + +module.exports = uuid; diff --git a/node_modules/uuid/lib/bytesToUuid.js b/node_modules/uuid/lib/bytesToUuid.js new file mode 100644 index 0000000..9ee989c --- /dev/null +++ b/node_modules/uuid/lib/bytesToUuid.js @@ -0,0 +1,23 @@ +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ +var byteToHex = []; +for (var i = 0; i < 256; ++i) { + byteToHex[i] = (i + 0x100).toString(16).substr(1); +} + +function bytesToUuid(buf, offset) { + var i = offset || 0; + var bth = byteToHex; + return bth[buf[i++]] + bth[buf[i++]] + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + + bth[buf[i++]] + bth[buf[i++]] + + bth[buf[i++]] + bth[buf[i++]]; +} + +module.exports = bytesToUuid; diff --git a/node_modules/uuid/lib/rng-browser.js b/node_modules/uuid/lib/rng-browser.js new file mode 100644 index 0000000..88b7dfb --- /dev/null +++ b/node_modules/uuid/lib/rng-browser.js @@ -0,0 +1,33 @@ +// Unique ID creation requires a high quality random # generator. In the +// browser this is a little complicated due to unknown quality of Math.random() +// and inconsistent support for the `crypto` API. We do the best we can via +// feature-detection +var rng; + +var crypto = global.crypto || global.msCrypto; // for IE 11 +if (crypto && crypto.getRandomValues) { + // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto + var rnds8 = new Uint8Array(16); + rng = function whatwgRNG() { + crypto.getRandomValues(rnds8); + return rnds8; + }; +} + +if (!rng) { + // Math.random()-based (RNG) + // + // If all else fails, use Math.random(). It's fast, but is of unspecified + // quality. + var rnds = new Array(16); + rng = function() { + for (var i = 0, r; i < 16; i++) { + if ((i & 0x03) === 0) r = Math.random() * 0x100000000; + rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; + } + + return rnds; + }; +} + +module.exports = rng; diff --git a/node_modules/uuid/lib/rng.js b/node_modules/uuid/lib/rng.js new file mode 100644 index 0000000..5624d91 --- /dev/null +++ b/node_modules/uuid/lib/rng.js @@ -0,0 +1,10 @@ +// Unique ID creation requires a high quality random # generator. In node.js +// this is prett straight-forward - we use the crypto API. + +var rb = require('crypto').randomBytes; + +function rng() { + return rb(16); +}; + +module.exports = rng; diff --git a/node_modules/uuid/package.json b/node_modules/uuid/package.json new file mode 100644 index 0000000..ff496df --- /dev/null +++ b/node_modules/uuid/package.json @@ -0,0 +1,122 @@ +{ + "_args": [ + [ + { + "raw": "uuid@^3.0.0", + "scope": null, + "escapedName": "uuid", + "name": "uuid", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/sequelize" + ] + ], + "_from": "uuid@>=3.0.0 <4.0.0", + "_id": "uuid@3.0.1", + "_inCache": true, + "_location": "/uuid", + "_nodeVersion": "6.7.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/uuid-3.0.1.tgz_1480403886767_0.2584113120101392" + }, + "_npmUser": { + "name": "defunctzombie", + "email": "shtylman@gmail.com" + }, + "_npmVersion": "3.10.3", + "_phantomChildren": {}, + "_requested": { + "raw": "uuid@^3.0.0", + "scope": null, + "escapedName": "uuid", + "name": "uuid", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/sequelize" + ], + "_resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz", + "_shasum": "6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1", + "_shrinkwrap": null, + "_spec": "uuid@^3.0.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/sequelize", + "bin": { + "uuid": "./bin/uuid" + }, + "browser": { + "./lib/rng.js": "./lib/rng-browser.js" + }, + "bugs": { + "url": "https://github.com/kelektiv/node-uuid/issues" + }, + "contributors": [ + { + "name": "Robert Kieffer", + "email": "robert@broofa.com" + }, + { + "name": "Christoph Tavan", + "email": "dev@tavan.de" + }, + { + "name": "AJ ONeal", + "email": "coolaj86@gmail.com" + }, + { + "name": "Vincent Voyer", + "email": "vincent@zeroload.net" + }, + { + "name": "Roman Shtylman", + "email": "shtylman@gmail.com" + } + ], + "dependencies": {}, + "description": "RFC4122 (v1 and v4) generator", + "devDependencies": { + "mocha": "3.1.2" + }, + "directories": {}, + "dist": { + "shasum": "6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1", + "tarball": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz" + }, + "gitHead": "374de826de71d8997f71b4641f65552e48956ced", + "homepage": "https://github.com/kelektiv/node-uuid#readme", + "keywords": [ + "uuid", + "guid", + "rfc4122" + ], + "license": "MIT", + "maintainers": [ + { + "name": "broofa", + "email": "robert@broofa.com" + }, + { + "name": "defunctzombie", + "email": "shtylman@gmail.com" + }, + { + "name": "vvo", + "email": "vincent.voyer@gmail.com" + } + ], + "name": "uuid", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/kelektiv/node-uuid.git" + }, + "scripts": { + "test": "mocha test/test.js" + }, + "version": "3.0.1" +} diff --git a/node_modules/uuid/test/mocha.opts b/node_modules/uuid/test/mocha.opts new file mode 100644 index 0000000..5d6a311 --- /dev/null +++ b/node_modules/uuid/test/mocha.opts @@ -0,0 +1,3 @@ +--ui qunit +--reporter spec +--check-leaks diff --git a/node_modules/uuid/test/test.js b/node_modules/uuid/test/test.js new file mode 100644 index 0000000..ec33bec --- /dev/null +++ b/node_modules/uuid/test/test.js @@ -0,0 +1,96 @@ +var assert = require('assert'); + +var uuid = require('../'); + +// Verify ordering of v1 ids created with explicit times +var TIME = 1321644961388; // 2011-11-18 11:36:01.388-08:00 + +function compare(name, ids) { + test(name, function() { + // avoid .map for older browsers + for (var i=0 ; i 10k ids created in 1ms', function() { + // Verify throw if too many ids created + var thrown = false; + try { + uuid.v1({msecs: TIME, nsecs: 10000}); + } catch (e) { + thrown = true; + } + assert(thrown, 'Exception thrown when > 10K ids created in 1 ms'); +}); + +test('clock regression by msec', function() { + // Verify clock regression bumps clockseq + var uidt = uuid.v1({msecs: TIME}); + var uidtb = uuid.v1({msecs: TIME - 1}); + assert( + parseInt(uidtb.split('-')[3], 16) - parseInt(uidt.split('-')[3], 16) === 1, + 'Clock regression by msec increments the clockseq' + ); +}); + +test('clock regression by nsec', function() { + // Verify clock regression bumps clockseq + var uidtn = uuid.v1({msecs: TIME, nsecs: 10}); + var uidtnb = uuid.v1({msecs: TIME, nsecs: 9}); + assert( + parseInt(uidtnb.split('-')[3], 16) - parseInt(uidtn.split('-')[3], 16) === 1, + 'Clock regression by nsec increments the clockseq' + ); +}); + +test('explicit options product expected id', function() { + // Verify explicit options produce expected id + var id = uuid.v1({ + msecs: 1321651533573, + nsecs: 5432, + clockseq: 0x385c, + node: [ 0x61, 0xcd, 0x3c, 0xbb, 0x32, 0x10 ] + }); + assert(id == 'd9428888-122b-11e1-b85c-61cd3cbb3210', 'Explicit options produce expected id'); +}); + +test('ids spanning 1ms boundary are 100ns apart', function() { + // Verify adjacent ids across a msec boundary are 1 time unit apart + var u0 = uuid.v1({msecs: TIME, nsecs: 9999}); + var u1 = uuid.v1({msecs: TIME + 1, nsecs: 0}); + + var before = u0.split('-')[0], after = u1.split('-')[0]; + var dt = parseInt(after, 16) - parseInt(before, 16); + assert(dt === 1, 'Ids spanning 1ms boundary are 100ns apart'); +}); diff --git a/node_modules/uuid/v1.js b/node_modules/uuid/v1.js new file mode 100644 index 0000000..315bd4c --- /dev/null +++ b/node_modules/uuid/v1.js @@ -0,0 +1,103 @@ +// Unique ID creation requires a high quality random # generator. We feature +// detect to determine the best RNG source, normalizing to a function that +// returns 128-bits of randomness, since that's what's usually required +var rng = require('./lib/rng'); +var bytesToUuid = require('./lib/bytesToUuid'); + +// **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html + +// random #'s we need to init node and clockseq +var _seedBytes = rng(); + +// Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) +var _nodeId = [ + _seedBytes[0] | 0x01, + _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5] +]; + +// Per 4.2.2, randomize (14 bit) clockseq +var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff; + +// Previous uuid creation time +var _lastMSecs = 0, _lastNSecs = 0; + +// See https://github.com/broofa/node-uuid for API details +function v1(options, buf, offset) { + var i = buf && offset || 0; + var b = buf || []; + + options = options || {}; + + var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; + + // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime(); + + // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; + + // Time since last uuid creation (in msecs) + var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; + + // Per 4.2.1.2, Bump clockseq on clock regression + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } + + // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } + + // Per 4.2.1.2 Throw error if too many uuids are requested + if (nsecs >= 10000) { + throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); + } + + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; + + // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + msecs += 12219292800000; + + // `time_low` + var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; + + // `time_mid` + var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; + + // `time_high_and_version` + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + b[i++] = tmh >>> 16 & 0xff; + + // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + b[i++] = clockseq >>> 8 | 0x80; + + // `clock_seq_low` + b[i++] = clockseq & 0xff; + + // `node` + var node = options.node || _nodeId; + for (var n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + + return buf ? buf : bytesToUuid(b); +} + +module.exports = v1; diff --git a/node_modules/uuid/v4.js b/node_modules/uuid/v4.js new file mode 100644 index 0000000..38b6f76 --- /dev/null +++ b/node_modules/uuid/v4.js @@ -0,0 +1,29 @@ +var rng = require('./lib/rng'); +var bytesToUuid = require('./lib/bytesToUuid'); + +function v4(options, buf, offset) { + var i = buf && offset || 0; + + if (typeof(options) == 'string') { + buf = options == 'binary' ? new Array(16) : null; + options = null; + } + options = options || {}; + + var rnds = options.random || (options.rng || rng)(); + + // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + rnds[6] = (rnds[6] & 0x0f) | 0x40; + rnds[8] = (rnds[8] & 0x3f) | 0x80; + + // Copy bytes to buffer, if provided + if (buf) { + for (var ii = 0; ii < 16; ++ii) { + buf[i + ii] = rnds[ii]; + } + } + + return buf || bytesToUuid(rnds); +} + +module.exports = v4; diff --git a/node_modules/v8flags/.npmignore b/node_modules/v8flags/.npmignore new file mode 100644 index 0000000..ae16e5f --- /dev/null +++ b/node_modules/v8flags/.npmignore @@ -0,0 +1,4 @@ +*.yml +LICENSE +README.md +test.js diff --git a/node_modules/v8flags/LICENSE b/node_modules/v8flags/LICENSE new file mode 100644 index 0000000..a55f5b7 --- /dev/null +++ b/node_modules/v8flags/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2014 Tyler Kellen + +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. diff --git a/node_modules/v8flags/README.md b/node_modules/v8flags/README.md new file mode 100644 index 0000000..ca6065b --- /dev/null +++ b/node_modules/v8flags/README.md @@ -0,0 +1,49 @@ +# v8flags [![Build Status](https://secure.travis-ci.org/js-cli/js-v8flags.png)](http://travis-ci.org/js-cli/js-v8flags) [![Build status](https://ci.appveyor.com/api/projects/status/9psgmwayx9kpol1a?svg=true)](https://ci.appveyor.com/project/js-cli/js-v8flags) +> Get available v8 flags. + +[![NPM](https://nodei.co/npm/v8flags.png)](https://nodei.co/npm/v8flags/) + +## Example +```js +const v8flags = require('v8flags'); + +v8flags(function (err, results) { + console.log(results); // [ '--use_strict', + // '--es5_readonly', + // '--es52_globals', + // '--harmony_typeof', + // '--harmony_scoping', + // '--harmony_modules', + // '--harmony_proxies', + // '--harmony_collections', + // '--harmony', + // ... +}); +``` + +## Release History + +* 2017-04-18 - v2.1.0 - hash username to support invalid path characters +* 2017-03-31 - v2.0.12 - don't pollute global namespace +* 2015-12-07 - v2.0.11 - cache to temp directory if home is present but unwritable +* 2015-07-28 - v2.0.10 - don't throw for electron runtime, just call back with empty array +* 2015-06-25 - v2.0.9 - call back with flags even if cache file can't be written +* 2015-06-15 - v2.0.7 - revert to 2.0.5 behavior. +* 2015-06-15 - v2.0.6 - store cache file in ~/.cache or ~/AppData/Local depending on platform +* 2015-04-18 - v2.0.5 - attempt to require config file, if this throws for any reason, fopen w+ and re-create +* 2015-04-16 - v2.0.4 - when concurrent processes are run and no config exists, don't append to the cached config. +* 2015-03-31 - v2.0.3 - prefer to store config files in user home over tmp +* 2015-01-18 - v2.0.2 - keep his dark tentacles contained +* 2015-01-15 - v2.0.1 - store temp file in `os.tmpdir()`, drop support for node 0.8 +* 2015-01-15 - v2.0.0 - make the stupid thing async +* 2014-12-22 - v1.0.8 - exclude `--help` flag +* 2014-12-20 - v1.0.7 - pre-cache flags for every version of node from 0.8 to 0.11 +* 2014-12-09 - v1.0.6 - revert to 1.0.0 behavior +* 2014-11-26 - v1.0.5 - get node executable from `process.execPath` +* 2014-11-18 - v1.0.4 - wrap node executable path in quotes +* 2014-11-17 - v1.0.3 - get node executable during npm install via `process.env.NODE` +* 2014-11-17 - v1.0.2 - get node executable from `process.env._` +* 2014-09-03 - v1.0.0 - first major version release +* 2014-09-02 - v0.3.0 - keep -- in flag names +* 2014-09-02 - v0.2.0 - cache flags +* 2014-05-09 - v0.1.0 - initial release diff --git a/node_modules/v8flags/index.js b/node_modules/v8flags/index.js new file mode 100644 index 0000000..40404d0 --- /dev/null +++ b/node_modules/v8flags/index.js @@ -0,0 +1,133 @@ +// this entire module is depressing. i should have spent my time learning +// how to patch v8 so that these options would just be available on the +// process object. + +const os = require('os'); +const fs = require('fs'); +const path = require('path'); +const crypto = require('crypto'); +const execFile = require('child_process').execFile; +const env = process.env; +const user = env.LOGNAME || env.USER || env.LNAME || env.USERNAME || ''; +const exclusions = ['--help']; + +const configfile = '.v8flags.'+process.versions.v8+'.'+crypto.createHash('md5').update(user).digest('hex')+'.json'; + +const failureMessage = [ + 'Unable to cache a config file for v8flags to a your home directory', + 'or a temporary folder. To fix this problem, please correct your', + 'environment by setting HOME=/path/to/home or TEMP=/path/to/temp.', + 'NOTE: the user running this must be able to access provided path.', + 'If all else fails, please open an issue here:', + 'http://github.com/tkellen/js-v8flags' +].join('\n'); + +function fail (err) { + err.message += '\n\n' + failureMessage; + return err; +} + +function openConfig (cb) { + var userHome = require('user-home'); + if (!userHome) { + return tryOpenConfig(path.join(os.tmpdir(), configfile), cb); + } + + tryOpenConfig(path.join(userHome, configfile), function (err, fd) { + if (err) return tryOpenConfig(path.join(os.tmpdir(), configfile), cb); + return cb(null, fd); + }); +} + +function tryOpenConfig (configpath, cb) { + try { + // if the config file is valid, it should be json and therefore + // node should be able to require it directly. if this doesn't + // throw, we're done! + var content = require(configpath); + process.nextTick(function () { + cb(null, content); + }); + } catch (e) { + // if requiring the config file failed, maybe it doesn't exist, or + // perhaps it has become corrupted. instead of calling back with the + // content of the file, call back with a file descriptor that we can + // write the cached data to + fs.open(configpath, 'w+', function (err, fd) { + if (err) { + return cb(err); + } + return cb(null, fd); + }); + } +} + +// i can't wait for the day this whole module is obsolete because these +// options are available on the process object. this executes node with +// `--v8-options` and parses the result, returning an array of command +// line flags. +function getFlags (cb) { + execFile(process.execPath, ['--v8-options'], function (execErr, result) { + if (execErr) { + return cb(execErr); + } + var flags = result.match(/\s\s--(\w+)/gm).map(function (match) { + return match.substring(2); + }).filter(function (name) { + return exclusions.indexOf(name) === -1; + }); + return cb(null, flags); + }); +} + +// write some json to a file descriptor. if this fails, call back +// with both the error and the data that was meant to be written. +function writeConfig (fd, flags, cb) { + var buf = new Buffer(JSON.stringify(flags)); + return fs.write(fd, buf, 0, buf.length, 0 , function (writeErr) { + fs.close(fd, function (closeErr) { + var err = writeErr || closeErr; + if (err) { + return cb(fail(err), flags); + } + return cb(null, flags); + }); + }); +} + +module.exports = function (cb) { + // bail early if this is not node + var isElectron = process.versions && process.versions.electron; + if (isElectron) { + return process.nextTick(function () { + cb(null, []); + }); + } + + // attempt to open/read cache file + openConfig(function (openErr, result) { + if (!openErr && typeof result !== 'number') { + return cb(null, result); + } + // if the result is not an array, we need to go fetch + // the flags by invoking node with `--v8-options` + getFlags(function (flagsErr, flags) { + // if there was an error fetching the flags, bail immediately + if (flagsErr) { + return cb(flagsErr); + } + // if there was a problem opening the config file for writing + // throw an error but include the flags anyway so that users + // can continue to execute (at the expense of having to fetch + // flags on every run until they fix the underyling problem). + if (openErr) { + return cb(fail(openErr), flags); + } + // write the config file to disk so subsequent runs can read + // flags out of a cache file. + return writeConfig(result, flags, cb); + }); + }); +}; + +module.exports.configfile = configfile; diff --git a/node_modules/v8flags/package.json b/node_modules/v8flags/package.json new file mode 100644 index 0000000..08e83ef --- /dev/null +++ b/node_modules/v8flags/package.json @@ -0,0 +1,110 @@ +{ + "_args": [ + [ + { + "raw": "v8flags@^2.0.2", + "scope": null, + "escapedName": "v8flags", + "name": "v8flags", + "rawSpec": "^2.0.2", + "spec": ">=2.0.2 <3.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/gulp" + ] + ], + "_from": "v8flags@>=2.0.2 <3.0.0", + "_id": "v8flags@2.1.1", + "_inCache": true, + "_location": "/v8flags", + "_nodeVersion": "0.10.41", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/v8flags-2.1.1.tgz_1492553662014_0.08135617268271744" + }, + "_npmUser": { + "name": "phated", + "email": "blaine.bublitz@gmail.com" + }, + "_npmVersion": "2.15.2", + "_phantomChildren": {}, + "_requested": { + "raw": "v8flags@^2.0.2", + "scope": null, + "escapedName": "v8flags", + "name": "v8flags", + "rawSpec": "^2.0.2", + "spec": ">=2.0.2 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/gulp" + ], + "_resolved": "https://registry.npmjs.org/v8flags/-/v8flags-2.1.1.tgz", + "_shasum": "aab1a1fa30d45f88dd321148875ac02c0b55e5b4", + "_shrinkwrap": null, + "_spec": "v8flags@^2.0.2", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/gulp", + "author": { + "name": "Tyler Kellen", + "url": "http://goingslowly.com/" + }, + "bugs": { + "url": "https://github.com/tkellen/node-v8flags/issues" + }, + "dependencies": { + "user-home": "^1.1.1" + }, + "description": "Get available v8 flags.", + "devDependencies": { + "async": "^0.9.0", + "chai": "~1.9.1", + "mocha": "~1.21.4" + }, + "directories": {}, + "dist": { + "shasum": "aab1a1fa30d45f88dd321148875ac02c0b55e5b4", + "tarball": "https://registry.npmjs.org/v8flags/-/v8flags-2.1.1.tgz" + }, + "engines": { + "node": ">= 0.10.0" + }, + "gitHead": "4c628146efa7eda11df0e10c73b3d8687873569e", + "homepage": "https://github.com/tkellen/node-v8flags", + "keywords": [ + "v8 flags", + "harmony flags" + ], + "licenses": [ + { + "type": "MIT", + "url": "https://github.com/tkellen/node-v8flags/blob/master/LICENSE" + } + ], + "main": "index.js", + "maintainers": [ + { + "name": "ilikebits", + "email": "leo@leozhang.me" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + }, + { + "name": "tkellen", + "email": "tyler@sleekcode.net" + } + ], + "name": "v8flags", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/tkellen/node-v8flags.git" + }, + "scripts": { + "test": "_mocha -R spec test.js" + }, + "version": "2.1.1" +} diff --git a/node_modules/validate-npm-package-license/LICENSE b/node_modules/validate-npm-package-license/LICENSE new file mode 100644 index 0000000..a5e905d --- /dev/null +++ b/node_modules/validate-npm-package-license/LICENSE @@ -0,0 +1,174 @@ +SPDX:Apache-2.0 + +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the +copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other +entities that control, are controlled by, or are under common control +with that entity. For the purposes of this definition, "control" means +(i) the power, direct or indirect, to cause the direction or management +of such entity, whether by contract or otherwise, or (ii) ownership of +fifty percent (50%) or more of the outstanding shares, or (iii) +beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, +including but not limited to software source code, documentation source, +and configuration files. + +"Object" form shall mean any form resulting from mechanical +transformation or translation of a Source form, including but not +limited to compiled object code, generated documentation, and +conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object +form, made available under the License, as indicated by a copyright +notice that is included in or attached to the work (an example is +provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object +form, that is based on (or derived from) the Work and for which the +editorial revisions, annotations, elaborations, or other modifications +represent, as a whole, an original work of authorship. For the purposes +of this License, Derivative Works shall not include works that remain +separable from, or merely link (or bind by name) to the interfaces of, +the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original +version of the Work and any modifications or additions to that Work or +Derivative Works thereof, that is intentionally submitted to Licensor +for inclusion in the Work by the copyright owner or by an individual or +Legal Entity authorized to submit on behalf of the copyright owner. For +the purposes of this definition, "submitted" means any form of +electronic, verbal, or written communication sent to the Licensor or its +representatives, including but not limited to communication on +electronic mailing lists, source code control systems, and issue +tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding +communication that is conspicuously marked or otherwise designated in +writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on +behalf of whom a Contribution has been received by Licensor and +subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of +this License, each Contributor hereby grants to You a perpetual, +worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright +license to reproduce, prepare Derivative Works of, publicly display, +publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this +License, each Contributor hereby grants to You a perpetual, worldwide, +non-exclusive, no-charge, royalty-free, irrevocable (except as stated in +this section) patent license to make, have made, use, offer to sell, +sell, import, and otherwise transfer the Work, where such license +applies only to those patent claims licensable by such Contributor that +are necessarily infringed by their Contribution(s) alone or by +combination of their Contribution(s) with the Work to which such +Contribution(s) was submitted. If You institute patent litigation +against any entity (including a cross-claim or counterclaim in a +lawsuit) alleging that the Work or a Contribution incorporated within +the Work constitutes direct or contributory patent infringement, then +any patent licenses granted to You under this License for that Work +shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work +or Derivative Works thereof in any medium, with or without +modifications, and in Source or Object form, provided that You meet the +following conditions: + +(a) You must give any other recipients of the Work or Derivative Works a +copy of this License; and + +(b) You must cause any modified files to carry prominent notices stating +that You changed the files; and + +(c) You must retain, in the Source form of any Derivative Works that You +distribute, all copyright, patent, trademark, and attribution notices +from the Source form of the Work, excluding those notices that do not +pertain to any part of the Derivative Works; and + +(d) If the Work includes a "NOTICE" text file as part of its +distribution, then any Derivative Works that You distribute must include +a readable copy of the attribution notices contained within such NOTICE +file, excluding those notices that do not pertain to any part of the +Derivative Works, in at least one of the following places: within a +NOTICE text file distributed as part of the Derivative Works; within the +Source form or documentation, if provided along with the Derivative +Works; or, within a display generated by the Derivative Works, if and +wherever such third-party notices normally appear. The contents of the +NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative +Works that You distribute, alongside or as an addendum to the NOTICE +text from the Work, provided that such additional attribution notices +cannot be construed as modifying the License. + +You may add Your own copyright statement to Your modifications and may +provide additional or different license terms and conditions for use, +reproduction, or distribution of Your modifications, or for any such +Derivative Works as a whole, provided Your use, reproduction, and +distribution of the Work otherwise complies with the conditions stated +in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, +any Contribution intentionally submitted for inclusion in the Work by +You to the Licensor shall be under the terms and conditions of this +License, without any additional terms or conditions. Notwithstanding the +above, nothing herein shall supersede or modify the terms of any +separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. This License does not grant permission to use the trade +names, trademarks, service marks, or product names of the Licensor, +except as required for reasonable and customary use in describing the +origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed +to in writing, Licensor provides the Work (and each Contributor provides +its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS +OF ANY KIND, either express or implied, including, without limitation, +any warranties or conditions of TITLE, NON-INFRINGEMENT, +MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely +responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your +exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, +whether in tort (including negligence), contract, or otherwise, unless +required by applicable law (such as deliberate and grossly negligent +acts) or agreed to in writing, shall any Contributor be liable to You +for damages, including any direct, indirect, special, incidental, or +consequential damages of any character arising as a result of this +License or out of the use or inability to use the Work (including but +not limited to damages for loss of goodwill, work stoppage, computer +failure or malfunction, or any and all other commercial damages or +losses), even if such Contributor has been advised of the possibility of +such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the +Work or Derivative Works thereof, You may choose to offer, and charge a +fee for, acceptance of support, warranty, indemnity, or other liability +obligations and/or rights consistent with this License. However, in +accepting such obligations, You may act only on Your own behalf and on +Your sole responsibility, not on behalf of any other Contributor, and +only if You agree to indemnify, defend, and hold each Contributor +harmless for any liability incurred by, or claims asserted against, such +Contributor by reason of your accepting any such warranty or additional +liability. diff --git a/node_modules/validate-npm-package-license/README.md b/node_modules/validate-npm-package-license/README.md new file mode 100644 index 0000000..c5b3bfc --- /dev/null +++ b/node_modules/validate-npm-package-license/README.md @@ -0,0 +1,113 @@ +validate-npm-package-license +============================ + +Give me a string and I'll tell you if it's a valid npm package license string. + +```javascript +var valid = require('validate-npm-package-license'); +``` + +SPDX license identifiers are valid license strings: + +```javascript + +var assert = require('assert'); +var validSPDXExpression = { + validForNewPackages: true, + validForOldPackages: true, + spdx: true +}; + +assert.deepEqual(valid('MIT'), validSPDXExpression); +assert.deepEqual(valid('BSD-2-Clause'), validSPDXExpression); +assert.deepEqual(valid('Apache-2.0'), validSPDXExpression); +assert.deepEqual(valid('ISC'), validSPDXExpression); +``` +The function will return a warning and suggestion for nearly-correct license identifiers: + +```javascript +assert.deepEqual( + valid('Apache 2.0'), + { + validForOldPackages: false, + validForNewPackages: false, + warnings: [ + 'license should be ' + + 'a valid SPDX license expression (without "LicenseRef"), ' + + '"UNLICENSED", or ' + + '"SEE LICENSE IN "', + 'license is similar to the valid expression "Apache-2.0"' + ] + } +); +``` + +SPDX expressions are valid, too ... + +```javascript +// Simple SPDX license expression for dual licensing +assert.deepEqual( + valid('(GPL-3.0 OR BSD-2-Clause)'), + validSPDXExpression +); +``` + +... except if they contain `LicenseRef`: + +```javascript +var warningAboutLicenseRef = { + validForOldPackages: false, + validForNewPackages: false, + spdx: true, + warnings: [ + 'license should be ' + + 'a valid SPDX license expression (without "LicenseRef"), ' + + '"UNLICENSED", or ' + + '"SEE LICENSE IN "', + ] +}; + +assert.deepEqual( + valid('LicenseRef-Made-Up'), + warningAboutLicenseRef +); + +assert.deepEqual( + valid('(MIT OR LicenseRef-Made-Up)'), + warningAboutLicenseRef +); +``` + +If you can't describe your licensing terms with standardized SPDX identifiers, put the terms in a file in the package and point users there: + +```javascript +assert.deepEqual( + valid('SEE LICENSE IN LICENSE.txt'), + { + validForNewPackages: true, + validForOldPackages: true, + inFile: 'LICENSE.txt' + } +); + +assert.deepEqual( + valid('SEE LICENSE IN license.md'), + { + validForNewPackages: true, + validForOldPackages: true, + inFile: 'license.md' + } +); +``` + +If there aren't any licensing terms, use `UNLICENSED`: + +```javascript +var unlicensed = { + validForNewPackages: true, + validForOldPackages: true, + unlicensed: true +}; +assert.deepEqual(valid('UNLICENSED'), unlicensed); +assert.deepEqual(valid('UNLICENCED'), unlicensed); +``` diff --git a/node_modules/validate-npm-package-license/index.js b/node_modules/validate-npm-package-license/index.js new file mode 100644 index 0000000..2ad98d9 --- /dev/null +++ b/node_modules/validate-npm-package-license/index.js @@ -0,0 +1,84 @@ +var parse = require('spdx-expression-parse'); +var correct = require('spdx-correct'); + +var genericWarning = ( + 'license should be ' + + 'a valid SPDX license expression (without "LicenseRef"), ' + + '"UNLICENSED", or ' + + '"SEE LICENSE IN "' +); + +var fileReferenceRE = /^SEE LICEN[CS]E IN (.+)$/; + +function startsWith(prefix, string) { + return string.slice(0, prefix.length) === prefix; +} + +function usesLicenseRef(ast) { + if (ast.hasOwnProperty('license')) { + var license = ast.license; + return ( + startsWith('LicenseRef', license) || + startsWith('DocumentRef', license) + ); + } else { + return ( + usesLicenseRef(ast.left) || + usesLicenseRef(ast.right) + ); + } +} + +module.exports = function(argument) { + var ast; + + try { + ast = parse(argument); + } catch (e) { + var match + if ( + argument === 'UNLICENSED' || + argument === 'UNLICENCED' + ) { + return { + validForOldPackages: true, + validForNewPackages: true, + unlicensed: true + }; + } else if (match = fileReferenceRE.exec(argument)) { + return { + validForOldPackages: true, + validForNewPackages: true, + inFile: match[1] + }; + } else { + var result = { + validForOldPackages: false, + validForNewPackages: false, + warnings: [genericWarning] + }; + var corrected = correct(argument); + if (corrected) { + result.warnings.push( + 'license is similar to the valid expression "' + corrected + '"' + ); + } + return result; + } + } + + if (usesLicenseRef(ast)) { + return { + validForNewPackages: false, + validForOldPackages: false, + spdx: true, + warnings: [genericWarning] + }; + } else { + return { + validForNewPackages: true, + validForOldPackages: true, + spdx: true + }; + } +}; diff --git a/node_modules/validate-npm-package-license/package.json b/node_modules/validate-npm-package-license/package.json new file mode 100644 index 0000000..3d8d2af --- /dev/null +++ b/node_modules/validate-npm-package-license/package.json @@ -0,0 +1,96 @@ +{ + "_args": [ + [ + { + "raw": "validate-npm-package-license@^3.0.1", + "scope": null, + "escapedName": "validate-npm-package-license", + "name": "validate-npm-package-license", + "rawSpec": "^3.0.1", + "spec": ">=3.0.1 <4.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/normalize-package-data" + ] + ], + "_from": "validate-npm-package-license@>=3.0.1 <4.0.0", + "_id": "validate-npm-package-license@3.0.1", + "_inCache": true, + "_location": "/validate-npm-package-license", + "_nodeVersion": "0.12.7", + "_npmUser": { + "name": "kemitchell", + "email": "kyle@kemitchell.com" + }, + "_npmVersion": "2.13.5", + "_phantomChildren": {}, + "_requested": { + "raw": "validate-npm-package-license@^3.0.1", + "scope": null, + "escapedName": "validate-npm-package-license", + "name": "validate-npm-package-license", + "rawSpec": "^3.0.1", + "spec": ">=3.0.1 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/normalize-package-data" + ], + "_resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", + "_shasum": "2804babe712ad3379459acfbe24746ab2c303fbc", + "_shrinkwrap": null, + "_spec": "validate-npm-package-license@^3.0.1", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/normalize-package-data", + "author": { + "name": "Kyle E. Mitchell", + "email": "kyle@kemitchell.com", + "url": "https://kemitchell.com" + }, + "bugs": { + "url": "https://github.com/kemitchell/validate-npm-package-license.js/issues" + }, + "dependencies": { + "spdx-correct": "~1.0.0", + "spdx-expression-parse": "~1.0.0" + }, + "description": "Give me a string and I'll tell you if it's a valid npm package license string", + "devDependencies": { + "defence-cli": "^1.0.1", + "replace-require-self": "^1.0.0" + }, + "directories": {}, + "dist": { + "shasum": "2804babe712ad3379459acfbe24746ab2c303fbc", + "tarball": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz" + }, + "gitHead": "00200d28f9960985f221bc1a8a71e4760daf39bf", + "homepage": "https://github.com/kemitchell/validate-npm-package-license.js#readme", + "keywords": [ + "license", + "npm", + "package", + "validation" + ], + "license": "Apache-2.0", + "maintainers": [ + { + "name": "kemitchell", + "email": "kyle@kemitchell.com" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + } + ], + "name": "validate-npm-package-license", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/kemitchell/validate-npm-package-license.js.git" + }, + "scripts": { + "test": "defence README.md | replace-require-self | node" + }, + "version": "3.0.1" +} diff --git a/node_modules/validator/CHANGELOG.md b/node_modules/validator/CHANGELOG.md new file mode 100644 index 0000000..783e021 --- /dev/null +++ b/node_modules/validator/CHANGELOG.md @@ -0,0 +1,242 @@ +#### 5.7.0 + +- Added support for IPv6 in `isURL()` + ([#564](https://github.com/chriso/validator.js/issues/564)) +- Added support for urls without a host (e.g. `file:///foo.txt`) in `isURL()` + ([#563](https://github.com/chriso/validator.js/issues/563)) +- Added support for regular expressions in the `isURL()` host whitelist and blacklist + ([#562](https://github.com/chriso/validator.js/issues/562)) +- Added support for MasterCard 2-Series BIN + ([#576](https://github.com/chriso/validator.js/pull/576)) +- New locales + ([#575](https://github.com/chriso/validator.js/pull/575), + [#552](https://github.com/chriso/validator.js/issues/552)) + +#### 5.6.0 + +- Added an `isMD5()` validator + ([#557](https://github.com/chriso/validator.js/pull/557)) +- Fixed an exceptional case in `isDate()` + ([#566](https://github.com/chriso/validator.js/pull/566)) +- New locales + ([#559](https://github.com/chriso/validator.js/pull/559), + [#568](https://github.com/chriso/validator.js/pull/568), + [#571](https://github.com/chriso/validator.js/pull/571), + [#573](https://github.com/chriso/validator.js/pull/573)) + +#### 5.5.0 + +- Fixed a regex denial of service in `trim()` and `rtrim()` + ([#556](https://github.com/chriso/validator.js/pull/556)) +- Added an Algerian locale to `isMobilePhone()` + ([#540](https://github.com/chriso/validator.js/pull/540)) +- Fixed the Hungarian locale in `isAlpha()` and `isAlphanumeric()` + ([#541](https://github.com/chriso/validator.js/pull/541)) +- Added a Polish locale to `isMobilePhone()` + ([#545](https://github.com/chriso/validator.js/pull/545)) + +#### 5.4.0 + +- Accept Union Pay credit cards in `isCreditCard()` + ([#539](https://github.com/chriso/validator.js/pull/539)) +- Added Danish locale to `isMobilePhone()` + ([#538](https://github.com/chriso/validator.js/pull/538)) +- Added Hungarian locales to `isAlpha()`, `isAlphanumeric()` and `isMobilePhone()` + ([#537](https://github.com/chriso/validator.js/pull/537)) + +#### 5.3.0 + +- Added an `allow_leading_zeroes` option to `isInt()` + ([#532](https://github.com/chriso/validator.js/pull/532)) +- Adjust Chinese mobile phone validation + ([#523](https://github.com/chriso/validator.js/pull/523)) +- Added a Canadian locale to `isMobilePhone()` + ([#524](https://github.com/chriso/validator.js/issues/524)) + +#### 5.2.0 + +- Added a `isDataURI()` validator + ([#521](https://github.com/chriso/validator.js/pull/521)) +- Added Czech locales + ([#522](https://github.com/chriso/validator.js/pull/522)) +- Fixed a bug with `isURL()` when protocol was missing and "://" appeared in the query + ([#518](https://github.com/chriso/validator.js/issues/518)) + +#### 5.1.0 + +- Added a `unescape()` HTML function + ([#509](https://github.com/chriso/validator.js/pull/509)) +- Added a Malaysian locale to `isMobilePhone()` + ([#507](https://github.com/chriso/validator.js/pull/507)) +- Added Polish locales to `isAlpha()` and `isAlphanumeric()` + ([#506](https://github.com/chriso/validator.js/pull/506)) +- Added Turkish locales to `isAlpha()`, `isAlphanumeric()` and `isMobilePhone()` + ([#512](https://github.com/chriso/validator.js/pull/512)) +- Allow >1 underscore in hostnames when using `allow_underscores` + ([#510](https://github.com/chriso/validator.js/issues/510)) + +#### 5.0.0 + +- Migrate to ES6 + ([#496](https://github.com/chriso/validator.js/pull/496)) +- Break the library up so that individual functions can be imported + ([#496](https://github.com/chriso/validator.js/pull/496)) +- Remove auto-coercion of input to a string + ([#496](https://github.com/chriso/validator.js/pull/496)) +- Remove the `extend()` function + ([#496](https://github.com/chriso/validator.js/pull/496)) +- Added Arabic locales to `isAlpha()` and `isAlphanumeric()` + ([#496](https://github.com/chriso/validator.js/pull/496#issuecomment-184781730)) +- Fix validation of very large base64 strings + ([#503](https://github.com/chriso/validator.js/pull/503)) + +#### 4.9.0 + +- Added a Russian locale to `isAlpha()` and `isAlphanumeric()` + ([#499](https://github.com/chriso/validator.js/pull/499)) +- Remove the restriction on adjacent hyphens in hostnames + ([#500](https://github.com/chriso/validator.js/issues/500)) + +#### 4.8.0 + +- Added Spanish, French, Portuguese and Dutch support for `isAlpha()` and `isAlphanumeric()` + ([#492](https://github.com/chriso/validator.js/pull/492)) +- Added a Brazilian locale to `isMobilePhone()` + ([#489](https://github.com/chriso/validator.js/pull/489)) +- Reject IPv4 addresses with invalid zero padding + ([#490](https://github.com/chriso/validator.js/pull/490)) +- Fix the client-side version when used with RequireJS + ([#494](https://github.com/chriso/validator.js/issues/494)) + +#### 4.7.1 + +- Use [node-depd](https://github.com/dougwilson/nodejs-depd) to print deprecation notices + ([#487](https://github.com/chriso/validator.js/issues/487)) + +#### 4.7.0 + +- Print a deprecation warning if validator input is not a string + ([1f67e1e](https://github.com/chriso/validator.js/commit/1f67e1e15198c0ae735151290dc8dc2bf14da254)). + Note that this will be an error in v5. +- Added a German locale to `isMobilePhone()`, `isAlpha()` and `isAlphanumeric()` + ([#477](https://github.com/chriso/validator.js/pull/477)) +- Added a Finnish locale to `isMobilePhone()` + ([#455](https://github.com/chriso/validator.js/pull/455)) + +#### 4.6.1 + +- Fix coercion of objects: `Object.toString()` is `[object Object]` not `""` + ([a57f3c8](https://github.com/chriso/validator.js/commit/a57f3c843c715fba2664ee22ec80e9e28e88e0a6)) + +#### 4.6.0 + +- Added a Spanish locale to `isMobilePhone()` + ([#481](https://github.com/chriso/validator.js/pull/481)) +- Fix string coercion of objects created with `Object.create(null)` + ([#484](https://github.com/chriso/validator.js/issues/484)) + +#### 4.5.2 + +- Fix a timezone issue with short-form ISO 8601 dates, e.g. + `validator.isDate('2011-12-21')` + ([#480](https://github.com/chriso/validator.js/issues/480)) + +#### 4.5.1 + +- Make `isLength()` / `isByteLength()` accept `{min, max}` as options object. + ([#474](https://github.com/chriso/validator.js/issues/474)) + +#### 4.5.0 + +- Add validation for Indian mobile phone numbers + ([#471](https://github.com/chriso/validator.js/pull/471)) +- Tweak Greek and Chinese mobile phone validation + ([#467](https://github.com/chriso/validator.js/pull/467), + [#468](https://github.com/chriso/validator.js/pull/468)) +- Fixed a bug in `isDate()` when validating ISO 8601 dates without a timezone + ([#472](https://github.com/chriso/validator.js/issues/472)) + +#### 4.4.1 + +- Allow triple hyphens in IDNA hostnames + ([#466](https://github.com/chriso/validator.js/issues/466)) + +#### 4.4.0 + +- Added `isMACAddress()` validator + ([#458](https://github.com/chriso/validator.js/pull/458)) +- Added `isWhitelisted()` validator + ([#462](https://github.com/chriso/validator.js/pull/462)) +- Added a New Zealand locale to `isMobilePhone()` + ([#452](https://github.com/chriso/validator.js/pull/452)) +- Added options to control GMail address normalization + ([#460](https://github.com/chriso/validator.js/pull/460)) + +#### 4.3.0 + +- Support Ember CLI module definitions + ([#448](https://github.com/chriso/validator.js/pull/448)) +- Added a Vietnam locale to `isMobilePhone()` + ([#451](https://github.com/chriso/validator.js/pull/451)) + +#### 4.2.1 + +- Fix `isDate()` handling of RFC2822 timezones + ([#447](https://github.com/chriso/validator.js/pull/447)) + +#### 4.2.0 + +- Fix `isDate()` handling of ISO8601 timezones + ([#444](https://github.com/chriso/validator.js/pull/444)) +- Fix the incorrect `isFloat('.') === true` + ([#443](https://github.com/chriso/validator.js/pull/443)) +- Added a Norwegian locale to `isMobilePhone()` + ([#439](https://github.com/chriso/validator.js/pull/439)) + +#### 4.1.0 + +- General `isDate()` improvements + ([#431](https://github.com/chriso/validator.js/pull/431)) +- Tests now require node 4.0+ + ([#438](https://github.com/chriso/validator.js/pull/438)) + +#### 4.0.6 + +- Added a Taiwan locale to `isMobilePhone()` + ([#432](https://github.com/chriso/validator.js/pull/432)) +- Fixed a bug in `isBefore()` where it would return `null` + ([#436](https://github.com/chriso/validator.js/pull/436)) + +#### 4.0.5 + +- Fixed a denial of service vulnerability in the `isEmail()` regex + ([#152](https://github.com/chriso/validator.js/issues/152#issuecomment-131874928)) + +#### 4.0.4 + +- Reverted the leap year validation in `isDate()` as it introduced some regressions + ([#422](https://github.com/chriso/validator.js/issues/422), [#423](https://github.com/chriso/validator.js/issues/423)) + +#### 4.0.3 + +- Added leap year validation to `isDate()` + ([#418](https://github.com/chriso/validator.js/pull/418)) + +#### 4.0.2 + +- Fixed `isDecimal()` with an empty string + ([#419](https://github.com/chriso/validator.js/issues/419)) + +#### 4.0.1 + +- Fixed `isByteLength()` with certain strings + ([09f0c6d](https://github.com/chriso/validator.js/commit/09f0c6d2321f0c78af6a7de42e91b63955e4c01e)) +- Put length restrictions on email parts + ([#258](https://github.com/chriso/validator.js/issues/258#issuecomment-127173612)) + +#### 4.0.0 + +- Simplified the `isEmail()` regex and fixed some edge cases + ([#258](https://github.com/chriso/validator.js/issues/258#issuecomment-127173612)) +- Added ISO 8601 date validation via `isISO8601()` + ([#373](https://github.com/chriso/validator.js/issues/373)) diff --git a/node_modules/validator/LICENSE b/node_modules/validator/LICENSE new file mode 100644 index 0000000..37a807c --- /dev/null +++ b/node_modules/validator/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2016 Chris O'Hara + +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. diff --git a/node_modules/validator/README.md b/node_modules/validator/README.md new file mode 100644 index 0000000..cdea250 --- /dev/null +++ b/node_modules/validator/README.md @@ -0,0 +1,174 @@ +# validator.js + +[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Downloads][downloads-image]][npm-url] + +A library of string validators and sanitizers. + +### Server-side usage + +Install the library with `npm install validator` + +```javascript +var validator = require('validator'); + +validator.isEmail('foo@bar.com'); //=> true +``` + +#### ES6 + +```javascript +import validator from 'validator'; +``` + +Or, import only a subset of the library: + +```javascript +import { isEmail } from 'validator/lib/isEmail'; +``` + +### Client-side usage + +The library can be loaded either as a standalone script, or through an [AMD][amd]-compatible loader + +```html + + +``` + +The library can also be installed through [bower][bower] + +```bash +$ bower install validator-js +``` + +### Strings only + +**This library validates and sanitizes strings only.** + +If you're not sure if your input is a string, coerce it using `input + ''`. +Passing anything other than a string is an error. + +### Validators + +- **contains(str, seed)** - check if the string contains the seed. +- **equals(str, comparison)** - check if the string matches the comparison. +- **isAfter(str [, date])** - check if the string is a date that's after the specified date (defaults to now). +- **isAlpha(str [, locale])** - check if the string contains only letters (a-zA-Z). Locale is one of `['ar', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-MA', 'ar-QA', 'ar-QM', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-YE', 'cs-CZ', 'de-DE', 'en-AU', 'en-GB', 'en-HK', 'en-IN', 'en-NZ', 'en-US', 'en-ZA', 'en-ZM', 'es-ES', 'fr-FR', 'hu-HU', 'nl-NL', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'sr-RS', 'sr-RS@latin', 'tr-TR']`) and defaults to `en-US`. +- **isAlphanumeric(str [, locale])** - check if the string contains only letters and numbers. Locale is one of `['ar', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-MA', 'ar-QA', 'ar-QM', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-YE', 'cs-CZ', 'de-DE', 'en-AU', 'en-GB', 'en-HK', 'en-IN', 'en-NZ', 'en-US', 'en-ZA', 'en-ZM', 'es-ES', 'fr-FR', 'fr-BE', 'hu-HU', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'sr-RS', 'sr-RS@latin', 'tr-TR']`) and defaults to `en-US`. +- **isAscii(str)** - check if the string contains ASCII chars only. +- **isBase64(str)** - check if a string is base64 encoded. +- **isBefore(str [, date])** - check if the string is a date that's before the specified date. +- **isBoolean(str)** - check if a string is a boolean. +- **isByteLength(str, options)** - check if the string's length (in bytes) falls in a range.`options` is an object which defaults to `{min:0, max: undefined}`. +- **isCreditCard(str)** - check if the string is a credit card. +- **isCurrency(str, options)** - check if the string is a valid currency amount. `options` is an object which defaults to `{symbol: '$', require_symbol: false, allow_space_after_symbol: false, symbol_after_digits: false, allow_negatives: true, parens_for_negatives: false, negative_sign_before_digits: false, negative_sign_after_digits: false, allow_negative_sign_placeholder: false, thousands_separator: ',', decimal_separator: '.', allow_space_after_digits: false }`. +- **isDataURI(str)** - check if the string is a [data uri format](https://developer.mozilla.org/en-US/docs/Web/HTTP/data_URIs). +- **isDate(str)** - check if the string is a date. +- **isDecimal(str)** - check if the string represents a decimal number, such as 0.1, .3, 1.1, 1.00003, 4.0, etc. +- **isDivisibleBy(str, number)** - check if the string is a number that's divisible by another. +- **isEmail(str [, options])** - check if the string is an email. `options` is an object which defaults to `{ allow_display_name: false, allow_utf8_local_part: true, require_tld: true }`. If `allow_display_name` is set to true, the validator will also match `Display Name `. If `allow_utf8_local_part` is set to false, the validator will not allow any non-English UTF8 character in email address' local part. If `require_tld` is set to false, e-mail addresses without having TLD in their domain will also be matched. +- **isFQDN(str [, options])** - check if the string is a fully qualified domain name (e.g. domain.com). `options` is an object which defaults to `{ require_tld: true, allow_underscores: false, allow_trailing_dot: false }`. +- **isFloat(str [, options])** - check if the string is a float. `options` is an object which can contain the keys `min` and/or `max` to validate the float is within boundaries (e.g. `{ min: 7.22, max: 9.55 }`). +- **isFullWidth(str)** - check if the string contains any full-width chars. +- **isHalfWidth(str)** - check if the string contains any half-width chars. +- **isHexColor(str)** - check if the string is a hexadecimal color. +- **isHexadecimal(str)** - check if the string is a hexadecimal number. +- **isIP(str [, version])** - check if the string is an IP (version 4 or 6). +- **isISBN(str [, version])** - check if the string is an ISBN (version 10 or 13). +- **isISIN(str)** - check if the string is an [ISIN][ISIN] (stock/security identifier). +- **isISO8601(str)** - check if the string is a valid [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date. +- **isIn(str, values)** - check if the string is in a array of allowed values. +- **isInt(str [, options])** - check if the string is an integer. `options` is an object which can contain the keys `min` and/or `max` to check the integer is within boundaries (e.g. `{ min: 10, max: 99 }`). `options` can also contain the key `allow_leading_zeroes`, which when set to true will accept integer values with leading zeroes (e.g. `{ allow_leading_zeroes: true }`). +- **isJSON(str)** - check if the string is valid JSON (note: uses JSON.parse). +- **isLength(str, options)** - check if the string's length falls in a range. `options` is an object which defaults to `{min:0, max: undefined}`. Note: this function takes into account surrogate pairs. +- **isLowercase(str)** - check if the string is lowercase. +- **isMACAddress(str)** - check if the string is a MAC address. +- **isMD5(str)** - check if the string is a MD5 hash. +- **isMobilePhone(str, locale)** - check if the string is a mobile phone number, (locale is one of `['ar-DZ', 'ar-SA', 'ar-SY', 'cs-CZ', 'de-DE', 'da-DK', 'el-GR', 'en-AU', 'en-GB', 'en-HK', 'en-IN', 'en-NZ', 'en-US', 'en-CA', 'en-ZA', 'en-ZM', 'es-ES', 'fi-FI', 'fr-FR', 'hu-HU', 'it-IT', 'ja-JP', 'ms-MY', 'nb-NO', 'nn-NO', 'pl-PL', 'pt-PT', 'ru-RU', 'sr-RS', 'tr-TR', 'vi-VN', 'zh-CN', 'zh-TW']`). +- **isMongoId(str)** - check if the string is a valid hex-encoded representation of a [MongoDB ObjectId][mongoid]. +- **isMultibyte(str)** - check if the string contains one or more multibyte chars. +- **isNull(str)** - check if the string is null (has a length of zero). +- **isNumeric(str)** - check if the string contains only numbers. +- **isSurrogatePair(str)** - check if the string contains any surrogate pairs chars. +- **isURL(str [, options])** - check if the string is an URL. `options` is an object which defaults to `{ protocols: ['http','https','ftp'], require_tld: true, require_protocol: false, require_host: true, require_valid_protocol: true, allow_underscores: false, host_whitelist: false, host_blacklist: false, allow_trailing_dot: false, allow_protocol_relative_urls: false }`. +- **isUUID(str [, version])** - check if the string is a UUID (version 3, 4 or 5). +- **isUppercase(str)** - check if the string is uppercase. +- **isVariableWidth(str)** - check if the string contains a mixture of full and half-width chars. +- **isWhitelisted(str, chars)** - checks characters if they appear in the whitelist. +- **matches(str, pattern [, modifiers])** - check if string matches the pattern. Either `matches('foo', /foo/i)` or `matches('foo', 'foo', 'i')`. + +### Sanitizers + +- **blacklist(input, chars)** - remove characters that appear in the blacklist. The characters are used in a RegExp and so you will need to escape some chars, e.g. `blacklist(input, '\\[\\]')`. +- **escape(input)** - replace `<`, `>`, `&`, `'`, `"` and `/` with HTML entities. +- **unescape(input)** - replaces HTML encoded entities with `<`, `>`, `&`, `'`, `"` and `/`. +- **ltrim(input [, chars])** - trim characters from the left-side of the input. +- **normalizeEmail(email [, options])** - canonicalize an email address. `options` is an object which defaults to `{ lowercase: true, remove_dots: true, remove_extension: true }`. With `lowercase` set to `true`, the local part of the email address is lowercased for all domains; the hostname is always lowercased and the local part of the email address is always lowercased for hosts that are known to be case-insensitive (currently only GMail). Normalization follows special rules for known providers: currently, GMail addresses have dots removed in the local part and are stripped of extensions (e.g. `some.one+extension@gmail.com` becomes `someone@gmail.com`) and all `@googlemail.com` addresses are normalized to `@gmail.com`. +- **rtrim(input [, chars])** - trim characters from the right-side of the input. +- **stripLow(input [, keep_new_lines])** - remove characters with a numerical value < 32 and 127, mostly control characters. If `keep_new_lines` is `true`, newline characters are preserved (`\n` and `\r`, hex `0xA` and `0xD`). Unicode-safe in JavaScript. +- **toBoolean(input [, strict])** - convert the input string to a boolean. Everything except for `'0'`, `'false'` and `''` returns `true`. In strict mode only `'1'` and `'true'` return `true`. +- **toDate(input)** - convert the input string to a date, or `null` if the input is not a date. +- **toFloat(input)** - convert the input string to a float, or `NaN` if the input is not a float. +- **toInt(input [, radix])** - convert the input string to an integer, or `NaN` if the input is not an integer. +- **trim(input [, chars])** - trim characters (whitespace by default) from both sides of the input. +- **whitelist(input, chars)** - remove characters that do not appear in the whitelist. The characters are used in a RegExp and so you will need to escape some chars, e.g. `whitelist(input, '\\[\\]')`. + +### XSS Sanitization + +XSS sanitization was removed from the library in [2d5d6999](https://github.com/chriso/validator.js/commit/2d5d6999541add350fb396ef02dc42ca3215049e). + +For an alternative, have a look at Yahoo's [xss-filters library](https://github.com/yahoo/xss-filters) or at [DOMPurify](https://github.com/cure53/DOMPurify). + +### Tests + +```sh +$ npm test +``` + +### Reading + +Remember, validating can be troublesome sometimes. See [A list of articles about programming assumptions commonly made that aren't true](https://github.com/jameslk/awesome-falsehoods). + +### License (MIT) + +``` +Copyright (c) 2016 Chris O'Hara + +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. +``` + +[downloads-image]: http://img.shields.io/npm/dm/validator.svg + +[npm-url]: https://npmjs.org/package/validator +[npm-image]: http://img.shields.io/npm/v/validator.svg + +[travis-url]: https://travis-ci.org/chriso/validator.js +[travis-image]: http://img.shields.io/travis/chriso/validator.js.svg + +[coveralls-url]: https://coveralls.io/r/chriso/validator.js +[coveralls-image]: http://img.shields.io/coveralls/chriso/validator.js/master.svg + +[amd]: http://requirejs.org/docs/whyamd.html +[bower]: http://bower.io/ + +[mongoid]: http://docs.mongodb.org/manual/reference/object-id/ +[ISIN]: https://en.wikipedia.org/wiki/International_Securities_Identification_Number diff --git a/node_modules/validator/index.js b/node_modules/validator/index.js new file mode 100644 index 0000000..1308233 --- /dev/null +++ b/node_modules/validator/index.js @@ -0,0 +1,286 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _toDate = require('./lib/toDate'); + +var _toDate2 = _interopRequireDefault(_toDate); + +var _toFloat = require('./lib/toFloat'); + +var _toFloat2 = _interopRequireDefault(_toFloat); + +var _toInt = require('./lib/toInt'); + +var _toInt2 = _interopRequireDefault(_toInt); + +var _toBoolean = require('./lib/toBoolean'); + +var _toBoolean2 = _interopRequireDefault(_toBoolean); + +var _equals = require('./lib/equals'); + +var _equals2 = _interopRequireDefault(_equals); + +var _contains = require('./lib/contains'); + +var _contains2 = _interopRequireDefault(_contains); + +var _matches = require('./lib/matches'); + +var _matches2 = _interopRequireDefault(_matches); + +var _isEmail = require('./lib/isEmail'); + +var _isEmail2 = _interopRequireDefault(_isEmail); + +var _isURL = require('./lib/isURL'); + +var _isURL2 = _interopRequireDefault(_isURL); + +var _isMACAddress = require('./lib/isMACAddress'); + +var _isMACAddress2 = _interopRequireDefault(_isMACAddress); + +var _isIP = require('./lib/isIP'); + +var _isIP2 = _interopRequireDefault(_isIP); + +var _isFQDN = require('./lib/isFQDN'); + +var _isFQDN2 = _interopRequireDefault(_isFQDN); + +var _isBoolean = require('./lib/isBoolean'); + +var _isBoolean2 = _interopRequireDefault(_isBoolean); + +var _isAlpha = require('./lib/isAlpha'); + +var _isAlpha2 = _interopRequireDefault(_isAlpha); + +var _isAlphanumeric = require('./lib/isAlphanumeric'); + +var _isAlphanumeric2 = _interopRequireDefault(_isAlphanumeric); + +var _isNumeric = require('./lib/isNumeric'); + +var _isNumeric2 = _interopRequireDefault(_isNumeric); + +var _isLowercase = require('./lib/isLowercase'); + +var _isLowercase2 = _interopRequireDefault(_isLowercase); + +var _isUppercase = require('./lib/isUppercase'); + +var _isUppercase2 = _interopRequireDefault(_isUppercase); + +var _isAscii = require('./lib/isAscii'); + +var _isAscii2 = _interopRequireDefault(_isAscii); + +var _isFullWidth = require('./lib/isFullWidth'); + +var _isFullWidth2 = _interopRequireDefault(_isFullWidth); + +var _isHalfWidth = require('./lib/isHalfWidth'); + +var _isHalfWidth2 = _interopRequireDefault(_isHalfWidth); + +var _isVariableWidth = require('./lib/isVariableWidth'); + +var _isVariableWidth2 = _interopRequireDefault(_isVariableWidth); + +var _isMultibyte = require('./lib/isMultibyte'); + +var _isMultibyte2 = _interopRequireDefault(_isMultibyte); + +var _isSurrogatePair = require('./lib/isSurrogatePair'); + +var _isSurrogatePair2 = _interopRequireDefault(_isSurrogatePair); + +var _isInt = require('./lib/isInt'); + +var _isInt2 = _interopRequireDefault(_isInt); + +var _isFloat = require('./lib/isFloat'); + +var _isFloat2 = _interopRequireDefault(_isFloat); + +var _isDecimal = require('./lib/isDecimal'); + +var _isDecimal2 = _interopRequireDefault(_isDecimal); + +var _isHexadecimal = require('./lib/isHexadecimal'); + +var _isHexadecimal2 = _interopRequireDefault(_isHexadecimal); + +var _isDivisibleBy = require('./lib/isDivisibleBy'); + +var _isDivisibleBy2 = _interopRequireDefault(_isDivisibleBy); + +var _isHexColor = require('./lib/isHexColor'); + +var _isHexColor2 = _interopRequireDefault(_isHexColor); + +var _isMD = require('./lib/isMD5'); + +var _isMD2 = _interopRequireDefault(_isMD); + +var _isJSON = require('./lib/isJSON'); + +var _isJSON2 = _interopRequireDefault(_isJSON); + +var _isNull = require('./lib/isNull'); + +var _isNull2 = _interopRequireDefault(_isNull); + +var _isLength = require('./lib/isLength'); + +var _isLength2 = _interopRequireDefault(_isLength); + +var _isByteLength = require('./lib/isByteLength'); + +var _isByteLength2 = _interopRequireDefault(_isByteLength); + +var _isUUID = require('./lib/isUUID'); + +var _isUUID2 = _interopRequireDefault(_isUUID); + +var _isMongoId = require('./lib/isMongoId'); + +var _isMongoId2 = _interopRequireDefault(_isMongoId); + +var _isDate = require('./lib/isDate'); + +var _isDate2 = _interopRequireDefault(_isDate); + +var _isAfter = require('./lib/isAfter'); + +var _isAfter2 = _interopRequireDefault(_isAfter); + +var _isBefore = require('./lib/isBefore'); + +var _isBefore2 = _interopRequireDefault(_isBefore); + +var _isIn = require('./lib/isIn'); + +var _isIn2 = _interopRequireDefault(_isIn); + +var _isCreditCard = require('./lib/isCreditCard'); + +var _isCreditCard2 = _interopRequireDefault(_isCreditCard); + +var _isISIN = require('./lib/isISIN'); + +var _isISIN2 = _interopRequireDefault(_isISIN); + +var _isISBN = require('./lib/isISBN'); + +var _isISBN2 = _interopRequireDefault(_isISBN); + +var _isMobilePhone = require('./lib/isMobilePhone'); + +var _isMobilePhone2 = _interopRequireDefault(_isMobilePhone); + +var _isCurrency = require('./lib/isCurrency'); + +var _isCurrency2 = _interopRequireDefault(_isCurrency); + +var _isISO = require('./lib/isISO8601'); + +var _isISO2 = _interopRequireDefault(_isISO); + +var _isBase = require('./lib/isBase64'); + +var _isBase2 = _interopRequireDefault(_isBase); + +var _isDataURI = require('./lib/isDataURI'); + +var _isDataURI2 = _interopRequireDefault(_isDataURI); + +var _ltrim = require('./lib/ltrim'); + +var _ltrim2 = _interopRequireDefault(_ltrim); + +var _rtrim = require('./lib/rtrim'); + +var _rtrim2 = _interopRequireDefault(_rtrim); + +var _trim = require('./lib/trim'); + +var _trim2 = _interopRequireDefault(_trim); + +var _escape = require('./lib/escape'); + +var _escape2 = _interopRequireDefault(_escape); + +var _unescape = require('./lib/unescape'); + +var _unescape2 = _interopRequireDefault(_unescape); + +var _stripLow = require('./lib/stripLow'); + +var _stripLow2 = _interopRequireDefault(_stripLow); + +var _whitelist = require('./lib/whitelist'); + +var _whitelist2 = _interopRequireDefault(_whitelist); + +var _blacklist = require('./lib/blacklist'); + +var _blacklist2 = _interopRequireDefault(_blacklist); + +var _isWhitelisted = require('./lib/isWhitelisted'); + +var _isWhitelisted2 = _interopRequireDefault(_isWhitelisted); + +var _normalizeEmail = require('./lib/normalizeEmail'); + +var _normalizeEmail2 = _interopRequireDefault(_normalizeEmail); + +var _toString = require('./lib/util/toString'); + +var _toString2 = _interopRequireDefault(_toString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var version = '5.7.0'; + +var validator = { + version: version, + toDate: _toDate2.default, + toFloat: _toFloat2.default, toInt: _toInt2.default, + toBoolean: _toBoolean2.default, + equals: _equals2.default, contains: _contains2.default, matches: _matches2.default, + isEmail: _isEmail2.default, isURL: _isURL2.default, isMACAddress: _isMACAddress2.default, isIP: _isIP2.default, isFQDN: _isFQDN2.default, + isBoolean: _isBoolean2.default, + isAlpha: _isAlpha2.default, isAlphanumeric: _isAlphanumeric2.default, isNumeric: _isNumeric2.default, isLowercase: _isLowercase2.default, isUppercase: _isUppercase2.default, + isAscii: _isAscii2.default, isFullWidth: _isFullWidth2.default, isHalfWidth: _isHalfWidth2.default, isVariableWidth: _isVariableWidth2.default, + isMultibyte: _isMultibyte2.default, isSurrogatePair: _isSurrogatePair2.default, + isInt: _isInt2.default, isFloat: _isFloat2.default, isDecimal: _isDecimal2.default, isHexadecimal: _isHexadecimal2.default, isDivisibleBy: _isDivisibleBy2.default, + isHexColor: _isHexColor2.default, + isMD5: _isMD2.default, + isJSON: _isJSON2.default, + isNull: _isNull2.default, + isLength: _isLength2.default, isByteLength: _isByteLength2.default, + isUUID: _isUUID2.default, isMongoId: _isMongoId2.default, + isDate: _isDate2.default, isAfter: _isAfter2.default, isBefore: _isBefore2.default, + isIn: _isIn2.default, + isCreditCard: _isCreditCard2.default, + isISIN: _isISIN2.default, isISBN: _isISBN2.default, + isMobilePhone: _isMobilePhone2.default, + isCurrency: _isCurrency2.default, + isISO8601: _isISO2.default, + isBase64: _isBase2.default, isDataURI: _isDataURI2.default, + ltrim: _ltrim2.default, rtrim: _rtrim2.default, trim: _trim2.default, + escape: _escape2.default, unescape: _unescape2.default, stripLow: _stripLow2.default, + whitelist: _whitelist2.default, blacklist: _blacklist2.default, + isWhitelisted: _isWhitelisted2.default, + normalizeEmail: _normalizeEmail2.default, + toString: _toString2.default +}; + +exports.default = validator; +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/alpha.js b/node_modules/validator/lib/alpha.js new file mode 100644 index 0000000..3344edb --- /dev/null +++ b/node_modules/validator/lib/alpha.js @@ -0,0 +1,58 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var alpha = exports.alpha = { + 'en-US': /^[A-Z]+$/i, + 'cs-CZ': /^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i, + 'de-DE': /^[A-ZÄÖÜß]+$/i, + 'es-ES': /^[A-ZÁÉÍÑÓÚÜ]+$/i, + 'fr-FR': /^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i, + 'nl-NL': /^[A-ZÉËÏÓÖÜ]+$/i, + 'hu-HU': /^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i, + 'pl-PL': /^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i, + 'pt-PT': /^[A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]+$/i, + 'ru-RU': /^[А-ЯЁ]+$/i, + 'sr-RS@latin': /^[A-ZČĆŽŠĐ]+$/i, + 'sr-RS': /^[А-ЯЂЈЉЊЋЏ]+$/i, + 'tr-TR': /^[A-ZÇĞİıÖŞÜ]+$/i, + ar: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/ +}; + +var alphanumeric = exports.alphanumeric = { + 'en-US': /^[0-9A-Z]+$/i, + 'cs-CZ': /^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i, + 'de-DE': /^[0-9A-ZÄÖÜß]+$/i, + 'es-ES': /^[0-9A-ZÁÉÍÑÓÚÜ]+$/i, + 'fr-FR': /^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i, + 'hu-HU': /^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i, + 'nl-NL': /^[0-9A-ZÉËÏÓÖÜ]+$/i, + 'pl-PL': /^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i, + 'pt-PT': /^[0-9A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]+$/i, + 'ru-RU': /^[0-9А-ЯЁ]+$/i, + 'sr-RS@latin': /^[0-9A-ZČĆŽŠĐ]+$/i, + 'sr-RS': /^[0-9А-ЯЂЈЉЊЋЏ]+$/i, + 'tr-TR': /^[0-9A-ZÇĞİıÖŞÜ]+$/i, + ar: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/ +}; + +var englishLocales = exports.englishLocales = ['AU', 'GB', 'HK', 'IN', 'NZ', 'ZA', 'ZM']; + +for (var locale, i = 0; i < englishLocales.length; i++) { + locale = 'en-' + englishLocales[i]; + alpha[locale] = alpha['en-US']; + alphanumeric[locale] = alphanumeric['en-US']; +} + +alpha['pt-BR'] = alpha['pt-PT']; +alphanumeric['pt-BR'] = alphanumeric['pt-PT']; + +// Source: http://www.localeplanet.com/java/ +var arabicLocales = exports.arabicLocales = ['AE', 'BH', 'DZ', 'EG', 'IQ', 'JO', 'KW', 'LB', 'LY', 'MA', 'QM', 'QA', 'SA', 'SD', 'SY', 'TN', 'YE']; + +for (var _locale, _i = 0; _i < arabicLocales.length; _i++) { + _locale = 'ar-' + arabicLocales[_i]; + alpha[_locale] = alpha.ar; + alphanumeric[_locale] = alphanumeric.ar; +} \ No newline at end of file diff --git a/node_modules/validator/lib/blacklist.js b/node_modules/validator/lib/blacklist.js new file mode 100644 index 0000000..41ecdf0 --- /dev/null +++ b/node_modules/validator/lib/blacklist.js @@ -0,0 +1,18 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = blacklist; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function blacklist(str, chars) { + (0, _assertString2.default)(str); + return str.replace(new RegExp('[' + chars + ']+', 'g'), ''); +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/contains.js b/node_modules/validator/lib/contains.js new file mode 100644 index 0000000..025e801 --- /dev/null +++ b/node_modules/validator/lib/contains.js @@ -0,0 +1,22 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = contains; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +var _toString = require('./util/toString'); + +var _toString2 = _interopRequireDefault(_toString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function contains(str, elem) { + (0, _assertString2.default)(str); + return str.indexOf((0, _toString2.default)(elem)) >= 0; +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/equals.js b/node_modules/validator/lib/equals.js new file mode 100644 index 0000000..30ac76a --- /dev/null +++ b/node_modules/validator/lib/equals.js @@ -0,0 +1,18 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = equals; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function equals(str, comparison) { + (0, _assertString2.default)(str); + return str === comparison; +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/escape.js b/node_modules/validator/lib/escape.js new file mode 100644 index 0000000..bc6f5c7 --- /dev/null +++ b/node_modules/validator/lib/escape.js @@ -0,0 +1,18 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = escape; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function escape(str) { + (0, _assertString2.default)(str); + return str.replace(/&/g, '&').replace(/"/g, '"').replace(/'/g, ''').replace(//g, '>').replace(/\//g, '/').replace(/`/g, '`'); +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isAfter.js b/node_modules/validator/lib/isAfter.js new file mode 100644 index 0000000..6fe8622 --- /dev/null +++ b/node_modules/validator/lib/isAfter.js @@ -0,0 +1,26 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isAfter; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +var _toDate = require('./toDate'); + +var _toDate2 = _interopRequireDefault(_toDate); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isAfter(str) { + var date = arguments.length <= 1 || arguments[1] === undefined ? String(new Date()) : arguments[1]; + + (0, _assertString2.default)(str); + var comparison = (0, _toDate2.default)(date); + var original = (0, _toDate2.default)(str); + return !!(original && comparison && original > comparison); +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isAlpha.js b/node_modules/validator/lib/isAlpha.js new file mode 100644 index 0000000..ad6bd34 --- /dev/null +++ b/node_modules/validator/lib/isAlpha.js @@ -0,0 +1,25 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isAlpha; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +var _alpha = require('./alpha'); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isAlpha(str) { + var locale = arguments.length <= 1 || arguments[1] === undefined ? 'en-US' : arguments[1]; + + (0, _assertString2.default)(str); + if (locale in _alpha.alpha) { + return _alpha.alpha[locale].test(str); + } + throw new Error('Invalid locale \'' + locale + '\''); +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isAlphanumeric.js b/node_modules/validator/lib/isAlphanumeric.js new file mode 100644 index 0000000..05c0254 --- /dev/null +++ b/node_modules/validator/lib/isAlphanumeric.js @@ -0,0 +1,25 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isAlphanumeric; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +var _alpha = require('./alpha'); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isAlphanumeric(str) { + var locale = arguments.length <= 1 || arguments[1] === undefined ? 'en-US' : arguments[1]; + + (0, _assertString2.default)(str); + if (locale in _alpha.alphanumeric) { + return _alpha.alphanumeric[locale].test(str); + } + throw new Error('Invalid locale \'' + locale + '\''); +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isAscii.js b/node_modules/validator/lib/isAscii.js new file mode 100644 index 0000000..55171e8 --- /dev/null +++ b/node_modules/validator/lib/isAscii.js @@ -0,0 +1,22 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isAscii; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/* eslint-disable no-control-regex */ +var ascii = /^[\x00-\x7F]+$/; +/* eslint-enable no-control-regex */ + +function isAscii(str) { + (0, _assertString2.default)(str); + return ascii.test(str); +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isBase64.js b/node_modules/validator/lib/isBase64.js new file mode 100644 index 0000000..0b4a807 --- /dev/null +++ b/node_modules/validator/lib/isBase64.js @@ -0,0 +1,25 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isBase64; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var notBase64 = /[^A-Z0-9+\/=]/i; + +function isBase64(str) { + (0, _assertString2.default)(str); + var len = str.length; + if (!len || len % 4 !== 0 || notBase64.test(str)) { + return false; + } + var firstPaddingChar = str.indexOf('='); + return firstPaddingChar === -1 || firstPaddingChar === len - 1 || firstPaddingChar === len - 2 && str[len - 1] === '='; +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isBefore.js b/node_modules/validator/lib/isBefore.js new file mode 100644 index 0000000..d023f11 --- /dev/null +++ b/node_modules/validator/lib/isBefore.js @@ -0,0 +1,26 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isBefore; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +var _toDate = require('./toDate'); + +var _toDate2 = _interopRequireDefault(_toDate); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isBefore(str) { + var date = arguments.length <= 1 || arguments[1] === undefined ? String(new Date()) : arguments[1]; + + (0, _assertString2.default)(str); + var comparison = (0, _toDate2.default)(date); + var original = (0, _toDate2.default)(str); + return !!(original && comparison && original < comparison); +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isBoolean.js b/node_modules/validator/lib/isBoolean.js new file mode 100644 index 0000000..7dbd26f --- /dev/null +++ b/node_modules/validator/lib/isBoolean.js @@ -0,0 +1,18 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isBoolean; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isBoolean(str) { + (0, _assertString2.default)(str); + return ['true', 'false', '1', '0'].indexOf(str) >= 0; +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isByteLength.js b/node_modules/validator/lib/isByteLength.js new file mode 100644 index 0000000..bdb5a39 --- /dev/null +++ b/node_modules/validator/lib/isByteLength.js @@ -0,0 +1,33 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + +exports.default = isByteLength; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/* eslint-disable prefer-rest-params */ +function isByteLength(str, options) { + (0, _assertString2.default)(str); + var min = void 0; + var max = void 0; + if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object') { + min = options.min || 0; + max = options.max; + } else { + // backwards compatibility: isByteLength(str, min [, max]) + min = arguments[1]; + max = arguments[2]; + } + var len = encodeURI(str).split(/%..|./).length - 1; + return len >= min && (typeof max === 'undefined' || len <= max); +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isCreditCard.js b/node_modules/validator/lib/isCreditCard.js new file mode 100644 index 0000000..d613393 --- /dev/null +++ b/node_modules/validator/lib/isCreditCard.js @@ -0,0 +1,45 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isCreditCard; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/* eslint-disable max-len */ +var creditCard = /^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})|62[0-9]{14}$/; +/* eslint-enable max-len */ + +function isCreditCard(str) { + (0, _assertString2.default)(str); + var sanitized = str.replace(/[^0-9]+/g, ''); + if (!creditCard.test(sanitized)) { + return false; + } + var sum = 0; + var digit = void 0; + var tmpNum = void 0; + var shouldDouble = void 0; + for (var i = sanitized.length - 1; i >= 0; i--) { + digit = sanitized.substring(i, i + 1); + tmpNum = parseInt(digit, 10); + if (shouldDouble) { + tmpNum *= 2; + if (tmpNum >= 10) { + sum += tmpNum % 10 + 1; + } else { + sum += tmpNum; + } + } else { + sum += tmpNum; + } + shouldDouble = !shouldDouble; + } + return !!(sum % 10 === 0 ? sanitized : false); +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isCurrency.js b/node_modules/validator/lib/isCurrency.js new file mode 100644 index 0000000..8d95c73 --- /dev/null +++ b/node_modules/validator/lib/isCurrency.js @@ -0,0 +1,88 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isCurrency; + +var _merge = require('./util/merge'); + +var _merge2 = _interopRequireDefault(_merge); + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function currencyRegex(options) { + var symbol = '(\\' + options.symbol.replace(/\./g, '\\.') + ')' + (options.require_symbol ? '' : '?'), + negative = '-?', + whole_dollar_amount_without_sep = '[1-9]\\d*', + whole_dollar_amount_with_sep = '[1-9]\\d{0,2}(\\' + options.thousands_separator + '\\d{3})*', + valid_whole_dollar_amounts = ['0', whole_dollar_amount_without_sep, whole_dollar_amount_with_sep], + whole_dollar_amount = '(' + valid_whole_dollar_amounts.join('|') + ')?', + decimal_amount = '(\\' + options.decimal_separator + '\\d{2})?'; + var pattern = whole_dollar_amount + decimal_amount; + + // default is negative sign before symbol, but there are two other options (besides parens) + if (options.allow_negatives && !options.parens_for_negatives) { + if (options.negative_sign_after_digits) { + pattern += negative; + } else if (options.negative_sign_before_digits) { + pattern = negative + pattern; + } + } + + // South African Rand, for example, uses R 123 (space) and R-123 (no space) + if (options.allow_negative_sign_placeholder) { + pattern = '( (?!\\-))?' + pattern; + } else if (options.allow_space_after_symbol) { + pattern = ' ?' + pattern; + } else if (options.allow_space_after_digits) { + pattern += '( (?!$))?'; + } + + if (options.symbol_after_digits) { + pattern += symbol; + } else { + pattern = symbol + pattern; + } + + if (options.allow_negatives) { + if (options.parens_for_negatives) { + pattern = '(\\(' + pattern + '\\)|' + pattern + ')'; + } else if (!(options.negative_sign_before_digits || options.negative_sign_after_digits)) { + pattern = negative + pattern; + } + } + + /* eslint-disable prefer-template */ + return new RegExp('^' + + // ensure there's a dollar and/or decimal amount, and that + // it doesn't start with a space or a negative sign followed by a space + '(?!-? )(?=.*\\d)' + pattern + '$'); + /* eslint-enable prefer-template */ +} + +var default_currency_options = { + symbol: '$', + require_symbol: false, + allow_space_after_symbol: false, + symbol_after_digits: false, + allow_negatives: true, + parens_for_negatives: false, + negative_sign_before_digits: false, + negative_sign_after_digits: false, + allow_negative_sign_placeholder: false, + thousands_separator: ',', + decimal_separator: '.', + allow_space_after_digits: false +}; + +function isCurrency(str, options) { + (0, _assertString2.default)(str); + options = (0, _merge2.default)(options, default_currency_options); + return currencyRegex(options).test(str); +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isDataURI.js b/node_modules/validator/lib/isDataURI.js new file mode 100644 index 0000000..7ca9fae --- /dev/null +++ b/node_modules/validator/lib/isDataURI.js @@ -0,0 +1,20 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isDataURI; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var dataURI = /^\s*data:([a-z]+\/[a-z0-9\-\+]+(;[a-z\-]+=[a-z0-9\-]+)?)?(;base64)?,[a-z0-9!\$&',\(\)\*\+,;=\-\._~:@\/\?%\s]*\s*$/i; // eslint-disable-line max-len + +function isDataURI(str) { + (0, _assertString2.default)(str); + return dataURI.test(str); +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isDate.js b/node_modules/validator/lib/isDate.js new file mode 100644 index 0000000..0e64163 --- /dev/null +++ b/node_modules/validator/lib/isDate.js @@ -0,0 +1,100 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isDate; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +var _isISO = require('./isISO8601'); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getTimezoneOffset(str) { + var iso8601Parts = str.match(_isISO.iso8601); + var timezone = void 0, + sign = void 0, + hours = void 0, + minutes = void 0; + if (!iso8601Parts) { + str = str.toLowerCase(); + timezone = str.match(/(?:\s|gmt\s*)(-|\+)(\d{1,4})(\s|$)/); + if (!timezone) { + return str.indexOf('gmt') !== -1 ? 0 : null; + } + sign = timezone[1]; + var offset = timezone[2]; + if (offset.length === 3) { + offset = '0' + offset; + } + if (offset.length <= 2) { + hours = 0; + minutes = parseInt(offset, 10); + } else { + hours = parseInt(offset.slice(0, 2), 10); + minutes = parseInt(offset.slice(2, 4), 10); + } + } else { + timezone = iso8601Parts[21]; + if (!timezone) { + // if no hour/minute was provided, the date is GMT + return !iso8601Parts[12] ? 0 : null; + } + if (timezone === 'z' || timezone === 'Z') { + return 0; + } + sign = iso8601Parts[22]; + if (timezone.indexOf(':') !== -1) { + hours = parseInt(iso8601Parts[23], 10); + minutes = parseInt(iso8601Parts[24], 10); + } else { + hours = 0; + minutes = parseInt(iso8601Parts[23], 10); + } + } + return (hours * 60 + minutes) * (sign === '-' ? 1 : -1); +} + +function isDate(str) { + (0, _assertString2.default)(str); + var normalizedDate = new Date(Date.parse(str)); + if (isNaN(normalizedDate)) { + return false; + } + + // normalizedDate is in the user's timezone. Apply the input + // timezone offset to the date so that the year and day match + // the input + var timezoneOffset = getTimezoneOffset(str); + if (timezoneOffset !== null) { + var timezoneDifference = normalizedDate.getTimezoneOffset() - timezoneOffset; + normalizedDate = new Date(normalizedDate.getTime() + 60000 * timezoneDifference); + } + + var day = String(normalizedDate.getDate()); + var dayOrYear = void 0, + dayOrYearMatches = void 0, + year = void 0; + // check for valid double digits that could be late days + // check for all matches since a string like '12/23' is a valid date + // ignore everything with nearby colons + dayOrYearMatches = str.match(/(^|[^:\d])[23]\d([^T:\d]|$)/g); + if (!dayOrYearMatches) { + return true; + } + dayOrYear = dayOrYearMatches.map(function (digitString) { + return digitString.match(/\d+/g)[0]; + }).join('/'); + + year = String(normalizedDate.getFullYear()).slice(-2); + if (dayOrYear === day || dayOrYear === year) { + return true; + } else if (dayOrYear === '' + day / year || dayOrYear === '' + year / day) { + return true; + } + return false; +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isDecimal.js b/node_modules/validator/lib/isDecimal.js new file mode 100644 index 0000000..c803c5b --- /dev/null +++ b/node_modules/validator/lib/isDecimal.js @@ -0,0 +1,20 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isDecimal; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var decimal = /^[-+]?([0-9]+|\.[0-9]+|[0-9]+\.[0-9]+)$/; + +function isDecimal(str) { + (0, _assertString2.default)(str); + return str !== '' && decimal.test(str); +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isDivisibleBy.js b/node_modules/validator/lib/isDivisibleBy.js new file mode 100644 index 0000000..1336039 --- /dev/null +++ b/node_modules/validator/lib/isDivisibleBy.js @@ -0,0 +1,22 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isDivisibleBy; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +var _toFloat = require('./toFloat'); + +var _toFloat2 = _interopRequireDefault(_toFloat); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isDivisibleBy(str, num) { + (0, _assertString2.default)(str); + return (0, _toFloat2.default)(str) % parseInt(num, 10) === 0; +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isEmail.js b/node_modules/validator/lib/isEmail.js new file mode 100644 index 0000000..a6dd6bd --- /dev/null +++ b/node_modules/validator/lib/isEmail.js @@ -0,0 +1,86 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isEmail; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +var _merge = require('./util/merge'); + +var _merge2 = _interopRequireDefault(_merge); + +var _isByteLength = require('./isByteLength'); + +var _isByteLength2 = _interopRequireDefault(_isByteLength); + +var _isFQDN = require('./isFQDN'); + +var _isFQDN2 = _interopRequireDefault(_isFQDN); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var default_email_options = { + allow_display_name: false, + allow_utf8_local_part: true, + require_tld: true +}; + +/* eslint-disable max-len */ +/* eslint-disable no-control-regex */ +var displayName = /^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF\s]*<(.+)>$/i; +var emailUserPart = /^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i; +var quotedEmailUser = /^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i; +var emailUserUtf8Part = /^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i; +var quotedEmailUserUtf8 = /^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i; +/* eslint-enable max-len */ +/* eslint-enable no-control-regex */ + +function isEmail(str, options) { + (0, _assertString2.default)(str); + options = (0, _merge2.default)(options, default_email_options); + + if (options.allow_display_name) { + var display_email = str.match(displayName); + if (display_email) { + str = display_email[1]; + } + } + + var parts = str.split('@'); + var domain = parts.pop(); + var user = parts.join('@'); + + var lower_domain = domain.toLowerCase(); + if (lower_domain === 'gmail.com' || lower_domain === 'googlemail.com') { + user = user.replace(/\./g, '').toLowerCase(); + } + + if (!(0, _isByteLength2.default)(user, { max: 64 }) || !(0, _isByteLength2.default)(domain, { max: 256 })) { + return false; + } + + if (!(0, _isFQDN2.default)(domain, { require_tld: options.require_tld })) { + return false; + } + + if (user[0] === '"') { + user = user.slice(1, user.length - 1); + return options.allow_utf8_local_part ? quotedEmailUserUtf8.test(user) : quotedEmailUser.test(user); + } + + var pattern = options.allow_utf8_local_part ? emailUserUtf8Part : emailUserPart; + + var user_parts = user.split('.'); + for (var i = 0; i < user_parts.length; i++) { + if (!pattern.test(user_parts[i])) { + return false; + } + } + + return true; +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isFQDN.js b/node_modules/validator/lib/isFQDN.js new file mode 100644 index 0000000..1358700 --- /dev/null +++ b/node_modules/validator/lib/isFQDN.js @@ -0,0 +1,57 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isFDQN; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +var _merge = require('./util/merge'); + +var _merge2 = _interopRequireDefault(_merge); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var default_fqdn_options = { + require_tld: true, + allow_underscores: false, + allow_trailing_dot: false +}; + +function isFDQN(str, options) { + (0, _assertString2.default)(str); + options = (0, _merge2.default)(options, default_fqdn_options); + + /* Remove the optional trailing dot before checking validity */ + if (options.allow_trailing_dot && str[str.length - 1] === '.') { + str = str.substring(0, str.length - 1); + } + var parts = str.split('.'); + if (options.require_tld) { + var tld = parts.pop(); + if (!parts.length || !/^([a-z\u00a1-\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) { + return false; + } + } + for (var part, i = 0; i < parts.length; i++) { + part = parts[i]; + if (options.allow_underscores) { + part = part.replace(/_/g, ''); + } + if (!/^[a-z\u00a1-\uffff0-9-]+$/i.test(part)) { + return false; + } + if (/[\uff01-\uff5e]/.test(part)) { + // disallow full-width chars + return false; + } + if (part[0] === '-' || part[part.length - 1] === '-') { + return false; + } + } + return true; +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isFloat.js b/node_modules/validator/lib/isFloat.js new file mode 100644 index 0000000..a19bcaa --- /dev/null +++ b/node_modules/validator/lib/isFloat.js @@ -0,0 +1,24 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isFloat; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var float = /^(?:[-+]?(?:[0-9]+))?(?:\.[0-9]*)?(?:[eE][\+\-]?(?:[0-9]+))?$/; + +function isFloat(str, options) { + (0, _assertString2.default)(str); + options = options || {}; + if (str === '' || str === '.') { + return false; + } + return float.test(str) && (!options.hasOwnProperty('min') || str >= options.min) && (!options.hasOwnProperty('max') || str <= options.max); +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isFullWidth.js b/node_modules/validator/lib/isFullWidth.js new file mode 100644 index 0000000..4215f81 --- /dev/null +++ b/node_modules/validator/lib/isFullWidth.js @@ -0,0 +1,20 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.fullWidth = undefined; +exports.default = isFullWidth; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var fullWidth = exports.fullWidth = /[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/; + +function isFullWidth(str) { + (0, _assertString2.default)(str); + return fullWidth.test(str); +} \ No newline at end of file diff --git a/node_modules/validator/lib/isHalfWidth.js b/node_modules/validator/lib/isHalfWidth.js new file mode 100644 index 0000000..986c632 --- /dev/null +++ b/node_modules/validator/lib/isHalfWidth.js @@ -0,0 +1,20 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.halfWidth = undefined; +exports.default = isHalfWidth; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var halfWidth = exports.halfWidth = /[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/; + +function isHalfWidth(str) { + (0, _assertString2.default)(str); + return halfWidth.test(str); +} \ No newline at end of file diff --git a/node_modules/validator/lib/isHexColor.js b/node_modules/validator/lib/isHexColor.js new file mode 100644 index 0000000..9063471 --- /dev/null +++ b/node_modules/validator/lib/isHexColor.js @@ -0,0 +1,20 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isHexColor; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var hexcolor = /^#?([0-9A-F]{3}|[0-9A-F]{6})$/i; + +function isHexColor(str) { + (0, _assertString2.default)(str); + return hexcolor.test(str); +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isHexadecimal.js b/node_modules/validator/lib/isHexadecimal.js new file mode 100644 index 0000000..fb7808f --- /dev/null +++ b/node_modules/validator/lib/isHexadecimal.js @@ -0,0 +1,20 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isHexadecimal; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var hexadecimal = /^[0-9A-F]+$/i; + +function isHexadecimal(str) { + (0, _assertString2.default)(str); + return hexadecimal.test(str); +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isIP.js b/node_modules/validator/lib/isIP.js new file mode 100644 index 0000000..483455b --- /dev/null +++ b/node_modules/validator/lib/isIP.js @@ -0,0 +1,81 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isIP; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ipv4Maybe = /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/; +var ipv6Block = /^[0-9A-F]{1,4}$/i; + +function isIP(str) { + var version = arguments.length <= 1 || arguments[1] === undefined ? '' : arguments[1]; + + (0, _assertString2.default)(str); + version = String(version); + if (!version) { + return isIP(str, 4) || isIP(str, 6); + } else if (version === '4') { + if (!ipv4Maybe.test(str)) { + return false; + } + var parts = str.split('.').sort(function (a, b) { + return a - b; + }); + return parts[3] <= 255; + } else if (version === '6') { + var blocks = str.split(':'); + var foundOmissionBlock = false; // marker to indicate :: + + // At least some OS accept the last 32 bits of an IPv6 address + // (i.e. 2 of the blocks) in IPv4 notation, and RFC 3493 says + // that '::ffff:a.b.c.d' is valid for IPv4-mapped IPv6 addresses, + // and '::a.b.c.d' is deprecated, but also valid. + var foundIPv4TransitionBlock = isIP(blocks[blocks.length - 1], 4); + var expectedNumberOfBlocks = foundIPv4TransitionBlock ? 7 : 8; + + if (blocks.length > expectedNumberOfBlocks) { + return false; + } + // initial or final :: + if (str === '::') { + return true; + } else if (str.substr(0, 2) === '::') { + blocks.shift(); + blocks.shift(); + foundOmissionBlock = true; + } else if (str.substr(str.length - 2) === '::') { + blocks.pop(); + blocks.pop(); + foundOmissionBlock = true; + } + + for (var i = 0; i < blocks.length; ++i) { + // test for a :: which can not be at the string start/end + // since those cases have been handled above + if (blocks[i] === '' && i > 0 && i < blocks.length - 1) { + if (foundOmissionBlock) { + return false; // multiple :: in address + } + foundOmissionBlock = true; + } else if (foundIPv4TransitionBlock && i === blocks.length - 1) { + // it has been checked before that the last + // block is a valid IPv4 address + } else if (!ipv6Block.test(blocks[i])) { + return false; + } + } + if (foundOmissionBlock) { + return blocks.length >= 1; + } + return blocks.length === expectedNumberOfBlocks; + } + return false; +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isISBN.js b/node_modules/validator/lib/isISBN.js new file mode 100644 index 0000000..dad9e71 --- /dev/null +++ b/node_modules/validator/lib/isISBN.js @@ -0,0 +1,57 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isISBN; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var isbn10Maybe = /^(?:[0-9]{9}X|[0-9]{10})$/; +var isbn13Maybe = /^(?:[0-9]{13})$/; +var factor = [1, 3]; + +function isISBN(str) { + var version = arguments.length <= 1 || arguments[1] === undefined ? '' : arguments[1]; + + (0, _assertString2.default)(str); + version = String(version); + if (!version) { + return isISBN(str, 10) || isISBN(str, 13); + } + var sanitized = str.replace(/[\s-]+/g, ''); + var checksum = 0; + var i = void 0; + if (version === '10') { + if (!isbn10Maybe.test(sanitized)) { + return false; + } + for (i = 0; i < 9; i++) { + checksum += (i + 1) * sanitized.charAt(i); + } + if (sanitized.charAt(9) === 'X') { + checksum += 10 * 10; + } else { + checksum += 10 * sanitized.charAt(9); + } + if (checksum % 11 === 0) { + return !!sanitized; + } + } else if (version === '13') { + if (!isbn13Maybe.test(sanitized)) { + return false; + } + for (i = 0; i < 12; i++) { + checksum += factor[i % 2] * sanitized.charAt(i); + } + if (sanitized.charAt(12) - (10 - checksum % 10) % 10 === 0) { + return !!sanitized; + } + } + return false; +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isISIN.js b/node_modules/validator/lib/isISIN.js new file mode 100644 index 0000000..feb9725 --- /dev/null +++ b/node_modules/validator/lib/isISIN.js @@ -0,0 +1,48 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isISIN; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var isin = /^[A-Z]{2}[0-9A-Z]{9}[0-9]$/; + +function isISIN(str) { + (0, _assertString2.default)(str); + if (!isin.test(str)) { + return false; + } + + var checksumStr = str.replace(/[A-Z]/g, function (character) { + return parseInt(character, 36); + }); + + var sum = 0; + var digit = void 0; + var tmpNum = void 0; + var shouldDouble = true; + for (var i = checksumStr.length - 2; i >= 0; i--) { + digit = checksumStr.substring(i, i + 1); + tmpNum = parseInt(digit, 10); + if (shouldDouble) { + tmpNum *= 2; + if (tmpNum >= 10) { + sum += tmpNum + 1; + } else { + sum += tmpNum; + } + } else { + sum += tmpNum; + } + shouldDouble = !shouldDouble; + } + + return parseInt(str.substr(str.length - 1), 10) === (10000 - sum) % 10; +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isISO8601.js b/node_modules/validator/lib/isISO8601.js new file mode 100644 index 0000000..edd6ae5 --- /dev/null +++ b/node_modules/validator/lib/isISO8601.js @@ -0,0 +1,22 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.iso8601 = undefined; + +exports.default = function (str) { + (0, _assertString2.default)(str); + return iso8601.test(str); +}; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/* eslint-disable max-len */ +// from http://goo.gl/0ejHHW +var iso8601 = exports.iso8601 = /^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/; +/* eslint-enable max-len */ \ No newline at end of file diff --git a/node_modules/validator/lib/isIn.js b/node_modules/validator/lib/isIn.js new file mode 100644 index 0000000..4dc670b --- /dev/null +++ b/node_modules/validator/lib/isIn.js @@ -0,0 +1,39 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + +exports.default = isIn; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +var _toString = require('./util/toString'); + +var _toString2 = _interopRequireDefault(_toString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isIn(str, options) { + (0, _assertString2.default)(str); + var i = void 0; + if (Object.prototype.toString.call(options) === '[object Array]') { + var array = []; + for (i in options) { + if ({}.hasOwnProperty.call(options, i)) { + array[i] = (0, _toString2.default)(options[i]); + } + } + return array.indexOf(str) >= 0; + } else if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object') { + return options.hasOwnProperty(str); + } else if (options && typeof options.indexOf === 'function') { + return options.indexOf(str) >= 0; + } + return false; +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isInt.js b/node_modules/validator/lib/isInt.js new file mode 100644 index 0000000..8e1ab85 --- /dev/null +++ b/node_modules/validator/lib/isInt.js @@ -0,0 +1,31 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isInt; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var int = /^(?:[-+]?(?:0|[1-9][0-9]*))$/; +var intLeadingZeroes = /^[-+]?[0-9]+$/; + +function isInt(str, options) { + (0, _assertString2.default)(str); + options = options || {}; + + // Get the regex to use for testing, based on whether + // leading zeroes are allowed or not. + var regex = options.hasOwnProperty('allow_leading_zeroes') && options.allow_leading_zeroes ? intLeadingZeroes : int; + + // Check min/max + var minCheckPassed = !options.hasOwnProperty('min') || str >= options.min; + var maxCheckPassed = !options.hasOwnProperty('max') || str <= options.max; + + return regex.test(str) && minCheckPassed && maxCheckPassed; +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isJSON.js b/node_modules/validator/lib/isJSON.js new file mode 100644 index 0000000..8d29fef --- /dev/null +++ b/node_modules/validator/lib/isJSON.js @@ -0,0 +1,25 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + +exports.default = isJSON; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isJSON(str) { + (0, _assertString2.default)(str); + try { + var obj = JSON.parse(str); + return !!obj && (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object'; + } catch (e) {/* ignore */} + return false; +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isLength.js b/node_modules/validator/lib/isLength.js new file mode 100644 index 0000000..3c46041 --- /dev/null +++ b/node_modules/validator/lib/isLength.js @@ -0,0 +1,34 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + +exports.default = isLength; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/* eslint-disable prefer-rest-params */ +function isLength(str, options) { + (0, _assertString2.default)(str); + var min = void 0; + var max = void 0; + if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object') { + min = options.min || 0; + max = options.max; + } else { + // backwards compatibility: isLength(str, min [, max]) + min = arguments[1]; + max = arguments[2]; + } + var surrogatePairs = str.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g) || []; + var len = str.length - surrogatePairs.length; + return len >= min && (typeof max === 'undefined' || len <= max); +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isLowercase.js b/node_modules/validator/lib/isLowercase.js new file mode 100644 index 0000000..556ec67 --- /dev/null +++ b/node_modules/validator/lib/isLowercase.js @@ -0,0 +1,18 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isLowercase; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isLowercase(str) { + (0, _assertString2.default)(str); + return str === str.toLowerCase(); +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isMACAddress.js b/node_modules/validator/lib/isMACAddress.js new file mode 100644 index 0000000..16d1631 --- /dev/null +++ b/node_modules/validator/lib/isMACAddress.js @@ -0,0 +1,20 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isMACAddress; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var macAddress = /^([0-9a-fA-F][0-9a-fA-F]:){5}([0-9a-fA-F][0-9a-fA-F])$/; + +function isMACAddress(str) { + (0, _assertString2.default)(str); + return macAddress.test(str); +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isMD5.js b/node_modules/validator/lib/isMD5.js new file mode 100644 index 0000000..6de9d17 --- /dev/null +++ b/node_modules/validator/lib/isMD5.js @@ -0,0 +1,20 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isMD5; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var md5 = /^[a-f0-9]{32}$/; + +function isMD5(str) { + (0, _assertString2.default)(str); + return md5.test(str); +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isMobilePhone.js b/node_modules/validator/lib/isMobilePhone.js new file mode 100644 index 0000000..3784ca4 --- /dev/null +++ b/node_modules/validator/lib/isMobilePhone.js @@ -0,0 +1,64 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isMobilePhone; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/* eslint-disable max-len */ +var phones = { + 'ar-DZ': /^(\+?213|0)(5|6|7)\d{8}$/, + 'ar-SY': /^(!?(\+?963)|0)?9\d{8}$/, + 'ar-SA': /^(!?(\+?966)|0)?5\d{8}$/, + 'en-US': /^(\+?1)?[2-9]\d{2}[2-9](?!11)\d{6}$/, + 'cs-CZ': /^(\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/, + 'de-DE': /^(\+?49[ \.\-])?([\(]{1}[0-9]{1,6}[\)])?([0-9 \.\-\/]{3,20})((x|ext|extension)[ ]?[0-9]{1,4})?$/, + 'da-DK': /^(\+?45)?(\d{8})$/, + 'el-GR': /^(\+?30)?(69\d{8})$/, + 'en-AU': /^(\+?61|0)4\d{8}$/, + 'en-GB': /^(\+?44|0)7\d{9}$/, + 'en-HK': /^(\+?852\-?)?[569]\d{3}\-?\d{4}$/, + 'en-IN': /^(\+?91|0)?[789]\d{9}$/, + 'en-NZ': /^(\+?64|0)2\d{7,9}$/, + 'en-ZA': /^(\+?27|0)\d{9}$/, + 'en-ZM': /^(\+?26)?09[567]\d{7}$/, + 'es-ES': /^(\+?34)?(6\d{1}|7[1234])\d{7}$/, + 'fi-FI': /^(\+?358|0)\s?(4(0|1|2|4|5)?|50)\s?(\d\s?){4,8}\d$/, + 'fr-FR': /^(\+?33|0)[67]\d{8}$/, + 'hu-HU': /^(\+?36)(20|30|70)\d{7}$/, + 'it-IT': /^(\+?39)?\s?3\d{2} ?\d{6,7}$/, + 'ja-JP': /^(\+?81|0)\d{1,4}[ \-]?\d{1,4}[ \-]?\d{4}$/, + 'ms-MY': /^(\+?6?01){1}(([145]{1}(\-|\s)?\d{7,8})|([236789]{1}(\s|\-)?\d{7}))$/, + 'nb-NO': /^(\+?47)?[49]\d{7}$/, + 'nl-BE': /^(\+?32|0)4?\d{8}$/, + 'nn-NO': /^(\+?47)?[49]\d{7}$/, + 'pl-PL': /^(\+?48)? ?[5-8]\d ?\d{3} ?\d{2} ?\d{2}$/, + 'pt-BR': /^(\+?55|0)\-?[1-9]{2}\-?[2-9]{1}\d{3,4}\-?\d{4}$/, + 'pt-PT': /^(\+?351)?9[1236]\d{7}$/, + 'ru-RU': /^(\+?7|8)?9\d{9}$/, + 'sr-RS': /^(\+3816|06)[- \d]{5,9}$/, + 'tr-TR': /^(\+?90|0)?5\d{9}$/, + 'vi-VN': /^(\+?84|0)?((1(2([0-9])|6([2-9])|88|99))|(9((?!5)[0-9])))([0-9]{7})$/, + 'zh-CN': /^(\+?0?86\-?)?1[345789]\d{9}$/, + 'zh-TW': /^(\+?886\-?|0)?9\d{8}$/ +}; +/* eslint-enable max-len */ + +// aliases +phones['en-CA'] = phones['en-US']; +phones['fr-BE'] = phones['nl-BE']; + +function isMobilePhone(str, locale) { + (0, _assertString2.default)(str); + if (locale in phones) { + return phones[locale].test(str); + } + return false; +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isMongoId.js b/node_modules/validator/lib/isMongoId.js new file mode 100644 index 0000000..62646bf --- /dev/null +++ b/node_modules/validator/lib/isMongoId.js @@ -0,0 +1,22 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isMongoId; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +var _isHexadecimal = require('./isHexadecimal'); + +var _isHexadecimal2 = _interopRequireDefault(_isHexadecimal); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isMongoId(str) { + (0, _assertString2.default)(str); + return (0, _isHexadecimal2.default)(str) && str.length === 24; +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isMultibyte.js b/node_modules/validator/lib/isMultibyte.js new file mode 100644 index 0000000..3411baa --- /dev/null +++ b/node_modules/validator/lib/isMultibyte.js @@ -0,0 +1,22 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isMultibyte; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/* eslint-disable no-control-regex */ +var multibyte = /[^\x00-\x7F]/; +/* eslint-enable no-control-regex */ + +function isMultibyte(str) { + (0, _assertString2.default)(str); + return multibyte.test(str); +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isNull.js b/node_modules/validator/lib/isNull.js new file mode 100644 index 0000000..56cb87e --- /dev/null +++ b/node_modules/validator/lib/isNull.js @@ -0,0 +1,18 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isNull; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isNull(str) { + (0, _assertString2.default)(str); + return str.length === 0; +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isNumeric.js b/node_modules/validator/lib/isNumeric.js new file mode 100644 index 0000000..f3fde30 --- /dev/null +++ b/node_modules/validator/lib/isNumeric.js @@ -0,0 +1,20 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isNumeric; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var numeric = /^[-+]?[0-9]+$/; + +function isNumeric(str) { + (0, _assertString2.default)(str); + return numeric.test(str); +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isSurrogatePair.js b/node_modules/validator/lib/isSurrogatePair.js new file mode 100644 index 0000000..d8c7a9d --- /dev/null +++ b/node_modules/validator/lib/isSurrogatePair.js @@ -0,0 +1,20 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isSurrogatePair; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var surrogatePair = /[\uD800-\uDBFF][\uDC00-\uDFFF]/; + +function isSurrogatePair(str) { + (0, _assertString2.default)(str); + return surrogatePair.test(str); +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isURL.js b/node_modules/validator/lib/isURL.js new file mode 100644 index 0000000..19fb479 --- /dev/null +++ b/node_modules/validator/lib/isURL.js @@ -0,0 +1,142 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isURL; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +var _isFQDN = require('./isFQDN'); + +var _isFQDN2 = _interopRequireDefault(_isFQDN); + +var _isIP = require('./isIP'); + +var _isIP2 = _interopRequireDefault(_isIP); + +var _merge = require('./util/merge'); + +var _merge2 = _interopRequireDefault(_merge); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var default_url_options = { + protocols: ['http', 'https', 'ftp'], + require_tld: true, + require_protocol: false, + require_host: true, + require_valid_protocol: true, + allow_underscores: false, + allow_trailing_dot: false, + allow_protocol_relative_urls: false +}; + +var wrapped_ipv6 = /^\[([^\]]+)\](?::([0-9]+))?$/; + +function isRegExp(obj) { + return Object.prototype.toString.call(obj) === '[object RegExp]'; +} + +function checkHost(host, matches) { + for (var i = 0; i < matches.length; i++) { + var match = matches[i]; + if (host === match || isRegExp(match) && match.test(host)) { + return true; + } + } + return false; +} + +function isURL(url, options) { + (0, _assertString2.default)(url); + if (!url || url.length >= 2083 || /\s/.test(url)) { + return false; + } + if (url.indexOf('mailto:') === 0) { + return false; + } + options = (0, _merge2.default)(options, default_url_options); + var protocol = void 0, + auth = void 0, + host = void 0, + hostname = void 0, + port = void 0, + port_str = void 0, + split = void 0, + ipv6 = void 0; + + split = url.split('#'); + url = split.shift(); + + split = url.split('?'); + url = split.shift(); + + split = url.split('://'); + if (split.length > 1) { + protocol = split.shift(); + if (options.require_valid_protocol && options.protocols.indexOf(protocol) === -1) { + return false; + } + } else if (options.require_protocol) { + return false; + } else if (options.allow_protocol_relative_urls && url.substr(0, 2) === '//') { + split[0] = url.substr(2); + } + url = split.join('://'); + + split = url.split('/'); + url = split.shift(); + + if (url === '' && !options.require_host) { + return true; + } + + split = url.split('@'); + if (split.length > 1) { + auth = split.shift(); + if (auth.indexOf(':') >= 0 && auth.split(':').length > 2) { + return false; + } + } + hostname = split.join('@'); + + port_str = ipv6 = null; + var ipv6_match = hostname.match(wrapped_ipv6); + if (ipv6_match) { + host = ''; + ipv6 = ipv6_match[1]; + port_str = ipv6_match[2] || null; + } else { + split = hostname.split(':'); + host = split.shift(); + if (split.length) { + port_str = split.join(':'); + } + } + + if (port_str !== null) { + port = parseInt(port_str, 10); + if (!/^[0-9]+$/.test(port_str) || port <= 0 || port > 65535) { + return false; + } + } + + if (!(0, _isIP2.default)(host) && !(0, _isFQDN2.default)(host, options) && (!ipv6 || !(0, _isIP2.default)(ipv6, 6)) && host !== 'localhost') { + return false; + } + + host = host || ipv6; + + if (options.host_whitelist && !checkHost(host, options.host_whitelist)) { + return false; + } + if (options.host_blacklist && checkHost(host, options.host_blacklist)) { + return false; + } + + return true; +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isUUID.js b/node_modules/validator/lib/isUUID.js new file mode 100644 index 0000000..df2f8a0 --- /dev/null +++ b/node_modules/validator/lib/isUUID.js @@ -0,0 +1,28 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isUUID; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var uuid = { + 3: /^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i, + 4: /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + 5: /^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + all: /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i +}; + +function isUUID(str) { + var version = arguments.length <= 1 || arguments[1] === undefined ? 'all' : arguments[1]; + + (0, _assertString2.default)(str); + var pattern = uuid[version]; + return pattern && pattern.test(str); +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isUppercase.js b/node_modules/validator/lib/isUppercase.js new file mode 100644 index 0000000..c4f11eb --- /dev/null +++ b/node_modules/validator/lib/isUppercase.js @@ -0,0 +1,18 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isUppercase; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isUppercase(str) { + (0, _assertString2.default)(str); + return str === str.toUpperCase(); +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isVariableWidth.js b/node_modules/validator/lib/isVariableWidth.js new file mode 100644 index 0000000..5b1cf15 --- /dev/null +++ b/node_modules/validator/lib/isVariableWidth.js @@ -0,0 +1,22 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isVariableWidth; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +var _isFullWidth = require('./isFullWidth'); + +var _isHalfWidth = require('./isHalfWidth'); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isVariableWidth(str) { + (0, _assertString2.default)(str); + return _isFullWidth.fullWidth.test(str) && _isHalfWidth.halfWidth.test(str); +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/isWhitelisted.js b/node_modules/validator/lib/isWhitelisted.js new file mode 100644 index 0000000..1a07356 --- /dev/null +++ b/node_modules/validator/lib/isWhitelisted.js @@ -0,0 +1,23 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isWhitelisted; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isWhitelisted(str, chars) { + (0, _assertString2.default)(str); + for (var i = str.length - 1; i >= 0; i--) { + if (chars.indexOf(str[i]) === -1) { + return false; + } + } + return true; +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/ltrim.js b/node_modules/validator/lib/ltrim.js new file mode 100644 index 0000000..58b2e3d --- /dev/null +++ b/node_modules/validator/lib/ltrim.js @@ -0,0 +1,19 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = ltrim; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function ltrim(str, chars) { + (0, _assertString2.default)(str); + var pattern = chars ? new RegExp('^[' + chars + ']+', 'g') : /^\s+/g; + return str.replace(pattern, ''); +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/matches.js b/node_modules/validator/lib/matches.js new file mode 100644 index 0000000..43f7884 --- /dev/null +++ b/node_modules/validator/lib/matches.js @@ -0,0 +1,21 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = matches; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function matches(str, pattern, modifiers) { + (0, _assertString2.default)(str); + if (Object.prototype.toString.call(pattern) !== '[object RegExp]') { + pattern = new RegExp(pattern, modifiers); + } + return pattern.test(str); +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/normalizeEmail.js b/node_modules/validator/lib/normalizeEmail.js new file mode 100644 index 0000000..7998493 --- /dev/null +++ b/node_modules/validator/lib/normalizeEmail.js @@ -0,0 +1,48 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = normalizeEmail; + +var _isEmail = require('./isEmail'); + +var _isEmail2 = _interopRequireDefault(_isEmail); + +var _merge = require('./util/merge'); + +var _merge2 = _interopRequireDefault(_merge); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var default_normalize_email_options = { + lowercase: true, + remove_dots: true, + remove_extension: true +}; + +function normalizeEmail(email, options) { + options = (0, _merge2.default)(options, default_normalize_email_options); + if (!(0, _isEmail2.default)(email)) { + return false; + } + var parts = email.split('@', 2); + parts[1] = parts[1].toLowerCase(); + if (parts[1] === 'gmail.com' || parts[1] === 'googlemail.com') { + if (options.remove_extension) { + parts[0] = parts[0].split('+')[0]; + } + if (options.remove_dots) { + parts[0] = parts[0].replace(/\./g, ''); + } + if (!parts[0].length) { + return false; + } + parts[0] = parts[0].toLowerCase(); + parts[1] = 'gmail.com'; + } else if (options.lowercase) { + parts[0] = parts[0].toLowerCase(); + } + return parts.join('@'); +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/rtrim.js b/node_modules/validator/lib/rtrim.js new file mode 100644 index 0000000..fa6d8e1 --- /dev/null +++ b/node_modules/validator/lib/rtrim.js @@ -0,0 +1,25 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = rtrim; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function rtrim(str, chars) { + (0, _assertString2.default)(str); + var pattern = chars ? new RegExp('[' + chars + ']') : /\s/; + + var idx = str.length - 1; + while (idx >= 0 && pattern.test(str[idx])) { + idx--; + } + + return idx < str.length ? str.substr(0, idx + 1) : str; +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/stripLow.js b/node_modules/validator/lib/stripLow.js new file mode 100644 index 0000000..bdf395f --- /dev/null +++ b/node_modules/validator/lib/stripLow.js @@ -0,0 +1,23 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = stripLow; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +var _blacklist = require('./blacklist'); + +var _blacklist2 = _interopRequireDefault(_blacklist); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function stripLow(str, keep_new_lines) { + (0, _assertString2.default)(str); + var chars = keep_new_lines ? '\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F\\x7F' : '\\x00-\\x1F\\x7F'; + return (0, _blacklist2.default)(str, chars); +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/toBoolean.js b/node_modules/validator/lib/toBoolean.js new file mode 100644 index 0000000..8ac35e3 --- /dev/null +++ b/node_modules/validator/lib/toBoolean.js @@ -0,0 +1,21 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = toBoolean; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function toBoolean(str, strict) { + (0, _assertString2.default)(str); + if (strict) { + return str === '1' || str === 'true'; + } + return str !== '0' && str !== 'false' && str !== ''; +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/toDate.js b/node_modules/validator/lib/toDate.js new file mode 100644 index 0000000..80e21f3 --- /dev/null +++ b/node_modules/validator/lib/toDate.js @@ -0,0 +1,19 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = toDate; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function toDate(date) { + (0, _assertString2.default)(date); + date = Date.parse(date); + return !isNaN(date) ? new Date(date) : null; +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/toFloat.js b/node_modules/validator/lib/toFloat.js new file mode 100644 index 0000000..3a8e256 --- /dev/null +++ b/node_modules/validator/lib/toFloat.js @@ -0,0 +1,18 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = toFloat; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function toFloat(str) { + (0, _assertString2.default)(str); + return parseFloat(str); +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/toInt.js b/node_modules/validator/lib/toInt.js new file mode 100644 index 0000000..97862a4 --- /dev/null +++ b/node_modules/validator/lib/toInt.js @@ -0,0 +1,18 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = toInt; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function toInt(str, radix) { + (0, _assertString2.default)(str); + return parseInt(str, radix || 10); +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/trim.js b/node_modules/validator/lib/trim.js new file mode 100644 index 0000000..cb945d4 --- /dev/null +++ b/node_modules/validator/lib/trim.js @@ -0,0 +1,21 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = trim; + +var _rtrim = require('./rtrim'); + +var _rtrim2 = _interopRequireDefault(_rtrim); + +var _ltrim = require('./ltrim'); + +var _ltrim2 = _interopRequireDefault(_ltrim); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function trim(str, chars) { + return (0, _rtrim2.default)((0, _ltrim2.default)(str, chars), chars); +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/unescape.js b/node_modules/validator/lib/unescape.js new file mode 100644 index 0000000..c3e02d5 --- /dev/null +++ b/node_modules/validator/lib/unescape.js @@ -0,0 +1,18 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = unescape; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function unescape(str) { + (0, _assertString2.default)(str); + return str.replace(/&/g, '&').replace(/"/g, '"').replace(/'/g, "'").replace(/</g, '<').replace(/>/g, '>').replace(///g, '/').replace(/`/g, '`'); +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/util/assertString.js b/node_modules/validator/lib/util/assertString.js new file mode 100644 index 0000000..5015dab --- /dev/null +++ b/node_modules/validator/lib/util/assertString.js @@ -0,0 +1,12 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = assertString; +function assertString(input) { + if (typeof input !== 'string') { + throw new TypeError('This library (validator.js) validates strings only'); + } +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/util/merge.js b/node_modules/validator/lib/util/merge.js new file mode 100644 index 0000000..a15b6f5 --- /dev/null +++ b/node_modules/validator/lib/util/merge.js @@ -0,0 +1,18 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = merge; +function merge() { + var obj = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + var defaults = arguments[1]; + + for (var key in defaults) { + if (typeof obj[key] === 'undefined') { + obj[key] = defaults[key]; + } + } + return obj; +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/util/toString.js b/node_modules/validator/lib/util/toString.js new file mode 100644 index 0000000..5693579 --- /dev/null +++ b/node_modules/validator/lib/util/toString.js @@ -0,0 +1,22 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + +exports.default = toString; +function toString(input) { + if ((typeof input === 'undefined' ? 'undefined' : _typeof(input)) === 'object' && input !== null) { + if (typeof input.toString === 'function') { + input = input.toString(); + } else { + input = '[object Object]'; + } + } else if (input === null || typeof input === 'undefined' || isNaN(input) && !input.length) { + input = ''; + } + return String(input); +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/lib/whitelist.js b/node_modules/validator/lib/whitelist.js new file mode 100644 index 0000000..7a06c5d --- /dev/null +++ b/node_modules/validator/lib/whitelist.js @@ -0,0 +1,18 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = whitelist; + +var _assertString = require('./util/assertString'); + +var _assertString2 = _interopRequireDefault(_assertString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function whitelist(str, chars) { + (0, _assertString2.default)(str); + return str.replace(new RegExp('[^' + chars + ']+', 'g'), ''); +} +module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/validator/package.json b/node_modules/validator/package.json new file mode 100644 index 0000000..3cb4c30 --- /dev/null +++ b/node_modules/validator/package.json @@ -0,0 +1,129 @@ +{ + "_args": [ + [ + { + "raw": "validator@^5.2.0", + "scope": null, + "escapedName": "validator", + "name": "validator", + "rawSpec": "^5.2.0", + "spec": ">=5.2.0 <6.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/sequelize" + ] + ], + "_from": "validator@>=5.2.0 <6.0.0", + "_id": "validator@5.7.0", + "_inCache": true, + "_location": "/validator", + "_nodeVersion": "6.5.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/validator-5.7.0.tgz_1473558672249_0.20449338271282613" + }, + "_npmUser": { + "name": "cohara87", + "email": "cohara87@gmail.com" + }, + "_npmVersion": "3.10.3", + "_phantomChildren": {}, + "_requested": { + "raw": "validator@^5.2.0", + "scope": null, + "escapedName": "validator", + "name": "validator", + "rawSpec": "^5.2.0", + "spec": ">=5.2.0 <6.0.0", + "type": "range" + }, + "_requiredBy": [ + "/sequelize" + ], + "_resolved": "https://registry.npmjs.org/validator/-/validator-5.7.0.tgz", + "_shasum": "7a87a58146b695ac486071141c0c49d67da05e5c", + "_shrinkwrap": null, + "_spec": "validator@^5.2.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/sequelize", + "author": { + "name": "Chris O'Hara", + "email": "cohara87@gmail.com" + }, + "bugs": { + "url": "http://github.com/chriso/validator.js/issues" + }, + "dependencies": {}, + "description": "String validation and sanitization", + "devDependencies": { + "babel-cli": "^6.9.0", + "babel-plugin-add-module-exports": "^0.2.1", + "babel-preset-es2015": "^6.9.0", + "babel-preset-es2015-rollup": "^1.1.1", + "coveralls": "^2.11.9", + "eslint": "^2.11.1", + "eslint-config-airbnb": "^9.0.1", + "eslint-plugin-import": "^1.8.1", + "istanbul": "^0.4.3", + "mocha": "^2.5.3", + "rollup": "^0.29.1", + "rollup-plugin-babel": "^2.5.1", + "uglify-js": "^2.6.2" + }, + "directories": {}, + "dist": { + "shasum": "7a87a58146b695ac486071141c0c49d67da05e5c", + "tarball": "https://registry.npmjs.org/validator/-/validator-5.7.0.tgz" + }, + "engines": { + "node": ">= 0.10" + }, + "files": [ + "index.js", + "lib", + "README.md", + "LICENCE", + "validator.js", + "validator.min.js" + ], + "gitHead": "3443132beccddf06c3f0a5e88c1dd2ee6513b612", + "homepage": "http://github.com/chriso/validator.js", + "keywords": [ + "validator", + "validation", + "validate", + "sanitization", + "sanitize", + "sanitisation", + "sanitise", + "assert" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "cohara87", + "email": "cohara87@gmail.com" + } + ], + "name": "validator", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/chriso/validator.js.git" + }, + "scripts": { + "build": "npm run build:browser && npm run build:node", + "build:browser": "babel-node build-browser && npm run minify", + "build:node": "babel src -d . --presets es2015 --plugins add-module-exports", + "clean": "npm run clean:node && npm run clean:browser", + "clean:browser": "rm -rf validator*.js", + "clean:node": "rm -rf index.js lib", + "coveralls": "istanbul cover _mocha --report lcovonly -x validator.js -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage", + "lint": "eslint src test", + "minify": "uglifyjs validator.js -o validator.min.js --compress --mangle --comments '/Copyright/'", + "pretest": "npm run lint && npm run build", + "test": "mocha --reporter spec" + }, + "version": "5.7.0" +} diff --git a/node_modules/validator/validator.js b/node_modules/validator/validator.js new file mode 100644 index 0000000..0f520bb --- /dev/null +++ b/node_modules/validator/validator.js @@ -0,0 +1,1183 @@ +/*! + * Copyright (c) 2016 Chris O'Hara + * + * 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. + */ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global.validator = factory()); +}(this, function () { 'use strict'; + + function assertString(input) { + if (typeof input !== 'string') { + throw new TypeError('This library (validator.js) validates strings only'); + } + } + + function toDate(date) { + assertString(date); + date = Date.parse(date); + return !isNaN(date) ? new Date(date) : null; + } + + function toFloat(str) { + assertString(str); + return parseFloat(str); + } + + function toInt(str, radix) { + assertString(str); + return parseInt(str, radix || 10); + } + + function toBoolean(str, strict) { + assertString(str); + if (strict) { + return str === '1' || str === 'true'; + } + return str !== '0' && str !== 'false' && str !== ''; + } + + function equals(str, comparison) { + assertString(str); + return str === comparison; + } + + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { + return typeof obj; + } : function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; + }; + + function toString(input) { + if ((typeof input === 'undefined' ? 'undefined' : _typeof(input)) === 'object' && input !== null) { + if (typeof input.toString === 'function') { + input = input.toString(); + } else { + input = '[object Object]'; + } + } else if (input === null || typeof input === 'undefined' || isNaN(input) && !input.length) { + input = ''; + } + return String(input); + } + + function contains(str, elem) { + assertString(str); + return str.indexOf(toString(elem)) >= 0; + } + + function matches(str, pattern, modifiers) { + assertString(str); + if (Object.prototype.toString.call(pattern) !== '[object RegExp]') { + pattern = new RegExp(pattern, modifiers); + } + return pattern.test(str); + } + + function merge() { + var obj = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + var defaults = arguments[1]; + + for (var key in defaults) { + if (typeof obj[key] === 'undefined') { + obj[key] = defaults[key]; + } + } + return obj; + } + + /* eslint-disable prefer-rest-params */ + function isByteLength(str, options) { + assertString(str); + var min = void 0; + var max = void 0; + if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object') { + min = options.min || 0; + max = options.max; + } else { + // backwards compatibility: isByteLength(str, min [, max]) + min = arguments[1]; + max = arguments[2]; + } + var len = encodeURI(str).split(/%..|./).length - 1; + return len >= min && (typeof max === 'undefined' || len <= max); + } + + var default_fqdn_options = { + require_tld: true, + allow_underscores: false, + allow_trailing_dot: false + }; + + function isFDQN(str, options) { + assertString(str); + options = merge(options, default_fqdn_options); + + /* Remove the optional trailing dot before checking validity */ + if (options.allow_trailing_dot && str[str.length - 1] === '.') { + str = str.substring(0, str.length - 1); + } + var parts = str.split('.'); + if (options.require_tld) { + var tld = parts.pop(); + if (!parts.length || !/^([a-z\u00a1-\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) { + return false; + } + } + for (var part, i = 0; i < parts.length; i++) { + part = parts[i]; + if (options.allow_underscores) { + part = part.replace(/_/g, ''); + } + if (!/^[a-z\u00a1-\uffff0-9-]+$/i.test(part)) { + return false; + } + if (/[\uff01-\uff5e]/.test(part)) { + // disallow full-width chars + return false; + } + if (part[0] === '-' || part[part.length - 1] === '-') { + return false; + } + } + return true; + } + + var default_email_options = { + allow_display_name: false, + allow_utf8_local_part: true, + require_tld: true + }; + + /* eslint-disable max-len */ + /* eslint-disable no-control-regex */ + var displayName = /^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF\s]*<(.+)>$/i; + var emailUserPart = /^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i; + var quotedEmailUser = /^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i; + var emailUserUtf8Part = /^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i; + var quotedEmailUserUtf8 = /^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i; + /* eslint-enable max-len */ + /* eslint-enable no-control-regex */ + + function isEmail(str, options) { + assertString(str); + options = merge(options, default_email_options); + + if (options.allow_display_name) { + var display_email = str.match(displayName); + if (display_email) { + str = display_email[1]; + } + } + + var parts = str.split('@'); + var domain = parts.pop(); + var user = parts.join('@'); + + var lower_domain = domain.toLowerCase(); + if (lower_domain === 'gmail.com' || lower_domain === 'googlemail.com') { + user = user.replace(/\./g, '').toLowerCase(); + } + + if (!isByteLength(user, { max: 64 }) || !isByteLength(domain, { max: 256 })) { + return false; + } + + if (!isFDQN(domain, { require_tld: options.require_tld })) { + return false; + } + + if (user[0] === '"') { + user = user.slice(1, user.length - 1); + return options.allow_utf8_local_part ? quotedEmailUserUtf8.test(user) : quotedEmailUser.test(user); + } + + var pattern = options.allow_utf8_local_part ? emailUserUtf8Part : emailUserPart; + + var user_parts = user.split('.'); + for (var i = 0; i < user_parts.length; i++) { + if (!pattern.test(user_parts[i])) { + return false; + } + } + + return true; + } + + var ipv4Maybe = /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/; + var ipv6Block = /^[0-9A-F]{1,4}$/i; + + function isIP(str) { + var version = arguments.length <= 1 || arguments[1] === undefined ? '' : arguments[1]; + + assertString(str); + version = String(version); + if (!version) { + return isIP(str, 4) || isIP(str, 6); + } else if (version === '4') { + if (!ipv4Maybe.test(str)) { + return false; + } + var parts = str.split('.').sort(function (a, b) { + return a - b; + }); + return parts[3] <= 255; + } else if (version === '6') { + var blocks = str.split(':'); + var foundOmissionBlock = false; // marker to indicate :: + + // At least some OS accept the last 32 bits of an IPv6 address + // (i.e. 2 of the blocks) in IPv4 notation, and RFC 3493 says + // that '::ffff:a.b.c.d' is valid for IPv4-mapped IPv6 addresses, + // and '::a.b.c.d' is deprecated, but also valid. + var foundIPv4TransitionBlock = isIP(blocks[blocks.length - 1], 4); + var expectedNumberOfBlocks = foundIPv4TransitionBlock ? 7 : 8; + + if (blocks.length > expectedNumberOfBlocks) { + return false; + } + // initial or final :: + if (str === '::') { + return true; + } else if (str.substr(0, 2) === '::') { + blocks.shift(); + blocks.shift(); + foundOmissionBlock = true; + } else if (str.substr(str.length - 2) === '::') { + blocks.pop(); + blocks.pop(); + foundOmissionBlock = true; + } + + for (var i = 0; i < blocks.length; ++i) { + // test for a :: which can not be at the string start/end + // since those cases have been handled above + if (blocks[i] === '' && i > 0 && i < blocks.length - 1) { + if (foundOmissionBlock) { + return false; // multiple :: in address + } + foundOmissionBlock = true; + } else if (foundIPv4TransitionBlock && i === blocks.length - 1) { + // it has been checked before that the last + // block is a valid IPv4 address + } else if (!ipv6Block.test(blocks[i])) { + return false; + } + } + if (foundOmissionBlock) { + return blocks.length >= 1; + } + return blocks.length === expectedNumberOfBlocks; + } + return false; + } + + var default_url_options = { + protocols: ['http', 'https', 'ftp'], + require_tld: true, + require_protocol: false, + require_host: true, + require_valid_protocol: true, + allow_underscores: false, + allow_trailing_dot: false, + allow_protocol_relative_urls: false + }; + + var wrapped_ipv6 = /^\[([^\]]+)\](?::([0-9]+))?$/; + + function isRegExp(obj) { + return Object.prototype.toString.call(obj) === '[object RegExp]'; + } + + function checkHost(host, matches) { + for (var i = 0; i < matches.length; i++) { + var match = matches[i]; + if (host === match || isRegExp(match) && match.test(host)) { + return true; + } + } + return false; + } + + function isURL(url, options) { + assertString(url); + if (!url || url.length >= 2083 || /\s/.test(url)) { + return false; + } + if (url.indexOf('mailto:') === 0) { + return false; + } + options = merge(options, default_url_options); + var protocol = void 0, + auth = void 0, + host = void 0, + hostname = void 0, + port = void 0, + port_str = void 0, + split = void 0, + ipv6 = void 0; + + split = url.split('#'); + url = split.shift(); + + split = url.split('?'); + url = split.shift(); + + split = url.split('://'); + if (split.length > 1) { + protocol = split.shift(); + if (options.require_valid_protocol && options.protocols.indexOf(protocol) === -1) { + return false; + } + } else if (options.require_protocol) { + return false; + } else if (options.allow_protocol_relative_urls && url.substr(0, 2) === '//') { + split[0] = url.substr(2); + } + url = split.join('://'); + + split = url.split('/'); + url = split.shift(); + + if (url === '' && !options.require_host) { + return true; + } + + split = url.split('@'); + if (split.length > 1) { + auth = split.shift(); + if (auth.indexOf(':') >= 0 && auth.split(':').length > 2) { + return false; + } + } + hostname = split.join('@'); + + port_str = ipv6 = null; + var ipv6_match = hostname.match(wrapped_ipv6); + if (ipv6_match) { + host = ''; + ipv6 = ipv6_match[1]; + port_str = ipv6_match[2] || null; + } else { + split = hostname.split(':'); + host = split.shift(); + if (split.length) { + port_str = split.join(':'); + } + } + + if (port_str !== null) { + port = parseInt(port_str, 10); + if (!/^[0-9]+$/.test(port_str) || port <= 0 || port > 65535) { + return false; + } + } + + if (!isIP(host) && !isFDQN(host, options) && (!ipv6 || !isIP(ipv6, 6)) && host !== 'localhost') { + return false; + } + + host = host || ipv6; + + if (options.host_whitelist && !checkHost(host, options.host_whitelist)) { + return false; + } + if (options.host_blacklist && checkHost(host, options.host_blacklist)) { + return false; + } + + return true; + } + + var macAddress = /^([0-9a-fA-F][0-9a-fA-F]:){5}([0-9a-fA-F][0-9a-fA-F])$/; + + function isMACAddress(str) { + assertString(str); + return macAddress.test(str); + } + + function isBoolean(str) { + assertString(str); + return ['true', 'false', '1', '0'].indexOf(str) >= 0; + } + + var alpha = { + 'en-US': /^[A-Z]+$/i, + 'cs-CZ': /^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i, + 'de-DE': /^[A-ZÄÖÜß]+$/i, + 'es-ES': /^[A-ZÁÉÍÑÓÚÜ]+$/i, + 'fr-FR': /^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i, + 'nl-NL': /^[A-ZÉËÏÓÖÜ]+$/i, + 'hu-HU': /^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i, + 'pl-PL': /^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i, + 'pt-PT': /^[A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]+$/i, + 'ru-RU': /^[А-ЯЁ]+$/i, + 'sr-RS@latin': /^[A-ZČĆŽŠĐ]+$/i, + 'sr-RS': /^[А-ЯЂЈЉЊЋЏ]+$/i, + 'tr-TR': /^[A-ZÇĞİıÖŞÜ]+$/i, + ar: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/ + }; + + var alphanumeric = { + 'en-US': /^[0-9A-Z]+$/i, + 'cs-CZ': /^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i, + 'de-DE': /^[0-9A-ZÄÖÜß]+$/i, + 'es-ES': /^[0-9A-ZÁÉÍÑÓÚÜ]+$/i, + 'fr-FR': /^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i, + 'hu-HU': /^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i, + 'nl-NL': /^[0-9A-ZÉËÏÓÖÜ]+$/i, + 'pl-PL': /^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i, + 'pt-PT': /^[0-9A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]+$/i, + 'ru-RU': /^[0-9А-ЯЁ]+$/i, + 'sr-RS@latin': /^[0-9A-ZČĆŽŠĐ]+$/i, + 'sr-RS': /^[0-9А-ЯЂЈЉЊЋЏ]+$/i, + 'tr-TR': /^[0-9A-ZÇĞİıÖŞÜ]+$/i, + ar: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/ + }; + + var englishLocales = ['AU', 'GB', 'HK', 'IN', 'NZ', 'ZA', 'ZM']; + + for (var locale, i = 0; i < englishLocales.length; i++) { + locale = 'en-' + englishLocales[i]; + alpha[locale] = alpha['en-US']; + alphanumeric[locale] = alphanumeric['en-US']; + } + + alpha['pt-BR'] = alpha['pt-PT']; + alphanumeric['pt-BR'] = alphanumeric['pt-PT']; + + // Source: http://www.localeplanet.com/java/ + var arabicLocales = ['AE', 'BH', 'DZ', 'EG', 'IQ', 'JO', 'KW', 'LB', 'LY', 'MA', 'QM', 'QA', 'SA', 'SD', 'SY', 'TN', 'YE']; + + for (var _locale, _i = 0; _i < arabicLocales.length; _i++) { + _locale = 'ar-' + arabicLocales[_i]; + alpha[_locale] = alpha.ar; + alphanumeric[_locale] = alphanumeric.ar; + } + + function isAlpha(str) { + var locale = arguments.length <= 1 || arguments[1] === undefined ? 'en-US' : arguments[1]; + + assertString(str); + if (locale in alpha) { + return alpha[locale].test(str); + } + throw new Error('Invalid locale \'' + locale + '\''); + } + + function isAlphanumeric(str) { + var locale = arguments.length <= 1 || arguments[1] === undefined ? 'en-US' : arguments[1]; + + assertString(str); + if (locale in alphanumeric) { + return alphanumeric[locale].test(str); + } + throw new Error('Invalid locale \'' + locale + '\''); + } + + var numeric = /^[-+]?[0-9]+$/; + + function isNumeric(str) { + assertString(str); + return numeric.test(str); + } + + function isLowercase(str) { + assertString(str); + return str === str.toLowerCase(); + } + + function isUppercase(str) { + assertString(str); + return str === str.toUpperCase(); + } + + /* eslint-disable no-control-regex */ + var ascii = /^[\x00-\x7F]+$/; + /* eslint-enable no-control-regex */ + + function isAscii(str) { + assertString(str); + return ascii.test(str); + } + + var fullWidth = /[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/; + + function isFullWidth(str) { + assertString(str); + return fullWidth.test(str); + } + + var halfWidth = /[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/; + + function isHalfWidth(str) { + assertString(str); + return halfWidth.test(str); + } + + function isVariableWidth(str) { + assertString(str); + return fullWidth.test(str) && halfWidth.test(str); + } + + /* eslint-disable no-control-regex */ + var multibyte = /[^\x00-\x7F]/; + /* eslint-enable no-control-regex */ + + function isMultibyte(str) { + assertString(str); + return multibyte.test(str); + } + + var surrogatePair = /[\uD800-\uDBFF][\uDC00-\uDFFF]/; + + function isSurrogatePair(str) { + assertString(str); + return surrogatePair.test(str); + } + + var int = /^(?:[-+]?(?:0|[1-9][0-9]*))$/; + var intLeadingZeroes = /^[-+]?[0-9]+$/; + + function isInt(str, options) { + assertString(str); + options = options || {}; + + // Get the regex to use for testing, based on whether + // leading zeroes are allowed or not. + var regex = options.hasOwnProperty('allow_leading_zeroes') && options.allow_leading_zeroes ? intLeadingZeroes : int; + + // Check min/max + var minCheckPassed = !options.hasOwnProperty('min') || str >= options.min; + var maxCheckPassed = !options.hasOwnProperty('max') || str <= options.max; + + return regex.test(str) && minCheckPassed && maxCheckPassed; + } + + var float = /^(?:[-+]?(?:[0-9]+))?(?:\.[0-9]*)?(?:[eE][\+\-]?(?:[0-9]+))?$/; + + function isFloat(str, options) { + assertString(str); + options = options || {}; + if (str === '' || str === '.') { + return false; + } + return float.test(str) && (!options.hasOwnProperty('min') || str >= options.min) && (!options.hasOwnProperty('max') || str <= options.max); + } + + var decimal = /^[-+]?([0-9]+|\.[0-9]+|[0-9]+\.[0-9]+)$/; + + function isDecimal(str) { + assertString(str); + return str !== '' && decimal.test(str); + } + + var hexadecimal = /^[0-9A-F]+$/i; + + function isHexadecimal(str) { + assertString(str); + return hexadecimal.test(str); + } + + function isDivisibleBy(str, num) { + assertString(str); + return toFloat(str) % parseInt(num, 10) === 0; + } + + var hexcolor = /^#?([0-9A-F]{3}|[0-9A-F]{6})$/i; + + function isHexColor(str) { + assertString(str); + return hexcolor.test(str); + } + + var md5 = /^[a-f0-9]{32}$/; + + function isMD5(str) { + assertString(str); + return md5.test(str); + } + + function isJSON(str) { + assertString(str); + try { + var obj = JSON.parse(str); + return !!obj && (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object'; + } catch (e) {/* ignore */} + return false; + } + + function isNull(str) { + assertString(str); + return str.length === 0; + } + + /* eslint-disable prefer-rest-params */ + function isLength(str, options) { + assertString(str); + var min = void 0; + var max = void 0; + if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object') { + min = options.min || 0; + max = options.max; + } else { + // backwards compatibility: isLength(str, min [, max]) + min = arguments[1]; + max = arguments[2]; + } + var surrogatePairs = str.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g) || []; + var len = str.length - surrogatePairs.length; + return len >= min && (typeof max === 'undefined' || len <= max); + } + + var uuid = { + 3: /^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i, + 4: /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + 5: /^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + all: /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i + }; + + function isUUID(str) { + var version = arguments.length <= 1 || arguments[1] === undefined ? 'all' : arguments[1]; + + assertString(str); + var pattern = uuid[version]; + return pattern && pattern.test(str); + } + + function isMongoId(str) { + assertString(str); + return isHexadecimal(str) && str.length === 24; + } + + /* eslint-disable max-len */ + // from http://goo.gl/0ejHHW + var iso8601 = /^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/; + /* eslint-enable max-len */ + + function isISO8601 (str) { + assertString(str); + return iso8601.test(str); + } + + function getTimezoneOffset(str) { + var iso8601Parts = str.match(iso8601); + var timezone = void 0, + sign = void 0, + hours = void 0, + minutes = void 0; + if (!iso8601Parts) { + str = str.toLowerCase(); + timezone = str.match(/(?:\s|gmt\s*)(-|\+)(\d{1,4})(\s|$)/); + if (!timezone) { + return str.indexOf('gmt') !== -1 ? 0 : null; + } + sign = timezone[1]; + var offset = timezone[2]; + if (offset.length === 3) { + offset = '0' + offset; + } + if (offset.length <= 2) { + hours = 0; + minutes = parseInt(offset, 10); + } else { + hours = parseInt(offset.slice(0, 2), 10); + minutes = parseInt(offset.slice(2, 4), 10); + } + } else { + timezone = iso8601Parts[21]; + if (!timezone) { + // if no hour/minute was provided, the date is GMT + return !iso8601Parts[12] ? 0 : null; + } + if (timezone === 'z' || timezone === 'Z') { + return 0; + } + sign = iso8601Parts[22]; + if (timezone.indexOf(':') !== -1) { + hours = parseInt(iso8601Parts[23], 10); + minutes = parseInt(iso8601Parts[24], 10); + } else { + hours = 0; + minutes = parseInt(iso8601Parts[23], 10); + } + } + return (hours * 60 + minutes) * (sign === '-' ? 1 : -1); + } + + function isDate(str) { + assertString(str); + var normalizedDate = new Date(Date.parse(str)); + if (isNaN(normalizedDate)) { + return false; + } + + // normalizedDate is in the user's timezone. Apply the input + // timezone offset to the date so that the year and day match + // the input + var timezoneOffset = getTimezoneOffset(str); + if (timezoneOffset !== null) { + var timezoneDifference = normalizedDate.getTimezoneOffset() - timezoneOffset; + normalizedDate = new Date(normalizedDate.getTime() + 60000 * timezoneDifference); + } + + var day = String(normalizedDate.getDate()); + var dayOrYear = void 0, + dayOrYearMatches = void 0, + year = void 0; + // check for valid double digits that could be late days + // check for all matches since a string like '12/23' is a valid date + // ignore everything with nearby colons + dayOrYearMatches = str.match(/(^|[^:\d])[23]\d([^T:\d]|$)/g); + if (!dayOrYearMatches) { + return true; + } + dayOrYear = dayOrYearMatches.map(function (digitString) { + return digitString.match(/\d+/g)[0]; + }).join('/'); + + year = String(normalizedDate.getFullYear()).slice(-2); + if (dayOrYear === day || dayOrYear === year) { + return true; + } else if (dayOrYear === '' + day / year || dayOrYear === '' + year / day) { + return true; + } + return false; + } + + function isAfter(str) { + var date = arguments.length <= 1 || arguments[1] === undefined ? String(new Date()) : arguments[1]; + + assertString(str); + var comparison = toDate(date); + var original = toDate(str); + return !!(original && comparison && original > comparison); + } + + function isBefore(str) { + var date = arguments.length <= 1 || arguments[1] === undefined ? String(new Date()) : arguments[1]; + + assertString(str); + var comparison = toDate(date); + var original = toDate(str); + return !!(original && comparison && original < comparison); + } + + function isIn(str, options) { + assertString(str); + var i = void 0; + if (Object.prototype.toString.call(options) === '[object Array]') { + var array = []; + for (i in options) { + if ({}.hasOwnProperty.call(options, i)) { + array[i] = toString(options[i]); + } + } + return array.indexOf(str) >= 0; + } else if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object') { + return options.hasOwnProperty(str); + } else if (options && typeof options.indexOf === 'function') { + return options.indexOf(str) >= 0; + } + return false; + } + + /* eslint-disable max-len */ + var creditCard = /^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})|62[0-9]{14}$/; + /* eslint-enable max-len */ + + function isCreditCard(str) { + assertString(str); + var sanitized = str.replace(/[^0-9]+/g, ''); + if (!creditCard.test(sanitized)) { + return false; + } + var sum = 0; + var digit = void 0; + var tmpNum = void 0; + var shouldDouble = void 0; + for (var i = sanitized.length - 1; i >= 0; i--) { + digit = sanitized.substring(i, i + 1); + tmpNum = parseInt(digit, 10); + if (shouldDouble) { + tmpNum *= 2; + if (tmpNum >= 10) { + sum += tmpNum % 10 + 1; + } else { + sum += tmpNum; + } + } else { + sum += tmpNum; + } + shouldDouble = !shouldDouble; + } + return !!(sum % 10 === 0 ? sanitized : false); + } + + var isin = /^[A-Z]{2}[0-9A-Z]{9}[0-9]$/; + + function isISIN(str) { + assertString(str); + if (!isin.test(str)) { + return false; + } + + var checksumStr = str.replace(/[A-Z]/g, function (character) { + return parseInt(character, 36); + }); + + var sum = 0; + var digit = void 0; + var tmpNum = void 0; + var shouldDouble = true; + for (var i = checksumStr.length - 2; i >= 0; i--) { + digit = checksumStr.substring(i, i + 1); + tmpNum = parseInt(digit, 10); + if (shouldDouble) { + tmpNum *= 2; + if (tmpNum >= 10) { + sum += tmpNum + 1; + } else { + sum += tmpNum; + } + } else { + sum += tmpNum; + } + shouldDouble = !shouldDouble; + } + + return parseInt(str.substr(str.length - 1), 10) === (10000 - sum) % 10; + } + + var isbn10Maybe = /^(?:[0-9]{9}X|[0-9]{10})$/; + var isbn13Maybe = /^(?:[0-9]{13})$/; + var factor = [1, 3]; + + function isISBN(str) { + var version = arguments.length <= 1 || arguments[1] === undefined ? '' : arguments[1]; + + assertString(str); + version = String(version); + if (!version) { + return isISBN(str, 10) || isISBN(str, 13); + } + var sanitized = str.replace(/[\s-]+/g, ''); + var checksum = 0; + var i = void 0; + if (version === '10') { + if (!isbn10Maybe.test(sanitized)) { + return false; + } + for (i = 0; i < 9; i++) { + checksum += (i + 1) * sanitized.charAt(i); + } + if (sanitized.charAt(9) === 'X') { + checksum += 10 * 10; + } else { + checksum += 10 * sanitized.charAt(9); + } + if (checksum % 11 === 0) { + return !!sanitized; + } + } else if (version === '13') { + if (!isbn13Maybe.test(sanitized)) { + return false; + } + for (i = 0; i < 12; i++) { + checksum += factor[i % 2] * sanitized.charAt(i); + } + if (sanitized.charAt(12) - (10 - checksum % 10) % 10 === 0) { + return !!sanitized; + } + } + return false; + } + + /* eslint-disable max-len */ + var phones = { + 'ar-DZ': /^(\+?213|0)(5|6|7)\d{8}$/, + 'ar-SY': /^(!?(\+?963)|0)?9\d{8}$/, + 'ar-SA': /^(!?(\+?966)|0)?5\d{8}$/, + 'en-US': /^(\+?1)?[2-9]\d{2}[2-9](?!11)\d{6}$/, + 'cs-CZ': /^(\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/, + 'de-DE': /^(\+?49[ \.\-])?([\(]{1}[0-9]{1,6}[\)])?([0-9 \.\-\/]{3,20})((x|ext|extension)[ ]?[0-9]{1,4})?$/, + 'da-DK': /^(\+?45)?(\d{8})$/, + 'el-GR': /^(\+?30)?(69\d{8})$/, + 'en-AU': /^(\+?61|0)4\d{8}$/, + 'en-GB': /^(\+?44|0)7\d{9}$/, + 'en-HK': /^(\+?852\-?)?[569]\d{3}\-?\d{4}$/, + 'en-IN': /^(\+?91|0)?[789]\d{9}$/, + 'en-NZ': /^(\+?64|0)2\d{7,9}$/, + 'en-ZA': /^(\+?27|0)\d{9}$/, + 'en-ZM': /^(\+?26)?09[567]\d{7}$/, + 'es-ES': /^(\+?34)?(6\d{1}|7[1234])\d{7}$/, + 'fi-FI': /^(\+?358|0)\s?(4(0|1|2|4|5)?|50)\s?(\d\s?){4,8}\d$/, + 'fr-FR': /^(\+?33|0)[67]\d{8}$/, + 'hu-HU': /^(\+?36)(20|30|70)\d{7}$/, + 'it-IT': /^(\+?39)?\s?3\d{2} ?\d{6,7}$/, + 'ja-JP': /^(\+?81|0)\d{1,4}[ \-]?\d{1,4}[ \-]?\d{4}$/, + 'ms-MY': /^(\+?6?01){1}(([145]{1}(\-|\s)?\d{7,8})|([236789]{1}(\s|\-)?\d{7}))$/, + 'nb-NO': /^(\+?47)?[49]\d{7}$/, + 'nl-BE': /^(\+?32|0)4?\d{8}$/, + 'nn-NO': /^(\+?47)?[49]\d{7}$/, + 'pl-PL': /^(\+?48)? ?[5-8]\d ?\d{3} ?\d{2} ?\d{2}$/, + 'pt-BR': /^(\+?55|0)\-?[1-9]{2}\-?[2-9]{1}\d{3,4}\-?\d{4}$/, + 'pt-PT': /^(\+?351)?9[1236]\d{7}$/, + 'ru-RU': /^(\+?7|8)?9\d{9}$/, + 'sr-RS': /^(\+3816|06)[- \d]{5,9}$/, + 'tr-TR': /^(\+?90|0)?5\d{9}$/, + 'vi-VN': /^(\+?84|0)?((1(2([0-9])|6([2-9])|88|99))|(9((?!5)[0-9])))([0-9]{7})$/, + 'zh-CN': /^(\+?0?86\-?)?1[345789]\d{9}$/, + 'zh-TW': /^(\+?886\-?|0)?9\d{8}$/ + }; + /* eslint-enable max-len */ + + // aliases + phones['en-CA'] = phones['en-US']; + phones['fr-BE'] = phones['nl-BE']; + + function isMobilePhone(str, locale) { + assertString(str); + if (locale in phones) { + return phones[locale].test(str); + } + return false; + } + + function currencyRegex(options) { + var symbol = '(\\' + options.symbol.replace(/\./g, '\\.') + ')' + (options.require_symbol ? '' : '?'), + negative = '-?', + whole_dollar_amount_without_sep = '[1-9]\\d*', + whole_dollar_amount_with_sep = '[1-9]\\d{0,2}(\\' + options.thousands_separator + '\\d{3})*', + valid_whole_dollar_amounts = ['0', whole_dollar_amount_without_sep, whole_dollar_amount_with_sep], + whole_dollar_amount = '(' + valid_whole_dollar_amounts.join('|') + ')?', + decimal_amount = '(\\' + options.decimal_separator + '\\d{2})?'; + var pattern = whole_dollar_amount + decimal_amount; + + // default is negative sign before symbol, but there are two other options (besides parens) + if (options.allow_negatives && !options.parens_for_negatives) { + if (options.negative_sign_after_digits) { + pattern += negative; + } else if (options.negative_sign_before_digits) { + pattern = negative + pattern; + } + } + + // South African Rand, for example, uses R 123 (space) and R-123 (no space) + if (options.allow_negative_sign_placeholder) { + pattern = '( (?!\\-))?' + pattern; + } else if (options.allow_space_after_symbol) { + pattern = ' ?' + pattern; + } else if (options.allow_space_after_digits) { + pattern += '( (?!$))?'; + } + + if (options.symbol_after_digits) { + pattern += symbol; + } else { + pattern = symbol + pattern; + } + + if (options.allow_negatives) { + if (options.parens_for_negatives) { + pattern = '(\\(' + pattern + '\\)|' + pattern + ')'; + } else if (!(options.negative_sign_before_digits || options.negative_sign_after_digits)) { + pattern = negative + pattern; + } + } + + /* eslint-disable prefer-template */ + return new RegExp('^' + + // ensure there's a dollar and/or decimal amount, and that + // it doesn't start with a space or a negative sign followed by a space + '(?!-? )(?=.*\\d)' + pattern + '$'); + /* eslint-enable prefer-template */ + } + + var default_currency_options = { + symbol: '$', + require_symbol: false, + allow_space_after_symbol: false, + symbol_after_digits: false, + allow_negatives: true, + parens_for_negatives: false, + negative_sign_before_digits: false, + negative_sign_after_digits: false, + allow_negative_sign_placeholder: false, + thousands_separator: ',', + decimal_separator: '.', + allow_space_after_digits: false + }; + + function isCurrency(str, options) { + assertString(str); + options = merge(options, default_currency_options); + return currencyRegex(options).test(str); + } + + var notBase64 = /[^A-Z0-9+\/=]/i; + + function isBase64(str) { + assertString(str); + var len = str.length; + if (!len || len % 4 !== 0 || notBase64.test(str)) { + return false; + } + var firstPaddingChar = str.indexOf('='); + return firstPaddingChar === -1 || firstPaddingChar === len - 1 || firstPaddingChar === len - 2 && str[len - 1] === '='; + } + + var dataURI = /^\s*data:([a-z]+\/[a-z0-9\-\+]+(;[a-z\-]+=[a-z0-9\-]+)?)?(;base64)?,[a-z0-9!\$&',\(\)\*\+,;=\-\._~:@\/\?%\s]*\s*$/i; // eslint-disable-line max-len + + function isDataURI(str) { + assertString(str); + return dataURI.test(str); + } + + function ltrim(str, chars) { + assertString(str); + var pattern = chars ? new RegExp('^[' + chars + ']+', 'g') : /^\s+/g; + return str.replace(pattern, ''); + } + + function rtrim(str, chars) { + assertString(str); + var pattern = chars ? new RegExp('[' + chars + ']') : /\s/; + + var idx = str.length - 1; + while (idx >= 0 && pattern.test(str[idx])) { + idx--; + } + + return idx < str.length ? str.substr(0, idx + 1) : str; + } + + function trim(str, chars) { + return rtrim(ltrim(str, chars), chars); + } + + function escape(str) { + assertString(str); + return str.replace(/&/g, '&').replace(/"/g, '"').replace(/'/g, ''').replace(//g, '>').replace(/\//g, '/').replace(/`/g, '`'); + } + + function unescape(str) { + assertString(str); + return str.replace(/&/g, '&').replace(/"/g, '"').replace(/'/g, "'").replace(/</g, '<').replace(/>/g, '>').replace(///g, '/').replace(/`/g, '`'); + } + + function blacklist(str, chars) { + assertString(str); + return str.replace(new RegExp('[' + chars + ']+', 'g'), ''); + } + + function stripLow(str, keep_new_lines) { + assertString(str); + var chars = keep_new_lines ? '\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F\\x7F' : '\\x00-\\x1F\\x7F'; + return blacklist(str, chars); + } + + function whitelist(str, chars) { + assertString(str); + return str.replace(new RegExp('[^' + chars + ']+', 'g'), ''); + } + + function isWhitelisted(str, chars) { + assertString(str); + for (var i = str.length - 1; i >= 0; i--) { + if (chars.indexOf(str[i]) === -1) { + return false; + } + } + return true; + } + + var default_normalize_email_options = { + lowercase: true, + remove_dots: true, + remove_extension: true + }; + + function normalizeEmail(email, options) { + options = merge(options, default_normalize_email_options); + if (!isEmail(email)) { + return false; + } + var parts = email.split('@', 2); + parts[1] = parts[1].toLowerCase(); + if (parts[1] === 'gmail.com' || parts[1] === 'googlemail.com') { + if (options.remove_extension) { + parts[0] = parts[0].split('+')[0]; + } + if (options.remove_dots) { + parts[0] = parts[0].replace(/\./g, ''); + } + if (!parts[0].length) { + return false; + } + parts[0] = parts[0].toLowerCase(); + parts[1] = 'gmail.com'; + } else if (options.lowercase) { + parts[0] = parts[0].toLowerCase(); + } + return parts.join('@'); + } + + var version = '5.7.0'; + + var validator = { + version: version, + toDate: toDate, + toFloat: toFloat, toInt: toInt, + toBoolean: toBoolean, + equals: equals, contains: contains, matches: matches, + isEmail: isEmail, isURL: isURL, isMACAddress: isMACAddress, isIP: isIP, isFQDN: isFDQN, + isBoolean: isBoolean, + isAlpha: isAlpha, isAlphanumeric: isAlphanumeric, isNumeric: isNumeric, isLowercase: isLowercase, isUppercase: isUppercase, + isAscii: isAscii, isFullWidth: isFullWidth, isHalfWidth: isHalfWidth, isVariableWidth: isVariableWidth, + isMultibyte: isMultibyte, isSurrogatePair: isSurrogatePair, + isInt: isInt, isFloat: isFloat, isDecimal: isDecimal, isHexadecimal: isHexadecimal, isDivisibleBy: isDivisibleBy, + isHexColor: isHexColor, + isMD5: isMD5, + isJSON: isJSON, + isNull: isNull, + isLength: isLength, isByteLength: isByteLength, + isUUID: isUUID, isMongoId: isMongoId, + isDate: isDate, isAfter: isAfter, isBefore: isBefore, + isIn: isIn, + isCreditCard: isCreditCard, + isISIN: isISIN, isISBN: isISBN, + isMobilePhone: isMobilePhone, + isCurrency: isCurrency, + isISO8601: isISO8601, + isBase64: isBase64, isDataURI: isDataURI, + ltrim: ltrim, rtrim: rtrim, trim: trim, + escape: escape, unescape: unescape, stripLow: stripLow, + whitelist: whitelist, blacklist: blacklist, + isWhitelisted: isWhitelisted, + normalizeEmail: normalizeEmail, + toString: toString + }; + + return validator; + +})); \ No newline at end of file diff --git a/node_modules/validator/validator.min.js b/node_modules/validator/validator.min.js new file mode 100644 index 0000000..39efbd2 --- /dev/null +++ b/node_modules/validator/validator.min.js @@ -0,0 +1,23 @@ +/*! + * Copyright (c) 2016 Chris O'Hara + * + * 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. + */ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.validator=t()}(this,function(){"use strict";function e(e){if("string"!=typeof e)throw new TypeError("This library (validator.js) validates strings only")}function t(t){return e(t),t=Date.parse(t),isNaN(t)?null:new Date(t)}function r(t){return e(t),parseFloat(t)}function n(t,r){return e(t),parseInt(t,r||10)}function i(t,r){return e(t),r?"1"===t||"true"===t:"0"!==t&&"false"!==t&&""!==t}function o(t,r){return e(t),t===r}function a(e){return"object"===("undefined"==typeof e?"undefined":pe(e))&&null!==e?e="function"==typeof e.toString?e.toString():"[object Object]":(null===e||"undefined"==typeof e||isNaN(e)&&!e.length)&&(e=""),String(e)}function u(t,r){return e(t),t.indexOf(a(r))>=0}function s(t,r,n){return e(t),"[object RegExp]"!==Object.prototype.toString.call(r)&&(r=new RegExp(r,n)),r.test(t)}function l(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=arguments[1];for(var r in t)"undefined"==typeof e[r]&&(e[r]=t[r]);return e}function f(t,r){e(t);var n=void 0,i=void 0;"object"===("undefined"==typeof r?"undefined":pe(r))?(n=r.min||0,i=r.max):(n=arguments[1],i=arguments[2]);var o=encodeURI(t).split(/%..|./).length-1;return o>=n&&("undefined"==typeof i||o<=i)}function d(t,r){e(t),r=l(r,ge),r.allow_trailing_dot&&"."===t[t.length-1]&&(t=t.substring(0,t.length-1));var n=t.split(".");if(r.require_tld){var i=n.pop();if(!n.length||!/^([a-z\u00a1-\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(i))return!1}for(var o,a=0;au)return!1;if("::"===t)return!0;"::"===t.substr(0,2)?(i.shift(),i.shift(),o=!0):"::"===t.substr(t.length-2)&&(i.pop(),i.pop(),o=!0);for(var s=0;s0&&s=1:i.length===u}return!1}function g(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function F(e,t){for(var r=0;r=2083||/\s/.test(t))return!1;if(0===t.indexOf("mailto:"))return!1;r=l(r,we);var n=void 0,i=void 0,o=void 0,a=void 0,u=void 0,s=void 0,f=void 0,c=void 0;if(f=t.split("#"),t=f.shift(),f=t.split("?"),t=f.shift(),f=t.split("://"),f.length>1){if(n=f.shift(),r.require_valid_protocol&&r.protocols.indexOf(n)===-1)return!1}else{if(r.require_protocol)return!1;r.allow_protocol_relative_urls&&"//"===t.substr(0,2)&&(f[0]=t.substr(2))}if(t=f.join("://"),f=t.split("/"),t=f.shift(),""===t&&!r.require_host)return!0;if(f=t.split("@"),f.length>1&&(i=f.shift(),i.indexOf(":")>=0&&i.split(":").length>2))return!1;a=f.join("@"),s=c=null;var g=a.match(be);return g?(o="",c=g[1],s=g[2]||null):(f=a.split(":"),o=f.shift(),f.length&&(s=f.join(":"))),!(null!==s&&(u=parseInt(s,10),!/^[0-9]+$/.test(s)||u<=0||u>65535))&&(!!(p(o)||d(o,r)||c&&p(c,6)||"localhost"===o)&&(o=o||c,!(r.host_whitelist&&!F(o,r.host_whitelist))&&(!r.host_blacklist||!F(o,r.host_blacklist))))}function _(t){return e(t),ye.test(t)}function h(t){return e(t),["true","false","1","0"].indexOf(t)>=0}function $(t){var r=arguments.length<=1||void 0===arguments[1]?"en-US":arguments[1];if(e(t),r in De)return De[r].test(t);throw new Error("Invalid locale '"+r+"'")}function x(t){var r=arguments.length<=1||void 0===arguments[1]?"en-US":arguments[1];if(e(t),r in Se)return Se[r].test(t);throw new Error("Invalid locale '"+r+"'")}function A(t){return e(t),Ce.test(t)}function m(t){return e(t),t===t.toLowerCase()}function w(t){return e(t),t===t.toUpperCase()}function b(t){return e(t),Ne.test(t)}function y(t){return e(t),je.test(t)}function D(t){return e(t),Ue.test(t)}function S(t){return e(t),je.test(t)&&Ue.test(t)}function Z(t){return e(t),ze.test(t)}function E(t){return e(t),Be.test(t)}function I(t,r){e(t),r=r||{};var n=r.hasOwnProperty("allow_leading_zeroes")&&r.allow_leading_zeroes?Pe:Le,i=!r.hasOwnProperty("min")||t>=r.min,o=!r.hasOwnProperty("max")||t<=r.max;return n.test(t)&&i&&o}function O(t,r){return e(t),r=r||{},""!==t&&"."!==t&&(qe.test(t)&&(!r.hasOwnProperty("min")||t>=r.min)&&(!r.hasOwnProperty("max")||t<=r.max))}function R(t){return e(t),""!==t&&Te.test(t)}function C(t){return e(t),Me.test(t)}function N(t,n){return e(t),r(t)%parseInt(n,10)===0}function j(t){return e(t),He.test(t)}function U(t){return e(t),We.test(t)}function z(t){e(t);try{var r=JSON.parse(t);return!!r&&"object"===("undefined"==typeof r?"undefined":pe(r))}catch(e){}return!1}function B(t){return e(t),0===t.length}function L(t,r){e(t);var n=void 0,i=void 0;"object"===("undefined"==typeof r?"undefined":pe(r))?(n=r.min||0,i=r.max):(n=arguments[1],i=arguments[2]);var o=t.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g)||[],a=t.length-o.length;return a>=n&&("undefined"==typeof i||a<=i)}function P(t){var r=arguments.length<=1||void 0===arguments[1]?"all":arguments[1];e(t);var n=Ye[r];return n&&n.test(t)}function q(t){return e(t),C(t)&&24===t.length}function T(t){return e(t),Ge.test(t)}function M(e){var t=e.match(Ge),r=void 0,n=void 0,i=void 0,o=void 0;if(t){if(r=t[21],!r)return t[12]?null:0;if("z"===r||"Z"===r)return 0;n=t[22],r.indexOf(":")!==-1?(i=parseInt(t[23],10),o=parseInt(t[24],10)):(i=0,o=parseInt(t[23],10))}else{if(e=e.toLowerCase(),r=e.match(/(?:\s|gmt\s*)(-|\+)(\d{1,4})(\s|$)/),!r)return e.indexOf("gmt")!==-1?0:null;n=r[1];var a=r[2];3===a.length&&(a="0"+a),a.length<=2?(i=0,o=parseInt(a,10)):(i=parseInt(a.slice(0,2),10),o=parseInt(a.slice(2,4),10))}return(60*i+o)*("-"===n?1:-1)}function H(t){e(t);var r=new Date(Date.parse(t));if(isNaN(r))return!1;var n=M(t);if(null!==n){var i=r.getTimezoneOffset()-n;r=new Date(r.getTime()+6e4*i)}var o=String(r.getDate()),a=void 0,u=void 0,s=void 0;return!(u=t.match(/(^|[^:\d])[23]\d([^T:\d]|$)/g))||(a=u.map(function(e){return e.match(/\d+/g)[0]}).join("/"),s=String(r.getFullYear()).slice(-2),a===o||a===s||(a===""+o/s||a===""+s/o))}function W(r){var n=arguments.length<=1||void 0===arguments[1]?String(new Date):arguments[1];e(r);var i=t(n),o=t(r);return!!(o&&i&&o>i)}function Y(r){var n=arguments.length<=1||void 0===arguments[1]?String(new Date):arguments[1];e(r);var i=t(n),o=t(r);return!!(o&&i&&o=0}return"object"===("undefined"==typeof r?"undefined":pe(r))?r.hasOwnProperty(t):!(!r||"function"!=typeof r.indexOf)&&r.indexOf(t)>=0}function J(t){e(t);var r=t.replace(/[^0-9]+/g,"");if(!Je.test(r))return!1;for(var n=0,i=void 0,o=void 0,a=void 0,u=r.length-1;u>=0;u--)i=r.substring(u,u+1),o=parseInt(i,10),a?(o*=2,n+=o>=10?o%10+1:o):n+=o,a=!a;return!(n%10!==0||!r)}function K(t){if(e(t),!Ke.test(t))return!1;for(var r=t.replace(/[A-Z]/g,function(e){return parseInt(e,36)}),n=0,i=void 0,o=void 0,a=!0,u=r.length-2;u>=0;u--)i=r.substring(u,u+1),o=parseInt(i,10),a?(o*=2,n+=o>=10?o+1:o):n+=o,a=!a;return parseInt(t.substr(t.length-1),10)===(1e4-n)%10}function Q(t){var r=arguments.length<=1||void 0===arguments[1]?"":arguments[1];if(e(t),r=String(r),!r)return Q(t,10)||Q(t,13);var n=t.replace(/[\s-]+/g,""),i=0,o=void 0;if("10"===r){if(!Qe.test(n))return!1;for(o=0;o<9;o++)i+=(o+1)*n.charAt(o);if(i+="X"===n.charAt(9)?100:10*n.charAt(9),i%11===0)return!!n}else if("13"===r){if(!ke.test(n))return!1;for(o=0;o<12;o++)i+=Ve[o%2]*n.charAt(o);if(n.charAt(12)-(10-i%10)%10===0)return!!n}return!1}function k(t,r){return e(t),r in Xe&&Xe[r].test(t)}function V(e){var t="(\\"+e.symbol.replace(/\./g,"\\.")+")"+(e.require_symbol?"":"?"),r="-?",n="[1-9]\\d*",i="[1-9]\\d{0,2}(\\"+e.thousands_separator+"\\d{3})*",o=["0",n,i],a="("+o.join("|")+")?",u="(\\"+e.decimal_separator+"\\d{2})?",s=a+u;return e.allow_negatives&&!e.parens_for_negatives&&(e.negative_sign_after_digits?s+=r:e.negative_sign_before_digits&&(s=r+s)),e.allow_negative_sign_placeholder?s="( (?!\\-))?"+s:e.allow_space_after_symbol?s=" ?"+s:e.allow_space_after_digits&&(s+="( (?!$))?"),e.symbol_after_digits?s+=t:s=t+s,e.allow_negatives&&(e.parens_for_negatives?s="(\\("+s+"\\)|"+s+")":e.negative_sign_before_digits||e.negative_sign_after_digits||(s=r+s)),new RegExp("^(?!-? )(?=.*\\d)"+s+"$")}function X(t,r){return e(t),r=l(r,et),V(r).test(t)}function ee(t){e(t);var r=t.length;if(!r||r%4!==0||tt.test(t))return!1;var n=t.indexOf("=");return n===-1||n===r-1||n===r-2&&"="===t[r-1]}function te(t){return e(t),rt.test(t)}function re(t,r){e(t);var n=r?new RegExp("^["+r+"]+","g"):/^\s+/g;return t.replace(n,"")}function ne(t,r){e(t);for(var n=r?new RegExp("["+r+"]"):/\s/,i=t.length-1;i>=0&&n.test(t[i]);)i--;return i/g,">").replace(/\//g,"/").replace(/`/g,"`")}function ae(t){return e(t),t.replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").replace(///g,"/").replace(/`/g,"`")}function ue(t,r){return e(t),t.replace(new RegExp("["+r+"]+","g"),"")}function se(t,r){e(t);var n=r?"\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F\\x7F":"\\x00-\\x1F\\x7F";return ue(t,n)}function le(t,r){return e(t),t.replace(new RegExp("[^"+r+"]+","g"),"")}function fe(t,r){e(t);for(var n=t.length-1;n>=0;n--)if(r.indexOf(t[n])===-1)return!1;return!0}function de(e,t){if(t=l(t,nt),!c(e))return!1;var r=e.split("@",2);if(r[1]=r[1].toLowerCase(),"gmail.com"===r[1]||"googlemail.com"===r[1]){if(t.remove_extension&&(r[0]=r[0].split("+")[0]),t.remove_dots&&(r[0]=r[0].replace(/\./g,"")),!r[0].length)return!1;r[0]=r[0].toLowerCase(),r[1]="gmail.com"}else t.lowercase&&(r[0]=r[0].toLowerCase());return r.join("@")}for(var ce,pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},ge={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1},Fe={allow_display_name:!1,allow_utf8_local_part:!0,require_tld:!0},ve=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF\s]*<(.+)>$/i,_e=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,he=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,$e=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,xe=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i,Ae=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/,me=/^[0-9A-F]{1,4}$/i,we={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1},be=/^\[([^\]]+)\](?::([0-9]+))?$/,ye=/^([0-9a-fA-F][0-9a-fA-F]:){5}([0-9a-fA-F][0-9a-fA-F])$/,De={"en-US":/^[A-Z]+$/i,"cs-CZ":/^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,"de-DE":/^[A-ZÄÖÜß]+$/i,"es-ES":/^[A-ZÁÉÍÑÓÚÜ]+$/i,"fr-FR":/^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,"nl-NL":/^[A-ZÉËÏÓÖÜ]+$/i,"hu-HU":/^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i,"pl-PL":/^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i,"pt-PT":/^[A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]+$/i,"ru-RU":/^[А-ЯЁ]+$/i,"sr-RS@latin":/^[A-ZČĆŽŠĐ]+$/i,"sr-RS":/^[А-ЯЂЈЉЊЋЏ]+$/i,"tr-TR":/^[A-ZÇĞİıÖŞÜ]+$/i,ar:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/},Se={"en-US":/^[0-9A-Z]+$/i,"cs-CZ":/^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,"de-DE":/^[0-9A-ZÄÖÜß]+$/i,"es-ES":/^[0-9A-ZÁÉÍÑÓÚÜ]+$/i,"fr-FR":/^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,"hu-HU":/^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i,"nl-NL":/^[0-9A-ZÉËÏÓÖÜ]+$/i,"pl-PL":/^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i,"pt-PT":/^[0-9A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]+$/i,"ru-RU":/^[0-9А-ЯЁ]+$/i,"sr-RS@latin":/^[0-9A-ZČĆŽŠĐ]+$/i,"sr-RS":/^[0-9А-ЯЂЈЉЊЋЏ]+$/i,"tr-TR":/^[0-9A-ZÇĞİıÖŞÜ]+$/i,ar:/^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/},Ze=["AU","GB","HK","IN","NZ","ZA","ZM"],Ee=0;Ee + +```js +var vary = require('vary') +``` + +### vary(res, field) + +Adds the given header `field` to the `Vary` response header of `res`. +This can be a string of a single field, a string of a valid `Vary` +header, or an array of multiple fields. + +This will append the header if not already listed, otherwise leaves +it listed in the current location. + + + +```js +// Append "Origin" to the Vary header of the response +vary(res, 'Origin') +``` + +### vary.append(header, field) + +Adds the given header `field` to the `Vary` response header string `header`. +This can be a string of a single field, a string of a valid `Vary` header, +or an array of multiple fields. + +This will append the header if not already listed, otherwise leaves +it listed in the current location. The new header string is returned. + + + +```js +// Get header string appending "Origin" to "Accept, User-Agent" +vary.append('Accept, User-Agent', 'Origin') +``` + +## Examples + +### Updating the Vary header when content is based on it + +```js +var http = require('http') +var vary = require('vary') + +http.createServer(function onRequest (req, res) { + // about to user-agent sniff + vary(res, 'User-Agent') + + var ua = req.headers['user-agent'] || '' + var isMobile = /mobi|android|touch|mini/i.test(ua) + + // serve site, depending on isMobile + res.setHeader('Content-Type', 'text/html') + res.end('You are (probably) ' + (isMobile ? '' : 'not ') + 'a mobile user') +}) +``` + +## Testing + +```sh +$ npm test +``` + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/vary.svg +[npm-url]: https://npmjs.org/package/vary +[node-version-image]: https://img.shields.io/node/v/vary.svg +[node-version-url]: https://nodejs.org/en/download +[travis-image]: https://img.shields.io/travis/jshttp/vary/master.svg +[travis-url]: https://travis-ci.org/jshttp/vary +[coveralls-image]: https://img.shields.io/coveralls/jshttp/vary/master.svg +[coveralls-url]: https://coveralls.io/r/jshttp/vary +[downloads-image]: https://img.shields.io/npm/dm/vary.svg +[downloads-url]: https://npmjs.org/package/vary diff --git a/node_modules/vary/index.js b/node_modules/vary/index.js new file mode 100644 index 0000000..ac37a83 --- /dev/null +++ b/node_modules/vary/index.js @@ -0,0 +1,131 @@ +/*! + * vary + * Copyright(c) 2014-2017 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + */ + +module.exports = vary +module.exports.append = append + +/** + * Regular expression to split on commas, trimming spaces + * @private + */ + +var ARRAY_SPLIT_REGEXP = / *, */ + +/** + * RegExp to match field-name in RFC 7230 sec 3.2 + * + * field-name = token + * token = 1*tchar + * tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" + * / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" + * / DIGIT / ALPHA + * ; any VCHAR, except delimiters + */ + +var FIELD_NAME_REGEXP = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/ + +/** + * Append a field to a vary header. + * + * @param {String} header + * @param {String|Array} field + * @return {String} + * @public + */ + +function append (header, field) { + if (typeof header !== 'string') { + throw new TypeError('header argument is required') + } + + if (!field) { + throw new TypeError('field argument is required') + } + + // get fields array + var fields = !Array.isArray(field) + ? parse(String(field)) + : field + + // assert on invalid field names + for (var j = 0; j < fields.length; j++) { + if (!FIELD_NAME_REGEXP.test(fields[j])) { + throw new TypeError('field argument contains an invalid header name') + } + } + + // existing, unspecified vary + if (header === '*') { + return header + } + + // enumerate current values + var val = header + var vals = parse(header.toLowerCase()) + + // unspecified vary + if (fields.indexOf('*') !== -1 || vals.indexOf('*') !== -1) { + return '*' + } + + for (var i = 0; i < fields.length; i++) { + var fld = fields[i].toLowerCase() + + // append value (case-preserving) + if (vals.indexOf(fld) === -1) { + vals.push(fld) + val = val + ? val + ', ' + fields[i] + : fields[i] + } + } + + return val +} + +/** + * Parse a vary header into an array. + * + * @param {String} header + * @return {Array} + * @private + */ + +function parse (header) { + return header.trim().split(ARRAY_SPLIT_REGEXP) +} + +/** + * Mark that a request is varied on a header field. + * + * @param {Object} res + * @param {String|Array} field + * @public + */ + +function vary (res, field) { + if (!res || !res.getHeader || !res.setHeader) { + // quack quack + throw new TypeError('res argument is required') + } + + // get existing header + var val = res.getHeader('Vary') || '' + var header = Array.isArray(val) + ? val.join(', ') + : String(val) + + // set new header + if ((val = append(header, field))) { + res.setHeader('Vary', val) + } +} diff --git a/node_modules/vary/package.json b/node_modules/vary/package.json new file mode 100644 index 0000000..e31d665 --- /dev/null +++ b/node_modules/vary/package.json @@ -0,0 +1,109 @@ +{ + "_args": [ + [ + { + "raw": "vary@~1.1.0", + "scope": null, + "escapedName": "vary", + "name": "vary", + "rawSpec": "~1.1.0", + "spec": ">=1.1.0 <1.2.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/express" + ] + ], + "_from": "vary@>=1.1.0 <1.2.0", + "_id": "vary@1.1.1", + "_inCache": true, + "_location": "/vary", + "_nodeVersion": "4.7.3", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/vary-1.1.1.tgz_1490045547529_0.9355870047584176" + }, + "_npmUser": { + "name": "dougwilson", + "email": "doug@somethingdoug.com" + }, + "_npmVersion": "2.15.11", + "_phantomChildren": {}, + "_requested": { + "raw": "vary@~1.1.0", + "scope": null, + "escapedName": "vary", + "name": "vary", + "rawSpec": "~1.1.0", + "spec": ">=1.1.0 <1.2.0", + "type": "range" + }, + "_requiredBy": [ + "/express" + ], + "_resolved": "https://registry.npmjs.org/vary/-/vary-1.1.1.tgz", + "_shasum": "67535ebb694c1d52257457984665323f587e8d37", + "_shrinkwrap": null, + "_spec": "vary@~1.1.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/express", + "author": { + "name": "Douglas Christopher Wilson", + "email": "doug@somethingdoug.com" + }, + "bugs": { + "url": "https://github.com/jshttp/vary/issues" + }, + "dependencies": {}, + "description": "Manipulate the HTTP Vary header", + "devDependencies": { + "eslint": "3.18.0", + "eslint-config-standard": "7.1.0", + "eslint-plugin-markdown": "1.0.0-beta.4", + "eslint-plugin-promise": "3.5.0", + "eslint-plugin-standard": "2.1.1", + "istanbul": "0.4.5", + "mocha": "2.5.3", + "supertest": "1.1.0" + }, + "directories": {}, + "dist": { + "shasum": "67535ebb694c1d52257457984665323f587e8d37", + "tarball": "https://registry.npmjs.org/vary/-/vary-1.1.1.tgz" + }, + "engines": { + "node": ">= 0.8" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "README.md", + "index.js" + ], + "gitHead": "ca7edac6b919a45bf9e2c5cb6ba31c1790e9f046", + "homepage": "https://github.com/jshttp/vary#readme", + "keywords": [ + "http", + "res", + "vary" + ], + "license": "MIT", + "maintainers": [ + { + "name": "dougwilson", + "email": "doug@somethingdoug.com" + } + ], + "name": "vary", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jshttp/vary.git" + }, + "scripts": { + "lint": "eslint --plugin markdown --ext js,md .", + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" + }, + "version": "1.1.1" +} diff --git a/node_modules/vinyl-fs/LICENSE b/node_modules/vinyl-fs/LICENSE new file mode 100755 index 0000000..7cbe012 --- /dev/null +++ b/node_modules/vinyl-fs/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2014 Fractal + +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. diff --git a/node_modules/vinyl-fs/README.md b/node_modules/vinyl-fs/README.md new file mode 100644 index 0000000..d3248d7 --- /dev/null +++ b/node_modules/vinyl-fs/README.md @@ -0,0 +1,93 @@ +# vinyl-fs [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status](https://david-dm.org/wearefractal/vinyl.png?theme=shields.io)](https://david-dm.org/wearefractal/vinyl-fs) + +## Information + + + + + + + + + + + + + +
    Packagevinyl-fs
    DescriptionVinyl adapter for the file system
    Node Version>= 0.10
    + +## Usage + +```javascript +var map = require('map-stream'); +var fs = require('vinyl-fs'); + +var log = function(file, cb) { + console.log(file.path); + cb(null, file); +}; + +fs.src(['./js/**/*.js', '!./js/vendor/*.js']) + .pipe(map(log)) + .pipe(fs.dest('./output')); +``` + +## API + +### src(globs[, opt]) + +- Takes a glob string or an array of glob strings as the first argument. +- Possible options for the second argument: + - cwd - Specify the working directory the folder is relative to. Default is `process.cwd()` + - base - Specify the folder relative to the cwd. Default is where the glob begins. This is used to determine the file names when saving in `.dest()` + - buffer - `true` or `false` if you want to buffer the file. + - Default value is `true` + - `false` will make file.contents a paused Stream + - read - `true` or `false` if you want the file to be read or not. Useful for stuff like `rm`ing files. + - Default value is `true` + - `false` will disable writing the file to disk via `.dest()` + - Any glob-related options are documented in [glob-stream] and [node-glob] +- Returns a Readable/Writable stream. +- On write the stream will simply pass items through. +- This stream emits matching [vinyl] File objects + +### watch(globs[, opt, cb]) + +This is just [glob-watcher] + +- Takes a glob string or an array of glob strings as the first argument. +- Possible options for the second argument: + - Any options are passed to [gaze] +- Returns an EventEmitter + - 'changed' event is emitted on each file change +- Optionally calls the callback on each change event + +### dest(folder[, opt]) + +- Takes a folder path as the first argument. +- First argument can also be a function that takes in a file and returns a folder path. +- Possible options for the second argument: + - cwd - Specify the working directory the folder is relative to. Default is `process.cwd()` + - mode - Specify the mode the files should be created with. Default is the mode of the input file (file.stat.mode) +- Returns a Readable/Writable stream. +- On write the stream will save the [vinyl] File to disk at the folder/cwd specified. +- After writing the file to disk, it will be emitted from the stream so you can keep piping these around +- The file will be modified after being written to this stream + - `cwd`, `base`, and `path` will be overwritten to match the folder + - `stat.mode` will be overwritten if you used a mode parameter + - `contents` will have it's position reset to the beginning if it is a stream + +[glob-stream]: https://github.com/wearefractal/glob-stream +[node-glob]: https://github.com/isaacs/node-glob +[gaze]: https://github.com/shama/gaze +[glob-watcher]: https://github.com/wearefractal/glob-watcher +[vinyl]: https://github.com/wearefractal/vinyl + +[npm-url]: https://npmjs.org/package/vinyl-fs +[npm-image]: https://badge.fury.io/js/vinyl-fs.png +[travis-url]: https://travis-ci.org/wearefractal/vinyl-fs +[travis-image]: https://travis-ci.org/wearefractal/vinyl-fs.png?branch=master +[coveralls-url]: https://coveralls.io/r/wearefractal/vinyl-fs +[coveralls-image]: https://coveralls.io/repos/wearefractal/vinyl-fs/badge.png +[depstat-url]: https://david-dm.org/wearefractal/vinyl-fs +[depstat-image]: https://david-dm.org/wearefractal/vinyl-fs.png diff --git a/node_modules/vinyl-fs/index.js b/node_modules/vinyl-fs/index.js new file mode 100644 index 0000000..7306aa7 --- /dev/null +++ b/node_modules/vinyl-fs/index.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = { + src: require('./lib/src'), + dest: require('./lib/dest'), + watch: require('glob-watcher') +}; diff --git a/node_modules/vinyl-fs/lib/dest/index.js b/node_modules/vinyl-fs/lib/dest/index.js new file mode 100644 index 0000000..1b94ad3 --- /dev/null +++ b/node_modules/vinyl-fs/lib/dest/index.js @@ -0,0 +1,61 @@ +'use strict'; + +var defaults = require('defaults'); +var path = require('path'); +var through2 = require('through2'); +var mkdirp = require('mkdirp'); +var fs = require('graceful-fs'); + +var writeContents = require('./writeContents'); + + +function dest(outFolder, opt) { + opt = opt || {}; + if (typeof outFolder !== 'string' && typeof outFolder !== 'function') { + throw new Error('Invalid output folder'); + } + + var options = defaults(opt, { + cwd: process.cwd() + }); + + if (typeof options.mode === 'string') { + options.mode = parseInt(options.mode, 8); + } + + var cwd = path.resolve(options.cwd); + + function saveFile (file, enc, cb) { + var basePath; + if (typeof outFolder === 'string') { + basePath = path.resolve(cwd, outFolder); + } + if (typeof outFolder === 'function') { + basePath = path.resolve(cwd, outFolder(file)); + } + var writePath = path.resolve(basePath, file.relative); + var writeFolder = path.dirname(writePath); + + // wire up new properties + file.stat = file.stat ? file.stat : new fs.Stats(); + file.stat.mode = (options.mode || file.stat.mode); + file.cwd = cwd; + file.base = basePath; + file.path = writePath; + + // mkdirp the folder the file is going in + mkdirp(writeFolder, function(err){ + if (err) { + return cb(err); + } + writeContents(writePath, file, cb); + }); + } + + var stream = through2.obj(saveFile); + // TODO: option for either backpressure or lossy + stream.resume(); + return stream; +} + +module.exports = dest; diff --git a/node_modules/vinyl-fs/lib/dest/writeContents/index.js b/node_modules/vinyl-fs/lib/dest/writeContents/index.js new file mode 100644 index 0000000..ab8f0f9 --- /dev/null +++ b/node_modules/vinyl-fs/lib/dest/writeContents/index.js @@ -0,0 +1,59 @@ +'use strict'; + +var fs = require('fs'); +var writeDir = require('./writeDir'); +var writeStream = require('./writeStream'); +var writeBuffer = require('./writeBuffer'); + +function writeContents(writePath, file, cb) { + var written = function(err) { + var done = function(err) { + cb(err, file); + }; + if (err) { + return done(err); + } + + if (!file.stat || typeof file.stat.mode !== 'number') { + return done(); + } + + fs.stat(writePath, function(err, st) { + if (err) { + return done(err); + } + // octal 7777 = decimal 4095 + var currentMode = (st.mode & 4095); + if (currentMode === file.stat.mode) { + return done(); + } + fs.chmod(writePath, file.stat.mode, done); + }); + }; + + // if directory then mkdirp it + if (file.isDirectory()) { + writeDir(writePath, file, written); + return; + } + + // stream it to disk yo + if (file.isStream()) { + writeStream(writePath, file, written); + return; + } + + // write it like normal + if (file.isBuffer()) { + writeBuffer(writePath, file, written); + return; + } + + // if no contents then do nothing + if (file.isNull()) { + cb(null, file); + return; + } +} + +module.exports = writeContents; diff --git a/node_modules/vinyl-fs/lib/dest/writeContents/writeBuffer.js b/node_modules/vinyl-fs/lib/dest/writeContents/writeBuffer.js new file mode 100644 index 0000000..fe4be8f --- /dev/null +++ b/node_modules/vinyl-fs/lib/dest/writeContents/writeBuffer.js @@ -0,0 +1,13 @@ +'use strict'; + +var fs = require('graceful-fs'); + +function writeBuffer(writePath, file, cb) { + var opt = { + mode: file.stat.mode + }; + + fs.writeFile(writePath, file.contents, opt, cb); +} + +module.exports = writeBuffer; diff --git a/node_modules/vinyl-fs/lib/dest/writeContents/writeDir.js b/node_modules/vinyl-fs/lib/dest/writeContents/writeDir.js new file mode 100644 index 0000000..9614b54 --- /dev/null +++ b/node_modules/vinyl-fs/lib/dest/writeContents/writeDir.js @@ -0,0 +1,9 @@ +'use strict'; + +var mkdirp = require('mkdirp'); + +function writeDir (writePath, file, cb) { + mkdirp(writePath, file.stat.mode, cb); +} + +module.exports = writeDir; diff --git a/node_modules/vinyl-fs/lib/dest/writeContents/writeStream.js b/node_modules/vinyl-fs/lib/dest/writeContents/writeStream.js new file mode 100644 index 0000000..c49017a --- /dev/null +++ b/node_modules/vinyl-fs/lib/dest/writeContents/writeStream.js @@ -0,0 +1,22 @@ +'use strict'; + +var streamFile = require('../../src/getContents/streamFile'); +var fs = require('graceful-fs'); + +function writeStream (writePath, file, cb) { + var opt = { + mode: file.stat.mode + }; + + var outStream = fs.createWriteStream(writePath, opt); + + file.contents.once('error', cb); + outStream.once('error', cb); + outStream.once('finish', function() { + streamFile(file, cb); + }); + + file.contents.pipe(outStream); +} + +module.exports = writeStream; diff --git a/node_modules/vinyl-fs/lib/src/getContents/bufferFile.js b/node_modules/vinyl-fs/lib/src/getContents/bufferFile.js new file mode 100644 index 0000000..4448eb7 --- /dev/null +++ b/node_modules/vinyl-fs/lib/src/getContents/bufferFile.js @@ -0,0 +1,16 @@ +'use strict'; + +var fs = require('graceful-fs'); +var stripBom = require('strip-bom'); + +function bufferFile(file, cb) { + fs.readFile(file.path, function (err, data) { + if (err) { + return cb(err); + } + file.contents = stripBom(data); + cb(null, file); + }); +} + +module.exports = bufferFile; diff --git a/node_modules/vinyl-fs/lib/src/getContents/index.js b/node_modules/vinyl-fs/lib/src/getContents/index.js new file mode 100644 index 0000000..d21a254 --- /dev/null +++ b/node_modules/vinyl-fs/lib/src/getContents/index.js @@ -0,0 +1,26 @@ +'use strict'; + +var through2 = require('through2'); + +var readDir = require('./readDir'); +var bufferFile = require('./bufferFile'); +var streamFile = require('./streamFile'); + +function getContents(opt) { + return through2.obj(function (file, enc, cb) { + // don't fail to read a directory + if (file.isDirectory()) { + return readDir(file, cb); + } + + // read and pass full contents + if (opt.buffer !== false) { + return bufferFile(file, cb); + } + + // dont buffer anything - just pass streams + return streamFile(file, cb); + }); +} + +module.exports = getContents; diff --git a/node_modules/vinyl-fs/lib/src/getContents/readDir.js b/node_modules/vinyl-fs/lib/src/getContents/readDir.js new file mode 100644 index 0000000..783fac2 --- /dev/null +++ b/node_modules/vinyl-fs/lib/src/getContents/readDir.js @@ -0,0 +1,8 @@ +'use strict'; + +function readDir(file, cb) { + // do nothing for now + cb(null, file); +} + +module.exports = readDir; diff --git a/node_modules/vinyl-fs/lib/src/getContents/streamFile.js b/node_modules/vinyl-fs/lib/src/getContents/streamFile.js new file mode 100644 index 0000000..1743edd --- /dev/null +++ b/node_modules/vinyl-fs/lib/src/getContents/streamFile.js @@ -0,0 +1,13 @@ +'use strict'; + +var fs = require('graceful-fs'); +var stripBom = require('strip-bom'); + +function streamFile(file, cb) { + file.contents = fs.createReadStream(file.path) + .pipe(stripBom.stream()); + + cb(null, file); +} + +module.exports = streamFile; diff --git a/node_modules/vinyl-fs/lib/src/getStats.js b/node_modules/vinyl-fs/lib/src/getStats.js new file mode 100644 index 0000000..8380087 --- /dev/null +++ b/node_modules/vinyl-fs/lib/src/getStats.js @@ -0,0 +1,19 @@ +'use strict'; + +var through2 = require('through2'); +var fs = require('graceful-fs'); + +function getStats() { + return through2.obj(fetchStats); +} + +function fetchStats(file, enc, cb) { + fs.lstat(file.path, function (err, stat) { + if (stat) { + file.stat = stat; + } + cb(err, file); + }); +} + +module.exports = getStats; diff --git a/node_modules/vinyl-fs/lib/src/index.js b/node_modules/vinyl-fs/lib/src/index.js new file mode 100644 index 0000000..21a1771 --- /dev/null +++ b/node_modules/vinyl-fs/lib/src/index.js @@ -0,0 +1,61 @@ +'use strict'; + +var defaults = require('defaults'); +var through = require('through2'); +var gs = require('glob-stream'); +var File = require('vinyl'); + +var getContents = require('./getContents'); +var getStats = require('./getStats'); + +function createFile (globFile, enc, cb) { + cb(null, new File(globFile)); +} + +function src(glob, opt) { + opt = opt || {}; + var pass = through.obj(); + + if (!isValidGlob(glob)) { + throw new Error('Invalid glob argument: ' + glob); + } + // return dead stream if empty array + if (Array.isArray(glob) && glob.length === 0) { + process.nextTick(pass.end.bind(pass)); + return pass; + } + + var options = defaults(opt, { + read: true, + buffer: true + }); + + var globStream = gs.create(glob, options); + + // when people write to use just pass it through + var outputStream = globStream + .pipe(through.obj(createFile)) + .pipe(getStats(options)); + + if (options.read !== false) { + outputStream = outputStream + .pipe(getContents(options)); + } + + return outputStream.pipe(pass); +} + +function isValidGlob(glob) { + if (typeof glob === 'string') { + return true; + } + if (Array.isArray(glob) && glob.length !== 0) { + return glob.every(isValidGlob); + } + if (Array.isArray(glob) && glob.length === 0) { + return true; + } + return false; +} + +module.exports = src; diff --git a/node_modules/vinyl-fs/node_modules/clone/.npmignore b/node_modules/vinyl-fs/node_modules/clone/.npmignore new file mode 100644 index 0000000..c2658d7 --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/clone/.npmignore @@ -0,0 +1 @@ +node_modules/ diff --git a/node_modules/vinyl-fs/node_modules/clone/.travis.yml b/node_modules/vinyl-fs/node_modules/clone/.travis.yml new file mode 100644 index 0000000..58f2371 --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/clone/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - 0.6 + - 0.8 + - 0.10 diff --git a/node_modules/vinyl-fs/node_modules/clone/LICENSE b/node_modules/vinyl-fs/node_modules/clone/LICENSE new file mode 100644 index 0000000..fc808cc --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/clone/LICENSE @@ -0,0 +1,18 @@ +Copyright © 2011-2014 Paul Vorbach + +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, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/vinyl-fs/node_modules/clone/README.md b/node_modules/vinyl-fs/node_modules/clone/README.md new file mode 100644 index 0000000..d7231cf --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/clone/README.md @@ -0,0 +1,126 @@ +# clone + +[![build status](https://secure.travis-ci.org/pvorb/node-clone.png)](http://travis-ci.org/pvorb/node-clone) + +offers foolproof _deep cloning_ of variables in JavaScript. + + +## Installation + + npm install clone + +or + + ender build clone + + +## Example + +~~~ javascript +var clone = require('clone'); + +var a, b; + +a = { foo: { bar: 'baz' } }; // initial value of a + +b = clone(a); // clone a -> b +a.foo.bar = 'foo'; // change a + +console.log(a); // show a +console.log(b); // show b +~~~ + +This will print: + +~~~ javascript +{ foo: { bar: 'foo' } } +{ foo: { bar: 'baz' } } +~~~ + +**clone** masters cloning simple objects (even with custom prototype), arrays, +Date objects, and RegExp objects. Everything is cloned recursively, so that you +can clone dates in arrays in objects, for example. + + +## API + +`clone(val, circular, depth)` + + * `val` -- the value that you want to clone, any type allowed + * `circular` -- boolean + + Call `clone` with `circular` set to `false` if you are certain that `obj` + contains no circular references. This will give better performance if needed. + There is no error if `undefined` or `null` is passed as `obj`. + * `depth` -- depth to which the object is to be cloned (optional, + defaults to infinity) + +`clone.clonePrototype(obj)` + + * `obj` -- the object that you want to clone + +Does a prototype clone as +[described by Oran Looney](http://oranlooney.com/functional-javascript/). + + +## Circular References + +~~~ javascript +var a, b; + +a = { hello: 'world' }; + +a.myself = a; +b = clone(a); + +console.log(b); +~~~ + +This will print: + +~~~ javascript +{ hello: "world", myself: [Circular] } +~~~ + +So, `b.myself` points to `b`, not `a`. Neat! + + +## Test + + npm test + + +## Caveat + +Some special objects like a socket or `process.stdout`/`stderr` are known to not +be cloneable. If you find other objects that cannot be cloned, please [open an +issue](https://github.com/pvorb/node-clone/issues/new). + + +## Bugs and Issues + +If you encounter any bugs or issues, feel free to [open an issue at +github](https://github.com/pvorb/node-clone/issues) or send me an email to +. I also always like to hear from you, if you’re using my code. + +## License + +Copyright © 2011-2014 [Paul Vorbach](http://paul.vorba.ch/) and +[contributors](https://github.com/pvorb/node-clone/graphs/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, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/vinyl-fs/node_modules/clone/clone.js b/node_modules/vinyl-fs/node_modules/clone/clone.js new file mode 100644 index 0000000..f8fa315 --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/clone/clone.js @@ -0,0 +1,144 @@ +'use strict'; + +function objectToString(o) { + return Object.prototype.toString.call(o); +} + +// shim for Node's 'util' package +// DO NOT REMOVE THIS! It is required for compatibility with EnderJS (http://enderjs.com/). +var util = { + isArray: function (ar) { + return Array.isArray(ar) || (typeof ar === 'object' && objectToString(ar) === '[object Array]'); + }, + isDate: function (d) { + return typeof d === 'object' && objectToString(d) === '[object Date]'; + }, + isRegExp: function (re) { + return typeof re === 'object' && objectToString(re) === '[object RegExp]'; + }, + getRegExpFlags: function (re) { + var flags = ''; + re.global && (flags += 'g'); + re.ignoreCase && (flags += 'i'); + re.multiline && (flags += 'm'); + return flags; + } +}; + + +if (typeof module === 'object') + module.exports = clone; + +/** + * Clones (copies) an Object using deep copying. + * + * This function supports circular references by default, but if you are certain + * there are no circular references in your object, you can save some CPU time + * by calling clone(obj, false). + * + * Caution: if `circular` is false and `parent` contains circular references, + * your program may enter an infinite loop and crash. + * + * @param `parent` - the object to be cloned + * @param `circular` - set to true if the object to be cloned may contain + * circular references. (optional - true by default) + * @param `depth` - set to a number if the object is only to be cloned to + * a particular depth. (optional - defaults to Infinity) + * @param `prototype` - sets the prototype to be used when cloning an object. + * (optional - defaults to parent prototype). +*/ + +function clone(parent, circular, depth, prototype) { + // maintain two arrays for circular references, where corresponding parents + // and children have the same index + var allParents = []; + var allChildren = []; + + var useBuffer = typeof Buffer != 'undefined'; + + if (typeof circular == 'undefined') + circular = true; + + if (typeof depth == 'undefined') + depth = Infinity; + + // recurse this function so we don't reset allParents and allChildren + function _clone(parent, depth) { + // cloning null always returns null + if (parent === null) + return null; + + if (depth == 0) + return parent; + + var child; + var proto; + if (typeof parent != 'object') { + return parent; + } + + if (util.isArray(parent)) { + child = []; + } else if (util.isRegExp(parent)) { + child = new RegExp(parent.source, util.getRegExpFlags(parent)); + if (parent.lastIndex) child.lastIndex = parent.lastIndex; + } else if (util.isDate(parent)) { + child = new Date(parent.getTime()); + } else if (useBuffer && Buffer.isBuffer(parent)) { + child = new Buffer(parent.length); + parent.copy(child); + return child; + } else { + if (typeof prototype == 'undefined') { + proto = Object.getPrototypeOf(parent); + child = Object.create(proto); + } + else { + child = Object.create(prototype); + proto = prototype; + } + } + + if (circular) { + var index = allParents.indexOf(parent); + + if (index != -1) { + return allChildren[index]; + } + allParents.push(parent); + allChildren.push(child); + } + + for (var i in parent) { + var attrs; + if (proto) { + attrs = Object.getOwnPropertyDescriptor(proto, i); + } + + if (attrs && attrs.set == null) { + continue; + } + child[i] = _clone(parent[i], depth - 1); + } + + return child; + } + + return _clone(parent, depth); +} + +/** + * Simple flat clone using prototype, accepts only objects, usefull for property + * override on FLAT configuration object (no nested props). + * + * USE WITH CAUTION! This may not behave as you wish if you do not know how this + * works. + */ +clone.clonePrototype = function(parent) { + if (parent === null) + return null; + + var c = function () {}; + c.prototype = parent; + return new c(); +}; diff --git a/node_modules/vinyl-fs/node_modules/clone/package.json b/node_modules/vinyl-fs/node_modules/clone/package.json new file mode 100644 index 0000000..834d1af --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/clone/package.json @@ -0,0 +1,159 @@ +{ + "_args": [ + [ + { + "raw": "clone@^0.2.0", + "scope": null, + "escapedName": "clone", + "name": "clone", + "rawSpec": "^0.2.0", + "spec": ">=0.2.0 <0.3.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/vinyl-fs/node_modules/vinyl" + ] + ], + "_from": "clone@>=0.2.0 <0.3.0", + "_id": "clone@0.2.0", + "_inCache": true, + "_location": "/vinyl-fs/clone", + "_npmUser": { + "name": "pvorb", + "email": "paul@vorba.ch" + }, + "_npmVersion": "1.4.14", + "_phantomChildren": {}, + "_requested": { + "raw": "clone@^0.2.0", + "scope": null, + "escapedName": "clone", + "name": "clone", + "rawSpec": "^0.2.0", + "spec": ">=0.2.0 <0.3.0", + "type": "range" + }, + "_requiredBy": [ + "/vinyl-fs/vinyl" + ], + "_resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz", + "_shasum": "c6126a90ad4f72dbf5acdb243cc37724fe93fc1f", + "_shrinkwrap": null, + "_spec": "clone@^0.2.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/vinyl-fs/node_modules/vinyl", + "author": { + "name": "Paul Vorbach", + "email": "paul@vorba.ch", + "url": "http://paul.vorba.ch/" + }, + "bugs": { + "url": "https://github.com/pvorb/node-clone/issues" + }, + "contributors": [ + { + "name": "Blake Miner", + "email": "miner.blake@gmail.com", + "url": "http://www.blakeminer.com/" + }, + { + "name": "Tian You", + "email": "axqd001@gmail.com", + "url": "http://blog.axqd.net/" + }, + { + "name": "George Stagas", + "email": "gstagas@gmail.com", + "url": "http://stagas.com/" + }, + { + "name": "Tobiasz Cudnik", + "email": "tobiasz.cudnik@gmail.com", + "url": "https://github.com/TobiaszCudnik" + }, + { + "name": "Pavel Lang", + "email": "langpavel@phpskelet.org", + "url": "https://github.com/langpavel" + }, + { + "name": "Dan MacTough", + "url": "http://yabfog.com/" + }, + { + "name": "w1nk", + "url": "https://github.com/w1nk" + }, + { + "name": "Hugh Kennedy", + "url": "http://twitter.com/hughskennedy" + }, + { + "name": "Dustin Diaz", + "url": "http://dustindiaz.com" + }, + { + "name": "Ilya Shaisultanov", + "url": "https://github.com/diversario" + }, + { + "name": "Nathan MacInnes", + "email": "nathan@macinn.es", + "url": "http://macinn.es/" + }, + { + "name": "Benjamin E. Coe", + "email": "ben@npmjs.com", + "url": "https://twitter.com/benjamincoe" + }, + { + "name": "Nathan Zadoks", + "url": "https://github.com/nathan7" + }, + { + "name": "Róbert Oroszi", + "email": "robert+gh@oroszi.net", + "url": "https://github.com/oroce" + } + ], + "dependencies": {}, + "description": "deep cloning of objects and arrays", + "devDependencies": { + "nodeunit": "*", + "underscore": "*" + }, + "directories": {}, + "dist": { + "shasum": "c6126a90ad4f72dbf5acdb243cc37724fe93fc1f", + "tarball": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz" + }, + "engines": { + "node": "*" + }, + "gitHead": "bb11a43363a0f69e8ac014cb5376ce215ea1f8fd", + "homepage": "https://github.com/pvorb/node-clone", + "license": "MIT", + "main": "clone.js", + "maintainers": [ + { + "name": "pvorb", + "email": "paul@vorb.de" + } + ], + "name": "clone", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/pvorb/node-clone.git" + }, + "scripts": { + "test": "nodeunit test.js" + }, + "tags": [ + "clone", + "object", + "array", + "function", + "date" + ], + "version": "0.2.0" +} diff --git a/node_modules/vinyl-fs/node_modules/clone/test.js b/node_modules/vinyl-fs/node_modules/clone/test.js new file mode 100644 index 0000000..cb3d166 --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/clone/test.js @@ -0,0 +1,289 @@ +if(module.parent === null) { + console.log('Run this test file with nodeunit:'); + console.log('$ nodeunit test.js'); +} + + +var clone = require('./'); +var util = require('util'); +var _ = require('underscore'); + + + +exports["clone string"] = function(test) { + test.expect(2); // how many tests? + + var a = "foo"; + test.strictEqual(clone(a), a); + a = ""; + test.strictEqual(clone(a), a); + + test.done(); +}; + + + +exports["clone number"] = function(test) { + test.expect(5); // how many tests? + + var a = 0; + test.strictEqual(clone(a), a); + a = 1; + test.strictEqual(clone(a), a); + a = -1000; + test.strictEqual(clone(a), a); + a = 3.1415927; + test.strictEqual(clone(a), a); + a = -3.1415927; + test.strictEqual(clone(a), a); + + test.done(); +}; + + + +exports["clone date"] = function(test) { + test.expect(3); // how many tests? + + var a = new Date; + var c = clone(a); + test.ok(a instanceof Date); + test.ok(c instanceof Date); + test.equal(c.getTime(), a.getTime()); + + test.done(); +}; + + + +exports["clone object"] = function(test) { + test.expect(2); // how many tests? + + var a = { foo: { bar: "baz" } }; + var b = clone(a); + + test.ok(_(a).isEqual(b), "underscore equal"); + test.deepEqual(b, a); + + test.done(); +}; + + + +exports["clone array"] = function(test) { + test.expect(2); // how many tests? + + var a = [ + { foo: "bar" }, + "baz" + ]; + var b = clone(a); + + test.ok(_(a).isEqual(b), "underscore equal"); + test.deepEqual(b, a); + + test.done(); +}; + +exports["clone buffer"] = function(test) { + test.expect(1); + + var a = new Buffer("this is a test buffer"); + var b = clone(a); + + // no underscore equal since it has no concept of Buffers + test.deepEqual(b, a); + test.done(); +}; + + + +exports["clone regexp"] = function(test) { + test.expect(5); + + var a = /abc123/gi; + var b = clone(a); + + test.deepEqual(b, a); + + var c = /a/g; + test.ok(c.lastIndex === 0); + + c.exec('123a456a'); + test.ok(c.lastIndex === 4); + + var d = clone(c); + test.ok(d.global); + test.ok(d.lastIndex === 4); + + test.done(); +}; + + +exports["clone object containing array"] = function(test) { + test.expect(2); // how many tests? + + var a = { + arr1: [ { a: '1234', b: '2345' } ], + arr2: [ { c: '345', d: '456' } ] + }; + var b = clone(a); + + test.ok(_(a).isEqual(b), "underscore equal"); + test.deepEqual(b, a); + + test.done(); +}; + + + +exports["clone object with circular reference"] = function(test) { + test.expect(8); // how many tests? + + var _ = test.ok; + var c = [1, "foo", {'hello': 'bar'}, function() {}, false, [2]]; + var b = [c, 2, 3, 4]; + var a = {'b': b, 'c': c}; + a.loop = a; + a.loop2 = a; + c.loop = c; + c.aloop = a; + var aCopy = clone(a); + _(a != aCopy); + _(a.c != aCopy.c); + _(aCopy.c == aCopy.b[0]); + _(aCopy.c.loop.loop.aloop == aCopy); + _(aCopy.c[0] == a.c[0]); + + //console.log(util.inspect(aCopy, true, null) ); + //console.log("------------------------------------------------------------"); + //console.log(util.inspect(a, true, null) ); + _(eq(a, aCopy)); + aCopy.c[0] = 2; + _(!eq(a, aCopy)); + aCopy.c = "2"; + _(!eq(a, aCopy)); + //console.log("------------------------------------------------------------"); + //console.log(util.inspect(aCopy, true, null) ); + + function eq(x, y) { + return util.inspect(x, true, null) === util.inspect(y, true, null); + } + + test.done(); +}; + + + +exports['clonePrototype'] = function(test) { + test.expect(3); // how many tests? + + var a = { + a: "aaa", + x: 123, + y: 45.65 + }; + var b = clone.clonePrototype(a); + + test.strictEqual(b.a, a.a); + test.strictEqual(b.x, a.x); + test.strictEqual(b.y, a.y); + + test.done(); +} + +exports['cloneWithinNewVMContext'] = function(test) { + test.expect(3); + var vm = require('vm'); + var ctx = vm.createContext({ clone: clone }); + var script = "clone( {array: [1, 2, 3], date: new Date(), regex: /^foo$/ig} );"; + var results = vm.runInContext(script, ctx); + test.ok(results.array instanceof Array); + test.ok(results.date instanceof Date); + test.ok(results.regex instanceof RegExp); + test.done(); +} + +exports['cloneObjectWithNoConstructor'] = function(test) { + test.expect(3); + var n = null; + var a = { foo: 'bar' }; + a.__proto__ = n; + test.ok(typeof a === 'object'); + test.ok(typeof a !== null); + var b = clone(a); + test.ok(a.foo, b.foo); + test.done(); +} + +exports['clone object with depth argument'] = function (test) { + test.expect(6); + var a = { + foo: { + bar : { + baz : 'qux' + } + } + }; + var b = clone(a, false, 1); + test.deepEqual(b, a); + test.notEqual(b, a); + test.strictEqual(b.foo, a.foo); + + b = clone(a, true, 2); + test.deepEqual(b, a); + test.notEqual(b.foo, a.foo); + test.strictEqual(b.foo.bar, a.foo.bar); + test.done(); +} + +exports['maintain prototype chain in clones'] = function (test) { + test.expect(1); + function Constructor() {} + var a = new Constructor(); + var b = clone(a); + test.strictEqual(Object.getPrototypeOf(a), Object.getPrototypeOf(b)); + test.done(); +} + +exports['parent prototype is overriden with prototype provided'] = function (test) { + test.expect(1); + function Constructor() {} + var a = new Constructor(); + var b = clone(a, true, Infinity, null); + test.strictEqual(b.__defineSetter__, undefined); + test.done(); +} + +exports['clone object with null children'] = function(test) { + test.expect(1); + var a = { + foo: { + bar: null, + baz: { + qux: false + } + } + }; + var b = clone(a); + test.deepEqual(b, a); + test.done(); +} + +exports['clone instance with getter'] = function(test) { + test.expect(1); + function Ctor() {}; + Object.defineProperty(Ctor.prototype, 'prop', { + configurable: true, + enumerable: true, + get: function() { + return 'value'; + } + }); + + var a = new Ctor(); + var b = clone(a); + + test.strictEqual(b.prop, 'value'); + test.done(); +}; \ No newline at end of file diff --git a/node_modules/vinyl-fs/node_modules/graceful-fs/.npmignore b/node_modules/vinyl-fs/node_modules/graceful-fs/.npmignore new file mode 100644 index 0000000..2f24c57 --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/graceful-fs/.npmignore @@ -0,0 +1,3 @@ +node_modules/ +coverage/ +.nyc_output/ diff --git a/node_modules/vinyl-fs/node_modules/graceful-fs/.travis.yml b/node_modules/vinyl-fs/node_modules/graceful-fs/.travis.yml new file mode 100644 index 0000000..b535ef4 --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/graceful-fs/.travis.yml @@ -0,0 +1,7 @@ +sudo: false +language: node_js +node_js: + - '0.10' + - '0.12' + - '4' + - '6' diff --git a/node_modules/vinyl-fs/node_modules/graceful-fs/LICENSE b/node_modules/vinyl-fs/node_modules/graceful-fs/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/graceful-fs/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/vinyl-fs/node_modules/graceful-fs/README.md b/node_modules/vinyl-fs/node_modules/graceful-fs/README.md new file mode 100644 index 0000000..13a2e86 --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/graceful-fs/README.md @@ -0,0 +1,36 @@ +# graceful-fs + +graceful-fs functions as a drop-in replacement for the fs module, +making various improvements. + +The improvements are meant to normalize behavior across different +platforms and environments, and to make filesystem access more +resilient to errors. + +## Improvements over [fs module](http://api.nodejs.org/fs.html) + +graceful-fs: + +* Queues up `open` and `readdir` calls, and retries them once + something closes if there is an EMFILE error from too many file + descriptors. +* fixes `lchmod` for Node versions prior to 0.6.2. +* implements `fs.lutimes` if possible. Otherwise it becomes a noop. +* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or + `lchown` if the user isn't root. +* makes `lchmod` and `lchown` become noops, if not available. +* retries reading a file if `read` results in EAGAIN error. + +On Windows, it retries renaming a file for up to one second if `EACCESS` +or `EPERM` error occurs, likely because antivirus software has locked +the directory. + +## USAGE + +```javascript +// use just like fs +var fs = require('graceful-fs') + +// now go and do stuff with it... +fs.readFileSync('some-file-or-whatever') +``` diff --git a/node_modules/vinyl-fs/node_modules/graceful-fs/fs.js b/node_modules/vinyl-fs/node_modules/graceful-fs/fs.js new file mode 100644 index 0000000..7a37bb1 --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/graceful-fs/fs.js @@ -0,0 +1 @@ +module.exports = require('natives').require('fs', ['stream']) diff --git a/node_modules/vinyl-fs/node_modules/graceful-fs/graceful-fs.js b/node_modules/vinyl-fs/node_modules/graceful-fs/graceful-fs.js new file mode 100644 index 0000000..fb206b8 --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/graceful-fs/graceful-fs.js @@ -0,0 +1,158 @@ +// Monkey-patching the fs module. +// It's ugly, but there is simply no other way to do this. +var fs = module.exports = require('./fs.js') + +var assert = require('assert') + +// fix up some busted stuff, mostly on windows and old nodes +require('./polyfills.js') + +var util = require('util') + +function noop () {} + +var debug = noop +if (util.debuglog) + debug = util.debuglog('gfs') +else if (/\bgfs\b/i.test(process.env.NODE_DEBUG || '')) + debug = function() { + var m = util.format.apply(util, arguments) + m = 'GFS: ' + m.split(/\n/).join('\nGFS: ') + console.error(m) + } + +if (/\bgfs\b/i.test(process.env.NODE_DEBUG || '')) { + process.on('exit', function() { + debug('fds', fds) + debug(queue) + assert.equal(queue.length, 0) + }) +} + + +var originalOpen = fs.open +fs.open = open + +function open(path, flags, mode, cb) { + if (typeof mode === "function") cb = mode, mode = null + if (typeof cb !== "function") cb = noop + new OpenReq(path, flags, mode, cb) +} + +function OpenReq(path, flags, mode, cb) { + this.path = path + this.flags = flags + this.mode = mode + this.cb = cb + Req.call(this) +} + +util.inherits(OpenReq, Req) + +OpenReq.prototype.process = function() { + originalOpen.call(fs, this.path, this.flags, this.mode, this.done) +} + +var fds = {} +OpenReq.prototype.done = function(er, fd) { + debug('open done', er, fd) + if (fd) + fds['fd' + fd] = this.path + Req.prototype.done.call(this, er, fd) +} + + +var originalReaddir = fs.readdir +fs.readdir = readdir + +function readdir(path, cb) { + if (typeof cb !== "function") cb = noop + new ReaddirReq(path, cb) +} + +function ReaddirReq(path, cb) { + this.path = path + this.cb = cb + Req.call(this) +} + +util.inherits(ReaddirReq, Req) + +ReaddirReq.prototype.process = function() { + originalReaddir.call(fs, this.path, this.done) +} + +ReaddirReq.prototype.done = function(er, files) { + if (files && files.sort) + files = files.sort() + Req.prototype.done.call(this, er, files) + onclose() +} + + +var originalClose = fs.close +fs.close = close + +function close (fd, cb) { + debug('close', fd) + if (typeof cb !== "function") cb = noop + delete fds['fd' + fd] + originalClose.call(fs, fd, function(er) { + onclose() + cb(er) + }) +} + + +var originalCloseSync = fs.closeSync +fs.closeSync = closeSync + +function closeSync (fd) { + try { + return originalCloseSync(fd) + } finally { + onclose() + } +} + + +// Req class +function Req () { + // start processing + this.done = this.done.bind(this) + this.failures = 0 + this.process() +} + +Req.prototype.done = function (er, result) { + var tryAgain = false + if (er) { + var code = er.code + var tryAgain = code === "EMFILE" || code === "ENFILE" + if (process.platform === "win32") + tryAgain = tryAgain || code === "OK" + } + + if (tryAgain) { + this.failures ++ + enqueue(this) + } else { + var cb = this.cb + cb(er, result) + } +} + +var queue = [] + +function enqueue(req) { + queue.push(req) + debug('enqueue %d %s', queue.length, req.constructor.name, req) +} + +function onclose() { + var req = queue.shift() + if (req) { + debug('process', req.constructor.name, req) + req.process() + } +} diff --git a/node_modules/vinyl-fs/node_modules/graceful-fs/package.json b/node_modules/vinyl-fs/node_modules/graceful-fs/package.json new file mode 100644 index 0000000..2636108 --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/graceful-fs/package.json @@ -0,0 +1,112 @@ +{ + "_args": [ + [ + { + "raw": "graceful-fs@^3.0.0", + "scope": null, + "escapedName": "graceful-fs", + "name": "graceful-fs", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/vinyl-fs" + ] + ], + "_from": "graceful-fs@>=3.0.0 <4.0.0", + "_id": "graceful-fs@3.0.11", + "_inCache": true, + "_location": "/vinyl-fs/graceful-fs", + "_nodeVersion": "6.5.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/graceful-fs-3.0.11.tgz_1472583712827_0.6562602713238448" + }, + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "_npmVersion": "3.10.7", + "_phantomChildren": {}, + "_requested": { + "raw": "graceful-fs@^3.0.0", + "scope": null, + "escapedName": "graceful-fs", + "name": "graceful-fs", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/vinyl-fs" + ], + "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.11.tgz", + "_shasum": "7613c778a1afea62f25c630a086d7f3acbbdd818", + "_shrinkwrap": null, + "_spec": "graceful-fs@^3.0.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/vinyl-fs", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me" + }, + "bugs": { + "url": "https://github.com/isaacs/node-graceful-fs/issues" + }, + "dependencies": { + "natives": "^1.1.0" + }, + "description": "A drop-in replacement for fs, making various improvements.", + "devDependencies": { + "mkdirp": "^0.5.0", + "rimraf": "^2.2.8", + "tap": "^1.2.0" + }, + "directories": { + "test": "test" + }, + "dist": { + "shasum": "7613c778a1afea62f25c630a086d7f3acbbdd818", + "tarball": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.11.tgz" + }, + "engines": { + "node": ">=0.4.0" + }, + "gitHead": "03d3cc6dbd4a499b1e13834eedbc469094a27582", + "homepage": "https://github.com/isaacs/node-graceful-fs#readme", + "keywords": [ + "fs", + "module", + "reading", + "retry", + "retries", + "queue", + "error", + "errors", + "handling", + "EMFILE", + "EAGAIN", + "EINVAL", + "EPERM", + "EACCESS" + ], + "license": "ISC", + "main": "graceful-fs.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "graceful-fs", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-graceful-fs.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "3.0.11" +} diff --git a/node_modules/vinyl-fs/node_modules/graceful-fs/polyfills.js b/node_modules/vinyl-fs/node_modules/graceful-fs/polyfills.js new file mode 100644 index 0000000..4270539 --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/graceful-fs/polyfills.js @@ -0,0 +1,255 @@ +var fs = require('./fs.js') +var constants = require('constants') + +var origCwd = process.cwd +var cwd = null +process.cwd = function() { + if (!cwd) + cwd = origCwd.call(process) + return cwd +} +var chdir = process.chdir +process.chdir = function(d) { + cwd = null + chdir.call(process, d) +} + +// (re-)implement some things that are known busted or missing. + +// lchmod, broken prior to 0.6.2 +// back-port the fix here. +if (constants.hasOwnProperty('O_SYMLINK') && + process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { + fs.lchmod = function (path, mode, callback) { + callback = callback || noop + fs.open( path + , constants.O_WRONLY | constants.O_SYMLINK + , mode + , function (err, fd) { + if (err) { + callback(err) + return + } + // prefer to return the chmod error, if one occurs, + // but still try to close, and report closing errors if they occur. + fs.fchmod(fd, mode, function (err) { + fs.close(fd, function(err2) { + callback(err || err2) + }) + }) + }) + } + + fs.lchmodSync = function (path, mode) { + var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode) + + // prefer to return the chmod error, if one occurs, + // but still try to close, and report closing errors if they occur. + var err, err2 + try { + var ret = fs.fchmodSync(fd, mode) + } catch (er) { + err = er + } + try { + fs.closeSync(fd) + } catch (er) { + err2 = er + } + if (err || err2) throw (err || err2) + return ret + } +} + + +// lutimes implementation, or no-op +if (!fs.lutimes) { + if (constants.hasOwnProperty("O_SYMLINK")) { + fs.lutimes = function (path, at, mt, cb) { + fs.open(path, constants.O_SYMLINK, function (er, fd) { + cb = cb || noop + if (er) return cb(er) + fs.futimes(fd, at, mt, function (er) { + fs.close(fd, function (er2) { + return cb(er || er2) + }) + }) + }) + } + + fs.lutimesSync = function (path, at, mt) { + var fd = fs.openSync(path, constants.O_SYMLINK) + , err + , err2 + , ret + + try { + var ret = fs.futimesSync(fd, at, mt) + } catch (er) { + err = er + } + try { + fs.closeSync(fd) + } catch (er) { + err2 = er + } + if (err || err2) throw (err || err2) + return ret + } + + } else if (fs.utimensat && constants.hasOwnProperty("AT_SYMLINK_NOFOLLOW")) { + // maybe utimensat will be bound soonish? + fs.lutimes = function (path, at, mt, cb) { + fs.utimensat(path, at, mt, constants.AT_SYMLINK_NOFOLLOW, cb) + } + + fs.lutimesSync = function (path, at, mt) { + return fs.utimensatSync(path, at, mt, constants.AT_SYMLINK_NOFOLLOW) + } + + } else { + fs.lutimes = function (_a, _b, _c, cb) { process.nextTick(cb) } + fs.lutimesSync = function () {} + } +} + + +// https://github.com/isaacs/node-graceful-fs/issues/4 +// Chown should not fail on einval or eperm if non-root. +// It should not fail on enosys ever, as this just indicates +// that a fs doesn't support the intended operation. + +fs.chown = chownFix(fs.chown) +fs.fchown = chownFix(fs.fchown) +fs.lchown = chownFix(fs.lchown) + +fs.chmod = chownFix(fs.chmod) +fs.fchmod = chownFix(fs.fchmod) +fs.lchmod = chownFix(fs.lchmod) + +fs.chownSync = chownFixSync(fs.chownSync) +fs.fchownSync = chownFixSync(fs.fchownSync) +fs.lchownSync = chownFixSync(fs.lchownSync) + +fs.chmodSync = chownFix(fs.chmodSync) +fs.fchmodSync = chownFix(fs.fchmodSync) +fs.lchmodSync = chownFix(fs.lchmodSync) + +function chownFix (orig) { + if (!orig) return orig + return function (target, uid, gid, cb) { + return orig.call(fs, target, uid, gid, function (er, res) { + if (chownErOk(er)) er = null + cb(er, res) + }) + } +} + +function chownFixSync (orig) { + if (!orig) return orig + return function (target, uid, gid) { + try { + return orig.call(fs, target, uid, gid) + } catch (er) { + if (!chownErOk(er)) throw er + } + } +} + +// ENOSYS means that the fs doesn't support the op. Just ignore +// that, because it doesn't matter. +// +// if there's no getuid, or if getuid() is something other +// than 0, and the error is EINVAL or EPERM, then just ignore +// it. +// +// This specific case is a silent failure in cp, install, tar, +// and most other unix tools that manage permissions. +// +// When running as root, or if other types of errors are +// encountered, then it's strict. +function chownErOk (er) { + if (!er) + return true + + if (er.code === "ENOSYS") + return true + + var nonroot = !process.getuid || process.getuid() !== 0 + if (nonroot) { + if (er.code === "EINVAL" || er.code === "EPERM") + return true + } + + return false +} + + +// if lchmod/lchown do not exist, then make them no-ops +if (!fs.lchmod) { + fs.lchmod = function (path, mode, cb) { + process.nextTick(cb) + } + fs.lchmodSync = function () {} +} +if (!fs.lchown) { + fs.lchown = function (path, uid, gid, cb) { + process.nextTick(cb) + } + fs.lchownSync = function () {} +} + + + +// on Windows, A/V software can lock the directory, causing this +// to fail with an EACCES or EPERM if the directory contains newly +// created files. Try again on failure, for up to 1 second. +if (process.platform === "win32") { + var rename_ = fs.rename + fs.rename = function rename (from, to, cb) { + var start = Date.now() + rename_(from, to, function CB (er) { + if (er + && (er.code === "EACCES" || er.code === "EPERM") + && Date.now() - start < 1000) { + return rename_(from, to, CB) + } + if(cb) cb(er) + }) + } +} + + +// if read() returns EAGAIN, then just try it again. +var read = fs.read +fs.read = function (fd, buffer, offset, length, position, callback_) { + var callback + if (callback_ && typeof callback_ === 'function') { + var eagCounter = 0 + callback = function (er, _, __) { + if (er && er.code === 'EAGAIN' && eagCounter < 10) { + eagCounter ++ + return read.call(fs, fd, buffer, offset, length, position, callback) + } + callback_.apply(this, arguments) + } + } + return read.call(fs, fd, buffer, offset, length, position, callback) +} + +var readSync = fs.readSync +fs.readSync = function (fd, buffer, offset, length, position) { + var eagCounter = 0 + while (true) { + try { + return readSync.call(fs, fd, buffer, offset, length, position) + } catch (er) { + if (er.code === 'EAGAIN' && eagCounter < 10) { + eagCounter ++ + continue + } + throw er + } + } +} + diff --git a/node_modules/vinyl-fs/node_modules/graceful-fs/test/max-open.js b/node_modules/vinyl-fs/node_modules/graceful-fs/test/max-open.js new file mode 100644 index 0000000..a6b9ba4 --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/graceful-fs/test/max-open.js @@ -0,0 +1,69 @@ +var test = require('tap').test +var fs = require('../') + +test('open lots of stuff', function (t) { + // Get around EBADF from libuv by making sure that stderr is opened + // Otherwise Darwin will refuse to give us a FD for stderr! + process.stderr.write('') + + // How many parallel open()'s to do + var n = 1024 + var opens = 0 + var fds = [] + var going = true + var closing = false + var doneCalled = 0 + + for (var i = 0; i < n; i++) { + go() + } + + function go() { + opens++ + fs.open(__filename, 'r', function (er, fd) { + if (er) throw er + fds.push(fd) + if (going) go() + }) + } + + // should hit ulimit pretty fast + setTimeout(function () { + going = false + t.equal(opens - fds.length, n) + done() + }, 100) + + + function done () { + if (closing) return + doneCalled++ + + if (fds.length === 0) { + console.error('done called %d times', doneCalled) + // First because of the timeout + // Then to close the fd's opened afterwards + // Then this time, to complete. + // Might take multiple passes, depending on CPU speed + // and ulimit, but at least 3 in every case. + t.ok(doneCalled >= 2) + return t.end() + } + + closing = true + setTimeout(function () { + // console.error('do closing again') + closing = false + done() + }, 100) + + // console.error('closing time') + var closes = fds.slice(0) + fds.length = 0 + closes.forEach(function (fd) { + fs.close(fd, function (er) { + if (er) throw er + }) + }) + } +}) diff --git a/node_modules/vinyl-fs/node_modules/graceful-fs/test/open.js b/node_modules/vinyl-fs/node_modules/graceful-fs/test/open.js new file mode 100644 index 0000000..85732f2 --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/graceful-fs/test/open.js @@ -0,0 +1,39 @@ +var test = require('tap').test +var fs = require('../graceful-fs.js') + +test('graceful fs is monkeypatched fs', function (t) { + t.equal(fs, require('../fs.js')) + t.end() +}) + +test('open an existing file works', function (t) { + var fd = fs.openSync(__filename, 'r') + fs.closeSync(fd) + fs.open(__filename, 'r', function (er, fd) { + if (er) throw er + fs.close(fd, function (er) { + if (er) throw er + t.pass('works') + t.end() + }) + }) +}) + +test('open a non-existing file throws', function (t) { + var er + try { + var fd = fs.openSync('this file does not exist', 'r') + } catch (x) { + er = x + } + t.ok(er, 'should throw') + t.notOk(fd, 'should not get an fd') + t.equal(er.code, 'ENOENT') + + fs.open('neither does this file', 'r', function (er, fd) { + t.ok(er, 'should throw') + t.notOk(fd, 'should not get an fd') + t.equal(er.code, 'ENOENT') + t.end() + }) +}) diff --git a/node_modules/vinyl-fs/node_modules/graceful-fs/test/readdir-sort.js b/node_modules/vinyl-fs/node_modules/graceful-fs/test/readdir-sort.js new file mode 100644 index 0000000..cb63a68 --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/graceful-fs/test/readdir-sort.js @@ -0,0 +1,20 @@ +var test = require("tap").test +var fs = require("../fs.js") + +var readdir = fs.readdir +fs.readdir = function(path, cb) { + process.nextTick(function() { + cb(null, ["b", "z", "a"]) + }) +} + +var g = require("../") + +test("readdir reorder", function (t) { + g.readdir("whatevers", function (er, files) { + if (er) + throw er + t.same(files, [ "a", "b", "z" ]) + t.end() + }) +}) diff --git a/node_modules/vinyl-fs/node_modules/graceful-fs/test/write-then-read.js b/node_modules/vinyl-fs/node_modules/graceful-fs/test/write-then-read.js new file mode 100644 index 0000000..21e4c26 --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/graceful-fs/test/write-then-read.js @@ -0,0 +1,47 @@ +var fs = require('../'); +var rimraf = require('rimraf'); +var mkdirp = require('mkdirp'); +var test = require('tap').test; +var p = require('path').resolve(__dirname, 'files'); + +process.chdir(__dirname) + +// Make sure to reserve the stderr fd +process.stderr.write(''); + +var num = 4097; +var paths = new Array(num); + +test('make files', function (t) { + rimraf.sync(p); + mkdirp.sync(p); + + for (var i = 0; i < num; ++i) { + paths[i] = 'files/file-' + i; + fs.writeFileSync(paths[i], 'content'); + } + + t.end(); +}) + +test('read files', function (t) { + // now read them + var done = 0; + for (var i = 0; i < num; ++i) { + fs.readFile(paths[i], function(err, data) { + if (err) + throw err; + + ++done; + if (done === num) { + t.pass('success'); + t.end() + } + }); + } +}); + +test('cleanup', function (t) { + rimraf.sync(p); + t.end(); +}); diff --git a/node_modules/vinyl-fs/node_modules/isarray/README.md b/node_modules/vinyl-fs/node_modules/isarray/README.md new file mode 100644 index 0000000..052a62b --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/isarray/README.md @@ -0,0 +1,54 @@ + +# isarray + +`Array#isArray` for older browsers. + +## Usage + +```js +var isArray = require('isarray'); + +console.log(isArray([])); // => true +console.log(isArray({})); // => false +``` + +## Installation + +With [npm](http://npmjs.org) do + +```bash +$ npm install isarray +``` + +Then bundle for the browser with +[browserify](https://github.com/substack/browserify). + +With [component](http://component.io) do + +```bash +$ component install juliangruber/isarray +``` + +## License + +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> + +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. diff --git a/node_modules/vinyl-fs/node_modules/isarray/build/build.js b/node_modules/vinyl-fs/node_modules/isarray/build/build.js new file mode 100644 index 0000000..ec58596 --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/isarray/build/build.js @@ -0,0 +1,209 @@ + +/** + * Require the given path. + * + * @param {String} path + * @return {Object} exports + * @api public + */ + +function require(path, parent, orig) { + var resolved = require.resolve(path); + + // lookup failed + if (null == resolved) { + orig = orig || path; + parent = parent || 'root'; + var err = new Error('Failed to require "' + orig + '" from "' + parent + '"'); + err.path = orig; + err.parent = parent; + err.require = true; + throw err; + } + + var module = require.modules[resolved]; + + // perform real require() + // by invoking the module's + // registered function + if (!module.exports) { + module.exports = {}; + module.client = module.component = true; + module.call(this, module.exports, require.relative(resolved), module); + } + + return module.exports; +} + +/** + * Registered modules. + */ + +require.modules = {}; + +/** + * Registered aliases. + */ + +require.aliases = {}; + +/** + * Resolve `path`. + * + * Lookup: + * + * - PATH/index.js + * - PATH.js + * - PATH + * + * @param {String} path + * @return {String} path or null + * @api private + */ + +require.resolve = function(path) { + if (path.charAt(0) === '/') path = path.slice(1); + var index = path + '/index.js'; + + var paths = [ + path, + path + '.js', + path + '.json', + path + '/index.js', + path + '/index.json' + ]; + + for (var i = 0; i < paths.length; i++) { + var path = paths[i]; + if (require.modules.hasOwnProperty(path)) return path; + } + + if (require.aliases.hasOwnProperty(index)) { + return require.aliases[index]; + } +}; + +/** + * Normalize `path` relative to the current path. + * + * @param {String} curr + * @param {String} path + * @return {String} + * @api private + */ + +require.normalize = function(curr, path) { + var segs = []; + + if ('.' != path.charAt(0)) return path; + + curr = curr.split('/'); + path = path.split('/'); + + for (var i = 0; i < path.length; ++i) { + if ('..' == path[i]) { + curr.pop(); + } else if ('.' != path[i] && '' != path[i]) { + segs.push(path[i]); + } + } + + return curr.concat(segs).join('/'); +}; + +/** + * Register module at `path` with callback `definition`. + * + * @param {String} path + * @param {Function} definition + * @api private + */ + +require.register = function(path, definition) { + require.modules[path] = definition; +}; + +/** + * Alias a module definition. + * + * @param {String} from + * @param {String} to + * @api private + */ + +require.alias = function(from, to) { + if (!require.modules.hasOwnProperty(from)) { + throw new Error('Failed to alias "' + from + '", it does not exist'); + } + require.aliases[to] = from; +}; + +/** + * Return a require function relative to the `parent` path. + * + * @param {String} parent + * @return {Function} + * @api private + */ + +require.relative = function(parent) { + var p = require.normalize(parent, '..'); + + /** + * lastIndexOf helper. + */ + + function lastIndexOf(arr, obj) { + var i = arr.length; + while (i--) { + if (arr[i] === obj) return i; + } + return -1; + } + + /** + * The relative require() itself. + */ + + function localRequire(path) { + var resolved = localRequire.resolve(path); + return require(resolved, parent, path); + } + + /** + * Resolve relative to the parent. + */ + + localRequire.resolve = function(path) { + var c = path.charAt(0); + if ('/' == c) return path.slice(1); + if ('.' == c) return require.normalize(p, path); + + // resolve deps by returning + // the dep in the nearest "deps" + // directory + var segs = parent.split('/'); + var i = lastIndexOf(segs, 'deps') + 1; + if (!i) i = 0; + path = segs.slice(0, i + 1).join('/') + '/deps/' + path; + return path; + }; + + /** + * Check if module is defined at `path`. + */ + + localRequire.exists = function(path) { + return require.modules.hasOwnProperty(localRequire.resolve(path)); + }; + + return localRequire; +}; +require.register("isarray/index.js", function(exports, require, module){ +module.exports = Array.isArray || function (arr) { + return Object.prototype.toString.call(arr) == '[object Array]'; +}; + +}); +require.alias("isarray/index.js", "isarray/index.js"); + diff --git a/node_modules/vinyl-fs/node_modules/isarray/component.json b/node_modules/vinyl-fs/node_modules/isarray/component.json new file mode 100644 index 0000000..9e31b68 --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/isarray/component.json @@ -0,0 +1,19 @@ +{ + "name" : "isarray", + "description" : "Array#isArray for older browsers", + "version" : "0.0.1", + "repository" : "juliangruber/isarray", + "homepage": "https://github.com/juliangruber/isarray", + "main" : "index.js", + "scripts" : [ + "index.js" + ], + "dependencies" : {}, + "keywords": ["browser","isarray","array"], + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "license": "MIT" +} diff --git a/node_modules/vinyl-fs/node_modules/isarray/index.js b/node_modules/vinyl-fs/node_modules/isarray/index.js new file mode 100644 index 0000000..5f5ad45 --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/isarray/index.js @@ -0,0 +1,3 @@ +module.exports = Array.isArray || function (arr) { + return Object.prototype.toString.call(arr) == '[object Array]'; +}; diff --git a/node_modules/vinyl-fs/node_modules/isarray/package.json b/node_modules/vinyl-fs/node_modules/isarray/package.json new file mode 100644 index 0000000..9164311 --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/isarray/package.json @@ -0,0 +1,86 @@ +{ + "_args": [ + [ + { + "raw": "isarray@0.0.1", + "scope": null, + "escapedName": "isarray", + "name": "isarray", + "rawSpec": "0.0.1", + "spec": "0.0.1", + "type": "version" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/vinyl-fs/node_modules/readable-stream" + ] + ], + "_from": "isarray@0.0.1", + "_id": "isarray@0.0.1", + "_inCache": true, + "_location": "/vinyl-fs/isarray", + "_npmUser": { + "name": "juliangruber", + "email": "julian@juliangruber.com" + }, + "_npmVersion": "1.2.18", + "_phantomChildren": {}, + "_requested": { + "raw": "isarray@0.0.1", + "scope": null, + "escapedName": "isarray", + "name": "isarray", + "rawSpec": "0.0.1", + "spec": "0.0.1", + "type": "version" + }, + "_requiredBy": [ + "/vinyl-fs/readable-stream" + ], + "_resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "_shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf", + "_shrinkwrap": null, + "_spec": "isarray@0.0.1", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/vinyl-fs/node_modules/readable-stream", + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "bugs": { + "url": "https://github.com/juliangruber/isarray/issues" + }, + "dependencies": {}, + "description": "Array#isArray for older browsers", + "devDependencies": { + "tap": "*" + }, + "directories": {}, + "dist": { + "shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf", + "tarball": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + }, + "homepage": "https://github.com/juliangruber/isarray", + "keywords": [ + "browser", + "isarray", + "array" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "juliangruber", + "email": "julian@juliangruber.com" + } + ], + "name": "isarray", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/isarray.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "0.0.1" +} diff --git a/node_modules/vinyl-fs/node_modules/readable-stream/.npmignore b/node_modules/vinyl-fs/node_modules/readable-stream/.npmignore new file mode 100644 index 0000000..38344f8 --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/readable-stream/.npmignore @@ -0,0 +1,5 @@ +build/ +test/ +examples/ +fs.js +zlib.js \ No newline at end of file diff --git a/node_modules/vinyl-fs/node_modules/readable-stream/LICENSE b/node_modules/vinyl-fs/node_modules/readable-stream/LICENSE new file mode 100644 index 0000000..e3d4e69 --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/readable-stream/LICENSE @@ -0,0 +1,18 @@ +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +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. diff --git a/node_modules/vinyl-fs/node_modules/readable-stream/README.md b/node_modules/vinyl-fs/node_modules/readable-stream/README.md new file mode 100644 index 0000000..3fb3e80 --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/readable-stream/README.md @@ -0,0 +1,15 @@ +# readable-stream + +***Node-core streams for userland*** + +[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) +[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) + +This package is a mirror of the Streams2 and Streams3 implementations in Node-core. + +If you want to guarantee a stable streams base, regardless of what version of Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core. + +**readable-stream** comes in two major versions, v1.0.x and v1.1.x. The former tracks the Streams2 implementation in Node 0.10, including bug-fixes and minor improvements as they are added. The latter tracks Streams3 as it develops in Node 0.11; we will likely see a v1.2.x branch for Node 0.12. + +**readable-stream** uses proper patch-level versioning so if you pin to `"~1.0.0"` you’ll get the latest Node 0.10 Streams2 implementation, including any fixes and minor non-breaking improvements. The patch-level versions of 1.0.x and 1.1.x should mirror the patch-level versions of Node-core releases. You should prefer the **1.0.x** releases for now and when you’re ready to start using Streams3, pin to `"~1.1.0"` + diff --git a/node_modules/vinyl-fs/node_modules/readable-stream/duplex.js b/node_modules/vinyl-fs/node_modules/readable-stream/duplex.js new file mode 100644 index 0000000..ca807af --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/readable-stream/duplex.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_duplex.js") diff --git a/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_duplex.js new file mode 100644 index 0000000..b513d61 --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_duplex.js @@ -0,0 +1,89 @@ +// Copyright Joyent, Inc. and other Node 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. + +// a duplex stream is just a stream that is both readable and writable. +// Since JS doesn't have multiple prototypal inheritance, this class +// prototypally inherits from Readable, and then parasitically from +// Writable. + +module.exports = Duplex; + +/**/ +var objectKeys = Object.keys || function (obj) { + var keys = []; + for (var key in obj) keys.push(key); + return keys; +} +/**/ + + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +var Readable = require('./_stream_readable'); +var Writable = require('./_stream_writable'); + +util.inherits(Duplex, Readable); + +forEach(objectKeys(Writable.prototype), function(method) { + if (!Duplex.prototype[method]) + Duplex.prototype[method] = Writable.prototype[method]; +}); + +function Duplex(options) { + if (!(this instanceof Duplex)) + return new Duplex(options); + + Readable.call(this, options); + Writable.call(this, options); + + if (options && options.readable === false) + this.readable = false; + + if (options && options.writable === false) + this.writable = false; + + this.allowHalfOpen = true; + if (options && options.allowHalfOpen === false) + this.allowHalfOpen = false; + + this.once('end', onend); +} + +// the no-half-open enforcer +function onend() { + // if we allow half-open state, or if the writable side ended, + // then we're ok. + if (this.allowHalfOpen || this._writableState.ended) + return; + + // no more data can be written. + // But allow more writes to happen in this tick. + process.nextTick(this.end.bind(this)); +} + +function forEach (xs, f) { + for (var i = 0, l = xs.length; i < l; i++) { + f(xs[i], i); + } +} diff --git a/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_passthrough.js new file mode 100644 index 0000000..895ca50 --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_passthrough.js @@ -0,0 +1,46 @@ +// Copyright Joyent, Inc. and other Node 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. + +// a passthrough stream. +// basically just the most minimal sort of Transform stream. +// Every written chunk gets output as-is. + +module.exports = PassThrough; + +var Transform = require('./_stream_transform'); + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +util.inherits(PassThrough, Transform); + +function PassThrough(options) { + if (!(this instanceof PassThrough)) + return new PassThrough(options); + + Transform.call(this, options); +} + +PassThrough.prototype._transform = function(chunk, encoding, cb) { + cb(null, chunk); +}; diff --git a/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_readable.js new file mode 100644 index 0000000..6307220 --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_readable.js @@ -0,0 +1,982 @@ +// Copyright Joyent, Inc. and other Node 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. + +module.exports = Readable; + +/**/ +var isArray = require('isarray'); +/**/ + + +/**/ +var Buffer = require('buffer').Buffer; +/**/ + +Readable.ReadableState = ReadableState; + +var EE = require('events').EventEmitter; + +/**/ +if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { + return emitter.listeners(type).length; +}; +/**/ + +var Stream = require('stream'); + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +var StringDecoder; + +util.inherits(Readable, Stream); + +function ReadableState(options, stream) { + options = options || {}; + + // the point at which it stops calling _read() to fill the buffer + // Note: 0 is a valid value, means "don't call _read preemptively ever" + var hwm = options.highWaterMark; + this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; + + // cast to ints. + this.highWaterMark = ~~this.highWaterMark; + + this.buffer = []; + this.length = 0; + this.pipes = null; + this.pipesCount = 0; + this.flowing = false; + this.ended = false; + this.endEmitted = false; + this.reading = false; + + // In streams that never have any data, and do push(null) right away, + // the consumer can miss the 'end' event if they do some I/O before + // consuming the stream. So, we don't emit('end') until some reading + // happens. + this.calledRead = false; + + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, becuase any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; + + // whenever we return null, then we set a flag to say + // that we're awaiting a 'readable' event emission. + this.needReadable = false; + this.emittedReadable = false; + this.readableListening = false; + + + // object stream flag. Used to make read(n) ignore n and to + // make all the buffer merging and length checks go away + this.objectMode = !!options.objectMode; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // when piping, we only care about 'readable' events that happen + // after read()ing all the bytes and not getting any pushback. + this.ranOut = false; + + // the number of writers that are awaiting a drain event in .pipe()s + this.awaitDrain = 0; + + // if true, a maybeReadMore has been scheduled + this.readingMore = false; + + this.decoder = null; + this.encoding = null; + if (options.encoding) { + if (!StringDecoder) + StringDecoder = require('string_decoder/').StringDecoder; + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; + } +} + +function Readable(options) { + if (!(this instanceof Readable)) + return new Readable(options); + + this._readableState = new ReadableState(options, this); + + // legacy + this.readable = true; + + Stream.call(this); +} + +// Manually shove something into the read() buffer. +// This returns true if the highWaterMark has not been hit yet, +// similar to how Writable.write() returns true if you should +// write() some more. +Readable.prototype.push = function(chunk, encoding) { + var state = this._readableState; + + if (typeof chunk === 'string' && !state.objectMode) { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = new Buffer(chunk, encoding); + encoding = ''; + } + } + + return readableAddChunk(this, state, chunk, encoding, false); +}; + +// Unshift should *always* be something directly out of read() +Readable.prototype.unshift = function(chunk) { + var state = this._readableState; + return readableAddChunk(this, state, chunk, '', true); +}; + +function readableAddChunk(stream, state, chunk, encoding, addToFront) { + var er = chunkInvalid(state, chunk); + if (er) { + stream.emit('error', er); + } else if (chunk === null || chunk === undefined) { + state.reading = false; + if (!state.ended) + onEofChunk(stream, state); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (state.ended && !addToFront) { + var e = new Error('stream.push() after EOF'); + stream.emit('error', e); + } else if (state.endEmitted && addToFront) { + var e = new Error('stream.unshift() after end event'); + stream.emit('error', e); + } else { + if (state.decoder && !addToFront && !encoding) + chunk = state.decoder.write(chunk); + + // update the buffer info. + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) { + state.buffer.unshift(chunk); + } else { + state.reading = false; + state.buffer.push(chunk); + } + + if (state.needReadable) + emitReadable(stream); + + maybeReadMore(stream, state); + } + } else if (!addToFront) { + state.reading = false; + } + + return needMoreData(state); +} + + + +// if it's past the high water mark, we can push in some more. +// Also, if we have no data yet, we can stand some +// more bytes. This is to work around cases where hwm=0, +// such as the repl. Also, if the push() triggered a +// readable event, and the user called read(largeNumber) such that +// needReadable was set, then we ought to push more, so that another +// 'readable' event will be triggered. +function needMoreData(state) { + return !state.ended && + (state.needReadable || + state.length < state.highWaterMark || + state.length === 0); +} + +// backwards compatibility. +Readable.prototype.setEncoding = function(enc) { + if (!StringDecoder) + StringDecoder = require('string_decoder/').StringDecoder; + this._readableState.decoder = new StringDecoder(enc); + this._readableState.encoding = enc; +}; + +// Don't raise the hwm > 128MB +var MAX_HWM = 0x800000; +function roundUpToNextPowerOf2(n) { + if (n >= MAX_HWM) { + n = MAX_HWM; + } else { + // Get the next highest power of 2 + n--; + for (var p = 1; p < 32; p <<= 1) n |= n >> p; + n++; + } + return n; +} + +function howMuchToRead(n, state) { + if (state.length === 0 && state.ended) + return 0; + + if (state.objectMode) + return n === 0 ? 0 : 1; + + if (n === null || isNaN(n)) { + // only flow one buffer at a time + if (state.flowing && state.buffer.length) + return state.buffer[0].length; + else + return state.length; + } + + if (n <= 0) + return 0; + + // If we're asking for more than the target buffer level, + // then raise the water mark. Bump up to the next highest + // power of 2, to prevent increasing it excessively in tiny + // amounts. + if (n > state.highWaterMark) + state.highWaterMark = roundUpToNextPowerOf2(n); + + // don't have that much. return null, unless we've ended. + if (n > state.length) { + if (!state.ended) { + state.needReadable = true; + return 0; + } else + return state.length; + } + + return n; +} + +// you can override either this method, or the async _read(n) below. +Readable.prototype.read = function(n) { + var state = this._readableState; + state.calledRead = true; + var nOrig = n; + var ret; + + if (typeof n !== 'number' || n > 0) + state.emittedReadable = false; + + // if we're doing read(0) to trigger a readable event, but we + // already have a bunch of data in the buffer, then just trigger + // the 'readable' event and move on. + if (n === 0 && + state.needReadable && + (state.length >= state.highWaterMark || state.ended)) { + emitReadable(this); + return null; + } + + n = howMuchToRead(n, state); + + // if we've ended, and we're now clear, then finish it up. + if (n === 0 && state.ended) { + ret = null; + + // In cases where the decoder did not receive enough data + // to produce a full chunk, then immediately received an + // EOF, state.buffer will contain [, ]. + // howMuchToRead will see this and coerce the amount to + // read to zero (because it's looking at the length of the + // first in state.buffer), and we'll end up here. + // + // This can only happen via state.decoder -- no other venue + // exists for pushing a zero-length chunk into state.buffer + // and triggering this behavior. In this case, we return our + // remaining data and end the stream, if appropriate. + if (state.length > 0 && state.decoder) { + ret = fromList(n, state); + state.length -= ret.length; + } + + if (state.length === 0) + endReadable(this); + + return ret; + } + + // All the actual chunk generation logic needs to be + // *below* the call to _read. The reason is that in certain + // synthetic stream cases, such as passthrough streams, _read + // may be a completely synchronous operation which may change + // the state of the read buffer, providing enough data when + // before there was *not* enough. + // + // So, the steps are: + // 1. Figure out what the state of things will be after we do + // a read from the buffer. + // + // 2. If that resulting state will trigger a _read, then call _read. + // Note that this may be asynchronous, or synchronous. Yes, it is + // deeply ugly to write APIs this way, but that still doesn't mean + // that the Readable class should behave improperly, as streams are + // designed to be sync/async agnostic. + // Take note if the _read call is sync or async (ie, if the read call + // has returned yet), so that we know whether or not it's safe to emit + // 'readable' etc. + // + // 3. Actually pull the requested chunks out of the buffer and return. + + // if we need a readable event, then we need to do some reading. + var doRead = state.needReadable; + + // if we currently have less than the highWaterMark, then also read some + if (state.length - n <= state.highWaterMark) + doRead = true; + + // however, if we've ended, then there's no point, and if we're already + // reading, then it's unnecessary. + if (state.ended || state.reading) + doRead = false; + + if (doRead) { + state.reading = true; + state.sync = true; + // if the length is currently zero, then we *need* a readable event. + if (state.length === 0) + state.needReadable = true; + // call internal read method + this._read(state.highWaterMark); + state.sync = false; + } + + // If _read called its callback synchronously, then `reading` + // will be false, and we need to re-evaluate how much data we + // can return to the user. + if (doRead && !state.reading) + n = howMuchToRead(nOrig, state); + + if (n > 0) + ret = fromList(n, state); + else + ret = null; + + if (ret === null) { + state.needReadable = true; + n = 0; + } + + state.length -= n; + + // If we have nothing in the buffer, then we want to know + // as soon as we *do* get something into the buffer. + if (state.length === 0 && !state.ended) + state.needReadable = true; + + // If we happened to read() exactly the remaining amount in the + // buffer, and the EOF has been seen at this point, then make sure + // that we emit 'end' on the very next tick. + if (state.ended && !state.endEmitted && state.length === 0) + endReadable(this); + + return ret; +}; + +function chunkInvalid(state, chunk) { + var er = null; + if (!Buffer.isBuffer(chunk) && + 'string' !== typeof chunk && + chunk !== null && + chunk !== undefined && + !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + return er; +} + + +function onEofChunk(stream, state) { + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); + state.length += state.objectMode ? 1 : chunk.length; + } + } + state.ended = true; + + // if we've ended and we have some data left, then emit + // 'readable' now to make sure it gets picked up. + if (state.length > 0) + emitReadable(stream); + else + endReadable(stream); +} + +// Don't emit readable right away in sync mode, because this can trigger +// another read() call => stack overflow. This way, it might trigger +// a nextTick recursion warning, but that's not so bad. +function emitReadable(stream) { + var state = stream._readableState; + state.needReadable = false; + if (state.emittedReadable) + return; + + state.emittedReadable = true; + if (state.sync) + process.nextTick(function() { + emitReadable_(stream); + }); + else + emitReadable_(stream); +} + +function emitReadable_(stream) { + stream.emit('readable'); +} + + +// at this point, the user has presumably seen the 'readable' event, +// and called read() to consume some data. that may have triggered +// in turn another _read(n) call, in which case reading = true if +// it's in progress. +// However, if we're not ended, or reading, and the length < hwm, +// then go ahead and try to read some more preemptively. +function maybeReadMore(stream, state) { + if (!state.readingMore) { + state.readingMore = true; + process.nextTick(function() { + maybeReadMore_(stream, state); + }); + } +} + +function maybeReadMore_(stream, state) { + var len = state.length; + while (!state.reading && !state.flowing && !state.ended && + state.length < state.highWaterMark) { + stream.read(0); + if (len === state.length) + // didn't get any data, stop spinning. + break; + else + len = state.length; + } + state.readingMore = false; +} + +// abstract method. to be overridden in specific implementation classes. +// call cb(er, data) where data is <= n in length. +// for virtual (non-string, non-buffer) streams, "length" is somewhat +// arbitrary, and perhaps not very meaningful. +Readable.prototype._read = function(n) { + this.emit('error', new Error('not implemented')); +}; + +Readable.prototype.pipe = function(dest, pipeOpts) { + var src = this; + var state = this._readableState; + + switch (state.pipesCount) { + case 0: + state.pipes = dest; + break; + case 1: + state.pipes = [state.pipes, dest]; + break; + default: + state.pipes.push(dest); + break; + } + state.pipesCount += 1; + + var doEnd = (!pipeOpts || pipeOpts.end !== false) && + dest !== process.stdout && + dest !== process.stderr; + + var endFn = doEnd ? onend : cleanup; + if (state.endEmitted) + process.nextTick(endFn); + else + src.once('end', endFn); + + dest.on('unpipe', onunpipe); + function onunpipe(readable) { + if (readable !== src) return; + cleanup(); + } + + function onend() { + dest.end(); + } + + // when the dest drains, it reduces the awaitDrain counter + // on the source. This would be more elegant with a .once() + // handler in flow(), but adding and removing repeatedly is + // too slow. + var ondrain = pipeOnDrain(src); + dest.on('drain', ondrain); + + function cleanup() { + // cleanup event handlers once the pipe is broken + dest.removeListener('close', onclose); + dest.removeListener('finish', onfinish); + dest.removeListener('drain', ondrain); + dest.removeListener('error', onerror); + dest.removeListener('unpipe', onunpipe); + src.removeListener('end', onend); + src.removeListener('end', cleanup); + + // if the reader is waiting for a drain event from this + // specific writer, then it would cause it to never start + // flowing again. + // So, if this is awaiting a drain, then we just call it now. + // If we don't know, then assume that we are waiting for one. + if (!dest._writableState || dest._writableState.needDrain) + ondrain(); + } + + // if the dest has an error, then stop piping into it. + // however, don't suppress the throwing behavior for this. + function onerror(er) { + unpipe(); + dest.removeListener('error', onerror); + if (EE.listenerCount(dest, 'error') === 0) + dest.emit('error', er); + } + // This is a brutally ugly hack to make sure that our error handler + // is attached before any userland ones. NEVER DO THIS. + if (!dest._events || !dest._events.error) + dest.on('error', onerror); + else if (isArray(dest._events.error)) + dest._events.error.unshift(onerror); + else + dest._events.error = [onerror, dest._events.error]; + + + + // Both close and finish should trigger unpipe, but only once. + function onclose() { + dest.removeListener('finish', onfinish); + unpipe(); + } + dest.once('close', onclose); + function onfinish() { + dest.removeListener('close', onclose); + unpipe(); + } + dest.once('finish', onfinish); + + function unpipe() { + src.unpipe(dest); + } + + // tell the dest that it's being piped to + dest.emit('pipe', src); + + // start the flow if it hasn't been started already. + if (!state.flowing) { + // the handler that waits for readable events after all + // the data gets sucked out in flow. + // This would be easier to follow with a .once() handler + // in flow(), but that is too slow. + this.on('readable', pipeOnReadable); + + state.flowing = true; + process.nextTick(function() { + flow(src); + }); + } + + return dest; +}; + +function pipeOnDrain(src) { + return function() { + var dest = this; + var state = src._readableState; + state.awaitDrain--; + if (state.awaitDrain === 0) + flow(src); + }; +} + +function flow(src) { + var state = src._readableState; + var chunk; + state.awaitDrain = 0; + + function write(dest, i, list) { + var written = dest.write(chunk); + if (false === written) { + state.awaitDrain++; + } + } + + while (state.pipesCount && null !== (chunk = src.read())) { + + if (state.pipesCount === 1) + write(state.pipes, 0, null); + else + forEach(state.pipes, write); + + src.emit('data', chunk); + + // if anyone needs a drain, then we have to wait for that. + if (state.awaitDrain > 0) + return; + } + + // if every destination was unpiped, either before entering this + // function, or in the while loop, then stop flowing. + // + // NB: This is a pretty rare edge case. + if (state.pipesCount === 0) { + state.flowing = false; + + // if there were data event listeners added, then switch to old mode. + if (EE.listenerCount(src, 'data') > 0) + emitDataEvents(src); + return; + } + + // at this point, no one needed a drain, so we just ran out of data + // on the next readable event, start it over again. + state.ranOut = true; +} + +function pipeOnReadable() { + if (this._readableState.ranOut) { + this._readableState.ranOut = false; + flow(this); + } +} + + +Readable.prototype.unpipe = function(dest) { + var state = this._readableState; + + // if we're not piping anywhere, then do nothing. + if (state.pipesCount === 0) + return this; + + // just one destination. most common case. + if (state.pipesCount === 1) { + // passed in one, but it's not the right one. + if (dest && dest !== state.pipes) + return this; + + if (!dest) + dest = state.pipes; + + // got a match. + state.pipes = null; + state.pipesCount = 0; + this.removeListener('readable', pipeOnReadable); + state.flowing = false; + if (dest) + dest.emit('unpipe', this); + return this; + } + + // slow case. multiple pipe destinations. + + if (!dest) { + // remove all. + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + this.removeListener('readable', pipeOnReadable); + state.flowing = false; + + for (var i = 0; i < len; i++) + dests[i].emit('unpipe', this); + return this; + } + + // try to find the right one. + var i = indexOf(state.pipes, dest); + if (i === -1) + return this; + + state.pipes.splice(i, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) + state.pipes = state.pipes[0]; + + dest.emit('unpipe', this); + + return this; +}; + +// set up data events if they are asked for +// Ensure readable listeners eventually get something +Readable.prototype.on = function(ev, fn) { + var res = Stream.prototype.on.call(this, ev, fn); + + if (ev === 'data' && !this._readableState.flowing) + emitDataEvents(this); + + if (ev === 'readable' && this.readable) { + var state = this._readableState; + if (!state.readableListening) { + state.readableListening = true; + state.emittedReadable = false; + state.needReadable = true; + if (!state.reading) { + this.read(0); + } else if (state.length) { + emitReadable(this, state); + } + } + } + + return res; +}; +Readable.prototype.addListener = Readable.prototype.on; + +// pause() and resume() are remnants of the legacy readable stream API +// If the user uses them, then switch into old mode. +Readable.prototype.resume = function() { + emitDataEvents(this); + this.read(0); + this.emit('resume'); +}; + +Readable.prototype.pause = function() { + emitDataEvents(this, true); + this.emit('pause'); +}; + +function emitDataEvents(stream, startPaused) { + var state = stream._readableState; + + if (state.flowing) { + // https://github.com/isaacs/readable-stream/issues/16 + throw new Error('Cannot switch to old mode now.'); + } + + var paused = startPaused || false; + var readable = false; + + // convert to an old-style stream. + stream.readable = true; + stream.pipe = Stream.prototype.pipe; + stream.on = stream.addListener = Stream.prototype.on; + + stream.on('readable', function() { + readable = true; + + var c; + while (!paused && (null !== (c = stream.read()))) + stream.emit('data', c); + + if (c === null) { + readable = false; + stream._readableState.needReadable = true; + } + }); + + stream.pause = function() { + paused = true; + this.emit('pause'); + }; + + stream.resume = function() { + paused = false; + if (readable) + process.nextTick(function() { + stream.emit('readable'); + }); + else + this.read(0); + this.emit('resume'); + }; + + // now make it start, just in case it hadn't already. + stream.emit('readable'); +} + +// wrap an old-style stream as the async data source. +// This is *not* part of the readable stream interface. +// It is an ugly unfortunate mess of history. +Readable.prototype.wrap = function(stream) { + var state = this._readableState; + var paused = false; + + var self = this; + stream.on('end', function() { + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) + self.push(chunk); + } + + self.push(null); + }); + + stream.on('data', function(chunk) { + if (state.decoder) + chunk = state.decoder.write(chunk); + + // don't skip over falsy values in objectMode + //if (state.objectMode && util.isNullOrUndefined(chunk)) + if (state.objectMode && (chunk === null || chunk === undefined)) + return; + else if (!state.objectMode && (!chunk || !chunk.length)) + return; + + var ret = self.push(chunk); + if (!ret) { + paused = true; + stream.pause(); + } + }); + + // proxy all the other methods. + // important when wrapping filters and duplexes. + for (var i in stream) { + if (typeof stream[i] === 'function' && + typeof this[i] === 'undefined') { + this[i] = function(method) { return function() { + return stream[method].apply(stream, arguments); + }}(i); + } + } + + // proxy certain important events. + var events = ['error', 'close', 'destroy', 'pause', 'resume']; + forEach(events, function(ev) { + stream.on(ev, self.emit.bind(self, ev)); + }); + + // when we try to consume some more bytes, simply unpause the + // underlying stream. + self._read = function(n) { + if (paused) { + paused = false; + stream.resume(); + } + }; + + return self; +}; + + + +// exposed for testing purposes only. +Readable._fromList = fromList; + +// Pluck off n bytes from an array of buffers. +// Length is the combined lengths of all the buffers in the list. +function fromList(n, state) { + var list = state.buffer; + var length = state.length; + var stringMode = !!state.decoder; + var objectMode = !!state.objectMode; + var ret; + + // nothing in the list, definitely empty. + if (list.length === 0) + return null; + + if (length === 0) + ret = null; + else if (objectMode) + ret = list.shift(); + else if (!n || n >= length) { + // read it all, truncate the array. + if (stringMode) + ret = list.join(''); + else + ret = Buffer.concat(list, length); + list.length = 0; + } else { + // read just some of it. + if (n < list[0].length) { + // just take a part of the first list item. + // slice is the same for buffers and strings. + var buf = list[0]; + ret = buf.slice(0, n); + list[0] = buf.slice(n); + } else if (n === list[0].length) { + // first list is a perfect match + ret = list.shift(); + } else { + // complex case. + // we have enough to cover it, but it spans past the first buffer. + if (stringMode) + ret = ''; + else + ret = new Buffer(n); + + var c = 0; + for (var i = 0, l = list.length; i < l && c < n; i++) { + var buf = list[0]; + var cpy = Math.min(n - c, buf.length); + + if (stringMode) + ret += buf.slice(0, cpy); + else + buf.copy(ret, c, 0, cpy); + + if (cpy < buf.length) + list[0] = buf.slice(cpy); + else + list.shift(); + + c += cpy; + } + } + } + + return ret; +} + +function endReadable(stream) { + var state = stream._readableState; + + // If we get here before consuming all the bytes, then that is a + // bug in node. Should never happen. + if (state.length > 0) + throw new Error('endReadable called on non-empty stream'); + + if (!state.endEmitted && state.calledRead) { + state.ended = true; + process.nextTick(function() { + // Check that we didn't get one last unshift. + if (!state.endEmitted && state.length === 0) { + state.endEmitted = true; + stream.readable = false; + stream.emit('end'); + } + }); + } +} + +function forEach (xs, f) { + for (var i = 0, l = xs.length; i < l; i++) { + f(xs[i], i); + } +} + +function indexOf (xs, x) { + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) return i; + } + return -1; +} diff --git a/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_transform.js new file mode 100644 index 0000000..eb188df --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_transform.js @@ -0,0 +1,210 @@ +// Copyright Joyent, Inc. and other Node 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. + + +// a transform stream is a readable/writable stream where you do +// something with the data. Sometimes it's called a "filter", +// but that's not a great name for it, since that implies a thing where +// some bits pass through, and others are simply ignored. (That would +// be a valid example of a transform, of course.) +// +// While the output is causally related to the input, it's not a +// necessarily symmetric or synchronous transformation. For example, +// a zlib stream might take multiple plain-text writes(), and then +// emit a single compressed chunk some time in the future. +// +// Here's how this works: +// +// The Transform stream has all the aspects of the readable and writable +// stream classes. When you write(chunk), that calls _write(chunk,cb) +// internally, and returns false if there's a lot of pending writes +// buffered up. When you call read(), that calls _read(n) until +// there's enough pending readable data buffered up. +// +// In a transform stream, the written data is placed in a buffer. When +// _read(n) is called, it transforms the queued up data, calling the +// buffered _write cb's as it consumes chunks. If consuming a single +// written chunk would result in multiple output chunks, then the first +// outputted bit calls the readcb, and subsequent chunks just go into +// the read buffer, and will cause it to emit 'readable' if necessary. +// +// This way, back-pressure is actually determined by the reading side, +// since _read has to be called to start processing a new chunk. However, +// a pathological inflate type of transform can cause excessive buffering +// here. For example, imagine a stream where every byte of input is +// interpreted as an integer from 0-255, and then results in that many +// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in +// 1kb of data being output. In this case, you could write a very small +// amount of input, and end up with a very large amount of output. In +// such a pathological inflating mechanism, there'd be no way to tell +// the system to stop doing the transform. A single 4MB write could +// cause the system to run out of memory. +// +// However, even in such a pathological case, only a single written chunk +// would be consumed, and then the rest would wait (un-transformed) until +// the results of the previous transformed chunk were consumed. + +module.exports = Transform; + +var Duplex = require('./_stream_duplex'); + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +util.inherits(Transform, Duplex); + + +function TransformState(options, stream) { + this.afterTransform = function(er, data) { + return afterTransform(stream, er, data); + }; + + this.needTransform = false; + this.transforming = false; + this.writecb = null; + this.writechunk = null; +} + +function afterTransform(stream, er, data) { + var ts = stream._transformState; + ts.transforming = false; + + var cb = ts.writecb; + + if (!cb) + return stream.emit('error', new Error('no writecb in Transform class')); + + ts.writechunk = null; + ts.writecb = null; + + if (data !== null && data !== undefined) + stream.push(data); + + if (cb) + cb(er); + + var rs = stream._readableState; + rs.reading = false; + if (rs.needReadable || rs.length < rs.highWaterMark) { + stream._read(rs.highWaterMark); + } +} + + +function Transform(options) { + if (!(this instanceof Transform)) + return new Transform(options); + + Duplex.call(this, options); + + var ts = this._transformState = new TransformState(options, this); + + // when the writable side finishes, then flush out anything remaining. + var stream = this; + + // start out asking for a readable event once data is transformed. + this._readableState.needReadable = true; + + // we have implemented the _read method, and done the other things + // that Readable wants before the first _read call, so unset the + // sync guard flag. + this._readableState.sync = false; + + this.once('finish', function() { + if ('function' === typeof this._flush) + this._flush(function(er) { + done(stream, er); + }); + else + done(stream); + }); +} + +Transform.prototype.push = function(chunk, encoding) { + this._transformState.needTransform = false; + return Duplex.prototype.push.call(this, chunk, encoding); +}; + +// This is the part where you do stuff! +// override this function in implementation classes. +// 'chunk' is an input chunk. +// +// Call `push(newChunk)` to pass along transformed output +// to the readable side. You may call 'push' zero or more times. +// +// Call `cb(err)` when you are done with this chunk. If you pass +// an error, then that'll put the hurt on the whole operation. If you +// never call cb(), then you'll never get another chunk. +Transform.prototype._transform = function(chunk, encoding, cb) { + throw new Error('not implemented'); +}; + +Transform.prototype._write = function(chunk, encoding, cb) { + var ts = this._transformState; + ts.writecb = cb; + ts.writechunk = chunk; + ts.writeencoding = encoding; + if (!ts.transforming) { + var rs = this._readableState; + if (ts.needTransform || + rs.needReadable || + rs.length < rs.highWaterMark) + this._read(rs.highWaterMark); + } +}; + +// Doesn't matter what the args are here. +// _transform does all the work. +// That we got here means that the readable side wants more data. +Transform.prototype._read = function(n) { + var ts = this._transformState; + + if (ts.writechunk !== null && ts.writecb && !ts.transforming) { + ts.transforming = true; + this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); + } else { + // mark that we need a transform, so that any data that comes in + // will get processed, now that we've asked for it. + ts.needTransform = true; + } +}; + + +function done(stream, er) { + if (er) + return stream.emit('error', er); + + // if there's nothing in the write buffer, then that means + // that nothing more will ever be provided + var ws = stream._writableState; + var rs = stream._readableState; + var ts = stream._transformState; + + if (ws.length) + throw new Error('calling transform done when ws.length != 0'); + + if (ts.transforming) + throw new Error('calling transform done when still transforming'); + + return stream.push(null); +} diff --git a/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_writable.js new file mode 100644 index 0000000..4bdaa4f --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_writable.js @@ -0,0 +1,386 @@ +// Copyright Joyent, Inc. and other Node 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. + +// A bit simpler than readable streams. +// Implement an async ._write(chunk, cb), and it'll handle all +// the drain event emission and buffering. + +module.exports = Writable; + +/**/ +var Buffer = require('buffer').Buffer; +/**/ + +Writable.WritableState = WritableState; + + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +var Stream = require('stream'); + +util.inherits(Writable, Stream); + +function WriteReq(chunk, encoding, cb) { + this.chunk = chunk; + this.encoding = encoding; + this.callback = cb; +} + +function WritableState(options, stream) { + options = options || {}; + + // the point at which write() starts returning false + // Note: 0 is a valid value, means that we always return false if + // the entire buffer is not flushed immediately on write() + var hwm = options.highWaterMark; + this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; + + // object stream flag to indicate whether or not this stream + // contains buffers or objects. + this.objectMode = !!options.objectMode; + + // cast to ints. + this.highWaterMark = ~~this.highWaterMark; + + this.needDrain = false; + // at the start of calling end() + this.ending = false; + // when end() has been called, and returned + this.ended = false; + // when 'finish' is emitted + this.finished = false; + + // should we decode strings into buffers before passing to _write? + // this is here so that some node-core streams can optimize string + // handling at a lower level. + var noDecode = options.decodeStrings === false; + this.decodeStrings = !noDecode; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // not an actual buffer we keep track of, but a measurement + // of how much we're waiting to get pushed to some underlying + // socket or file. + this.length = 0; + + // a flag to see when we're in the middle of a write. + this.writing = false; + + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, becuase any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; + + // a flag to know if we're processing previously buffered items, which + // may call the _write() callback in the same tick, so that we don't + // end up in an overlapped onwrite situation. + this.bufferProcessing = false; + + // the callback that's passed to _write(chunk,cb) + this.onwrite = function(er) { + onwrite(stream, er); + }; + + // the callback that the user supplies to write(chunk,encoding,cb) + this.writecb = null; + + // the amount that is being written when _write is called. + this.writelen = 0; + + this.buffer = []; + + // True if the error was already emitted and should not be thrown again + this.errorEmitted = false; +} + +function Writable(options) { + var Duplex = require('./_stream_duplex'); + + // Writable ctor is applied to Duplexes, though they're not + // instanceof Writable, they're instanceof Readable. + if (!(this instanceof Writable) && !(this instanceof Duplex)) + return new Writable(options); + + this._writableState = new WritableState(options, this); + + // legacy. + this.writable = true; + + Stream.call(this); +} + +// Otherwise people can pipe Writable streams, which is just wrong. +Writable.prototype.pipe = function() { + this.emit('error', new Error('Cannot pipe. Not readable.')); +}; + + +function writeAfterEnd(stream, state, cb) { + var er = new Error('write after end'); + // TODO: defer error events consistently everywhere, not just the cb + stream.emit('error', er); + process.nextTick(function() { + cb(er); + }); +} + +// If we get something that is not a buffer, string, null, or undefined, +// and we're not in objectMode, then that's an error. +// Otherwise stream chunks are all considered to be of length=1, and the +// watermarks determine how many objects to keep in the buffer, rather than +// how many bytes or characters. +function validChunk(stream, state, chunk, cb) { + var valid = true; + if (!Buffer.isBuffer(chunk) && + 'string' !== typeof chunk && + chunk !== null && + chunk !== undefined && + !state.objectMode) { + var er = new TypeError('Invalid non-string/buffer chunk'); + stream.emit('error', er); + process.nextTick(function() { + cb(er); + }); + valid = false; + } + return valid; +} + +Writable.prototype.write = function(chunk, encoding, cb) { + var state = this._writableState; + var ret = false; + + if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (Buffer.isBuffer(chunk)) + encoding = 'buffer'; + else if (!encoding) + encoding = state.defaultEncoding; + + if (typeof cb !== 'function') + cb = function() {}; + + if (state.ended) + writeAfterEnd(this, state, cb); + else if (validChunk(this, state, chunk, cb)) + ret = writeOrBuffer(this, state, chunk, encoding, cb); + + return ret; +}; + +function decodeChunk(state, chunk, encoding) { + if (!state.objectMode && + state.decodeStrings !== false && + typeof chunk === 'string') { + chunk = new Buffer(chunk, encoding); + } + return chunk; +} + +// if we're already writing something, then just put this +// in the queue, and wait our turn. Otherwise, call _write +// If we return false, then we need a drain event, so set that flag. +function writeOrBuffer(stream, state, chunk, encoding, cb) { + chunk = decodeChunk(state, chunk, encoding); + if (Buffer.isBuffer(chunk)) + encoding = 'buffer'; + var len = state.objectMode ? 1 : chunk.length; + + state.length += len; + + var ret = state.length < state.highWaterMark; + // we must ensure that previous needDrain will not be reset to false. + if (!ret) + state.needDrain = true; + + if (state.writing) + state.buffer.push(new WriteReq(chunk, encoding, cb)); + else + doWrite(stream, state, len, chunk, encoding, cb); + + return ret; +} + +function doWrite(stream, state, len, chunk, encoding, cb) { + state.writelen = len; + state.writecb = cb; + state.writing = true; + state.sync = true; + stream._write(chunk, encoding, state.onwrite); + state.sync = false; +} + +function onwriteError(stream, state, sync, er, cb) { + if (sync) + process.nextTick(function() { + cb(er); + }); + else + cb(er); + + stream._writableState.errorEmitted = true; + stream.emit('error', er); +} + +function onwriteStateUpdate(state) { + state.writing = false; + state.writecb = null; + state.length -= state.writelen; + state.writelen = 0; +} + +function onwrite(stream, er) { + var state = stream._writableState; + var sync = state.sync; + var cb = state.writecb; + + onwriteStateUpdate(state); + + if (er) + onwriteError(stream, state, sync, er, cb); + else { + // Check if we're actually ready to finish, but don't emit yet + var finished = needFinish(stream, state); + + if (!finished && !state.bufferProcessing && state.buffer.length) + clearBuffer(stream, state); + + if (sync) { + process.nextTick(function() { + afterWrite(stream, state, finished, cb); + }); + } else { + afterWrite(stream, state, finished, cb); + } + } +} + +function afterWrite(stream, state, finished, cb) { + if (!finished) + onwriteDrain(stream, state); + cb(); + if (finished) + finishMaybe(stream, state); +} + +// Must force callback to be called on nextTick, so that we don't +// emit 'drain' before the write() consumer gets the 'false' return +// value, and has a chance to attach a 'drain' listener. +function onwriteDrain(stream, state) { + if (state.length === 0 && state.needDrain) { + state.needDrain = false; + stream.emit('drain'); + } +} + + +// if there's something in the buffer waiting, then process it +function clearBuffer(stream, state) { + state.bufferProcessing = true; + + for (var c = 0; c < state.buffer.length; c++) { + var entry = state.buffer[c]; + var chunk = entry.chunk; + var encoding = entry.encoding; + var cb = entry.callback; + var len = state.objectMode ? 1 : chunk.length; + + doWrite(stream, state, len, chunk, encoding, cb); + + // if we didn't call the onwrite immediately, then + // it means that we need to wait until it does. + // also, that means that the chunk and cb are currently + // being processed, so move the buffer counter past them. + if (state.writing) { + c++; + break; + } + } + + state.bufferProcessing = false; + if (c < state.buffer.length) + state.buffer = state.buffer.slice(c); + else + state.buffer.length = 0; +} + +Writable.prototype._write = function(chunk, encoding, cb) { + cb(new Error('not implemented')); +}; + +Writable.prototype.end = function(chunk, encoding, cb) { + var state = this._writableState; + + if (typeof chunk === 'function') { + cb = chunk; + chunk = null; + encoding = null; + } else if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (typeof chunk !== 'undefined' && chunk !== null) + this.write(chunk, encoding); + + // ignore unnecessary end() calls. + if (!state.ending && !state.finished) + endWritable(this, state, cb); +}; + + +function needFinish(stream, state) { + return (state.ending && + state.length === 0 && + !state.finished && + !state.writing); +} + +function finishMaybe(stream, state) { + var need = needFinish(stream, state); + if (need) { + state.finished = true; + stream.emit('finish'); + } + return need; +} + +function endWritable(stream, state, cb) { + state.ending = true; + finishMaybe(stream, state); + if (cb) { + if (state.finished) + process.nextTick(cb); + else + stream.once('finish', cb); + } + state.ended = true; +} diff --git a/node_modules/vinyl-fs/node_modules/readable-stream/package.json b/node_modules/vinyl-fs/node_modules/readable-stream/package.json new file mode 100644 index 0000000..c6a814a --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/readable-stream/package.json @@ -0,0 +1,112 @@ +{ + "_args": [ + [ + { + "raw": "readable-stream@>=1.0.33-1 <1.1.0-0", + "scope": null, + "escapedName": "readable-stream", + "name": "readable-stream", + "rawSpec": ">=1.0.33-1 <1.1.0-0", + "spec": ">=1.0.33-1 <1.1.0-0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/vinyl-fs/node_modules/through2" + ] + ], + "_from": "readable-stream@>=1.0.33-1 <1.1.0-0", + "_id": "readable-stream@1.0.34", + "_inCache": true, + "_location": "/vinyl-fs/readable-stream", + "_nodeVersion": "5.10.1", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/readable-stream-1.0.34.tgz_1460562521506_0.019665231462568045" + }, + "_npmUser": { + "name": "cwmma", + "email": "calvin.metcalf@gmail.com" + }, + "_npmVersion": "3.8.3", + "_phantomChildren": {}, + "_requested": { + "raw": "readable-stream@>=1.0.33-1 <1.1.0-0", + "scope": null, + "escapedName": "readable-stream", + "name": "readable-stream", + "rawSpec": ">=1.0.33-1 <1.1.0-0", + "spec": ">=1.0.33-1 <1.1.0-0", + "type": "range" + }, + "_requiredBy": [ + "/vinyl-fs/through2" + ], + "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "_shasum": "125820e34bc842d2f2aaafafe4c2916ee32c157c", + "_shrinkwrap": null, + "_spec": "readable-stream@>=1.0.33-1 <1.1.0-0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/vinyl-fs/node_modules/through2", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "browser": { + "util": false + }, + "bugs": { + "url": "https://github.com/isaacs/readable-stream/issues" + }, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + }, + "description": "Streams2, a user-land copy of the stream library from Node.js v0.10.x", + "devDependencies": { + "tap": "~0.2.6" + }, + "directories": {}, + "dist": { + "shasum": "125820e34bc842d2f2aaafafe4c2916ee32c157c", + "tarball": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz" + }, + "gitHead": "1227c7b66deedb1dc5284a89425854d5f7ad9576", + "homepage": "https://github.com/isaacs/readable-stream#readme", + "keywords": [ + "readable", + "stream", + "pipe" + ], + "license": "MIT", + "main": "readable.js", + "maintainers": [ + { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + { + "name": "tootallnate", + "email": "nathan@tootallnate.net" + }, + { + "name": "rvagg", + "email": "rod@vagg.org" + }, + { + "name": "cwmma", + "email": "calvin.metcalf@gmail.com" + } + ], + "name": "readable-stream", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/readable-stream.git" + }, + "scripts": { + "test": "tap test/simple/*.js" + }, + "version": "1.0.34" +} diff --git a/node_modules/vinyl-fs/node_modules/readable-stream/passthrough.js b/node_modules/vinyl-fs/node_modules/readable-stream/passthrough.js new file mode 100644 index 0000000..27e8d8a --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/readable-stream/passthrough.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_passthrough.js") diff --git a/node_modules/vinyl-fs/node_modules/readable-stream/readable.js b/node_modules/vinyl-fs/node_modules/readable-stream/readable.js new file mode 100644 index 0000000..26511e8 --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/readable-stream/readable.js @@ -0,0 +1,11 @@ +var Stream = require('stream'); // hack to fix a circular dependency issue when used with browserify +exports = module.exports = require('./lib/_stream_readable.js'); +exports.Stream = Stream; +exports.Readable = exports; +exports.Writable = require('./lib/_stream_writable.js'); +exports.Duplex = require('./lib/_stream_duplex.js'); +exports.Transform = require('./lib/_stream_transform.js'); +exports.PassThrough = require('./lib/_stream_passthrough.js'); +if (!process.browser && process.env.READABLE_STREAM === 'disable') { + module.exports = require('stream'); +} diff --git a/node_modules/vinyl-fs/node_modules/readable-stream/transform.js b/node_modules/vinyl-fs/node_modules/readable-stream/transform.js new file mode 100644 index 0000000..5d482f0 --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/readable-stream/transform.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_transform.js") diff --git a/node_modules/vinyl-fs/node_modules/readable-stream/writable.js b/node_modules/vinyl-fs/node_modules/readable-stream/writable.js new file mode 100644 index 0000000..e1e9efd --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/readable-stream/writable.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_writable.js") diff --git a/node_modules/vinyl-fs/node_modules/through2/.npmignore b/node_modules/vinyl-fs/node_modules/through2/.npmignore new file mode 100644 index 0000000..1e1dcab --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/through2/.npmignore @@ -0,0 +1,3 @@ +test +.jshintrc +.travis.yml \ No newline at end of file diff --git a/node_modules/vinyl-fs/node_modules/through2/LICENSE b/node_modules/vinyl-fs/node_modules/through2/LICENSE new file mode 100644 index 0000000..f6a0029 --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/through2/LICENSE @@ -0,0 +1,39 @@ +Copyright 2013, Rod Vagg (the "Original Author") +All rights reserved. + +MIT +no-false-attribs License + +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. + +Distributions of all or part of the Software intended to be used +by the recipients as they would use the unmodified Software, +containing modifications that substantially alter, remove, or +disable functionality of the Software, outside of the documented +configuration mechanisms provided by the Software, shall be +modified such that the Original Author's bug reporting email +addresses and urls are either replaced with the contact information +of the parties responsible for the changes, or removed entirely. + +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. + + +Except where noted, this license applies to any and all software +programs and associated documentation files created by the +Original Author, when distributed with the Software. \ No newline at end of file diff --git a/node_modules/vinyl-fs/node_modules/through2/README.md b/node_modules/vinyl-fs/node_modules/through2/README.md new file mode 100644 index 0000000..11259a5 --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/through2/README.md @@ -0,0 +1,132 @@ +# through2 + +[![NPM](https://nodei.co/npm/through2.png?downloads&downloadRank)](https://nodei.co/npm/through2/) + +**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise** + +Inspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`. + +Note: A **Streams3** version of through2 is available in npm with the tag `"1.0"` rather than `"latest"` so an `npm install through2` will get you the current Streams2 version (version number is 0.x.x). To use a Streams3 version use `npm install through2@1` to fetch the latest version 1.x.x. More information about Streams2 vs Streams3 and recommendations see the article **[Why I don't use Node's core 'stream' module](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html)**. + +```js +fs.createReadStream('ex.txt') + .pipe(through2(function (chunk, enc, callback) { + for (var i = 0; i < chunk.length; i++) + if (chunk[i] == 97) + chunk[i] = 122 // swap 'a' for 'z' + + this.push(chunk) + + callback() + })) + .pipe(fs.createWriteStream('out.txt')) +``` + +Or object streams: + +```js +var all = [] + +fs.createReadStream('data.csv') + .pipe(csv2()) + .pipe(through2.obj(function (chunk, enc, callback) { + var data = { + name : chunk[0] + , address : chunk[3] + , phone : chunk[10] + } + this.push(data) + + callback() + })) + .on('data', function (data) { + all.push(data) + }) + .on('end', function () { + doSomethingSpecial(all) + }) +``` + +Note that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`. + +## API + +through2([ options, ] [ transformFunction ] [, flushFunction ]) + +Consult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`). + +### options + +The options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`). + +The `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call: + +```js +fs.createReadStream('/tmp/important.dat') + .pipe(through2({ objectMode: true, allowHalfOpen: false }, + function (chunk, enc, cb) { + cb(null, 'wut?') // note we can use the second argument on the callback + // to provide data as an alternative to this.push('wut?') + } + ) + .pipe(fs.createWriteStream('/tmp/wut.txt')) +``` + +### transformFunction + +The `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk. + +To queue a new chunk, call `this.push(chunk)`—this can be called as many times as required before the `callback()` if you have multiple pieces to send on. + +Alternatively, you may use `callback(err, chunk)` as shorthand for emitting a single chunk or an error. + +If you **do not provide a `transformFunction`** then you will get a simple pass-through stream. + +### flushFunction + +The optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress. + +```js +fs.createReadStream('/tmp/important.dat') + .pipe(through2( + function (chunk, enc, cb) { cb(null, chunk) }, // transform is a noop + function (cb) { // flush function + this.push('tacking on an extra buffer to the end'); + cb(); + } + )) + .pipe(fs.createWriteStream('/tmp/wut.txt')); +``` + +through2.ctor([ options, ] transformFunction[, flushFunction ]) + +Instead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances. + +```js +var FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) { + if (record.temp != null && record.unit = "F") { + record.temp = ( ( record.temp - 32 ) * 5 ) / 9 + record.unit = "C" + } + this.push(record) + callback() +}) + +// Create instances of FToC like so: +var converter = new FToC() +// Or: +var converter = FToC() +// Or specify/override options when you instantiate, if you prefer: +var converter = FToC({objectMode: true}) +``` + +## See Also + + - [through2-map](https://github.com/brycebaril/through2-map) - Array.prototype.map analog for streams. + - [through2-filter](https://github.com/brycebaril/through2-filter) - Array.prototype.filter analog for streams. + - [through2-reduce](https://github.com/brycebaril/through2-reduce) - Array.prototype.reduce analog for streams. + - [through2-spy](https://github.com/brycebaril/through2-spy) - Wrapper for simple stream.PassThrough spies. + +## License + +**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. diff --git a/node_modules/vinyl-fs/node_modules/through2/package.json b/node_modules/vinyl-fs/node_modules/through2/package.json new file mode 100644 index 0000000..4bf87e9 --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/through2/package.json @@ -0,0 +1,98 @@ +{ + "_args": [ + [ + { + "raw": "through2@^0.6.1", + "scope": null, + "escapedName": "through2", + "name": "through2", + "rawSpec": "^0.6.1", + "spec": ">=0.6.1 <0.7.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/vinyl-fs" + ] + ], + "_from": "through2@>=0.6.1 <0.7.0", + "_id": "through2@0.6.5", + "_inCache": true, + "_location": "/vinyl-fs/through2", + "_npmUser": { + "name": "bryce", + "email": "bryce@ravenwall.com" + }, + "_npmVersion": "1.4.28", + "_phantomChildren": {}, + "_requested": { + "raw": "through2@^0.6.1", + "scope": null, + "escapedName": "through2", + "name": "through2", + "rawSpec": "^0.6.1", + "spec": ">=0.6.1 <0.7.0", + "type": "range" + }, + "_requiredBy": [ + "/vinyl-fs" + ], + "_resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "_shasum": "41ab9c67b29d57209071410e1d7a7a968cd3ad48", + "_shrinkwrap": null, + "_spec": "through2@^0.6.1", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/vinyl-fs", + "author": { + "name": "Rod Vagg", + "email": "r@va.gg", + "url": "https://github.com/rvagg" + }, + "bugs": { + "url": "https://github.com/rvagg/through2/issues" + }, + "dependencies": { + "readable-stream": ">=1.0.33-1 <1.1.0-0", + "xtend": ">=4.0.0 <4.1.0-0" + }, + "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise", + "devDependencies": { + "bl": ">=0.9.0 <0.10.0-0", + "stream-spigot": ">=3.0.4 <3.1.0-0", + "tape": ">=2.14.0 <2.15.0-0" + }, + "directories": {}, + "dist": { + "shasum": "41ab9c67b29d57209071410e1d7a7a968cd3ad48", + "tarball": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" + }, + "gitHead": "ba4a87875f2c82323c10023e36f4ae4b386c1bf8", + "homepage": "https://github.com/rvagg/through2", + "keywords": [ + "stream", + "streams2", + "through", + "transform" + ], + "license": "MIT", + "main": "through2.js", + "maintainers": [ + { + "name": "rvagg", + "email": "rod@vagg.org" + }, + { + "name": "bryce", + "email": "bryce@ravenwall.com" + } + ], + "name": "through2", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/rvagg/through2.git" + }, + "scripts": { + "test": "node test/test.js", + "test-local": "brtapsauce-local test/basic-test.js" + }, + "version": "0.6.5" +} diff --git a/node_modules/vinyl-fs/node_modules/through2/through2.js b/node_modules/vinyl-fs/node_modules/through2/through2.js new file mode 100644 index 0000000..5b7a880 --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/through2/through2.js @@ -0,0 +1,96 @@ +var Transform = require('readable-stream/transform') + , inherits = require('util').inherits + , xtend = require('xtend') + +function DestroyableTransform(opts) { + Transform.call(this, opts) + this._destroyed = false +} + +inherits(DestroyableTransform, Transform) + +DestroyableTransform.prototype.destroy = function(err) { + if (this._destroyed) return + this._destroyed = true + + var self = this + process.nextTick(function() { + if (err) + self.emit('error', err) + self.emit('close') + }) +} + +// a noop _transform function +function noop (chunk, enc, callback) { + callback(null, chunk) +} + + +// create a new export function, used by both the main export and +// the .ctor export, contains common logic for dealing with arguments +function through2 (construct) { + return function (options, transform, flush) { + if (typeof options == 'function') { + flush = transform + transform = options + options = {} + } + + if (typeof transform != 'function') + transform = noop + + if (typeof flush != 'function') + flush = null + + return construct(options, transform, flush) + } +} + + +// main export, just make me a transform stream! +module.exports = through2(function (options, transform, flush) { + var t2 = new DestroyableTransform(options) + + t2._transform = transform + + if (flush) + t2._flush = flush + + return t2 +}) + + +// make me a reusable prototype that I can `new`, or implicitly `new` +// with a constructor call +module.exports.ctor = through2(function (options, transform, flush) { + function Through2 (override) { + if (!(this instanceof Through2)) + return new Through2(override) + + this.options = xtend(options, override) + + DestroyableTransform.call(this, this.options) + } + + inherits(Through2, DestroyableTransform) + + Through2.prototype._transform = transform + + if (flush) + Through2.prototype._flush = flush + + return Through2 +}) + + +module.exports.obj = through2(function (options, transform, flush) { + var t2 = new DestroyableTransform(xtend({ objectMode: true, highWaterMark: 16 }, options)) + + t2._transform = transform + + if (flush) + t2._flush = flush + + return t2 +}) diff --git a/node_modules/vinyl-fs/node_modules/vinyl/LICENSE b/node_modules/vinyl-fs/node_modules/vinyl/LICENSE new file mode 100644 index 0000000..4f482f9 --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/vinyl/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2013 Fractal + +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. diff --git a/node_modules/vinyl-fs/node_modules/vinyl/README.md b/node_modules/vinyl-fs/node_modules/vinyl/README.md new file mode 100644 index 0000000..ae6f16f --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/vinyl/README.md @@ -0,0 +1,127 @@ +# vinyl [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status](https://david-dm.org/wearefractal/vinyl.png?theme=shields.io)](https://david-dm.org/wearefractal/vinyl) + + +## Information + + + + + + + + + + + + + +
    Packagevinyl
    DescriptionA virtual file format
    Node Version>= 0.9
    + +## What is this? + +Read this for more info about how this plays into the grand scheme of things https://medium.com/@eschoff/3828e8126466 + +## File + +```javascript +var File = require('vinyl'); + +var coffeeFile = new File({ + cwd: "/", + base: "/test/", + path: "/test/file.coffee", + contents: new Buffer("test = 123") +}); +``` + +### constructor(options) + +#### options.cwd + +Type: `String` +Default: `process.cwd()` + +#### options.base + +Used for relative pathing. Typically where a glob starts. + +Type: `String` +Default: `options.cwd` + +#### options.path + +Full path to the file. + +Type: `String` +Default: `null` + +#### options.stat + +The result of an fs.stat call. See [fs.Stats](http://nodejs.org/api/fs.html#fs_class_fs_stats) for more information. + +Type: `fs.Stats` +Default: `null` + +#### options.contents + +File contents. + +Type: `Buffer, Stream, or null` +Default: `null` + +### isBuffer() + +Returns true if file.contents is a Buffer. + +### isStream() + +Returns true if file.contents is a Stream. + +### isNull() + +Returns true if file.contents is null. + +### clone() + +Returns a new File object with all attributes cloned. Custom attributes are deep-cloned. + +### pipe(stream[, opt]) + +If file.contents is a Buffer, it will write it to the stream. + +If file.contents is a Stream, it will pipe it to the stream. + +If file.contents is null, it will do nothing. + +If opt.end is false, the destination stream will not be ended (same as node core). + +Returns the stream. + +### inspect() + +Returns a pretty String interpretation of the File. Useful for console.log. + +### relative + +Returns path.relative for the file base and file path. + +Example: + +```javascript +var file = new File({ + cwd: "/", + base: "/test/", + path: "/test/file.coffee" +}); + +console.log(file.relative); // file.coffee +``` + +[npm-url]: https://npmjs.org/package/vinyl +[npm-image]: https://badge.fury.io/js/vinyl.png +[travis-url]: https://travis-ci.org/wearefractal/vinyl +[travis-image]: https://travis-ci.org/wearefractal/vinyl.png?branch=master +[coveralls-url]: https://coveralls.io/r/wearefractal/vinyl +[coveralls-image]: https://coveralls.io/repos/wearefractal/vinyl/badge.png +[depstat-url]: https://david-dm.org/wearefractal/vinyl +[depstat-image]: https://david-dm.org/wearefractal/vinyl.png diff --git a/node_modules/vinyl-fs/node_modules/vinyl/index.js b/node_modules/vinyl-fs/node_modules/vinyl/index.js new file mode 100644 index 0000000..9aa47b7 --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/vinyl/index.js @@ -0,0 +1,175 @@ +var path = require('path'); +var clone = require('clone'); +var cloneStats = require('clone-stats'); +var cloneBuffer = require('./lib/cloneBuffer'); +var isBuffer = require('./lib/isBuffer'); +var isStream = require('./lib/isStream'); +var isNull = require('./lib/isNull'); +var inspectStream = require('./lib/inspectStream'); +var Stream = require('stream'); + +function File(file) { + if (!file) file = {}; + + // record path change + var history = file.path ? [file.path] : file.history; + this.history = history || []; + + // TODO: should this be moved to vinyl-fs? + this.cwd = file.cwd || process.cwd(); + this.base = file.base || this.cwd; + + // stat = fs stats object + // TODO: should this be moved to vinyl-fs? + this.stat = file.stat || null; + + // contents = stream, buffer, or null if not read + this.contents = file.contents || null; +} + +File.prototype.isBuffer = function() { + return isBuffer(this.contents); +}; + +File.prototype.isStream = function() { + return isStream(this.contents); +}; + +File.prototype.isNull = function() { + return isNull(this.contents); +}; + +// TODO: should this be moved to vinyl-fs? +File.prototype.isDirectory = function() { + return this.isNull() && this.stat && this.stat.isDirectory(); +}; + +File.prototype.clone = function(opt) { + if (typeof opt === 'boolean') { + opt = { + deep: opt, + contents: true + }; + } else if (!opt) { + opt = { + deep: false, + contents: true + }; + } else { + opt.deep = opt.deep === true; + opt.contents = opt.contents !== false; + } + + // clone our file contents + var contents; + if (this.isStream()) { + contents = this.contents.pipe(new Stream.PassThrough()); + this.contents = this.contents.pipe(new Stream.PassThrough()); + } else if (this.isBuffer()) { + contents = opt.contents ? cloneBuffer(this.contents) : this.contents; + } + + var file = new File({ + cwd: this.cwd, + base: this.base, + stat: (this.stat ? cloneStats(this.stat) : null), + history: this.history.slice(), + contents: contents + }); + + // clone our custom properties + Object.keys(this).forEach(function(key) { + // ignore built-in fields + if (key === '_contents' || key === 'stat' || + key === 'history' || key === 'path' || + key === 'base' || key === 'cwd') { + return; + } + file[key] = opt.deep ? clone(this[key], true) : this[key]; + }, this); + return file; +}; + +File.prototype.pipe = function(stream, opt) { + if (!opt) opt = {}; + if (typeof opt.end === 'undefined') opt.end = true; + + if (this.isStream()) { + return this.contents.pipe(stream, opt); + } + if (this.isBuffer()) { + if (opt.end) { + stream.end(this.contents); + } else { + stream.write(this.contents); + } + return stream; + } + + // isNull + if (opt.end) stream.end(); + return stream; +}; + +File.prototype.inspect = function() { + var inspect = []; + + // use relative path if possible + var filePath = (this.base && this.path) ? this.relative : this.path; + + if (filePath) { + inspect.push('"'+filePath+'"'); + } + + if (this.isBuffer()) { + inspect.push(this.contents.inspect()); + } + + if (this.isStream()) { + inspect.push(inspectStream(this.contents)); + } + + return ''; +}; + +// virtual attributes +// or stuff with extra logic +Object.defineProperty(File.prototype, 'contents', { + get: function() { + return this._contents; + }, + set: function(val) { + if (!isBuffer(val) && !isStream(val) && !isNull(val)) { + throw new Error('File.contents can only be a Buffer, a Stream, or null.'); + } + this._contents = val; + } +}); + +// TODO: should this be moved to vinyl-fs? +Object.defineProperty(File.prototype, 'relative', { + get: function() { + if (!this.base) throw new Error('No base specified! Can not get relative.'); + if (!this.path) throw new Error('No path specified! Can not get relative.'); + return path.relative(this.base, this.path); + }, + set: function() { + throw new Error('File.relative is generated from the base and path attributes. Do not modify it.'); + } +}); + +Object.defineProperty(File.prototype, 'path', { + get: function() { + return this.history[this.history.length - 1]; + }, + set: function(path) { + if (typeof path !== 'string') throw new Error('path should be string'); + + // record history only when path changed + if (path && path !== this.path) { + this.history.push(path); + } + } +}); + +module.exports = File; diff --git a/node_modules/vinyl-fs/node_modules/vinyl/lib/cloneBuffer.js b/node_modules/vinyl-fs/node_modules/vinyl/lib/cloneBuffer.js new file mode 100644 index 0000000..89f09ed --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/vinyl/lib/cloneBuffer.js @@ -0,0 +1,7 @@ +var Buffer = require('buffer').Buffer; + +module.exports = function(buf) { + var out = new Buffer(buf.length); + buf.copy(out); + return out; +}; diff --git a/node_modules/vinyl-fs/node_modules/vinyl/lib/inspectStream.js b/node_modules/vinyl-fs/node_modules/vinyl/lib/inspectStream.js new file mode 100644 index 0000000..d36df6f --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/vinyl/lib/inspectStream.js @@ -0,0 +1,11 @@ +var isStream = require('./isStream'); + +module.exports = function(stream) { + if (!isStream(stream)) return; + + var streamType = stream.constructor.name; + // avoid StreamStream + if (streamType === 'Stream') streamType = ''; + + return '<'+streamType+'Stream>'; +}; diff --git a/node_modules/vinyl-fs/node_modules/vinyl/lib/isBuffer.js b/node_modules/vinyl-fs/node_modules/vinyl/lib/isBuffer.js new file mode 100644 index 0000000..0e23782 --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/vinyl/lib/isBuffer.js @@ -0,0 +1,7 @@ +var buf = require('buffer'); +var Buffer = buf.Buffer; + +// could use Buffer.isBuffer but this is the same exact thing... +module.exports = function(o) { + return typeof o === 'object' && o instanceof Buffer; +}; \ No newline at end of file diff --git a/node_modules/vinyl-fs/node_modules/vinyl/lib/isNull.js b/node_modules/vinyl-fs/node_modules/vinyl/lib/isNull.js new file mode 100644 index 0000000..7f22c63 --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/vinyl/lib/isNull.js @@ -0,0 +1,3 @@ +module.exports = function(v) { + return v === null; +}; diff --git a/node_modules/vinyl-fs/node_modules/vinyl/lib/isStream.js b/node_modules/vinyl-fs/node_modules/vinyl/lib/isStream.js new file mode 100644 index 0000000..9ce0929 --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/vinyl/lib/isStream.js @@ -0,0 +1,5 @@ +var Stream = require('stream').Stream; + +module.exports = function(o) { + return !!o && o instanceof Stream; +}; \ No newline at end of file diff --git a/node_modules/vinyl-fs/node_modules/vinyl/package.json b/node_modules/vinyl-fs/node_modules/vinyl/package.json new file mode 100644 index 0000000..f694de1 --- /dev/null +++ b/node_modules/vinyl-fs/node_modules/vinyl/package.json @@ -0,0 +1,108 @@ +{ + "_args": [ + [ + { + "raw": "vinyl@^0.4.0", + "scope": null, + "escapedName": "vinyl", + "name": "vinyl", + "rawSpec": "^0.4.0", + "spec": ">=0.4.0 <0.5.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/vinyl-fs" + ] + ], + "_from": "vinyl@>=0.4.0 <0.5.0", + "_id": "vinyl@0.4.6", + "_inCache": true, + "_location": "/vinyl-fs/vinyl", + "_nodeVersion": "0.10.33", + "_npmUser": { + "name": "fractal", + "email": "contact@wearefractal.com" + }, + "_npmVersion": "2.1.6", + "_phantomChildren": {}, + "_requested": { + "raw": "vinyl@^0.4.0", + "scope": null, + "escapedName": "vinyl", + "name": "vinyl", + "rawSpec": "^0.4.0", + "spec": ">=0.4.0 <0.5.0", + "type": "range" + }, + "_requiredBy": [ + "/vinyl-fs" + ], + "_resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz", + "_shasum": "2f356c87a550a255461f36bbeb2a5ba8bf784847", + "_shrinkwrap": null, + "_spec": "vinyl@^0.4.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/vinyl-fs", + "author": { + "name": "Fractal", + "email": "contact@wearefractal.com", + "url": "http://wearefractal.com/" + }, + "bugs": { + "url": "https://github.com/wearefractal/vinyl/issues" + }, + "dependencies": { + "clone": "^0.2.0", + "clone-stats": "^0.0.1" + }, + "description": "A virtual file format", + "devDependencies": { + "buffer-equal": "0.0.1", + "coveralls": "^2.6.1", + "event-stream": "^3.1.0", + "istanbul": "^0.3.0", + "jshint": "^2.4.1", + "lodash.templatesettings": "^2.4.1", + "mocha": "^2.0.0", + "mocha-lcov-reporter": "^0.0.1", + "rimraf": "^2.2.5", + "should": "^4.0.4" + }, + "directories": {}, + "dist": { + "shasum": "2f356c87a550a255461f36bbeb2a5ba8bf784847", + "tarball": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz" + }, + "engines": { + "node": ">= 0.9" + }, + "files": [ + "index.js", + "lib" + ], + "gitHead": "8255a5f1de7fecb1cd5e7ba7ac1ec997395f6be1", + "homepage": "http://github.com/wearefractal/vinyl", + "licenses": [ + { + "type": "MIT", + "url": "http://github.com/wearefractal/vinyl/raw/master/LICENSE" + } + ], + "main": "./index.js", + "maintainers": [ + { + "name": "fractal", + "email": "contact@wearefractal.com" + } + ], + "name": "vinyl", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/wearefractal/vinyl.git" + }, + "scripts": { + "coveralls": "istanbul cover _mocha -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage", + "test": "mocha --reporter spec && jshint lib" + }, + "version": "0.4.6" +} diff --git a/node_modules/vinyl-fs/package.json b/node_modules/vinyl-fs/package.json new file mode 100644 index 0000000..faef5f6 --- /dev/null +++ b/node_modules/vinyl-fs/package.json @@ -0,0 +1,124 @@ +{ + "_args": [ + [ + { + "raw": "vinyl-fs@^0.3.0", + "scope": null, + "escapedName": "vinyl-fs", + "name": "vinyl-fs", + "rawSpec": "^0.3.0", + "spec": ">=0.3.0 <0.4.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/gulp" + ] + ], + "_from": "vinyl-fs@>=0.3.0 <0.4.0", + "_id": "vinyl-fs@0.3.14", + "_inCache": true, + "_location": "/vinyl-fs", + "_nodeVersion": "0.10.36", + "_npmUser": { + "name": "phated", + "email": "blaine@iceddev.com" + }, + "_npmVersion": "2.14.3", + "_phantomChildren": { + "clone-stats": "0.0.1", + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "natives": "1.1.0", + "string_decoder": "0.10.31", + "xtend": "4.0.1" + }, + "_requested": { + "raw": "vinyl-fs@^0.3.0", + "scope": null, + "escapedName": "vinyl-fs", + "name": "vinyl-fs", + "rawSpec": "^0.3.0", + "spec": ">=0.3.0 <0.4.0", + "type": "range" + }, + "_requiredBy": [ + "/gulp" + ], + "_resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-0.3.14.tgz", + "_shasum": "9a6851ce1cac1c1cea5fe86c0931d620c2cfa9e6", + "_shrinkwrap": null, + "_spec": "vinyl-fs@^0.3.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/gulp", + "author": { + "name": "Fractal", + "email": "contact@wearefractal.com", + "url": "http://wearefractal.com/" + }, + "bugs": { + "url": "https://github.com/wearefractal/vinyl-fs/issues" + }, + "dependencies": { + "defaults": "^1.0.0", + "glob-stream": "^3.1.5", + "glob-watcher": "^0.0.6", + "graceful-fs": "^3.0.0", + "mkdirp": "^0.5.0", + "strip-bom": "^1.0.0", + "through2": "^0.6.1", + "vinyl": "^0.4.0" + }, + "description": "Vinyl adapter for the file system", + "devDependencies": { + "buffer-equal": "^0.0.1", + "coveralls": "^2.6.1", + "istanbul": "^0.3.0", + "jshint": "^2.4.1", + "mocha": "^2.0.0", + "mocha-lcov-reporter": "^0.0.1", + "rimraf": "^2.2.5", + "should": "^4.0.0", + "sinon": "^1.10.3" + }, + "directories": {}, + "dist": { + "shasum": "9a6851ce1cac1c1cea5fe86c0931d620c2cfa9e6", + "tarball": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-0.3.14.tgz" + }, + "engines": { + "node": ">= 0.10" + }, + "files": [ + "index.js", + "lib" + ], + "gitHead": "1e026b90df987b6da0ca7da941fd61a7cd1e6d8f", + "homepage": "http://github.com/wearefractal/vinyl-fs", + "licenses": [ + { + "type": "MIT", + "url": "http://github.com/wearefractal/vinyl-fs/raw/master/LICENSE" + } + ], + "main": "./index.js", + "maintainers": [ + { + "name": "fractal", + "email": "contact@wearefractal.com" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + } + ], + "name": "vinyl-fs", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/wearefractal/vinyl-fs.git" + }, + "scripts": { + "coveralls": "istanbul cover _mocha -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage", + "test": "mocha --reporter spec && jshint lib" + }, + "version": "0.3.14" +} diff --git a/node_modules/vinyl/LICENSE b/node_modules/vinyl/LICENSE new file mode 100644 index 0000000..4f482f9 --- /dev/null +++ b/node_modules/vinyl/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2013 Fractal + +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. diff --git a/node_modules/vinyl/README.md b/node_modules/vinyl/README.md new file mode 100644 index 0000000..2d57d85 --- /dev/null +++ b/node_modules/vinyl/README.md @@ -0,0 +1,195 @@ +# vinyl [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status](https://david-dm.org/wearefractal/vinyl.png?theme=shields.io)](https://david-dm.org/wearefractal/vinyl) +## Information +











    Packagevinyl
    DescriptionA virtual file format
    Node Version>= 0.9
    + +## What is this? +Read this for more info about how this plays into the grand scheme of things [https://medium.com/@eschoff/3828e8126466](https://medium.com/@eschoff/3828e8126466) + +## File + +```javascript +var File = require('vinyl'); + +var coffeeFile = new File({ + cwd: "/", + base: "/test/", + path: "/test/file.coffee", + contents: new Buffer("test = 123") +}); +``` + +### isVinyl +When checking if an object is a vinyl file, you should not use instanceof. Use the isVinyl function instead. + +```js +var File = require('vinyl'); + +var dummy = new File({stuff}); +var notAFile = {}; + +File.isVinyl(dummy); // true +File.isVinyl(notAFile); // false +``` + +### constructor(options) +#### options.cwd +Type: `String`

    Default: `process.cwd()` + +#### options.base +Used for relative pathing. Typically where a glob starts. + +Type: `String`

    Default: `options.cwd` + +#### options.path +Full path to the file. + +Type: `String`

    Default: `undefined` + +#### options.history +Path history. Has no effect if `options.path` is passed. + +Type: `Array`

    Default: `options.path ? [options.path] : []` + +#### options.stat +The result of an fs.stat call. See [fs.Stats](http://nodejs.org/api/fs.html#fs_class_fs_stats) for more information. + +Type: `fs.Stats`

    Default: `null` + +#### options.contents +File contents. + +Type: `Buffer, Stream, or null`

    Default: `null` + +### isBuffer() +Returns true if file.contents is a Buffer. + +### isStream() +Returns true if file.contents is a Stream. + +### isNull() +Returns true if file.contents is null. + +### clone([opt]) +Returns a new File object with all attributes cloned.
    By default custom attributes are deep-cloned. + +If opt or opt.deep is false, custom attributes will not be deep-cloned. + +If opt.contents is false, it will copy file.contents Buffer's reference. + +### pipe(stream[, opt]) +If file.contents is a Buffer, it will write it to the stream. + +If file.contents is a Stream, it will pipe it to the stream. + +If file.contents is null, it will do nothing. + +If opt.end is false, the destination stream will not be ended (same as node core). + +Returns the stream. + +### inspect() +Returns a pretty String interpretation of the File. Useful for console.log. + +### contents +The [Stream](https://nodejs.org/api/stream.html#stream_stream) or [Buffer](https://nodejs.org/api/buffer.html#buffer_class_buffer) of the file as it was passed in via options, or as the result of modification. + +For example: + +```js +if (file.isBuffer()) { + console.log(file.contents.toString()); // logs out the string of contents +} +``` + +### path +Absolute pathname string or `undefined`. Setting to a different value pushes the old value to `history`. + +### history +Array of `path` values the file object has had, from `history[0]` (original) through `history[history.length - 1]` (current). `history` and its elements should normally be treated as read-only and only altered indirectly by setting `path`. + +### relative +Returns path.relative for the file base and file path. + +Example: + +```javascript +var file = new File({ + cwd: "/", + base: "/test/", + path: "/test/file.coffee" +}); + +console.log(file.relative); // file.coffee +``` + +### dirname +Gets and sets path.dirname for the file path. + +Example: + +```javascript +var file = new File({ + cwd: "/", + base: "/test/", + path: "/test/file.coffee" +}); + +console.log(file.dirname); // /test + +file.dirname = '/specs'; + +console.log(file.dirname); // /specs +console.log(file.path); // /specs/file.coffee +` +``` + +### basename +Gets and sets path.basename for the file path. + +Example: + +```javascript +var file = new File({ + cwd: "/", + base: "/test/", + path: "/test/file.coffee" +}); + +console.log(file.basename); // file.coffee + +file.basename = 'file.js'; + +console.log(file.basename); // file.js +console.log(file.path); // /test/file.js +` +``` + +### extname +Gets and sets path.extname for the file path. + +Example: + +```javascript +var file = new File({ + cwd: "/", + base: "/test/", + path: "/test/file.coffee" +}); + +console.log(file.extname); // .coffee + +file.extname = '.js'; + +console.log(file.extname); // .js +console.log(file.path); // /test/file.js +` +``` + +[npm-url]: https://npmjs.org/package/vinyl +[npm-image]: https://badge.fury.io/js/vinyl.png +[travis-url]: https://travis-ci.org/wearefractal/vinyl +[travis-image]: https://travis-ci.org/wearefractal/vinyl.png?branch=master +[coveralls-url]: https://coveralls.io/r/wearefractal/vinyl +[coveralls-image]: https://coveralls.io/repos/wearefractal/vinyl/badge.png +[depstat-url]: https://david-dm.org/wearefractal/vinyl +[depstat-image]: https://david-dm.org/wearefractal/vinyl.png diff --git a/node_modules/vinyl/index.js b/node_modules/vinyl/index.js new file mode 100644 index 0000000..c8f113f --- /dev/null +++ b/node_modules/vinyl/index.js @@ -0,0 +1,213 @@ +var path = require('path'); +var clone = require('clone'); +var cloneStats = require('clone-stats'); +var cloneBuffer = require('./lib/cloneBuffer'); +var isBuffer = require('./lib/isBuffer'); +var isStream = require('./lib/isStream'); +var isNull = require('./lib/isNull'); +var inspectStream = require('./lib/inspectStream'); +var Stream = require('stream'); +var replaceExt = require('replace-ext'); + +function File(file) { + if (!file) file = {}; + + // record path change + var history = file.path ? [file.path] : file.history; + this.history = history || []; + + this.cwd = file.cwd || process.cwd(); + this.base = file.base || this.cwd; + + // stat = files stats object + this.stat = file.stat || null; + + // contents = stream, buffer, or null if not read + this.contents = file.contents || null; + + this._isVinyl = true; +} + +File.prototype.isBuffer = function() { + return isBuffer(this.contents); +}; + +File.prototype.isStream = function() { + return isStream(this.contents); +}; + +File.prototype.isNull = function() { + return isNull(this.contents); +}; + +// TODO: should this be moved to vinyl-fs? +File.prototype.isDirectory = function() { + return this.isNull() && this.stat && this.stat.isDirectory(); +}; + +File.prototype.clone = function(opt) { + if (typeof opt === 'boolean') { + opt = { + deep: opt, + contents: true + }; + } else if (!opt) { + opt = { + deep: true, + contents: true + }; + } else { + opt.deep = opt.deep === true; + opt.contents = opt.contents !== false; + } + + // clone our file contents + var contents; + if (this.isStream()) { + contents = this.contents.pipe(new Stream.PassThrough()); + this.contents = this.contents.pipe(new Stream.PassThrough()); + } else if (this.isBuffer()) { + contents = opt.contents ? cloneBuffer(this.contents) : this.contents; + } + + var file = new File({ + cwd: this.cwd, + base: this.base, + stat: (this.stat ? cloneStats(this.stat) : null), + history: this.history.slice(), + contents: contents + }); + + // clone our custom properties + Object.keys(this).forEach(function(key) { + // ignore built-in fields + if (key === '_contents' || key === 'stat' || + key === 'history' || key === 'path' || + key === 'base' || key === 'cwd') { + return; + } + file[key] = opt.deep ? clone(this[key], true) : this[key]; + }, this); + return file; +}; + +File.prototype.pipe = function(stream, opt) { + if (!opt) opt = {}; + if (typeof opt.end === 'undefined') opt.end = true; + + if (this.isStream()) { + return this.contents.pipe(stream, opt); + } + if (this.isBuffer()) { + if (opt.end) { + stream.end(this.contents); + } else { + stream.write(this.contents); + } + return stream; + } + + // isNull + if (opt.end) stream.end(); + return stream; +}; + +File.prototype.inspect = function() { + var inspect = []; + + // use relative path if possible + var filePath = (this.base && this.path) ? this.relative : this.path; + + if (filePath) { + inspect.push('"'+filePath+'"'); + } + + if (this.isBuffer()) { + inspect.push(this.contents.inspect()); + } + + if (this.isStream()) { + inspect.push(inspectStream(this.contents)); + } + + return ''; +}; + +File.isVinyl = function(file) { + return file && file._isVinyl === true; +}; + +// virtual attributes +// or stuff with extra logic +Object.defineProperty(File.prototype, 'contents', { + get: function() { + return this._contents; + }, + set: function(val) { + if (!isBuffer(val) && !isStream(val) && !isNull(val)) { + throw new Error('File.contents can only be a Buffer, a Stream, or null.'); + } + this._contents = val; + } +}); + +// TODO: should this be moved to vinyl-fs? +Object.defineProperty(File.prototype, 'relative', { + get: function() { + if (!this.base) throw new Error('No base specified! Can not get relative.'); + if (!this.path) throw new Error('No path specified! Can not get relative.'); + return path.relative(this.base, this.path); + }, + set: function() { + throw new Error('File.relative is generated from the base and path attributes. Do not modify it.'); + } +}); + +Object.defineProperty(File.prototype, 'dirname', { + get: function() { + if (!this.path) throw new Error('No path specified! Can not get dirname.'); + return path.dirname(this.path); + }, + set: function(dirname) { + if (!this.path) throw new Error('No path specified! Can not set dirname.'); + this.path = path.join(dirname, path.basename(this.path)); + } +}); + +Object.defineProperty(File.prototype, 'basename', { + get: function() { + if (!this.path) throw new Error('No path specified! Can not get basename.'); + return path.basename(this.path); + }, + set: function(basename) { + if (!this.path) throw new Error('No path specified! Can not set basename.'); + this.path = path.join(path.dirname(this.path), basename); + } +}); + +Object.defineProperty(File.prototype, 'extname', { + get: function() { + if (!this.path) throw new Error('No path specified! Can not get extname.'); + return path.extname(this.path); + }, + set: function(extname) { + if (!this.path) throw new Error('No path specified! Can not set extname.'); + this.path = replaceExt(this.path, extname); + } +}); + +Object.defineProperty(File.prototype, 'path', { + get: function() { + return this.history[this.history.length - 1]; + }, + set: function(path) { + if (typeof path !== 'string') throw new Error('path should be string'); + + // record history only when path changed + if (path && path !== this.path) { + this.history.push(path); + } + } +}); + +module.exports = File; diff --git a/node_modules/vinyl/lib/cloneBuffer.js b/node_modules/vinyl/lib/cloneBuffer.js new file mode 100644 index 0000000..89f09ed --- /dev/null +++ b/node_modules/vinyl/lib/cloneBuffer.js @@ -0,0 +1,7 @@ +var Buffer = require('buffer').Buffer; + +module.exports = function(buf) { + var out = new Buffer(buf.length); + buf.copy(out); + return out; +}; diff --git a/node_modules/vinyl/lib/inspectStream.js b/node_modules/vinyl/lib/inspectStream.js new file mode 100644 index 0000000..d36df6f --- /dev/null +++ b/node_modules/vinyl/lib/inspectStream.js @@ -0,0 +1,11 @@ +var isStream = require('./isStream'); + +module.exports = function(stream) { + if (!isStream(stream)) return; + + var streamType = stream.constructor.name; + // avoid StreamStream + if (streamType === 'Stream') streamType = ''; + + return '<'+streamType+'Stream>'; +}; diff --git a/node_modules/vinyl/lib/isBuffer.js b/node_modules/vinyl/lib/isBuffer.js new file mode 100644 index 0000000..8a767d1 --- /dev/null +++ b/node_modules/vinyl/lib/isBuffer.js @@ -0,0 +1 @@ +module.exports = require('buffer').Buffer.isBuffer; diff --git a/node_modules/vinyl/lib/isNull.js b/node_modules/vinyl/lib/isNull.js new file mode 100644 index 0000000..7f22c63 --- /dev/null +++ b/node_modules/vinyl/lib/isNull.js @@ -0,0 +1,3 @@ +module.exports = function(v) { + return v === null; +}; diff --git a/node_modules/vinyl/lib/isStream.js b/node_modules/vinyl/lib/isStream.js new file mode 100644 index 0000000..9ce0929 --- /dev/null +++ b/node_modules/vinyl/lib/isStream.js @@ -0,0 +1,5 @@ +var Stream = require('stream').Stream; + +module.exports = function(o) { + return !!o && o instanceof Stream; +}; \ No newline at end of file diff --git a/node_modules/vinyl/package.json b/node_modules/vinyl/package.json new file mode 100644 index 0000000..4ac2ba2 --- /dev/null +++ b/node_modules/vinyl/package.json @@ -0,0 +1,107 @@ +{ + "_args": [ + [ + { + "raw": "vinyl@^0.5.0", + "scope": null, + "escapedName": "vinyl", + "name": "vinyl", + "rawSpec": "^0.5.0", + "spec": ">=0.5.0 <0.6.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/gulp-util" + ] + ], + "_from": "vinyl@>=0.5.0 <0.6.0", + "_id": "vinyl@0.5.3", + "_inCache": true, + "_location": "/vinyl", + "_nodeVersion": "2.5.0", + "_npmUser": { + "name": "fractal", + "email": "contact@wearefractal.com" + }, + "_npmVersion": "2.13.4", + "_phantomChildren": {}, + "_requested": { + "raw": "vinyl@^0.5.0", + "scope": null, + "escapedName": "vinyl", + "name": "vinyl", + "rawSpec": "^0.5.0", + "spec": ">=0.5.0 <0.6.0", + "type": "range" + }, + "_requiredBy": [ + "/gulp-util" + ], + "_resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", + "_shasum": "b0455b38fc5e0cf30d4325132e461970c2091cde", + "_shrinkwrap": null, + "_spec": "vinyl@^0.5.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/gulp-util", + "author": { + "name": "Fractal", + "email": "contact@wearefractal.com", + "url": "http://wearefractal.com/" + }, + "bugs": { + "url": "https://github.com/wearefractal/vinyl/issues" + }, + "dependencies": { + "clone": "^1.0.0", + "clone-stats": "^0.0.1", + "replace-ext": "0.0.1" + }, + "description": "A virtual file format", + "devDependencies": { + "buffer-equal": "0.0.1", + "event-stream": "^3.1.0", + "istanbul": "^0.3.0", + "istanbul-coveralls": "^1.0.1", + "jshint": "^2.4.1", + "lodash.templatesettings": "^3.1.0", + "mocha": "^2.0.0", + "rimraf": "^2.2.5", + "should": "^7.0.0" + }, + "directories": {}, + "dist": { + "shasum": "b0455b38fc5e0cf30d4325132e461970c2091cde", + "tarball": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz" + }, + "engines": { + "node": ">= 0.9" + }, + "files": [ + "index.js", + "lib" + ], + "gitHead": "6f19648bd67040bfd0dc755ad031e1e5e0b58429", + "homepage": "http://github.com/wearefractal/vinyl", + "license": "MIT", + "main": "./index.js", + "maintainers": [ + { + "name": "fractal", + "email": "contact@wearefractal.com" + }, + { + "name": "phated", + "email": "blaine@iceddev.com" + } + ], + "name": "vinyl", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/wearefractal/vinyl.git" + }, + "scripts": { + "coveralls": "istanbul cover _mocha && istanbul-coveralls", + "test": "mocha && jshint lib" + }, + "version": "0.5.3" +} diff --git a/node_modules/void-elements/.gitattributes b/node_modules/void-elements/.gitattributes new file mode 100644 index 0000000..176a458 --- /dev/null +++ b/node_modules/void-elements/.gitattributes @@ -0,0 +1 @@ +* text=auto diff --git a/node_modules/void-elements/.npmignore b/node_modules/void-elements/.npmignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/node_modules/void-elements/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/node_modules/void-elements/.travis.yml b/node_modules/void-elements/.travis.yml new file mode 100644 index 0000000..3c6757d --- /dev/null +++ b/node_modules/void-elements/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - '0.10' + - '0.11' diff --git a/node_modules/void-elements/LICENSE b/node_modules/void-elements/LICENSE new file mode 100644 index 0000000..2d3845b --- /dev/null +++ b/node_modules/void-elements/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2014 hemanth + +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. diff --git a/node_modules/void-elements/README.md b/node_modules/void-elements/README.md new file mode 100644 index 0000000..e8e0654 --- /dev/null +++ b/node_modules/void-elements/README.md @@ -0,0 +1,27 @@ +void-elements +============== + +### Array of "void elements" defined by the HTML specification + +Exports an Array of "void element" node names as defined by the HTML spec. + +The list is programatically generated from the [latest W3C HTML draft](http://www.w3.org/html/wg/drafts/html/master/syntax.html#void-elements). + +[![Build Status](https://img.shields.io/travis/jadejs/void-elements/master.svg?style=flat)](https://travis-ci.org/jadejs/void-elements) +[![Developing Dependency Status](https://img.shields.io/david/dev/jadejs/void-elements.svg?style=flat)](https://david-dm.org/jadejs/void-elements#info=devDependencies) +[![NPM version](https://img.shields.io/npm/v/void-elements.svg?style=flat)](https://www.npmjs.org/package/void-elements) + +Usage +----- + +```js +var voidElements = require('void-elements'); + +assert(voidElements.indexOf('span') === -1, ' is not a void element'); +assert(voidElements.indexOf('img') !== -1, ' is a void element'); +``` + +License +------- + +MIT diff --git a/node_modules/void-elements/index.js b/node_modules/void-elements/index.js new file mode 100644 index 0000000..363b624 --- /dev/null +++ b/node_modules/void-elements/index.js @@ -0,0 +1,23 @@ +/** + * This file automatically generated from `pre-publish.js`. + * Do not manually edit. + */ + +module.exports = { + "area": true, + "base": true, + "br": true, + "col": true, + "embed": true, + "hr": true, + "img": true, + "input": true, + "keygen": true, + "link": true, + "menuitem": true, + "meta": true, + "param": true, + "source": true, + "track": true, + "wbr": true +}; diff --git a/node_modules/void-elements/package.json b/node_modules/void-elements/package.json new file mode 100644 index 0000000..0d85517 --- /dev/null +++ b/node_modules/void-elements/package.json @@ -0,0 +1,92 @@ +{ + "_args": [ + [ + { + "raw": "void-elements@~2.0.1", + "scope": null, + "escapedName": "void-elements", + "name": "void-elements", + "rawSpec": "~2.0.1", + "spec": ">=2.0.1 <2.1.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/jade" + ] + ], + "_from": "void-elements@>=2.0.1 <2.1.0", + "_id": "void-elements@2.0.1", + "_inCache": true, + "_location": "/void-elements", + "_npmUser": { + "name": "hemanth", + "email": "hemanth.hm@gmail.com" + }, + "_npmVersion": "1.3.11", + "_phantomChildren": {}, + "_requested": { + "raw": "void-elements@~2.0.1", + "scope": null, + "escapedName": "void-elements", + "name": "void-elements", + "rawSpec": "~2.0.1", + "spec": ">=2.0.1 <2.1.0", + "type": "range" + }, + "_requiredBy": [ + "/jade" + ], + "_resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", + "_shasum": "c066afb582bb1cb4128d60ea92392e94d5e9dbec", + "_shrinkwrap": null, + "_spec": "void-elements@~2.0.1", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/jade", + "author": { + "name": "hemanth.hm" + }, + "bugs": { + "url": "https://github.com/hemanth/void-elements/issues" + }, + "dependencies": {}, + "description": "Array of \"void elements\" defined by the HTML specification.", + "devDependencies": { + "cheerio": "^0.18.0" + }, + "directories": {}, + "dist": { + "shasum": "c066afb582bb1cb4128d60ea92392e94d5e9dbec", + "tarball": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "homepage": "https://github.com/hemanth/void-elements", + "keywords": [ + "html", + "void", + "elements" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "hemanth", + "email": "hemanth.hm@gmail.com" + }, + { + "name": "forbeslindesay", + "email": "forbes@lindesay.co.uk" + } + ], + "name": "void-elements", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/hemanth/void-elements.git" + }, + "scripts": { + "prepublish": "node pre-publish.js > index.js", + "test": "node test" + }, + "version": "2.0.1" +} diff --git a/node_modules/void-elements/pre-publish.js b/node_modules/void-elements/pre-publish.js new file mode 100644 index 0000000..93218ab --- /dev/null +++ b/node_modules/void-elements/pre-publish.js @@ -0,0 +1,29 @@ +var cheerio = require('cheerio') + , http = require('http'); + +http.get('http://www.w3.org/html/wg/drafts/html/master/syntax.html', function (res) { + var str = ''; + res.setEncoding('utf8'); + res.on('data', function (buf) { + str += buf; + }).on('end', function () { + var $ = cheerio.load(str); + var codes = $('dfn#void-elements') + .parent() + .next() + .text() + .replace(/\s/gm,'') + .split(",") + .reduce(function (obj, code) { + obj[code] = true; + return obj; + }, {}); + + console.log('/**'); + console.log(' * This file automatically generated from `pre-publish.js`.'); + console.log(' * Do not manually edit.'); + console.log(' */'); + console.log(); + console.log('module.exports = %s;', JSON.stringify(codes, null, 2)); + }); +}); diff --git a/node_modules/void-elements/test/index.js b/node_modules/void-elements/test/index.js new file mode 100644 index 0000000..4d71973 --- /dev/null +++ b/node_modules/void-elements/test/index.js @@ -0,0 +1,5 @@ +var assert = require('assert'); +var voidElements = require('../'); +assert(!voidElements.span, ' is not a void element'); +assert(voidElements.img, ' is a void element'); +console.log('tests passed'); diff --git a/node_modules/which-module/CHANGELOG.md b/node_modules/which-module/CHANGELOG.md new file mode 100644 index 0000000..6c8f5f2 --- /dev/null +++ b/node_modules/which-module/CHANGELOG.md @@ -0,0 +1,11 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + + +# 1.0.0 (2016-06-06) + + +### Features + +* initial code ([08074cd](https://github.com/nexdrew/which-module/commit/08074cd)) diff --git a/node_modules/which-module/LICENSE b/node_modules/which-module/LICENSE new file mode 100644 index 0000000..ab601b6 --- /dev/null +++ b/node_modules/which-module/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2016, Contributors + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. diff --git a/node_modules/which-module/README.md b/node_modules/which-module/README.md new file mode 100644 index 0000000..a8c4bf8 --- /dev/null +++ b/node_modules/which-module/README.md @@ -0,0 +1,55 @@ +# which-module + +> Find the module object for something that was require()d + +[![Build Status](https://travis-ci.org/nexdrew/which-module.svg?branch=master)](https://travis-ci.org/nexdrew/which-module) +[![Coverage Status](https://coveralls.io/repos/github/nexdrew/which-module/badge.svg?branch=master)](https://coveralls.io/github/nexdrew/which-module?branch=master) +[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) + +Find the `module` object in `require.cache` for something that was `require()`d +or `import`ed - essentially a reverse `require()` lookup. + +Useful for libs that want to e.g. lookup a filename for a module or submodule +that it did not `require()` itself. + +## Install and Usage + +``` +npm install --save which-module +``` + +```js +const whichModule = require('which-module') + +console.log(whichModule(require('something'))) +// Module { +// id: '/path/to/project/node_modules/something/index.js', +// exports: [Function], +// parent: ..., +// filename: '/path/to/project/node_modules/something/index.js', +// loaded: true, +// children: [], +// paths: [ '/path/to/project/node_modules/something/node_modules', +// '/path/to/project/node_modules', +// '/path/to/node_modules', +// '/path/node_modules', +// '/node_modules' ] } +``` + +## API + +### `whichModule(exported)` + +Return the [`module` object](https://nodejs.org/api/modules.html#modules_the_module_object), +if any, that represents the given argument in the `require.cache`. + +`exported` can be anything that was previously `require()`d or `import`ed as a +module, submodule, or dependency - which means `exported` is identical to the +`module.exports` returned by this method. + +If `exported` did not come from the `exports` of a `module` in `require.cache`, +then this method returns `null`. + +## License + +ISC © Contributors diff --git a/node_modules/which-module/index.js b/node_modules/which-module/index.js new file mode 100644 index 0000000..45559b7 --- /dev/null +++ b/node_modules/which-module/index.js @@ -0,0 +1,9 @@ +'use strict' + +module.exports = function whichModule (exported) { + for (var i = 0, files = Object.keys(require.cache), mod; i < files.length; i++) { + mod = require.cache[files[i]] + if (mod.exports === exported) return mod + } + return null +} diff --git a/node_modules/which-module/package.json b/node_modules/which-module/package.json new file mode 100644 index 0000000..0d54214 --- /dev/null +++ b/node_modules/which-module/package.json @@ -0,0 +1,104 @@ +{ + "_args": [ + [ + { + "raw": "which-module@^1.0.0", + "scope": null, + "escapedName": "which-module", + "name": "which-module", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/sequelize-cli/node_modules/yargs" + ] + ], + "_from": "which-module@>=1.0.0 <2.0.0", + "_id": "which-module@1.0.0", + "_inCache": true, + "_location": "/which-module", + "_nodeVersion": "5.11.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/which-module-1.0.0.tgz_1465192451403_0.19380306638777256" + }, + "_npmUser": { + "name": "nexdrew", + "email": "andrew@npmjs.com" + }, + "_npmVersion": "3.8.8", + "_phantomChildren": {}, + "_requested": { + "raw": "which-module@^1.0.0", + "scope": null, + "escapedName": "which-module", + "name": "which-module", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/sequelize-cli/yargs" + ], + "_resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", + "_shasum": "bba63ca861948994ff307736089e3b96026c2a4f", + "_shrinkwrap": null, + "_spec": "which-module@^1.0.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/sequelize-cli/node_modules/yargs", + "author": { + "name": "nexdrew" + }, + "bugs": { + "url": "https://github.com/nexdrew/which-module/issues" + }, + "dependencies": {}, + "description": "Find the module object for something that was require()d", + "devDependencies": { + "ava": "^0.15.2", + "coveralls": "^2.11.9", + "nyc": "^6.4.4", + "standard": "^7.1.2", + "standard-version": "^2.3.0" + }, + "directories": {}, + "dist": { + "shasum": "bba63ca861948994ff307736089e3b96026c2a4f", + "tarball": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz" + }, + "files": [ + "index.js" + ], + "gitHead": "a5b7492798fac7e484fd8812d3d3a1138bb08784", + "homepage": "https://github.com/nexdrew/which-module#readme", + "keywords": [ + "which", + "module", + "exports", + "filename", + "require", + "reverse", + "lookup" + ], + "license": "ISC", + "main": "index.js", + "maintainers": [ + { + "name": "nexdrew", + "email": "andrew@npmjs.com" + } + ], + "name": "which-module", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/nexdrew/which-module.git" + }, + "scripts": { + "coverage": "nyc report --reporter=text-lcov | coveralls", + "pretest": "standard", + "release": "standard-version", + "test": "nyc ava" + }, + "version": "1.0.0" +} diff --git a/node_modules/which/CHANGELOG.md b/node_modules/which/CHANGELOG.md new file mode 100644 index 0000000..c44cfbe --- /dev/null +++ b/node_modules/which/CHANGELOG.md @@ -0,0 +1,142 @@ +# Changes + + +## v1.2.14 + +* appveyor: drop node 5 and 0.x +* travis-ci: add node 6, drop 0.x + +## v1.2.13 + +* test: Pass missing option to pass on windows +* update tap +* update isexe to 2.0.0 +* neveragain.tech pledge request + +## v1.2.12 + +* Removed unused require + +## v1.2.11 + +* Prevent changelog script from being included in package + +## v1.2.10 + +* Use env.PATH only, not env.Path + +## v1.2.9 + +* fix for paths starting with ../ +* Remove unused `is-absolute` module + +## v1.2.8 + +* bullet items in changelog that contain (but don't start with) # + +## v1.2.7 + +* strip 'update changelog' changelog entries out of changelog + +## v1.2.6 + +* make the changelog bulleted + +## v1.2.5 + +* make a changelog, and keep it up to date +* don't include tests in package +* Properly handle relative-path executables +* appveyor +* Attach error code to Not Found error +* Make tests pass on Windows + +## v1.2.4 + +* Fix typo + +## v1.2.3 + +* update isexe, fix regression in pathExt handling + +## v1.2.2 + +* update deps, use isexe module, test windows + +## v1.2.1 + +* Sometimes windows PATH entries are quoted +* Fixed a bug in the check for group and user mode bits. This bug was introduced during refactoring for supporting strict mode. +* doc cli + +## v1.2.0 + +* Add support for opt.all and -as cli flags +* test the bin +* update travis +* Allow checking for multiple programs in bin/which +* tap 2 + +## v1.1.2 + +* travis +* Refactored and fixed undefined error on Windows +* Support strict mode + +## v1.1.1 + +* test +g exes against secondary groups, if available +* Use windows exe semantics on cygwin & msys +* cwd should be first in path on win32, not last +* Handle lower-case 'env.Path' on Windows +* Update docs +* use single-quotes + +## v1.1.0 + +* Add tests, depend on is-absolute + +## v1.0.9 + +* which.js: root is allowed to execute files owned by anyone + +## v1.0.8 + +* don't use graceful-fs + +## v1.0.7 + +* add license to package.json + +## v1.0.6 + +* isc license + +## 1.0.5 + +* Awful typo + +## 1.0.4 + +* Test for path absoluteness properly +* win: Allow '' as a pathext if cmd has a . in it + +## 1.0.3 + +* Remove references to execPath +* Make `which.sync()` work on Windows by honoring the PATHEXT variable. +* Make `isExe()` always return true on Windows. +* MIT + +## 1.0.2 + +* Only files can be exes + +## 1.0.1 + +* Respect the PATHEXT env for win32 support +* should 0755 the bin +* binary +* guts +* package +* 1st diff --git a/node_modules/which/LICENSE b/node_modules/which/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/node_modules/which/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/which/README.md b/node_modules/which/README.md new file mode 100644 index 0000000..7f679d5 --- /dev/null +++ b/node_modules/which/README.md @@ -0,0 +1,48 @@ +# which + +Like the unix `which` utility. + +Finds the first instance of a specified executable in the PATH +environment variable. Does not cache the results, so `hash -r` is not +needed when the PATH changes. + +## USAGE + +```javascript +var which = require('which') + +// async usage +which('node', function (er, resolvedPath) { + // er is returned if no "node" is found on the PATH + // if it is found, then the absolute path to the exec is returned +}) + +// sync usage +// throws if not found +var resolved = which.sync('node') + +// Pass options to override the PATH and PATHEXT environment vars. +which('node', { path: someOtherPath }, function (er, resolved) { + if (er) + throw er + console.log('found at %j', resolved) +}) +``` + +## CLI USAGE + +Same as the BSD `which(1)` binary. + +``` +usage: which [-as] program ... +``` + +## OPTIONS + +You may pass an options object as the second argument. + +- `path`: Use instead of the `PATH` environment variable. +- `pathExt`: Use instead of the `PATHEXT` environment variable. +- `all`: Return all matches, instead of just the first one. Note that + this means the function returns an array of strings instead of a + single string. diff --git a/node_modules/which/bin/which b/node_modules/which/bin/which new file mode 100755 index 0000000..7cee372 --- /dev/null +++ b/node_modules/which/bin/which @@ -0,0 +1,52 @@ +#!/usr/bin/env node +var which = require("../") +if (process.argv.length < 3) + usage() + +function usage () { + console.error('usage: which [-as] program ...') + process.exit(1) +} + +var all = false +var silent = false +var dashdash = false +var args = process.argv.slice(2).filter(function (arg) { + if (dashdash || !/^-/.test(arg)) + return true + + if (arg === '--') { + dashdash = true + return false + } + + var flags = arg.substr(1).split('') + for (var f = 0; f < flags.length; f++) { + var flag = flags[f] + switch (flag) { + case 's': + silent = true + break + case 'a': + all = true + break + default: + console.error('which: illegal option -- ' + flag) + usage() + } + } + return false +}) + +process.exit(args.reduce(function (pv, current) { + try { + var f = which.sync(current, { all: all }) + if (all) + f = f.join('\n') + if (!silent) + console.log(f) + return pv; + } catch (e) { + return 1; + } +}, 0)) diff --git a/node_modules/which/package.json b/node_modules/which/package.json new file mode 100644 index 0000000..d23d6c5 --- /dev/null +++ b/node_modules/which/package.json @@ -0,0 +1,101 @@ +{ + "_args": [ + [ + { + "raw": "which@^1.2.9", + "scope": null, + "escapedName": "which", + "name": "which", + "rawSpec": "^1.2.9", + "spec": ">=1.2.9 <2.0.0", + "type": "range" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/cross-spawn" + ] + ], + "_from": "which@>=1.2.9 <2.0.0", + "_id": "which@1.2.14", + "_inCache": true, + "_location": "/which", + "_nodeVersion": "8.0.0-pre", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/which-1.2.14.tgz_1490248705131_0.02947138948366046" + }, + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "_npmVersion": "4.4.2", + "_phantomChildren": {}, + "_requested": { + "raw": "which@^1.2.9", + "scope": null, + "escapedName": "which", + "name": "which", + "rawSpec": "^1.2.9", + "spec": ">=1.2.9 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/cross-spawn", + "/global-prefix" + ], + "_resolved": "https://registry.npmjs.org/which/-/which-1.2.14.tgz", + "_shasum": "9a87c4378f03e827cecaf1acdf56c736c01c14e5", + "_shrinkwrap": null, + "_spec": "which@^1.2.9", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/cross-spawn", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me" + }, + "bin": { + "which": "./bin/which" + }, + "bugs": { + "url": "https://github.com/isaacs/node-which/issues" + }, + "dependencies": { + "isexe": "^2.0.0" + }, + "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", + "devDependencies": { + "mkdirp": "^0.5.0", + "rimraf": "^2.3.3", + "tap": "^10.3.0" + }, + "directories": {}, + "dist": { + "shasum": "9a87c4378f03e827cecaf1acdf56c736c01c14e5", + "tarball": "https://registry.npmjs.org/which/-/which-1.2.14.tgz" + }, + "files": [ + "which.js", + "bin/which" + ], + "gitHead": "ae4f02dfacb208fbb19beab08e7946c4e3d524dd", + "homepage": "https://github.com/isaacs/node-which#readme", + "license": "ISC", + "main": "which.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "which", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-which.git" + }, + "scripts": { + "changelog": "bash gen-changelog.sh", + "postversion": "npm run changelog && git add CHANGELOG.md && git commit -m 'update changelog - '${npm_package_version}", + "test": "tap test/*.js --cov" + }, + "version": "1.2.14" +} diff --git a/node_modules/which/which.js b/node_modules/which/which.js new file mode 100644 index 0000000..70d974c --- /dev/null +++ b/node_modules/which/which.js @@ -0,0 +1,132 @@ +module.exports = which +which.sync = whichSync + +var isWindows = process.platform === 'win32' || + process.env.OSTYPE === 'cygwin' || + process.env.OSTYPE === 'msys' + +var path = require('path') +var COLON = isWindows ? ';' : ':' +var isexe = require('isexe') + +function getNotFoundError (cmd) { + var er = new Error('not found: ' + cmd) + er.code = 'ENOENT' + + return er +} + +function getPathInfo (cmd, opt) { + var colon = opt.colon || COLON + var pathEnv = opt.path || process.env.PATH || '' + var pathExt = [''] + + pathEnv = pathEnv.split(colon) + + var pathExtExe = '' + if (isWindows) { + pathEnv.unshift(process.cwd()) + pathExtExe = (opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM') + pathExt = pathExtExe.split(colon) + + + // Always test the cmd itself first. isexe will check to make sure + // it's found in the pathExt set. + if (cmd.indexOf('.') !== -1 && pathExt[0] !== '') + pathExt.unshift('') + } + + // If it has a slash, then we don't bother searching the pathenv. + // just check the file itself, and that's it. + if (cmd.match(/\//) || isWindows && cmd.match(/\\/)) + pathEnv = [''] + + return { + env: pathEnv, + ext: pathExt, + extExe: pathExtExe + } +} + +function which (cmd, opt, cb) { + if (typeof opt === 'function') { + cb = opt + opt = {} + } + + var info = getPathInfo(cmd, opt) + var pathEnv = info.env + var pathExt = info.ext + var pathExtExe = info.extExe + var found = [] + + ;(function F (i, l) { + if (i === l) { + if (opt.all && found.length) + return cb(null, found) + else + return cb(getNotFoundError(cmd)) + } + + var pathPart = pathEnv[i] + if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') + pathPart = pathPart.slice(1, -1) + + var p = path.join(pathPart, cmd) + if (!pathPart && (/^\.[\\\/]/).test(cmd)) { + p = cmd.slice(0, 2) + p + } + ;(function E (ii, ll) { + if (ii === ll) return F(i + 1, l) + var ext = pathExt[ii] + isexe(p + ext, { pathExt: pathExtExe }, function (er, is) { + if (!er && is) { + if (opt.all) + found.push(p + ext) + else + return cb(null, p + ext) + } + return E(ii + 1, ll) + }) + })(0, pathExt.length) + })(0, pathEnv.length) +} + +function whichSync (cmd, opt) { + opt = opt || {} + + var info = getPathInfo(cmd, opt) + var pathEnv = info.env + var pathExt = info.ext + var pathExtExe = info.extExe + var found = [] + + for (var i = 0, l = pathEnv.length; i < l; i ++) { + var pathPart = pathEnv[i] + if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') + pathPart = pathPart.slice(1, -1) + + var p = path.join(pathPart, cmd) + if (!pathPart && /^\.[\\\/]/.test(cmd)) { + p = cmd.slice(0, 2) + p + } + for (var j = 0, ll = pathExt.length; j < ll; j ++) { + var cur = p + pathExt[j] + var is + try { + is = isexe.sync(cur, { pathExt: pathExtExe }) + if (is) { + if (opt.all) + found.push(cur) + else + return cur + } + } catch (ex) {} + } + } + + if (opt.all && found.length) + return found + + throw getNotFoundError(cmd) +} diff --git a/node_modules/window-size/LICENSE-MIT b/node_modules/window-size/LICENSE-MIT new file mode 100644 index 0000000..6c12c0a --- /dev/null +++ b/node_modules/window-size/LICENSE-MIT @@ -0,0 +1,22 @@ +Copyright (c) 2014 Jon Schlinkert + +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. diff --git a/node_modules/window-size/README.md b/node_modules/window-size/README.md new file mode 100644 index 0000000..1abfdb5 --- /dev/null +++ b/node_modules/window-size/README.md @@ -0,0 +1,26 @@ +# window-size [![NPM version](https://badge.fury.io/js/window-size.png)](http://badge.fury.io/js/window-size) + +> Reliable way to to get the height and width of the terminal/console in a node.js environment. + +## Install + +### [npm](npmjs.org) + +```bash +npm i window-size --save +``` + +```javascript +var size = require('window-size'); +size.height; // "80" (rows) +size.width; // "25" (columns) +``` + +## Author + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License +Copyright (c) 2014 Jon Schlinkert +Licensed under the MIT license. \ No newline at end of file diff --git a/node_modules/window-size/index.js b/node_modules/window-size/index.js new file mode 100644 index 0000000..14a9442 --- /dev/null +++ b/node_modules/window-size/index.js @@ -0,0 +1,33 @@ +/* + * window-size + * https://github.com/jonschlinkert/window-size + * + * Copyright (c) 2014 Jon Schlinkert + * Licensed under the MIT license. + */ + +const tty = require('tty') + +module.exports = (function() { + var width; + var height; + + if(tty.isatty(1) && tty.isatty(2)) { + if(process.stdout.getWindowSize) { + width = process.stdout.getWindowSize(1)[0]; + height = process.stdout.getWindowSize(1)[1]; + } else if (tty.getWindowSize) { + width = tty.getWindowSize()[1]; + height = tty.getWindowSize()[0]; + } else if (process.stdout.columns && process.stdout.rows) { + height = process.stdout.columns; + width = process.stdout.rows; + } + } else { + new Error('Error: could not get window size with tty or process.stdout'); + } + return { + height: height, + width: width + } +})(); \ No newline at end of file diff --git a/node_modules/window-size/package.json b/node_modules/window-size/package.json new file mode 100644 index 0000000..e6cefe0 --- /dev/null +++ b/node_modules/window-size/package.json @@ -0,0 +1,89 @@ +{ + "_args": [ + [ + { + "raw": "window-size@0.1.0", + "scope": null, + "escapedName": "window-size", + "name": "window-size", + "rawSpec": "0.1.0", + "spec": "0.1.0", + "type": "version" + }, + "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/yargs" + ] + ], + "_from": "window-size@0.1.0", + "_id": "window-size@0.1.0", + "_inCache": true, + "_location": "/window-size", + "_npmUser": { + "name": "jonschlinkert", + "email": "github@sellside.com" + }, + "_npmVersion": "1.3.24", + "_phantomChildren": {}, + "_requested": { + "raw": "window-size@0.1.0", + "scope": null, + "escapedName": "window-size", + "name": "window-size", + "rawSpec": "0.1.0", + "spec": "0.1.0", + "type": "version" + }, + "_requiredBy": [ + "/yargs" + ], + "_resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "_shasum": "5438cd2ea93b202efa3a19fe8887aee7c94f9c9d", + "_shrinkwrap": null, + "_spec": "window-size@0.1.0", + "_where": "/home/ridho/Desktop/HACTIV8/phase-2/week-1/day-1/api-basic/node_modules/yargs", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/window-size/issues" + }, + "dependencies": {}, + "description": "Reliable way to to get the height and width of the terminal/console in a node.js environment.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "5438cd2ea93b202efa3a19fe8887aee7c94f9c9d", + "tarball": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz" + }, + "engines": { + "node": ">= 0.8.0" + }, + "homepage": "https://github.com/jonschlinkert/window-size", + "keywords": [ + "window", + "console", + "terminal", + "tty" + ], + "licenses": [ + { + "type": "MIT", + "url": "https://github.com/jonschlinkert/window-size/blob/master/LICENSE-MIT" + } + ], + "main": "index.js", + "maintainers": [ + { + "name": "jonschlinkert", + "email": "github@sellside.com" + } + ], + "name": "window-size", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/window-size.git" + }, + "version": "0.1.0" +} diff --git a/node_modules/with/.npmignore b/node_modules/with/.npmignore new file mode 100644 index 0000000..cefaa67 --- /dev/null +++ b/node_modules/with/.npmignore @@ -0,0 +1,2 @@ +test/ +.travis.yml \ No newline at end of file diff --git a/node_modules/with/LICENSE b/node_modules/with/LICENSE new file mode 100644 index 0000000..dfb0b19 --- /dev/null +++ b/node_modules/with/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2013 Forbes Lindesay + +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. \ No newline at end of file diff --git a/node_modules/with/README.md b/node_modules/with/README.md new file mode 100644 index 0000000..ed88b0c --- /dev/null +++ b/node_modules/with/README.md @@ -0,0 +1,81 @@ +# with + +Compile time `with` for strict mode JavaScript + +[![build status](https://secure.travis-ci.org/ForbesLindesay/with.png)](http://travis-ci.org/ForbesLindesay/with) +[![Dependency Status](https://img.shields.io/gemnasium/ForbesLindesay/with.svg)](https://gemnasium.com/ForbesLindesay/with) +[![NPM version](https://img.shields.io/npm/v/with.svg)](http://badge.fury.io/js/with) + +## Installation + + $ npm install with + +## Usage + +```js +var addWith = require('with') + +addWith('obj', 'console.log(a)') +// => ';(function (console, a) { +// console.log(a) +// }("console" in obj ? obj.console : +// typeof console!=="undefined" ? console : undefined, +// "a" in obj ? obj.a : +// typeof a !== "undefined" ? a : undefined));' + +addWith('obj', 'console.log(a)', ['console']) +// => ';(function (console, a) { +// console.log(a) +// }("a" in obj ? obj.a : +// typeof a !== "undefined" ? a : undefined));' +``` + +## API + +### addWith(obj, src[, exclude]) + +The idea is that this is roughly equivallent to: + +```js +with (obj) { + src +} +``` + +There are a few differences though. For starters, assignments to variables will always remain contained within the with block. + +e.g. + +```js +var foo = 'foo' +with ({}) { + foo = 'bar' +} +assert(foo === 'bar')// => This fails for compile time with but passes for native with + +var obj = {foo: 'foo'} +with ({}) { + foo = 'bar' +} +assert(obj.foo === 'bar')// => This fails for compile time with but passes for native with +``` + +It also makes everything be declared, so you can always do: + +```js +if (foo === undefined) +``` + +instead of + +```js +if (typeof foo === 'undefined') +``` + +This is not the case if foo is in `exclude`. If a variable is excluded, we ignore it entirely. This is useful if you know a variable will be global as it can lead to efficiency improvements. + +It is also safe to use in strict mode (unlike `with`) and it minifies properly (`with` disables virtually all minification). + +## License + + MIT \ No newline at end of file diff --git a/node_modules/with/index.js b/node_modules/with/index.js new file mode 100644 index 0000000..7632ee7 --- /dev/null +++ b/node_modules/with/index.js @@ -0,0 +1,125 @@ +'use strict'; + +var detect = require('acorn-globals'); +var acorn = require('acorn'); +var walk = require('acorn/dist/walk'); + +// polyfill for https://github.com/marijnh/acorn/pull/231 +walk.base.ExportNamedDeclaration = walk.base.ExportDefaultDeclaration = function (node, st, c) { + return c(node.declaration, st); +}; +walk.base.ImportDefaultSpecifier = walk.base.ImportNamespaceSpecifier = function () {}; + +// hacky fix for https://github.com/marijnh/acorn/issues/227 +function reallyParse(source) { + try { + return acorn.parse(source, { + ecmaVersion: 5, + allowReturnOutsideFunction: true + }); + } catch (ex) { + if (ex.name !== 'SyntaxError') { + throw ex; + } + return acorn.parse(source, { + ecmaVersion: 6, + allowReturnOutsideFunction: true + }); + } +} + +module.exports = addWith + +/** + * Mimic `with` as far as possible but at compile time + * + * @param {String} obj The object part of a with expression + * @param {String} src The body of the with expression + * @param {Array.} exclude A list of variable names to explicitly exclude + */ +function addWith(obj, src, exclude) { + obj = obj + '' + src = src + '' + exclude = exclude || [] + exclude = exclude.concat(detect(obj).map(function (global) { return global.name; })) + var vars = detect(src).map(function (global) { return global.name; }) + .filter(function (v) { + return exclude.indexOf(v) === -1 + }) + + if (vars.length === 0) return src + + var declareLocal = '' + var local = 'locals_for_with' + var result = 'result_of_with' + if (/^[a-zA-Z0-9$_]+$/.test(obj)) { + local = obj + } else { + while (vars.indexOf(local) != -1 || exclude.indexOf(local) != -1) { + local += '_' + } + declareLocal = 'var ' + local + ' = (' + obj + ')' + } + while (vars.indexOf(result) != -1 || exclude.indexOf(result) != -1) { + result += '_' + } + + var inputVars = vars.map(function (v) { + return JSON.stringify(v) + ' in ' + local + '?' + + local + '.' + v + ':' + + 'typeof ' + v + '!=="undefined"?' + v + ':undefined' + }) + + src = '(function (' + vars.join(', ') + ') {' + + src + + '}.call(this' + inputVars.map(function (v) { return ',' + v; }).join('') + '))' + + return ';' + declareLocal + ';' + unwrapReturns(src, result) + ';' +} + +/** + * Take a self calling function, and unwrap it such that return inside the function + * results in return outside the function + * + * @param {String} src Some JavaScript code representing a self-calling function + * @param {String} result A temporary variable to store the result in + */ +function unwrapReturns(src, result) { + var originalSource = src + var hasReturn = false + var ast = reallyParse(src) + var ref + src = src.split('') + + // get a reference to the function that was inserted to add an inner context + if ((ref = ast.body).length !== 1 + || (ref = ref[0]).type !== 'ExpressionStatement' + || (ref = ref.expression).type !== 'CallExpression' + || (ref = ref.callee).type !== 'MemberExpression' || ref.computed !== false || ref.property.name !== 'call' + || (ref = ref.object).type !== 'FunctionExpression') + throw new Error('AST does not seem to represent a self-calling function') + var fn = ref + + walk.recursive(ast, null, { + Function: function (node, st, c) { + if (node === fn) { + c(node.body, st, "ScopeBody"); + } + }, + ReturnStatement: function (node) { + hasReturn = true + replace(node, 'return {value: ' + source(node.argument) + '};'); + } + }); + function source(node) { + return src.slice(node.start, node.end).join('') + } + function replace(node, str) { + for (var i = node.start; i < node.end; i++) { + src[i] = '' + } + src[node.start] = str + } + if (!hasReturn) return originalSource + else return 'var ' + result + '=' + src.join('') + ';if (' + result + ') return ' + result + '.value' +} diff --git a/node_modules/with/node_modules/.bin/acorn b/node_modules/with/node_modules/.bin/acorn new file mode 120000 index 0000000..cf76760 --- /dev/null +++ b/node_modules/with/node_modules/.bin/acorn @@ -0,0 +1 @@ +../acorn/bin/acorn \ No newline at end of file diff --git a/node_modules/with/node_modules/acorn/.editorconfig b/node_modules/with/node_modules/acorn/.editorconfig new file mode 100644 index 0000000..c14d5c6 --- /dev/null +++ b/node_modules/with/node_modules/acorn/.editorconfig @@ -0,0 +1,7 @@ +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +insert_final_newline = true diff --git a/node_modules/with/node_modules/acorn/.gitattributes b/node_modules/with/node_modules/acorn/.gitattributes new file mode 100644 index 0000000..fcadb2c --- /dev/null +++ b/node_modules/with/node_modules/acorn/.gitattributes @@ -0,0 +1 @@ +* text eol=lf diff --git a/node_modules/with/node_modules/acorn/.npmignore b/node_modules/with/node_modules/acorn/.npmignore new file mode 100644 index 0000000..ecba291 --- /dev/null +++ b/node_modules/with/node_modules/acorn/.npmignore @@ -0,0 +1,3 @@ +/.tern-port +/test +/local diff --git a/node_modules/with/node_modules/acorn/.tern-project b/node_modules/with/node_modules/acorn/.tern-project new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/node_modules/with/node_modules/acorn/.tern-project @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/node_modules/with/node_modules/acorn/.travis.yml b/node_modules/with/node_modules/acorn/.travis.yml new file mode 100644 index 0000000..ffb9f71 --- /dev/null +++ b/node_modules/with/node_modules/acorn/.travis.yml @@ -0,0 +1,2 @@ +language: node_js +node_js: '0.10' diff --git a/node_modules/with/node_modules/acorn/AUTHORS b/node_modules/with/node_modules/acorn/AUTHORS new file mode 100644 index 0000000..0fb284b --- /dev/null +++ b/node_modules/with/node_modules/acorn/AUTHORS @@ -0,0 +1,38 @@ +List of Acorn contributors. Updated before every release. + +Adrian Rakovsky +Alistair Braidwood +Andres Suarez +Aparajita Fishman +Arian Stolwijk +Artem Govorov +Brandon Mills +Charles Hughes +Conrad Irwin +David Bonnet +Forbes Lindesay +Gilad Peleg +impinball +Ingvar Stepanyan +Jiaxing Wang +Johannes Herr +Jürg Lehni +keeyipchan +krator +Marijn Haverbeke +Martin Carlberg +Mathias Bynens +Mathieu 'p01' Henri +Max Schaefer +Max Zerzouri +Mihai Bazon +Mike Rennie +Nick Fitzgerald +Oskar Schöldström +Paul Harper +Peter Rust +PlNG +r-e-d +Rich Harris +Sebastian McKenzie +zsjforcn diff --git a/node_modules/with/node_modules/acorn/LICENSE b/node_modules/with/node_modules/acorn/LICENSE new file mode 100644 index 0000000..d4c7fc5 --- /dev/null +++ b/node_modules/with/node_modules/acorn/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) 2012-2014 by various contributors (see AUTHORS) + +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. diff --git a/node_modules/with/node_modules/acorn/README.md b/node_modules/with/node_modules/acorn/README.md new file mode 100644 index 0000000..ec22d52 --- /dev/null +++ b/node_modules/with/node_modules/acorn/README.md @@ -0,0 +1,377 @@ +# Acorn + +[![Build Status](https://travis-ci.org/marijnh/acorn.svg?branch=master)](https://travis-ci.org/marijnh/acorn) +[![NPM version](https://img.shields.io/npm/v/acorn.svg)](https://www.npmjs.org/package/acorn) +[Author funding status: ![maintainer happiness](https://marijnhaverbeke.nl/fund/status_s.png?force)](https://marijnhaverbeke.nl/fund/) + +A tiny, fast JavaScript parser, written completely in JavaScript. + +## Installation + +The easiest way to install acorn is with [`npm`][npm]. + +[npm]: http://npmjs.org + +```sh +npm install acorn +``` + +Alternately, download the source. + +```sh +git clone https://github.com/marijnh/acorn.git +``` + +## Components + +When run in a CommonJS (node.js) or AMD environment, exported values +appear in the interfaces exposed by the individual files, as usual. +When loaded in the browser (Acorn works in any JS-enabled browser more +recent than IE5) without any kind of module management, a single +global object `acorn` will be defined, and all the exported properties +will be added to that. + +### Main parser + +This is implemented in `dist/acorn.js`, and is what you get when you +`require("acorn")` in node.js. + +**parse**`(input, options)` is used to parse a JavaScript program. +The `input` parameter is a string, `options` can be undefined or an +object setting some of the options listed below. The return value will +be an abstract syntax tree object as specified by the +[Mozilla Parser API][mozapi]. + +When encountering a syntax error, the parser will raise a +`SyntaxError` object with a meaningful message. The error object will +have a `pos` property that indicates the character offset at which the +error occurred, and a `loc` object that contains a `{line, column}` +object referring to that same position. + +[mozapi]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API + +- **ecmaVersion**: Indicates the ECMAScript version to parse. Must be + either 3, 5, or 6. This influences support for strict mode, the set + of reserved words, and support for new syntax features. Default is 5. + +- **sourceType**: Indicate the mode the code should be parsed in. Can be + either `"script"` or `"module"`. + +- **onInsertedSemicolon**: If given a callback, that callback will be + called whenever a missing semicolon is inserted by the parser. The + callback will be given the character offset of the point where the + semicolon is inserted as argument, and if `locations` is on, also a + `{line, column}` object representing this position. + +- **onTrailingComma**: Like `onInsertedSemicolon`, but for trailing + commas. + +- **allowReserved**: If `false`, using a reserved word will generate + an error. Defaults to `true`. When given the value `"never"`, + reserved words and keywords can also not be used as property names + (as in Internet Explorer's old parser). + +- **allowReturnOutsideFunction**: By default, a return statement at + the top level raises an error. Set this to `true` to accept such + code. + +- **allowImportExportEverywhere**: By default, `import` and `export` + declarations can only appear at a program's top level. Setting this + option to `true` allows them anywhere where a statement is allowed. + +- **allowHashBang**: When this is enabled (off by default), if the + code starts with the characters `#!` (as in a shellscript), the + first line will be treated as a comment. + +- **locations**: When `true`, each node has a `loc` object attached + with `start` and `end` subobjects, each of which contains the + one-based line and zero-based column numbers in `{line, column}` + form. Default is `false`. + +- **onToken**: If a function is passed for this option, each found + token will be passed in same format as `tokenize()` returns. + + If array is passed, each found token is pushed to it. + + Note that you are not allowed to call the parser from the + callback—that will corrupt its internal state. + +- **onComment**: If a function is passed for this option, whenever a + comment is encountered the function will be called with the + following parameters: + + - `block`: `true` if the comment is a block comment, false if it + is a line comment. + - `text`: The content of the comment. + - `start`: Character offset of the start of the comment. + - `end`: Character offset of the end of the comment. + + When the `locations` options is on, the `{line, column}` locations + of the comment’s start and end are passed as two additional + parameters. + + If array is passed for this option, each found comment is pushed + to it as object in Esprima format: + + ```javascript + { + "type": "Line" | "Block", + "value": "comment text", + "range": ..., + "loc": ... + } + ``` + + Note that you are not allowed to call the parser from the + callback—that will corrupt its internal state. + +- **ranges**: Nodes have their start and end characters offsets + recorded in `start` and `end` properties (directly on the node, + rather than the `loc` object, which holds line/column data. To also + add a [semi-standardized][range] "range" property holding a + `[start, end]` array with the same numbers, set the `ranges` option + to `true`. + +- **program**: It is possible to parse multiple files into a single + AST by passing the tree produced by parsing the first file as the + `program` option in subsequent parses. This will add the toplevel + forms of the parsed file to the "Program" (top) node of an existing + parse tree. + +- **sourceFile**: When the `locations` option is `true`, you can pass + this option to add a `source` attribute in every node’s `loc` + object. Note that the contents of this option are not examined or + processed in any way; you are free to use whatever format you + choose. + +- **directSourceFile**: Like `sourceFile`, but a `sourceFile` property + will be added directly to the nodes, rather than the `loc` object. + +- **preserveParens**: If this option is `true`, parenthesized expressions + are represented by (non-standard) `ParenthesizedExpression` nodes + that have a single `expression` property containing the expression + inside parentheses. + +[range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 + +**parseExpressionAt**`(input, offset, options)` will parse a single +expression in a string, and return its AST. It will not complain if +there is more of the string left after the expression. + +**getLineInfo**`(input, offset)` can be used to get a `{line, +column}` object for a given program string and character offset. + +**tokenizer**`(input, options)` returns an object with a `getToken` +method that can be called repeatedly to get the next token, a `{start, +end, type, value}` object (with added `loc` property when the +`locations` option is enabled and `range` property when the `ranges` +option is enabled). When the token's type is `tokTypes.eof`, you +should stop calling the method, since it will keep returning that same +token forever. + +In ES6 environment, returned result can be used as any other +protocol-compliant iterable: + +```javascript +for (let token of acorn.tokenize(str)) { + // iterate over the tokens +} + +// transform code to array of tokens: +var tokens = [...acorn.tokenize(str)]; +``` + +**tokTypes** holds an object mapping names to the token type objects +that end up in the `type` properties of tokens. + +#### Note on using with [Escodegen][escodegen] + +Escodegen supports generating comments from AST, attached in +Esprima-specific format. In order to simulate same format in +Acorn, consider following example: + +```javascript +var comments = [], tokens = []; + +var ast = acorn.parse('var x = 42; // answer', { + // collect ranges for each node + ranges: true, + // collect comments in Esprima's format + onComment: comments, + // collect token ranges + onToken: tokens +}); + +// attach comments using collected information +escodegen.attachComments(ast, comments, tokens); + +// generate code +console.log(escodegen.generate(ast, {comment: true})); +// > 'var x = 42; // answer' +``` + +[escodegen]: https://github.com/Constellation/escodegen + +#### Using Acorn in an environment with a Content Security Policy + +Some contexts, such as Chrome Web Apps, disallow run-time code evaluation. +Acorn uses `new Function` to generate fast functions that test whether +a word is in a given set, and will trigger a security error when used +in a context with such a +[Content Security Policy](http://www.html5rocks.com/en/tutorials/security/content-security-policy/#eval-too) +(see [#90](https://github.com/marijnh/acorn/issues/90) and +[#123](https://github.com/marijnh/acorn/issues/123)). + +The `dist/acorn_csp.js` file in the distribution (which is built +by the `bin/without_eval` script) has the generated code inlined, and +can thus run without evaluating anything. + +### dist/acorn_loose.js ### + +This file implements an error-tolerant parser. It exposes a single +function. + +**parse_dammit**`(input, options)` takes the same arguments and +returns the same syntax tree as the `parse` function in `acorn.js`, +but never raises an error, and will do its best to parse syntactically +invalid code in as meaningful a way as it can. It'll insert identifier +nodes with name `"✖"` as placeholders in places where it can't make +sense of the input. Depends on `acorn.js`, because it uses the same +tokenizer. + +### dist/walk.js ### + +Implements an abstract syntax tree walker. Will store its interface in +`acorn.walk` when loaded without a module system. + +**simple**`(node, visitors, base, state)` does a 'simple' walk over +a tree. `node` should be the AST node to walk, and `visitors` an +object with properties whose names correspond to node types in the +[Mozilla Parser API][mozapi]. The properties should contain functions +that will be called with the node object and, if applicable the state +at that point. The last two arguments are optional. `base` is a walker +algorithm, and `state` is a start state. The default walker will +simply visit all statements and expressions and not produce a +meaningful state. (An example of a use of state it to track scope at +each point in the tree.) + +**ancestor**`(node, visitors, base, state)` does a 'simple' walk over +a tree, building up an array of ancestor nodes (including the current node) +and passing the array to callbacks in the `state` parameter. + +**recursive**`(node, state, functions, base)` does a 'recursive' +walk, where the walker functions are responsible for continuing the +walk on the child nodes of their target node. `state` is the start +state, and `functions` should contain an object that maps node types +to walker functions. Such functions are called with `(node, state, c)` +arguments, and can cause the walk to continue on a sub-node by calling +the `c` argument on it with `(node, state)` arguments. The optional +`base` argument provides the fallback walker functions for node types +that aren't handled in the `functions` object. If not given, the +default walkers will be used. + +**make**`(functions, base)` builds a new walker object by using the +walker functions in `functions` and filling in the missing ones by +taking defaults from `base`. + +**findNodeAt**`(node, start, end, test, base, state)` tries to +locate a node in a tree at the given start and/or end offsets, which +satisfies the predicate `test`. `start` end `end` can be either `null` +(as wildcard) or a number. `test` may be a string (indicating a node +type) or a function that takes `(nodeType, node)` arguments and +returns a boolean indicating whether this node is interesting. `base` +and `state` are optional, and can be used to specify a custom walker. +Nodes are tested from inner to outer, so if two nodes match the +boundaries, the inner one will be preferred. + +**findNodeAround**`(node, pos, test, base, state)` is a lot like +`findNodeAt`, but will match any node that exists 'around' (spanning) +the given position. + +**findNodeAfter**`(node, pos, test, base, state)` is similar to +`findNodeAround`, but will match all nodes *after* the given position +(testing outer nodes before inner nodes). + +## Command line interface + +The `bin/acorn` utility can be used to parse a file from the command +line. It accepts as arguments its input file and the following +options: + +- `--ecma3|--ecma5|--ecma6`: Sets the ECMAScript version to parse. Default is + version 5. + +- `--locations`: Attaches a "loc" object to each node with "start" and + "end" subobjects, each of which contains the one-based line and + zero-based column numbers in `{line, column}` form. + +- `--allow-hash-bang`: If the code starts with the characters #! (as in a shellscript), the first line will be treated as a comment. + +- `--compact`: No whitespace is used in the AST output. + +- `--silent`: Do not output the AST, just return the exit status. + +- `--help`: Print the usage information and quit. + +The utility spits out the syntax tree as JSON data. + +## Build system + +Acorn is written in ECMAScript 6, as a set of small modules, in the +project's `src` directory, and compiled down to bigger ECMAScript 3 +files in `dist` using [Browserify](http://browserify.org) and +[Babel](http://babeljs.io/). If you are already using Babel, you can +consider including the modules directly. + +The command-line test runner (`npm test`) uses the ES6 modules. The +browser-based test page (`test/index.html`) uses the compiled modules. +The `bin/build-acorn.js` script builds the latter from the former. + +If you are working on Acorn, you'll probably want to try the code out +directly, without an intermediate build step. In your scripts, you can +register the Babel require shim like this: + + require("babelify/node_modules/babel-core/register") + +That will allow you to directly `require` the ES6 modules. + +## Plugins + +Acorn is designed support allow plugins which, within reasonable +bounds, redefine the way the parser works. Plugins can add new token +types and new tokenizer contexts (if necessary), and extend methods in +the parser object. This is not a clean, elegant API—using it requires +an understanding of Acorn's internals, and plugins are likely to break +whenever those internals are significantly changed. But still, it is +_possible_, in this way, to create parsers for JavaScript dialects +without forking all of Acorn. And in principle it is even possible to +combine such plugins, so that if you have, for example, a plugin for +parsing types and a plugin for parsing JSX-style XML literals, you +could load them both and parse code with both JSX tags and types. + +A plugin should register itself by adding a property to +`acorn.plugins`, which holds a function. Calling `acorn.parse`, a +`plugin` option can be passed, holding an object mapping plugin names +to configuration values (or just `true` for plugins that don't take +options). After the parser object has been created, the initialization +functions for the chosen plugins are called with `(parser, +configValue)` arguments. They are expected to use the `parser.extend` +method to extend parser methods. For example, the `readToken` method +could be extended like this: + +```javascript +parser.extend("readToken", function(nextMethod) { + return function(code) { + console.log("Reading a token!") + return nextMethod.call(this, code) + } +}) +``` + +The `nextMethod` argument passed to `extend`'s second argument is the +previous value of this method, and should usually be called through to +whenever the extended method does not handle the call itself. + +There is a proof-of-concept JSX plugin in the [`jsx` +branch](https://github.com/marijnh/acorn/tree/jsx) branch of the +Github repository. diff --git a/node_modules/with/node_modules/acorn/bin/acorn b/node_modules/with/node_modules/acorn/bin/acorn new file mode 100755 index 0000000..76d8178 --- /dev/null +++ b/node_modules/with/node_modules/acorn/bin/acorn @@ -0,0 +1,54 @@ +#!/usr/bin/env node + +var path = require("path"); +var fs = require("fs"); +var acorn = require("../dist/acorn.js"); + +var infile, parsed, tokens, options = {}, silent = false, compact = false, tokenize = false; + +function help(status) { + var print = (status == 0) ? console.log : console.error; + print("usage: " + path.basename(process.argv[1]) + " [--ecma3|--ecma5|--ecma6]"); + print(" [--tokenize] [--locations] [---allow-hash-bang] [--compact] [--silent] [--help] [--] infile"); + process.exit(status); +} + +for (var i = 2; i < process.argv.length; ++i) { + var arg = process.argv[i]; + if (arg[0] != "-" && !infile) infile = arg; + else if (arg == "--" && !infile && i + 2 == process.argv.length) infile = process.argv[++i]; + else if (arg == "--ecma3") options.ecmaVersion = 3; + else if (arg == "--ecma5") options.ecmaVersion = 5; + else if (arg == "--ecma6") options.ecmaVersion = 6; + else if (arg == "--ecma7") options.ecmaVersion = 7; + else if (arg == "--locations") options.locations = true; + else if (arg == "--allow-hash-bang") options.allowHashBang = true; + else if (arg == "--silent") silent = true; + else if (arg == "--compact") compact = true; + else if (arg == "--help") help(0); + else if (arg == "--tokenize") tokenize = true; + else help(1); +} + +try { + var code = fs.readFileSync(infile, "utf8"); + + if (!tokenize) + parsed = acorn.parse(code, options); + else { + var get = acorn.tokenize(code, options); + tokens = []; + while (true) { + var token = get(); + tokens.push(token); + if (token.type.type == "eof") + break; + } + } +} catch(e) { + console.log(e.message); + process.exit(1); +} + +if (!silent) + console.log(JSON.stringify(tokenize ? tokens : parsed, null, compact ? null : 2)); diff --git a/node_modules/with/node_modules/acorn/bin/build-acorn.js b/node_modules/with/node_modules/acorn/bin/build-acorn.js new file mode 100644 index 0000000..a97b757 --- /dev/null +++ b/node_modules/with/node_modules/acorn/bin/build-acorn.js @@ -0,0 +1,51 @@ +var fs = require("fs"), path = require("path") +var stream = require("stream") + +var browserify = require("browserify") +var babelify = require("babelify").configure({loose: "all"}) + +process.chdir(path.resolve(__dirname, "..")) + +browserify({standalone: "acorn"}) + .plugin(require('browserify-derequire')) + .transform(babelify) + .require("./src/index.js", {entry: true}) + .bundle() + .on("error", function (err) { console.log("Error: " + err.message) }) + .pipe(fs.createWriteStream("dist/acorn.js")) + +function acornShim(file) { + var tr = new stream.Transform + if (file == path.resolve(__dirname, "../src/index.js")) { + var sent = false + tr._transform = function(chunk, _, callback) { + if (!sent) { + sent = true + callback(null, "module.exports = typeof acorn != 'undefined' ? acorn : _dereq_(\"./acorn\")") + } else { + callback() + } + } + } else { + tr._transform = function(chunk, _, callback) { callback(null, chunk) } + } + return tr +} + +browserify({standalone: "acorn.loose"}) + .plugin(require('browserify-derequire')) + .transform(acornShim) + .transform(babelify) + .require("./src/loose/index.js", {entry: true}) + .bundle() + .on("error", function (err) { console.log("Error: " + err.message) }) + .pipe(fs.createWriteStream("dist/acorn_loose.js")) + +browserify({standalone: "acorn.walk"}) + .plugin(require('browserify-derequire')) + .transform(acornShim) + .transform(babelify) + .require("./src/walk/index.js", {entry: true}) + .bundle() + .on("error", function (err) { console.log("Error: " + err.message) }) + .pipe(fs.createWriteStream("dist/walk.js")) diff --git a/node_modules/with/node_modules/acorn/bin/generate-identifier-regex.js b/node_modules/with/node_modules/acorn/bin/generate-identifier-regex.js new file mode 100644 index 0000000..0d7c50f --- /dev/null +++ b/node_modules/with/node_modules/acorn/bin/generate-identifier-regex.js @@ -0,0 +1,47 @@ +// Note: run `npm install unicode-7.0.0` first. + +// Which Unicode version should be used? +var version = '7.0.0'; + +var start = require('unicode-' + version + '/properties/ID_Start/code-points') + .filter(function(ch) { return ch > 127; }); +var cont = [0x200c, 0x200d].concat(require('unicode-' + version + '/properties/ID_Continue/code-points') + .filter(function(ch) { return ch > 127 && start.indexOf(ch) == -1; })); + +function pad(str, width) { + while (str.length < width) str = "0" + str; + return str; +} + +function esc(code) { + var hex = code.toString(16); + if (hex.length <= 2) return "\\x" + pad(hex, 2); + else return "\\u" + pad(hex, 4); +} + +function generate(chars) { + var astral = [], re = ""; + for (var i = 0, at = 0x10000; i < chars.length; i++) { + var from = chars[i], to = from; + while (i < chars.length - 1 && chars[i + 1] == to + 1) { + i++; + to++; + } + if (to <= 0xffff) { + if (from == to) re += esc(from); + else if (from + 1 == to) re += esc(from) + esc(to); + else re += esc(from) + "-" + esc(to); + } else { + astral.push(from - at, to - from); + at = to; + } + } + return {nonASCII: re, astral: astral}; +} + +var startData = generate(start), contData = generate(cont); + +console.log(" var nonASCIIidentifierStartChars = \"" + startData.nonASCII + "\";"); +console.log(" var nonASCIIidentifierChars = \"" + contData.nonASCII + "\";"); +console.log(" var astralIdentifierStartCodes = " + JSON.stringify(startData.astral) + ";"); +console.log(" var astralIdentifierCodes = " + JSON.stringify(contData.astral) + ";"); diff --git a/node_modules/with/node_modules/acorn/bin/prepublish.sh b/node_modules/with/node_modules/acorn/bin/prepublish.sh new file mode 100755 index 0000000..879834d --- /dev/null +++ b/node_modules/with/node_modules/acorn/bin/prepublish.sh @@ -0,0 +1,2 @@ +node bin/build-acorn.js +node bin/without_eval > dist/acorn_csp.js diff --git a/node_modules/with/node_modules/acorn/bin/update_authors.sh b/node_modules/with/node_modules/acorn/bin/update_authors.sh new file mode 100755 index 0000000..466c8db --- /dev/null +++ b/node_modules/with/node_modules/acorn/bin/update_authors.sh @@ -0,0 +1,6 @@ +# Combine existing list of authors with everyone known in git, sort, add header. +tail --lines=+3 AUTHORS > AUTHORS.tmp +git log --format='%aN' | grep -v abraidwood >> AUTHORS.tmp +echo -e "List of Acorn contributors. Updated before every release.\n" > AUTHORS +sort -u AUTHORS.tmp >> AUTHORS +rm -f AUTHORS.tmp diff --git a/node_modules/with/node_modules/acorn/bin/without_eval b/node_modules/with/node_modules/acorn/bin/without_eval new file mode 100755 index 0000000..4331e70 --- /dev/null +++ b/node_modules/with/node_modules/acorn/bin/without_eval @@ -0,0 +1,48 @@ +#!/usr/bin/env node + +var fs = require("fs") + +var acornSrc = fs.readFileSync(require.resolve("../dist/acorn"), "utf8") +var acorn = require("../dist/acorn"), walk = require("../dist/walk") + +var ast = acorn.parse(acornSrc) +var touchups = [], uses = [] + +var makePred + +walk.simple(ast, { + FunctionDeclaration: function(node) { + if (node.id.name == "makePredicate") { + makePred = node + touchups.push({text: "// Removed to create an eval-free library", from: node.start, to: node.end}) + } + }, + ObjectExpression: function(node) { + node.properties.forEach(function(prop) { + if (prop.value.type == "CallExpression" && + prop.value.callee.name == "makePredicate") + uses.push(prop.value) + }) + } +}) + +var results = [] +var dryRun = acornSrc.slice(0, makePred.end) + "; makePredicate = (function(mp) {" + + "return function(words) { var r = mp(words); predicates.push(r); return r }})(makePredicate);" + + acornSrc.slice(makePred.end) +;(new Function("predicates", dryRun))(results) + +uses.forEach(function (node, i) { + touchups.push({text: results[i].toString(), from: node.start, to: node.end}) +}) + +var result = "", pos = 0 +touchups.sort(function(a, b) { return a.from - b.from }) +touchups.forEach(function(touchup) { + result += acornSrc.slice(pos, touchup.from) + result += touchup.text + pos = touchup.to +}) +result += acornSrc.slice(pos) + +process.stdout.write(result) diff --git a/node_modules/with/node_modules/acorn/dist/.keep b/node_modules/with/node_modules/acorn/dist/.keep new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/with/node_modules/acorn/dist/acorn.js b/node_modules/with/node_modules/acorn/dist/acorn.js new file mode 100644 index 0000000..1f1b6f2 --- /dev/null +++ b/node_modules/with/node_modules/acorn/dist/acorn.js @@ -0,0 +1,4014 @@ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.acorn = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= len) return x; + switch (x) { + case '%s': return String(args[i++]); + case '%d': return Number(args[i++]); + case '%j': + try { + return JSON.stringify(args[i++]); + } catch (_) { + return '[Circular]'; + } + default: + return x; + } + }); + for (var x = args[i]; i < len; x = args[++i]) { + if (isNull(x) || !isObject(x)) { + str += ' ' + x; + } else { + str += ' ' + inspect(x); + } + } + return str; +}; + + +// Mark that a method should not be used. +// Returns a modified function which warns once by default. +// If --no-deprecation is set, then it is a no-op. +exports.deprecate = function(fn, msg) { + // Allow for deprecating things in the process of starting up. + if (isUndefined(global.process)) { + return function() { + return exports.deprecate(fn, msg).apply(this, arguments); + }; + } + + if (process.noDeprecation === true) { + return fn; + } + + var warned = false; + function deprecated() { + if (!warned) { + if (process.throwDeprecation) { + throw new Error(msg); + } else if (process.traceDeprecation) { + console.trace(msg); + } else { + console.error(msg); + } + warned = true; + } + return fn.apply(this, arguments); + } + + return deprecated; +}; + + +var debugs = {}; +var debugEnviron; +exports.debuglog = function(set) { + if (isUndefined(debugEnviron)) + debugEnviron = process.env.NODE_DEBUG || ''; + set = set.toUpperCase(); + if (!debugs[set]) { + if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { + var pid = process.pid; + debugs[set] = function() { + var msg = exports.format.apply(exports, arguments); + console.error('%s %d: %s', set, pid, msg); + }; + } else { + debugs[set] = function() {}; + } + } + return debugs[set]; +}; + + +/** + * Echos the value of a value. Trys to print the value out + * in the best way possible given the different types. + * + * @param {Object} obj The object to print out. + * @param {Object} opts Optional options object that alters the output. + */ +/* legacy: obj, showHidden, depth, colors*/ +function inspect(obj, opts) { + // default options + var ctx = { + seen: [], + stylize: stylizeNoColor + }; + // legacy... + if (arguments.length >= 3) ctx.depth = arguments[2]; + if (arguments.length >= 4) ctx.colors = arguments[3]; + if (isBoolean(opts)) { + // legacy... + ctx.showHidden = opts; + } else if (opts) { + // got an "options" object + exports._extend(ctx, opts); + } + // set default options + if (isUndefined(ctx.showHidden)) ctx.showHidden = false; + if (isUndefined(ctx.depth)) ctx.depth = 2; + if (isUndefined(ctx.colors)) ctx.colors = false; + if (isUndefined(ctx.customInspect)) ctx.customInspect = true; + if (ctx.colors) ctx.stylize = stylizeWithColor; + return formatValue(ctx, obj, ctx.depth); +} +exports.inspect = inspect; + + +// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics +inspect.colors = { + 'bold' : [1, 22], + 'italic' : [3, 23], + 'underline' : [4, 24], + 'inverse' : [7, 27], + 'white' : [37, 39], + 'grey' : [90, 39], + 'black' : [30, 39], + 'blue' : [34, 39], + 'cyan' : [36, 39], + 'green' : [32, 39], + 'magenta' : [35, 39], + 'red' : [31, 39], + 'yellow' : [33, 39] +}; + +// Don't use 'blue' not visible on cmd.exe +inspect.styles = { + 'special': 'cyan', + 'number': 'yellow', + 'boolean': 'yellow', + 'undefined': 'grey', + 'null': 'bold', + 'string': 'green', + 'date': 'magenta', + // "name": intentionally not styling + 'regexp': 'red' +}; + + +function stylizeWithColor(str, styleType) { + var style = inspect.styles[styleType]; + + if (style) { + return '\u001b[' + inspect.colors[style][0] + 'm' + str + + '\u001b[' + inspect.colors[style][1] + 'm'; + } else { + return str; + } +} + + +function stylizeNoColor(str, styleType) { + return str; +} + + +function arrayToHash(array) { + var hash = {}; + + array.forEach(function(val, idx) { + hash[val] = true; + }); + + return hash; +} + + +function formatValue(ctx, value, recurseTimes) { + // Provide a hook for user-specified inspect functions. + // Check that value is an object with an inspect function on it + if (ctx.customInspect && + value && + isFunction(value.inspect) && + // Filter out the util module, it's inspect function is special + value.inspect !== exports.inspect && + // Also filter out any prototype objects using the circular check. + !(value.constructor && value.constructor.prototype === value)) { + var ret = value.inspect(recurseTimes, ctx); + if (!isString(ret)) { + ret = formatValue(ctx, ret, recurseTimes); + } + return ret; + } + + // Primitive types cannot have properties + var primitive = formatPrimitive(ctx, value); + if (primitive) { + return primitive; + } + + // Look up the keys of the object. + var keys = Object.keys(value); + var visibleKeys = arrayToHash(keys); + + if (ctx.showHidden) { + keys = Object.getOwnPropertyNames(value); + } + + // IE doesn't make error fields non-enumerable + // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx + if (isError(value) + && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) { + return formatError(value); + } + + // Some type of object without properties can be shortcutted. + if (keys.length === 0) { + if (isFunction(value)) { + var name = value.name ? ': ' + value.name : ''; + return ctx.stylize('[Function' + name + ']', 'special'); + } + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } + if (isDate(value)) { + return ctx.stylize(Date.prototype.toString.call(value), 'date'); + } + if (isError(value)) { + return formatError(value); + } + } + + var base = '', array = false, braces = ['{', '}']; + + // Make Array say that they are Array + if (isArray(value)) { + array = true; + braces = ['[', ']']; + } + + // Make functions say that they are functions + if (isFunction(value)) { + var n = value.name ? ': ' + value.name : ''; + base = ' [Function' + n + ']'; + } + + // Make RegExps say that they are RegExps + if (isRegExp(value)) { + base = ' ' + RegExp.prototype.toString.call(value); + } + + // Make dates with properties first say the date + if (isDate(value)) { + base = ' ' + Date.prototype.toUTCString.call(value); + } + + // Make error with message first say the error + if (isError(value)) { + base = ' ' + formatError(value); + } + + if (keys.length === 0 && (!array || value.length == 0)) { + return braces[0] + base + braces[1]; + } + + if (recurseTimes < 0) { + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } else { + return ctx.stylize('[Object]', 'special'); + } + } + + ctx.seen.push(value); + + var output; + if (array) { + output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); + } else { + output = keys.map(function(key) { + return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); + }); + } + + ctx.seen.pop(); + + return reduceToSingleString(output, base, braces); +} + + +function formatPrimitive(ctx, value) { + if (isUndefined(value)) + return ctx.stylize('undefined', 'undefined'); + if (isString(value)) { + var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') + .replace(/'/g, "\\'") + .replace(/\\"/g, '"') + '\''; + return ctx.stylize(simple, 'string'); + } + if (isNumber(value)) + return ctx.stylize('' + value, 'number'); + if (isBoolean(value)) + return ctx.stylize('' + value, 'boolean'); + // For some reason typeof null is "object", so special case here. + if (isNull(value)) + return ctx.stylize('null', 'null'); +} + + +function formatError(value) { + return '[' + Error.prototype.toString.call(value) + ']'; +} + + +function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { + var output = []; + for (var i = 0, l = value.length; i < l; ++i) { + if (hasOwnProperty(value, String(i))) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + String(i), true)); + } else { + output.push(''); + } + } + keys.forEach(function(key) { + if (!key.match(/^\d+$/)) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + key, true)); + } + }); + return output; +} + + +function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { + var name, str, desc; + desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; + if (desc.get) { + if (desc.set) { + str = ctx.stylize('[Getter/Setter]', 'special'); + } else { + str = ctx.stylize('[Getter]', 'special'); + } + } else { + if (desc.set) { + str = ctx.stylize('[Setter]', 'special'); + } + } + if (!hasOwnProperty(visibleKeys, key)) { + name = '[' + key + ']'; + } + if (!str) { + if (ctx.seen.indexOf(desc.value) < 0) { + if (isNull(recurseTimes)) { + str = formatValue(ctx, desc.value, null); + } else { + str = formatValue(ctx, desc.value, recurseTimes - 1); + } + if (str.indexOf('\n') > -1) { + if (array) { + str = str.split('\n').map(function(line) { + return ' ' + line; + }).join('\n').substr(2); + } else { + str = '\n' + str.split('\n').map(function(line) { + return ' ' + line; + }).join('\n'); + } + } + } else { + str = ctx.stylize('[Circular]', 'special'); + } + } + if (isUndefined(name)) { + if (array && key.match(/^\d+$/)) { + return str; + } + name = JSON.stringify('' + key); + if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { + name = name.substr(1, name.length - 2); + name = ctx.stylize(name, 'name'); + } else { + name = name.replace(/'/g, "\\'") + .replace(/\\"/g, '"') + .replace(/(^"|"$)/g, "'"); + name = ctx.stylize(name, 'string'); + } + } + + return name + ': ' + str; +} + + +function reduceToSingleString(output, base, braces) { + var numLinesEst = 0; + var length = output.reduce(function(prev, cur) { + numLinesEst++; + if (cur.indexOf('\n') >= 0) numLinesEst++; + return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; + }, 0); + + if (length > 60) { + return braces[0] + + (base === '' ? '' : base + '\n ') + + ' ' + + output.join(',\n ') + + ' ' + + braces[1]; + } + + return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; +} + + +// NOTE: These type checking functions intentionally don't use `instanceof` +// because it is fragile and can be easily faked with `Object.create()`. +function isArray(ar) { + return Array.isArray(ar); +} +exports.isArray = isArray; + +function isBoolean(arg) { + return typeof arg === 'boolean'; +} +exports.isBoolean = isBoolean; + +function isNull(arg) { + return arg === null; +} +exports.isNull = isNull; + +function isNullOrUndefined(arg) { + return arg == null; +} +exports.isNullOrUndefined = isNullOrUndefined; + +function isNumber(arg) { + return typeof arg === 'number'; +} +exports.isNumber = isNumber; + +function isString(arg) { + return typeof arg === 'string'; +} +exports.isString = isString; + +function isSymbol(arg) { + return typeof arg === 'symbol'; +} +exports.isSymbol = isSymbol; + +function isUndefined(arg) { + return arg === void 0; +} +exports.isUndefined = isUndefined; + +function isRegExp(re) { + return isObject(re) && objectToString(re) === '[object RegExp]'; +} +exports.isRegExp = isRegExp; + +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} +exports.isObject = isObject; + +function isDate(d) { + return isObject(d) && objectToString(d) === '[object Date]'; +} +exports.isDate = isDate; + +function isError(e) { + return isObject(e) && + (objectToString(e) === '[object Error]' || e instanceof Error); +} +exports.isError = isError; + +function isFunction(arg) { + return typeof arg === 'function'; +} +exports.isFunction = isFunction; + +function isPrimitive(arg) { + return arg === null || + typeof arg === 'boolean' || + typeof arg === 'number' || + typeof arg === 'string' || + typeof arg === 'symbol' || // ES6 symbol + typeof arg === 'undefined'; +} +exports.isPrimitive = isPrimitive; + +exports.isBuffer = _dereq_('./support/isBuffer'); + +function objectToString(o) { + return Object.prototype.toString.call(o); +} + + +function pad(n) { + return n < 10 ? '0' + n.toString(10) : n.toString(10); +} + + +var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', + 'Oct', 'Nov', 'Dec']; + +// 26 Feb 16:19:34 +function timestamp() { + var d = new Date(); + var time = [pad(d.getHours()), + pad(d.getMinutes()), + pad(d.getSeconds())].join(':'); + return [d.getDate(), months[d.getMonth()], time].join(' '); +} + + +// log is just a thin wrapper to console.log that prepends a timestamp +exports.log = function() { + console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); +}; + + +/** + * Inherit the prototype methods from one constructor into another. + * + * The Function.prototype.inherits from lang.js rewritten as a standalone + * function (not on Function.prototype). NOTE: If this file is to be loaded + * during bootstrapping this function needs to be rewritten using some native + * functions as prototype setup using normal JavaScript does not work as + * expected during bootstrapping (see mirror.js in r114903). + * + * @param {function} ctor Constructor function which needs to inherit the + * prototype. + * @param {function} superCtor Constructor function to inherit prototype from. + */ +exports.inherits = _dereq_('inherits'); + +exports._extend = function(origin, add) { + // Don't do anything if add isn't an object + if (!add || !isObject(add)) return origin; + + var keys = Object.keys(add); + var i = keys.length; + while (i--) { + origin[keys[i]] = add[keys[i]]; + } + return origin; +}; + +function hasOwnProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} + +}).call(this,_dereq_('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"./support/isBuffer":4,"_process":3,"inherits":2}],6:[function(_dereq_,module,exports){ +// A recursive descent parser operates by defining functions for all +// syntactic elements, and recursively calling those, each function +// advancing the input stream and returning an AST node. Precedence +// of constructs (for example, the fact that `!x[1]` means `!(x[1])` +// instead of `(!x)[1]` is handled by the fact that the parser +// function that parses unary prefix operators is called first, and +// in turn calls the function that parses `[]` subscripts — that +// way, it'll receive the node for `x[1]` already parsed, and wraps +// *that* in the unary operator node. +// +// Acorn uses an [operator precedence parser][opp] to handle binary +// operator precedence, because it is much more compact than using +// the technique outlined above, which uses different, nesting +// functions to specify precedence, for all of the ten binary +// precedence levels that JavaScript defines. +// +// [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser + +"use strict"; + +var tt = _dereq_("./tokentype").types; + +var Parser = _dereq_("./state").Parser; + +var reservedWords = _dereq_("./identifier").reservedWords; + +var has = _dereq_("./util").has; + +var pp = Parser.prototype; + +// Check if property name clashes with already added. +// Object/class getters and setters are not allowed to clash — +// either with each other or with an init property — and in +// strict mode, init properties are also not allowed to be repeated. + +pp.checkPropClash = function (prop, propHash) { + if (this.options.ecmaVersion >= 6) return; + var key = prop.key, + name = undefined; + switch (key.type) { + case "Identifier": + name = key.name;break; + case "Literal": + name = String(key.value);break; + default: + return; + } + var kind = prop.kind || "init", + other = undefined; + if (has(propHash, name)) { + other = propHash[name]; + var isGetSet = kind !== "init"; + if ((this.strict || isGetSet) && other[kind] || !(isGetSet ^ other.init)) this.raise(key.start, "Redefinition of property"); + } else { + other = propHash[name] = { + init: false, + get: false, + set: false + }; + } + other[kind] = true; +}; + +// ### Expression parsing + +// These nest, from the most general expression type at the top to +// 'atomic', nondivisible expression types at the bottom. Most of +// the functions will simply let the function(s) below them parse, +// and, *if* the syntactic construct they handle is present, wrap +// the AST node that the inner parser gave them in another node. + +// Parse a full expression. The optional arguments are used to +// forbid the `in` operator (in for loops initalization expressions) +// and provide reference for storing '=' operator inside shorthand +// property assignment in contexts where both object expression +// and object pattern might appear (so it's possible to raise +// delayed syntax error at correct position). + +pp.parseExpression = function (noIn, refShorthandDefaultPos) { + var startPos = this.start, + startLoc = this.startLoc; + var expr = this.parseMaybeAssign(noIn, refShorthandDefaultPos); + if (this.type === tt.comma) { + var node = this.startNodeAt(startPos, startLoc); + node.expressions = [expr]; + while (this.eat(tt.comma)) node.expressions.push(this.parseMaybeAssign(noIn, refShorthandDefaultPos)); + return this.finishNode(node, "SequenceExpression"); + } + return expr; +}; + +// Parse an assignment expression. This includes applications of +// operators like `+=`. + +pp.parseMaybeAssign = function (noIn, refShorthandDefaultPos, afterLeftParse) { + if (this.type == tt._yield && this.inGenerator) return this.parseYield(); + + var failOnShorthandAssign = undefined; + if (!refShorthandDefaultPos) { + refShorthandDefaultPos = { start: 0 }; + failOnShorthandAssign = true; + } else { + failOnShorthandAssign = false; + } + var startPos = this.start, + startLoc = this.startLoc; + if (this.type == tt.parenL || this.type == tt.name) this.potentialArrowAt = this.start; + var left = this.parseMaybeConditional(noIn, refShorthandDefaultPos); + if (afterLeftParse) left = afterLeftParse.call(this, left, startPos, startLoc); + if (this.type.isAssign) { + var node = this.startNodeAt(startPos, startLoc); + node.operator = this.value; + node.left = this.type === tt.eq ? this.toAssignable(left) : left; + refShorthandDefaultPos.start = 0; // reset because shorthand default was used correctly + this.checkLVal(left); + this.next(); + node.right = this.parseMaybeAssign(noIn); + return this.finishNode(node, "AssignmentExpression"); + } else if (failOnShorthandAssign && refShorthandDefaultPos.start) { + this.unexpected(refShorthandDefaultPos.start); + } + return left; +}; + +// Parse a ternary conditional (`?:`) operator. + +pp.parseMaybeConditional = function (noIn, refShorthandDefaultPos) { + var startPos = this.start, + startLoc = this.startLoc; + var expr = this.parseExprOps(noIn, refShorthandDefaultPos); + if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; + if (this.eat(tt.question)) { + var node = this.startNodeAt(startPos, startLoc); + node.test = expr; + node.consequent = this.parseMaybeAssign(); + this.expect(tt.colon); + node.alternate = this.parseMaybeAssign(noIn); + return this.finishNode(node, "ConditionalExpression"); + } + return expr; +}; + +// Start the precedence parser. + +pp.parseExprOps = function (noIn, refShorthandDefaultPos) { + var startPos = this.start, + startLoc = this.startLoc; + var expr = this.parseMaybeUnary(refShorthandDefaultPos); + if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; + return this.parseExprOp(expr, startPos, startLoc, -1, noIn); +}; + +// Parse binary operators with the operator precedence parsing +// algorithm. `left` is the left-hand side of the operator. +// `minPrec` provides context that allows the function to stop and +// defer further parser to one of its callers when it encounters an +// operator that has a lower precedence than the set it is parsing. + +pp.parseExprOp = function (left, leftStartPos, leftStartLoc, minPrec, noIn) { + var prec = this.type.binop; + if (Array.isArray(leftStartPos)) { + if (this.options.locations && noIn === undefined) { + // shift arguments to left by one + noIn = minPrec; + minPrec = leftStartLoc; + // flatten leftStartPos + leftStartLoc = leftStartPos[1]; + leftStartPos = leftStartPos[0]; + } + } + if (prec != null && (!noIn || this.type !== tt._in)) { + if (prec > minPrec) { + var node = this.startNodeAt(leftStartPos, leftStartLoc); + node.left = left; + node.operator = this.value; + var op = this.type; + this.next(); + var startPos = this.start, + startLoc = this.startLoc; + node.right = this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, prec, noIn); + this.finishNode(node, op === tt.logicalOR || op === tt.logicalAND ? "LogicalExpression" : "BinaryExpression"); + return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn); + } + } + return left; +}; + +// Parse unary operators, both prefix and postfix. + +pp.parseMaybeUnary = function (refShorthandDefaultPos) { + if (this.type.prefix) { + var node = this.startNode(), + update = this.type === tt.incDec; + node.operator = this.value; + node.prefix = true; + this.next(); + node.argument = this.parseMaybeUnary(); + if (refShorthandDefaultPos && refShorthandDefaultPos.start) this.unexpected(refShorthandDefaultPos.start); + if (update) this.checkLVal(node.argument);else if (this.strict && node.operator === "delete" && node.argument.type === "Identifier") this.raise(node.start, "Deleting local variable in strict mode"); + return this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); + } + var startPos = this.start, + startLoc = this.startLoc; + var expr = this.parseExprSubscripts(refShorthandDefaultPos); + if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; + while (this.type.postfix && !this.canInsertSemicolon()) { + var node = this.startNodeAt(startPos, startLoc); + node.operator = this.value; + node.prefix = false; + node.argument = expr; + this.checkLVal(expr); + this.next(); + expr = this.finishNode(node, "UpdateExpression"); + } + return expr; +}; + +// Parse call, dot, and `[]`-subscript expressions. + +pp.parseExprSubscripts = function (refShorthandDefaultPos) { + var startPos = this.start, + startLoc = this.startLoc; + var expr = this.parseExprAtom(refShorthandDefaultPos); + if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; + return this.parseSubscripts(expr, startPos, startLoc); +}; + +pp.parseSubscripts = function (base, startPos, startLoc, noCalls) { + if (Array.isArray(startPos)) { + if (this.options.locations && noCalls === undefined) { + // shift arguments to left by one + noCalls = startLoc; + // flatten startPos + startLoc = startPos[1]; + startPos = startPos[0]; + } + } + for (;;) { + if (this.eat(tt.dot)) { + var node = this.startNodeAt(startPos, startLoc); + node.object = base; + node.property = this.parseIdent(true); + node.computed = false; + base = this.finishNode(node, "MemberExpression"); + } else if (this.eat(tt.bracketL)) { + var node = this.startNodeAt(startPos, startLoc); + node.object = base; + node.property = this.parseExpression(); + node.computed = true; + this.expect(tt.bracketR); + base = this.finishNode(node, "MemberExpression"); + } else if (!noCalls && this.eat(tt.parenL)) { + var node = this.startNodeAt(startPos, startLoc); + node.callee = base; + node.arguments = this.parseExprList(tt.parenR, false); + base = this.finishNode(node, "CallExpression"); + } else if (this.type === tt.backQuote) { + var node = this.startNodeAt(startPos, startLoc); + node.tag = base; + node.quasi = this.parseTemplate(); + base = this.finishNode(node, "TaggedTemplateExpression"); + } else { + return base; + } + } +}; + +// Parse an atomic expression — either a single token that is an +// expression, an expression started by a keyword like `function` or +// `new`, or an expression wrapped in punctuation like `()`, `[]`, +// or `{}`. + +pp.parseExprAtom = function (refShorthandDefaultPos) { + var node = undefined, + canBeArrow = this.potentialArrowAt == this.start; + switch (this.type) { + case tt._this: + case tt._super: + var type = this.type === tt._this ? "ThisExpression" : "Super"; + node = this.startNode(); + this.next(); + return this.finishNode(node, type); + + case tt._yield: + if (this.inGenerator) this.unexpected(); + + case tt.name: + var startPos = this.start, + startLoc = this.startLoc; + var id = this.parseIdent(this.type !== tt.name); + if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id]); + return id; + + case tt.regexp: + var value = this.value; + node = this.parseLiteral(value.value); + node.regex = { pattern: value.pattern, flags: value.flags }; + return node; + + case tt.num:case tt.string: + return this.parseLiteral(this.value); + + case tt._null:case tt._true:case tt._false: + node = this.startNode(); + node.value = this.type === tt._null ? null : this.type === tt._true; + node.raw = this.type.keyword; + this.next(); + return this.finishNode(node, "Literal"); + + case tt.parenL: + return this.parseParenAndDistinguishExpression(canBeArrow); + + case tt.bracketL: + node = this.startNode(); + this.next(); + // check whether this is array comprehension or regular array + if (this.options.ecmaVersion >= 7 && this.type === tt._for) { + return this.parseComprehension(node, false); + } + node.elements = this.parseExprList(tt.bracketR, true, true, refShorthandDefaultPos); + return this.finishNode(node, "ArrayExpression"); + + case tt.braceL: + return this.parseObj(false, refShorthandDefaultPos); + + case tt._function: + node = this.startNode(); + this.next(); + return this.parseFunction(node, false); + + case tt._class: + return this.parseClass(this.startNode(), false); + + case tt._new: + return this.parseNew(); + + case tt.backQuote: + return this.parseTemplate(); + + default: + this.unexpected(); + } +}; + +pp.parseLiteral = function (value) { + var node = this.startNode(); + node.value = value; + node.raw = this.input.slice(this.start, this.end); + this.next(); + return this.finishNode(node, "Literal"); +}; + +pp.parseParenExpression = function () { + this.expect(tt.parenL); + var val = this.parseExpression(); + this.expect(tt.parenR); + return val; +}; + +pp.parseParenAndDistinguishExpression = function (canBeArrow) { + var startPos = this.start, + startLoc = this.startLoc, + val = undefined; + if (this.options.ecmaVersion >= 6) { + this.next(); + + if (this.options.ecmaVersion >= 7 && this.type === tt._for) { + return this.parseComprehension(this.startNodeAt(startPos, startLoc), true); + } + + var innerStartPos = this.start, + innerStartLoc = this.startLoc; + var exprList = [], + first = true; + var refShorthandDefaultPos = { start: 0 }, + spreadStart = undefined, + innerParenStart = undefined; + while (this.type !== tt.parenR) { + first ? first = false : this.expect(tt.comma); + if (this.type === tt.ellipsis) { + spreadStart = this.start; + exprList.push(this.parseParenItem(this.parseRest())); + break; + } else { + if (this.type === tt.parenL && !innerParenStart) { + innerParenStart = this.start; + } + exprList.push(this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem)); + } + } + var innerEndPos = this.start, + innerEndLoc = this.startLoc; + this.expect(tt.parenR); + + if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) { + if (innerParenStart) this.unexpected(innerParenStart); + return this.parseParenArrowList(startPos, startLoc, exprList); + } + + if (!exprList.length) this.unexpected(this.lastTokStart); + if (spreadStart) this.unexpected(spreadStart); + if (refShorthandDefaultPos.start) this.unexpected(refShorthandDefaultPos.start); + + if (exprList.length > 1) { + val = this.startNodeAt(innerStartPos, innerStartLoc); + val.expressions = exprList; + this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc); + } else { + val = exprList[0]; + } + } else { + val = this.parseParenExpression(); + } + + if (this.options.preserveParens) { + var par = this.startNodeAt(startPos, startLoc); + par.expression = val; + return this.finishNode(par, "ParenthesizedExpression"); + } else { + return val; + } +}; + +pp.parseParenItem = function (item) { + return item; +}; + +pp.parseParenArrowList = function (startPos, startLoc, exprList) { + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList); +}; + +// New's precedence is slightly tricky. It must allow its argument +// to be a `[]` or dot subscript expression, but not a call — at +// least, not without wrapping it in parentheses. Thus, it uses the + +var empty = []; + +pp.parseNew = function () { + var node = this.startNode(); + var meta = this.parseIdent(true); + if (this.options.ecmaVersion >= 6 && this.eat(tt.dot)) { + node.meta = meta; + node.property = this.parseIdent(true); + if (node.property.name !== "target") this.raise(node.property.start, "The only valid meta property for new is new.target"); + return this.finishNode(node, "MetaProperty"); + } + var startPos = this.start, + startLoc = this.startLoc; + node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true); + if (this.eat(tt.parenL)) node.arguments = this.parseExprList(tt.parenR, false);else node.arguments = empty; + return this.finishNode(node, "NewExpression"); +}; + +// Parse template expression. + +pp.parseTemplateElement = function () { + var elem = this.startNode(); + elem.value = { + raw: this.input.slice(this.start, this.end), + cooked: this.value + }; + this.next(); + elem.tail = this.type === tt.backQuote; + return this.finishNode(elem, "TemplateElement"); +}; + +pp.parseTemplate = function () { + var node = this.startNode(); + this.next(); + node.expressions = []; + var curElt = this.parseTemplateElement(); + node.quasis = [curElt]; + while (!curElt.tail) { + this.expect(tt.dollarBraceL); + node.expressions.push(this.parseExpression()); + this.expect(tt.braceR); + node.quasis.push(curElt = this.parseTemplateElement()); + } + this.next(); + return this.finishNode(node, "TemplateLiteral"); +}; + +// Parse an object literal or binding pattern. + +pp.parseObj = function (isPattern, refShorthandDefaultPos) { + var node = this.startNode(), + first = true, + propHash = {}; + node.properties = []; + this.next(); + while (!this.eat(tt.braceR)) { + if (!first) { + this.expect(tt.comma); + if (this.afterTrailingComma(tt.braceR)) break; + } else first = false; + + var prop = this.startNode(), + isGenerator = undefined, + startPos = undefined, + startLoc = undefined; + if (this.options.ecmaVersion >= 6) { + prop.method = false; + prop.shorthand = false; + if (isPattern || refShorthandDefaultPos) { + startPos = this.start; + startLoc = this.startLoc; + } + if (!isPattern) isGenerator = this.eat(tt.star); + } + this.parsePropertyName(prop); + this.parsePropertyValue(prop, isPattern, isGenerator, startPos, startLoc, refShorthandDefaultPos); + this.checkPropClash(prop, propHash); + node.properties.push(this.finishNode(prop, "Property")); + } + return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression"); +}; + +pp.parsePropertyValue = function (prop, isPattern, isGenerator, startPos, startLoc, refShorthandDefaultPos) { + if (this.eat(tt.colon)) { + prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refShorthandDefaultPos); + prop.kind = "init"; + } else if (this.options.ecmaVersion >= 6 && this.type === tt.parenL) { + if (isPattern) this.unexpected(); + prop.kind = "init"; + prop.method = true; + prop.value = this.parseMethod(isGenerator); + } else if (this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && (this.type != tt.comma && this.type != tt.braceR)) { + if (isGenerator || isPattern) this.unexpected(); + prop.kind = prop.key.name; + this.parsePropertyName(prop); + prop.value = this.parseMethod(false); + } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { + prop.kind = "init"; + if (isPattern) { + if (this.isKeyword(prop.key.name) || this.strict && (reservedWords.strictBind(prop.key.name) || reservedWords.strict(prop.key.name)) || !this.options.allowReserved && this.isReservedWord(prop.key.name)) this.raise(prop.key.start, "Binding " + prop.key.name); + prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); + } else if (this.type === tt.eq && refShorthandDefaultPos) { + if (!refShorthandDefaultPos.start) refShorthandDefaultPos.start = this.start; + prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); + } else { + prop.value = prop.key; + } + prop.shorthand = true; + } else this.unexpected(); +}; + +pp.parsePropertyName = function (prop) { + if (this.options.ecmaVersion >= 6) { + if (this.eat(tt.bracketL)) { + prop.computed = true; + prop.key = this.parseMaybeAssign(); + this.expect(tt.bracketR); + return prop.key; + } else { + prop.computed = false; + } + } + return prop.key = this.type === tt.num || this.type === tt.string ? this.parseExprAtom() : this.parseIdent(true); +}; + +// Initialize empty function node. + +pp.initFunction = function (node) { + node.id = null; + if (this.options.ecmaVersion >= 6) { + node.generator = false; + node.expression = false; + } +}; + +// Parse object or class method. + +pp.parseMethod = function (isGenerator) { + var node = this.startNode(); + this.initFunction(node); + this.expect(tt.parenL); + node.params = this.parseBindingList(tt.parenR, false, false); + var allowExpressionBody = undefined; + if (this.options.ecmaVersion >= 6) { + node.generator = isGenerator; + allowExpressionBody = true; + } else { + allowExpressionBody = false; + } + this.parseFunctionBody(node, allowExpressionBody); + return this.finishNode(node, "FunctionExpression"); +}; + +// Parse arrow function expression with given parameters. + +pp.parseArrowExpression = function (node, params) { + this.initFunction(node); + node.params = this.toAssignableList(params, true); + this.parseFunctionBody(node, true); + return this.finishNode(node, "ArrowFunctionExpression"); +}; + +// Parse function body and check parameters. + +pp.parseFunctionBody = function (node, allowExpression) { + var isExpression = allowExpression && this.type !== tt.braceL; + + if (isExpression) { + node.body = this.parseMaybeAssign(); + node.expression = true; + } else { + // Start a new scope with regard to labels and the `inFunction` + // flag (restore them to their old value afterwards). + var oldInFunc = this.inFunction, + oldInGen = this.inGenerator, + oldLabels = this.labels; + this.inFunction = true;this.inGenerator = node.generator;this.labels = []; + node.body = this.parseBlock(true); + node.expression = false; + this.inFunction = oldInFunc;this.inGenerator = oldInGen;this.labels = oldLabels; + } + + // If this is a strict mode function, verify that argument names + // are not repeated, and it does not try to bind the words `eval` + // or `arguments`. + if (this.strict || !isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) { + var nameHash = {}, + oldStrict = this.strict; + this.strict = true; + if (node.id) this.checkLVal(node.id, true); + for (var i = 0; i < node.params.length; i++) { + this.checkLVal(node.params[i], true, nameHash); + }this.strict = oldStrict; + } +}; + +// Parses a comma-separated list of expressions, and returns them as +// an array. `close` is the token type that ends the list, and +// `allowEmpty` can be turned on to allow subsequent commas with +// nothing in between them to be parsed as `null` (which is needed +// for array literals). + +pp.parseExprList = function (close, allowTrailingComma, allowEmpty, refShorthandDefaultPos) { + var elts = [], + first = true; + while (!this.eat(close)) { + if (!first) { + this.expect(tt.comma); + if (allowTrailingComma && this.afterTrailingComma(close)) break; + } else first = false; + + if (allowEmpty && this.type === tt.comma) { + elts.push(null); + } else { + if (this.type === tt.ellipsis) elts.push(this.parseSpread(refShorthandDefaultPos));else elts.push(this.parseMaybeAssign(false, refShorthandDefaultPos)); + } + } + return elts; +}; + +// Parse the next token as an identifier. If `liberal` is true (used +// when parsing properties), it will also convert keywords into +// identifiers. + +pp.parseIdent = function (liberal) { + var node = this.startNode(); + if (liberal && this.options.allowReserved == "never") liberal = false; + if (this.type === tt.name) { + if (!liberal && (!this.options.allowReserved && this.isReservedWord(this.value) || this.strict && reservedWords.strict(this.value) && (this.options.ecmaVersion >= 6 || this.input.slice(this.start, this.end).indexOf("\\") == -1))) this.raise(this.start, "The keyword '" + this.value + "' is reserved"); + node.name = this.value; + } else if (liberal && this.type.keyword) { + node.name = this.type.keyword; + } else { + this.unexpected(); + } + this.next(); + return this.finishNode(node, "Identifier"); +}; + +// Parses yield expression inside generator. + +pp.parseYield = function () { + var node = this.startNode(); + this.next(); + if (this.type == tt.semi || this.canInsertSemicolon() || this.type != tt.star && !this.type.startsExpr) { + node.delegate = false; + node.argument = null; + } else { + node.delegate = this.eat(tt.star); + node.argument = this.parseMaybeAssign(); + } + return this.finishNode(node, "YieldExpression"); +}; + +// Parses array and generator comprehensions. + +pp.parseComprehension = function (node, isGenerator) { + node.blocks = []; + while (this.type === tt._for) { + var block = this.startNode(); + this.next(); + this.expect(tt.parenL); + block.left = this.parseBindingAtom(); + this.checkLVal(block.left, true); + this.expectContextual("of"); + block.right = this.parseExpression(); + this.expect(tt.parenR); + node.blocks.push(this.finishNode(block, "ComprehensionBlock")); + } + node.filter = this.eat(tt._if) ? this.parseParenExpression() : null; + node.body = this.parseExpression(); + this.expect(isGenerator ? tt.parenR : tt.bracketR); + node.generator = isGenerator; + return this.finishNode(node, "ComprehensionExpression"); +}; + +},{"./identifier":7,"./state":13,"./tokentype":17,"./util":18}],7:[function(_dereq_,module,exports){ + + +// Test whether a given character code starts an identifier. + +"use strict"; + +exports.isIdentifierStart = isIdentifierStart; + +// Test whether a given character is part of an identifier. + +exports.isIdentifierChar = isIdentifierChar; +exports.__esModule = true; +// This is a trick taken from Esprima. It turns out that, on +// non-Chrome browsers, to check whether a string is in a set, a +// predicate containing a big ugly `switch` statement is faster than +// a regular expression, and on Chrome the two are about on par. +// This function uses `eval` (non-lexical) to produce such a +// predicate from a space-separated string of words. +// +// It starts by sorting the words by length. + +function makePredicate(words) { + words = words.split(" "); + var f = "", + cats = []; + out: for (var i = 0; i < words.length; ++i) { + for (var j = 0; j < cats.length; ++j) { + if (cats[j][0].length == words[i].length) { + cats[j].push(words[i]); + continue out; + } + }cats.push([words[i]]); + } + function compareTo(arr) { + if (arr.length == 1) { + return f += "return str === " + JSON.stringify(arr[0]) + ";"; + }f += "switch(str){"; + for (var i = 0; i < arr.length; ++i) { + f += "case " + JSON.stringify(arr[i]) + ":"; + }f += "return true}return false;"; + } + + // When there are more than three length categories, an outer + // switch first dispatches on the lengths, to save on comparisons. + + if (cats.length > 3) { + cats.sort(function (a, b) { + return b.length - a.length; + }); + f += "switch(str.length){"; + for (var i = 0; i < cats.length; ++i) { + var cat = cats[i]; + f += "case " + cat[0].length + ":"; + compareTo(cat); + } + f += "}" + + // Otherwise, simply generate a flat `switch` statement. + + ; + } else { + compareTo(words); + } + return new Function("str", f); +} + +// Reserved word lists for various dialects of the language + +var reservedWords = { + 3: makePredicate("abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile"), + 5: makePredicate("class enum extends super const export import"), + 6: makePredicate("enum await"), + strict: makePredicate("implements interface let package private protected public static yield"), + strictBind: makePredicate("eval arguments") +}; + +exports.reservedWords = reservedWords; +// And the keywords + +var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"; + +var keywords = { + 5: makePredicate(ecma5AndLessKeywords), + 6: makePredicate(ecma5AndLessKeywords + " let const class extends export import yield super") +}; + +exports.keywords = keywords; +// ## Character categories + +// Big ugly regular expressions that match characters in the +// whitespace, identifier, and identifier-start categories. These +// are only applied when a character is found to actually have a +// code point above 128. +// Generated by `tools/generate-identifier-regex.js`. + +var nonASCIIidentifierStartChars = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢲऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"; +var nonASCIIidentifierChars = "‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣤ-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏ᦰ-ᧀᧈᧉ᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷼-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-꣄꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︭︳︴﹍-﹏0-9_"; + +var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); +var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); + +nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; + +// These are a run-length and offset encoded representation of the +// >0xffff code points that are a valid part of identifiers. The +// offset starts at 0x10000, and each pair of numbers represents an +// offset to the next range, and then a size of the range. They were +// generated by tools/generate-identifier-regex.js +var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 17, 26, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 99, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 98, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 26, 45, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 955, 52, 76, 44, 33, 24, 27, 35, 42, 34, 4, 0, 13, 47, 15, 3, 22, 0, 38, 17, 2, 24, 133, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 32, 4, 287, 47, 21, 1, 2, 0, 185, 46, 82, 47, 21, 0, 60, 42, 502, 63, 32, 0, 449, 56, 1288, 920, 104, 110, 2962, 1070, 13266, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 881, 68, 12, 0, 67, 12, 16481, 1, 3071, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 4149, 196, 1340, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42710, 42, 4148, 12, 221, 16355, 541]; +var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 1306, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 52, 0, 13, 2, 49, 13, 16, 9, 83, 11, 168, 11, 6, 9, 8, 2, 57, 0, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 316, 19, 13, 9, 214, 6, 3, 8, 112, 16, 16, 9, 82, 12, 9, 9, 535, 9, 20855, 9, 135, 4, 60, 6, 26, 9, 1016, 45, 17, 3, 19723, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 4305, 6, 792618, 239]; + +// This has a complexity linear to the value of the code. The +// assumption is that looking up astral identifier characters is +// rare. +function isInAstralSet(code, set) { + var pos = 65536; + for (var i = 0; i < set.length; i += 2) { + pos += set[i]; + if (pos > code) { + return false; + }pos += set[i + 1]; + if (pos >= code) { + return true; + } + } +} +function isIdentifierStart(code, astral) { + if (code < 65) { + return code === 36; + }if (code < 91) { + return true; + }if (code < 97) { + return code === 95; + }if (code < 123) { + return true; + }if (code <= 65535) { + return code >= 170 && nonASCIIidentifierStart.test(String.fromCharCode(code)); + }if (astral === false) { + return false; + }return isInAstralSet(code, astralIdentifierStartCodes); +} + +function isIdentifierChar(code, astral) { + if (code < 48) { + return code === 36; + }if (code < 58) { + return true; + }if (code < 65) { + return false; + }if (code < 91) { + return true; + }if (code < 97) { + return code === 95; + }if (code < 123) { + return true; + }if (code <= 65535) { + return code >= 170 && nonASCIIidentifier.test(String.fromCharCode(code)); + }if (astral === false) { + return false; + }return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); +} + +},{}],8:[function(_dereq_,module,exports){ +"use strict"; + +var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + +// The `getLineInfo` function is mostly useful when the +// `locations` option is off (for performance reasons) and you +// want to find the line/column position for a given character +// offset. `input` should be the code string that the offset refers +// into. + +exports.getLineInfo = getLineInfo; +exports.__esModule = true; + +var Parser = _dereq_("./state").Parser; + +var lineBreakG = _dereq_("./whitespace").lineBreakG; + +var deprecate = _dereq_("util").deprecate; + +// These are used when `options.locations` is on, for the +// `startLoc` and `endLoc` properties. + +var Position = exports.Position = (function () { + function Position(line, col) { + _classCallCheck(this, Position); + + this.line = line; + this.column = col; + } + + Position.prototype.offset = function offset(n) { + return new Position(this.line, this.column + n); + }; + + return Position; +})(); + +var SourceLocation = exports.SourceLocation = function SourceLocation(p, start, end) { + _classCallCheck(this, SourceLocation); + + this.start = start; + this.end = end; + if (p.sourceFile !== null) this.source = p.sourceFile; +}; + +function getLineInfo(input, offset) { + for (var line = 1, cur = 0;;) { + lineBreakG.lastIndex = cur; + var match = lineBreakG.exec(input); + if (match && match.index < offset) { + ++line; + cur = match.index + match[0].length; + } else { + return new Position(line, offset - cur); + } + } +} + +var pp = Parser.prototype; + +// This function is used to raise exceptions on parse errors. It +// takes an offset integer (into the current `input`) to indicate +// the location of the error, attaches the position to the end +// of the error message, and then raises a `SyntaxError` with that +// message. + +pp.raise = function (pos, message) { + var loc = getLineInfo(this.input, pos); + message += " (" + loc.line + ":" + loc.column + ")"; + var err = new SyntaxError(message); + err.pos = pos;err.loc = loc;err.raisedAt = this.pos; + throw err; +}; + +pp.curPosition = function () { + return new Position(this.curLine, this.pos - this.lineStart); +}; + +pp.markPosition = function () { + return this.options.locations ? [this.start, this.startLoc] : this.start; +}; + +},{"./state":13,"./whitespace":19,"util":5}],9:[function(_dereq_,module,exports){ +"use strict"; + +var tt = _dereq_("./tokentype").types; + +var Parser = _dereq_("./state").Parser; + +var reservedWords = _dereq_("./identifier").reservedWords; + +var has = _dereq_("./util").has; + +var pp = Parser.prototype; + +// Convert existing expression atom to assignable pattern +// if possible. + +pp.toAssignable = function (node, isBinding) { + if (this.options.ecmaVersion >= 6 && node) { + switch (node.type) { + case "Identifier": + case "ObjectPattern": + case "ArrayPattern": + case "AssignmentPattern": + break; + + case "ObjectExpression": + node.type = "ObjectPattern"; + for (var i = 0; i < node.properties.length; i++) { + var prop = node.properties[i]; + if (prop.kind !== "init") this.raise(prop.key.start, "Object pattern can't contain getter or setter"); + this.toAssignable(prop.value, isBinding); + } + break; + + case "ArrayExpression": + node.type = "ArrayPattern"; + this.toAssignableList(node.elements, isBinding); + break; + + case "AssignmentExpression": + if (node.operator === "=") { + node.type = "AssignmentPattern"; + } else { + this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); + } + break; + + case "ParenthesizedExpression": + node.expression = this.toAssignable(node.expression, isBinding); + break; + + case "MemberExpression": + if (!isBinding) break; + + default: + this.raise(node.start, "Assigning to rvalue"); + } + } + return node; +}; + +// Convert list of expression atoms to binding list. + +pp.toAssignableList = function (exprList, isBinding) { + var end = exprList.length; + if (end) { + var last = exprList[end - 1]; + if (last && last.type == "RestElement") { + --end; + } else if (last && last.type == "SpreadElement") { + last.type = "RestElement"; + var arg = last.argument; + this.toAssignable(arg, isBinding); + if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern") this.unexpected(arg.start); + --end; + } + } + for (var i = 0; i < end; i++) { + var elt = exprList[i]; + if (elt) this.toAssignable(elt, isBinding); + } + return exprList; +}; + +// Parses spread element. + +pp.parseSpread = function (refShorthandDefaultPos) { + var node = this.startNode(); + this.next(); + node.argument = this.parseMaybeAssign(refShorthandDefaultPos); + return this.finishNode(node, "SpreadElement"); +}; + +pp.parseRest = function () { + var node = this.startNode(); + this.next(); + node.argument = this.type === tt.name || this.type === tt.bracketL ? this.parseBindingAtom() : this.unexpected(); + return this.finishNode(node, "RestElement"); +}; + +// Parses lvalue (assignable) atom. + +pp.parseBindingAtom = function () { + if (this.options.ecmaVersion < 6) return this.parseIdent(); + switch (this.type) { + case tt.name: + return this.parseIdent(); + + case tt.bracketL: + var node = this.startNode(); + this.next(); + node.elements = this.parseBindingList(tt.bracketR, true, true); + return this.finishNode(node, "ArrayPattern"); + + case tt.braceL: + return this.parseObj(true); + + default: + this.unexpected(); + } +}; + +pp.parseBindingList = function (close, allowEmpty, allowTrailingComma) { + var elts = [], + first = true; + while (!this.eat(close)) { + if (first) first = false;else this.expect(tt.comma); + if (allowEmpty && this.type === tt.comma) { + elts.push(null); + } else if (allowTrailingComma && this.afterTrailingComma(close)) { + break; + } else if (this.type === tt.ellipsis) { + var rest = this.parseRest(); + this.parseBindingListItem(rest); + elts.push(rest); + this.expect(close); + break; + } else { + var elem = this.parseMaybeDefault(this.start, this.startLoc); + this.parseBindingListItem(elem); + elts.push(elem); + } + } + return elts; +}; + +pp.parseBindingListItem = function (param) { + return param; +}; + +// Parses assignment pattern around given atom if possible. + +pp.parseMaybeDefault = function (startPos, startLoc, left) { + if (Array.isArray(startPos)) { + if (this.options.locations && noCalls === undefined) { + // shift arguments to left by one + left = startLoc; + // flatten startPos + startLoc = startPos[1]; + startPos = startPos[0]; + } + } + left = left || this.parseBindingAtom(); + if (!this.eat(tt.eq)) return left; + var node = this.startNodeAt(startPos, startLoc); + node.operator = "="; + node.left = left; + node.right = this.parseMaybeAssign(); + return this.finishNode(node, "AssignmentPattern"); +}; + +// Verify that a node is an lval — something that can be assigned +// to. + +pp.checkLVal = function (expr, isBinding, checkClashes) { + switch (expr.type) { + case "Identifier": + if (this.strict && (reservedWords.strictBind(expr.name) || reservedWords.strict(expr.name))) this.raise(expr.start, (isBinding ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); + if (checkClashes) { + if (has(checkClashes, expr.name)) this.raise(expr.start, "Argument name clash in strict mode"); + checkClashes[expr.name] = true; + } + break; + + case "MemberExpression": + if (isBinding) this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " member expression"); + break; + + case "ObjectPattern": + for (var i = 0; i < expr.properties.length; i++) { + this.checkLVal(expr.properties[i].value, isBinding, checkClashes); + }break; + + case "ArrayPattern": + for (var i = 0; i < expr.elements.length; i++) { + var elem = expr.elements[i]; + if (elem) this.checkLVal(elem, isBinding, checkClashes); + } + break; + + case "AssignmentPattern": + this.checkLVal(expr.left, isBinding, checkClashes); + break; + + case "RestElement": + this.checkLVal(expr.argument, isBinding, checkClashes); + break; + + case "ParenthesizedExpression": + this.checkLVal(expr.expression, isBinding, checkClashes); + break; + + default: + this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " rvalue"); + } +}; + +},{"./identifier":7,"./state":13,"./tokentype":17,"./util":18}],10:[function(_dereq_,module,exports){ +"use strict"; + +var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + +exports.__esModule = true; + +var Parser = _dereq_("./state").Parser; + +var SourceLocation = _dereq_("./location").SourceLocation; + +// Start an AST node, attaching a start offset. + +var pp = Parser.prototype; + +var Node = exports.Node = function Node() { + _classCallCheck(this, Node); +}; + +pp.startNode = function () { + var node = new Node(); + node.start = this.start; + if (this.options.locations) node.loc = new SourceLocation(this, this.startLoc); + if (this.options.directSourceFile) node.sourceFile = this.options.directSourceFile; + if (this.options.ranges) node.range = [this.start, 0]; + return node; +}; + +pp.startNodeAt = function (pos, loc) { + var node = new Node(); + if (Array.isArray(pos)) { + if (this.options.locations && loc === undefined) { + // flatten pos + loc = pos[1]; + pos = pos[0]; + } + } + node.start = pos; + if (this.options.locations) node.loc = new SourceLocation(this, loc); + if (this.options.directSourceFile) node.sourceFile = this.options.directSourceFile; + if (this.options.ranges) node.range = [pos, 0]; + return node; +}; + +// Finish an AST node, adding `type` and `end` properties. + +pp.finishNode = function (node, type) { + node.type = type; + node.end = this.lastTokEnd; + if (this.options.locations) node.loc.end = this.lastTokEndLoc; + if (this.options.ranges) node.range[1] = this.lastTokEnd; + return node; +}; + +// Finish node at given position + +pp.finishNodeAt = function (node, type, pos, loc) { + node.type = type; + if (Array.isArray(pos)) { + if (this.options.locations && loc === undefined) { + // flatten pos + loc = pos[1]; + pos = pos[0]; + } + } + node.end = pos; + if (this.options.locations) node.loc.end = loc; + if (this.options.ranges) node.range[1] = pos; + return node; +}; + +},{"./location":8,"./state":13}],11:[function(_dereq_,module,exports){ + + +// Interpret and default an options object + +"use strict"; + +exports.getOptions = getOptions; +exports.__esModule = true; + +var _util = _dereq_("./util"); + +var has = _util.has; +var isArray = _util.isArray; + +var SourceLocation = _dereq_("./location").SourceLocation; + +// A second optional argument can be given to further configure +// the parser process. These options are recognized: + +var defaultOptions = { + // `ecmaVersion` indicates the ECMAScript version to parse. Must + // be either 3, or 5, or 6. This influences support for strict + // mode, the set of reserved words, support for getters and + // setters and other features. + ecmaVersion: 5, + // Source type ("script" or "module") for different semantics + sourceType: "script", + // `onInsertedSemicolon` can be a callback that will be called + // when a semicolon is automatically inserted. It will be passed + // th position of the comma as an offset, and if `locations` is + // enabled, it is given the location as a `{line, column}` object + // as second argument. + onInsertedSemicolon: null, + // `onTrailingComma` is similar to `onInsertedSemicolon`, but for + // trailing commas. + onTrailingComma: null, + // By default, reserved words are not enforced. Disable + // `allowReserved` to enforce them. When this option has the + // value "never", reserved words and keywords can also not be + // used as property names. + allowReserved: true, + // When enabled, a return at the top level is not considered an + // error. + allowReturnOutsideFunction: false, + // When enabled, import/export statements are not constrained to + // appearing at the top of the program. + allowImportExportEverywhere: false, + // When enabled, hashbang directive in the beginning of file + // is allowed and treated as a line comment. + allowHashBang: false, + // When `locations` is on, `loc` properties holding objects with + // `start` and `end` properties in `{line, column}` form (with + // line being 1-based and column 0-based) will be attached to the + // nodes. + locations: false, + // A function can be passed as `onToken` option, which will + // cause Acorn to call that function with object in the same + // format as tokenize() returns. Note that you are not + // allowed to call the parser from the callback—that will + // corrupt its internal state. + onToken: null, + // A function can be passed as `onComment` option, which will + // cause Acorn to call that function with `(block, text, start, + // end)` parameters whenever a comment is skipped. `block` is a + // boolean indicating whether this is a block (`/* */`) comment, + // `text` is the content of the comment, and `start` and `end` are + // character offsets that denote the start and end of the comment. + // When the `locations` option is on, two more parameters are + // passed, the full `{line, column}` locations of the start and + // end of the comments. Note that you are not allowed to call the + // parser from the callback—that will corrupt its internal state. + onComment: null, + // Nodes have their start and end characters offsets recorded in + // `start` and `end` properties (directly on the node, rather than + // the `loc` object, which holds line/column data. To also add a + // [semi-standardized][range] `range` property holding a `[start, + // end]` array with the same numbers, set the `ranges` option to + // `true`. + // + // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 + ranges: false, + // It is possible to parse multiple files into a single AST by + // passing the tree produced by parsing the first file as + // `program` option in subsequent parses. This will add the + // toplevel forms of the parsed file to the `Program` (top) node + // of an existing parse tree. + program: null, + // When `locations` is on, you can pass this to record the source + // file in every node's `loc` object. + sourceFile: null, + // This value, if given, is stored in every node, whether + // `locations` is on or off. + directSourceFile: null, + // When enabled, parenthesized expressions are represented by + // (non-standard) ParenthesizedExpression nodes + preserveParens: false, + plugins: {} +};exports.defaultOptions = defaultOptions; + +function getOptions(opts) { + var options = {}; + for (var opt in defaultOptions) { + options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt]; + }if (isArray(options.onToken)) { + (function () { + var tokens = options.onToken; + options.onToken = function (token) { + return tokens.push(token); + }; + })(); + } + if (isArray(options.onComment)) options.onComment = pushComment(options, options.onComment); + + return options; +} + +function pushComment(options, array) { + return function (block, text, start, end, startLoc, endLoc) { + var comment = { + type: block ? "Block" : "Line", + value: text, + start: start, + end: end + }; + if (options.locations) comment.loc = new SourceLocation(this, startLoc, endLoc); + if (options.ranges) comment.range = [start, end]; + array.push(comment); + }; +} + +},{"./location":8,"./util":18}],12:[function(_dereq_,module,exports){ +"use strict"; + +var tt = _dereq_("./tokentype").types; + +var Parser = _dereq_("./state").Parser; + +var lineBreak = _dereq_("./whitespace").lineBreak; + +var pp = Parser.prototype; + +// ## Parser utilities + +// Test whether a statement node is the string literal `"use strict"`. + +pp.isUseStrict = function (stmt) { + return this.options.ecmaVersion >= 5 && stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && stmt.expression.value === "use strict"; +}; + +// Predicate that tests whether the next token is of the given +// type, and if yes, consumes it as a side effect. + +pp.eat = function (type) { + if (this.type === type) { + this.next(); + return true; + } else { + return false; + } +}; + +// Tests whether parsed token is a contextual keyword. + +pp.isContextual = function (name) { + return this.type === tt.name && this.value === name; +}; + +// Consumes contextual keyword if possible. + +pp.eatContextual = function (name) { + return this.value === name && this.eat(tt.name); +}; + +// Asserts that following token is given contextual keyword. + +pp.expectContextual = function (name) { + if (!this.eatContextual(name)) this.unexpected(); +}; + +// Test whether a semicolon can be inserted at the current position. + +pp.canInsertSemicolon = function () { + return this.type === tt.eof || this.type === tt.braceR || lineBreak.test(this.input.slice(this.lastTokEnd, this.start)); +}; + +pp.insertSemicolon = function () { + if (this.canInsertSemicolon()) { + if (this.options.onInsertedSemicolon) this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc); + return true; + } +}; + +// Consume a semicolon, or, failing that, see if we are allowed to +// pretend that there is a semicolon at this position. + +pp.semicolon = function () { + if (!this.eat(tt.semi) && !this.insertSemicolon()) this.unexpected(); +}; + +pp.afterTrailingComma = function (tokType) { + if (this.type == tokType) { + if (this.options.onTrailingComma) this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc); + this.next(); + return true; + } +}; + +// Expect a token of a given type. If found, consume it, otherwise, +// raise an unexpected token error. + +pp.expect = function (type) { + this.eat(type) || this.unexpected(); +}; + +// Raise an unexpected token error. + +pp.unexpected = function (pos) { + this.raise(pos != null ? pos : this.start, "Unexpected token"); +}; + +},{"./state":13,"./tokentype":17,"./whitespace":19}],13:[function(_dereq_,module,exports){ +"use strict"; + +exports.Parser = Parser; +exports.__esModule = true; + +var _identifier = _dereq_("./identifier"); + +var reservedWords = _identifier.reservedWords; +var keywords = _identifier.keywords; + +var tt = _dereq_("./tokentype").types; + +var lineBreak = _dereq_("./whitespace").lineBreak; + +function Parser(options, input, startPos) { + this.options = options; + this.sourceFile = this.options.sourceFile || null; + this.isKeyword = keywords[this.options.ecmaVersion >= 6 ? 6 : 5]; + this.isReservedWord = reservedWords[this.options.ecmaVersion]; + this.input = input; + + // Load plugins + this.loadPlugins(this.options.plugins); + + // Set up token state + + // The current position of the tokenizer in the input. + if (startPos) { + this.pos = startPos; + this.lineStart = Math.max(0, this.input.lastIndexOf("\n", startPos)); + this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length; + } else { + this.pos = this.lineStart = 0; + this.curLine = 1; + } + + // Properties of the current token: + // Its type + this.type = tt.eof; + // For tokens that include more information than their type, the value + this.value = null; + // Its start and end offset + this.start = this.end = this.pos; + // And, if locations are used, the {line, column} object + // corresponding to those offsets + this.startLoc = this.endLoc = null; + + // Position information for the previous token + this.lastTokEndLoc = this.lastTokStartLoc = null; + this.lastTokStart = this.lastTokEnd = this.pos; + + // The context stack is used to superficially track syntactic + // context to predict whether a regular expression is allowed in a + // given position. + this.context = this.initialContext(); + this.exprAllowed = true; + + // Figure out if it's a module code. + this.strict = this.inModule = this.options.sourceType === "module"; + + // Used to signify the start of a potential arrow function + this.potentialArrowAt = -1; + + // Flags to track whether we are in a function, a generator. + this.inFunction = this.inGenerator = false; + // Labels in scope. + this.labels = []; + + // If enabled, skip leading hashbang line. + if (this.pos === 0 && this.options.allowHashBang && this.input.slice(0, 2) === "#!") this.skipLineComment(2); +} + +Parser.prototype.extend = function (name, f) { + this[name] = f(this[name]); +}; + +// Registered plugins + +var plugins = {}; + +exports.plugins = plugins; +Parser.prototype.loadPlugins = function (plugins) { + for (var _name in plugins) { + var plugin = exports.plugins[_name]; + if (!plugin) throw new Error("Plugin '" + _name + "' not found"); + plugin(this, plugins[_name]); + } +}; + +},{"./identifier":7,"./tokentype":17,"./whitespace":19}],14:[function(_dereq_,module,exports){ +"use strict"; + +var tt = _dereq_("./tokentype").types; + +var Parser = _dereq_("./state").Parser; + +var lineBreak = _dereq_("./whitespace").lineBreak; + +var pp = Parser.prototype; + +// ### Statement parsing + +// Parse a program. Initializes the parser, reads any number of +// statements, and wraps them in a Program node. Optionally takes a +// `program` argument. If present, the statements will be appended +// to its body instead of creating a new node. + +pp.parseTopLevel = function (node) { + var first = true; + if (!node.body) node.body = []; + while (this.type !== tt.eof) { + var stmt = this.parseStatement(true, true); + node.body.push(stmt); + if (first && this.isUseStrict(stmt)) this.setStrict(true); + first = false; + } + this.next(); + if (this.options.ecmaVersion >= 6) { + node.sourceType = this.options.sourceType; + } + return this.finishNode(node, "Program"); +}; + +var loopLabel = { kind: "loop" }, + switchLabel = { kind: "switch" }; + +// Parse a single statement. +// +// If expecting a statement and finding a slash operator, parse a +// regular expression literal. This is to handle cases like +// `if (foo) /blah/.exec(foo)`, where looking at the previous token +// does not help. + +pp.parseStatement = function (declaration, topLevel) { + var starttype = this.type, + node = this.startNode(); + + // Most types of statements are recognized by the keyword they + // start with. Many are trivial to parse, some require a bit of + // complexity. + + switch (starttype) { + case tt._break:case tt._continue: + return this.parseBreakContinueStatement(node, starttype.keyword); + case tt._debugger: + return this.parseDebuggerStatement(node); + case tt._do: + return this.parseDoStatement(node); + case tt._for: + return this.parseForStatement(node); + case tt._function: + if (!declaration && this.options.ecmaVersion >= 6) this.unexpected(); + return this.parseFunctionStatement(node); + case tt._class: + if (!declaration) this.unexpected(); + return this.parseClass(node, true); + case tt._if: + return this.parseIfStatement(node); + case tt._return: + return this.parseReturnStatement(node); + case tt._switch: + return this.parseSwitchStatement(node); + case tt._throw: + return this.parseThrowStatement(node); + case tt._try: + return this.parseTryStatement(node); + case tt._let:case tt._const: + if (!declaration) this.unexpected(); // NOTE: falls through to _var + case tt._var: + return this.parseVarStatement(node, starttype); + case tt._while: + return this.parseWhileStatement(node); + case tt._with: + return this.parseWithStatement(node); + case tt.braceL: + return this.parseBlock(); + case tt.semi: + return this.parseEmptyStatement(node); + case tt._export: + case tt._import: + if (!this.options.allowImportExportEverywhere) { + if (!topLevel) this.raise(this.start, "'import' and 'export' may only appear at the top level"); + if (!this.inModule) this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'"); + } + return starttype === tt._import ? this.parseImport(node) : this.parseExport(node); + + // If the statement does not start with a statement keyword or a + // brace, it's an ExpressionStatement or LabeledStatement. We + // simply start parsing an expression, and afterwards, if the + // next token is a colon and the expression was a simple + // Identifier node, we switch to interpreting it as a label. + default: + var maybeName = this.value, + expr = this.parseExpression(); + if (starttype === tt.name && expr.type === "Identifier" && this.eat(tt.colon)) return this.parseLabeledStatement(node, maybeName, expr);else return this.parseExpressionStatement(node, expr); + } +}; + +pp.parseBreakContinueStatement = function (node, keyword) { + var isBreak = keyword == "break"; + this.next(); + if (this.eat(tt.semi) || this.insertSemicolon()) node.label = null;else if (this.type !== tt.name) this.unexpected();else { + node.label = this.parseIdent(); + this.semicolon(); + } + + // Verify that there is an actual destination to break or + // continue to. + for (var i = 0; i < this.labels.length; ++i) { + var lab = this.labels[i]; + if (node.label == null || lab.name === node.label.name) { + if (lab.kind != null && (isBreak || lab.kind === "loop")) break; + if (node.label && isBreak) break; + } + } + if (i === this.labels.length) this.raise(node.start, "Unsyntactic " + keyword); + return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement"); +}; + +pp.parseDebuggerStatement = function (node) { + this.next(); + this.semicolon(); + return this.finishNode(node, "DebuggerStatement"); +}; + +pp.parseDoStatement = function (node) { + this.next(); + this.labels.push(loopLabel); + node.body = this.parseStatement(false); + this.labels.pop(); + this.expect(tt._while); + node.test = this.parseParenExpression(); + if (this.options.ecmaVersion >= 6) this.eat(tt.semi);else this.semicolon(); + return this.finishNode(node, "DoWhileStatement"); +}; + +// Disambiguating between a `for` and a `for`/`in` or `for`/`of` +// loop is non-trivial. Basically, we have to parse the init `var` +// statement or expression, disallowing the `in` operator (see +// the second parameter to `parseExpression`), and then check +// whether the next token is `in` or `of`. When there is no init +// part (semicolon immediately after the opening parenthesis), it +// is a regular `for` loop. + +pp.parseForStatement = function (node) { + this.next(); + this.labels.push(loopLabel); + this.expect(tt.parenL); + if (this.type === tt.semi) return this.parseFor(node, null); + if (this.type === tt._var || this.type === tt._let || this.type === tt._const) { + var _init = this.startNode(), + varKind = this.type; + this.next(); + this.parseVar(_init, true, varKind); + this.finishNode(_init, "VariableDeclaration"); + if ((this.type === tt._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && _init.declarations.length === 1 && !(varKind !== tt._var && _init.declarations[0].init)) return this.parseForIn(node, _init); + return this.parseFor(node, _init); + } + var refShorthandDefaultPos = { start: 0 }; + var init = this.parseExpression(true, refShorthandDefaultPos); + if (this.type === tt._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) { + this.toAssignable(init); + this.checkLVal(init); + return this.parseForIn(node, init); + } else if (refShorthandDefaultPos.start) { + this.unexpected(refShorthandDefaultPos.start); + } + return this.parseFor(node, init); +}; + +pp.parseFunctionStatement = function (node) { + this.next(); + return this.parseFunction(node, true); +}; + +pp.parseIfStatement = function (node) { + this.next(); + node.test = this.parseParenExpression(); + node.consequent = this.parseStatement(false); + node.alternate = this.eat(tt._else) ? this.parseStatement(false) : null; + return this.finishNode(node, "IfStatement"); +}; + +pp.parseReturnStatement = function (node) { + if (!this.inFunction && !this.options.allowReturnOutsideFunction) this.raise(this.start, "'return' outside of function"); + this.next(); + + // In `return` (and `break`/`continue`), the keywords with + // optional arguments, we eagerly look for a semicolon or the + // possibility to insert one. + + if (this.eat(tt.semi) || this.insertSemicolon()) node.argument = null;else { + node.argument = this.parseExpression();this.semicolon(); + } + return this.finishNode(node, "ReturnStatement"); +}; + +pp.parseSwitchStatement = function (node) { + this.next(); + node.discriminant = this.parseParenExpression(); + node.cases = []; + this.expect(tt.braceL); + this.labels.push(switchLabel); + + // Statements under must be grouped (by label) in SwitchCase + // nodes. `cur` is used to keep the node that we are currently + // adding statements to. + + for (var cur, sawDefault; this.type != tt.braceR;) { + if (this.type === tt._case || this.type === tt._default) { + var isCase = this.type === tt._case; + if (cur) this.finishNode(cur, "SwitchCase"); + node.cases.push(cur = this.startNode()); + cur.consequent = []; + this.next(); + if (isCase) { + cur.test = this.parseExpression(); + } else { + if (sawDefault) this.raise(this.lastTokStart, "Multiple default clauses"); + sawDefault = true; + cur.test = null; + } + this.expect(tt.colon); + } else { + if (!cur) this.unexpected(); + cur.consequent.push(this.parseStatement(true)); + } + } + if (cur) this.finishNode(cur, "SwitchCase"); + this.next(); // Closing brace + this.labels.pop(); + return this.finishNode(node, "SwitchStatement"); +}; + +pp.parseThrowStatement = function (node) { + this.next(); + if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) this.raise(this.lastTokEnd, "Illegal newline after throw"); + node.argument = this.parseExpression(); + this.semicolon(); + return this.finishNode(node, "ThrowStatement"); +}; + +// Reused empty array added for node fields that are always empty. + +var empty = []; + +pp.parseTryStatement = function (node) { + this.next(); + node.block = this.parseBlock(); + node.handler = null; + if (this.type === tt._catch) { + var clause = this.startNode(); + this.next(); + this.expect(tt.parenL); + clause.param = this.parseBindingAtom(); + this.checkLVal(clause.param, true); + this.expect(tt.parenR); + clause.guard = null; + clause.body = this.parseBlock(); + node.handler = this.finishNode(clause, "CatchClause"); + } + node.guardedHandlers = empty; + node.finalizer = this.eat(tt._finally) ? this.parseBlock() : null; + if (!node.handler && !node.finalizer) this.raise(node.start, "Missing catch or finally clause"); + return this.finishNode(node, "TryStatement"); +}; + +pp.parseVarStatement = function (node, kind) { + this.next(); + this.parseVar(node, false, kind); + this.semicolon(); + return this.finishNode(node, "VariableDeclaration"); +}; + +pp.parseWhileStatement = function (node) { + this.next(); + node.test = this.parseParenExpression(); + this.labels.push(loopLabel); + node.body = this.parseStatement(false); + this.labels.pop(); + return this.finishNode(node, "WhileStatement"); +}; + +pp.parseWithStatement = function (node) { + if (this.strict) this.raise(this.start, "'with' in strict mode"); + this.next(); + node.object = this.parseParenExpression(); + node.body = this.parseStatement(false); + return this.finishNode(node, "WithStatement"); +}; + +pp.parseEmptyStatement = function (node) { + this.next(); + return this.finishNode(node, "EmptyStatement"); +}; + +pp.parseLabeledStatement = function (node, maybeName, expr) { + for (var i = 0; i < this.labels.length; ++i) { + if (this.labels[i].name === maybeName) this.raise(expr.start, "Label '" + maybeName + "' is already declared"); + }var kind = this.type.isLoop ? "loop" : this.type === tt._switch ? "switch" : null; + this.labels.push({ name: maybeName, kind: kind }); + node.body = this.parseStatement(true); + this.labels.pop(); + node.label = expr; + return this.finishNode(node, "LabeledStatement"); +}; + +pp.parseExpressionStatement = function (node, expr) { + node.expression = expr; + this.semicolon(); + return this.finishNode(node, "ExpressionStatement"); +}; + +// Parse a semicolon-enclosed block of statements, handling `"use +// strict"` declarations when `allowStrict` is true (used for +// function bodies). + +pp.parseBlock = function (allowStrict) { + var node = this.startNode(), + first = true, + oldStrict = undefined; + node.body = []; + this.expect(tt.braceL); + while (!this.eat(tt.braceR)) { + var stmt = this.parseStatement(true); + node.body.push(stmt); + if (first && allowStrict && this.isUseStrict(stmt)) { + oldStrict = this.strict; + this.setStrict(this.strict = true); + } + first = false; + } + if (oldStrict === false) this.setStrict(false); + return this.finishNode(node, "BlockStatement"); +}; + +// Parse a regular `for` loop. The disambiguation code in +// `parseStatement` will already have parsed the init statement or +// expression. + +pp.parseFor = function (node, init) { + node.init = init; + this.expect(tt.semi); + node.test = this.type === tt.semi ? null : this.parseExpression(); + this.expect(tt.semi); + node.update = this.type === tt.parenR ? null : this.parseExpression(); + this.expect(tt.parenR); + node.body = this.parseStatement(false); + this.labels.pop(); + return this.finishNode(node, "ForStatement"); +}; + +// Parse a `for`/`in` and `for`/`of` loop, which are almost +// same from parser's perspective. + +pp.parseForIn = function (node, init) { + var type = this.type === tt._in ? "ForInStatement" : "ForOfStatement"; + this.next(); + node.left = init; + node.right = this.parseExpression(); + this.expect(tt.parenR); + node.body = this.parseStatement(false); + this.labels.pop(); + return this.finishNode(node, type); +}; + +// Parse a list of variable declarations. + +pp.parseVar = function (node, isFor, kind) { + node.declarations = []; + node.kind = kind.keyword; + for (;;) { + var decl = this.startNode(); + this.parseVarId(decl); + if (this.eat(tt.eq)) { + decl.init = this.parseMaybeAssign(isFor); + } else if (kind === tt._const && !(this.type === tt._in || this.options.ecmaVersion >= 6 && this.isContextual("of"))) { + this.unexpected(); + } else if (decl.id.type != "Identifier" && !(isFor && (this.type === tt._in || this.isContextual("of")))) { + this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value"); + } else { + decl.init = null; + } + node.declarations.push(this.finishNode(decl, "VariableDeclarator")); + if (!this.eat(tt.comma)) break; + } + return node; +}; + +pp.parseVarId = function (decl) { + decl.id = this.parseBindingAtom(); + this.checkLVal(decl.id, true); +}; + +// Parse a function declaration or literal (depending on the +// `isStatement` parameter). + +pp.parseFunction = function (node, isStatement, allowExpressionBody) { + this.initFunction(node); + if (this.options.ecmaVersion >= 6) node.generator = this.eat(tt.star); + if (isStatement || this.type === tt.name) node.id = this.parseIdent(); + this.parseFunctionParams(node); + this.parseFunctionBody(node, allowExpressionBody); + return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression"); +}; + +pp.parseFunctionParams = function (node) { + this.expect(tt.parenL); + node.params = this.parseBindingList(tt.parenR, false, false); +}; + +// Parse a class declaration or literal (depending on the +// `isStatement` parameter). + +pp.parseClass = function (node, isStatement) { + this.next(); + this.parseClassId(node, isStatement); + this.parseClassSuper(node); + var classBody = this.startNode(); + var hadConstructor = false; + classBody.body = []; + this.expect(tt.braceL); + while (!this.eat(tt.braceR)) { + if (this.eat(tt.semi)) continue; + var method = this.startNode(); + var isGenerator = this.eat(tt.star); + var isMaybeStatic = this.type === tt.name && this.value === "static"; + this.parsePropertyName(method); + method["static"] = isMaybeStatic && this.type !== tt.parenL; + if (method["static"]) { + if (isGenerator) this.unexpected(); + isGenerator = this.eat(tt.star); + this.parsePropertyName(method); + } + method.kind = "method"; + if (!method.computed) { + var key = method.key; + + var isGetSet = false; + if (!isGenerator && key.type === "Identifier" && this.type !== tt.parenL && (key.name === "get" || key.name === "set")) { + isGetSet = true; + method.kind = key.name; + key = this.parsePropertyName(method); + } + if (!method["static"] && (key.type === "Identifier" && key.name === "constructor" || key.type === "Literal" && key.value === "constructor")) { + if (hadConstructor) this.raise(key.start, "Duplicate constructor in the same class"); + if (isGetSet) this.raise(key.start, "Constructor can't have get/set modifier"); + if (isGenerator) this.raise(key.start, "Constructor can't be a generator"); + method.kind = "constructor"; + hadConstructor = true; + } + } + this.parseClassMethod(classBody, method, isGenerator); + } + node.body = this.finishNode(classBody, "ClassBody"); + return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression"); +}; + +pp.parseClassMethod = function (classBody, method, isGenerator) { + method.value = this.parseMethod(isGenerator); + classBody.body.push(this.finishNode(method, "MethodDefinition")); +}; + +pp.parseClassId = function (node, isStatement) { + node.id = this.type === tt.name ? this.parseIdent() : isStatement ? this.unexpected() : null; +}; + +pp.parseClassSuper = function (node) { + node.superClass = this.eat(tt._extends) ? this.parseExprSubscripts() : null; +}; + +// Parses module export declaration. + +pp.parseExport = function (node) { + this.next(); + // export * from '...' + if (this.eat(tt.star)) { + this.expectContextual("from"); + node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected(); + this.semicolon(); + return this.finishNode(node, "ExportAllDeclaration"); + } + if (this.eat(tt._default)) { + // export default ... + var expr = this.parseMaybeAssign(); + var needsSemi = true; + if (expr.type == "FunctionExpression" || expr.type == "ClassExpression") { + needsSemi = false; + if (expr.id) { + expr.type = expr.type == "FunctionExpression" ? "FunctionDeclaration" : "ClassDeclaration"; + } + } + node.declaration = expr; + if (needsSemi) this.semicolon(); + return this.finishNode(node, "ExportDefaultDeclaration"); + } + // export var|const|let|function|class ... + if (this.shouldParseExportStatement()) { + node.declaration = this.parseStatement(true); + node.specifiers = []; + node.source = null; + } else { + // export { x, y as z } [from '...'] + node.declaration = null; + node.specifiers = this.parseExportSpecifiers(); + if (this.eatContextual("from")) { + node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected(); + } else { + node.source = null; + } + this.semicolon(); + } + return this.finishNode(node, "ExportNamedDeclaration"); +}; + +pp.shouldParseExportStatement = function () { + return this.type.keyword; +}; + +// Parses a comma-separated list of module exports. + +pp.parseExportSpecifiers = function () { + var nodes = [], + first = true; + // export { x, y as z } [from '...'] + this.expect(tt.braceL); + while (!this.eat(tt.braceR)) { + if (!first) { + this.expect(tt.comma); + if (this.afterTrailingComma(tt.braceR)) break; + } else first = false; + + var node = this.startNode(); + node.local = this.parseIdent(this.type === tt._default); + node.exported = this.eatContextual("as") ? this.parseIdent(true) : node.local; + nodes.push(this.finishNode(node, "ExportSpecifier")); + } + return nodes; +}; + +// Parses import declaration. + +pp.parseImport = function (node) { + this.next(); + // import '...' + if (this.type === tt.string) { + node.specifiers = empty; + node.source = this.parseExprAtom(); + node.kind = ""; + } else { + node.specifiers = this.parseImportSpecifiers(); + this.expectContextual("from"); + node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected(); + } + this.semicolon(); + return this.finishNode(node, "ImportDeclaration"); +}; + +// Parses a comma-separated list of module imports. + +pp.parseImportSpecifiers = function () { + var nodes = [], + first = true; + if (this.type === tt.name) { + // import defaultObj, { x, y as z } from '...' + var node = this.startNode(); + node.local = this.parseIdent(); + this.checkLVal(node.local, true); + nodes.push(this.finishNode(node, "ImportDefaultSpecifier")); + if (!this.eat(tt.comma)) return nodes; + } + if (this.type === tt.star) { + var node = this.startNode(); + this.next(); + this.expectContextual("as"); + node.local = this.parseIdent(); + this.checkLVal(node.local, true); + nodes.push(this.finishNode(node, "ImportNamespaceSpecifier")); + return nodes; + } + this.expect(tt.braceL); + while (!this.eat(tt.braceR)) { + if (!first) { + this.expect(tt.comma); + if (this.afterTrailingComma(tt.braceR)) break; + } else first = false; + + var node = this.startNode(); + node.imported = this.parseIdent(true); + node.local = this.eatContextual("as") ? this.parseIdent() : node.imported; + this.checkLVal(node.local, true); + nodes.push(this.finishNode(node, "ImportSpecifier")); + } + return nodes; +}; + +},{"./state":13,"./tokentype":17,"./whitespace":19}],15:[function(_dereq_,module,exports){ +"use strict"; + +var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + +exports.__esModule = true; +// The algorithm used to determine whether a regexp can appear at a +// given point in the program is loosely based on sweet.js' approach. +// See https://github.com/mozilla/sweet.js/wiki/design + +var Parser = _dereq_("./state").Parser; + +var tt = _dereq_("./tokentype").types; + +var lineBreak = _dereq_("./whitespace").lineBreak; + +var TokContext = exports.TokContext = function TokContext(token, isExpr, preserveSpace, override) { + _classCallCheck(this, TokContext); + + this.token = token; + this.isExpr = isExpr; + this.preserveSpace = preserveSpace; + this.override = override; +}; + +var types = { + b_stat: new TokContext("{", false), + b_expr: new TokContext("{", true), + b_tmpl: new TokContext("${", true), + p_stat: new TokContext("(", false), + p_expr: new TokContext("(", true), + q_tmpl: new TokContext("`", true, true, function (p) { + return p.readTmplToken(); + }), + f_expr: new TokContext("function", true) +}; + +exports.types = types; +var pp = Parser.prototype; + +pp.initialContext = function () { + return [types.b_stat]; +}; + +pp.braceIsBlock = function (prevType) { + var parent = undefined; + if (prevType === tt.colon && (parent = this.curContext()).token == "{") return !parent.isExpr; + if (prevType === tt._return) return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)); + if (prevType === tt._else || prevType === tt.semi || prevType === tt.eof) return true; + if (prevType == tt.braceL) return this.curContext() === types.b_stat; + return !this.exprAllowed; +}; + +pp.updateContext = function (prevType) { + var update = undefined, + type = this.type; + if (type.keyword && prevType == tt.dot) this.exprAllowed = false;else if (update = type.updateContext) update.call(this, prevType);else this.exprAllowed = type.beforeExpr; +}; + +// Token-specific context update code + +tt.parenR.updateContext = tt.braceR.updateContext = function () { + if (this.context.length == 1) { + this.exprAllowed = true; + return; + } + var out = this.context.pop(); + if (out === types.b_stat && this.curContext() === types.f_expr) { + this.context.pop(); + this.exprAllowed = false; + } else if (out === types.b_tmpl) { + this.exprAllowed = true; + } else { + this.exprAllowed = !out.isExpr; + } +}; + +tt.braceL.updateContext = function (prevType) { + this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr); + this.exprAllowed = true; +}; + +tt.dollarBraceL.updateContext = function () { + this.context.push(types.b_tmpl); + this.exprAllowed = true; +}; + +tt.parenL.updateContext = function (prevType) { + var statementParens = prevType === tt._if || prevType === tt._for || prevType === tt._with || prevType === tt._while; + this.context.push(statementParens ? types.p_stat : types.p_expr); + this.exprAllowed = true; +}; + +tt.incDec.updateContext = function () {}; + +tt._function.updateContext = function () { + if (this.curContext() !== types.b_stat) this.context.push(types.f_expr); + this.exprAllowed = false; +}; + +tt.backQuote.updateContext = function () { + if (this.curContext() === types.q_tmpl) this.context.pop();else this.context.push(types.q_tmpl); + this.exprAllowed = false; +}; + +// tokExprAllowed stays unchanged + +},{"./state":13,"./tokentype":17,"./whitespace":19}],16:[function(_dereq_,module,exports){ +"use strict"; + +var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; + +exports.__esModule = true; + +var _identifier = _dereq_("./identifier"); + +var isIdentifierStart = _identifier.isIdentifierStart; +var isIdentifierChar = _identifier.isIdentifierChar; + +var _tokentype = _dereq_("./tokentype"); + +var tt = _tokentype.types; +var keywordTypes = _tokentype.keywords; + +var Parser = _dereq_("./state").Parser; + +var SourceLocation = _dereq_("./location").SourceLocation; + +var _whitespace = _dereq_("./whitespace"); + +var lineBreak = _whitespace.lineBreak; +var lineBreakG = _whitespace.lineBreakG; +var isNewLine = _whitespace.isNewLine; +var nonASCIIwhitespace = _whitespace.nonASCIIwhitespace; + +// Object type used to represent tokens. Note that normally, tokens +// simply exist as properties on the parser object. This is only +// used for the onToken callback and the external tokenizer. + +var Token = exports.Token = function Token(p) { + _classCallCheck(this, Token); + + this.type = p.type; + this.value = p.value; + this.start = p.start; + this.end = p.end; + if (p.options.locations) this.loc = new SourceLocation(p, p.startLoc, p.endLoc); + if (p.options.ranges) this.range = [p.start, p.end]; +}; + +// ## Tokenizer + +var pp = Parser.prototype; + +// Are we running under Rhino? +var isRhino = typeof Packages !== "undefined"; + +// Move to the next token + +pp.next = function () { + if (this.options.onToken) this.options.onToken(new Token(this)); + + this.lastTokEnd = this.end; + this.lastTokStart = this.start; + this.lastTokEndLoc = this.endLoc; + this.lastTokStartLoc = this.startLoc; + this.nextToken(); +}; + +pp.getToken = function () { + this.next(); + return new Token(this); +}; + +// If we're in an ES6 environment, make parsers iterable +if (typeof Symbol !== "undefined") pp[Symbol.iterator] = function () { + var self = this; + return { next: function next() { + var token = self.getToken(); + return { + done: token.type === tt.eof, + value: token + }; + } }; +}; + +// Toggle strict mode. Re-reads the next number or string to please +// pedantic tests (`"use strict"; 010;` should fail). + +pp.setStrict = function (strict) { + this.strict = strict; + if (this.type !== tt.num && this.type !== tt.string) return; + this.pos = this.start; + if (this.options.locations) { + while (this.pos < this.lineStart) { + this.lineStart = this.input.lastIndexOf("\n", this.lineStart - 2) + 1; + --this.curLine; + } + } + this.nextToken(); +}; + +pp.curContext = function () { + return this.context[this.context.length - 1]; +}; + +// Read a single token, updating the parser object's token-related +// properties. + +pp.nextToken = function () { + var curContext = this.curContext(); + if (!curContext || !curContext.preserveSpace) this.skipSpace(); + + this.start = this.pos; + if (this.options.locations) this.startLoc = this.curPosition(); + if (this.pos >= this.input.length) return this.finishToken(tt.eof); + + if (curContext.override) return curContext.override(this);else this.readToken(this.fullCharCodeAtPos()); +}; + +pp.readToken = function (code) { + // Identifier or keyword. '\uXXXX' sequences are allowed in + // identifiers, so '\' also dispatches to that. + if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) return this.readWord(); + + return this.getTokenFromCode(code); +}; + +pp.fullCharCodeAtPos = function () { + var code = this.input.charCodeAt(this.pos); + if (code <= 55295 || code >= 57344) return code; + var next = this.input.charCodeAt(this.pos + 1); + return (code << 10) + next - 56613888; +}; + +pp.skipBlockComment = function () { + var startLoc = this.options.onComment && this.options.locations && this.curPosition(); + var start = this.pos, + end = this.input.indexOf("*/", this.pos += 2); + if (end === -1) this.raise(this.pos - 2, "Unterminated comment"); + this.pos = end + 2; + if (this.options.locations) { + lineBreakG.lastIndex = start; + var match = undefined; + while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) { + ++this.curLine; + this.lineStart = match.index + match[0].length; + } + } + if (this.options.onComment) this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, startLoc, this.options.locations && this.curPosition()); +}; + +pp.skipLineComment = function (startSkip) { + var start = this.pos; + var startLoc = this.options.onComment && this.options.locations && this.curPosition(); + var ch = this.input.charCodeAt(this.pos += startSkip); + while (this.pos < this.input.length && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233) { + ++this.pos; + ch = this.input.charCodeAt(this.pos); + } + if (this.options.onComment) this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, startLoc, this.options.locations && this.curPosition()); +}; + +// Called at the start of the parse and after every token. Skips +// whitespace and comments, and. + +pp.skipSpace = function () { + while (this.pos < this.input.length) { + var ch = this.input.charCodeAt(this.pos); + if (ch === 32) { + // ' ' + ++this.pos; + } else if (ch === 13) { + ++this.pos; + var next = this.input.charCodeAt(this.pos); + if (next === 10) { + ++this.pos; + } + if (this.options.locations) { + ++this.curLine; + this.lineStart = this.pos; + } + } else if (ch === 10 || ch === 8232 || ch === 8233) { + ++this.pos; + if (this.options.locations) { + ++this.curLine; + this.lineStart = this.pos; + } + } else if (ch > 8 && ch < 14) { + ++this.pos; + } else if (ch === 47) { + // '/' + var next = this.input.charCodeAt(this.pos + 1); + if (next === 42) { + // '*' + this.skipBlockComment(); + } else if (next === 47) { + // '/' + this.skipLineComment(2); + } else break; + } else if (ch === 160) { + // '\xa0' + ++this.pos; + } else if (ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { + ++this.pos; + } else { + break; + } + } +}; + +// Called at the end of every token. Sets `end`, `val`, and +// maintains `context` and `exprAllowed`, and skips the space after +// the token, so that the next one's `start` will point at the +// right position. + +pp.finishToken = function (type, val) { + this.end = this.pos; + if (this.options.locations) this.endLoc = this.curPosition(); + var prevType = this.type; + this.type = type; + this.value = val; + + this.updateContext(prevType); +}; + +// ### Token reading + +// This is the function that is called to fetch the next token. It +// is somewhat obscure, because it works in character codes rather +// than characters, and because operator parsing has been inlined +// into it. +// +// All in the name of speed. +// +pp.readToken_dot = function () { + var next = this.input.charCodeAt(this.pos + 1); + if (next >= 48 && next <= 57) return this.readNumber(true); + var next2 = this.input.charCodeAt(this.pos + 2); + if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { + // 46 = dot '.' + this.pos += 3; + return this.finishToken(tt.ellipsis); + } else { + ++this.pos; + return this.finishToken(tt.dot); + } +}; + +pp.readToken_slash = function () { + // '/' + var next = this.input.charCodeAt(this.pos + 1); + if (this.exprAllowed) { + ++this.pos;return this.readRegexp(); + } + if (next === 61) return this.finishOp(tt.assign, 2); + return this.finishOp(tt.slash, 1); +}; + +pp.readToken_mult_modulo = function (code) { + // '%*' + var next = this.input.charCodeAt(this.pos + 1); + if (next === 61) return this.finishOp(tt.assign, 2); + return this.finishOp(code === 42 ? tt.star : tt.modulo, 1); +}; + +pp.readToken_pipe_amp = function (code) { + // '|&' + var next = this.input.charCodeAt(this.pos + 1); + if (next === code) return this.finishOp(code === 124 ? tt.logicalOR : tt.logicalAND, 2); + if (next === 61) return this.finishOp(tt.assign, 2); + return this.finishOp(code === 124 ? tt.bitwiseOR : tt.bitwiseAND, 1); +}; + +pp.readToken_caret = function () { + // '^' + var next = this.input.charCodeAt(this.pos + 1); + if (next === 61) return this.finishOp(tt.assign, 2); + return this.finishOp(tt.bitwiseXOR, 1); +}; + +pp.readToken_plus_min = function (code) { + // '+-' + var next = this.input.charCodeAt(this.pos + 1); + if (next === code) { + if (next == 45 && this.input.charCodeAt(this.pos + 2) == 62 && lineBreak.test(this.input.slice(this.lastTokEnd, this.pos))) { + // A `-->` line comment + this.skipLineComment(3); + this.skipSpace(); + return this.nextToken(); + } + return this.finishOp(tt.incDec, 2); + } + if (next === 61) return this.finishOp(tt.assign, 2); + return this.finishOp(tt.plusMin, 1); +}; + +pp.readToken_lt_gt = function (code) { + // '<>' + var next = this.input.charCodeAt(this.pos + 1); + var size = 1; + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; + if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1); + return this.finishOp(tt.bitShift, size); + } + if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && this.input.charCodeAt(this.pos + 3) == 45) { + if (this.inModule) this.unexpected(); + // `` line comment + this.skipLineComment(3); + this.skipSpace(); + return this.nextToken(); + } + return this.finishOp(tt.incDec, 2); + } + if (next === 61) return this.finishOp(tt.assign, 2); + return this.finishOp(tt.plusMin, 1); +}; + +pp.readToken_lt_gt = function (code) { + // '<>' + var next = this.input.charCodeAt(this.pos + 1); + var size = 1; + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; + if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1); + return this.finishOp(tt.bitShift, size); + } + if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && this.input.charCodeAt(this.pos + 3) == 45) { + if (this.inModule) this.unexpected(); + // `` line comment + this.skipLineComment(3) + this.skipSpace() + return this.nextToken() + } + return this.finishOp(tt.incDec, 2) + } + if (next === 61) return this.finishOp(tt.assign, 2) + return this.finishOp(tt.plusMin, 1) +} + +pp.readToken_lt_gt = function(code) { // '<>' + let next = this.input.charCodeAt(this.pos + 1) + let size = 1 + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2 + if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1) + return this.finishOp(tt.bitShift, size) + } + if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && + this.input.charCodeAt(this.pos + 3) == 45) { + if (this.inModule) this.unexpected() + // `